Welcome to TiddlyWiki created by Jeremy Ruston; Copyright © 2004-2007 Jeremy Ruston, Copyright © 2007-2011 UnaMesa Association
|''Type:''|file|
|''URL:''|file:///C:/Users/mueller/Downloads/Wiki.html|
|''Workspace:''|(default)|
This tiddler was automatically created to record the details of this server
<html>
<ul>
<li>Konfigfile hat im Home-Verzeichnis des Users zu liegen;</li>
<br />
<li><b>Kommentarzeilen:</b><br />
Kommentarzeilen im File .vimrc beginnen mit<br />
doppelten Anführungszeichen, gefolgt<br />
von einem Blank.<br />
<br />
Beispiel:<br />
<code>" this is how a comment looks like in ~/.vimrc</code><br />
</li>
<br />
<li>sämtliche, aktuelle Einstellungen anzeigen:
<code><pre>:set all</pre></code>
</li>
<li>Mit dem Befehl
<code><pre>:script</pre></code>
(im Editor) kann man sich sämtliche Verzeichnisse anzei‐<br />
gen lassen, aus denen VIM Einstellungen lädt.
</li>
<br />
<li>Informationen bzgl. .vimrc‐File ausgeben:
<code><pre>:version</pre></code>
(im Editor). You will get an output which includes something like:
<code><pre>
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
system menu file: "$VIMRUNTIME/menu.vim"
</pre></code>
This is where vim looks for vimrcs, but it doesn't mean they exist.
</li>
<br />
<li>You can check the full path of your vimrc with:
<code><pre>:echo $MYVIMRC</pre></code>
(im Editor). If the output is empty, then your vim doesn't use a user<br />
vimrc (just create it if you wish).<br />
</li>
<br />
<li> Beispiel-Einträge:
<code><pre>
:set number # <em>Zeilennummerierung an</em>
:set showmode # <em>Aktionsmodus (Insert od. Befehl) anzeigen</em>
:set ruler #
:set tabstop=4 # <em>Ein Tab-Zeichen entspricht 4 Blanks</em>
:set lcs+=space:. # <em>nach Eingave von “</em>set list<em>“ werden Blanks durch Punkte erkennbar gemacht</em>
:set laststatus=2 # <em>Anzeigen der Status-Zeile in jedem Fenster</em>
"
" <em>Die Darstellung der Status-Zeile definieren:</em>
:set statusline=%F
:set statusline+=%=
:set statusline+=%l,%c
:set statusline+=%=
:set statusline+=%{strftime('%c')}
"
" <em>Alternativ alles in einer Zeile:</em>
:set statusline=%F%=%l,%c%=%{strftime('%c')}
</pre></code>
</li>
<li><h3>Konvertierung Tabs ⇔ Blanks/Spaces</h3>
<table border=0>
<tr>
<td>konvertieren Tabs in Blanks/Spaces:
<ol>
<li><code><b>:set et</b></code> bzw. <code><b>:set expandtab</b></code>
</li>
<li><code><b>:ret</b></code>
</li>
</ol>
</td>
</tr>
<tr>
<td>konvertieren Blanks/Spaces in Tabs:
<ol>
<li><code><b>:set et!</b></code> bzw. <code><b>:set expandtab!</b></code>
</li>
<li><code><b>:ret!</b></code>
</li>
</ol>
</td>
</tr>
</table>
</li>
<li><h3>Aktivieren des Highlighting beim Suchen</h3>
<table border=0>
<tr>
<td><code><b>hlsearch<br />
highlight search</b></code>
</td>
<td>
</td>
</tr>
</table>
</li>
<li>Einstellen des Filetypes:
<code><pre>:set ft=<em><Typ></em></pre></code>
es kann z.B. ein Ruby-File sein.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www-user.tu-chemnitz.de/~hot/VIM/VIM/Tipps_und_Tricks.html"
target="_blank" rel="noreferrer noopener">
TU Chemnitz :: Vim - Tipps und Tricks</a>
</li>
<li><a href="https://vim.fandom.com/wiki/Converting_tabs_to_spaces"
target="_blank" rel="noreferrer noopener">
Fandom :: Umwandeln von Tabs in Leerzeichen</a>
</li>
<li><a href="https://stackoverflow.com/questions/8977649/how-to-locate-the-vimrc-file-used-by-vim"
target="_blank" rel="noreferrer noopener">
StackOverflow :: How to locate the vimrc file used by vim</a>
</li>
<li><a href="https://www.freecodecamp.org/news/vimrc-configuration-guide-customize-your-vim-editor/"
target="_blank" rel="noreferrer noopener">
FreeCodeCamp :: Vimrc Configuration Guide</a>
</li>
</ul>
</html>
https://dbader.org/blog/writing-pythonic-code
https://www.sublimetext.com/
pytest:
https://www.youtube.com/watch?v=_QtM7QGuj1A
https://www.youtube.com/watch?v=VKY-0LEmrwk
https://docs.pytest.org/en/latest/
https://www.guru99.com/pytest-tutorial.html
https://realpython.com/pytest-python-testing/
Buch:
Trennt euch! von Thomas Meyer
<html>
Morgen- oder Abendroutinen anderer Menschen zu erfahren ist zu einer<br />
meiner Leidenschaft geworden. Ich persönlich glaube, dass der Wunsch<br />
nach Routine, also nach Regelmäßigkeit mit einem einem Bedürfnis<br />
nach Sicherheit und Struktur zusammenhängt. Ich bin ganz verrückt danach,<br />
auch wenn es mir fast nie gelingt Routinen lange beizubehalten. Aber gute<br />
Konzentration kann eigentlich jede*r gebrauchen, oder? Vielen von uns<br />
schwirren aber permanent zu viele Gedanken, Träume und To-Dos im Kopf <br />
herum, wir lassen uns von unserem Umfeld leicht ablenken. Aber keine<br />
Angst, du musst kein Sportjunkie oder Meditationsguru werden, um dich<br />
besser zu fokussieren. Es gibt auch einfache Tipps, die helfen können.<br />
<ol>
<li><h3>Den nächsten Tag planen</h3>
Nimm dir abends, kurz vor Feierabend, etwas Zeit, den morgigen Tag<br />
zu planen. Am besten schreibst du dir deine To‐Do's auf, aber es soll-<br />
ten nicht zu viel sein. Am besten nicht mehr als sechs pro Tag, das<br />
lerne ich zur Zeit. Das verschafft dir eine gute Übersicht und beugt vor, <br />
sodass du morgens ‐ angesichts der vielen anstehenden Aufgaben ‐ <br />
nicht ins Straucheln kommst.
</li>
<li><h3>Die Leistungskurve nutzen</h3>
Die Leistungskurve, über den Tag gesehen, ist natürlich bei jeder*m<br />
individuell unterschiedlich. Wichtig ist es aber die Zeiten, an denen<br />
du dich im Leistungshoch befindest, mit den anspruchsvolleren Auf<br />
gaben zu füllen. Bei mir wäre das zum Beispiel morgens als allerers-<br />
tes, wenn ich ins Büro komme. Aufgaben, die mir leichter fallen, he‐<br />
be ich mir dann für das Nachmittagstief auf, etwa Mails beantworten<br />
oder To‐Do‐Listen schreiben.
</li>
<li><h3>Gutes Brainfood zu sich nehmen</h3>
Fitmacher zu sich nehmen, also das Gegenteil von Lebensmitteln, die müde machen, etwa Spaghetti und riesige Kartoffelberge. Vielleicht ist es auch von Person zu Person unterschiedlich, aber ich mag einfach nur noch schlafen hinterher. Für die Gehirnfunktionen spielen beispielsweise Omega-3-Fettsäuren eine wichtige Rolle: Walnussöl, fettreicher Fisch, Nüsse und Trockenfrüchte. Gut funktioniert bei mir auch ein gemischter Salat mit Mozzarella, Avocado, Feta oder allem zusammen. Zum Sattmachen eignen sich Nüsse, Hülsenfrüchte wie Bohnen oder Kichererbsen.
</li>
<li><h3>Kleine Gedankenexperimente ‐ “Das Stoppschild“</h3>
Wenn dein Gehirn sich lieber damit beschäftigt, ob du wohl den Herd daheim ausgemacht hast oder was der Chef mit diesem Satz vorhin gemeint haben könnte, anstatt dich auf deinen Text oder andere Aufgaben zu konzentrieren, kann das “Stoppschild“ helfen. Stell es dir jedes Mal vor, wenn du geistig von deiner Arbeit abdriftest. Rufe innerlich laut “Stopp“. Atme danach durch und widme dich wieder deiner Aufgabe. Probiert's mal aus, mir hilft das sehr gut.
</li>
<li><h3>Zeiten, in denen du allein im Büro sein kannst, nutzen</h3>
Die Zeiten, in denen das Büro nicht voll besetzt ist, sind vermutlich früh morgens und am Abend. Je nach Leistungskurve (siehe Punkt 2) fange also entweder früh an oder bleibe etwas länger. Denn klar, je weniger Menschen sich im Büro aufhalten, desto weniger Ablenkung herrscht und umso besser kannst du dich vielleicht deinen Aufgaben widmen.
</li>
<li><h3>Ausreichend Schlaf ist ganz wichtig</h3>
Wer genügend Schlaf hat, dessen Konzentrationsfähigkeit ist besser, das ist ja eigentlich klar und auch hundertfach wissenschaftlich bewiesen. Am besten trainierst du dir einen festen Schlafrhythmus an, so gelingt es euch besser, regelmäßig genug Schlaf zu bekommen.
</li>
<li><h3>Phasen mit und ohne Ablenkungen abwechseln</h3>
Sind wir doch mal ehrlich: Niemand schafft es sich acht bis zehn Stunden am Tag von allen Ablenkungen abzuschotten und hochkonzentriert zu arbeiten. Das geht vielleicht mal, aber häufig ist unsere Konzentrationsfähigkeit doch von unserer Tagesform abhängig. Eine Möglichkeit wäre es, in kurzen Phasen, in denen du möglichst alle Ablenkungen ausschaltest, zu arbeiten. Jede*r hat da andere Möglichkeiten und Abläufe. Und dann folgt eventuell eine kurze Phase, in der du Ablenkung ganz bewusst zulässt, um zum Beispiel 'ne Kaffeepause mit Kolleg*innen einzulegen.
</li>
<li><h3>Kaffee trinken, aber richtig</h3>
Kaffee hilft in der Regel immer. Aber wenn du vor lauter Verzweiflung und Müdigkeit literweise Kaffee in dich reinkippst, schläfst du leider auch nicht gut, was zu erneuter Müdigkeit am nächsten Tag führt ‐ ein vicious circle. Probier doch mal grünen Tee, wenn du sonst Kaffee-Junkie bist, oder unsere heiß geliebte Mate zur Abwechslung.
</li>
<li><h3>Medititieren, um sich besser zu fokussieren</h3>
Du kannst es vielleicht nicht mehr hören, aber Meditation steht bei einem sehr großen Teil erfolgreicher Menschen auf der täglichen To-Do-Liste. Einige bauen es in ihr Morgenritual ein, andere in ihre Abendroutine, manche sogar in beides. Morgens hilft das Meditieren dabei, gelassen und mit vollem Fokus die wichtigsten Aufgaben des Tages angehen zu können. Abends hilft die Meditation dabei, die vielen Gedanken im Kopf ziehen zu lassen und somit auch, euch ein wenig runterzufahren.
</li>
<li><h3>Noise-Cancelling-Kopfhörer oder Naturgeräusche anhören</h3>
Sorge dafür, möglichst wenig abgelenkt zu werden. Vor allem in Großraumbüros herrscht oft eine anstrengende Geräuschkulisse. Noise-Cancelling-Kopfhörer sind daher meine Entdeckung des vergangenen Jahres. Dank dieser musst du nun nicht mehr die Musik lauter stellen, um die dich umgebenden Geräusche zu übertünchen, sondern hast vollkommene Ruhe. Außerdem blenden auch Naturgeräusche, die man sich zum Beispiel auf YouTube nebenbei anhören kann, Gespräche und Telefonate deiner Kolleg*innen aus. Ich höre am liebsten Regen und Waldgeräuschen zu.
</li>
<li><h3>Kein Multitasking versuchen</h3>
Das fällt nicht jeder*m leicht, aber genau darum geht es.: Konzentration auf EINE Aufgabe nach der anderen. Je krampfhafter du versuchst, alles gleichzeitig zu bewältigen oder zu schnell zwischen den einzelnen Aufgaben des Tages hin und her zu wechseln, desto langsamer kommst du voran. Man muss sich ja auch immer wieder neu in das einzelne To-Do hineindenken. Dabei kann man eigentlich nur verlieren.
</li>
</ol>
<h3>Link:</h3>
<a href="mitvergnuegen.com/2020/routinen-fokussieren-konzentrieren/" target=_blank>MitVergnügen :: Routinen, um sich besser zu konzentrieren</a>
</html>
eno1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 7c:4d:8f:55:b7:fb txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
https://www.baeldung.com/linux/pdf-split-recombine-pages
https://www.der-gewuerzladen.de/
https://www.edx.org/course/einfuhrung-in-matlab
https://www.aha-region.de/abfall-abc/abc/?tx_vcahaabfallabc_pi1%5Babfall%5D=121
https://magazin.kuechenfinder.com/entsorgen-von-speiseoel-wohin-mit-dem-alten-fett
https://www.resorti.de/blog/speiseoel-fette-entsorgen/
https://machinelearningmastery.com/roc-curves-and-precision-recall-curves-for-classification-in-python/
https://machinelearningmastery.com/introduction-to-computational-learning-theory/
Verwendung von geschweiften Klammern für die Variablenabgrenzung: geschweifte Klammern werden verwendet, um eine Variable zu begrenzen.
foo='stage'
echo $fooone
... returns empty line
echo ${foo}one
stageone
In diesem Beispiel werden geschweifte Klammern verwendet, um den Wert der Variablen foo korrekt mit der Zeichenfolge one zu verketten.
https://de.linux-console.net/?p=11915
---------------------------------------------------------------------------------------------------------------------------------
Inhaltsverzeichnis
Ähnliche Beiträge
Automatisierung von Aufgaben durch Scripts
Der Aufbau von IP-Adressen
gzip(1)
Grundsätzlich gilt für die Shellvariablen innerhalb eines Scripts genau das, was schon vorher bei der Shell als Benutzeroberfläche gesagt wurde. Innerhalb eines Scripts werden neben den später beschriebenen Kommandozeilenparameter-Variablen auch häufig spezielle Arten von sogenannter Variablen-Wertersetzung benutzt. Selbstverständlich funktionieren diese Wertersetzungen auch außerhalb von Scripts, nur finden sie da selten eine vernünftige Anwendung.
Die folgenden Wertersetzungen werden von der bash unterstützt:
${Variablenname}
Die Variable wird genauso ausgewertet, wie ohne die geschweiften Klammern. Vorteil dieser Form ist es, dass Doppeldeutigkeiten aufgehoben werden, wenn z.B. in einem Ausgabebefehl direkt auf die Variable weiterer Text folgen soll. Nehmen wir an, wir haben eine Variable mit einem Namen und wollen in einem Ausgabebefehl einen Genitiv herstellen, indem wir ein s anhängen. Würden wir schreiben
echo $NAMEs
käme es eventuell zu Doppeldeutigkeiten. Die Shell wüßte nicht, ob der Variablenname jetzt NAMEs ist oder NAME mit angehängtem s. Um so eine Doppeldeutigkeit zu vermeiden schreiben wir
echo ${NAME}s
Jetzt kann kein Mißverständnis mehr auftreten.
https://www.linux-praxis.de/shellvariablen-im-script
https://praxistipps.focus.de/sex-suenden-welche-fehler-maenner-machen_107945
https://www.gq-magazin.de/leben-als-mann/karriere/was-cook-von-jobs-lernte-171019
https://www.mygreatlearning.com/blog/label-encoding-in-python/
Kredit steuerlich absetzbar?
https://www.helpster.de/darlehenszinsen-steuerlich-absetzbar-anleitung_175060
https://www.focus.de/finanzen/experten/artope/kredit-steuerlich-absetzen-wann-es-moeglich-ist_id_8466324.html
https://www.steuertipps.de/steuererklaerung-finanzamt/themen/steuerliche-absetzbarkeit-von-kreditzinsen
https://www.smava.de/kredit/steuer-kredit-absetzen/
https://www.finanzcheck.de/kredit/kredit-steuerlich-absetzen/
https://steuererklaerung.de/ratgeber-steuern/kredite-von-steuer-absetzen
https://www.linuxnix.com/python-inbuilt-functions-series-at-coding-mania-started/
Debian 10 :: rstudio-1.3.1073-amd64.deb
https://rstudio.com/products/rstudio/download-server/debian-ubuntu/
Installation R :: sudo apt-get install r-base
rstudio depends on libssl1.0.0 | libssl1.0.2;
https://computingforgeeks.com/how-to-install-r-and-rstudio-on-debian/
Step 2: Install R on Debian 10 (Buster)
We need to install r-base package which contains the basic R functions that let you perform arithmetic operations and basic programming in R. Use the command below to install.
sudo apt -y install r-base
Step 3: Download and Install RStudio on Debian 10 (Buster)
Now visit the RStudio downloads page to grab the latest release of RStudio for Debian based Linux distributions.
As of this article update, the latest version is 1.2.1578.
sudo apt -y install wget
wget https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.2.1578-amd64.deb
sudo dpkg -i rstudio-1.2.1578-amd64.deb
If you encounter any dependency problems, run:
sudo apt -f install
--- Ubuntu 18.04 / Linux Mint 19 / Debian 10 ---
sudo apt -y install wget
wget https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.2.5042-amd64.deb
sudo apt install ./rstudio-1.2.5042-amd64.deb
https://computingforgeeks.com/how-to-install-r-and-rstudio-on-debian/
https://computingforgeeks.com/how-to-install-r-and-rstudio-on-ubuntu-debian-mint/
https://www.deutschlandfunkkultur.de/michel-foucault-ueberwachen-und-strafen-wie-die-macht-das.976.de.html?dram:article_id=398072
https://de.wikipedia.org/wiki/%C3%9Cberwachen_und_Strafen
https://www.hausarbeiten.de/document/304027
https://open.hpi.de/courses/kieinstieg2020/question/2daa0ed6-9620-4f22-8dec-4749c699f256
https://statistik-und-beratung.de/2013/10/was-bedeutet-robustheit-in-der-statisitk/
https://www.crashkurs-statistik.de/lageparameter-mittelwert-median-modus/
https://wissenschafts-thurm.de/grundlagen-der-statistik-statistische-lagemasse-das-arithmetische-mittel/
https://www.statistik-nachhilfe.de/ratgeber/statistik/deskriptive-statistik/masszahlen/lagemasse/quantil-quartil
https://www.mathelounge.de/471666/quartile-bei-gruppierten-daten
https://computingforgeeks.com/working-with-btrfs-filesystem-in-linux/
https://www.heise.de/ct/artikel/Das-Dateisystem-Btrfs-221863.html
https://www.tecmint.com/chattr-command-examples/
Zu 2) Apropos China: Weitet sich die Immobilienkrise zu einer globalen Krise aus?
Die Aufsichtsbehörden dort haben dem arg gebeutelten Alibaba (BABA) den Rücken gekehrt. Sämtliche Auflagen wurden erfüllt und viele "freiwillige soziale Leistungen" wurden erbracht. Der Kurs ist wieder über die 50-Tage-Linie gestiegen und insgesamt steht einem Kursanstieg dem "Amazon von China" , nichts mehr im Wege. Daher können wir uns auch besser auf die positiven Nachrichten einstellen:
BABA steht Berichten zufolge kurz davor, in den Halbleiterbereich zu expandieren und könnte bereits in der laufenden Woche seine ersten Server Chips auf einer Firmenkonferenz vorstellen.
Wie wir in der chinesischen "Caixin Global" lesen konnten, hat Alibaba Server Chips entwickelt, die auf der Technologie des britischen Halbleiterunternehmens Arm Holdings basieren. Alibaba gründete 2018 eine eigene Chip-Tochtergesellschaft und soll seit 2019 an eigenen Chips arbeiten.
Wie viele andere chinesische Unternehmen hat auch Alibaba (BABA) in das Halbleiter Design investiert, um die Kosten für die Chipherstellung zu senken. Arm ist dafür bekannt, seine Technologie an zahlreiche Technologieunternehmen wie Apple (AAPL) und Qualcomm (QCOM) zu lizenzieren, und wird derzeit von Nvidia (NVDA) für USD 54 Milliarden übernommen.
Wenn wir weiter in chinesischen und asiatischen Nachrichtendiensten stöbern, finden wir derzeit aber auch eine Menge beunruhigender Informationen. Nach dem Evergrande-Desaster könnte sich die Immobilienkrise in China noch erheblich verschlimmern. (BABA ist nicht in Immobilien investiert, hat also zu der nachfolgend geschilderten Entwicklung keinen unmittelbaren Bezug).
Aber dieser Artikel in der New York Times: https://www.nytimes.com/article/evergrande-debt-crisis.html
findet gerade in den USA Beachtung, und wir haben nichts dergleichen bei uns in der Presse gefunden. Haben wir da etwas übersehen?
Als 2007 die Lehman-Pleite die Welt in Aufruhr versetzte, gab es viele uninformierte Investoren. Wir möchten Dich so gut wir es können, begleiten. Darum geht es:
In China bricht der Grundstücksmarkt ein. Die Preise für Grund und Boden sind landesweit um fast 20% gesunken. Bauunternehmen trennen sich nun von beabsichtigten Vorhaben, weil der Kreis der Käufer immer schneller zurückgeht.
Die auslösende Evergrande-Krise beginnt aber auch außerhalb Chinas ihre Wirkung zu zeigen. Der Wohnungsbau in China macht fast 30% des BIP aus. Dadurch ist das Risiko der Banken dort enorm. Regierungsbeamte haben die Finanzinstitute aufgefordert, die lokalen Regierungen bei der Subventionierung der Käufern von Wohnimmobilien, zu unterstützen. Das bedeutet zweierlei: Die Banken müssen mehr faule Kredite auslaufen lassen und obendrein riskantere Kredite vergeben. Der Betrag, den man für diese Unterstützung benötigt, wird erheblich sein. Etwa die Hälfte der Aktiva des lokalen Bankensystems ist jetzt schon mit dem Immobiliensektor verbunden. Die lokalen Kreditgeber haben zusammen schätzungsweise USD 8 Mrd. an ausstehenden Immobilienkrediten. Sie machen im Durchschnitt ein Drittel der Gesamtkredite der jeweiligen Großbanken aus, manchmal auch mehr.
Da wohlhabende Chinesen ihr Geld in ausländische Immobilien investiert haben, sind auch diese Werte gefährdet, wenn kein Geld mehr nachfließt.
Derzeit untersucht die britische Aufsichtsbehörde, ob es eine Ansteckungsgefahr für den Londoner Wohnungsmarkt gibt.
Zwischen 2013 und 2018 haben Käufer aus dem Festland Chinas und Hongkong fast 3,5 Milliarden Pfund nach London gepumpt, was nach Angaben von Real Capital Analytics fast den gesamten, grenzüberschreitenden Investitionsfluss in die Grundstücke der Stadt, im Jahr 2017 ausmachte. Dieser Betrag ist in den letzten drei Jahren stark zurückgegangen und beträgt nur noch etwa ein Zehntel dieses Wertes, aber tausende von Häusern in London werden immer noch aus China finanziert. Viele davon wurden nicht fertig gestellt und sind unverkauft.
Chinesen sind auch Großbesitzer von Ackerland weltweit, von Australien bis zu den USA. Wenn sie dringend Geld brauchen und es in Panik verkaufen, werden die Preise purzeln.
Die Produktion in den Fabriken in China verlangsamt sich. Das verarbeitende Gewerbe ist ein weiterer wichtiger Teil der chinesischen Wirtschaft, und im August lag der PMI (U.S. Manufacturing Purchasing Managers Index ) bei 49,2 %, womit zum ersten Mal seit April 2020 ein Rückgang auf unter 50 % zu verzeichnen war. Seitdem treibt der Energiemangel die Kosten massiv in die Höhe und führt zu Fabrikschließungen. Mindestens 17 Regionen, die 66 % des chinesischen BIP erwirtschaften, haben in irgendeiner Form Stromabschaltungen angekündigt, die meist industrielle Nutzer betreffen. Die Lage ist so ernst, dass China jetzt nicht nur "unter der Hand" Kohle aus Australien kauft, sondern in neue Verträge einsteigen will.
Bis dahin bedeuten Fabrikschließungen einen Verlust von Arbeitsplätzen. Viele Hauseigentümer haben hohe Hypotheken. Wenn sie keine Arbeit haben, sind sie nicht in der Lage die Kredite zurückzuzahlen, und die sinkenden Immobilienwerte könnten zu einem Wertverfall des Hauses führen, welches dann weniger wert ist, als der geschuldete Betrag. Das kennen wir noch aus der Zeit der Hypothekenkredit-Krise in den USA in 2007.
Chinas Verschuldung im Verhältnis zum BIP liegt jetzt bei 270 %. Diese Grafiken zeigen den dramatischen Anstieg der chinesischen Verschuldung.
Dazu kommen noch die Schulden der Schattenbanken und die ungedeckten Schulden. Die "versteckten Schulden" für Chinas "neue Seidenstraße" belaufen sich laut einer neuen Studie auf über USD 385 Mrd. Mehr als 40 Länder haben gegenüber Peking Schulden in Höhe von mehr als 10 % ihres BIP. Was passiert, wenn China diese Vermögenswerte beschlagnahmt, um sich selbst zu retten? Nach den Regulierungen der letzten Zeit ist nichts mehr unmöglich.
Ein weiterer Gedanke: Unsere Bundesländer, insbesondere Bayern und Baden-Württemberg haben, auch durch die Automobilindustrie, die größte wirtschaftliche Verbindung zu China. Sollte also mit einem Mal der Kaufdruck aus dem hochverschuldeten Reich der Mitte nachlassen, wird der Markt der westlichen Welt unsere Automobilproduktion niemals auffangen können.
Wieder einmal hängt alles an den hochverschuldeten Immobilien. Das Immobilienberatungsunternehmen Knight Frank berichtete kürzlich, die durchschnittliche jährliche Preisveränderung in 55 Ländern in den 12 Monaten bis Juni 2021 sei auf 9,2 Prozent gestiegen; der schnellste Anstieg seit den 12 Monaten bis März 2005. Hier wurden also mit großem Einsatz von Fremdkapital, die Preise in die Höhe getrieben. Wir können nur hoffen, dass jeder neue Immobilienbesitzer solvent ist und bleibt.
Australien könnte sich durchaus als einer der führenden Indikatoren für Risiken der Immobilienpreise weltweit erweisen. In einem Bericht von Business Insider Australia heißt es, jeder siebte Hypothekennehmer werde bei einem Anstieg der Zinssätze Schwierigkeiten haben, seine Hypothek zu bezahlen.
In Großbritannien warnt die Bank of England mit den Worten: "Der Wohnungsmarkt steht in Flammen". Der jüngste Bericht von Knight Frank zeigt einen durchschnittlichen Preisanstieg von 10,5 % im vergangenen Jahr. Die Arbeitnehmer erhielten eine durchschnittliche Lohnerhöhung von 2,7 %!
Neuseeland. Dort hat die Zentralbank strenge Vorgaben zur Kreditvergabe eingeführt, nachdem die Immobilienpreise im letzten Jahr um 20 % gestiegen waren, um einen Zusammenbruch zu vermeiden. Vor kurzem wurden die Zinssätze zum ersten Mal seit sieben Jahren angehoben, weil man sich Sorgen über steigende Immobilienpreise und Inflation macht.
Die Verschuldung der privaten Haushalte in den USA stieg im zweiten Quartal weiter an, vor allem dank des Immobilienmarktes, indem historisch niedrige Hypothekenzinsen in Kombination mit einem geringen Bestand, die Preise für Eigenheime auf ein Rekordhoch getrieben haben.
Die Verbindlichkeiten der privaten Haushalte stiegen im zweiten Quartal auf USD 14,96 Billionen, das sind USD 313 Milliarden oder 2,1 % mehr als im Vorquartal, wie aus dem Quartalsbericht der New Yorker Fed über die Verschuldung und Kredite der privaten Haushalte hervorgeht. Die Hypotheken Konten "die größte Komponente der Haushaltsverschuldung" wuchsen um USD 282 Mrd. auf USD 10,44 Billionen.
Die US-amerikanische Apartment List hat gerade einen Mietenspiegel für Oktober veröffentlicht, aus dem eine "schwindelerregende" Steigerung der Mieten, in den ersten neun Monaten des Jahres 2021 um 16,4%, hervorgeht. Zum Vergleich: In den Jahren vor der Pandemie von 2017 bis 2019 betrug das Mietwachstum von Januar bis September im Durchschnitt nur 3,4 Prozent. Der Datenanbieter stellte fest : "Die Mieten steigen praktisch überall". Die Mieten in 22 der größten US-Städte sind seit Beginn der Pandemie um mehr als 25 % gestiegen.
Es sieht daher nicht nach einem sich regulierendem Häusermarkt, in einem normalen Zyklus, aus. Die Banken weltweit haben Stresstests absolviert, für die große Mengen an Cash in den Bilanzen gehalten werden mussten. Die derzeit bejubelten Earnings der Banken beruhen zu einem großen Teil auf der Reduzierung dieser Reserven, womit die Kreditvergabe ausgeweitet werden konnte. Ob diese Bilanzen einen Zusammenbruch des Hypothekenmarktes aushalten können, ist nicht mehr sicher.
Falls Du jetzt aufmerksam, aber nicht ängstlich geworden bist, ist das gut und der Artikel hat seinen Zweck erfüllt! Deine Sinne sind geschärft und Du wirst in den Nachrichten vielleicht andere Aussagen dazu wahrnehmen als bisher. Du wirst Dich vorbereitet fühlen. Du wirst Deine Cash-Quote erhöhen und wenn dann ein Crash kommen sollte, keine ungedeckten Puts im Portfolio haben. Nach einem Kursrückgang wird es wieder einen neuen Aufschwung geben" wie auch immer er aussieht.
Und bitte: Es könnte auch alles "ganz entspannt" bleiben. In der Vergangenheit haben wir schon oft Situationen gehabt, von denen die breite Bevölkerung nichts wusste und für die eine "übergeordnete" Lösung gefunden wurde. Auch wenn wir nicht wissen, wie eine Lösung derzeit aussehen kann, wissen wir doch, alle politischen Bemühungen werden dahin gehen, einen Zusammenbruch der Weltwirtschaft zu vermeiden. Nach der Fed-Sitzung im November wissen wir mehr!
Nachdem wir jetzt China, als möglichen Auslöser für einen wirtschaftlich rauhes Fahrwasser, zu Tage gefördert haben, schauen wir, was dort noch passiert:
Derzeit ist ein anderer Wert im Focus der Regulierungsbehörden: Futu Holdings (FUTU), ein Fintech-Unternehmen das große Ähnlichkeit zum amerikanischen "Robin Hood" (HOOD) aufweist und sicher auch wegen seines Datenschatzes im Fokus der Behörden steht. Auch wenn der Einstiegskurs hier immer interessanter wird: Wir raten derzeit vor einem Investment ab.
Von China bauen wir jetzt "eine Brücke" zum Aktienhandel mit Solarwerten in den USA. Wer hier investiert ist, freut sich vielleicht schon seit Tagen über die steigenden Kurse. In den letzten Tagen sprangen die Kurse an bei SPWR, RUN, DQ, ARRY, JKS, SUNW, ENPH, SEDG, MAXN, FSLR, CSIQ.
Wenn also die gesamte Wertschöpfungskette Kursgewinne verzeichnet, sollte doch was dahinterstecken.
Gerüchten zufolge, sollte in dem Haushaltspaket von Präsident Biden eine Bundes- Steuergutschrift für Investitionen in dieser Branche enthalten sein. Es soll sich um eine 10-jährige Verlängerung einer bestehenden Steuerregelung handeln, die eine Gutschrift von 30% auf Investitionen in Solar-Projekte vorsieht. Wir wissen, wie sehr der aktuellen Regierung die erneuerbaren Energien am Herzen liegen ‐ es gibt nur noch Stolpersteine in Form von zwei Senatoren, die Änderungen herbeiführen wollen. Aufgrund der Kursgewinne auf breiter Linie, scheint es als seien die großen Trader hier sehr zuversichtlich und daher bereits rechtzeitig in den Trend eingestiegen.
Hier lohnt es sich auch für uns schon eine kleine Position einzugehen, um den Trend zu begleiten.
http://www.oltb.de/
https://widulle.ch/index.php/inhalte/handlungsorientiert-lernen/ein-lerntagebuch-fuehren
https://www.ipadmachtschule.at/?p=825
https://www.uni-potsdam.de/de/erwachsenenbildung/studium/lerntagebuch
https://www.uni-koblenz-landau.de/de/koblenz/fb1/BAMA/Portfolio/studienjahrgang-ws-12-13/persoenliche-berufliche-entwicklung/lerntagebuch
https://hundertwelten.de/lerntagebuch-fuehren/
https://tippsvorlage.info/lerntagebuch-vorlage-2/
https://erwachsenenbildung.at/aktuell/nachrichten/6681-lerntagebuch-als-lernunterstuetzung.php
https://arbeitsblaetter.stangl-taller.at/LERNTECHNIK/Lerntagebuch.shtml
http://www.isb.bayern.de/download/7424/anlage15_neutr_lerntagebuch.pdf
https://www.klassengezwitscher.ch/lerntagebuch/
https://www.klett.de/produkt/isbn/978-3-12-216532-1
https://www.arealitaet.uni-kiel.de/de/documents/lerntagebuch.pdf
https://wb-web.de/file/download/d793aa6f-f1bc-49f3-3871-76e5788b9779/ha_evaluationmitdemlerntagebuch_20151102.pdf
https://www.phase-6.de/magazin/wp-content/uploads/2019/06/lerntagebuch.pdf
https://www.phase-6.de/magazin/rubriken/lerntipps/lerntagebuch-so-sicherst-du-dir-die-1/
https://pdf.printfriendly.com/downloads/pdf_1600685468_0ebc22A4.pdf
https://www.printfriendly.com/p/g/mBScM7
https://www.printfriendly.com/print?source=ff-addon&url=https%3A%2F%2Fwww.phase-6.de%2Fmagazin%2Frubriken%2Flerntipps%2Flerntagebuch-so-sicherst-du-dir-die-1%2F
https://lukasvonhohnhorst.com/lerntagebuch-artikel/
https://methodenkoffer-sgl.de/enzyklopaedie/lerntagebuch/
https://lukasvonhohnhorst.com/shop/lerntagebuch-excel/
https://www.uni-muenster.de/PsyIFP/AEBromme/lehre/leitfaden/lerntagebuch.html
https://wb-web.de/material/methoden/evaluation-mit-dem-lerntagebuch.html
https://skill.fhstp.ac.at/innovative-methoden-ideen-fuer-die-lehre/lernlogbuch-lerntagebuch/
https://www.hwg-lu.de/toolbox/portfolio-lerntagebuch
https://unterrichten.zum.de/wiki/Lerntagebuch
https://www.lernfoerderung.de/blog/lerntagebuch-methode-fuer-bessere-noten/
https://duckduckgo.com/?q=lerntagebuch+vorlage+download&t=h_&ia=web
https://duckduckgo.com/?q=lerntagebuch+vorlage+download&t=h_
Bedeutung der ausgegebenen Spalten?
mueller@HPLaptop:~$ netstat tn | grep -i verbunden | grep ^tcp
tcp 0 0 HPLaptop:46142 138-199-37-227.bu:https VERBUNDEN
tcp 0 0 HPLaptop:39806 93.243.107.34.bc.:https VERBUNDEN
tcp 0 0 HPLaptop:41224 static.33.119.88.:https VERBUNDEN
tcp 0 0 HPLaptop:37744 ec2-54-157-59-36.:https VERBUNDEN
tcp 0 0 HPLaptop:49606 ec2-52-19-44-242.:https VERBUNDEN
tcp 0 0 HPLaptop:36638 24.224.186.35.bc.:https VERBUNDEN
tcp 0 0 HPLaptop:33444 149.154.167.41:https VERBUNDEN
tcp 0 0 HPLaptop:36788 a104-97-14-90.dep:https VERBUNDEN
tcp6 0 0 p20030101e7062d19:59418 2606:4700::6812:5:https VERBUNDEN
tcp6 0 0 p20030101e7062d19:48108 any-in-2001-4860-:https VERBUNDEN
weiterlesen ::
Roman Imankulov :: Python code cleanup for beginners. 12 steps to readable and maintainable code.
--------------------------------------------------------------------------------------------------------------
https://www.leshenko.net/p/ugit/#
https://snarky.ca/unravelling-unary-arithmetic-operators/
https://johnlekberg.com/blog/2020-09-19-dict-view.html
https://blog.cerebralab.com/Exceptions_as_control_flow
www.nature.com
* r8169 0000:02:00.0 eno1: Link is Up - 10Mbps/Half - flow control off
* nachdem ich den Internet-Stecker (RJ45) raus- und wieder
eingesteckt hatte, änderte sich die Zeile in:
r8169 0000:02:00.0 eno1: Link is Up - 1Gbps/Full - flow control rx/tx
* Wie lässt sich ermitteln, ob die Verbindung über einen Switch geht?
https://www.security-insider.de/mit-openvas-schwachstellen-im-netzwerk-finden-a-608537/?cflt=rdt
https://www.security-insider.de/windows-1011-braucht-keinen-externen-virenschutz-a-2fbd51e00eef85eee7d334ed14419df8/
https://www.security-insider.de/bsi-anforderungen-konkret-umsetzen-a-0b34c383de757db92f7d89dd22298f34/
https://www.infoworld.com/article/3514948/6-great-new-python-features-you-dont-want-to-miss.html
https://www.finanzen.net/ratgeber/freistellungsauftrag-steuererklaerung
https://www.konto.org/ratgeber/girokonto/girokonto-eroeffnen/begrenzung-anzahl-girokonten/
https://financeshark.de/mehrere-konten/
https://www.qualtrics.com/de/erlebnismanagement/marktforschung/regressionsanalyse/
https://www.redhat.com/sysadmin/top-sysadmin-articles-august-2021
https://www.redhat.com/sysadmin/sysadmin-essentials-networking-basics
https://www.redhat.com/sysadmin/understanding-yaml-ansible
https://www.redhat.com/sysadmin/podman-play-kube-updates
https://www.redhat.com/sysadmin/top-sysadmin-articles-september-2021
https://www.redhat.com/sysadmin/ansible-it-automation-everybody
https://www.redhat.com/sysadmin/yaml-tips
https://medium.com/analytics-vidhya/how-to-write-memory-efficient-loops-in-python-cd625001f0de
https://medium.com/better-programming/5-ways-to-help-manage-anxiety-when-learning-to-code-cbd26cb03f88
https://medium.com/better-programming/when-should-you-give-up-on-a-bug-cc546332b18
https://medium.com/better-programming/what-are-duck-typing-and-monkey-patching-in-python-2f8e3d6b864f
https://medium.com/better-programming/stop-using-python-decorators-redundantly-2f8467c9eeca
https://yasoob.me/posts/practical-python-projects-book-released/
https://www.youtube.com/watch?v=bhBSlnQcq2k
Programmierung "FIX-Analyse.pl"
Verzeichnis: ~/programming/perl
Rechner: Laptop (mueller@Debian-Laptop:)
* veraltete Perl-Version? Was ist die aktuelle Version?
* Fehlermeldungen:
mueller@Debian-Laptop:~/programming/perl$ ./FIX-Analyse.pl
No such class test_string at ./FIX-Analyse.pl line 24, near "my test_string"
syntax error at ./FIX-Analyse.pl line 24, near "my test_string
qw(8=FIX.4.1^9=0235^35=D^34=10^43=N^49=VENDOR^50=CUSTOMER^56=/brOKER^52=19980930-
09:25:58^1=XQCCFUND^11=10^21=1^55=EK^48=277461109^22=1^54=1^38=10000^40=2^44=76.750000^
59=0^10=165)"
No such class fileName at ./FIX-Analyse.pl line 26, near "my fileName"
No such class fix_string at ./FIX-Analyse.pl line 28, near "my fix_string"
Global symbol "$fileName" requires explicit package name at ./FIX-Analyse.pl line 54.
syntax error at ./FIX-Analyse.pl line 55, at EOF
Execution of ./FIX-Analyse.pl aborted due to compilation errors.
* Installation of programming language Go ("golang")
* Installation of Kind (https://www.101daysofdevops.com/kubernetes-in-dockerkind/)
Ergebnis:
Set kubectl context to "kind-kind"
You can now use your cluster with:
kubectl cluster-info --context kind-kind
sudo apt install kubernetes-client
kubernetes-client/stable 1.20.5+really1.20.2-1.1 amd64
Kubernetes client binary (kubectl)
https://aiplus.training/plans/
https://opendatascience.com/understanding-the-3-primary-types-of-gradient-descent/
https://www.handelsblatt.com/karriere/jahresgespraech-fuenf-gruende-warum-sie-nicht-mehr-gehalt-bekommen-und-was-dagegen-hilft/27806844.html
https://www.handelsblatt.com/karriere/gesundheit-drei-warnsignale-die-zeigen-dass-sie-ihr-job-krank-macht-und-wie-sie-gegensteuern-koennen/27821112.html
https://www.handelsblatt.com/finanzen/anlagestrategie/trends/the-big-short-investor-mike-burry-rechnet-mit-einem-aktiencrash-diese-sechs-titel-haelt-er-trotzdem/27824458.html
https://www.handelsblatt.com/finanzen/?navi=FINANZEN_1980476
https://novustat.com/statistik-blog/spss-boxplot-interpretieren.html
https://www.kapiert.de/mathematik/klasse-7-8/daten-zufall/daten-darstellen/daten-mit-boxplots-darstellen/
https://de.bettermarks.com/mathe/quartile-und-boxplots/
PDF lesen :: Treklogic_LinuxToSolarisAdministratorsGuide_sysadmin-guide-149889.pdf (USB-Stick "Allerlei")
https://www.guru99.com/software-testing-tutorial-pdf.html
https://www.youtube.com/results?search_query=EuroPython+2020+videos+Static+Typing+in+Python
https://serge-sans-paille.github.io/talks/europython2020/output/index.html#/step-13
sudo apt autoclean
sudo apt autoremove
sudo synaptic --> manuell es erst mit libc6 gemacht
<html>
Ausgabe netdiscover:<br />
<br />
Currently scanning: 192.168.123.0/16 | Screen View: Unique Hosts <br />
<pre><code>
26 Captured ARP Req/Rep packets, from 5 hosts. Total size: 1560
________________________________________________________
IP At MAC Address Count Len MAC Vendor / Hostname
-----------------------------------------------------------------------------
192.168.2.1 30:b1:b5:3b:77:bc 22 1320 Arcadyan Corporation
192.168.2.31 e0:cb:4e:97:cc:48 1 60 ASUSTek COMPUTER INC.
192.168.2.56 e0:cb:4e:97:cc:48 1 60 ASUSTek COMPUTER INC.
192.168.2.31 1c:4b:d6:56:fe:41 1 60 AzureWave Technology Inc.
192.168.2.56 1c:4b:d6:56:fe:41 1 60 AzureWave Technology Inc.
</code></pre>
</html>
<html>
<h3>7‐Minuten‐Workout für jeden Tag</h3>
Um diese drei Effekte zu erzielen, muss es gar nicht unbedingt der<br />
tägliche 30‐minütige Spaziergang sein. Es geht auch mit wenig Zeit<br />
aufwand. Martin Halle schlägt ein tägliches 7‐Minuten‐Programm vor,<br />
das diese Anforderungen erfüllt. “Jede der Übungen dauert nur eine<br />
Minute und das könnte vermutlich jeder schaffen“, so der Sportme<br />
diziner. Die sieben Übungen ‐ wer seiner Gesundheit noch mehr<br />
Gutes tun möchte, absolviert das kleine, unaufwändige Programm<br />
<b><em>zweimal täglich</em></b> ‐ sind folgende:
<ol>
<li>1 Minute Seilspringen ohne Seil</li>
<br />
<li>1 Minute Knie beugen</li>
<br />
<li>1 Minute Hampelmann</li>
<br />
<li>1 Minute Crunch : Aufrecht stehen, rechter Ellenbogen berührt linkes Knie<br />
und umgekehrt</li>
<br />
<li>1 Minute Beinstrecker, also auf einem Stuhl sitzend die Beine<br />
ausgestreckt nach vorne und zurück pendeln</li>
<br />
<li>1 Minute mit dem aufrechten Rücken an die Wand gedrückt sitzen,<br />
dabei bilden Ober- und Unterschenkel einen rechten Winkel</li>
<br />
<li>1 Minute Plank, im Unterarmstütz und auf den Zehenspitzen parallel<br />
zum Boden liegen <em>(Körper also vom Boden anheben)</em>, den Rücken<br />
dabei flach und gerade wie ein Brett halten.</li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://www.focus.de/gesundheit/ratgeber/immunsystem/9-folgeschaeden-warum-sie-auch-im-lockdown-aktiv-bleiben-sollten-und-wie-das-mit-7-minuten-pro-tag-klappen-kann-zeigt-prof-martin-halle-das-macht-sportmangel-mit-unserem-koerper-alt-werden-im-zeitraffertempo_id_12774589.html" target="_blank" rel="noreferrer noopener">Focus Online :: Einfache Übungen vom Sportmediziner ‐ Bewegungsmangel lässt Organe schneller altern ‐ mit 7‐Minuten‐Workout steuern Sie gegen</a></li>
</ul>
</html>
https://johnlekberg.com/blog/2020-10-03-equilibrium-index.html (Python-Blog)
https://github.com/willmcgugan/rich
https://rich.readthedocs.io/en/latest/
https://github.com/lief-project/LIEF
https://github.com/microsoft/qlib
https://github.com/Wenzel/checksec.py
https://github.com/microsoft/qlib
https://thecodex.me/
https://book.pythontips.com/en/latest/index.html
https://www.edx.org/professional-certificate/python-data-science
https://courses.analyticsvidhya.com/courses/take/pandas-for-data-analysis-in-python/texts/10541663-introduction-to-the-course
https://www.upgrad.com/blog/data-science-projects-in-python/
https://data-flair.training/blogs/data-science-project-ideas/
https://courses.analyticsvidhya.com/courses/big-mart-sales-prediction-using-r/
https://courses.analyticsvidhya.com/courses/take/pandas-for-data-analysis-in-python/texts/10542755-basic-descriptive-statistics-using-pandas
https://datahack.analyticsvidhya.com/contest/practice-problem-big-mart-sales-iii/
https://realpython.com/tutorials/data-science/
https://www.dataquest.io/blog/how-to-learn-python-for-data-science-in-5-steps/
https://towardsdatascience.com/two-tools-every-data-scientist-should-use-for-their-next-ml-project-fa4fce5cf868
https://towardsdatascience.com/10-cool-python-project-ideas-for-python-developers-7953047e203
https://towardsdatascience.com/develop-and-sell-a-python-api-from-start-to-end-tutorial-9a038e433966
https://towardsdatascience.com/farewell-rnns-welcome-tcns-dd76674707c8
https://www.freecodecamp.org/news/python-data-science-course-matplotlib-pandas-numpy/
https://data-flair.training/blogs/data-science-project-ideas/
https://data-flair.training/blogs/advanced-python-project-detecting-fake-news/
<html>
<code><pre>
alias g-Wiki="DIR=${PWD};
if [[ ${DIR} != "/home/mueller/Dokumente/TiddlyWiki" ]];
then echo \"not correct \- wrong dir \n --> Changing dir\";
cd ~/Dokumente/TiddlyWiki;
fi
&& mv ~/Downloads/Wiki.html . && git add Wiki.html && git commit Wiki.html && cp Wiki.html /media/mueller/ALLERLEI/TiddlyWiki/Wiki.html"
</pre></code>
</html>
https://sourceforge.net/projects/linux-reminders/
Talos Linux in Virtualbox:
- Maintenance Mode:
-- CONTROL_PLANE_IP = 198.168.2.117/24
-- Nach Eingabe von
<pre><code>talosctl apply-config --insecure --nodes 192.168.2.227 --file _out/controlplane.yaml</code></pre>
dauerte es ein bisschen, bis es im Virtualbox-
Fenster weiter ging;
https://www.talos.dev/v1.7/talos-guides/install/local-platforms/virtualbox/
E: Das Depot »https://ppa.launchpadcontent.net/phoerious/keepassxc/ubuntu bookworm Release« enthält keine Release-Datei.
N: Eine Aktualisierung von solch einem Depot kann nicht auf eine sichere Art durchgeführt werden, daher ist es standardmäßig deaktiviert.
N: Weitere Details zur Erzeugung von Paketdepots sowie zu deren Benutzerkonfiguration finden Sie in der Handbuchseite apt-secure(8).
https://github.com/fastai/fastcore
<html>
If your X display gets messed up somehow,<br>
run a program called <b>xrefresh</b> in your<br>
X11R6 bin directory, it will clean up<br>
the display so you don't need to kill X.<br>
<br>
This tip generously supported <br>
by: kev@zebradale.com<br>
</html>
<html>
dahinter stecken "forderungsbesicherte Wertpapiere"
</html>
<html>
* Access Control Lists := Zugriffskontrolllisten<br>
*
ermöglicht eine fein justierte Kontrolle über Zugriffsrechte<br>
*
Für den Einsatz von ACLs muss der Kernel eine entsprechende Unter-<br>
stützung mitbringen:<br>
- Standard-Kernel der Distributionen weisen diese Eigenschaft bereits
auf.<br>
- Bei selbst erstellten Kernels muss die Option <br>
<br>
<b>CONFIG_EXT4_FS_POSIX_ACL</b><br>
<br>
bzw. im Fall anderer Dateisysteme die äquivalente Option gesetzt
sein.<br>
<br>
</html>
<html>
<ul>
<li>Akronym von “Advanced Encryption Standard“ (?)</li>
<li>ursprünglich: Rijndad</li>
<li>Blocklänge: 128 Bit =
<math>
<mrow>
<msup>
<mi>2</mi><mn>7</mn>
</msup>
∈ {0,1}
</mrow>
</math></li>
<li>Kollisionsresistenz</li>
<li>Einweg‐Hash‐Funktion</li>
<li></li>
</ul>
</html>
<html>
<ul>
<li><b>ANN</b> := Artificial neural network</li><br />
<li><b>CNN</b> := Convolutional neural network</li><br />
<li><b>RNN</b> := Recurrent neural network</li><br />
<li><b>LSTM</b> := Long/short-term memory network</li><br />
<li></li><br />
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.quora.com/Where-does-each-type-of-neural-network-RNN-CNN-LSTM-etc-excel" target=_blank>Quora :: RNN - CNN -LSTM</a></li>
<li><a href="https://machinelearningmastery.com/when-to-use-mlp-cnn-and-rnn-neural-networks/" target=_blank>Machine Learning Mastery :: CNN - RNN</a></li>
<li><a href="https://stats.stackexchange.com/questions/288770/meaning-of-batch-sizes-for-rnns-lstms-and-reasons-for-padding" target=_blank>StackExchange :: Meaning sizes for ...</a></li>
<li><a href="https://skymind.ai/wiki/lstm" target=_blank>Skymind :: Wiki - LSTM</a></li>
<li><a href="http://seealgo.com/wpblog/2017/08/10/second-post/" target=_blank>SeeAlgo :: Blog-Post</a></li>
</ul>
</html>
<html>
<ul>
<li>am häufigsten verwendete Biblothek: <a href="http://www.tensorflow.org" target=_blank>TensorFlow</a>, Google<br />
⇒ Deep Learning Frameworks <b>Keras</b> </li>
<li></li>
<li></li>
</ul>
</html>
<html>
''Basic-Infos''<br />
Da die Orginale Seite leider nicht mehr im Internet zur Verfügung steht, habe<br />
ich mich entschlossen, diese für mich sehr nützliche Seite in meine<br />
Howto-Collection aufzunehmen.<br />
<br />
Hier also ist die letzte Version des AIX Crib-Sheets.<br />
<b>
TITLE : AIX Command Crib Sheet<br />
OS LEVEL : AIX<br />
DATE : 24/01/2003<br />
VERSION : 2.1<br />
</b>
-- Latest version can be found at http://mort.level5.net/johnr/index.html --
<h3>MISCELLANEOUS</h3>
<a href="https://www.ibm.com/docs/en/aix/7.3"
target="_blank" rel="noreferrer noopener">
Web based man pages [Vers. 7.3]</a><br />
Creates a compressed file:
<code><pre>compress -c file.txt > file.Z</pre></code>
Converts a binary file to an ASCII file for transfer by modem or email:
<code><pre>uuencode (infile) (extract-file-name) > (output file)</pre></code>
Extracts a binary file from encoded file and calls it the extract-file-name:
<code><pre>uudecode (encoded file)</pre></code>
examples :-
<code><pre>uuencode maymap maymap > maymap.enc
uudecode maymap.enc
</pre></code>
<code><pre>
od -c /tmp # <em>Displays contents of the /tmp directory file</em>
ls -i # <em>Lists files with their inode numbers</em>
echo * # <em>Lists files, can be used if ls is corrupt/missing</em>
chtz # <em>(timezone eg GMT0BST) Changes the timezone in /etc/environment file</em>
chlang # <em>(language eg En_GB) Changes the language in /etc/environment file</em>
</pre></code>
<b>List contents of an archive:</b><br />
<code><pre>ar -v -t (archive file) </pre></code>
<b>'Extracts the archive:</b><br />
<code><pre>ar -v -x (archive file) </pre></code>
<b>Lists contents of the libC_r.a library:</b><br />
<code><pre>ar -v -t /usr/lib/libC-r.a </pre></code>
<b>Copying directories using cpio, creates /target/source directory.</b><br />
(Note : Cannot handle files greater than 2 Gig, cpio limitation)<br />
<code><pre>find /source -print | cpio -pdm /target</pre></code>
<b>Displays the contents of an executable file</b><br />
<code><pre>dump -nTv (binary executable)</pre></code>
<b>Displays string information</b><br />
<code><pre>dump -c </pre></code>
<b>Displays object file headers</b><br />
<code><pre>dump -o</pre></code>
<b>Displays line numbers</b><br />
<code><pre>dump -l</pre></code>
<b>Displays the text section</b><br />
<code><pre>dump -s</pre></code>
<b>Create a snapshot onto tape</b><br />
<code><pre>snap -ao /dev/rmt0</pre></code>
<b>Create a snapshot into a named directory other than the default (/tmp/ibmsupt)</b><br />
<code><pre>snap -ad (directory)</pre></code>
<b>Disables desktop logins</b><br />
<code><pre>/usr/dt/bin/dtconfig -d </pre></code>
<b>Enables desktop logins</b><br />
<code><pre>/usr/dt/bin/dtconfig -e </pre></code>
<b>PID of the dtlogin process</b><br />
<code><pre>/var/dt/Xpid </pre></code>
<b>For reading man page format files (bas.1)</b><br />
<code><pre>nroff -man bas.1 | more </pre></code>
<b>creates snap.tar.Z file in /tmp/ibmsupt (system config info)</b><br />
<code><pre>snap -gc </pre></code>
<b>removes old snap data</b><br />
<code><pre>snap -r</pre></code>
<h3>LICENSES / SOFTWARE INSTALLATION</h3>
<b>Displays number of current user licenses</b><br />
<code><pre>lslicense </pre></code>
<b>Changes the number of user licenses</b><br />
( ftp,rexec and rsh (without -i flag) do not need an AIX user license to be able to access the system. )<br />
<code><pre>chlicense -u (number) </pre></code>
<b>Returns operating system level</b><br />
<code><pre>
oslevel
⇒
4 . 3 . 3 . 0 ---------- Preventive Maintenance Level
| | |
| | +----------------Modification
| +--------------------Release
+------------------------Version
</pre></code>
<b>Displays all filesets that are "downlevel"</b><br />
<code><pre>oslevel -l 4.3.3.0</pre></code>
<b>Returns full path of program</b><br />
<code><pre>whence (program)
whereis (program) </pre></code>
<b>Displays identifying info from the executable like version number, when compiled.</b><br />
<code><pre>what (program) </pre></code>
<b>List all installed software</b><br />
<code><pre>lslpp -L all </pre></code>
<b>Check if software installed</b><br />
<code><pre>lslpp -L (program set name) </pre></code>
<b>Lists filesets vs packages</b><br />
<code><pre>lslpp -f </pre></code>
<b>Lists installation history of filesets</b><br />
<code><pre>lslpp -ha </pre></code>
<b>Lists the fileset that the file belongs to</b><br />
<code><pre>lslpp -w /usr/bin/swapon </pre></code>
<b>Checks file checksums against SWVPD</b><br />
<code><pre>lppchk -c</pre></code>
<b>Checks symbolic links against SWVPD </b><br />
<code><pre>lppchk -l </pre></code>
<b>Checks id fix is installed</b><br />
<code><pre>instfix -ik (fix number eg IX66617) </pre></code>
e.g. instfix -ik 4330-02_AIX_ML
<b>Displays all ML's installed</b><br />
<code><pre>instfix -i | grep ML </pre></code>
<b>Installs a fix from cdrom</b><br />
<code><pre>instfix -k IX38794 -d /dev/cd0 </pre></code>
<b>Smitty Installation Assistant</b><br />
<code><pre>/usr/sbin/install_assist </pre></code>
<b>Software bundle files</b><br />
<code><pre>/usr/sys/inst.images/sys.bundles </pre></code>
alt_disk_install -c hdisk1 Clones a running rootvg onto hdisk1
alt_disk_install -w Wakes up alt vg
alt_disk_install -s Sends alt vg to sleep !
alt_disk_install -x Removes alt vg from disk
/usr/lpp/bosinst/blvset -d /dev/hdisk0 -p 4.2
Resets the pad string in the BLV to the correct AIX version. Needed if the
migration option is missing when installing.
installp -ad (device) (fileset) (level) Install apply and commit fileset
installp -pad (device) (fileset) (level) Preview install
installp -u (fileset) Remove fileset
installp -ld (device) List all software on device
example:-
installp -pad /dev/rmt0 X11.base 4.3.3.0
installp -C Cleans up after a premature cancel or interrupted installation.
<h3>TERMINALS / DISPLAYS</h3>
<b>Directory with all support terminal info files.</b><br />
<code><pre>/usr/share/lib/terminfo</pre></code>
<b>Displays what the tty/pty number of the terminal is.</b><br />
<code><pre>tty</pre></code>
<b>reports the termtype setup in smit for the tty port that termdef is run on.</b><br />
<code><pre>termdef</pre></code>
<b>Sets tty to a vt100 terminal type</b><br />
<code><pre>chdev -l (device eg tty1) -a term=vt100</pre></code>
<b>adds getty line into /etc/inittab for tty0 and starts getty</b><br />
<code><pre>penable tty0</pre></code>
<b>disables the getty line and disables getty</b><br />
<code><pre>pdisable tty0</pre></code>
penable / pdisable -a option is for all</b> ??????????? <br />
<b>Set backspace key for vt100 terminals</b><br />
<code><pre>stty erase ^?</pre></code>
<b>Set backspace key for wyse50 terminals</b><br />
<code><pre>stty erase ^H</pre></code>
<b>Displays the console device</b><br />
<code><pre>lscons</pre></code>
<b>Changes the console device</b><br />
<code><pre>chcons -a login=enable (device eg /dev/tty1)</pre></code>
<b>Display adapter device information</b><br />
<code><pre>lsdisp</pre></code>
<b>Change default display used by LFT subsystem</b><br />
<code><pre>chdisp</pre></code>
<b>"Create ttys on ports 0 to 7 on adapter sa2 :-"</b><br />
<code><pre>
for i in 0 1 2 3 4 5 6 7
do
mkdev -c tty1 -t tty -s rs232 -p sa2 -w$i -a login=enable -a term=vt100
done
</pre></code>
portmir -t /dev/tty0 Mirror current terminal onto /dev/tty0
portmir -o Turns off port mirroring
syslineDisplays system status on a terminal's status line
<h3>NETWORK</h3>
<code><pre>host (ip or hostname)</pre></code> Resolves a hostname / ip address
<code><pre>hostname</pre></code> Displays hostname
<code><pre>hostname (hostname)</pre></code> Sets the hostname until next reboot
<code><pre>lsdev -Cc if</pre></code> Lists all available/defined network interfaces
<code><pre>chdev -l (device name) -a hostname=(hostname)</pre></code> Changes hostname permanently
<code><pre>chdev -l inet0 -a hostname=thomas</pre></code>
<code><pre>ifconfig (device name) </pre></code>Displays network card settings
<code><pre>ifconfig (device name) up </pre></code>Turns on network card
<code><pre>chdev -l (device name) -a state=up </pre></code>Turns on network card
<code><pre>ifconfig (device name) down </pre></code>Turns off network card
<code><pre>ifconfig (device name) detach </pre></code>Removes the network card from the network interface list
<code><pre>ifconfig en0 inet 194.35.52.1 netmask 255.255.255.0 up</pre></code>
<br />
<code><pre>ifconfig lo0 alias 195.60.60.1 </pre></code>Create alias ip address for loopback
<br />
<code><pre>route (add/delete) (-net/-host) (destination) (gateway) </pre></code>Adds or deletes routes to other networks or hosts, does not update the ODM database and will be lost at reboot.
<code><pre>route add -net 194.60.89.0 194.60.90.4</pre></code>
<code><pre>chdev -l inet0 -a "net,-hopcount,1,-netmask,255.255.255.0,207.156.168.0,10.0.15.254" (destination) ( gateway ) </pre></code>Adds route and adds entry into ODM, route survives a reboot,
<code><pre>route -rn </pre></code>Display route table
<code><pre>odmget -q "attribute=route" CuAt </pre></code>Displays routes in the ODM.
lsattr -EHl inet0 Displays routes set in ODM and hostname
odmget -q "name=inet0" CuAt Displays routes set in ODM and hostname
refresh -s inetd Refresh inetd after changes to inetd.conf
kill -1 (inetd PID) Refresh inetd after changes to inted.conf
netstat -i Displays interface statistics
entstat -d (ethernet adapter eg en0) Displays ethernet statistics
arp -a Displays ip to mac address table from arp cache
no -a Displays network options use -o to set individual options or
-d to set individual options to default.
no -o option=value (this value is reset at reboot)
no -o "ipforwarding=1"
traceroute (name or ipaddress) Displays all the hops from source to
destination supplied.
ping -R (hostname or ipaddress) Same as traceroute except repeats.
spray (hostname or ipaddress) Send a stream of packets to a host
stopsrc -g tcpip Stops all running TCP/IP daemons
/etc/tcp.clean Stops all running TCP/IP daemons and removes all
lock files
/etc/rc.tcpip Start all TCP/IP daemons.
Do not use startsrc -g tcpip as this will start all
TCP/IP daemons including routed & gated
<h3>NFS, Network Filesystem</h3>
<code><pre>exportfs # <em>Lists all exported filesystems</em>
exportfs -a Exports all fs's in /etc/exports file
exportfs -u (filesystem) Un-exports a filesystem
mknfs Configures and starts NFS services
rmnfs Stops and un-configures NFS services
mknfsexp -d /directory Creates an NFS export directory
mknfsmnt Creates an NFS mount directory
mount hostname:/filesystem /mount-point Mount an NFS filesystem
nfso -a Display NFS Options
nfso -o option=value Set an NFS Option
nfso -o nfs_use_reserved_port=1
</pre></code>
<h3>BACKUPS</h3>
MKSYSB (Uses AIX backup command)
mkszfile -f Creates /image.data file (4.x onwards)
mkszfile -X Creates /fs.size file (3.x)
mksysb -i (device of file) Creates a mksysb image
mksysb does not save any raw data and will not backup a filesystem that
is not mounted.
SAVEVG (Uses AIX backup command)
savevg -if (device or file) (vg) Creates a savevg image
restvg -q -f (device or file) Restore from a savevg image
Ensure that the restvg command is run from /
mkvgdata (vg) Creates new vgname.data file
CPIO ARCHIVE (Cannot handle files greater than 2 Gig)
find (filesystem) -print | cpio -ocv > (filename or device)
eg find .usr -print | cpio -ocv > /dev/rmt0
<h3>'CPIO RESTORE</h3>
cpio -ict < (filename or device) | more Lists archive
cpio -icdv < (filename or device)
cpio -icdv < (filename or device) ("files or directories to restore")
eg cpio -icdv < /dev/rmt0 "tcpip/*" Restore directory and contents
cpio -icdv < /dev/rmt0 "*resolve.conf" Restore a named file
''TAR ARCHIVE (Cannot handle files greater than 2 Gig)''
tar -cvf (filename or device) ("files or directories to archive")
e.g. tar -cvf /dev/rmt0 "usr*"
<h3>TAR RESTORE</h3>
tar -tvf (filename or device) Lists archive
tar -xvf (filename or device) Restore all
tar -xvf (filename or device) ("files or directories to restore")
use -p option for restoring with orginal permissions
eg tar -xvf /dev/rmt0 "tcpip" Restore directory and contents
tar -xvf /dev/rmt0 "tcpip/resolve.conf" Restore a named file
<h3>AIX ARCHIVE</h3>
find (filesystem) -print | backup -iqvf (filename or device)
Backup by filename.
e.g. find usr -print | backup -iqvf /dev/rmt0
backup -(backup level 0 to 9) -f (filename or device) ("filesystem")
Backup by inode.
e.g. backup -0 -f /dev/rmt0 "/usr" -u option updates /etc/dumpdates file
<h3>AIX RESTORE</h3>
restore -qTvf (filename or device) Lists archive
restore -qvxf (filename or device) Restores all
restore -qvxf (filename or device) ("files or directories to restore")
(use -d for restore directories)
restore -qvxf /dev/rmt0.1 "./etc/passwd" Restore /etc/passwd file
restore -s4 -qTvf /dev/rmt0.1 Lists contents of a mksysb tape
<h3>BACKUPS ACROSS A NETWORK</h3>
Note : Cannot handle files greater than 2 Gig, cpio limitation
To run the backup on a local machine (cpio) and backup on the remote machine's
(remhost) tape drive (/dev/rmt0)
find /data -print | cpio -ocv | dd obs=32k | rsh remhost "dd ibs=32k obs=64k
of=/dev/rmt0"
To restore/read the backup (cpio) on the remote machine
dd ibs=64k if=/dev/rmt0 | cpio -icvt
To restore/read the backup (cpio) on the local machine from the remote machine's
(remhost) tape drive (/dev/rmt0)
rsh remhost "dd ibs=64k obs=32k if=/dev/rmt0" | dd ibs=32k | cpio -icvt
To run the backup (cpio) on a remote machine (remhost) and backup to the local
machines tape drive (/dev/rmt0)
rsh remhost "find /data -print | cpio -ocv | dd ibs=32k" | dd ibs=32k obs=64k
of=/dev/rmt0
tar cBf - . | rsh remhost "dd ibs=512 obs=512 of=/dev/rmt0"
Same as above but using tar instead of cpio.
<h3>Copying diskettes and tape</h3>
''COPYING DISKETTES''
dd if=/dev/fd0 of=(filename) bs=36k
dd if=(filename) of=/dev/fd0 bs=36k conv=sync or flcopy
''COPYING TAPES''
dd if=/dev/rmt0 of=(filename)
dd if=(filename) of=/dev/rmt0 or tcopy
<h3>VI Commands</h3>
:g/xxx/s//yyy/ global change where xxx is to be changed by yyy
sed 's(ctrl v ctrl m)g//g' old.filename > new.filename
Strips out ^M characters from ascii files that have been transferred as binary.
To enter crontrol characters type ctrl v then ctrl ? where ? is whatever
ctrl character you need.
<h3>DEVICES</h3>
lscfg lists all installed devices
lscfg -v lists all installed devices in detail
lscfg -vl (device name) lists device details
bootinfo -b reports last device the system booted from
bootinfo -k reports keyswitch position
1=secure, 2=service, 3=normal
bootinfo -r reports amount of memory (/ by 1024)
bootinfo -s (disk device) reports size of disk drive
bootinfo -T reports type of machine
ie rspc,rs6ksmp,rspc or chrp
lsattr -El sys0 -a realmem reports amount of useable memory
mknod (device) c (major no) (minor no) Creates a dev device file.
mknod /dev/null1 c 2 3
lsdev -C lists all customised devices ie installed
lsdev -P lists all pre-defined devices ie supported
lsdev -(C or P) -c (class) -t (type) -s (subtype)
chdev -l (device) -a (attribute)=(new value) Change a device attribute
chdev -l sys0 -a maxuproc=80
lsattr -EH -l (device) -D Lists the defaults in the pre-defined db
lsattr -EH -l sys0 -a modelname
rmdev -l (device) Change device state from available to defined
rmdev -l (device) -d Delete the device
rmdev -l (device) -SR S stops device, R unconfigures child devices
lsresource -l (device) Displays bus resource attributes of a device.
cfgmgr Configures devices
cfgmgr -i /dev/cd0 Configure devices and install drivers from /dev/cd0
if required
cfgmgr -S Run in serial, used with a larger number of disks
cfgmgr -l scsi0 Configure devices on adapter scsi0 only
diag Run hardware diagnostic menu
smitty diag Run hardware diagnostic menu
( 7020-40P and 7248-43P machines cannot run diagnostics, use diagnostics
in the SMS menus instead )
diag -d (device) Run diagnostics against a device.
lsslotDisplays all hot swap slots
lsslot -c pci Lists all pci hot swap slots
lsslot -c pci -a Lists all available pci hot swap slots
drslot Reconfgiures PCI hot-plug slots
drslot -i -c pci -s U0.1-P1-I3 Display a slot, flashes the LED next to
the slot so that it can be identified.
Power Management (PCI and CHRP machines)
pmctrl -a Displays the Power Management state
rmdev -l pmc0 Unconfigure Power Management
mkdev -l pmc0 Configure Power Management
<h3>TAPE DRIVES</h3>
rmt0.x where x = A + B + C
A = density 0 = high 4 = low
B = retension 0 = no 2 = yes
C = rewind 0 = yes 1 = no ( rewind on finish )
tctl -f (tape device) fsf (No) Skips forward (No) tape markers
tctl -f (tape device) bsf (No) Skips back (No) tape markers
tctl -f (tape device) rewind Rewind the tape
tctl -f (tape device) offline Eject the tape
tctl -f (tape device) status Show status of tape drive
chdev -l rmt0 -a block_size=512 changes block size to 512 bytes
(4mm = 1024, 8mm = variable but
1024 recommended)
dd if=/dev/rmt0 bs=128k count=1 | wc -c
Displays the block size of an unknow tape. Set block size to 0 first.
bootinfo -e answer of 1 = machine can boot from a tape drive
answer of 0 = machine CANNOT boot from tape drive
diag -c -d (tape device) Hardware reset a tape drive.
diag -c -d rmt0
tapechk (No of files) Checks Number of files on tape.
< /dev/rmt0 Rewinds the tape !!!
<h3>PRINTERS / PRINT QUEUES</h3>
splp (device) Displays/changes printer driver settings
splp /dev/lp0
export $LPDEST="pqname" Set default printer queue for login session
lsvirprt Lists/changes virtual printer attributes.
lsallq Displays all queues
rmvirprt -q queuename -d queuedevice Removes a virtual printer
qpri -#(job No) -a(new priority) Change a queue job priority.
qhld -#(job No) Put a hold on hold
qhld -r #(job No) Release a held job
qchk -A Status of jobs in queues
lpstat
lpstat -p(queue) Status of jobs in a named queue
lpstat -w Wide lpstat display (for long queue names)
qcan -x (job No) Cancel a job from a queue
cancel (job No)
enq -U -P(queue) Enable a queue
enable (queue)
enq -D -P(queue) Disable a queue
disable (queue)
qmov -m(new queue) -#(job No) Move a job to another queue
startsrc -s qdaemon Start qdaemon sub-system
lssrc -s qdaemon List status of qdaemon sub-system
stop -s qdaemon Stop qdaemon sub-system
enscript (filename) Prints ascii file to a postscript queue
enscript -d(queue) (filename) Prints ascii file to a named postcript queue
enscript -r (filename) Prints ascii file in landscape to ps queue
enscript -fCourier8 (filename) Prints ascii file using Courier font size 8
<h3>FILE SYSTEMS</h3>
''Physical Volumes (PV's)''
lspv Lists all physical volumes (hard disks)
lspv (pv) Lists the physical volume details
lspv -l (pv) Lists the logical volumes on the physical volume
lspv -p (pv) Lists the physical partition usage for that PV
lspv -M (pv) Lists the PP allocation table for that PV.
If the PV state is "missing" but the disk is okay, use "varyonvg vg" to change
the state of the PV to "active".
chdev -l (pv) -a pv=yes Makes a new hdisk a pysical volume.
chpv -v r (pv) Removes a disk from the system.
chpv -v a (pv) Adds the removed disk back into the system.
chpv -a y (pv) Changes pv allocatable state to YES
chpv -a n (pv) Changes pv allocatable state to NO
migratepv (old pv) (new pv) Moves all LV's from one PV to another PV, both
PV's must be in the same volume group.
Migratepv cannot migrate striped logical volumes, use cplv and rmlv.
replacepv (old pv) (new pv) (4.3.3 onwards)
/usr/lpp/diagnostics/bin/uformat -d (pv) -o certify
Will cerify ( read all on disk media ) scsi disks only.
''Volume Groups (VG's)''
lsvg Lists all volume groups
lsvg (vg) Lists the volume group details
lsvg -l (vg) Lists all logical volumes in the volume group
lsvg -p (vg) Lists all physical volumes in the volume group
lsvg -o Lists all varied on volume groups
varyonvg (vg) Vary On a volume group
varyonvg -f (vg) Forces the varyon process
varyonvg -s (vg) Vary on a VG in maintenance mode. LV commands can be
used on VG, but LV,s cannot be opened for I/O.
varyoffvg (vg) Vary Off a volume group
synclvodm (vg) Tries to resync VGDA, LV control blocks and ODM.
synclvodm -v (vg) Rebuilds the LVCB.
(the vg needs to be varied on before running synclvodm)
mkvg -y(vg) -s(PP size) (pv) Create a volume group
mkvg -y datavg -s 4 hdisk1
reducevg (vg) (pv) Removes a volume group
reducevg -d (vg) (pv) Removes a volume group and delete all LV's on the PV
reducevg (vg) (PVID) Removes the PVID disk reference from the VGDA when a
disk has vanished without the reducevg (vg) (pv)
command being run first.
reducevg -df (vg) (pv) Deletes all LV's from the VG and removes the VG
from the disk. If the last disk in the VG then
the VG is deleted.
extendvg (vg) (new pv) Adds another PV into a VG.
exportvg (vg) Exports the volume group, removes the VG entries and
removes all FS entries from /etc/filesystems but
leaves the mount points.
Note : Cannot export a VG if it has active paging space, turn off paging,
reboot before exporting VG. Exporting removes entries from filesystems
file but does not remove the mount points.
chvg -a y (vg) Auto Vary On a volume group at system start.
chvg -u (vg) Unlocks a locked volume group.
lqueryvg -Atp (pv) Details volume group info for the hard disk.
importvg -y (vg name) (pv) Import a volume group from a disk.
importvg (pv) Same as above but VG will be called vg00 etc.
4.3 onwards, importvg will automatically varyon the VG.
chvg -Q (y/n) (vg name) Turns on/off Quorum checking on a VG.
reorgvg (vg) (lv) Reorganised a fragmented LV, must state an LV at the
command line else the first LV in the VG is picked.
Does not reorg the PP's of striped LV's.
<h3>Logical Volumes (LV's)</h3>
lslv (lv) Lists the logical volume details
lslv -l (lv) Lists the physical volume which the LV is on
lsattr -EHl (lv) Displays more logical volume details
mklv (vg) (No of PP's) (pv Name optional) Create a logical volume
mklv -y (lv) (PP's) (pv name optional) Creates a named logical volume
( use -t jfs2 when creating an LV for a JFS2 filesystem )
chlv -n (new lv) (old lv) Rename a logical volume
chlv -x (number) (lv) Change max no of PP's
chlv -s n (lv) Turns of strickness on the LV
extendlv (lv) (extra No of PP's) Increase the size of an LV
rmlv (lv) Remove a logical volume
cplv -v (vg to copy to) -y (new lv) (lv) Copy an LV to a new LV
If copying a filesystem LV, umount the filesystem before copying, otherwise you
will have to fsck the the new LV before the filesystem can be mounted.
If copying a striped LV to an LV that is already created, and the stripe
size is different ( or not even striped ), then these new parameters are
maintained when the data is copied to the new LV.
cplv -e (new lv) (old lv)Copy to an existing LV
( new lv must have type as copy use chlv -t copy (new lv) to change )
mklv/extendlv -a = PP alocation policy
-am = middle -ac = center -ae = edge
-aie = inner edge -aim = inner middle
migratepv -l (lv) (old pv) (new pv)
Move a logical volume between physical volumes. Both physical volumes
must be in the same volume group !
mklv -y (lv) -t jfslog (vg) (No of PP's) (pv Name optional)
Creates a JFSlog logical volume.
logform (/dev/lv) Initialises an LV for use as an JFSlog
getlvcb -AT (lv) Displays Logical Volume Control Block information
<h3>File Systems (FS's)</h3>
lsfs Lists all filesystems
lsfs -q (fs) Lists the file system details
lsjfs Displays data about all filesystems in CSV style format
mount Lists all the mounted filesystems
mount (fs or lv) Mounts a named filesystem
mount -a Mounts all filesystems
mount all
mount -r -v cdrfs /dev/cd0 /cdrom mounts cd0 drive over /cdrom
crfs -v jfs -d(lv) -m(mount point) -A yes
Will create a file system on the whole of the logical volume, adds entry into
/etc/filesystems and will create mount point directory if it does not exist.
( use -v jfs2 for JFS2 filesystems )
crfs -v jfs -g(vg) -m(mount point) -a size=(size of fs) -A yes
Will create a logical volume on the volume group and create the file system on
the logical volume. All at the size stated. Will add entry into
/etc/filesystems and will create the mount point directory if it does not exist.
Use attribute "-a log=/dev/log01" to specify a jfslog devices
Use attrubute "-a bf=true" for a large file enabled filesystem
chfs -A yes (fs) Change file system to Auto mount in
/etc/filesystems
chfs -a size=(new fs size)(fs) Change file system size
chfs -m (new-mount-point) (fs) Change the file system mount point.
rmfs (fs) Removes the file system and will also remove the
LV if there are no onther file systems on it.
defrag -q (fs) Reports the fragment status of the file system.
defragfs -r (fs) Runs in report only defrag mode (no action).
defragfs (fs) Defragments a file system.
fsck (fs) Verify a file system, the file system must be unmounted!
fsck (-y or -n) (fs) Pre-answer questions either yes or no !
fsck -p (fs) Will restore primary superblock from backup copy if the
superblock is corrupt.
( or dd count=1 bs=4k skip=31 seek=1 if=/dev/lv00 of=/dev/lv00 )
<h3>Mirroring</h3>
mklv -y (lv) -c(copies 2 or 3) (vg) (No of PP's) (PV Name optional)
Creates a mirrored named logical volume.
mklvcopy -s n (lv) (copies 2 or 3) (pv)
Creates a copy of a logical volume onto another physical volume. The physical
volume MUST be in the same volume group as the orginal logical volume !
rmlvcopy (lv) (copies 1 or 2) Removes logical volume copies.
rmlvcopy (lv) (copies 1 or 2) (pv) From this pv only!
syncvg -p (pv) Synchronize logical partion copies
syncvg -l (lv)
syncvg -v (vg)
mirrorvg (vg) (pv)
Mirrors the all the logical volumes in a volume group onto a new physical
volume. New physical volume must already be part of the volume group.
chfs -a splitcopy=/backup -a copy=2 /data1
Splits off a copy of a 3 way mirror and mount read only for use as an
offline backup.
<h3>BOOT LOGICAL VOLUME (BLV) PROCESSORS KERNEL</h3>
Mirroring does not work with the BLV as it is not a true logical volume,
bosboot must be run against the other disk after mirroring the rootvg.
bootlist -m (normal or service) -o displays bootlist
bootlist -m (normal or service) (list of devices) change bootlist
bootinfo -b Identifies the bootable disk
bootinfo -t Specifies type of boot
bosboot -a -d (/dev/pv) Creates a complete boot image on a physical volume.
mkboot -c -d (/dev/pv) Zero's out the boot records on the physical volume.
savebase -d (/dev/pv) Saves customised ODM info onto the boot device.
lslv -m hd5 Find out which disk the BLV is on.
bootinfo -y Displays which kernel can be used, 32 or 64 bit
genkex Reports all loaded kernel extensions.
lsdev -Cc processor Lists all processors
lsattr -EHl proc0 Displays attributes of processor 0. AIX 5.1L will
display processor clock frequency.
<h3>SYSTEM DUMP</h3>
1, AIX 4.2.1 and greater supports system dump to paging space.
2, AIX 4.3.3 and greater supports system dump to mirrored paging space.
3, Primary dump device must be in the rootvg
4, Secondary dump device can be outside rootvg unless it is a paging device.
sysdumpdev -l Lists current dump destination.
sysdumpdev -e Estimates dumpsize of the current system in bytes.
sysdumpdev -L Displays information about the previous dump.
sysdumpstart -p Starts a dump and writes to the primary dump device.
sysdumpstart -s Starts a dump and writes to the secondary dump device.
(MCA machine can also dump if key is in service position and the reset
button is pressed)
sysdumpdev -p (dump device) -P Sets the default dump device, permanently
Analyse dump file :-
echo "stat\n status\n t -m" | crash /var/adm/ras/vmcore.0
snap -gfkD -o /dev/rmt0 Copy dump to tape to send to IBM support, uses tar.
<h3>PAGING SPACE (PS's)</h3>
lsps -a Lists out all paging space
lsps -s Displays total paging and total useage
lsps (ps)
swappon /dev/ps Activates a paging device eg /dev/paging00
swappoff /dev/ps Deactivates a paging device ( AIX 5.x only )
mkps -s(No of PP's) -n -a (vg)
mkps -s(No of PP's) -n -a (vg) (pv)
-n = don't activate/swapon now -a = activate/swapon at reboot
mklv -b n -t paging -y hd6 (vg) (No of PP's) (pv)
Creates paging space using the mklv command.
chps -a n (ps) Turns off paging space.
chps -s(No of PP's) (ps) Increases paging space.
chps -d(No of PP's) (ps) Decreases paging space ( AIX 5.x only )
chlv -n (new name) (old name) Change paging space name
rmps (ps) Remove paging space. PS must have been turned off
and then the system rebooted before it can be removed.
Note : Need to change the swapon entry in /sbin/rc.boot script if you are
changing the default paging space from /dev/hd6. You also need to
do a "bosboot -a -d /dev/hdiskx" before the reboot.
/etc/swapspaces File that lists all paging space devices that are
activated/swapon during reboot.
<h3>SCHEDULING</h3>
List out crontab entrys: <pre><code>crontab -l </code></pre>
Edit crontab entrys: <pre><code>crontab -e</code></pre>
Output crontab entrys to a file: <pre><code>crontab -l > (filename)</code></pre>
Enter a crontab from a file: <pre><code>crontab (filename) </code></pre>
Removes all crontab entrys: <pre><code>crontab -r </code></pre>
Displays crontab submission time: <pre><code>crontab -v </code></pre>
<br />
File containing users allowed crontab use; <pre><code>/var/adm/cron/cron.allow</code></pre>
File containing users denied crontab use: <pre><code>/var/adm/cron/cron.deny</code></pre>
Directory containing users crontab entries: <pre><code>/var/adm/cron/crontab</code></pre>
Cron log file: <pre><code>/var/adm/cron/log</code></pre>
at (now + 2 minutes, 13:05, etc) {return} Schedule a job using at
Command or schell script {return}
{CTRL D}
echo "shutdown -Fr" | at now + 1 minute
at -l
atq Lists out jobs scheduled to run via at command
at -r (at job No)
atrm (at job No) Removes an at job scheduled to run.
/var/adm/cron/at.allow File containing users allowed at use.
/var/adm/cron/at.deny File containing users denied at use.
/var/adm/cron/atjobs Directory containing users at entries.
/tmp/crout(pid) Output of currently running cron or at jobs
<h3>SECURITY</h3>
nulladm /var/adm/wtmp To recreate/clear down the wtmp file.
groups Lists out the groups that the user is a member of
setgroups Shows user and process groups
chmod abcd (filename) Changes files/directory permissions
Where a is (4 SUID) + (2 SGID) + (1 SVTX)
b is (4 read) + (2 write) + (1 execute) permissions for owner
c is (4 read) + (2 write) + (1 execute) permissions for group
d is (4 read) + (2 write) + (1 execute) permissions for others
-rwxrwxrwx -rwxrwxrwx -rwxrwxrwx
||| ||| |||
- - -
| | |
Owner Group Others
-rwSrwxrwx = SUID -rwxrwSrwx = SGID drwxrwxrwt = SVTX
chown (new owner) (filename) Changes file/directory owners
chgrp (new group) (filename) Changes file/directory groups
chown (new owner).(new group) (filename) Do both !!!
umask Displays umask settings
umask abc Changes users umask settings
where ( 7 - a = new file read permissions)
( 7 - b = new file write permissions)
( 7 - c = new file execute permissions)
eg umask 022 = new file permissions of 755 = read write and execute for owner
read ----- and execute for group
read ----- and execute for other
mrgpwd > file.txt Creates a standard password file in file.txt
passwd Change current user password
pwdadm (username) Change a users password
pwdck -t ALL Verifies the correctness of local authentication
lsgroup ALL Lists all groups on the system
mkgroup (new group) Creates a group
chgroup (attribute) (group) Change a group attribute
rmgroup (group) Removes a group
<h3>USERS / ENVIRONMENT</h3>
passwd -f Change current users gecos (user description)
passwd -s Change current users shell
chfn (username) Changes users gecos
chsh (username) (shell) Changes users shell
env Displays values of environment variables
printenv
id Displays current user's uid and gid details
id (user) Displays user uid and gid details
whoami Displays current user details
who am i (or who -m)
who Displays details of all users currently logged in.
w
who -b Displays system reboot time
uptime Displays number of users logged in, time since last
reboot, and the machine load averages.
lsuser ALL Lists all users details
lsuser (username) Lists details for user
lsuser -a(attribute) (username or ALL) Lists user attributes
lsuser -a home ALL
mkuser -a(attributes) (newuser) Add a new user
chuser (attributes) (user) Change a user
chuser login=false (user) Lock a user account
rmuser -p (user) Removes a user and all entries in security files
usrck -t ALL Checks all the user entires are okay.
fuser -u (logical volume) Displays processes using the files in that LV
fuser -k /dev/lv02 Will send a kill signal to all processes using
/dev/lv02
lsattr -D -l sys0 -a maxuproc Displays max number of processes per user
chdev -l sys0 -a maxuproc=(number) Changes max number of processes per user
chlang (language) Changes the language settings for system or user.
En_GB = PC850 code pages
en_GB = ISO8859 code pages (Great Britain)
C = posix
su - (user) Switch to new user and change to the new users environment.
su (user) Switch to new user, current environment is propated to the
new shell.
<h3>REMOTE USERS</h3>
ruser -a -f (user) Adds entry into /etc/ftpusers file
ruser -a -p (host) Adds entry into /etc/host.lpd file
ruser -a -r (host) Adds entry into /etc/hosts.equiv file
ruser -d -f (user) Deletes entry in /etc/ftpusers file
ruser -d -p (host) Deletes entry in /etc/host.lpd file
ruser -d -r (host) Deletes entry in /etc/hosts.equiv file
ruser -s -F Shows all entries in /etc/ftpusers file
ruser -s -P Shows all entries in /etc/host.lpd file
ruser -s -R Shows all entries in /etc/hosts.equiv file
ruser -X -F Deletes all entries in /etc/ftpusers file
ruser -X -P Deletes all entries in /etc/host.lpd file
ruser -X -R Deletes all entries in /etc/hosts.equiv file
<h3>INITTAB</h3>
telinit S Switches to single user mode.
telinit 2 Switches to multi user mode.
telinit q Re-examines /etc/inittab
lsitab -a Lists all entries in inittab
lsitab (ident eg tty1) Lists the tty1 entry in inittab
mkitab ("details") Creates a new inittab entry
chitab ("details") Ammends an existing inittab entry
rmitab (ident eg tty1) Removes an inittab entry.
chitab "tty1:2:respawn:/usr/bin/getty /dev/tty1"
<h3>ODM, Object Data Manager</h3>
''Gets lp1 info from pre-defined database:''
odmget -q "name=lp1" CuDv |more
''Gets lp1 info from customised database:''
odmget -q "name-lp1" CuAt |more
''Deletes lp1 info from customised db:''
odmdelete -o CuAt -q "name=lp1"
''Export ODM info to text file:''
odmget -q "name=lp1" CuAt > lp1.CuAt
''Import ODM info from text file:''
odmadd lp1.CuAt
''Displays fields and record structures of CuAt:''
odmshow CuAt
odmchange
odmdrop
''Links:''
http://aix4admins.blogspot.de/2011/08/odm-object-data-manager-it-is-database.html
http://aix4admin.blogspot.de/2013/02/aix-odm-commands.html
<h3>ERROR LOGGING / LOGS</h3>
/usr/lib/errdemon -l Displays errorlog attributes.
/usr/lib/errdemon Starts error logging.
/usr/lib/errstop Stops error logging.
errpt Displays summary errorlog report.
errpt -a Displays detailed errorlog report.
errpt -j (identifier) Displays singe errorlog report.
Note : errorlog classes are H=Hardware S=Software O=Information V=Undetermined
errclear (days) Deletes all error classes in the errorlog.
errclear -d (class) (days) Deletes all error class entries in errlog.
Note : The errclear command will delete all entries older than the numbers of
days specified in the days paramenter. To delete ALL entries used 0.
errlogger "message up to 230 chrs"
Enters an operator notifaction message into the errorlog.
alog -L Lists all logs define in the alog db
alog -o -t (type) Display contents of log (type)
alog -o -t boot
cat /tmp/boot.log | alot -q -t (type) Copies contects of a file to a log
<h3>PERFORMANCE MONITORING / TUNING</h3>
vmstat (drive) (interval) (count) Reports virtual memory statistics.
vmstat hdisk0 5 20
vmstat -s Diplays number of paging events since system start.
vmstat -f Diplays number of forks since system start.
vmstat -i Diplays number of interupts by device since system start.
iostat (drive) (interval) (count) Reports i/o and cpu statistics.
iostat hdisk0 5 20
iostat -d (drive) (interval) (count) Limits report to drive statistics.
iostat -t (interval) (count) Limits report to tty statistics.
sar -u -P ALL 10 10 Displays %usr %sys %wio %idle for all processors
/usr/samples/kernel/vmtune Displays "Virtual Memory Manager" settings
<h3>DOS DISKETTES</h3>
dosdir Reads directory listing of a diskette
dosdir (directory) Reads directory listing of a named directory
dosread -D/dev/fd0 C41.TXT c41.txt Gets C41.TXT from diskette drive fd0
dosread -D/dev/fd0 DIRECTORY/C41.TXT c41.txt
(-D option can be dropped if using fd0)
doswrite -D/dev/fd0 (unixfile) (dosfile) Writes a file to diskette
dosdel (dosfile) Deletes a dos file on diskette
dosformat Formats the diskette
<h3>SENDMAIL</h3>
"Creates new aliase db from /etc/aliase file:"
sendmail -bi newaliases
"Displays the contents of the mail queue"
sendmail -bp mailq
"Processe the sendmail queue NOW"
sendmail -q
"Prints out sendmail version, compile defines and system information"
sendmail -bt -d0.4 < /dev/null
"Restart sendmail, will re-read /etc/sendmail.cf"
refresh -s sendmail
kill -l (sendmail PID)
"Stops the sendmail daemon"
stopsrc -s sendmail
"Starts the sendmail daemon"
startsrc -s sendmail "-bd -q30"
<h3>Links:</h3>
<ul>
<li><a href="http://www.claus-ebert.de/howto/howto_aix_crib_sheet.html"
target="_blank" rel="noreferrer noopener">
Claus Ebert :: AIX ‐ HowTo</a>
</li>
</ul>
</html>
<html>
<ul>
<li><b>ALM</b>, Asset Liquidity Management</li>
</ul>
</html>
<html>
<ul>
<li>“APK“ steht für “<em>Android Package</em>“</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://praxistipps.chip.de/was-ist-ein-apk-einfach-erklaert_42098" target="_blank" rel="noreferrer noopener">CHIP Praxistipps :: Was ist ein apk?</a></li>
<li><a href="https://www.giga.de/apps/android/tipps/apk-einfach-erklaert/" target="_blank" rel="noreferrer noopener">GIGA :: APK ‐ einfach erklärt</a></li>
</ul>
</html>
<html>
In der Regel lassen sich Apps auf Android-Geräten schnell und unkompliziert <br />
über den Google Play Store einrichten. In einigen Fällen kann es jedoch sinnvoll <br />
sein, Android-Apps manuell zu installieren, etwa wenn man aktuell keinen Zugriff <br />
auf den Google Play Store hat, diesen nicht nutzen möchte oder Apps auf das <br />
Android-Gerät spielen will, die nicht (mehr) im Google Play Store verfügbar <br />
sind. Auch wenn ihr eine eigene App entwickelt und diese auf einem Gerät testen <br />
wollt, bietet sich die Installation über eine APK-Datei ohne Play Store an. <br />
<br />
Bei uns erfährt man, wie man eine APK manuell auf das Smartphone laden kann. <br />
Um eine Android-App per APK zu installieren, benötigt man zunächst die <br />
dazugehörige APK-Datei. Will man eine App ohne Google Play auf das Smartphone<br />
bringen, gibt es sogar drei verschiedene Varianten: Die Installation per USB,<br />
über E-Mail oder unmittelbar per Download auf das Smartphone.<br />
<br />
Mit wenigen Handgriffen lassen sich Android-Apps im APK-Format auch ohne Google Play installieren<br />
<br />
<h3>APK-Datei öffnen und Android-App installieren: Anleitung</h3>
Um Apps aus APKs manuell zu installieren, muss zunächst in den Einstellungen <br />
des Android-Geräts die Installation von Apps aus „unbekannten Quellen“ oder <br />
„unsicherer Herkunft“ aktiviert werden. Je nach Gerätehersteller und Android-<br />
Versionen findet sich diese Option in den Einstellungen unter „Sicherheit und <br />
Bildschirmsperre“ , „Gerätesicherheit“ oder schlicht „Sicherheit“. Nun wird das <br />
Android-Gerät per USB mit dem Computer verbunden, welches unter Windows als <br />
Laufwerk angezeigt wird. Im Dateiexplorer auf dem Rechner sucht man sich nun <br />
einen Ordner auf dem Gerät aus, in den die auf der Festplatte liegende APK-Datei <br />
per Drag & Drop hineingezogen wird. Auf dem Smartphone wird die verschobene App <br />
im APK-Format über eine Dateimanager-App aufgerufen und installiert. Nach einer <br />
kurzen Einrichtungszeit ist die Installation abgeschlossen und die manuell <br />
installierte App kann auf dem Android-Gerät verwendet werden.<br />
<ol>
<li>Android-Einstellungen öffnen.</li>
<li>Sicherheitseinstellungen aufrufen.</li>
<li>Installation von Apps aus „unbekannten Quellen“beziehungsweise „unsicherer Herkunft“
erlauben.</li>
<li>Heruntergeladene APK-Datei auf Android-Gerät verschieben (interner oder externer SD-Speicher).</li>
<li>über einen Android-Dateimanager die Datei auf dem Smartphone auswählen. Dabei könnt ihr auf eine zusätzliche App, z. B. den ES Explorer zugreifen oder aber den bereits installierten Datei-Manager verwenden.</li>
<li>„Installieren“ klicken und etwaige Warnhinweise bestätigen.</li>
</ol>
Im Normallfall sollte so die gewünschte App per APK installiert werden. In <br />
einigen Fällen kann es allerdings zu Fehlern kommen, z. B. mit der Fehlermeldung <br />
„Beim Parsen des Pakets ist ein Fehler aufgetreten“. In solchen Fällen solltet <br />
ihr probieren, die APK-Datei erneut herunterzuladen oder eine andere Quelle für <br />
die Datei suchen, da die Installationsdatei beschädigt sein kann. Alternativ <br />
liegt der Fehler an eurem Android-Gerät. Sollte die APK-Installation <br />
fehlschlagen, kann es auch sein, dass die APK und euer Smartphone oder Tablet <br />
nicht miteinander kompatibel sind. Sucht eine kompatible Version der App oder <br />
versucht die Installation per APK-Datei auf einem anderen Gerät durchzuführen.<br />
<br />
<h3>APK-Dateien per E-Mail oder Dropbox übertragen oder direkt herunterladen.</h3>
Wer die APK-Datei nicht direkt über USB-Anschluss installieren möchte, dem <br />
stehen noch andere Methoden der Installation von Android-Apps auf manuellem Wege <br />
zur Verfügung, etwa die Installation per E-Mail. Hierfür wird die APK-Datei als <br />
Anhang an eine auf dem Android-Gerät aktive E-Mail-Adresse versendet. Nach dem <br />
öffnen der Mail lässt sich die APK-Datei anwählen und per Hand installieren.<br />
Ein weiterer Kniff ist es, die App auf dem PC in die Dropbox oder auf einen <br />
anderen Cloudspeicher-Dienst zu laden und dann lokal auf sein Android-Gerät <br />
herunterzuladen und zu installieren. Und schließlich kann man APK-Dateien <br />
natürlich auch vom Android-Gerät aus direkt von einer Webseite wie GIGA.DE <br />
herunterladen und die APK-Datei über die entsprechende Benachrichtigung, die <br />
Downloads-App oder einen Dateimanager installieren.<br />
<h3>Nicht jede App sollte ohne Play Store installiert werden</h3>
<b>Achtung:</b>Aktiviert man die Funktion, Apps auch aus anderen Quelle, als dem <br />
Google Play Store zu installieren, erscheint ein Sicherheitshinweis. Apps aus <br />
unseriösen oder unbekannten Quellen werden anders als Anwendungen im Google Play <br />
Store und Co. nicht von Dritten überprüft. Daher können die APKs dem Gerät <br />
Schaden hinzufügen, so etwa durch einen versteckten Virus oder Trojaner, der <br />
eure Smartphone-Daten ausspäht. Installiert keine Android-Apps ohne Google Play <br />
Store, wenn ihr nicht wisst, woher diese App stammt und schon gar nicht, wenn es <br />
sich um eine illegal heruntergeladene Bezahl-App handelt!<br />
<br />
Link:<br />
<a href="http://www.giga.de/apps/google-play-store/tipps/android-apps-ohne-google-play-store-als-apk-manuell-installieren/" target="_blank">www.giga.de/apps/google-play-store/tipps/android-apps-ohne-google-play-store-als-apk-manuell-installieren</a><br />
</html>
<html>
<ul>
<li>Teil des Hadopp-Ökosystem;</li>
<br />
<li>wird verwendet zur Serialisierung & De-Serialisierung von Daten:
<ol>
<li>zur persistenten Speicherung</li>
<li>zum Transport der Daten über das Netzwerk</li>
</ol></li><br />
<li>andere Bezeichnung: <br />
<b>marshalling</b> bzw. <b>unmarshalling</b></li><br />
<li>(De-)Serialisierung in Programmierung:<br />
<table>
<tr><td><b>Java:</b></td><td>Klassen ObjectInputStream <br />
und ObjectOutputStream</td></tr>
<tr><td><b>Python:</b> </td><td>Module pickle</td></tr>
</table></li>
<br />
<li>Ein Avro-Schema wird in JSON definiert <br />
und ist in einem txt-File abgelegt;<br />
<br />
→ Beispiel:
<code><pre>
{
"type": "record",
"namespace": "com.example",
"name": "FullName",
"fields":
[
{ }
{ }
]
}
</pre></code></li>
<li><h4>General Working of Avro</h4>
To use Avro, you need to follow the given workflow:
<ol>
<li>Create schemas. Here you need to design Avro schema according to your data.
</li>
<li>Read the schemas into your program. It is done in two ways:
<ol><li>By Generating a Class Corresponding to Schema :: <br />
Compile the schema using Avro. This generates a class file corresponding to the schema
</li>
<li>By Using Parsers Library :: <br />
You can directly read the schema using parsers library.
</li>
<li>Serialize the data using the serialization API provided for Avro, which is found in the package org.apache.avro.specific.
</li>
<li>Deserialize the data using deserialization API provided for Avro, which is found in the package org.apache.avro.specific.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.tutorialspoint.com/avro/avro_overview.htm" target=_blank>Tutorialspoint :: AVRO</a></li>
</ul>
</html>
<html>
<img src="./pictures/amazon-aws-logo.png" height=75 width=160 /> <!-- height=150 width=320 -->
<br />
The easy way to manage an Amazon AWS EC2 server is from the AWS<br />
management console GUI.<br />
<br />
But, if your environment has multiple servers, then it gets bit tedious to<br />
manage it from the AWS GUI.<br />
<br />
Also, if you are Linux sysadmin, you would prefer to manage your EC2<br />
instances from the command line.<br />
<br />
Pretty much anything that you can do from AWS console UI can be done<br />
from the command line.<br />
<br />
This tutorial explains the 15 most frequently performed EC2 operations<br />
with AWS EC2 command line examples.<br />
<br />
If you are new to Amazon AWS: <br />
<a href="https://www.thegeekstuff.com/2016/02/aws-storage-and-db/" target=_blank>TheGeekStuff :: 10 Most Popular Amazon AWS Storage and Database Services</a>
<h4>Quick Reference</h4>
For your future quick reference, here are all the commands mentioned in <br />
this tutorial. Make sure to read the details provided in this tutorial below<br />
to understand more about these commands.<br />
<ol>
<li><a href="#tw-href1">aws ec2 describe-instances</a>
</li>
<li><a href="#tw-href2">aws ec2 start-instances --instance-ids i-dddddd70</a>
</li>
<li><a href="#tw-href3">aws ec2 stop-instances --instance-ids i-5c8282ed</a>
</li>
<li><a href="#tw-href4">aws ec2 terminate-instances --dry-run --instance-ids i-dddddd70</a>
</li>
<li><a href="#tw-href5">aws ec2 create-tags --resources i-dddddd70 --tags Key=Department,Value=Finance</a>
</li>
<br />
<li><a href="#tw-href6">aws ec2 describe-volumes</a>
</li>
<li><a href="#tw-href7">aws ec2 attach-volume --volume-id vol-1d5cc8cc --instance-id i-dddddd70 --device /dev/sdh</a>
</li>
<li><a href="#tw-href8">aws ec2 run-instances --dry-run --image-id ami-08111162 --count 1 --instance-type t1.micro --key-name MyKeyPair --security-groups my-ami-security-group</a>
</li>
<li><a href="#tw-href9">aws ec2 reboot-instances --instance-ids i-dddddd70 </a>
</li>
<li><a href="#tw-href10">aws ec2 modify-instance-attribute --instance-id i-44a44ac3 --instance-type "{\"Value\": \"m1.small\"}"</a>
</li>
<br />
<li><a href="#tw-href11">aws ec2 create-image --instance-id i-44a44ac3 --name "Dev AMI" --description "AMI for development server"</a>
</li>
<li><a href="#tw-href12">aws ec2 describe-images --image-ids ami-2d574747</a>
</li>
<li><a href="#tw-href13">aws ec2 deregister-image --image-id ami-2d574747 && aws ec2 delete-snapshot --snapshot-id snap-4e665454</a>
</li>
<li><a href="#tw-href14">aws ec2 delete-snapshot --snapshot-id snap-4e665454</a>
</li>
<li><a href="#tw-href15">aws ec2 modify-instance-attribute --instance-id i-44a44ac3 --disable-api-termination</a>
</li>
<br />
<li><a href="#tw-href16">aws ec2 modify-instance-attribute --instance-id i-44a44ac3 --no-disable-api-termination</a>
</li>
<li><a href="#tw-href17">aws ec2 get-console-output --instance-id i-44a44ac3</a>
</li>
<li><a href="#tw-href18">aws ec2 monitor-instances --instance-ids i-44a44ac3</a>
</li>
<li><a href="#tw-href19">aws ec2 unmonitor-instances --instance-ids i-44a44ac3</a>
</li>
<li><a href="#tw-href20">aws ec2 describe-key-pairs</a>
</li>
<br />
<li><a href="#tw-href21">aws ec2 create-key-pair --key-name dev-servers</a>
</li>
<li><a href="#tw-href22">aws ec2 delete-key-pair --key-name dev-servers</a>
</li>
</ol>
<div id="tw-href1"/>
<h4>1. View Current Status of an Instance</h4>
<ul>
<li>The following “aws ec2 describe-instances“ will display detailed information about all instances that are managed by you.
</li>
<li>The output will be in JSON format.
<pre><code>aws ec2 describe-instances</code></pre>
</li>
<li>If you have way too many instances, you can use the filter option to view a specific instance.
</li>
<li>The following will display only the instance which has the “Name“ tag set as “dev-server“.
<pre><code># aws ec2 describe-instances --filter Name=tag:Name,Values=dev-server
..
..
"State": {
"Code": 80,
"Name": "stopped"
},
..
..
"InstanceId": "i-e5888e46",
..</code></pre>
</li>
<li>From the above output, we can see that this instance is currently “stopped“ and is not running.
</li>
<li>Beispiel - Auflisten der vorhandenen Instancen, mit Name & Instance-ID:
<pre><code> aws ec2 describe-instances | grep -E "Value|InstanceId"
"Value": "MyTestServer"
"InstanceId": "i-098321da0d4982d7b",
"Value": "WebServer"
"InstanceId": "i-0377ffb99bea751d5",
"Value": "SSH-HOL-Server"
"InstanceId": "i-0b4e8e4fff3b0f06c",
"InstanceId": "i-0773ffe19d2e0d032",
"InstanceId": "i-0571b1a3021f999fb",</code></pre>
</li>
</ul>
<div id="tw-href2"/>
<h4>2. Start an Instance</h4>
The following “aws ec2 start-instances“ command will start the instance that is specified in the ‐‐instance-ids field.
This will also display the current state and the previous state of the instance in the output. As you see from the following output, previously this instance was “stopped“ and now it is in “pending“ state and will be started soon.
<code><pre>
# aws ec2 start-instances --instance-ids i-dddddd70
{
"StartingInstances": [
{
"InstanceId": "i-dddddd70",
"CurrentState": {
"Code": 0,
"Name": "pending"
},
"PreviousState": {
"Code": 80,
"Name": "stopped"
}
}
]
}
</pre></code>
If you want to start multiple instances using a single command, provide all the instance ids at the end as shown below.
<code><pre>
aws ec2 start-instances --instance-ids i-5c8282ed i-44a44ac3
</pre></code>
<div id="tw-href3"/>
<h4>3. Stop an Instance</h4>
The following “aws ec2 stop-instances“ command will stop the instance that is specified in the ‐‐instance-ids field.
As you see from the output, previously this particular instance was in “running“ state and currently it is in “stopping“ state and will be stopped very soon.
<code><pre>
# aws ec2 stop-instances --instance-ids i-5c8282ed
{
"StoppingInstances": [
{
"InstanceId": "i-5c8282ed",
"CurrentState": {
"Code": 64,
"Name": "stopping"
},
"PreviousState": {
"Code": 16,
"Name": "running"
}
}
]
}
</pre></code>
The following are the possible state name and state code for an instance:
<ul>
<li>0 is for pending</li>
<li>16 is for running</li>
<li>32 is for shutting-down</li>
<li>48 is for terminated</li>
<li>64 is for stopping</li>
<li>80 is for stopped</li>
</ul>
If you execute the above command on an instance that is already stopped, you'll see both the previous state and the current state as stopped.
To stop multiple instances together, specify one or more instances ids as shown below.
<code><pre>
aws ec2 stop-instances --instance-ids i-5c8282ed i-e5888e46
</pre></code>
You can also force an instance to stop. This will not give the system an opportunity to flush the filesystem level cache. Use this only when you know exactly what you are doing.
<code><pre>
aws ec2 stop-instances --force --instance-ids i-dddddd70
</pre></code>
<div id="tw-href4"/>
<h4>4. Terminate an Instance</h4>
The following “aws ec2 terminate-instances“ command will terminate the instance that is specified in the ‐‐instance-ids field.
As you see from the output, previously this particular instance was in “stopped“ state and it is not in “terminated“ state.
Be very careful when you are terminating an instance, as you can't get your instance back once it is terminated. Terminate is not same as stop.
<code><pre>
# aws ec2 terminate-instances --instance-ids i-44a44ac3
{
"TerminatingInstances": [
{
"InstanceId": "i-44a44ac3",
"CurrentState": {
"Code": 48,
"Name": "terminated"
},
"PreviousState": {
"Code": 80,
"Name": "stopped"
}
}
]
}
</pre></code>
<div id="tw-href5"/>
<h4>5. Add Name Tag to an Instance</h4>
The following “aws ec2 create-tags“ command will add a new tag to the specified instance.
In this example, we are adding a tag with Key as “Department“, and it's Value as “Finance“:
<code><pre>
aws ec2 create-tags --resources i-dddddd70 --tags Key=Department,Value=Finance
</pre></code>
Now you'll see that the new Tag has been added.
<code><pre>
# aws ec2 describe-instances
..
"Tags": [
{
"Value": "Finance",
"Key": "Department"
},
{
"Value": "dev-server",
"Key": "Name"
}
],
..
</pre></code>
You can also verify the TAG from the AWS Management Console GUI as shown below.<br />
<br />
<img src="./pictures/aws-ec2-add-tag-cli.png" height=300 width=539 /><br />
AWS EC2 Instance Tag
<div id="tw-href6"/>
<h4>6. Add Storage (Block Device) to an Instance</h4>
First, use the following command to get a list of all block device volumes that are available for you. Look for those volumes that has the State as “available“
<code><pre>
aws ec2 describe-volumes
..
{
"AvailabilityZone": "us-east-1b",
"Attachments": [],
"Encrypted": false,
"VolumeType": "standard",
"VolumeId": "vol-1d5cc8cc",
"State": "available",
"SnapshotId": "",
"CreateTime": "2016-04-17T15:08:40.469Z",
"Size": 1
}
..
</pre></code>
From the above, get the VolumeId, and use that in the following “aws ec2 attach-volume“ command to attach that volume to a particular instance.
In the following command, you should also specify the ‐‐device option, which will be the the disk name that will be used at the OS level for this particular volume.
In this example, this volume will be attached as “/dev/sdh“ disk.
<code><pre>
# aws ec2 attach-volume --volume-id vol-1d5cc8cc --instance-id i-dddddd70 --device /dev/sdh
{
"AttachTime": "2016-04-17T15:14:10.144Z",
"InstanceId": "i-dddddd70",
"VolumeId": "vol-1d5cc8cc",
"State": "attaching",
"Device": "/dev/sdh"
}
</pre></code>
Note: When you attach a volume to an instance from the AWS management console, by default it will automatically populate the device. But in the AWS EC2 CLI, you have to specify the device name as shown below.
After attaching the device, you'll notice that the state changed from “available“ to “attached“ for this particular volume.
<code><pre>
# aws ec2 describe-volumes
..
"Attachments": [
{
"AttachTime": "2016-04-17T15:14:10.000Z",
"InstanceId": "i-dddddd70",
"VolumeId": "vol-1d5cc8cc",
"State": "attached",
..
</pre></code>
<div id="tw-href7"/>
<h4>7. Launch a New EC2 Instance</h4>
The following command will create a new AWS EC2 instance for you.
This is equivalent to the “Launch Instance“ that you'll perform the AWS management console.
To launch an instance, use “aws ec2 run-instances“ command as shown below.
<code><pre>
# aws ec2 run-instances --image-id ami-22111148 --count 1 --instance-type t1.micro --key-name stage-key --security-groups my-aws-security-group
</pre></code>
In the above command:
<ul>
<li>‐‐image-id :: Specify the image id for the AMI that you want to launch. You can browse the AWS marketplace and choose the correct image that is required for your project.</li>
<li>‐‐count :: Specify the number of instance that you want to launch from this image. In this case, we are creating only one new instance.</li>
<li>‐‐instance-type :: In this example, I'm launching this instance as a t1.micro type, which doesn't use have CPU and RAM.</li>
<li>‐‐key-name :: Specify the name of the key pair that you want to use this with system. You should create your own key pair before launching your instance.</li>
<li>‐‐security-groups :: Specify the name of the security groups. You should create a security group with appropriate firewall rules that are required for your project.</li>
</ul>
The following is a sample full output of the above command, which display all the information about the newly launched instance.
<code><pre>
{
"OwnerId": "353535354545",
"ReservationId": "r-d6668103",
"Groups": [
{
"GroupName": "my-aws-security-group",
"GroupId": "sg-6cbebe01"
}
],
"Instances": [
{
"Monitoring": {
"State": "disabled"
},
"PublicDnsName": "",
"KernelId": "aki-91afcaf8",
"State": {
"Code": 0,
"Name": "pending"
},
"EbsOptimized": false,
"LaunchTime": "2016-04-17T19:13:56.000Z",
"ProductCodes": [],
"StateTransitionReason": "",
"InstanceId": "i-44a44ac3",
"ImageId": "ami-22111148",
"PrivateDnsName": "",
"KeyName": "stage-key",
"SecurityGroups": [
{
"GroupName": "my-aws-security-group",
"GroupId": "sg-6cbebe01"
}
],
"ClientToken": "",
"InstanceType": "t1.micro",
"NetworkInterfaces": [],
"Placement": {
"Tenancy": "default",
"GroupName": "",
"AvailabilityZone": "us-east-1c"
},
"Hypervisor": "xen",
"BlockDeviceMappings": [],
"Architecture": "x86_64",
"StateReason": {
"Message": "pending",
"Code": "pending"
},
"RootDeviceName": "/dev/sda1",
"VirtualizationType": "paravirtual",
"RootDeviceType": "ebs",
"AmiLaunchIndex": 0
}
]
}
</pre></code>
If you get the following error message, then the instance type you've selected is not supported for this AMI. Change the instance type and try again.
<code><pre>
# aws ec2 run-instances --dry-run --image-id ami-08111162 --count 1 --instance-type t1.micro --key-name MyKeyPair
A client error (InvalidParameterCombination) occurred when calling the RunInstances operation: Non-Windows instances with a virtualization type of 'hvm' are currently not supported for this instance type.
</pre></code>
The following are additional parameters that you can pass with the “aws ec2run-instances“ command
<ul>
<li>‐‐subnet-id :: Use the appropriate subnet id to launch a EC2 VPC instance</li>
<li>‐‐block-device-mappings file://mymap.json :: In this JSON file you can specify the volumes that you want to attach to the instance that you want to launch</li>
<li>‐‐user-data file://myuserdata.txt :: In this text file you can specify the userdata that need to be executed when the EC2 instance is launched</li>
<li>‐‐iam-instance-profile Name=myprofile :: You can also specify your IAM profile that you want to use while launching the instance</li>
</ul>
<div id="tw-href8"/>
<h4>8. Reboot an Instance (and General Options)</h4>
To reboot an instance, use “aws ec2 reboot-instances“ command as shown below.
<code><pre>
aws ec2 reboot-instances --instance-ids i-dddddd70
</pre></code>
The are few options that you can use pretty much with most of the AWS EC2 cli commands.
For example, you can use “‐‐dry-run“ option pretty much with all the AWS EC2 cli command. As the name suggests, it will not really execute the command. This will only perform a dry-run and display all possible error messages without really doing anything.
For example, the following is a dry-run operation when you want to stop an instance.
<code><pre>
# aws ec2 stop-instances --dry-run --instance-ids i-dddddd70
A client error (DryRunOperation) occurred when calling the StopInstances operation: Request would have succeeded, but DryRun flag is set.
</pre></code>
When you are performing a dry-run the following are the two possible errors:
<ul>
<li>If you have appropriate permission, it will display “DryRunOperation“ error, and any other real error message that are related to that specific command that you are executing.</li>
<li>If you don't have permission to execute that particular command, it will display “UnauthorizedOperation“ error</li>
</ul>
You can also specify the input to the AWS EC2 cli in JSON format using the ‐‐cli-input-json option as shown below.
If you don't know exactly what kind of information needs to passed for a particular EC2 command in JSON format, you can use ‐‐generate-cli-skeleton as shown below. Once you have the JSON output, modify the appropriate values, and use it as an input to ‐‐cli-input-json option.
<code><pre>
# aws ec2 stop-instances --dry-run --force --generate-cli-skeleton --instance-ids i-dddddd70
{
"DryRun": true,
"InstanceIds": [
"i-dddddd70"
],
"Force": true
}
</pre></code>
The following is an example JSON file that can be used as an input to AWS EC2 CLI command.
<code><pre>
# cat stop.json
{
"DryRun": true,
"InstanceIds": [
"i-dddddd70"
],
"Force": true
}
</pre></code>
In the following example, we are using the above stop.json file as an value for the ‐‐client-input-json option as shown below. Don't forget to give “file://“:
<code><pre>
aws ec2 stop-instances --cli-input-json file://stop.json
</pre></code>
<div id="tw-href9"/>
<h4>9. Change Instance Type</h4>
Before changing: In this example, the following instance is of type t1.micro
<code><pre>
# aws ec2 describe-instances
..
"InstanceId": "i-44a44ac3",
..
"InstanceType": "t1.micro",
</pre></code>
You can change the above instance to a different instance type.
For that, first stop the instance. Without stopping you cannot change the instance type.
<code><pre>
aws ec2 stop-instances --instance-ids i-44a44ac3
</pre></code>
The following “aws ec2 modify-instance-attribute“ is used to change the instance type. In this example, we are changing the instance type to “m1.small“
<code><pre>
aws ec2 modify-instance-attribute --instance-id i-44a44ac3 --instance-type "{\"Value\": \"m1.small\"}"
</pre></code>
After changing, the following is the instance type.
<code><pre>
# aws ec2 describe-instances
..
"InstanceId": "i-44a44ac3",
..
"InstanceType": "m1.small",
</pre></code>
If an instance type is not supported for your particular image, you'll get the following error message. In this example, t2.nano is not supported for this particular image.
<code><pre>
# aws ec2 modify-instance-attribute --instance-id i-44a44ac3 --instance-type "{\"Value\": \"t2.nano\"}"
A client error (InvalidParameterCombination) occurred when calling the ModifyInstanceAttribute operation: Virtualization type 'hvm' is required for instances of type 't2.nano'. Ensure that you are using an AMI with virtualization type 'hvm'.
</pre></code>
<div id="tw-href10"/>
<h4>10. Create a New Image</h4>
From your particular instance that is running with all the configuration changes that you've done so far, you can create a new image using the following “aws ec2 create-image“ command.
<code><pre>
# aws ec2 create-image --instance-id i-44a44ac3 --name "Dev AMI" --description "AMI for development server"
{
"ImageId": "ami-2d574747"
}
</pre></code>
This is helpful when you want to launch new instance based on this new image that you created which has your changes in it.
Use the following “aws ec2 describe-images“ command to view the details of the new image that you've just created.
<code><pre>
# aws ec2 describe-images --image-ids ami-2d574747
{
"Images": [
{
"VirtualizationType": "paravirtual",
"Name": "Dev AMI",
"Hypervisor": "xen",
"ImageId": "ami-2d574747",
"RootDeviceType": "ebs",
"State": "available",
"BlockDeviceMappings": [
{
"DeviceName": "/dev/sda1",
"Ebs": {
"DeleteOnTermination": true,
"SnapshotId": "snap-4e665454",
"VolumeSize": 8,
"VolumeType": "standard",
"Encrypted": false
}
}
],
"Architecture": "x86_64",
"ImageLocation": "353535354545/Dev AMI",
"KernelId": "aki-91afcaf8",
"OwnerId": "353535354545",
"RootDeviceName": "/dev/sda1",
"CreationDate": "2016-04-17T19:57:57.000Z",
"Public": false,
"ImageType": "machine",
"Description": "AMI for development server"
}
]
}
</pre></code>
<div id="tw-href11"/>
<h4>11. Delete an Image</h4>
When you create an image, it also creates a snapshot.
So, when you are deleting your image you have to do two things.
First, use the “aws ec2 deregister-image“ command to dereigser the Image.
<code><pre>
aws ec2 deregister-image --image-id ami-2d574747
</pre></code>
Next, use the “aws ec2 delete-snapshot“ command to delete the snapshot that is associated with your image.
<code><pre>
aws ec2 delete-snapshot --snapshot-id snap-4e665454
</pre></code>
<div id="tw-href12"/>
<h4>12. Enable Instance Termination Protection</h4>
It is very easy to delete an running instance by mistake when you execute the terminate command by mistake (Either from UI or from command line).
By default termination protection is turned off. This means that you can delete your instance by mistake.
To enable termination protection for your instance, use the “aws ec2 modify-instance-attribute“ command, and pass the “‐‐disable-api-termination“ option as shown below.
<code><pre>
aws ec2 modify-instance-attribute --instance-id i-44a44ac3 --disable-api-termination
</pre></code>
Later if you want to disable the termination protection, execute the following command.
<code><pre>
aws ec2 modify-instance-attribute --instance-id i-44a44ac3 --no-disable-api-termination
</pre></code>
<div id="tw-href13"/>
<h4>13. Get System Log (View Console Output)</h4>
Since you don't have a physical access to the console for the instances that are running on AWS EC2, use the following command.
This “aws ec2 get-console-output“ command will display whatever was sent to the system console for your particular instance.
<code><pre>
aws ec2 get-console-output --instance-id i-44a44ac3
</pre></code>
This is very helpful when you are debugging some issues on your system.
<div id="tw-href14"/>
<h4>14. Enable Cloudwatch Monitoring for an Instance</h4>
The following “aws ec2 monitor-instances“ command will enable advanced cloudwatch monitoring provided by AWS to your specified instance.
<code><pre>
# aws ec2 monitor-instances --instance-ids i-44a44ac3
{
"InstanceMonitorings": [
{
"InstanceId": "i-44a44ac3",
"Monitoring": {
"State": "enabled"
}
}
]
}
</pre></code>
Since there are some cost associated with the monitoring of instance, you may want to enable monitoring temporarily when you are debugging some issue, and later you can disable the montiroing using the following command.
<code><pre>
# aws ec2 unmonitor-instances --instance-ids i-44a44ac3
{
"InstanceMonitorings": [
{
"InstanceId": "i-44a44ac3",
"Monitoring": {
"State": "disabled"
}
}
]
}
</pre></code>
<div id="tw-href15"/>
<h4>15. AWS EC2 Key Pairs</h4>
The following “aws ec2 describe-key-pairs“ command will display all keypairs that you've created so far in AWS.
<code><pre>
# aws ec2 describe-key-pairs
{
"KeyPairs": [
{
"KeyName": "prod-key",
"KeyFingerprint": "61:7c:f1:13:53:b0:3a:01:dd:dd:6c:90"
},
{
"KeyName": "stage-key",
"KeyFingerprint": "41:6c:d1:23:a3:c0:2a:0a:dc:db:60:4c"
}
]
}
</pre></code>
To create a new Keypair use the following “aws ec2 create-key-pair“ command. In this example, I'm creating a key pair with name “dev-servers“. I'll be using this key-pair for all my dev instances.
<code><pre>
# aws ec2 create-key-pair --key-name dev-servers
{
"KeyName": "dev-servers",
"KeyMaterial": "-----BEGIN RSA PRIVATE KEY-----\n
dYXbKYMRlI59J5XKyPgC/67GL8\nXg
....
n-----END RSA PRIVATE KEY-----",
"KeyFingerprint": "3d:c2:c8:7f:d2:ee:1d:66"
}
</pre></code>
If you have created a keypair by mistake, use the following command to delete it.
<code><pre>
# aws ec2 delete-key-pair --key-name dev-servers
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://www.thegeekstuff.com/2016/04/aws-ec2-cli-examples/" target=_blank>TheGeekStuff :: 15 Essential Amazon AWS EC2 CLI Command Examples</a></li>
</ul>
</html>
<html>
<img src="./pictures/amazon-aws-logo.png" height=150 width=320 /><br />
<br />
If you are new to Amazon AWS, and looking at their offerings, it can<br />
be bit confusing, as they have lot of services.<br />
<br />
If you are just looking to launch a virtual server on the cloud, it is<br />
relatively straight forward, and you can use Amazon's EC2<br />
service.<br />
<br />
But, when it comes to storage and database for your virtual in‐<br />
stance on the cloud, Amazon has multiple choices.<br />
<br />
In this tutorial, we have listed the most popular storage and data‐<br />
base services available from Amazon.
<h4>1. Amazon S3</h4>
<ul>
<li>Amazon S3 stands for SSS, which is Simple Storage Service.</li>
<li>This is an object storage. You can store any kind of files in S3.</li>
<li>The individual file size can be from 0 bytes to 5 TB.</li>
<li>For simple S3 file management, you can use Amazon S3 web interface.</li>
<li>For enterprise applications, you can use the REST APIs provided by Amazon from your application code to manage the files that are stored in S3.</li>
<li>In S3, amazon has the concept of buckets, and you can put multiple objects in a bucket.</li>
<li>For security, you can assign permissions at both bucket level and object level. You can also assign permission at user level.</li>
<li>One nice feature that S3 provides is that if you have a static website, you can just host it on Amazon S3. In that case, not only it stores your html file in S3 buckets, it will also indirectly act as webserver and serve your html content.</li>
<li>You can also enable versioning for objects that are stored in S3 buckets.</li>
</ul>
<h4>2. Amazon Glacier</h4>
<ul>
<li>Amazon Glacier is for archival purpose. Use this only on situations where you don't want to retrieve the data frequently. For example, you can store backups in Glacier.</li>
<li>The storage cost of Glacier is way too less when compared to S3. But, you won't be able to get to your data quickly, as the data retrieval process will take hours in glacier.</li>
<li>Glaicer is tightly integrated with S3 buckets, which is great when you want to move old data from S3 to Glacier for cost saving.</li>
<li>In S3, you can setup lifecycle management, and automatically move files that are older than X number of days from S3 to Glacier.</li>
<li>Similar to buckets in S3, in Glacier, you'll create vaults to store the data. You can assign permissions on Vaults to restrict access.</li>
<li>For your enterprise data, you can use the REST API from your application to archive your data directly to Glacier. Glacier also provides API interface for Java and .NET SDK.</li>
<li>Keep in mind that while storage cost is very less in Glacier, there is a separate cost associated for data retrival.</li>
</ul>
<h4>3. Amazon EBS</h4>
<ul>
<li>Amazon EBS stands for Elastic Block Store. This is a block level storage that can be attached to the EC2 instance that you'll spin-up in AWS.</li>
<li>One of the great advantages of EBS is that you can move it around from one EC2 instance to another EC2 instance without losing the data that is stored on the EBS.</li>
<li>There are three types of EBS storage:
<ul>
<li>Magnetic volumes with maximum 40 MiB/s throughput; use this for low IO requirement applications</li>
<li>General Purpose SSD with 160 MiB/s; use this for most database applications that requires good IO performance</li>
<li>Provisioned IOPS SSD with 320 MiB/s; use this business critical application that requires heavy IO operations.</li>
</ul></li>
<li>You can take backup (snapshot) of your EBS volume and store it directly on S3.</li>
<li>Amazon also provides the option of creating encyrpted EBS option, which is helpful when you want to encrypt your data at rest.</li>
<li>These EBS volumes can be exposed to your operating system which can be mounted appropriately. For example, on Linux EC2 instnace, it can be /dev/sdb (or /dev/xvdb), and on Windows it can be C: or D: drive.</li>
<li>You can also setup RAID on EC2 instance using EBS volumes.</li>
</ul>
<h4>4. EC2 Instance Store</h4>
<ul>
<li>Amazon EC2 Instance Store will use the disk that is directly attached to the host where the current EC2 instance is running.</li>
<li>But, be very careful when using an instance store, as this is a temporary storage.</li>
<li>Any data stored in the instance store will be lost when you restart the instance, or when an instance crashes for whatever reason.</li>
<li>You cannot detach an instance store and move it to another instance.</li>
<li>The size of the instance store volume that you can create depends on the instance type. For example, in m1.small, you can create a instance store volume of 160GB.</li>
<li>Some of the instance type (for example: C3, G2, HI1, I2, M3, and R) supports SSD instance storage.</li>
<li>Again, instance store is different than EBS. Use instance store only to store some temporary data that you can afford to lose.</li>
</ul>
<h4>5. AWS Storage Gateway</h4>
<ul>
<li>For most enterprise application, you'll probably already have some kind of storage solution on your site.</li>
<li>In that case, using AWS storage gateway, you can connect your on-site storage infrastructure with AWS storage services using the gateway.</li>
<li>For this, you should install the AWS storage gateway software application, which comes as a VM in your datacenter.</li>
<li>Once this is connected to the AWS, from the AWS console, you can create three types of storage gateway volumes and mount it on the server in your datacenter:
<ul>
<li>Gateway-cached volumes: This will use S3 to store your primary data, while keeping a copy of the frequently used data locally in your datacenter</li>
<li>Gateway-Stored volumes: This will store the primary data locally in your datacenter, and in parallel it will backup the data to AWS S3 in the form of EBS snapshot.</li>
<li>Gateway-Virtual Tape Library: This will replace your local physical tape library with virtual tape library using Amazon S3 storage of Glacier.</li>
</ul></li>
</ul>
<h4>6. Amazon RDS</h4>
<ul>
<li>Amazon RDS stands for Relational Database Service. In RDS you'll create a DB instance with a specific database, and select the type of compute and storage options based on your requirement.</li>
<li>The DB instance can be any of the most popular databases: MySQL, MariaDB, Oracle, SQL Server, PostgreSQL, or Aurora.</li>
<li>What RDS does is that it will automatically install the database, configure it, and perform the routine DB maintenance tasks like backup and patch applying.</li>
<li>You can manage your DB instance from the AWS management console.</li>
<li>The advantange of using RDS is that you don't need to be a DBA to successfully run your enterprise application on a database.</li>
</ul>
<h4>7. DynamoDB</h4>
<ul>
<li>DynamoDB is Amazon's version of NoSQL database (Similar to MongoDB).</li>
<li>DynamoDB also provides an option for users to download and install local copy on your server during your application and testing phase. When you are ready for deployment, you can move it to the Amazon DynamoDB environment.</li>
<li>AWS SDKs allow developers to access DynamoDB and manipulate the data from various programming languages including Java, .NET and PHP.</li>
<li>From the AWS management console, you can create DynamoDB tables, load data, create queries, and perform all typical NoSQL operations from the GUI directly.</li>
</ul>
<h4>8. Amazon SQS</h4>
<ul>
<li>Amazon SQS stands for Simple Queue Service.</li>
<li>This is a fully managed message queue service from Amazon.</li>
<li>Using SQS you can move your data or messages between different applications without having the applications to be always up and running.</li>
<li>SQS can be used to send messages between multiple AWS services including S3, EC2, DynamoDB. You can also use Java Message Services with SQS.</li>
<li>Using SQS, you can configure Dead Letter Queues, first-in-first-out (FIFO) access for your messages, etc.</li>
<li>The maximum visibility timeout for a message in the SQS queue is 12 hours.</li>
</ul>
<h4>9. ElastiCache</h4>
<ul>
<li>ElastiCache is Amazon's in-memory caching system on the cloud. Currently this supports both Memcached and Redis.</li>
<li>Using this you'll improve the application performance by caching I/O and CPU intensive queries in the memory for faster results.</li>
<li>When you are using ElastiCache, it is completely integrated with all other AWS services such as Amazon RDS, EC2, etc. Just like other AWS services, you can manage ElasticCache from both management console UI or using API.</li>
<li>You can also run ElastiCache cluster in your Amazon VPC (Virtual Private Cloud).</li>
</ul>
<h4>10. Amazon RedShift</h4>
<ul>
<li>Amazon RedShift is a fully managed data warehouse solution for your enterprise business intelligence application.</li>
<li>Redshift provides access to your structured data from your own existing SQL-based clients by using either JDBC or ODBC.</li>
<li>When a huge query is executed on Redshift, it is distributed among multiple nodes for parallel operations.</li>
<li>Depending on your needs, you can control how many number of nodes you want in your RedShift. The number of nodes can be dynamically controlled from an API call depending on a particular query that you are planning to execute.</li>
<li>There are three advantages of RedShift:
<ul>
<li>Column Data Storage; instead of storing your data in rows, it stores it by columns. Column-based systems are faster for data warehouse solutions</li>
<li>Advanced compression; Similar data are stored sequentially in disk by using automatic advanced compression technique for faster data retrieval</li>
<li>Massive Parallel Processing; Data and queries are distributed across multiple nodes for faster processing. The number of nodes can be easily controlled.</li>
</ul></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.thegeekstuff.com/2016/02/aws-storage-and-db/" target=_blank>TheGeekStuff :: 10 Most Popular Amazon AWS Storage and Database Services</a></li>
</ul>
</html>
<html>
<img src="./pictures/aws-ec2-userdata-cli.png" height=129 width=176 />
<p>In Amazon AWS, all the activities that you perform to manipulate your EC2 instances from AWS Console web interface can also be performed from command line using aws cli utilities.</p>
The command is aws. You can use the ec2 option in the aws command to manipulate your ec2 instances.
This tutorial specifically covers about UserData in EC2. We've shown the CLI examples for the following:
<div id="tw-hreftoc"></div>
<ol>
<li><a href="#tw-href1">Launch a New EC2 Instance without UserData from CLI</a>
</li>
<li><a href="#tw-href2">Create a new EC2 Server Instance with UserData from CLI</a>
</li>
<li><a href="#tw-href3">View the UserData of an existing EC2 Instance from CLI</a>
</li>
</ol>
<div id="tw-href1"/>
<h4>1. Launch a New EC2 Instance from CLI (Without UserData)</h4>
<ul>
<li>You can launch any instance from the AWS Marketplace directly from the command line.
</li>
<li>For this, you should know the AMI id (i.e image id) of the particular image from which you want to create a new instance.
</li>
<li>In this example, we'll be launching a new EC2 server from the Amazon Linux image. The image id for this is ami-a4c7edb2.
</li>
<li>In this example, the image we are using is called “Amazon Linux AMI 2017.03.1 (HVM), SSD Volume Type“ with this image id: ami-a4c7edb2. This is the description of this particular image: The Amazon Linux AMI is an EBS-backed, AWS-supported image. The default image includes AWS command line tools, Python, Ruby, Perl, and Java. The repositories include Docker, PHP, MySQL, PostgreSQL, and other packages.
</li>
<li>To launch a new server from an image, use the run-instances option along with “aws ec2“ command as shown below:
<pre><code># aws ec2 run-instances --image-id ami-a4c7edb2 --count 1 \
--instance-type t2.micro --key-name mynewkey \
--subnet-id subnet-5630306b
{
"OwnerId": "123449611234",
"ReservationId": "r-05e649ad3ee70f52d",
"Groups": [],
"Instances": [
{
"Monitoring": {
"State": "disabled"
},
..
..
"VpcId": "vpc-63042b04",
"StateTransitionReason": "",
"InstanceId": "i-01ce046ad25ceb467",
"ImageId": "ami-a4c7edb2",
"PrivateDnsName": "ip-192-30-4-91.ec2.internal",
"KeyName": "mynewkey",
"SecurityGroups": [
{
"GroupName": "default",
"GroupId": "sg-26d3d362"
}
],
..
..
"RootDeviceName": "/dev/xvda",
"VirtualizationType": "hvm",
"AmiLaunchIndex": 0
}
]
}</code></pre>
</li>
<li>In the above:
<ul>
<li>aws ec2 run-instances ‐ This is the command to launch new Amazon EC2 instance</li>
<li>‐‐image-id ami-a4c7edb2 ‐ This is the image id of the image that we will be using to create a new instance. This is the image id of Amazon Linux</li>
<li>‐‐count 1 ‐ This indicates that we want to create just one new server with this image. Be very careful with this parameter, you don't want to by mistake specify a higher number here, as it will create those many number of servers, which will be charged to your account.</li>
<li>‐‐instance-type t2.micro ‐ Specify the instance type here.</li>
<li>‐‐key-name mynewkey ‐ Use the key pair that you've already created and have it on your AWS account.</li>
<li>‐‐subnet-id subnet-5630306b ‐ This is the network VPC where I want to create the new EC2 server.</li>
</ul>
</li>
<li>If you don't specify the network interface, you'll get the following VPCResourceNotSpecified error message:
<pre><code>A client error (VPCResourceNotSpecified) occurred when calling the RunInstances operation: The specified instance type can only be used in a VPC. A subnet ID or network interface ID is required to carry out the request.</code></pre>
</li>
<li>If you specify a parameter that cannot be used in the combination you are using, you'll get the following InvalidParameterCombination error message.
<pre><code># aws ec2 run-instances --image-id ami-a4c7edb2 --count 1 --instance-type t2.micro --key-name mynewkey --security-groups my-aws-security-group --subnet-id subnet-8534a4af
A client error (InvalidParameterCombination) occurred when calling the RunInstances operation: The parameter groupName cannot be used with the parameter subnet</code></pre>
</li>
<li>If you specify an invalid AMI image id, you'll get the following InvalidAMIID.Malformed error:
<pre><code>A client error (InvalidAMIID.Malformed) occurred when calling the RunInstances operation: Invalid id: "ami-a4c7edbm"</code></pre>
</li>
<li>There are many things you can do using the aws ec2 CLI utility as we discussed earlier: <a href="https://www.thegeekstuff.com/2016/04/aws-ec2-cli-examples/" target=_blank>15 Essential Amazon AWS EC2 CLI Command Examples</a>
</li>
</ul>
<a href="#tw-hreftoc">back to TOC</a>
<div id="tw-href2"/>
<h4>2. Create a new EC2 Instance with UserData from CLI</h4>
You can use Userdata file during an instance creation to execute your custom commands. This is helpful when you want your newly created instance to be in a certain state with certain packages installed, or with certain custom configuration.
Create your custom userdata file. For example: ud.txt
<code><pre>
# cat ud.txt
#!/bin/bash
yum update -y
service httpd start
chkconfig httpd on
</pre></code>
Specify the above ud.txt file during the instance creation in the run-instances command as shown below:
<code><pre>
aws ec2 run-instances --image-id ami-a4c7edb2 --count 1 \
--instance-type t2.micro --key-name mynewkey \
--subnet-id subnet-5630306b --user-data file://ud.txt
</pre></code>
<a href="#tw-hreftoc">back to TOC</a>
<div id="tw-href3"/>
<h4>3. View the UserData of an Existing EC2 Instance from CLI</h4>
To view the Userdata that was used while creating your instance, do the following:
For this, use the describe-instance-attribute option in the “aws ec2“ command as shown below. Use the
<code><pre>
aws ec2 describe-instance-attribute --instance-id i-08dae85dc8fa85aa2 \
--attribute userData --output text --query "UserData.Value" \
| base64 --decode
</pre></code>
In the above:
<ul>
<li>aws ec2 describe-instance-attribute ‐ This is the command to view any attribute of the specified instance</li>
<li>‐‐attribute userData ‐ This indicates that the attribute we are interested is userData</li>
<li>‐‐instance-id ‐ Specify the instance id for which we want to view the attribute</li>
<li>‐‐output text ‐ We want to output in text format</li>
<li>‐‐query “UserData.Value“ ‐ We are specifically querying for the UserData.Value</li>
<li>base64 ‐‐decode ‐ The output is in base64. So, we have to pipe the output to base64 and decode the value as show here.</li>
</ul>
The following is the output of the above command. This is the userdata file that was used when this particular instance was launched for the first time.
<code><pre>
#!/bin/bash
yum update -y
service mysqld start
chkconfig mysqld on
</pre></code>
<a href="#tw-hreftoc">back to TOC</a>
<h3>Links:</h3>
<ul>
<li><a href="https://www.thegeekstuff.com/2017/07/aws-ec2-cli-userdata/" target=_blank>TheGeekStuff :: How to Launch an Amazon AWS EC2 Instance with UserData from CLI</a></li>
</ul>
</html>
<html>
To use AWS CLI, you need to first make sure your AWS access key credentials are configured properly.
Once you have your AWS access_key_id and secret_access_key, you can either manually add them to the credentials file, or use aws configure command to set it up on your local machine.
This tutorials explains all the options available in aws configure command along with how to manage multiple profiles:
<ol>
<li>First Time Configuring AWS Credentials ‐ Default Profile</li>
<li>~/.aws Directory ‐ Config and credentials File for Default Profile</li>
<li>Edit Default Profile Credentials ‐ Connect to Different AWS Account</li>
<li>Create Multiple AWS Profiles ‐ Dev and Prod</li>
<li>~/.aws Directory ‐ Config and credentials File for Multiple Profiles (Dev and Prod)</li>
<li>Switching Between Different AWS Profiles using ‐‐profile Option</li>
<li>Switching Between Different AWS Profiles using AWS_PROFILE Env Variable</li>
<li>View Profile Information using list Option</li>
<li>Change Default Config and Credentials FileName and Location</li>
<li>View a Specific Profile Parameter Value using get Option</li>
<li>Set a Specific Profile Parameter Value using set Option</li>
<li>Add New Model using add-model Option</li>
</ol>
<h4>1. First Time Configuring AWS Credentials ‐ Default Profile</h4>
When you execute aws configure command without any argument, you'll be configuring aws credentials as your default profile.
<code><pre>
$ aws configure
AWS Access Key ID [None]: AAABBBCCCDDDEEEFFFGG
AWS Secret Access Key [None]: aaabbbcccdddeeefffggghhhiiijjjkkklllmmmn
Default region name [None]: us-east-1
Default output format [None]: text
</pre></code>
In the above:
<ul>
<li>[None] ‐ This indicates that you don't have any existing access-key-id/secret-access-key setup on your system for default profile, and will prompt you for new values.</li>
<li>Region Name ‐This is optional. If you leave this empty, you should specify region in all your AWS CLI commands using ‐‐region parameter, else you'll get an error message.</li>
<li>Output ‐ This is optional. If you leave this empty, the output of all AWS CLI will be in json format. Available output options are: json, text, table</li>
</ul>
<h4>2. ~/.aws Directory ‐ Config and credentials File for Default Profile</h4>
When you execute aws configure for the first time, it will create ~/.aws directory if it doesn't already exits under your home directory with the following two files:
<code><pre>
$ ls -1 ~/.aws
config
credentials
$ cat ~/.aws/config
[default]
region = us-east-1
output = text
$ cat ~/.aws/credentials
[default]
aws_access_key_id = AAABBBCCCDDDEEEFFFGG
aws_secret_access_key = aaabbbcccdddeeefffggghhhiiijjjkkklllmmmn
</pre></code>
In the above:
<ul>
<li>~/.aws/credentials ‐ This will contain your access_key_id and secret_access_key</li>
<li>~/.aws/config ‐ This will contain the non-credential configuration information such as region and output</li>
<li>[default] ‐ This section indicates that these value belong to the default profile. Keep in mind that you can have more than one profile configured, which will allow you to execute AWS cli commands against different AWS accounts as shown in examples below.</li>
</ul>
<h4>3. Edit Default Profile Credentials ‐ Connect to Different AWS Account</h4>
If you want to connect to a different AWS acount from your CLI, then you can change your existing default profile credentials by executing the “aws configure“ command again.
<code><pre>
$ aws configure
AWS Access Key ID [****************FFGG]: ZZZZZZCCCDDDEEEFFFZZ
AWS Secret Access Key [****************mmmn]: zzzzzzcccdddeeefffggghhhiiijjjkkklllmmzz
Default region name [us-east-1]: us-west-2
Default output format [text]: json
$ cat ~/.aws/config
[default]
region = us-west-2
output = json
</pre></code>
<b>Note:</b>
<p>
When it prompts for access_key_id and secret_access_key, it'll show you the last 4 character of the existing values within [ ]
If you press enter without giving any new value, it will just keep the existing values and not change anything.
</p>
<h4>4. Create Multiple AWS Profiles ‐ Dev and Prod</h4>
When you are connecting to multiple AWS account just using the default profile, you've to keep changing the values of access_key_id and secret_access_key, which is not practical.
In that case, you can create multiple profiles.
Let us say you need to use AWS CLI commands to access your AWS-dev account and AWS-prod account. In this case, create a dev profile and a prod profile as explained below.
First, create dev profile as shown below. Use access_key_id and secret_access_key values of your AWS-dev account:
<code><pre>
$ aws configure --profile dev
AWS Access Key ID [None]: DEVBBBCCCDDDEEEFFDEV
AWS Secret Access Key [None]: devbbbcccdddeeefffggghhhiiijjjkkklllmdev
Default region name [None]: us-east-1
Default output format [None]:
</pre></code>
Next, create prod profile as shown below. Use access_key_id and secret_access_key values of your AWS-prod account:
<code><pre>
$ aws configure --profile prod
AWS Access Key ID [None]: PRODBBCCCDDDEEEFPROD
AWS Secret Access Key [None]: prodbbcccdddeeefffggghhhiiijjjkkklllprod
Default region name [None]: us-west-2
Default output format [None]:
</pre></code>
<h4>5. ~/.aws Directory ‐ Config and credentials File for Multiple Profiles (Dev and Prod)</h4>
After adding new additional profiles (dev and prod), now we have total of 3 profiles including default profile as shown below in the configuration files.
<code><pre>
$ cat ~/.aws/config
[default]
region = us-east-1
output = text
[profile dev]
region = us-east-1
[profile prod]
region = us-west-2
$ cat ~/.aws/credentials
[default]
aws_access_key_id = AAABBBCCCDDDEEEFFFGG
aws_secret_access_key = aaabbbcccdddeeefffggghhhiiijjjkkklllmmmn
[dev]
aws_access_key_id = DEVBBBCCCDDDEEEFFDEV
aws_secret_access_key = devbbbcccdddeeefffggghhhiiijjjkkklllmdev
[prod]
aws_access_key_id = PRODBBCCCDDDEEEFPROD
aws_secret_access_key = prodbbcccdddeeefffggghhhiiijjjkkklllprod
</pre></code>
In the above:
<ul>
<li>[default] ‐ This contains the credentials information when we just used 'aws configure' command without any parameter. This is our default profile. We don't have a name for this profile.</li>
<li>[dev] ‐ This section contains dev profile credentials.</li>
<li>[prod] ‐ This section contains prod profile credentials.</li>
</ul>
<h4>6. Switching Between Different AWS Profile using ‐‐profile Option</h4>
By default, AWS CLI will use credentials from default profile. For example, the following command will list all the EBS volumes using your default profile credentials.
<code><pre>
aws ec2 describe-volumes
</pre></code>
If you want to connect to a different AWS account. For example to connect to AWS-dev account, use the dev profile as shown below:
<code><pre>
aws ec2 describe-volumes --profile dev
</pre></code>
The following will connect to prod profile:
<code><pre>
aws ec2 describe-volumes --profile prod
</pre></code>
Please note that the following commands are exactly the same. Both will use the default profile:
<code><pre>
aws ec2 describe-volumes
aws ec2 describe-volumes --profile default
</pre></code>
<b>Note:</b> The ‐‐profile option can be used with all AWS CLI commands.
On a related note, to launch an EC2 instance from CLI, refer to this: <a href="https://www.thegeekstuff.com/2017/07/aws-ec2-cli-userdata/" target=_blank>TheGeekStuff :: How to Launch an Amazon AWS EC2 Instance with UserData from CLI</a>
<h4>7. Switching Between Different AWS Profiles using AWS_PROFILE Env Variable</h4>
Specifying profile option in all your CLI can be bit cumbersome. To avoid this, you can set your profile using AWS_PROFILE environment variable.
First, set your AWS_PROFILE to connect to AWS-dev account.
<code><pre>
export AWS_PROFILE=dev
</pre></code>
From now on, any AWS CLI commands that you execute will connect to the AWS-dev account. You don't need to specify ‐‐profile option anymore.
The following commands will use dev profile credentials (not the default credentials), as we've set the AWS_PROFILE to dev.
<code><pre>
aws ec2 describe-volumes
aws ec2 describe-instances
aws s3 ls
..
</pre></code>
If you want to connect to AWS-prod account, just set the AWS_PROFILE to prod as shown below.
<code><pre>
export AWS_PROFILE=prod
</pre></code>
After the above, the following commands will use prod profile credentials to connect to your AWS-prod account.
<code><pre>
aws ec2 describe-volumes
aws ec2 describe-instances
aws s3 ls
..
</pre></code>
Once you've set to either dev or prod, and if you want to connect to the AWS account that points to the default profile, you have two options.
You can set AWS_PROFILE to default as shown below.
<code><pre>
export AWS_PROFILE=default
</pre></code>
Or, you can simply unset the AWS_PROFILE environment variable, which will then automatically start using the default profile.
<code><pre>
unset AWS_PROFILE
</pre></code>
After the above, the following commands will use default profile credentials to connect to your AWS-prod account.
<code><pre>
aws ec2 describe-volumes
aws ec2 describe-instances
aws s3 ls
…
</pre></code>
<h4>8. View Profile Information using list Option</h4>
The easy way to view all the profiles that you've configured on your system is to view the content of config and credentials files.
<code><pre>
cat ~/.aws/config
cat ~/.aws/credentials
</pre></code>
The list option in the aws configure command will display the information about the current profile as shown below.
<code><pre>
$ aws configure list
Name Value Type Location
---- ----- ---- --------
profile None None
access_key ****************FFGG shared-credentials-file
secret_key ****************mmmn shared-credentials-file
region us-east-1 config-file ~/.aws/config
</pre></code>
In the above, profile ‐ The 1st line displays which profile you are using. In the “Value“ column of the 1st line (i.e for profile), it says ““, this indicates that currently you are connected to “default“ profile.
If you change the profile to “prod“, you'll see the “Value“ column of the 1st line will say “prod“ as shown below.
<code><pre>
$ export AWS_PROFILE=prod
$ aws configure list
Name Value Type Location
---- ----- ---- --------
profile prod manual --profile
</pre></code>
You can also pass the profile name to view profile information without changing your current profile as shown below.
<code><pre>
$ aws configure list --profile dev
</pre></code>
<h4>9. Change Default Config and Credentials FileName and Location</h4>
Instead of the default ~/.aws/config and ~/.aws/credentials, you can also use a different location and file name using the following environment variables:
<ul>
<li><b>AWS_SHARED_CREDENTIALS_FILE</b> ‐ Set this value to the filename that contains your AWS credentials</li>
<li><b>AWS_CONFIG_FILE</b> ‐ Set this value to the filename that contains your AWS profile config information</li>
</ul>
For example:
<code><pre>
export AWS_SHARED_CREDENTIALS_FILE=/var/tmp/mycredentials
export AWS_CONFIG_FILE=/var/tmp/myconfig
</pre></code>
Once you set the above values, all AWS CLI commands will start using profiles and corresponding credentials from the files in the above location:
<code><pre>
aws ec2 describe-volumes
aws ec2 describe-instances
aws s3 ls
..
</pre></code>
In the following output, the “Location“ column of the last line (region) indicates which config file it is using.
<code><pre>
$ aws configure list
Name Value Type Location
---- ----- ---- --------
profile None None
access_key ****************FFGG shared-credentials-file
secret_key ****************mmmn shared-credentials-file
region us-east-1 config-file /var/tmp/myconfig
</pre></code>
<h4>10. View a Specific Profile Parameter Value using get Option</h4>
If you want to just view one value from your config or credentials file, use the get option in the aws configure commands using the following syntax.
The get command is helpful if you are scripting something and want to get profile information inside your shell script.
<code><pre>
aws configure get varname [--profile profile-name]
</pre></code>
The following will only display the access_key_id of the current profile.
<code><pre>
$ aws configure get aws_access_key_id
AAABBBCCCDDDEEEFFFGG
</pre></code>
You can also use any one of the following:
<code><pre>
aws configure get aws_access_key_id
aws configure get aws_secret_access_key
aws configure get region
aws configure get output
</pre></code>
You can also specify the name of the profile as shown below:
<code><pre>
aws configure get dev.aws_secret_access_key
aws configure get prod.aws_secret_access_key
</pre></code>
<h4>11. Set a Specific Profile Parameter Value using set Option</h4>
Configure get and set commands can be helpful, if you are writing a shell script to manipulate the values of your config/credentials files.
Syntax:
<code><pre>
aws configure set varname value [--profile profile-name]
</pre></code>
You can just set a value of one specific parameter as shown below.
<code><pre>
$ aws configure set region us-east-2
</pre></code>
You can set the values of any of the following parameters:
<code><pre>
aws configure set aws_access_key_id NEWABBCCCDDDEEEFPNEW
aws configure set aws_secret_access_key newdbbcccdddeeefffggghhhiiijjjkkklllpnew
aws configure set region us-east-2
aws configure set output json
</pre></code>
You can also specify the name of the profile as shown below:
<code><pre>
aws configure set dev.region us-east-2
aws configure set prod.output json
</pre></code>
<h4>12. Add New Model using add-model Option</h4>
You can add models based on the information from a json file.
For example, if you have a AWS CLI version that doesn't have Amazon Polly, then you can reinstall the AWS CLI to get the polly.
Or, you can download polly's model file, and use the add-model option in aws configure as shown below.
<code><pre>
aws configure add-model --service-model file:///var/tmp/polly.json
</pre></code>
The above command will create ~/.aws/models directory and create the following sub-directory based on the information from the given json file.
<code><pre>
ls -l ~/.aws/models/polly/2016-06-10/service-2.json
</pre></code>
The following is the first few lines of the json file that was used in the above example.
<code><pre>
$ head -10 ~/.aws/models/polly/2016-06-10/service-2.json
{
"version":"2.0",
"metadata":{
"apiVersion":"2016-06-10",
"endpointPrefix":"polly",
"protocol":"rest-json",
"serviceFullName":"Amazon Polly",
"serviceId":"Polly",
"signatureVersion":"v4",
"uid":"polly-2016-06-10"
</pre></code>
The above file is the same as the one that we used during our add-model.
<code><pre>
diff -w ~/.aws/models/polly/2016-06-10/service-2.json /var/tmp/polly.json
</pre></code>
You can also specify a different service-name by passing the ‐‐service-name parameter as shown below.
<code><pre>
aws configure add-model --service-model file:///var/tmp/custom.json --service-name mycustom
</pre></code>
The above will create a sub-directory under ~/.aws/models with the service-name that you've specified as shown below.
<code><pre>
ls -l ~/.aws/models/mycustom/2016-06-10/service-2.json
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://www.thegeekstuff.com/2019/03/aws-configure-examples/" target=_blank>TheGeekStuff :: Amazon AWS configuration - Examples</a></li>
</ul>
</html>
<html>
<h3>Business Insider Deutschland :: Codename "Thor": Amazon tüftelt heimlich an einer Erfindung, die eine ganze Industrie verändern soll</h3>
Eugene Kim ‐ 23.09.2020
<p>
Der Onlineversandhändler Amazon entwickelt einen neuen Dienst, mit dem Daten aus großen Industrieanlagen überwacht werden können und der vorhersagen soll, wann Maschinen gewartet werden müssen. Diese Informationen erhielt Business Insider aus internen Dokumenten.
</p>
<p>
Beim Konzern trägt das Projekt den Codenamen "AWS Thor" in Anlehnung an Amazon Web Services und den nordischen Donnergott Thor. Der neue Service soll demnach Daten aus Industriegebäuden und Produktionsstätten sammeln und die Betriebseffizienz verbessern.
</p>
<p>
"Thor ist ein maschineller Lerndienst, der mithilfe von Temperatur-, Schall- und Vibrationsmessungen vorhersagt, wann eine Maschine wahrscheinlich gewartet werden muss, bevor ein Fehler auftritt", heißt es in den internen Dokumenten, die Business Insider vorliegen. "Dadurch önnen Kunden die Wartung besser planen und unerwartete Leistungsabfälle der Maschinen vermeiden."
</p>
<p>
Thor soll ab Oktober an den Start gehen. Der Name des Dienstes könnte sich bis dahin jedoch noch in "Monitron" ändern, heißt es im Umfeld des Projekts. Das Entwicklerteam befindet sich demnach in den Niederlanden. Swami Sivasubramanian, Vizepräsident für künstliche Intelligenz bei Amazon, überwacht das Projekt.
</p>
<p>
Auf eine Nachfrage von Business Insider zu den internen Dokumenten gab es von Amazon bisher keine Antwort.
</p>
<p>
Systeme, die eine Verbindung zwischen Maschinen und dem Internet herstellen, helfen beim Sammeln von Daten und analysieren die Produktionsleistung. Mit "SiteWise" hat Amazon im Juli bereits eine Cloud-Plattform vorgestellt, die genau in dieser Sparte agiert. Kunden sollen unter anderem bereits große deutsche Unternehmen wie Volkswagen und die Bayer AG sein.
</p>
<p>
Die Konzerne benötigen solche Systeme, um ihre Maschinen besser zu überwachen, Kosten zu sparen und die Effizienz zu verbessern. Bis 2025 soll dieser Branchenbereich Marktstudien zufolge 804 Milliarden Euro Wert sein und jedes Jahr um 30 Prozent wachsen. Eine Umfrage von Microsoft aus 2019 ergab, dass weltweit 80 Prozent der Unternehmen planen, die sogenannten IoT-Systeme ("Internet of Things") einzusetzen.
</p>
<h3>System nutzt "Vibrations- und Temperatursensoren"</h3>
<p>
Amazon hat den Dienst bereits in Schweden getestet und möchte ihn bald dem Markt vorstellen, heißt es aus den Unterlagen einer US-Behörde.
</p>
<p>
In den Unterlagen wird nicht genau ärt, wofür Thor eingesetzt werden soll. Es gibt jedoch Hinweise, dass der Dienst mit einem drahtlosen Überwachungsgerät kompatibel sein wird und in einer "industriellen Umgebung" verwendet werden soll. In den Tests wurde ein kleines drahtloses Gerät mit einer Größe von fünf mal zwei Zentimetern verwendet, das an Maschinen und äten angeschlossen werden kann, die in großen Einrichtungen verwendet werden.
</p>
<p>
Den Unterlagen zufolge wurden die Tests von einem schwedischen Funklabor durchgeführt. Das Gerät besteht aus einem Vibrations- und Temperatursensor, welche die Daten über Bluetooth übermitteln, heißt es weiter.
</p>
<p>
Matthew Caesar, Professor für Computerwissenschaften an der University of Illinois, sagte Business Insider, dass Dienste wie Thor im industriellen Überwachungsbereich immer gefragter werden. Viele Motorausfälle und andere mechanische Probleme können im Voraus erkannt werden, indem ihre Schwingungsmuster überwacht werden. Die Ausstattung mit Sensoren kann daher zur Verbesserung der Fertigungszeit in den Fabriken beitragen. "Wäre es nicht fantastisch, Fehler zu erkennen, bevor sie geschehen?", schwärmt Caesar.
Amazon könnte Dienst selber einsetzen
</p>
<p>
Der Einstieg von Amazon in den Sektor liegt nahe. Das Wachstum vom eigenen Cloud-Computing-Anbieter Amazon Web Services sinkt und lag im letzten Quartal bei einem Rekordtief von 29 Prozent. Durch den Einstieg in das "IoT"-Geschäft winken in den nächsten Jahren riesige Umsätze.
</p>
<p>
Vielmehr noch können Dienste wie Thor dem Unternehmen selber die Arbeit erleichtern, berichtet Caesar. Thor könnte in den Rechenzentren von Amazon eingesetzt werden, um die Heizungs-, Lüftungs- und Klimaanlagen zu überwachen. Auch das würde dazu beitragen, die Server effizienter und kostengünstiger zu betreiben.
</p>
<p>
Im Januar gab Amazon bekannt, dass es erwartet, in diesem Jahr Serverkosten in Höhe von 2,3 Milliarden US-Dollar einzusparen, da die Effizienz in seinen Rechenzentren verbessert wird.
</p>
<p>
Dieser Artikel wurde von Klemens Handke aus dem Englischen übersetzt. Das Original findet ihr <a href="https://www.businessinsider.com/amazon-working-on-aws-thor-a-new-industrial-monitoring-service-2020-9?r=DE&IR=T" target=_blank>hier</a>.
</p>
<h3>Links:</h3>
<ul>
<li><a href="https://www.msn.com/de-de/finanzen/top-stories/codename-thor-amazon-tüftelt-heimlich-an-einer-erfindung-die-eine-ganze-industrie-verändern-soll/ar-BB19kPEx" target=_blank>MSN ‐ Finanzen :: Amazon Thor</a></li>
</ul>
</html>
<html>
<h3>100‐continue</h3>
A method that gives a client the ability to see whether a server can<br />
accept a request before actually sending it. For large PUT requests,<br />
this method can save both time and bandwidth charges.<br />
<br />
<h3>Links:</h3>
<ul>
<li><a href="https://docs.aws.amazon.com/general/latest/gr/glos-chap.html" target="_blank" rel="noreferrer noopener">
AWS glossary</li>
</ul>
</html>
<html>
<p>
Apart from the default route table that gets created when you create a transit gateway, you can also create additional route tables. This helps you to associate a specific attachment with a specific route table. The attachments can propagate their routes to one or more route tables. You can also add static routes to the route tables.
</p>
<p>
To view whether your transit gateway has a default route table associate with it, use the following command.
</p>
<p>
In the following output, the DefaultRouteTableAssociation is set to enable which indicates a default route table is associated with this transit gateway.
</p>
<p>
The AssociationDefaultRouteTableId and PropagationDefaultRouteTableId has the same tgw-rtb- values indicating that the default route table is used for both default association and propagation.
<code><pre>
$ TGW_ID=tgw-11112222333344444
$ aws ec2 describe-transit-gateways --transit-gateway-ids ${TGW_ID}
{
"TransitGateways": [
{
"TransitGatewayId": "tgw-11112222333344444",
..
"Options": {
"AmazonSideAsn": 64512,
"AutoAcceptSharedAttachments": "disable",
"DefaultRouteTableAssociation": "enable",
"AssociationDefaultRouteTableId": "tgw-rtb-aaaabbbbccccdddee",
"DefaultRouteTablePropagation": "enable",
"PropagationDefaultRouteTableId": "tgw-rtb-aaaabbbbccccdddee",
..
]
}
</pre></code>
</p>
If you are new to AWS Transit Gateway refer to this to understand how to manage both transit gateway and attachments: <a href="" target=_blank>24 Examples to Manage AWS Transit Gateway and Attachments from CLI</a>.
<h2>1. Create Transit Gateway Route Table with Default Values</h2>
When you create a custom transit gateway route table, you have to specify for which transit gateway you are creating this route table.
The following example creates a new TGW route table.
<code><pre>
TGW_ID=tgw-11112222333344444
aws ec2 create-transit-gateway-route-table --transit-gateway-id ${TGW_ID}
</pre></code>
The route table that we created above will have default association and propogation set to false. As you notice from the output below, the default association and propagation is set to false for this new custom route table.
<code><pre>
{
"TransitGatewayRouteTable": {
"TransitGatewayRouteTableId": "tgw-rtb-11112222333344455",
"TransitGatewayId": "tgw-11112222333344444",
"State": "pending",
"DefaultAssociationRouteTable": false,
"DefaultPropagationRouteTable": false,
"CreationTime": "2020-10-03T19:58:33+00:00"
}
}
</pre></code>
<h2>2. Create Transit Gateway Route Table with Tags</h2>
When creating a TGW route table, you can add tags using the tag-specifications as shown below. In this example, the value “DevTGWForOnPrem“ is assigned to the Name tag.
<code><pre>
TGW_ID=tgw-11112222333344444
aws ec2 create-transit-gateway-route-table \
--transit-gateway-id ${TGW_ID} \
--tag-specifications "ResourceType=transit-gateway-route-table,Tags=[{Key=Name,Value=DevTGWForOnPrem}]"
</pre></code>
The output of this command will also reflect the tags that we provided.
<code><pre>
{
"TransitGatewayRouteTable": {
"TransitGatewayRouteTableId": "tgw-rtb-00011122233344455",
"TransitGatewayId": "tgw-11112222333344444",
"State": "pending",
"DefaultAssociationRouteTable": false,
"DefaultPropagationRouteTable": false,
"CreationTime": "2020-10-03T20:06:25+00:00",
"Tags": [
{
"Key": "Name",
"Value": "DevTGWForOnPrem"
}
]
}
}
</pre></code>
<h2>3. View all Transit Gateway Route Tables</h2>
The following command will display all Transit Gateway route tables.
As you notice from the following output, it displays the default route table and the custom route table that we created.
<code><pre>
$ aws ec2 describe-transit-gateway-route-tables
{
"TransitGatewayRouteTables": [
{
"TransitGatewayRouteTableId": "tgw-rtb-11112222333344455",
"TransitGatewayId": "tgw-11112222333344444",
"State": "available",
"DefaultAssociationRouteTable": false,
"DefaultPropagationRouteTable": false,
"CreationTime": "2020-10-03T19:58:33+00:00",
"Tags": []
},
{
"TransitGatewayRouteTableId": "tgw-rtb-00011122233344455",
"TransitGatewayId": "tgw-11112222333344444",
"State": "pending",
"DefaultAssociationRouteTable": false,
"DefaultPropagationRouteTable": false,
"CreationTime": "2020-10-03T20:06:25+00:00",
"Tags": [
{
"Key": "Name",
"Value": "DevTGWForOnPrem"
}
]
}
]
}
</pre></code>
You can also view the details of a specific route table by passing the route table id as shown below.
<code><pre>
TGW_RT_ID=tgw-rtb-00011122233344455
aws ec2 describe-transit-gateway-route-tables \
--transit-gateway-route-table-ids ${TGW_RT_ID}
</pre></code>
<h2>4. Delete Transit Gateway Route Table</h2>
To delete a transit gateway route table use the following command and specify the route table id.
<code><pre>
TGW_RT_ID=tgw-rtb-00011122233344455
aws ec2 delete-transit-gateway-route-table \
--transit-gateway-route-table-id ${TGW_RT_ID}
</pre></code>
The output of the above command shows the State as deleting. After few seconds the describe-transit-gateway-route-tables will not display this route table anymore.
<code><pre>
{
"TransitGatewayRouteTable": {
"TransitGatewayRouteTableId": "tgw-rtb-00011122233344455",
"TransitGatewayId": "tgw-11112222333344444",
"State": "deleting",
"DefaultAssociationRouteTable": false,
"DefaultPropagationRouteTable": false,
"CreationTime": "2020-10-03T20:06:25+00:00"
}
}
</pre></code>
If you don't delete the associations first, you'll get the following error message:
<code><pre>
An error occurred (IncorrectState) when calling the DeleteTransitGatewayRouteTable operation: tgw-rtb-00011122233344455 has associated attachments
</pre></code>
As explained in one of the examples below, make sure to disassociate all attachments as before deleting route table.
<h2>5. Associate Transit Gateway Route Table to an Attachment</h2>
Once a route table is created, you can associate an existing transit gateway attachment to the route table using the following command. For this, you have to specify both the route table id and the attachment id.
<code><pre>
TGW_RT_ID=tgw-rtb-00011122233344455
TGW_ATTACHMENT_ID=tgw-attach-00011122233344aaa
aws ec2 associate-transit-gateway-route-table \
--transit-gateway-route-table-id ${TGW_RT_ID} \
--transit-gateway-attachment-id ${TGW_ATTACHMENT_ID}
</pre></code>
The output of the above command shows the State as associating. After few seconds, describe-transit-gateway-attachments will display the State as associated.
<code><pre>
{
"Association": {
"TransitGatewayRouteTableId": "tgw-rtb-00011122233344455",
"TransitGatewayAttachmentId": "tgw-attach-00011122233344aaa",
"ResourceId": "vpc-11122233344455566",
"ResourceType": "vpc",
"State": "associating"
}
}
</pre></code>
You should first disassociate an existing route table from the attachment before attaching a new one. If not, you'll get the following error message:
<code><pre>
An error occurred (Resource.AlreadyAssociated) when calling the AssociateTransitGatewayRouteTable operation: Transit Gateway Attachment tgw-attach-00011122233344aaa is already associated to a route table.
</pre></code>
<h2>6. Disassociate Transit Gateway Route Table from an Attachment</h2>
When you do describe-transit-gateway-attachments, the output will have “Association“ section that will have TransitGatewayRouteTableId indicating that this attachment is associated to a route table as shown below.
<code><pre>
$ TGW_ATTACHMENT_ID=tgw-attach-00011122233344aaa
$ aws ec2 describe-transit-gateway-attachments \
--transit-gateway-attachment-ids ${TGW_ATTACHMENT_ID}
{
"TransitGatewayAttachments": [
{
"TransitGatewayAttachmentId": "tgw-attach-00011122233344aaa",
"TransitGatewayId": "tgw-111222333444aaabb",
..
..
"Association": {
"TransitGatewayRouteTableId": "tgw-rtb-00011122233344455",
"State": "associated"
},
..
}
]
}
</pre></code>
The followig command will disassociate the given route table from the attachment.
<code><pre>
TGW_RT_ID=tgw-rtb-00011122233344455
TGW_ATTACHMENT_ID=tgw-attach-00011122233344aaa
aws ec2 disassociate-transit-gateway-route-table \
--transit-gateway-route-table-id ${TGW_RT_ID} \
--transit-gateway-attachment-id ${TGW_ATTACHMENT_ID}
</pre></code>
The output shows the State as disassociating.
<code><pre>
{
"Association": {
"TransitGatewayRouteTableId": "tgw-rtb-00011122233344455",
"TransitGatewayAttachmentId": "tgw-attach-00011122233344aaa",
"ResourceId": "vpc-11122233344455566",
"ResourceType": "vpc",
"State": "disassociating"
}
}
</pre></code>
Once the route table is disassociate as shown below, you'll not see the “Association“ section or the TransitGatewayRouteTableId in the output anymore.
<code><pre>
$ aws ec2 describe-transit-gateway-attachments \
--transit-gateway-attachment-ids ${TGW_ATTACHMENT_ID}
{
"TransitGatewayAttachments": [
{
"TransitGatewayAttachmentId": "tgw-attach-00011122233344aaa",
"TransitGatewayId": "tgw-111222333444aaabb",
"TransitGatewayOwnerId": "111111111111",
"ResourceOwnerId": "111111111111",
"ResourceType": "vpc",
"ResourceId": "vpc-11122233344455566",
"State": "available",
"CreationTime": "2020-10-03T20:35:59+00:00",
"Tags": [
{
"Key": "Name",
"Value": "LearningTGWAttachmentPublic"
}
]
}
]
}
</pre></code>
<h2>7. View Route Table Propagations</h2>
To view the route table propagations of a specific route table, execute the following command.
<code><pre>
TGW_RT_ID=tgw-rtb-00011122233344455
aws ec2 get-transit-gateway-route-table-propagations \
--transit-gateway-route-table-id ${TGW_RT_ID}
</pre></code>
The following output indicates that the the route table propagation for the VPC transit gateway attachment.
<code><pre>
{
"TransitGatewayRouteTablePropagations": [
{
"TransitGatewayAttachmentId": "tgw-attach-00011122233344aaa",
"ResourceId": "vpc-11122233344455566",
"ResourceType": "vpc",
"State": "enabled"
}
]
}
</pre></code>
If there is no route table propogations, you'll not see any entries in the output as shown below.
<code><pre>
TGW_RT_ID=tgw-rtb-00011122233344455
aws ec2 get-transit-gateway-route-table-propagations \
--transit-gateway-route-table-id ${TGW_RT_ID}
{
"TransitGatewayRouteTablePropagations": []
}
</pre></code>
<h2>8. Disable Route Propagation from a Route Table</h2>
If you want to disable the route table propagation for a specific route table, then execute the following command. This will remove a propagated route from a route table attachment.
While disabling route propagation, you should also specify for which specific attachment you like to disable the propagation as shown below.
<code><pre>
TGW_RT_ID=tgw-rtb-00011122233344455
TGW_ATTACHMENT_ID=tgw-attach-00011122233344aaa
aws ec2 disable-transit-gateway-route-table-propagation \
--transit-gateway-route-table-id ${TGW_RT_ID} \
--transit-gateway-attachment-id ${TGW_ATTACHMENT_ID}
</pre></code>
The following output indicates that route table propagation is in disabled State for given VPC attachment.
<code><pre>
{
"Propagation": {
"TransitGatewayAttachmentId": "tgw-attach-00011122233344aaa",
"ResourceId": "vpc-11122233344455566",
"ResourceType": "vpc",
"TransitGatewayRouteTableId": "tgw-rtb-00011122233344455",
"State": "disabled"
}
}
</pre></code>
<h2>9. Enable Route Propagation on a Route Table</h2>
While enabling route propagation, you should also specify for which specific attachment you like to enable the propagation as shown below. The idea here is that you are using route propagation to add route from your route table to a given attachment.
<code><pre>
TGW_RT_ID=tgw-rtb-00011122233344455
TGW_ATTACHMENT_ID=tgw-attach-00011122233344aaa
aws ec2 enable-transit-gateway-route-table-propagation \
--transit-gateway-route-table-id ${TGW_RT_ID} \
--transit-gateway-attachment-id ${TGW_ATTACHMENT_ID}
</pre></code>
The following output indicates that route table propagation is in enabled State for given VPC attachment.
<code><pre>
{
"Propagation": {
"TransitGatewayAttachmentId": "tgw-attach-00011122233344aaa",
"ResourceId": "vpc-11122233344455566",
"ResourceType": "vpc",
"TransitGatewayRouteTableId": "tgw-rtb-00011122233344455",
"State": "enabled"
}
}
</pre></code>
If you didn't disable the propagation of the existing RT, you'll get the following error message:
<code><pre>
An error occurred (TransitGatewayRouteTablePropagation.Duplicate) when calling the EnableTransitGatewayRouteTablePropagation operation: Propagation tgw-attach-00011122233344aaa already exists in Transit Gateway Route Table tgw-rtb-00011122233344455.
</pre></code>
<h2>10. Create Static Route for a Transit Gateway Route Table Attachment</h2>
For a given attachment you can create a static route to a specific CIDR block as shown below.
You can use the same command to also create a blackhole route to drop the traffic matching the given CIDR block.
<code><pre>
CIDR="192.168.0.0/32"
TGW_RT_ID=tgw-rtb-00011122233344455
TGW_ATTACHMENT_ID=tgw-attach-00011122233344aaa
aws ec2 create-transit-gateway-route \
--destination-cidr-block ${CIDR} \
--transit-gateway-route-table-id ${TGW_RT_ID} \
--transit-gateway-attachment-id ${TGW_ATTACHMENT_ID}
</pre></code>
The following output displays the static route that we just added with the State active.
<code><pre>
{
"Route": {
"DestinationCidrBlock": "192.168.0.0/32",
"TransitGatewayAttachments": [
{
"ResourceId": "vpc-11122233344455566",
"TransitGatewayAttachmentId": "tgw-attach-00011122233344aaa",
"ResourceType": "vpc"
}
],
"Type": "static",
"State": "active"
}
}
</pre></code>
If you don't specify the transit gateway attachment id in the above command, you'll get the following error message:
<code><pre>
An error occurred (MissingParameter) when calling the CreateTransitGatewayRoute operation: The request must contain exactly one of Blackhole, TransitGatewayAttachmentId, or VpnConnectionId
</pre></code>
<h2>11. Delete Static Route from a Transit Gateway Route Table</h2>
To delete a previously added static route, use the following command and specify the CIDR block and the route table id.
<code><pre>
CIDR="192.168.0.0/32"
TGW_RT_ID=tgw-rtb-00011122233344455
aws ec2 delete-transit-gateway-route \
--transit-gateway-route-table-id ${TGW_RT_ID} \
--destination-cidr-block ${CIDR}
</pre></code>
The following output displays the State as deleted indicating that the given static route is successfully deleted from the route table.
<code><pre>
{
"Route": {
"DestinationCidrBlock": "192.168.0.0/32",
"TransitGatewayAttachments": [
{
"ResourceId": "vpc-11122233344455566",
"TransitGatewayAttachmentId": "tgw-attach-00011122233344aaa",
"ResourceType": "vpc"
}
],
"Type": "static",
"State": "deleted"
}
}
</pre></code>
If the route doesn't exist, you'll get this error message:
<code><pre>
An error occurred (InvalidRoute.NotFound) when calling the DeleteTransitGatewayRoute operation: Route 192.168.0.0/32 does not exists in Transit Gateway Route Table tgw-rtb-00011122233344455.
</pre></code>
<h2>12. Export Route Tables to S3 Bucket in JSON format</h2>
When you have multiple static routes on your route table, you can export them as a JSON file and store it in an S3 bucket. This can be done as a way to backup the static routes.
<code><pre>
TGW_RT_ID=tgw-rtb-00011122233344455
S3_BUCKET=tgs-tgw-backup
aws ec2 export-transit-gateway-routes \
--transit-gateway-route-table-id ${TGW_RT_ID} \
--s3-bucket ${S3_BUCKET}
</pre></code>
The output display the full folder structure and the export file name that was created by the above command under the given S3 bucket.
<code><pre>
{
"S3Location": "s3://tgs-tgw-backup/VPCTransitGateway/TransitGatewayRouteTables/111111111111_us-east-1_tgw-rtb-00011122233344455_2020-10-03T21-12-06.json"
}
</pre></code>
The following is an example of the above JSON export file content.
<code><pre>
{
"routes": [
{
"destinationCidrBlock": "10.0.0.0/20",
"transitGatewayAttachments": [
{
"resourceId": "vpc-11122233344455566",
"transitGatewayAttachmentId": "tgw-attach-00011122233344aaa",
"resourceType": "vpc"
}
],
"type": "propagated",
"state": "active"
}
]
}
</pre></code>
<h2>Links:</h2>
<ul>
<li><a href="https://www.thegeekstuff.com/2020/10/aws-transit-gateway-route-table-cli/" target=_blank>The Geek Stuff :: 12 Examples to Manage AWS Transit Gateway Route Table from CLI</a></li>
</ul>
</html>
<html>
<h3>13 Examples to Manage S3 Bucket Replication Rules using AWS CLI</h3>
Using S3 replication, you can setup automatic replication of S3 objects from one bucket to another. The source and destination bucket can be within the same AWS account or in different accounts. You can also replicate objects from one source bucket to multiple destination buckets.
If you want to have a second copy of your objects in a different AWS region, you can create a replication rule to perform cross region replication of S3 objects.
This tutorial has the following examples on how to setup and manage replication rules on S3 bucket using AWS s3api CLI:
<ol>
<li>View Current Replication Rules on a S3 Bucket</li>
<li>Delete All Replication Rules from a S3 Bucket</li>
<li>Add New Replication Rule on a S3 Bucket with Default Values</li>
<li>Replication Rule with Custom Rule Name</li>
<li>Replication Rule with a specific S3 Object Prefix Value</li>
<li>Replication Rule based on S3 Object Tag Value</li>
<li>Replication Rule based on both S3 Object Prefix AND Object Tag Values</li>
<li>Disable an Existing Replication Rule on a S3 Bucket</li>
<li>Replication Rule to Replicate S3 KMS Encrypted Objects</li>
<li>Replication Rule with a Different Storage Class on Destination</li>
<li>Replication Rule for Cross Account (and Cross Region) S3 Buckets</li>
<li>Replication Rule with RTC Enabled</li>
<li>Replication Rule Combined with everything from above (Cross Region, Cross Account, Encryption, Tags/Prefix, RTC)</li>
</ol>
<ol>
<li><h3>View Current Replication Rules on a S3 Bucket</h3>
If you a new to managing S3 from AWS CLI, refer to this: 28 Essential AWS S3 CLI Command Examples to Manage Buckets and Objects
For all replication related activities, we'll be using s3api command in the AWS CLI.
Before we get stated, to view all existing replications rules on a S3 bucket, use s3api get-bucket-replication option as shown below.
As the following output shows, this bucket already has few replications rules setup on it.
<code><pre>
$ aws s3api get-bucket-replication --bucket thegeekstuff-source
{
"ReplicationConfiguration": {
"Role": "arn:aws:iam::111111111111:role/service-role/s3crr_role_for_thegeekstuff-source_to_backup-dest",
"Rules": [
{
"ID": "thegeekstuff-replication-with-kms",
"Priority": 3,
"Filter": {},
"Status": "Enabled",
"SourceSelectionCriteria": {
"SseKmsEncryptedObjects": {
"Status": "Enabled"
}
},
"Destination": {
"Bucket": "arn:aws:s3:::thegeekstuff-dest",
"EncryptionConfiguration": {
"ReplicaKmsKeyID": "arn:aws:kms:us-west-2:111111111111:key/22222222-dddd-4444-aaaa-555555555555"
}
},
"DeleteMarkerReplication": {
"Status": "Disabled"
}
},
{
"ID": "thegeekstuff-backup-replication",
"Priority": 2,
"Filter": {},
"Status": "Enabled",
"Destination": {
"Bucket": "arn:aws:s3:::thegeekstuff-dest"
},
"DeleteMarkerReplication": {
"Status": "Disabled"
}
},
{
"ID": "thegeekstuff-replication",
"Priority": 1,
"Filter": {},
"Status": "Enabled",
"Destination": {
"Bucket": "arn:aws:s3:::thegeekstuff-dest"
},
"DeleteMarkerReplication": {
"Status": "Disabled"
}
}
]
}
}
</pre></code>
If you don't have any replication rules on your bucket, you'll get the following message.
<code><pre>
$ aws s3api get-bucket-replication --bucket thegeekstuff-source
</pre></code>
An error occurred (ReplicationConfigurationNotFoundError) when calling the GetBucketReplication operation: The replication configuration was not found
If you don't specify a bucket name in the CLI, you'll get this: aws: error: the following arguments are required: --bucket
</li>
<li><h3>Delete All Replication Rules from a S3 Bucket</h3>
For this example, let us delete all the existing replication rules and start clean. Use s3api delete-bucket-replication option to delete all existing replication rules from a S3 bucket.
aws s3api delete-bucket-replication --bucket thegeekstuff-source
Verify that all the existing replication rules are deleted as shown below.
aws s3api get-bucket-replication --bucket thegeekstuff-source
An error occurred (ReplicationConfigurationNotFoundError) when calling the GetBucketReplication operation: The replication configuration was not found
</li>
<li><h3>Add New Replication Rule on a S3 Bucket with Default Values</li>
To add a new replication rule, first create a replication json file that contains the details about the replication as shown below.
<code><pre>
$ cat /project/rep3.json
{
"Role": "arn:aws:iam::111111111111:role/service-role/s3crr_role_for_thegeekstuff-source_to_thegeekstuff-dest",
"Rules": [
{
"Status": "Enabled",
"Priority": 1,
"DeleteMarkerReplication": { "Status": "Disabled" },
"Filter" : { "Prefix": ""},
"Destination": {
"Bucket": "arn:aws:s3:::thegeekstuff-dest"
}
}
]
}
</pre></code>
In the above, the Role contains the ARN of the IAM role that S3 can assume to replicate objects on your behalf. If you've setup a replication rule from the console before, you should already have this role created for you, and you can reuse that role here.
In the Rules section, make sure to specify the ARN for the destination S3 bucket.
Once the replication JSON file is ready, use the s3api put-bucket-replication option as shown below to create the replication rule on your source S3 bucket.
<code><pre>
aws s3api put-bucket-replication --bucket thegeekstuff-source \
--replication-configuration file:///project/rep3.json
</pre></code>
Verify that the replication rule is created successfully as shown below.
<code><pre>
$ aws s3api get-bucket-replication --bucket thegeekstuff-source
{
"ReplicationConfiguration": {
"Role": "arn:aws:iam::111111111111:role/service-role/s3crr_role_for_thegeekstuff-source_to_thegeekstuff-dest",
"Rules": [
{
"ID": "YYYYYY22222MMMMMMMMzzzzzllllllccccccttttttZZZZZx",
"Priority": 1,
"Filter": {
"Prefix": ""
},
"Status": "Enabled",
"Destination": {
"Bucket": "arn:aws:s3:::thegeekstuff-dest"
},
"DeleteMarkerReplication": {
"Status": "Disabled"
}
}
]
}
}
</pre></code>
</li>
<li><h3>Replication Rule with Custom Rule Name</h3>
In the above output, the ID field is what will be displayed as “Rule Name“ in the S3 console. If you don't specify a rule name in the json file, you'll get a random very long ID assigned as “Rule Name“.
To specify your own custom rule name while creating a replication rule, use the “ID“ field in the json file as shown below to use your custom name.
<code><pre>
$ cat rep4.json
{
"Role": "arn:aws:iam::111111111111:role/service-role/s3crr_role_for_thegeekstuff-source_to_thegeekstuff-dest",
"Rules": [
{
"ID": "thegeekstuff-dev-to-prod-rule1",
"Status": "Enabled",
"Priority": 1,
"DeleteMarkerReplication": { "Status": "Disabled" },
"Filter" : { "Prefix": ""},
"Destination": {
"Bucket": "arn:aws:s3:::thegeekstuff-dest"
}
}
]
}
</pre></code>
Create the rule with the custom rule name using s3api put-bucket-replication option.
<code><pre>
aws s3api put-bucket-replication --bucket thegeekstuff-source \
--replication-configuration file:///project/rep4.json
</pre></code>
As you see from the following output, the “ID“ has the custom rule name now.
<code><pre>
$ aws s3api get-bucket-replication --bucket thegeekstuff-source
{
"ReplicationConfiguration": {
"Role": "arn:aws:iam::111111111111:role/service-role/s3crr_role_for_thegeekstuff-source_to_thegeekstuff-dest",
"Rules": [
{
"ID": "thegeekstuff-dev-to-prod-rule1",
"Priority": 1,
"Filter": {
"Prefix": ""
},
"Status": "Enabled",
"Destination": {
"Bucket": "arn:aws:s3:::thegeekstuff-dest"
},
"DeleteMarkerReplication": {
"Status": "Disabled"
}
}
]
}
}
</pre></code>
</li>
<li><h3>Replication Rule with a specific S3 Object Prefix Value</h3>
Sometimes you might not want to replicate all the objects from source S3 bucket to destination bucket.
In that case, you can selectively replicate objects using their prefix values.
For this, in the JSON file, use the “Filter“ field to specify the Prefix as shown below.
<code><pre>
$ cat rep5.json
{
"Role": "arn:aws:iam::111111111111:role/service-role/s3crr_role_for_thegeekstuff-source_to_thegeekstuff-dest",
"Rules": [
{
"ID": "thegeekstuff-dev-to-prod-rule1",
"Status": "Enabled",
"Priority": 1,
"DeleteMarkerReplication": { "Status": "Disabled" },
"Filter" : { "Prefix": "project/data1/"},
"Destination": {
"Bucket": "arn:aws:s3:::thegeekstuff-dest"
}
}
]
}
</pre></code>
The following example will replicate only the S3 objects matching project/data1/ prefix from source to destination.
<code><pre>
aws s3api put-bucket-replication --bucket thegeekstuff-source \
--replication-configuration file:///project/rep5.json
</pre></code>
Once the replication rule is created, verify that the rule has the prefix filter that you specified in the JSON file as shown below.
<code><pre>
$ aws s3api get-bucket-replication --bucket thegeekstuff-source
{
"ReplicationConfiguration": {
"Role": "arn:aws:iam::111111111111:role/service-role/s3crr_role_for_thegeekstuff-source_to_thegeekstuff-dest",
"Rules": [
{
"ID": "thegeekstuff-dev-to-prod-rule1",
"Priority": 1,
"Filter": {
"Prefix": "project/data1/"
},
"Status": "Enabled",
"Destination": {
"Bucket": "arn:aws:s3:::thegeekstuff-dest"
},
"DeleteMarkerReplication": {
"Status": "Disabled"
}
}
]
}
}
</pre></code>
</li>
<li><h3>Replication Rule based on S3 Object Tag Value</h3>
Sometimes you may want to replicate objects not based on prefix, but based on the Tags attached to it.
For this, in the “Filter“ field in JSON objects, specify one or more Tags as shown below.
<code><pre>
$ cat rep6.json
{
"Role": "arn:aws:iam::111111111111:role/service-role/s3crr_role_for_thegeekstuff-source_to_thegeekstuff-dest",
"Rules": [
{
"ID": "thegeekstuff-dev-to-prod-rule1",
"Status": "Enabled",
"Priority": 1,
"DeleteMarkerReplication": { "Status": "Disabled" },
"Filter" : { "Tag": { "Key": "Name", "Value": "Development" } },
"Destination": {
"Bucket": "arn:aws:s3:::thegeekstuff-dest"
}
}
]
}
</pre></code>
The following will create a replication rule to replicate only the S3 objects that has the value for the Tag “Name“ as “Development“.
<code><pre>
aws s3api put-bucket-replication --bucket thegeekstuff-source \
--replication-configuration file:///project/rep6.json
</pre></code>
Once the replication rule is created, verify that the rule has the filter with the Tags that you specified as shown below.
<code><pre>
$ aws s3api get-bucket-replication --bucket thegeekstuff-source
{
"ReplicationConfiguration": {
"Role": "arn:aws:iam::111111111111:role/service-role/s3crr_role_for_thegeekstuff-source_to_thegeekstuff-dest",
"Rules": [
{
"ID": "thegeekstuff-dev-to-prod-rule1",
"Priority": 1,
"Filter": {
"Tag": {
"Key": "Name",
"Value": "Development"
}
},
"Status": "Enabled",
"Destination": {
"Bucket": "arn:aws:s3:::thegeekstuff-dest"
},
"DeleteMarkerReplication": {
"Status": "Disabled"
}
}
]
}
}
</pre></code>
</li>
<li><h3>Replication Rule based on both S3 Object Prefix AND Object Tag Values</h3>
You can also combine both Prefix and Tag filters by using “And“ inside the “Filter“ field in your JSON file.
<code><pre>
$ cat rep7.json
{
"Role": "arn:aws:iam::111111111111:role/service-role/s3crr_role_for_thegeekstuff-source_to_thegeekstuff-dest",
"Rules": [
{
"ID": "thegeekstuff-dev-to-prod-rule1",
"Status": "Enabled",
"Priority": 1,
"DeleteMarkerReplication": { "Status": "Disabled" },
"Filter" : {
"And": {
"Prefix": "data/production",
"Tags": [
{
"Key": "Name",
"Value": "Development"
}
]
}
},
"Destination": {
"Bucket": "arn:aws:s3:::thegeekstuff-dest"
}
}
]
}
</pre></code>
The following will create a replication rule to replicate only the S3 objects that has both the prefix “data/production“ and the value for the Tag “Name“ is “Development“.
<code><pre>
aws s3api put-bucket-replication --bucket thegeekstuff-source \
--replication-configuration file:///project/rep7.json
</pre></code>
Once the replication rule is created, verify that the rule has the combination filter with both the Prefix the Tags that you specified as shown below.
<code><pre>
$ aws s3api get-bucket-replication --bucket thegeekstuff-source
{
"ReplicationConfiguration": {
"Role": "arn:aws:iam::111111111111:role/service-role/s3crr_role_for_thegeekstuff-source_to_thegeekstuff-dest",
"Rules": [
{
"ID": "thegeekstuff-dev-to-prod-rule1",
"Priority": 1,
"Filter": {
"And": {
"Prefix": "data/production",
"Tags": [
{
"Key": "Name",
"Value": "Development"
}
]
}
},
"Status": "Enabled",
"Destination": {
"Bucket": "arn:aws:s3:::thegeekstuff-dest"
},
"DeleteMarkerReplication": {
"Status": "Disabled"
}
}
]
}
}
</pre></code>
</li>
<li><h3>Disable an Existing Replication Rule on a S3 Bucket</h3>
Instead of deleting a replication rule, you can also temporarily disable it by setting the “Status“ field as “Disabled“ in your JSON file as shown below.
<code><pre>
$ cat rep8.json
{
"Role": "arn:aws:iam::111111111111:role/service-role/s3crr_role_for_thegeekstuff-source_to_thegeekstuff-dest",
"Rules": [
{
"ID": "thegeekstuff-dev-to-prod-rule1",
"Status": "Disabled",
"Priority": 1,
"DeleteMarkerReplication": { "Status": "Disabled" },
"Filter" : { "Prefix": ""},
"Destination": {
"Bucket": "arn:aws:s3:::thegeekstuff-dest"
}
}
]
}
</pre></code>
The following command will disable the existing replication rule.
<code><pre>
aws s3api put-bucket-replication --bucket thegeekstuff-source \
--replication-configuration file:///project/rep8.json
</pre></code>
Verify that the rule is disabled as shown below.
<code><pre>
$ aws s3api get-bucket-replication --bucket thegeekstuff-source
{
"ReplicationConfiguration": {
"Role": "arn:aws:iam::111111111111:role/service-role/s3crr_role_for_thegeekstuff-source_to_thegeekstuff-dest",
"Rules": [
{
"ID": "thegeekstuff-dev-to-prod-rule1",
"Priority": 1,
"Filter": {
"Prefix": ""
},
"Status": "Disabled",
"Destination": {
"Bucket": "arn:aws:s3:::thegeekstuff-dest"
},
"DeleteMarkerReplication": {
"Status": "Disabled"
}
}
]
}
}
</pre></code>
</li>
<li><h3>Replication Rule to Replicate S3 KMS Encrypted Objects</h3>
When you are replicating S3 objects that are encrypted with KMS, you should specify the “SseKmsEncryptedObjects“ for the source with status as enabled, and for the destination specify the ReplicaKmsKeyID as shown in the following JSON file.
<code><pre>
$ cat rep9.json
{
"Role": "arn:aws:iam::111111111111:role/service-role/s3crr_role_for_thegeekstuff-source_to_thegeekstuff-dest",
"Rules": [
{
"ID": "thegeekstuff-dev-to-prod-rule1",
"Status": "Enabled",
"Priority": 1,
"DeleteMarkerReplication": { "Status": "Disabled" },
"Filter" : { "Prefix": "project/data1/"},
"SourceSelectionCriteria": {
"SseKmsEncryptedObjects": {
"Status": "Enabled"
}
},
"Destination": {
"Bucket": "arn:aws:s3:::thegeekstuff-dest",
"EncryptionConfiguration": {
"ReplicaKmsKeyID": "arn:aws:kms:us-west-2:111111111111:key/22222222-dddd-4444-aaaa-555555555555"
}
}
}
]
}
</pre></code>
The following will replicate the S3 objects that are encrypted using KMS keys from source to destination bucket as specified in the JSON file above.
<code><pre>
aws s3api put-bucket-replication --bucket thegeekstuff-source \
--replication-configuration file:///project/rep9.json
</pre></code>
When you specify the SseKmsEncryptedObjects for source, but don't specify the ReplicaKmsKeyID for the destination bucket, you'll get this error: An error occurred (InvalidRequest) when calling the PutBucketReplication operation: ReplicaKmsKeyID must be specified if SseKmsEncryptedObjects tag is present.
If the KMS key you specify doesn't exist, you'll get this error: An error occurred (InvalidArgument) when calling the PutBucketReplication operation: Invalid ReplicaKmsKeyID ARN.
</li>
<li><h3>Replication Rule with a Different Storage Class on Destination</h3>
While replicating objects from one bucket to another, you can also change the storage class on the destination S3 bucket. This is very helpful when you are replicating object to a bucket in a different region for DR purpose.
In the following example, the source bucket is on standard S3 storage class, but while replicating to the destination bucket, we are storing the object at the destination in S3 Standard-Infrequent Access storage class.
<code><pre>
$ cat rep10.json
{
"Role": "arn:aws:iam::111111111111:role/service-role/s3crr_role_for_thegeekstuff-source_to_thegeekstuff-dest",
"Rules": [
{
"ID": "thegeekstuff-dev-to-prod-rule1",
"Status": "Enabled",
"Priority": 1,
"DeleteMarkerReplication": { "Status": "Disabled" },
"Filter" : { "Prefix": "project/data1/"},
"Destination": {
"Bucket": "arn:aws:s3:::thegeekstuff-dest",
"StorageClass": "STANDARD_IA"
}
}
]
}
</pre></code>
The following will create the replication rule based on the above JSON file to set a different storage class at the destination bucket.
<code><pre>
aws s3api put-bucket-replication --bucket thegeekstuff-source \
--replication-configuration file:///project/rep10.json
</pre></code>
</li>
<li><h3>Replication Rule for Cross Account (and Cross Region) S3 Buckets</h3>
If you want to replicate S3 objects to a destination bucket that is owned by another account, specify the target AWS account number under the “Destination“ section. In this example, the destination bucket can also be on a different region than the source bucket to achieve your cross account and cross region replication requirement.
<code><pre>
$ cat rep11.json
{
"Role": "arn:aws:iam::111111111111:role/service-role/s3crr_role_for_thegeekstuff-source_to_thegeekstuff-dest",
"Rules": [
{
"ID": "thegeekstuff-dev-to-prod-rule1",
"Status": "Enabled",
"Priority": 1,
"DeleteMarkerReplication": { "Status": "Disabled" },
"Filter" : { "Prefix": "project/data1/"},
"Destination": {
"Bucket": "arn:aws:s3:::backup-dest",
"Account": "222222222222"
}
}
]
}
</pre></code>
On a related note, if you are connecting to multiple AWS account from CLI, refer to this: 15 AWS Configure Command Examples to Manage Multiple Profiles for CLI
Execute the following command to create a replication rule which will perform cross account replication to the account number specified in the above JSON file.
<code><pre>
aws s3api put-bucket-replication --bucket thegeekstuff-source \
--replication-configuration file:///project/rep11.json
</pre></code>
</li>
<li><h3>Replication Rule with RTC Enabled</h3>
RTC stands for Replication Time Control. S3 RTC allows you to complete the replication of 99.99 percent of objects within 15 minutes. There is an additional cost to it, please refer to the S3 pricing for more details.
To enable RTC in your replication rule, add both Metrics and ReplicationTime block to your Destination section in the JSON file as shown below. Currently the only value that you can provide is 15 Minutes in this JSON file.
<code><pre>
$ cat rep12.json
{
"Role": "arn:aws:iam::111111111111:role/service-role/s3crr_role_for_thegeekstuff-source_to_thegeekstuff-dest",
"Rules": [
{
"ID": "thegeekstuff-dev-to-prod-rule1",
"Status": "Enabled",
"Priority": 1,
"DeleteMarkerReplication": { "Status": "Disabled" },
"Filter" : { "Prefix": "project/data1/"},
"Destination": {
"Bucket": "arn:aws:s3:::thegeekstuff-dest",
"ReplicationTime": {
"Status": "Enabled",
"Time": {
"Minutes": 15
}
},
"Metrics": {
"Status": "Enabled",
"EventThreshold": {
"Minutes": 15
}
}
}
}
]
}
</pre></code>
The following will create the replication rule with the RTC enable based on the above JSON file.
aws s3api put-bucket-replication --bucket thegeekstuff-source \
--replication-configuration file:///project/rep12.json
If you don't specify the Time, in the JSON file, you'll get this error: Parameter validation failed: Missing required parameter in ReplicationConfiguration.Rules[0].Destination.ReplicationTime: “Time“
If you specify a Time value of anything other than 15 Minutes, you'll get this error: An error occurred (InvalidArgument) when calling the PutBucketReplication operation: Invalid time minute value
If you have only ReplicationTime but not the Metrics in your JSON file, you'll get this error: An error occurred (InvalidRequest) when calling the PutBucketReplication operation: Replication destination must contain both ReplicationTime and Metrics or neither.
</li>
<li><h3>Replication Rule with multiple options (Cross Region, Cross Account, Encryption, Tags/Prefix, RTC)</h3>
You can combine one of more options from the previous examples in one replication rule. The following example has prefix and tag filters, cross region with source and destination bucket in different regions, cross account with destination bucket in a different account than source bucket, replicate objects that are encrypted with KMS key, and enable replication time control.
<code><pre>
$ cat rep13.json
{
"Role": "arn:aws:iam::111111111111:role/service-role/s3crr_role_for_thegeekstuff-source_to_thegeekstuff-dest",
"Rules": [
{
"ID": "thegeekstuff-dev-to-prod-rule1",
"Status": "Enabled",
"Priority": 1,
"DeleteMarkerReplication": { "Status": "Disabled" },
"Filter" : {
"And": {
"Prefix": "data/production",
"Tags": [
{
"Key": "Name",
"Value": "Development"
}
]
}
},
"SourceSelectionCriteria": {
"SseKmsEncryptedObjects": {
"Status": "Enabled"
}
},
"Destination": {
"Bucket": "arn:aws:s3:::backup-dest",
"Account": "222222222222",
"EncryptionConfiguration": {
"ReplicaKmsKeyID": "arn:aws:kms:us-west-2:111111111111:key/22222222-dddd-4444-aaaa-555555555555"
},
"ReplicationTime": {
"Status": "Enabled",
"Time": {
"Minutes": 15
}
},
"Metrics": {
"Status": "Enabled",
"EventThreshold": {
"Minutes": 15
}
}
}
}
]
}
</pre></code>
The following will create the replication rule based on the above JSON file that contains multiple replication options set in the rule.
aws s3api put-bucket-replication --bucket thegeekstuff-source \
--replication-configuration file:///project/rep13.json
</li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://www.thegeekstuff.com/2021/12/s3-bucket-replication-using-cli/" target="_blank" rel="noreferrer noopener">The Geek Stuff :: S3 Bucket Replication Using CLI</a></li>
<!--
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
-->
</ul>
</html>
<html>
Using AWS Secrets manager you can store, retrieve, rotate and manage<br />
secrets such as database credentials, API keys and other sensitive infor‐<br />
mation used by your application.<br />
<br />
Secrets are rotated without any disruption to your application, and you can<br />
also replicate secrets to multiple AWS regions.<br />
<br />
You can manage secrets from AWS console, SDK, CLI, or CloudFormation.<br />
This tutorial explains how to perform the following essential secrets manager<br />
activities using AWS secretsmanager CLI:
<h3><A NAME="TOC";>Themenliste:</A></h3>
<ol>
<li><A HREF="#first">List all Secrets</A></li>
<li><A HREF="#second">Create a PlainText Secret</A></li>
<li><A HREF="#third">Retrieve an Existing Secret Value</A></li>
<li><A HREF="#fourth">View details of an Existing Secret</A></li>
<li><A HREF="#fifth">Delete a Secret</A></li>
<li><A HREF="#sixth">Modify Details of an Existing Secret</A></li>
<li><A HREF="#seventh">Create a Secret and attach Tags</A></li>
<li><A HREF="#eightth">Create Key/Value Pair Secret from a JSON file</A></li>
<li><A HREF="#nineth">Create a Secret and Encrypt with KMS Key ID</A></li>
<li><A HREF="#tenth">List All Versions of an Existing Secret</A></li>
<li><A HREF="#eleventh">Retrieve Previous Version of the Secret</A></li>
<li><A HREF="#twelveth">Retrieve an Existing Secret Value using Version Id</A></li>
<li><A HREF="#thirteenth">Update/Store a New Encrypted Secret Value for an Existing Secret</A></li>
<li><A HREF="#fourteenth">Update/Store a New Encrypted Secret Value for an Existing Secret along with given Version Stage</A></li>
<li><A HREF="#fifteenth">Update/Store a New Key/Value Pair from a JSON file for an Existing Secret</A></li>
<li><A HREF="#sixteenth">Delete a Secret After x Number of Days</A></li>
<li><A HREF="#seventeenth">Force Delete a Secret Immediately</A></li>
<li><A HREF="#eightteenth">Cancel the Scheduled Deletion of a Secret</A></li>
<li><A HREF="#nineteenth">Add Tag Values to an Existing Secret</A></li>
<li><A HREF="#twentieth">Remove Tags from an Existing Secret</A></li>
<li><A HREF="#twentyfirst">Create a Staging Label to Specific Version of a Secret</A></li>
</ol>
<ol>
<li><h4><A NAME="first">List all Secrets using list-secrets</A></h4></li>
First, to view all current secrets in your AWS Secrets Manager, execute the following command.
<code><pre>
$ aws secretsmanager list-secrets
{
"SecretList": [
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:ramesh-aaabbb",
"Name": "ramesh",
"LastChangedDate": "2022-03-10T17:56:17.027000-07:00",
"LastAccessedDate": "2022-03-10T17:00:00-07:00",
"SecretVersionsToStages": {
"11111111-7777-41aa-b11c-be111111111d": [
"AWSPREVIOUS"
],
"22222222-8888-51cc-d55e-jk222222222f": [
"AWSCURRENT"
]
}
}
]
}
</pre></code>
The above output will display the ARN of the secret, secret name, date when secret was created and last accessed, the version-number of current and previous version of the secret along with their staging labels.
If you are new to AWS CLI, make sure your AWS profile is setup properly with appropriate access key. Refer to this for more detail: <a href="https://www.thegeekstuff.com/2019/03/aws-configure-examples/" target="_blank" rel="noreferrer noopener">15 AWS Configure Command Examples to Manage Multiple Profiles for CLI</a><br />
<br />
<A HREF="#TOC">Zurück</A>
<li><h4><A NAME="second">Create a PlainText Secret using create-secret</A></h4></li>
The following examples creates a new secret. The secret data to be encrypted can either be a text or binary data. If you are using text, use the SecretString parameter as shown below. For binary data, use SecretBinary parameter. When you create secrets for the first time, Secrets Manager also creates an initial version and automatically attaches the staging label AWSCURRENT to the this new version.
<code><pre>
$ aws secretsmanager create-secret --name jason \
--description "This is the password for dev-db admin user1" \
--secret-string "MySecretSecureString$123"
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:jason-ajajf1",
"Name": "jason",
"VersionId": "11111111-595c-aaaa-806a-222222222222"
}
</pre></code>
In the above example, you'll provide the name of your secret, a description, and the secret-string value. Once a secert is created, the output will display the ARN of the secret along with the VersionId.
To create a new secret, you need secretsmanager:CreateSecret permission.<br />
<br />
<A HREF="#TOC">Zurück</A>
<li><h4><A NAME="third">Retrieve an Existing Secret Value using get-secret-value</A></h4></li>
To retrieve the secret value of an existing secret, execute the following command. This will retrieve the secret value either from the encryption field SecretString or SecretBinary whichever contains content.
To execute this command, you should have secretsmanager:GetSecretValue permission. If the secret key is encrypted with customer-managed KMS key, you also need kms:Decrypt permission.
<code><pre>
$ aws secretsmanager get-secret-value --secret-id ramesh
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:ramesh-aaabbb",
"Name": "ramesh",
"VersionId": "22222222-8888-51cc-d55e-jk222222222f",
"SecretString": "MySecure^Pass123",
"VersionStages": [
"AWSCURRENT"
],
"CreatedDate": "2022-03-10T17:56:17.021000-07:00"
}
</pre></code>
As you see from the above output, this secret is associated with AWSCURRENT version. Secrets Manager stores the encrypted secret data in one of a collection of versions associated with the secret. Each version has a copy of the encrypted secret data and is associated with one or more staging labels.<br />
<br />
<A HREF="#TOC">Zurück</A>
<li><h4><A NAME="fourth">View details of an Existing Secret using describe-secret</A></h4></li>
This command will provided details about the secret without displaying the value of the secret itself. As you see in the following output, this displays the name, ARN, version details and few other date fields about the secret. You also need secretsmanager:DescribeSecret permission to execute this command.
<code><pre>
$ aws secretsmanager describe-secret --secret-id ramesh
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:ramesh-aaabbb",
"Name": "ramesh",
"LastChangedDate": "2022-03-10T17:56:17.027000-07:00",
"LastAccessedDate": "2022-03-10T17:00:00-07:00",
"VersionIdsToStages": {
"11111111-7777-41aa-b11c-be111111111d": [
"AWSPREVIOUS"
],
"22222222-8888-51cc-d55e-jk222222222f": [
"AWSCURRENT"
]
}
}
</pre></code>
<br />
<A HREF="#TOC">Zurück</A>
<li><h4><A NAME="fifth">Delete a Secret using delete-secret</A></h4></li>
You can delete an existing secret as shown below. Once it's deleted, list-secrets will not show this secrets anymore.
<code><pre>
$ aws secretsmanager delete-secret --secret-id ramesh
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:ramesh-aaabbb",
"Name": "ramesh",
"DeletionDate": "2022-03-09T18:03:39.604000-07:00"
}
$ aws secretsmanager list-secrets
{
"SecretList": []
}
</pre></code>
If you've deleted a secret by mistake, you still have the option to recover it within 30 days. If you do a describe-secret on the deleted secret, you'll see “DeletedDate“ field, which indicates the end of the recovery window. Once the recovery window is over, the secret will be permanently deleted.
<code><pre>
$ aws secretsmanager describe-secret --secret-id ramesh
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:ramesh-aaabbb",
"Name": "ramesh",
"Description": "This is the password for dev-db admin user",
"LastChangedDate": "2022-03-10T18:03:39.625000-07:00",
"LastAccessedDate": "2022-03-10T17:00:00-07:00",
"DeletedDate": "2022-03-10T18:03:39.615000-07:00",
"VersionIdsToStages": {
"11111111-7777-41aa-b11c-be111111111d": [
"AWSPREVIOUS"
],
"22222222-8888-51cc-d55e-jk222222222f": [
"AWSCURRENT"
]
}
}
</pre></code>
Note: You can also change the recovery window or delete the secret without recovery as explained in couple of examples below.<br />
<br />
<A HREF="#TOC">Zurück</A>
<li><h4><A NAME="sixth">Modify Details of an Existing Secret using update-secret</A></h4></li>
Note: If you include a ClientRequestToken and either SecretString or SecretBinary then it also creates a new version attached to the secret.
Use update-secrets to update several details of the given secret. For example, the following will update only the description field of the secret. Please note that to execute this command, you should have secretsmanager:UpdateSecret permission.
<code><pre>
$ aws secretsmanager update-secret --secret-id ramesh \
--description "This is the password for dev-db admin user"
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:ramesh-aaabbb",
"Name": "ramesh"
}
</pre></code>
If you want to change only the secret value, use the following command and provide the new value of the secret.
<code><pre>
$ aws secretsmanager update-secret --secret-id ramesh \
--secret-string "NewlyUpdatedSecret#"
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:ramesh-aaabbb",
"Name": "ramesh",
"VersionId": "11111111-abcd-efgh-3786-bbbbbbbbbbbb"
}
</pre></code>
You can also change more than one field of the secret using the same update command. The following example changes both the secret value and the KMS keyId associated with a secret.
<code><pre>
$ aws secretsmanager update-secret --secret-id john \
--secret-string "NewlyUpdatedSecret#"\
--kms-key-id 45454545-3f66-4848-afaf-a8a8a8a8a8a8
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:john-tstsPn",
"Name": "john",
"VersionId": "11111111-f34c-4d4d-b8b8-222222222222"
}
</pre></code>
If you use a custom AWS KMS key to encrypt the secret, you also need these two permissions:, kms:GenerateDataKey, kms:Decrypt<br />
<br />
<A HREF="#TOC">Zurück</A>
<li><h4><A NAME="seventh">Create a Secret and attach Tags to it using create-secret</A></h4></li>
When creating a new secret, you can attach a tag at the same time using the ‐‐tags option as shown below. In this example, it attaches a Tag with key name “Environment“ and its value as “Development“
<code><pre>
$ aws secretsmanager create-secret --name ramesh3 \
--description "This is the password for dev-db admin user1" \
--secret-string "MySecretSecureString$123" \
--tags "Key=Environment,Value=Development"
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:ramesh3-nunuBa",
"Name": "ramesh3",
"VersionId": "11111111-c4c4-4128-8989-222222222222"
}
</pre></code>
<br />
<A HREF="#TOC">Zurück</A>
<li><h4><A NAME="eightth">Create Key/Value Pair Secret from a JSON file using create-secret</A></h4></li>
You can also create a Key/Value pair secret from a JSON file as shown below. In this example, there are two Key/Value pairs in the JSON file.
<code><pre>
$ aws secretsmanager create-secret --name ramesh2 \
--description "This is key value pair username and password JSON" \
--secret-string file://secretvalues.json
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:ramesh2-ababED",
"Name": "ramesh2",
"VersionId": "11111111-0606-4c59-b460-222222222222"
}
$ cat secretvalues.json
{
"UserId": "ramesh",
"Password": "MySuperSecretPassword"
}
</pre></code>
Note: The above will be store as “Secret key/value“ in the secret with two “Secret Key“ and it's corresponding “Secret Value“<br />
<br />
<A HREF="#TOC">Zurück</A>
<li><h4><A NAME="nineth">Create a Secret and Encrypt with KMS Key ID using create-secret</A></h4></li>
While creating a new secret, you can also encrypt it using KMS key by providing one of these: ARN, Key ID, or alias of the AWS KMS customer master key (CMK) to be used to encrypt the SecretString or SecretBinary values in the versions stored in this secret.
The following example creates a new secret and encrypts it using the given KMS key id:
<code><pre>
$ aws secretsmanager create-secret --name ramesh4 \
--description "This is the password for dev-db admin user1" \
--secret-string "MySecretSecureString$123" \
--kms-key-id 45454545-3f66-4848-afaf-a8a8a8a8a8a8
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:ramesh4-vavaKy",
"Name": "ramesh4",
"VersionId": "11111111-8686-4025-957a-222222222222"
}
</pre></code>
If you don't specify a KMS key id parameter, Secrets Manager uses the default AWS managed CMK aws/secretsmanager . If it doesn't exist in your account, it will be created automatically the first time it encrypts the secret value.<br />
<br />
<A HREF="#TOC">Zurück</A>
<li><h4><A NAME="tenth">List All Versions of an Existing Secret using list-secret-version-ids</A></h4></li>
The following command will list all the versions attached to the given secret. This will display only those versions that have atleast one label in VersionStage attached. As you see from the following output, part from displaying AWSCURRENT and AWSPREVIOUS stages, it also shows the custom Development version that is associated with this secret.
<code><pre>
$ aws secretsmanager list-secret-version-ids --secret-id ramesh
{
"Versions": [
{
"VersionId": "11111111-abcd-efgh-3786-bbbbbbbbbbbb",
"VersionStages": [
"AWSCURRENT"
],
"LastAccessedDate": "2022-03-10T17:00:00-07:00",
"CreatedDate": "2022-03-10T13:13:44.121000-07:00"
},
{
"VersionId": "22222222-8888-51cc-d55e-jk222222222f",
"VersionStages": [
"AWSPREVIOUS"
],
"LastAccessedDate": "2022-03-10T17:00:00-07:00",
"CreatedDate": "2022-03-10T17:56:17.021000-07:00"
},
{
"VersionId": "22222222-abcd-efgh-3786-eeeeeeeeeeee",
"VersionStages": [
"Development"
],
"CreatedDate": "2022-03-10T10:38:58.325000-07:00"
}
],
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:ramesh-aaabbb",
"Name": "ramesh"
}
</pre></code>
You need secretsmanager:ListSecretVersionIds permission to execute the above command.<br />
<br />
<A HREF="#TOC">Zurück</A>
<li><h4><A NAME="eleventh">Retrieve Previous Version of the Secret using get-secret-value Version Stage</A></h4></li>
Once you've updated the value of the secret. If you like to know the previous value before the update, you can use AWSPREVIOUS version stage as shown below.
<code><pre>
$ aws secretsmanager get-secret-value --secret-id ramesh --version-stage AWSPREVIOUS
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:ramesh-aaabbb",
"Name": "ramesh",
"VersionId": "11111111-7777-41aa-b11c-be111111111d",
"SecretString": "MySec^Pass124",
"VersionStages": [
"AWSPREVIOUS"
],
"CreatedDate": "2022-03-10T17:54:56.259000-07:00"
}
</pre></code>
As you see below the SecretString value for AWSCURRENT is different than the above AWSCURRENT value.
<code><pre>
$ aws secretsmanager get-secret-value --secret-id ramesh --version-stage AWSCURRENT
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:ramesh-aaabbb",
"Name": "ramesh",
"VersionId": "22222222-8888-51cc-d55e-jk222222222f",
"SecretString": "MySecure^Pass123",
"VersionStages": [
"AWSCURRENT"
],
"CreatedDate": "2022-03-10T17:56:17.021000-07:00"
}
</pre></code>
<br />
<A HREF="#TOC">Zurück</A>
<li><h4><A NAME="twelveth">Retrieve an Existing Secret Value using Version Id</A></h4></li>
Instead of using the AWSCURRENT or AWSCURRENT version stage, you can also use the version-id to retrieve the corresponding SecretValue as shown below.
<code><pre>
$ aws secretsmanager get-secret-value --secret-id ramesh --version-id 22222222-8888-51cc-d55e-jk222222222f
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:ramesh-aaabbb",
"Name": "ramesh",
"VersionId": "22222222-8888-51cc-d55e-jk222222222f",
"SecretString": "MySecure^Pass123",
"VersionStages": [
"AWSPREVIOUS"
],
"CreatedDate": "2022-03-10T17:56:17.021000-07:00"
}
</pre></code>
To get all the version ids of a secret use describe-secret as shown in one of the examples above.<br />
<br />
<A HREF="#TOC">Zurück</A>
<li><h4><A NAME="thirteenth">Update/Store a New Encrypted Secret Value for an Existing secret-id using put-secret-value</A></h4></li>
To update a secret value, use put-secret-value as shown below. This will store the given new secret value in the specified secret. For this, it will create a new version of the secret. To execute this command, you also need secretsmanager:PutSecretValue permission.
The following are few essential things to keep in mind:
<ul>
<li>If this is the first version of the secret, then secret manager will automatically assign AWSCURRENT as the staging label to this version.</li>
<li>If another version of the secret already exists, then secret manager does not any staging labels automatically other than those specified in the VersionStages parameter.</li>
<li>If another version of the secret already exists, and if you are moving the AWSCURRENT staging label by explicitly using the StagingLabels parameter, then secrets manager will also move AWSPREVIOUS staging label to the specific version where AWSCURRENT was removed</li>
</ul>
<code><pre>
$ aws secretsmanager put-secret-value --secret-id ramesh \
--secret-string "MySec^Pass124"
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:ramesh-aaabbb",
"Name": "ramesh",
"VersionId": "11111111-9b98-4cc7-ab83-333333333333",
"VersionStages": [
"AWSCURRENT"
]
}
</pre></code>
<br />
<A HREF="#TOC">Zurück</A>
<li><h4><A NAME="fourteenth">Update/Store a New Encrypted Secret Value for an Existing secret-id using put-secret-value Version Stages</A></h4></li>
The following example shows how you can use version-stages parameter along with put-secret-values. In this example, a new version of the secret is created with the given value in secret-string and “Development“ staging label is assigned to this particular version.
<code><pre>
$ aws secretsmanager put-secret-value --secret-id ramesh \
--secret-string "MySec^Pass124"\
--version-stages "Development"
</pre></code>
As you see from the following output, Development staging label is shown in the “VersionIdsToStages“ along with AWSCURRENT and AWSPREVIOUS.
<code><pre>
$ aws secretsmanager describe-secret --secret-id ramesh
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:ramesh-aaabbb",
"Name": "ramesh",
"Description": "This is the password for dev-db admin user",
"RotationEnabled": false,
..
..
"VersionIdsToStages": {
"11111111-abcd-efgh-3786-bbbbbbbbbbbb": [
"AWSCURRENT"
],
"22222222-abcd-efgh-3786-eeeeeeeeeeee": [
"Development"
],
"22222222-8888-51cc-d55e-jk222222222f": [
"AWSPREVIOUS"
]
}
}
</pre></code>
<br />
<A HREF="#TOC">Zurück</A>
<li><h4><A NAME="fifteenth">Update/Store a New Key/Value Pair from a JSON file for an Existing secret-id using put-secret-value</A></h4></li>
Instead of specifying the secret value directly in the command line, you can add the secret value in a json file, and pass that json file to the secret-string parameter as shown below.
<code><pre>
$ aws secretsmanager put-secret-value --secret-id john \
--secret-string file://secretvalues.json
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:john-tstsPn",
"Name": "john",
"VersionId": "55555555-cfb4-455a-8f71-888888888888",
"VersionStages": [
"AWSCURRENT"
]
}
</pre></code>
<br />
<A HREF="#TOC">Zurück</A>
<li><h4><A NAME="sixteenth">Delete a Secret After x Number of Days using delete-secret</A></h4></li>
By default deleted secrets has a recovery window of 30 days and beyond that they are permanently deleted. If you like to change the recovery window, use the recovery-window-in-days option as shown below.
<code><pre>
$ aws secretsmanager delete-secret --secret-id john --recovery-window-in-days 21
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:john-tstsPn",
"Name": "john",
"DeletionDate": "2022-03-10T11:05:24.533000-07:00"
}
</pre></code>
Valid values should be between 7 and 30 days. If you specify a value outside that range, you'll get this error message: An error occurred (InvalidParameterException) when calling the DeleteSecret operation: The RecoveryWindowInDays value must be between 7 and 30 days (inclusive).<br />
<br />
<A HREF="#TOC">Zurück</A>
<li><h4><A NAME="seventeenth">Force Delete a Secret Immediately using delete-secret</A></h4></li>
You can also forcefully delete the secret immediately using force-delete-without-recovery option as shown below. Be careful when using this option as this will permanently delete the secret immediately.
<code><pre>
$ aws secretsmanager delete-secret --secret-id john --force-delete-without-recovery
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:john-tstsPn",
"Name": "john",
"DeletionDate": "2022-03-10T11:02:29.554000-07:00"
}
</pre></code>
<br />
<A HREF="#TOC">Zurück</A>
<li><h4><A NAME="eigtheenth">Cancel the Scheduled Deletion of a Secret using restore-secret</A></h4></li>
If you've deleted a secret by mistake, or if you've changed your mind and like to restore the secret within the recovery window, use the restore-secret option as shown below. This will cancel the scheduled deletion of the secret and will remove the DeletedDate timestamp from it.
<code><pre>
$ aws secretsmanager restore-secret --secret-id ramesh
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:ramesh-aaabbb",
"Name": "ramesh"
}
</pre></code>
Once you restore a secret, you can query it using list-secrets or describe-secret command.
<code><pre>
$ aws secretsmanager list-secrets
{
"SecretList": [
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:ramesh-aaabbb",
"Name": "ramesh",
"Description": "This is the password for dev-db admin user",
..
..
}
$ aws secretsmanager describe-secret --secret-id ramesh
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:ramesh-aaabbb",
"Name": "ramesh",
"Description": "This is the password for dev-db admin user",
..
..
}
</pre></code>
<br />
<A HREF="#TOC">Zurück</A>
<li><h4><A NAME="nineteenth">Add Tag Values to an Existing Secret using tag-resource</A></h4></li>
You can add tags to an existing secret using tag-resoure option as shown below. You can add one or more tags by passing an array to the tags parameter. In the following example, two tags are added to the given secret. The tags are passed as key-value pair.
<code><pre>
$ aws secretsmanager tag-resource --secret-id ramesh \
--tags '[{"Key": "Name", "Value": "Ramesh"}, {"Key": "Environment", "Value": "Dev"}]'
</pre></code>
As you see from the following output, both Environment and Name tags are added to this secret.
<code><pre>
$ aws secretsmanager describe-secret --secret-id ramesh
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:ramesh-aaabbb",
"Name": "ramesh",
..
..
"Tags": [
{
"Key": "Environment",
"Value": "Dev"
},
{
"Key": "Name",
"Value": "Ramesh"
}
],
..
..
}
</pre></code>
<br />
<A HREF="#TOC">Zurück</A>
<li><h4><A NAME="twentieth">Remove Tags from an Existing Secret using untag-resource</A></h4></li>
You can remove one or more tags from a secret using untag-resource option. To remove a tag from the given secret, you have to pass only the key name of the secret.
The following example will remove both Name and Environment tags along with its value from the given secret.
<code><pre>
aws secretsmanager untag-resource --secret-id ramesh \
--tag-keys '[ "Environment", "Name"]'
</pre></code>
<br />
<A HREF="#TOC">Zurück</A>
<li><h4><A NAME="twentyfirst">Create a Staging Label to Specific Version of a Secret using update-secret-version-stage</A></h4></li>
The following secret currently has three different versions with AWSCURRENT, AWSPREVIOUS and Development as staging labels.
<code><pre>
$ aws secretsmanager list-secret-version-ids --secret-id ramesh
{
"Versions": [
{
"VersionId": "11111111-abcd-efgh-3786-bbbbbbbbbbbb",
"VersionStages": [
"AWSCURRENT"
],
..
},
{
"VersionId": "22222222-8888-51cc-d55e-jk222222222f",
"VersionStages": [
"AWSPREVIOUS"
],
..
},
{
"VersionId": "22222222-abcd-efgh-3786-eeeeeeeeeeee",
"VersionStages": [
"Development"
],
..
}
],
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:ramesh-aaabbb",
"Name": "ramesh"
}
</pre></code>
You can change the staging label associated with a specific version of a secret using update-secret-version-stage option as shown below. In this example the staging label DEVDB‐UPGRADE will be added to the specific version of the given secret id.
<code><pre>
$ aws secretsmanager update-secret-version-stage --secret-id ramesh \
--version-stage DEVDB-UPGRADE \
--move-to-version-id 22222222-8888-51cc-d55e-jk222222222f
{
"ARN": "arn:aws:secretsmanager:us-east-1:111111111111:secret:ramesh-aaabbb",
"Name": "ramesh"
}
</pre></code>
As you see below, DEVDB‐UPGRADE was added to that particular version along with the staging label AWSPREVIOUS that was already present for that particular version.
<code><pre>
$ aws secretsmanager list-secret-version-ids --secret-id ramesh
{
"Versions": [
..
..
{
"VersionId": "22222222-8888-51cc-d55e-jk222222222f",
"VersionStages": [
"DEVDB-UPGRADE",
"AWSPREVIOUS"
],
..
}
</pre></code>
If you want to remove a specifiv staging label from a version, use update-secret-version-stage and remove-from-version-id as shown below. This will remove DEVDB-UPGRADE staging label from the specified verion of the secret.
<code><pre>
aws secretsmanager update-secret-version-stage --secret-id ramesh \
--version-stage DEVDB-UPGRADE \
--remove-from-version-id 22222222-8888-51cc-d55e-jk222222222f
</pre></code>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://www.thegeekstuff.com/2022/03/aws-secrets-manager-cli-examples/" target="_blank" rel="noreferrer noopener">The Geek Stuff :: 21 Examples to Manage Secrets using AWS Secrets Manager CLI</a></li>
</ul>
</html>
<html>
<p>
Eine Availability Zone (AZ) ist ein oder mehrere diskrete Rechenzentren mit<br />
redundanter Stromversorgung, Vernetzung und Konnektivität in einer AWS <br />
Region. <br />
</p>
<p>
Mithilfe dieser Availability Zones (AZs) können Produktionsanwendungen <br />
und Datenbanken betrieben werden, die verfügbarer, fehlertoleranter und<br />
skalierbarer sind, als dies von einem einzigen Rechenzentrum aus möglich
wäre.<br />
</p>
<p>
Alle AZs in einer AWS-Region sind mit einem Netzwerk mit hoher Bandbreite<br />
und niedriger Latenz über eine vollständig redundante, dedizierte Metro-Glas‐<br />
faser miteinander verbunden, die einen hohen Durchsatz und eine niedrige <br />
Latenz zwischen den AZ ermöglicht. Der gesamte Datenverkehr zwischen<br />
AZs wird verschlüsselt. Die Netzwerkleistung ist ausreichend, um eine <br />
synchrone Replikation zwischen AZs zu erreichen. AZs vereinfachen das <br />
Partitionieren von Anwendungen für hohe Verfügbarkeit. Wenn die Partition<br />
einer Anwendung auf mehrere AZs verteilt ist, sind Unternehmen besser<br />
isoliert und vor Naturereignissen wie Stromausfällen, Blitzeinschlägen, Tor‐<br />
nados, Erdbeben usw. geschützt. Die AZs sind physisch durch eine große<br />
Entfernung, viele Kilometer, von jeder anderen AZ getrennt, obwohl alle in‐<br />
nerhalb von 100 km (60 Meilen voneinander) liegen.<br />
</p>
<h3>Links:</h3>
<ul>
<li><a href="https://aws.amazon.com/de/about-aws/global-infrastructure/regions_az/" target="_blank" rel="noreferrer noopener">Amazon AWS :: Global infrastructure</a></li>
</ul>
</html>
<html>
<table>
<tr><th align=center>Kürzel</th><th>… steht für</th></tr>
<tr><td align=center><b>EC2</b></td><td>Elastic Compute Cloud</td></tr>
<tr><td align=center><b>S3</b></td><td>Simple Storage Service</td></tr>
<tr><td align=center><b>IAM</b></td><td>Identity & Access Management</td></tr>
<tr><td align=center><b>EBS</b></td><td>Elastic Block Store<br />Elastic Beanstalk</td></tr>
<tr><td align=center><b>ECS</b></td><td>Elastic Container Service</td></tr>
<tr><td align=center><b>SNS</b></td><td>Simple Notification Service</td></tr>
<tr><td align=center><b>SQS</b></td><td>Simple Queueing Service (?)</td></tr>
<tr><td align=center><b>AMI</b></td><td>Amazon Machine Image</td></tr>
<tr><td align=center><b>IMS</b></td><td>Instance Metadata Service</td></tr>
<tr><td align=center><b>KMS</b></td><td>Key Management Service</td></tr>
<tr><td align=center><b>EMR</b></td><td>Elastic MapReduce</td></tr>
<tr><td align=center><b>WAF</b></td><td>Web Application Firewall</td></tr>
<tr><td align=center><b>EKS</b></td><td>Elastic Kubernetes Service</td></tr>
<tr><td align=center><b>ARN</b></td><td>Amazon Resource Name</td></tr>
<tr><td align=center><b>Etag</b></td><td>Entity tag</td></tr>
<tr><td align=center><b>SQA</b></td><td>Short Query Acceleration</td></tr>
<tr><td align=center><b>VPC</b></td><td>Virtual Private Cloud</td></tr>
<tr><td align=center><b>RDS</b></td><td>Relational Database Service</td></tr>
<tr><td align=center><b>ALB</b></td><td>Application Load Balancer</td></tr>
<!--
<tr><td align=center><b></b></td><td></td></tr>
<tr><td align=center><b></b></td><td></td></tr>
<tr><td align=center><b></b></td><td></td></tr>
<tr><td align=center><b></b></td><td></td></tr>
<tr><td align=center><b></b></td><td></td></tr>
<tr><td align=center><b></b></td><td></td></tr>
<tr><td align=center><b></b></td><td></td></tr>
<tr><td align=center><b></b></td><td></td></tr>
<tr><td align=center><b></b></td><td></td></tr>
<tr><td align=center><b></b></td><td></td></tr>
<tr><td align=center><b></b></td><td></td></tr>
<tr><td align=center><b></b></td><td></td></tr>
-->
</table>
</ul>
</html>
<html>
<img src="./pictures/aws-certification-1024x566.png" height=566 width=1024 />
</html>
<html>
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/AWS_Cloud-practitioner-pattern.png" height=228 width=509 />
</html>
<html>
To use AWS CLI, you need to first make sure your AWS access key credentials are configured properly.
Once you have your AWS access_key_id and secret_access_key, you can either manually add them to the credentials file, or use aws configure command to set it up on your local machine.
This tutorials explains all the options available in aws configure command along with how to manage multiple profiles:
<ol>
<li>First Time Configuring AWS Credentials ‐ Default Profile</li>
<li>~/.aws Directory ‐ Config and credentials File for Default Profile</li>
<li>Edit Default Profile Credentials ‐ Connect to Different AWS Account</li>
<li>Create Multiple AWS Profiles ‐ Dev and Prod</li>
<li>~/.aws Directory ‐ Config and credentials File for Multiple Profiles (Dev and Prod)</li>
<li>Switching Between Different AWS Profiles using ‐profile Option</li>
<li>Switching Between Different AWS Profiles using AWS_PROFILE Env Variable</li>
<li>View Profile Information using list Option</li>
<li>Change Default Config and Credentials FileName and Location</li>
<li>View a Specific Profile Parameter Value using get Option</li>
<li>Set a Specific Profile Parameter Value using set Option</li>
<li>Add New Model using add-model Option</li>
</ol>
<h3>1. First Time Configuring AWS Credentials ‐Default Profile</h3>
When you execute aws configure command without any argument, you'll be configuring aws credentials as your default profile.
<code><pre>
$ aws configure
AWS Access Key ID [None]: AAABBBCCCDDDEEEFFFGG
AWS Secret Access Key [None]: aaabbbcccdddeeefffggghhhiiijjjkkklllmmmn
Default region name [None]: us-east-1
Default output format [None]: text
</pre></code>
In the above:
<ul>
<li>[None] ‐ This indicates that you don't have any existing access-key-id/secret-access-key setup on your system for default profile, and will prompt you for new values.</li>
<li>Region Name ‐ This is optional. If you leave this empty, you should specify region in all your AWS CLI commands using ‐region parameter, else you'll get an error message.</li>
<li>Output ‐ This is optional. If you leave this empty, the output of all AWS CLI will be in json format. Available output options are: json, text, table</li>
</ul>
<h3>2. ~/.aws Directory ‐ Config and credentials File for Default Profile</h3>
When you execute aws configure for the first time, it will create ~/.aws directory if it doesn't already exits under your home directory with the following two files:
<code><pre>
$ ls -1 ~/.aws
config
credentials
$ cat ~/.aws/config
[default]
region = us-east-1
output = text
$ cat ~/.aws/credentials
[default]
aws_access_key_id = AAABBBCCCDDDEEEFFFGG
aws_secret_access_key = aaabbbcccdddeeefffggghhhiiijjjkkklllmmmn
</pre></code>
In the above:
<ul>
<li>~/.aws/credentials ‐ This will contain your access_key_id and secret_access_key</li>
<li>~/.aws/config ‐ This will contain the non-credential configuration information such as region and output</li>
<li>[default] ‐ This section indicates that these value belong to the default profile. Keep in mind that you can have more than one profile configured, which will allow you to execute AWS cli commands against different AWS accounts as shown in examples below.</li>
</ul>
<h3>3. Edit Default Profile Credentials ‐ Connect to Different AWS Account</h3>
If you want to connect to a different AWS acount from your CLI, then you can change your existing default profile credentials by executing the “aws configure“ command again.
<code><pre>
$ aws configure
AWS Access Key ID [****************FFGG]: ZZZZZZCCCDDDEEEFFFZZ
AWS Secret Access Key [****************mmmn]: zzzzzzcccdddeeefffggghhhiiijjjkkklllmmzz
Default region name [us-east-1]: us-west-2
Default output format [text]: json
$ cat ~/.aws/config
[default]
region = us-west-2
output = json
</pre></code>
Note:
When it prompts for access_key_id and secret_access_key, it'll show you the last 4 character of the existing values within [ ]
If you press enter without giving any new value, it will just keep the existing values and not change anything.
<h3>4. Create Multiple AWS Profiles ‐Dev and Prod</h3>
When you are connecting to multiple AWS account just using the default profile, you've to keep changing the values of access_key_id and secret_access_key, which is not practical.
In that case, you can create multiple profiles.
Let us say you need to use AWS CLI commands to access your AWS-dev account and AWS-prod account. In this case, create a dev profile and a prod profile as explained below.
First, create dev profile as shown below. Use access_key_id and secret_access_key values of your AWS-dev account:
<code><pre>
$ aws configure --profile dev
AWS Access Key ID [None]: DEVBBBCCCDDDEEEFFDEV
AWS Secret Access Key [None]: devbbbcccdddeeefffggghhhiiijjjkkklllmdev
Default region name [None]: us-east-1
Default output format [None]:
</pre></code>
Next, create prod profile as shown below. Use access_key_id and secret_access_key values of your AWS-prod account:
<code><pre>
$ aws configure --profile prod
AWS Access Key ID [None]: PRODBBCCCDDDEEEFPROD
AWS Secret Access Key [None]: prodbbcccdddeeefffggghhhiiijjjkkklllprod
Default region name [None]: us-west-2
Default output format [None]:
</pre></code>
<h3>5. ~/.aws Directory ‐ Config and credentials File for Multiple Profiles (Dev and Prod)</h3>
After adding new additional profiles (dev and prod), now we have total of 3 profiles including default profile as shown below in the configuration files.
<code><pre>
$ cat ~/.aws/config
[default]
region = us-east-1
output = text
[profile dev]
region = us-east-1
[profile prod]
region = us-west-2
$ cat ~/.aws/credentials
[default]
aws_access_key_id = AAABBBCCCDDDEEEFFFGG
aws_secret_access_key = aaabbbcccdddeeefffggghhhiiijjjkkklllmmmn
[dev]
aws_access_key_id = DEVBBBCCCDDDEEEFFDEV
aws_secret_access_key = devbbbcccdddeeefffggghhhiiijjjkkklllmdev
[prod]
aws_access_key_id = PRODBBCCCDDDEEEFPROD
aws_secret_access_key = prodbbcccdddeeefffggghhhiiijjjkkklllprod
</pre></code>
In the above:
<ul>
<li>[default] ‐ This contains the credentials information when we just used “aws configure“ command without any parameter. This is our default profile. We don't have a name for this profile.</li>
<li>[dev] ‐ This section contains dev profile credentials.</li>
<li>[prod] ‐ This section contains prod profile credentials.</li>
</ul>
<h3>6. Switching Between Different AWS Profile using ‐profile Option</h3>
By default, AWS CLI will use credentials from default profile. For example, the following command will list all the EBS volumes using your default profile credentials.
<code><pre>
aws ec2 describe-volumes
</pre></code>
If you want to connect to a different AWS account. For example to connect to AWS-dev account, use the dev profile as shown below:
<code><pre>
aws ec2 describe-volumes --profile dev
</pre></code>
The following will connect to prod profile:
<code><pre>
aws ec2 describe-volumes --profile prod
</pre></code>
Please note that the following commands are exactly the same. Both will use the default profile:
<code><pre>
aws ec2 describe-volumes
aws ec2 describe-volumes --profile default
</pre></code>
Note: The ‐profile option can be used with all AWS CLI commands.
On a related note, to launch an EC2 instance from CLI, refer to this: How to Launch an Amazon AWS EC2 Instance with UserData from CLI
<h3>7. Switching Between Different AWS Profiles using AWS_PROFILE Env Variable</h3>
Specifying profile option in all your CLI can be bit cumbersome. To avoid this, you can set your profile using AWS_PROFILE environment variable.
First, set your AWS_PROFILE to connect to AWS-dev account.
<code><pre>
export AWS_PROFILE=dev
</pre></code>
From now on, any AWS CLI commands that you execute will connect to the AWS-dev account. You don't need to specify ‐profile option anymore.
The following commands will use dev profile credentials (not the default credentials), as we've set the AWS_PROFILE to dev.
<code><pre>
aws ec2 describe-volumes
aws ec2 describe-instances
aws s3 ls
…
</pre></code>
If you want to connect to AWS-prod account, just set the AWS_PROFILE to prod as shown below.
<code><pre>
export AWS_PROFILE=prod
</pre></code>
After the above, the following commands will use prod profile credentials to connect to your AWS-prod account.
<code><pre>
aws ec2 describe-volumes
aws ec2 describe-instances
aws s3 ls
…
</pre></code>
Once you've set to either dev or prod, and if you want to connect to the AWS account that points to the default profile, you have two options.
You can set AWS_PROFILE to default as shown below.
<code><pre>
export AWS_PROFILE=default
</pre></code>
Or, you can simply unset the AWS_PROFILE environment variable, which will then automatically start using the default profile.
<code><pre>
unset AWS_PROFILE
</pre></code>
After the above, the following commands will use default profile credentials to connect to your AWS-prod account.
<code><pre>
aws ec2 describe-volumes
aws ec2 describe-instances
aws s3 ls
…
</pre></code>
<h3>8. View Profile Information using list Option</h3>
The easy way to view all the profiles that you've configured on your system is to view the content of config and credentials files.
<code><pre>
cat ~/.aws/config
cat ~/.aws/credentials
</pre></code>
The list option in the aws configure command will display the information about the current profile as shown below.
<code><pre>
$ aws configure list
Name Value Type Location
---- ----- ---- --------
profile None None
access_key ****************FFGG shared-credentials-file
secret_key ****************mmmn shared-credentials-file
region us-east-1 config-file ~/.aws/config
</pre></code>
In the above, profile ‐ The 1st line displays which profile you are using. In the “Value“ column of the 1st line (i.e for profile), it says ““, this indicates that currently you are connected to “default“ profile.
If you change the profile to “prod“, you'll see the “Value“ column of the 1st line will say “prod“ as shown below.
<code><pre>
$ export AWS_PROFILE=prod
$ aws configure list
Name Value Type Location
---- ----- ---- --------
profile prod manual --profile
</pre></code>
You can also pass the profile name to view profile information without changing your current profile as shown below.
<code><pre>
$ aws configure list --profile dev
</pre></code>
<h3>9. Change Default Config and Credentials FileName and Location</h3>
Instead of the default ~/.aws/config and ~/.aws/credentials, you can also use a different location and file name using the following environment variables:
<ul>
<li><b>AWS_SHARED_CREDENTIALS_FILE</b> ‐ Set this value to the filename that contains your AWS credentials</li>
<li><b>AWS_CONFIG_FILE</b> ‐ Set this value to the filename that contains your AWS profile config information</li>
</ul>
For example:
<code><pre>
export AWS_SHARED_CREDENTIALS_FILE=/var/tmp/mycredentials
export AWS_CONFIG_FILE=/var/tmp/myconfig
</pre></code>
Once you set the above values, all AWS CLI commands will start using profiles and corresponding credentials from the files in the above location:
<code><pre>
aws ec2 describe-volumes
aws ec2 describe-instances
aws s3 ls
..
</pre></code>
In the following output, the “Location“ column of the last line (region) indicates which config file it is using.
<code><pre>
$ aws configure list
Name Value Type Location
---- ----- ---- --------
profile None None
access_key ****************FFGG shared-credentials-file
secret_key ****************mmmn shared-credentials-file
region us-east-1 config-file /var/tmp/myconfig
</pre></code>
<h3>10. View a Specific Profile Parameter Value using get Option</h3>
If you want to just view one value from your config or credentials file, use the get option in the aws configure commands using the following syntax.
The get command is helpful if you are scripting something and want to get profile information inside your shell script.
<code><pre>
aws configure get varname [--profile profile-name]
</pre></code>
The following will only display the access_key_id of the current profile.
<code><pre>
$ aws configure get aws_access_key_id
AAABBBCCCDDDEEEFFFGG
</pre></code>
You can also use any one of the following:
<code><pre>
aws configure get aws_access_key_id
aws configure get aws_secret_access_key
aws configure get region
aws configure get output
</pre></code>
You can also specify the name of the profile as shown below:
<code><pre>
aws configure get dev.aws_secret_access_key
aws configure get prod.aws_secret_access_key
</pre></code>
<h3>11. Set a Specific Profile Parameter Value using set Option</h3>
Configure get and set commands can be helpful, if you are writing a shell script to manipulate the values of your config/credentials files.
Syntax:
<code><pre>
aws configure set varname value [--profile profile-name]
</pre></code>
You can just set a value of one specific parameter as shown below.
<code><pre>
$ aws configure set region us-east-2
</pre></code>
You can set the values of any of the following parameters:
<code><pre>
aws configure set aws_access_key_id NEWABBCCCDDDEEEFPNEW
aws configure set aws_secret_access_key newdbbcccdddeeefffggghhhiiijjjkkklllpnew
aws configure set region us-east-2
aws configure set output json
</pre></code>
You can also specify the name of the profile as shown below:
<code><pre>
aws configure set dev.region us-east-2
aws configure set prod.output json
</pre></code>
<h3>12. Add New Model using add-model Option</h3>
You can add models based on the information from a json file.
For example, if you have a AWS CLI version that doesn't have Amazon Polly, then you can reinstall the AWS CLI to get the polly.
Or, you can download polly's model file, and use the add-model option in aws configure as shown below.
<code><pre>
aws configure add-model --service-model file:///var/tmp/polly.json
</pre></code>
The above command will create ~/.aws/models directory and create the following sub-directory based on the information from the given json file.
<code><pre>
ls -l ~/.aws/models/polly/2016-06-10/service-2.json
</pre></code>
The following is the first few lines of the json file that was used in the above example.
<code><pre>
$ head -10 ~/.aws/models/polly/2016-06-10/service-2.json
{
"version":"2.0",
"metadata":{
"apiVersion":"2016-06-10",
"endpointPrefix":"polly",
"protocol":"rest-json",
"serviceFullName":"Amazon Polly",
"serviceId":"Polly",
"signatureVersion":"v4",
"uid":"polly-2016-06-10"
</pre></code>
The above file is the same as the one that we used during our add-model.
<code><pre>
diff -w ~/.aws/models/polly/2016-06-10/service-2.json /var/tmp/polly.json
</pre></code>
You can also specify a different service-name by passing the ‐service-name parameter as shown below.
<code><pre>
aws configure add-model --service-model file:///var/tmp/custom.json --service-name mycustom
</pre></code>
The above will create a sub-directory under ~/.aws/models with the service-name that you've specified as shown below.
<code><pre>
ls -l ~/.aws/models/mycustom/2016-06-10/service-2.json
</pre></code>
<h3>Links:</h3>
<a href="https://www.thegeekstuff.com/2019/03/aws-configure-examples/" target=_blank>TheGeekStuff :: AWS Konfigurationsbeispiele</a>
</html>
<html>
<ul>
<li>Antwort von User "CJ Chang":
<ul>
<li><b>Copy:</b>
<pre><code>Ctrl + Insert</code></pre>
</li>
<li><b>Paste: </b>
<pre><code>Shift + Insert</code></pre>
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://stackoverflow.com/questions/68197270/how-do-i-copy-paste-in-ec2-connect-aws"
target="_blank" rel="noreferrer noopener">
StackOverflow :: How do I copy/paste in EC2 Connect AWS [closed]</a>
<li>
</ul>
</html>
<html>
<ol>
<li><h3>Zuerst als User einloggen, für den die MFA eingerichtet werden soll.</h3><br />
</li>
<li><h3>IAM dashboard aufrufen:</h3>
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_MFA-01.png" height=527 width=910 /> <!-- height=1054 width=1920 -->
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_MFA-01.png" height=527 width=910 /> <!-- height=1054 width=1920 -->
<br />
→ Button “Add MFA“ anklicken<br />
</li>
<li><h3></h3>
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_MFA-02.png" height=527 width=910 />
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_MFA-02.png" height=527 width=910 />
</li>
<li><h3></h3>
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_MFA-03.png" height=527 width=910 />
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_MFA-03.png" height=527 width=910 />
</li>
<li><h3></h3>
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_MFA-05.png" height=527 width=910 />
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_MFA-05.png" height=527 width=910 />
</li>
<li><h3>Ergebnis:</h3>
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_MFA-06.png" height=527 width=910 />
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_MFA-06.png" height=527 width=910 />
</li>
</ol>
</html>
<html>
<ol>
<li><h3>IAM dashboard</h3>
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_IAM-01.png"
height=1054 width=1920/>
</li>
<li><h3></h3>
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_IAM-02.png"
height=100 width=100 />
1920 x 1054
</li>
<li><h3></h3>
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_IAM-03.png"
height=100 width=100 />
633 x 213
</li>
<li><h3></h3>
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_IAM-04.png"
height=100 width=100 />
1920 x 1054
</li>
<li><h3></h3>
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_IAM-05.png"
height=100 width=100 />
1920 x 1054
</li>
<li><h3></h3>
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_IAM-06.png"
height=100 width=100 />
1920 x 1054
</li>
<li><h3></h3>
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_IAM-07.png"
height=100 width=100 />
1920 x 1054
</li>
<li><h3></h3>
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_IAM-08.png"
height=100 width=100 />
1920 x 1054
</li>
<li><h3></h3>
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_IAM-09.png"
height=100 width=100 />
1920 x 1054
</li>
<li><h3></h3>
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_IAM-10.png"
height=100 width=100 />
1920 x 1054
</li>
<li><h3></h3>
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_IAM-11.png"
height=100 width=100 />
630 x 327
</li>
<li><h3></h3>
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_IAM-12.png"
height=100 width=100 />
617 x 642
</li>
<li><h3></h3>
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_IAM-13.png"
height=100 width=100 />
625 x 476
</li>
<li><h3></h3>
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_IAM-14.png"
height=100 width=100 />
388 x 682
</li>
<li><h3></h3>
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_IAM-15.png"
height=100 width=100 />
377 x 565
</li>
<li><h3></h3>
<img src="/media/mueller/INT-256GB/TiddlyWiki/pictures/Amazon-AWS_IAM-16.png"
height=100 width=100 />
760 x 165</li>
</ol>
</html>
<html>
<ul>
<li>It is easier to manager AWS S3 buckets and<br />
objects from CLI;
</li>
<li>This tutorial explains the basics of how to <br />
manage S3 buckets and its objects using<br />
aws s3 cli using the following examples:
<code><pre>
# s3 make bucket (create bucket)
aws s3 mb s3://tgsbucket --region us-west-2
# s3 remove bucket
aws s3 rb s3://tgsbucket
aws s3 rb s3://tgsbucket --force
# s3 ls commands
aws s3 ls
aws s3 ls s3://tgsbucket
aws s3 ls s3://tgsbucket --recursive
aws s3 ls s3://tgsbucket --recursive --human-readable --summarize
# s3 cp commands
aws s3 cp getdata.php s3://tgsbucket
aws s3 cp /local/dir/data s3://tgsbucket --recursive
aws s3 cp s3://tgsbucket/getdata.php /local/dir/data
aws s3 cp s3://tgsbucket/ /local/dir/data --recursive
aws s3 cp s3://tgsbucket/init.xml s3://backup-bucket
aws s3 cp s3://tgsbucket s3://backup-bucket --recursive
# s3 mv commands
aws s3 mv source.json s3://tgsbucket
aws s3 mv s3://tgsbucket/getdata.php /home/project
aws s3 mv s3://tgsbucket/source.json s3://backup-bucket
aws s3 mv /local/dir/data s3://tgsbucket/data --recursive
aws s3 mv s3://tgsbucket s3://backup-bucket --recursive
# s3 rm commands
aws s3 rm s3://tgsbucket/queries.txt
aws s3 rm s3://tgsbucket --recursive
# s3 sync commands
aws s3 sync backup s3://tgsbucket
aws s3 sync s3://tgsbucket/backup /tmp/backup
aws s3 sync s3://tgsbucket s3://backup-bucket
# s3 bucket website
aws s3 website s3://tgsbucket/ --index-document index.html --error-document error.html
# s3 presign url (default 3600 seconds)
aws s3 presign s3://tgsbucket/dnsrecords.txt
aws s3 presign s3://tgsbucket/dnsrecords.txt --expires-in 60</pre></code>
</li>
</ul>
<h3>1. Create New S3 Bucket</h3>
<ul>
<li>Use mb option for this;
</li>
<li>mb stands for Make Bucket.
</li>
<li>The following will create a new S3 bucket
<code><pre>$ aws s3 mb s3://tgsbucket
make_bucket: tgsbucket</pre></code>
</li>
<li>In the above example, the bucket is created in the us-east-1 region, as that is what is specified in the user's config file as shown below.
<code><pre>$ cat ~/.aws/config
[profile ramesh]
region = us-east-1</pre></code>
To setup your config file properly, use aws configure command as explained here: 15 AWS Configure Command Examples to Manage Multiple Profiles for CLI
</li>
<li>If the bucket already exists, and you own the bucket, you'll get the following error message.
<code><pre>$ aws s3 mb s3://tgsbucket
make_bucket failed: s3://tgsbucket </pre></code>
An error occurred (BucketAlreadyOwnedByYou) when calling the CreateBucket operation: Your previous request to create the named bucket succeeded and you already own it.
</li>
<li>If the bucket already exists, but owned by some other user, you'll get the following error message.
<code><pre> $ aws s3 mb s3://paloalto
make_bucket failed: s3://paloalto</pre></code>
An error occurred (BucketAlreadyExists) when calling the CreateBucket operation: The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again.
</li>
<li>Under some situation, you might also get the following error message.
<code><pre>$ aws s3 mb s3://demo-bucket
make_bucket failed: s3://demo-bucket</pre></code>
An error occurred (IllegalLocationConstraintException) when <br />
calling the CreateBucket operation: The unspecified location<br />
constraint is incompatible for the region specific endpoint this<br />
request was sent to.
</li>
</ul>
<h3>2. Create New S3 Bucket ‐ Different Region</h3>
To create a bucket in a specific region (different than the one from your config file), then use the ‐‐region option as shown below.
<code><pre>
$ aws s3 mb s3://tgsbucket --region us-west-2
make_bucket: tgsbucket
</pre></code>
<h3>3. Delete S3 Bucket (That is empty)</h3>
Use rb option for this. rb stands for remove bucket.
The following deletes the given bucket.
<code><pre>
$ aws s3 rb s3://tgsbucket
remove_bucket: tgsbucket
</pre></code>
If the bucket you are trying to delete doesn't exists, you'll get the following error message.
<code><pre>
$ aws s3 rb s3://tgsbucket1
remove_bucket failed: s3://tgsbucket1 An error occurred (NoSuchBucket) when calling the DeleteBucket operation: The specified bucket does not exist
</pre></code>
<h3>4. Delete S3 Bucket (And all its objects)</h3>
If the bucket contains some object, you'll get the following error message:
<code><pre>
$ aws s3 rb s3://tgsbucket
remove_bucket failed: s3://tgsbucket An error occurred (BucketNotEmpty) when calling the DeleteBucket operation: The bucket you tried to delete is not empty
</pre></code>
To delete a bucket along with all its objects, use the ‐‐force option as shown below.
<code><pre>
$ aws s3 rb s3://tgsbucket --force
delete: s3://tgsbucket/demo/getdata.php
delete: s3://tgsbucket/ipallow.txt
delete: s3://tgsbucket/demo/servers.txt
delete: s3://tgsbucket/demo/
remove_bucket: tgsbucket
</pre></code>
<h3>5. List All S3 Buckets</h3>
To view all the buckets owned by the user, execute the following ls command.
<code><pre>
$ aws s3 ls
2019-02-06 11:38:55 tgsbucket
2018-12-18 18:02:27 etclinux
2018-12-08 18:05:15 readynas
..
..
</pre></code>
In the above output, the timestamp is the date the bucket was created. The timezone was adjusted to be displayed to your laptop's timezone.
The following command is same as the above:
<code><pre>
aws s3 ls s3://
</pre></code>
<h3>6. List All Objects in a Bucket</h3>
The following command displays all objects and prefixes under the tgsbucket.
<code><pre>
$ aws s3 ls s3://tgsbucket
PRE config/
PRE data/
2019-04-07 11:38:20 13 getdata.php
2019-04-07 11:38:20 2546 ipallow.php
2019-04-07 11:38:20 9 license.php
2019-04-07 11:38:20 3677 servers.txt
</pre></code>
In the above output:
<ul>
<li>Inside the tgsbucket, there are two folders config and data (indicated by PRE)</li>
<li>PRE stands for Prefix of an S3 object.</li>
<li>Inside the tgsbucket, we have 4 files at the / level</li>
<li>The timestamp is when the file was created</li>
<li>The 2nd column display the size of the S3 object</li>
</ul>
Note: The above output doesn't display the content of sub-folders config and data
<h3>7. List all Objects in a Bucket Recursively</h3>
To display all the objects recursively including the content of the sub-folders, execute the following command.
<code><pre>
$ aws s3 ls s3://tgsbucket --recursive
2019-04-07 11:38:19 2777 config/init.xml
2019-04-07 11:38:20 52 config/support.txt
2019-04-07 11:38:20 1758 data/database.txt
2019-04-07 11:38:20 13 getdata.php
2019-04-07 11:38:20 2546 ipallow.php
2019-04-07 11:38:20 9 license.php
2019-04-07 11:38:20 3677 servers.txt
</pre></code>
Note: When you are listing all the files, notice how there is no PRE indicator in the 2nd column for the folders.
<h3>8. Total Size of All Objects in a S3 Bucket</h3>
You can identify the total size of all the files in your S3 bucket by using the combination of following three options: recursive, human-readable, summarize
Note: The following displays both total file size in the S3 bucket, and the total number of files in the s3 bucket
<code><pre>
$ aws s3 ls s3://tgsbucket --recursive --human-readable --summarize
2019-04-07 11:38:19 2.7 KiB config/init.xml
2019-04-07 11:38:20 52 Bytes config/support.txt
2019-04-07 11:38:20 1.7 KiB data/database.txt
2019-04-07 11:38:20 13 Bytes getdata.php
2019-04-07 11:38:20 2.5 KiB ipallow.php
2019-04-07 11:38:20 9 Bytes license.php
2019-04-07 11:38:20 3.6 KiB servers.txt
Total Objects: 7
Total Size: 10.6 KiB
</pre></code>
In the above output:
recursive option make sure that it displays all the files in the s3 bucket including sub-folders
human-readable displays the size of the file in readable format. Possible values you'll see in the 2nd column for the size are: Bytes/MiB/KiB/GiB/TiB/PiB/EiB
summarize options make sure to display the last two lines in the above output. This indicates the total number of objects in the S3 bucket and the total size of all those objects
<h3>9. Request Payer Listing</h3>
If a specific bucket is configured as requester pays buckets, then if you are accessing objects in that bucket, you understand that you are responsible for the payment of that request access. In this case, bucket owner doesn't have to pay for the access.
To indicate this in your ls command, you'll have to specify ‐‐request-payer option as shown below.
<code><pre>
$ aws s3 ls s3://tgsbucket --recursive --request-payer requester
2019-04-07 11:38:19 2777 config/init.xml
2019-04-07 11:38:20 52 config/support.txt
2019-04-07 11:38:20 1758 data/database.txt
2019-04-07 11:38:20 13 getdata.php
2019-04-07 11:38:20 2546 ipallow.php
2019-04-07 11:38:20 9 license.php
2019-04-07 11:38:20 3677 servers.txt
</pre></code>
For signed URL, make sure to include x-amz-request-payer=requester in the request
<h3>10. Copy Local File to S3 Bucket</h3>
In the following example, we are copying getdata.php file from local laptop to S3 bucket.
<code><pre>
$ aws s3 cp getdata.php s3://tgsbucket
upload: ./getdata.php to s3://tgsbucket/getdata.php
</pre></code>
If you want to copy the getdata.php to a S3 bucket with a different name, do the following
<code><pre>
$ aws s3 cp getdata.php s3://tgsbucket/getdata-new.php
upload: ./getdata.php to s3://tgsbucket/getdata-new.php
</pre></code>
For the local file, you can also specify the full path as shown below.
<code><pre>
$ aws s3 cp /home/project/getdata.php s3://tgsbucket
upload: ../../home/project/getdata.php to s3://tgsbucket/getdata.php
</pre></code>
<h3>11. Copy Local Folder with all Files to S3 Bucket</h3>
In this example, we are copying all the files from the “data“ folder that is under /home/projects directory to S3 bucket
<code><pre>
$ cd /home/projects
$ aws s3 cp data s3://tgsbucket --recursive
upload: data/parameters.txt to s3://tgsbucket/parameters.txt
upload: data/common.txt to s3://tgsbucket/common.txt
..
</pre></code>
In the above example, note that only the files from the local data/ folder is getting uploaded. Not the folder “data“ itself
If you like to upload the data folder from local to s3 bucket as data folder, then specify the folder name after the bucket name as shown below.
<code><pre>
$ aws s3 cp data s3://tgsbucket/data --recursive
upload: data/parameters.txt to s3://tgsbucket/data/parameters.txt
upload: data/common.txt to s3://tgsbucket/data/common.txt
..
..
</pre></code>
<h3>12. Download a File from S3 Bucket</h3>
To download a specific file from an S3 bucket do the following. The following copies getdata.php from the given s3 bucket to the current directory.
<code><pre>
$ aws s3 cp s3://tgsbucket/getdata.php .
download: s3://tgsbucket/getdata.php to ./getdata.php
</pre></code>
You can download the file to the local machine with in a different name as shown below.
<code><pre>
$ aws s3 cp s3://tgsbucket/getdata.php getdata-local.php
download: s3://tgsbucket/getdata.php to ./getdata-local.php
</pre></code>
Download the file from S3 bucket to a specific folder in local machine as shown below. The following will download getdata.php file to /home/project folder on local machine.
<code><pre>
$ aws s3 cp s3://tgsbucket/getdata.php /home/project/
download: s3://tgsbucket/getdata.php to ../../home/project/getdata.php
</pre></code>
<h3>13. Download All Files Recursively from a S3 Bucket (Using Copy)</h3>
The following will download all the files from the given bucket to the current directory on your laptop.
<code><pre>
$ aws s3 cp s3://tgsbucket/ . --recursive
download: s3://tgsbucket/getdata.php to ./getdata.php
download: s3://tgsbucket/config/init.xml ./config/init.xml
..
</pre></code>
If you want to download all the files from a S3 bucket to a specific folder locally, please specify the full path of the local directory as shown below.
<code><pre>
$ aws s3 cp s3://tgsbucket/ /home/projects/tgsbucket --recursive
download: s3://tgsbucket/getdata.php to ../../home/projects/tgsbucket/getdata.php
download: s3://tgsbucket/config/init.xml to ../../home/projects/tgsbucket/config/init.xml
..
</pre></code>
In the above command, if the tgsbucket folder doesn't exists under /home/projects, it will create it automatically.
<h3>14. Copy a File from One Bucket to Another Bucket</h3>
The following command will copy the config/init.xml from tgsbucket to backup bucket as shown below.
<code><pre>
$ aws s3 cp s3://tgsbucket/config/init.xml s3://backup-bucket
copy: s3://tgsbucket/config/init.xml to s3://backup-bucket/init.xml
</pre></code>
In the above example, eventhough init.xml file was under config folder in the source bucket, on the destination bucket, it copied the init.xml file to the top-level / in the backup-bucket.
If you want to copy the same folder from source and destination along with the file, specify the folder name in the desintation bucketas shown below.
<code><pre>
$ aws s3 cp s3://tgsbucket/config/init.xml s3://backup-bucket/config
copy: s3://tgsbucket/config/init.xml to s3://backup-bucket/config/init.xml
</pre></code>
If the destination bucket doesn't exist, you'll get the following error message.
<code><pre>
$ aws s3 cp s3://tgsbucket/test.txt s3://backup-bucket-777
copy failed: s3://tgsbucket/test.txt to s3://backup-bucket-777/test.txt An error occurred (NoSuchBucket) when calling the CopyObject operation: The specified bucket does not exist
</pre></code>
<h3>15. Copy All Files Recursively from One Bucket to Another</h3>
The following will copy all the files from the source bucket including files under sub-folders to the destination bucket.
<code><pre>
$ aws s3 cp s3://tgsbucket s3://backup-bucket --recursive
copy: s3://tgsbucket/getdata.php to s3://backup-bucket/getdata.php
copy: s3://tgsbucket/config/init.xml s3://backup-bucket/config/init.xml
..
</pre></code>
<h3>16. Move a File from Local to S3 Bucket</h3>
When you move file from Local machine to S3 bucket, as you would expect, the file will be physically moved from local machine to the S3 bucket.
<code><pre>
$ ls -l source.json
-rw-r--r-- 1 ramesh sysadmin 1404 Apr 2 13:25 source.json
$ aws s3 mv source.json s3://tgsbucket
move: ./source.json to s3://tgsbucket/source.json
</pre></code>
As you see the file doesn't exists on the local machine after the move. Its only on S3 bucket now.
<code><pre>
$ ls -l source.json
ls: source.json: No such file or directory
</pre></code>
<h3>17. Move a File from S3 Bucket to Local</h3>
The following is reverse of the previou example. Here, the file will be moved from S3 bucket to local machine.
As you see below, the file now exists on the s3 bucket.
<code><pre>
$ aws s3 ls s3://tgsbucket/getdata.php
2019-04-06 06:24:29 1758 getdata.php
</pre></code>
Move the file from S3 bucket to /home/project directory on local machine.
<code><pre>
$ aws s3 mv s3://tgsbucket/getdata.php /home/project
move: s3://tgsbucket/getdata.php to ../../../home/project/getdata.php
</pre></code>
After the move, the file doesn't exists on S3 bucketanymore.
<code><pre>
$ aws s3 ls s3://tgsbucket/getdata.php
</pre></code>
<h3>18. Move a File from One S3 Bucket to Another S3 Bucket</h3>
Before the move, the file source.json is in tgsbucket.
<code><pre>
$ aws s3 ls s3://tgsbucket/source.json
2019-04-06 06:51:39 1404 source.json
</pre></code>
This file is not in backup-bucket.
<code><pre>
$ aws s3 ls s3://backup-bucket/source.json
$
</pre></code>
Move the file from tgsbucketto backup-bucket.
<code><pre>
$ aws s3 mv s3://tgsbucket/source.json s3://backup-bucket
move: s3://tgsbucket/source.json to s3://backup-bucket/source.json
</pre></code>
Now, the file is only on the backup-bucket.
<code><pre>
$ aws s3 ls s3://tgsbucket/source.json
$
$ aws s3 ls s3://backup-bucket/source.json
2019-04-06 06:56:00 1404 source.json
</pre></code>
<h3>19. Move All Files from a Local Folder to S3 Bucket</h3>
In this example, the following files are under data folder.
<code><pre>
$ ls -1 data
dnsrecords.txt
parameters.txt
dev-setup.txt
error.txt
</pre></code>
The following moves all the files in the data directory on local machine to tgsbucket
<code><pre>
$ aws s3 mv data s3://tgsbucket/data --recursive
move: data/dnsrecords.txt to s3://tgsbucket/data/dnsrecords.txt
move: data/parameters.txt to s3://tgsbucket/data/parameters.txt
move: data/dev-setup.txt to s3://tgsbucket/data/dev-setup.txt
move: data/error.txt to s3://tgsbucket/data/error.txt
</pre></code>
<h3>20. Move All Files from S3 Bucket to Local Folder</h3>
In this example, the localdata folder is currently empty.
<code><pre>
$ ls -1 localdata
$
</pre></code>
The following will move all the files in the S3 bucketunder data folder to localdata folder on your local machine.
<code><pre>
$ aws s3 mv s3://tgsbucket/data/ localdata --recursive
move: s3://tgsbucket/data/dnsrecords.txt to localdata/dnsrecords.txt
move: s3://tgsbucket/data/parameters.txt to localdata/parameters.txt
move: s3://tgsbucket/data/dev-setup.txt to localdata/dev-setup.txt
move: s3://tgsbucket/data/error.txt to localdata/error.txt
</pre></code>
Here is the output after the above move.
<code><pre>
$ aws s3 ls s3://tgsbucket/data/
$
$ ls -1 localdata
dnsrecords.txt
parameters.txt
dev-setup.txt
error.txt
</pre></code>
<h3>21. Move All Files from One S3 Bucket to Another S3 Bucket</h3>
Use the recursive option to move all files from one bucket to another as shown below.
<code><pre>
$ aws s3 mv s3://tgsbucket s3://backup-bucket --recursive
move: s3://tgsbucket/dev-setup.txt to s3://backup-bucket/dev-setup.txt
move: s3://tgsbucket/dnsrecords.txt to s3://backup-bucket/dnsrecords.txt
move: s3://tgsbucket/error.txt to s3://backup-bucket/error.txt
move: s3://tgsbucket/parameters.txt to s3://backup-bucket/parameters.txt
</pre></code>
<h3>22. Delete a File from S3 Bucket</h3>
To delete a specific file from a S3 bucket, use the rm option as shown below. The following will delete the queries.txt file from the given S3 bucket.
<code><pre>
$ aws s3 rm s3://tgsbucket/queries.txt
delete: s3://tgsbucket/queries.txt
</pre></code>
<h3>23. Delete All Objects from S3 buckets</h3>
When you specify rm option just with a bucket name, it doesn't do anything. This will not delete any file from the bucket.
<code><pre>
aws s3 rm s3://tgsbucket
</pre></code>
To delete all the files from a S3 bucket, use the ‐‐recursive option as show nbelow.
<code><pre>
$ aws s3 rm s3://tgsbucket --recursive
delete: s3://tgsbucket/dnsrecords.txt
delete: s3://tgsbucket/common.txt
delete: s3://tgsbucket/parameters.txt
delete: s3://tgsbucket/config/init.xml
..
</pre></code>
<h3>24. Sync files from Laptop to S3 Bucket</h3>
When you use sync command, it will recursively copies only the new or updated files from the source directory to the destination.
The following will sync the files from backup directory in local machine to the tgsbucket.
<code><pre>
$ aws s3 sync backup s3://tgsbucket
upload: backup/docker.sh to s3://tgsbucket/docker.sh
upload: backup/address.txt to s3://tgsbucket/address.txt
upload: backup/display.py to s3://tgsbucket/display.py
upload: backup/getdata.php to s3://tgsbucket/getdata.php
</pre></code>
If you want to sync it to a subfolder called backup on the S3 bucket, then include the folder name in the s3 bucket as shown below.
<code><pre>
$ aws s3 sync backup s3://tgsbucket/backup
upload: backup/docker.sh to s3://tgsbucket/backup/docker.sh
upload: backup/address.txt to s3://tgsbucket/backup/address.txt
upload: backup/display.py to s3://tgsbucket/backup/display.py
upload: backup/getdata.php to s3://tgsbucket/backup/getdata.php
</pre></code>
Once you do the sync once, if you run the command immediately again, it will not do anything, as there is no new or updated files on the local backup directory.
<code><pre>
$ aws s3 sync backup s3://tgsbucket/backup
$
</pre></code>
Let us create a new file on the local machine for testing.
<code><pre>
echo "New file" > backup/newfile.txt
</pre></code>
Now when you execute the sync, it will sync only this new file to the S3 bucket.
<code><pre>
$ aws s3 sync backup s3://tgsbucket/backup
upload: backup/newfile.txt to s3://tgsbucket/backup/newfile.txt
</pre></code>
<h3>25. Sync File from S3 bucket to Local</h3>
This is reverse of the previous example. Here, we are syncing the files from the S3 bucket to the local machine.
<code><pre>
$ aws s3 sync s3://tgsbucket/backup /tmp/backup
download: s3://tgsbucket/backup/docker.sh to ../../tmp/backup/docker.sh
download: s3://tgsbucket/backup/display.py to ../../tmp/backup/display.py
download: s3://tgsbucket/backup/newfile.txt to ../../tmp/backup/newfile.txt
download: s3://tgsbucket/backup/getdata.php to ../../tmp/backup/getdata.php
download: s3://tgsbucket/backup/address.txt to ../../tmp/backup/address.txt
</pre></code>
<h3>26. Sync Files from one S3 Bucket to Another S3 Bucket</h3>
The following example syncs the files from one tgsbucket to backup-bucket
<code><pre>
$ aws s3 sync s3://tgsbucket s3://backup-bucket
copy: s3://tgsbucket/backup/newfile.txt to s3://backup-bucket/backup/newfile.txt
copy: s3://tgsbucket/backup/display.py to s3://backup-bucket/backup/display.py
copy: s3://tgsbucket/backup/docker.sh to s3://backup-bucket/backup/docker.sh
copy: s3://tgsbucket/backup/address.txt to s3://backup-bucket/backup/address.txt
copy: s3://tgsbucket/backup/getdata.php to s3://backup-bucket/backup/getdata.php
</pre></code>
<h3>27. Set S3 bucket as a website</h3>
You can also make S3 bucket to host a static website as shown below. For this, you need to specify both the index and error document.
<code><pre>
aws s3 website s3://tgsbucket/ --index-document index.html --error-document error.html
</pre></code>
This bucket is in us-east-1 region. So, once you've done the above, you can access the tgsbucket as a website using the following URL: http://tgsbucket.s3-website-us-east-1.amazonaws.com/
For this to work properly, make sure public access is set on this S3 bucket, as this acts as a website now.
<h3>28. Presign URL of S3 Object for Temporary Access</h3>
When you presign a URL for an S3 file, anyone who was given this URL can retrieve the S3 file with a HTTP GET request.
For example, if you want to give access to the dnsrecords.txt file to someone temporarily, presign this specific S3 object as shown below.
<code><pre>
$ aws s3 presign s3://tgsbucket/dnsrecords.txt
https://tgsbucket.s3.amazonaws.com/error.txt?AWSAccessKeyId=AAAAAAAAAAAAAAAAAAAA&Expires=1111111111&Signature=ooooooooooo%2Babcdefghijlimmm%3A
</pre></code>
The output of the above command will be a HTTPS url, which you can hand it out someone who should be able to download the dnsrecords.txt file from your S3 bucket.
The above URL will be valid by default for 3600 seconds (1 hour).
If you want to specify a short expirty time, use the following expires-in option. The following will create a presigned URL that is valid only for 1 minute.
‐‐expires-in (integer) Number of seconds until the pre-signed URL expires. Default is 3600 seconds.
<code><pre>
$ aws s3 presign s3://tgsbucket/dnsrecords.txt --expires-in 60
https://tgsbucket.s3.amazonaws.com/error.txt?AWSAccessKeyId=AAAAAAAAAAAAAAAAAAAA&Expires=1111111111&Signature=ooooooooooo%2Babcdefghijlimmm%3A
</pre></code>
If someone tries to access the URL after the expiry time, they'll see the following AccessDenied message.
<code><pre>
<Error>
<Code>AccessDenied</Code>
<Message>Request has expired</Message>
<Expires>2019-04-07T11:38:12Z</Expires>
<ServerTime>2019-04-07T11:38:21Z</ServerTime>
<RequestId>1111111111111111</RequestId>
<HostId>
mmmmmmmmmm/ggggggggg
</HostId>
</Error>
</pre></code>
<h3></h3>
<a href="https://www.thegeekstuff.com/2019/04/aws-s3-cli-examples/" target=_blank>TheGeekStuff :: AWS CLI-Beispiele</a>
</html>
<html>
</ul>
<li>die komplette Fehlermeldung lautet:<br />
<b>An error occurred (MissingContentLength) when calling the PutObject operation: You must provide the Content-Length HTTP header.</b>
</li>
<li>This is a new breaking change feature in aws cli: https://github.com/boto/boto3/issues/4392 Many 3rd party services not supported this yet.
</li>
<li>zwei Möglichkeiten:
<ol>
<li>Try downgrade aws cli version
<pre><code>curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.17.13.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install --update</code></pre>
</li>
<li>Or just add 2 final lines to your ~/.aws/config profile
<pre><code>[profile my_account]
request_checksum_calculation=WHEN_REQUIRED
response_checksum_validation=WHEN_REQUIRED</code></pre>
</li>
</ol>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://stackoverflow.com/questions/79405254/aws-cli-copy-local-file-to-s3-cloud-giving-errors"
target="_blank" rel="noreferrer noopener">
StackOverflow :: AWS CLI copy local file to S3 cloud giving errors</a>
</li>
</ul>
</html>
<html>
<ul>
<li><pre><code>Unable to read or write preferences from local storage. Enable
local storage in your browser and opt into the functional cookies
preference to use the default landing page feature. This can be
changed in the bottom right of the page footer.</code></pre>
</li>
<li><img src="./pictures/AWS-Fehlermeldung-01.png"
height= width= /><br />
</li>
<li><img src="./pictures/AWS-Fehlermeldung-02.png"
height= width= />
</li>
<li>
</ul>
</html>
<html>
<h2>How to Set or Change Hostname in Amazon Linux EC2 Instance</h2>
You can use the <code><pre>hostname</pre></code> command or <code><pre>hostnamectl</pre></code>
command to see or set the Amazon Linux EC2 instance's host name. Open the<br />
terminal application and type the following commands to set or change hostname<br />
or computer name on Amazon Linux EC2 Instance.
<h3>How To Change the hostname of your Amazon Linux Instance</h3>
The procedure to change the computer name on Ubuntu Linux without public DNS name:
<ol>
<li>Use the hostnamectl command to set your hostname to stats1:
<code><pre>sudo hostnamectl set-hostname stats1.localdomain</pre></code></li>
<li>Edit the /etc/hosts file:
<code><pre>sudo vim /etc/hosts</pre></code></li>
<li>Find 127.0.0.1 entry and append your hostname at the end:
<code><pre>stats1.localdomain</pre></code></li>
<li>Save and close the file</li>
<li>Reboot the instance:
<code><pre>sudo reboot</pre></code></li>
</ol>
<img src="./pictures/How-to-Set-or-Change-Hostname-in-Amazon-Linux-EC2-Instance.png" height=463 width=1077 /><br />
<br />
<b>Please note that the reboot step is optional and is not needed.</b>
<h3>Display the current Amazon Linux hostname</h3>
Type the hostname or hostnamectl (or use the cat command as follows:
<code><pre>
hostname
# or #
hostnamectl
# another option #
cat /etc/hostname
</pre></code>
<img src="./pictures/Verify-Amazon-Linux-Change-Hostname-Command.png" height=511 width=612 />
<h3>Amazon Linux Change Hostname Using hostnamectl with public DNS</h3>
Say you have public DNS name such as stats1.opensourceflare.com, then you<br />
would change the system hostname to a public DNS name as follows:
<ol>
<li>Open the terminal application.</li>
<li>Log in into the remote EC2 instance using the ssh command.</li>
<li>Then set hostname:
<code><pre>sudo hostnamectl set-hostname stats1.opensourceflare.com</pre></code></li>
<li>Reboot the EC2 or Lightsail instance:
<code><pre>sudo reboot</pre></code></li>
<li>After rebooting system, verify new hostname:
<code><pre>hostnamectl</pre></code></li>
<li>Send ICMP ECHO_REQUEST to network using the ping command:
<code><pre>ping -c4 stats1.opensourceflare.com</pre></code></li>
</ol>
<h3>Why updates the /etc/hosts file?</h3>
The /etc/hosts file acts as a static table lookup for hostnames when DNS is not<br />
in place. Many services on Linux and Unix-like systems use it for resolving host‐<br />
names. Before the arrival of DNS, the host table was the only way of resolving<br />
hostnames on the fledgling Internet. Hence, we need to edit this file when setting<br />
hostname without DNS. This file is a text file that associates IP addresses with<br />
hostnames, one line per IP address. For each host, a single line should be pre‐<br />
sent with the following information:
<code><pre>
IP_address canonical_hostname [aliases...]
</pre></code>
<h3>Examples</h3>
Here is my home /etc/hosts file:
<code><pre>
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
192.168.1.254 router
192.168.1.253 wifi
192.168.1.252 printer hp0
192.168.1.17 freebsd git dell6700
192.168.1.18 rhel8
192.168.1.19 nixcraft-macbookpro mac office
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://www.cyberciti.biz/faq/set-change-hostname-in-amazon-linux-ec2-instance-server/" target=_"blank">nixCraft :: How to Set or Change Hostname in Amazon Linux EC2 Instance</a></li>
</ul>
</html>
<html>
<ul>
<li>an der Zeile
<pre><code>"Resource": ["arn:aws:iam::*:user/${aws:username}"]</code></pre>
ist eine Identity-based policy zu erkennen;
</li>
</ul>
</html>
# AWS CLI v2
This bundle contains a built executable of the AWS CLI v2.
## Installation
To install the AWS CLI v2, run the `install` script:
```
$ sudo ./install
You can now run: /usr/local/bin/aws --version
```
This will install the AWS CLI v2 at `/usr/local/bin/aws`. Assuming
`/usr/local/bin` is on your `PATH`, you can now run:
```
$ aws --version
```
### Installing without sudo
If you don't have ``sudo`` permissions or want to install the AWS
CLI v2 only for the current user, run the `install` script with the `-b`
and `-i` options:
```
$ ./install -i ~/.local/aws-cli -b ~/.local/bin
```
This will install the AWS CLI v2 in `~/.local/aws-cli` and create
symlinks for `aws` and `aws_completer` in `~/.local/bin`. For more
information about these options, run the `install` script with `-h`:
```
$ ./install -h
```
### Updating
If you run the `install` script and there is a previously installed version
of the AWS CLI v2, the script will error out. To update to the version included
in this bundle, run the `install` script with `--update`:
```
$ sudo ./install --update
```
### Removing the installation
To remove the AWS CLI v2, delete the its installation and symlinks:
```
$ sudo rm -rf /usr/local/aws-cli
$ sudo rm /usr/local/bin/aws
$ sudo rm /usr/local/bin/aws_completer
```
Note if you installed the AWS CLI v2 using the `-b` or `-i` options, you will
need to remove the installation and the symlinks in the directories you
specified.
<html>
<meta awscli client />
<ul>
<li><h3>Installationsschritte:</h3>
<ul>
<li><pre><code>curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"</code></pre>
</li>
<li><pre><code>cp ../Downloads/awscliv2.zip .</code></pre>
</li>
<li><pre><code>mkdir AWS-Console</code></pre>
</li>
<li><pre><code>mv awscliv2.zip ./AWS-Console/</code></pre>
</li>
<li><pre><code>cd AWS-Console/</code></pre>
</li>
<li><pre><code>unzip awscliv2.zip </code></pre>
</li>
<li><pre><code>sudo ./aws/install</code></pre>
</li>
</ul>
</li>
<li><h3>aktuelle Installation (2022-03-10):</h3>
<code><pre>
mueller@Debian-Laptop:~/AWS/AWS-Console$ whereis aws
aws: /usr/local/bin/aws
mueller@Debian-Laptop:~/AWS/AWS-Console$ aws --version
aws-cli/2.4.24 Python/3.8.8 Linux/5.10.0-10-amd64 exe/x86_64.debian.11 prompt/off
</pre></code>
</li>
<li><h3>Syntax:</h3>
<code><pre>
usage: aws [options] <command> <subcommand> [<subcommand> …] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
</pre></code>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>Signing in as the AWS account root user</h3>
If you're a root user, open the Sign in page, select<br />
Root user, and sign in using your AWS account root
user credentials.
</li>
<li><h3>Signing in as the AWS Identity and Access Management (IAM) user with a custom URL</h3>
Sign in using a custom URL
<pre><code>https://<em><u>account_alias_or_id</u></em>.signin.aws.amazon.com/console/</code></pre>
You must replace <b>account_alias_or_id</b> with<br />
the account alias or account ID provided by <br />
the root user.
</li>
<li><h3>Signing in as the IAM user on the Sign-in page</h3>
<ul>
<li>If you have previously signed in as the IAM user<br />
on the browser, you might see the Sign in as IAM<br />
user page when you open the Sign-in page. Your<br />
account ID or account alias might already be saved.<br />
In that case, just enter your IAM user credentials,<br />
and then choose Sign in.
</li>
<li>If you are signing in on the browser for the first time,<br />
open the Sign in page, select IAM user, and then <br />
enter the 12-digit AWS account ID or account alias.<br />
</li>
<li>Choose Next. In the Sign in as IAM user page, enter<br />
your IAM user credentials, and then choose Sign in.
</li>
</ul>
</li>
</ul>
<ul>
<li><a href="https://repost.aws/knowledge-center/sign-in-console"
target="_blank" rel="noreferrer noopener">
AWS re:Post :: How do I sign in to the AWS Management Console?</a>
</ul>
</html>
<html>
<h3>24 Examples to Manage AWS Transit Gateway and Attachments from CLI</h3>
<p>
AWS Transit gateway acts as a hub to connect multiple VPC and on-prem networks. Apart from attaching a VPC to transit hub and routing traffic, you can also attach a VPN connection or Direct Connect gateway to your transit gateway. You can also peer two transit gateways and route traffic between them.
</p>
<p>
In a multi-account environment, you can create Transit gateway in a central network account and share them with external accounts or with accounts within your organization.
</p>
<p>
This tutorial explains how to manage AWS Transit gateway and attachments using CLI commands.
<ul>
<li><b>Transit Gateway:</b><br />
Examples 1 through 6 explains how to create, view and delete Transit Gateway using CLI commands.</li><br />
<li><b>Transit Gateway Attachments to a VPC:</b><br />
Examples 7 through 14 explains how to create, modify, view and delete Transit Gateway attachments to a VPC.</li><br />
<li><b>Transit Gateway Attachments to a VPN:</b><br />
Example 15 explains how Transit Gateway attachment to a VPN is done using create-vpn-connection CLI command.</li><br />
<li><b>Sharing a Transit Gateway:</b><br />
Examples 16 through 18 explains how to use Resource access manager to share transit gateway across accounts</li><br />
<li><b>Peer two Transit Gateways:</b><br />
Examples 19 through 22 explains how to peer two transit gateways and route traffic between them using CLI.</li><br />
<li><b>Add Routes:</b><br />
Example 23 and 24 explains how to add route to a VPC route table pointing to Transit Gateway and how to add a route to a transit gateway route table</li>
</ul>
<h3>1. Create Transit Gateway using All Default Values</h3>
Use aws ec2 create-transit-gateway as shown below to create a transit gateway. This creates the transit gateway using all the default options.
<code><pre>
aws ec2 create‐transit‐gateway ‐‐description prodTGW
</pre></code>
When you don't specify any options the following default values will be used for the transit gateway options:
<ul>
<li>Amazon ASN: 64512</li>
<li>Auto accept shared attachments: disable</li>
<li>Default association route table: enable</li>
<li>Default propagation route table: enable</li>
<li>VPN ECMP support: enable</li>
<li>DNS support: enable</li>
</ul>
The following is the output of the above command:
<code><pre>
{
"TransitGateway": {
"Description": "prodTGW",
"TransitGatewayArn": "arn:aws:ec2:us-east-1:111111111111:transit-gateway/tgw-000aaabbbccdddeee",
"CreationTime": "2020-06-13T00:31:03.000Z",
"State": "pending",
"TransitGatewayId": "tgw-000aaabbbccdddeee",
"OwnerId": "111111111111",
"Options": {
"DefaultRouteTableAssociation": "enable",
"DnsSupport": "enable",
"AutoAcceptSharedAttachments": "disable",
"AssociationDefaultRouteTableId": "tgw-rtb-000aaabbbcccdddee",
"PropagationDefaultRouteTableId": "tgw-rtb-000aaabbbcccdddee",
"AmazonSideAsn": 64512,
"DefaultRouteTablePropagation": "enable",
"VpnEcmpSupport": "enable"
}
}
}
</pre></code>
If you are new to AWS CLI, refer to this: <a href="https://www.thegeekstuff.com/2019/03/aws-configure-examples/" target=_blank>The GeekStuff :: 15 AWS Configure Command Examples to Manage Multiple Profiles for CLI</a>
<h3>2. Create Transit Gateway with Custom Options ‐ Change AmazonSideASN and AutoAcceptSharedAttachments</h3>
If you want to specify your own ASN for the amazon side of the transit gateway, use the ‐‐options as shown below. This examples also enables the AutoAcceptSharedAttachments options.
<code><pre>
aws ec2 create-transit-gateway ‐‐description prodTGW \
‐‐options=AmazonSideAsn=64516,AutoAcceptSharedAttachments=enable
</pre></code>
The following is the partial output of the above command.
<code><pre>
{
"TransitGateway": {
..
..
"Options": {
"DefaultRouteTableAssociation": "enable",
"DnsSupport": "enable",
"AutoAcceptSharedAttachments": "enable",
"AssociationDefaultRouteTableId": "tgw-rtb-000aaabbbcccdddee",
"PropagationDefaultRouteTableId": "tgw-rtb-000aaabbbcccdddee",
"AmazonSideAsn": 64516,
"DefaultRouteTablePropagation": "enable",
"VpnEcmpSupport": "enable"
}
}
}
</pre></code>
<h3>3. Create Transit Gateway by Changing All Available Custom Options</h3>
The following command shows all the possible options that can be changed when creating a transit gateway
<code><pre>
aws ec2 create-transit-gateway --description prodTGW \
--options=AmazonSideAsn=64516,AutoAcceptSharedAttachments=enable,DefaultRouteTableAssociation=enable,DefaultRouteTablePropagation=enable,VpnEcmpSupport=enable,DnsSupport=enable
</pre></code>
AmazonSideAsn option takes a numeric long value. The rest of the options can the value of either enable or disable. The above example uses the shorthand syntax format for the options by separating the options by commas. You can also use the following JSON syntax format for the options:
<code><pre>
{
"AmazonSideAsn": long,
"AutoAcceptSharedAttachments": "enable"|"disable",
"DefaultRouteTableAssociation": "enable"|"disable",
"DefaultRouteTablePropagation": "enable"|"disable",
"VpnEcmpSupport": "enable"|"disable",
"DnsSupport": "enable"|"disable",
"MulticastSupport": "enable"|"disable"
}
</pre></code>
<h3>4. Create Transit Gateway with Name Tag and Description</h3>
You can also specify tags while creating the transit gateway. The following command creates the transit gateway with custom options and assigns Name tag with a value.
<code><pre>
aws ec2 create-transit-gateway --description prodTGW \
--tag-specifications "ResourceType=transit-gateway,Tags=[{Key=Name,Value=prodTGW}]" \
--options=AmazonSideAsn=64516,AutoAcceptSharedAttachments=enable,DefaultRouteTableAssociation=enable,DefaultRouteTablePropagation=enable,VpnEcmpSupport=enable,DnsSupport=enable
</pre></code>
The following is the output of the above command.:
<code><pre>
{
"TransitGateway": {
"Description": "prodTGW",
"TransitGatewayArn": "arn:aws:ec2:us-east-1:111111111111:transit-gateway/tgw-000aaabbbccdddeee",
"Tags": [
{
"Value": "prodTGW",
"Key": "Name"
}
],
"CreationTime": "2020-06-13T16:50:26.000Z",
"State": "pending",
"TransitGatewayId": "tgw-000aaabbbccdddeee",
"OwnerId": "111111111111",
"Options": {
"DefaultRouteTableAssociation": "enable",
"DnsSupport": "enable",
"AutoAcceptSharedAttachments": "enable",
"AssociationDefaultRouteTableId": "tgw-rtb-000aaabbbcccdddee",
"PropagationDefaultRouteTableId": "tgw-rtb-000aaabbbcccdddee",
"AmazonSideAsn": 64516,
"DefaultRouteTablePropagation": "enable",
"VpnEcmpSupport": "enable"
}
}
}
</pre></code>
<h3>5. Display existing Transit Gateways</h3>
The following command will display all available transit gateways:
<code><pre>
aws ec2 describe-transit-gateways
</pre></code>
To view the details of only a specific transit gateway specify the transit-gateway-id as shown below.
<code><pre>
TGW_ID=tgw-000aaabbbccdddeee
aws ec2 describe-transit-gateways --transit-gateway-ids ${TGW_ID}
</pre></code>
<h3>6. Delete Transit Gateway</h3>
Use the delete-transit-gateway as shown below by providing the transit-gateway-id
<code><pre>
TGW_ID=tgw-000aaabbbccdddeee
aws ec2 delete-transit-gateway --transit-gateway-id ${TGW_ID}
</pre></code>
You cannot delete a transit gateway when it has attachment. You'll get the following error message:
</p>
<p>
Note: An error occurred (IncorrectState) when calling the DeleteTransitGateway operation: tgw-000aaabbbccdddeee has non-deleted VPC Attachments: tgw-attach-000aaabbbcccdddee.
</p>
<p>
Note: If you have a route in the routable table of your subnet/vpc that is pointing to the deleted transit gateway, they'll have the status of blackhole. So, make sure to delete the route after deleting transit gateway.
<h3>7. Create Transit Gateway VPC Attachment with Mandatory Fields</h3>
Once you have transit gateway, you can create the following three types of attachments:
<ul>
<li>Transit Gateway VPC Attachment</li>
<li>Transit Gateway VPN Attachment</li>
<li>Transit Gateway Peering Attachment to peer with another transit gateway</li>
</ul>
The following example shows how to create a transit gateway VPC attachment.
<code><pre>
TGW_ID=tgw-000aaabbbccdddeee
VPC1=vpc-000111aaabbbcccdd
VPC1_PUBLIC_SUBNET1=subnet-111222333aaabbbcc
VPC1_PUBLIC_SUBNET2=subnet-000222aaabbbcccdd
aws ec2 create-transit-gateway-vpc-attachment \
--transit-gateway-id ${TGW_ID} \
--vpc-id ${VPC1} \
--subnet-ids ${VPC1_PUBLIC_SUBNET1} ${VPC1_PUBLIC_SUBNET2}
</pre></code>
While creating a vpc attachment, the mandatory options are vpc-id and the subnet-ids within that vpc. For example, you can create a transit gateway vpc attachment for all public subnets in that VPC across multiple AZs.
</p>
<p>
The following is the output of the above command:
<code><pre>
{
"TransitGatewayVpcAttachment": {
"VpcId": "vpc-000111aaabbbcccdd",
"VpcOwnerId": "111111111111",
"SubnetIds": [
"subnet-000222aaabbbcccdd",
"subnet-111222333aaabbbcc"
],
"TransitGatewayAttachmentId": "tgw-attach-000aaabbbcccdddee",
"CreationTime": "2020-06-13T00:48:13.000Z",
"State": "pending",
"TransitGatewayId": "tgw-000aaabbbccdddeee",
"Options": {
"DnsSupport": "enable",
"Ipv6Support": "disable"
}
}
}
</pre></code>
<h3>8. Create Transit Gateway VPC Attachment with Name Tags</h3>
The following examples shows how to create a Transit Gateway VPC Attachment with Name Tags. You can also attach multiple tags to the attachment by adding another Key/Value pair to the Tags option.
<code><pre>
TGW_ID=tgw-000aaabbbccdddeee
VPC1=vpc-000111aaabbbcccdd
VPC1_PUBLIC_SUBNET1=subnet-111222333aaabbbcc
VPC1_PUBLIC_SUBNET2=subnet-000222aaabbbcccdd
aws ec2 create-transit-gateway-vpc-attachment \
--tag-specifications "ResourceType=transit-gateway-attachment,Tags=[{Key=Name,Value=appOnPremAccess}]" \
--transit-gateway-id ${TGW_ID} \
--vpc-id ${VPC1} \
--subnet-ids ${VPC1_PUBLIC_SUBNET1} ${VPC1_PUBLIC_SUBNET2}
</pre></code>
The following is partial output of the above command.
<code><pre>
{
"TransitGatewayVpcAttachment": {
"Tags": [
{
"Value": "appOnPremAccess",
"Key": "Name"
}
],
..
..
}
}
</pre></code>
When you don't specify any options, the attachments will be created with DNS support as enable and IPv6 support as disable.
</p>
<p>
Note: An error occurred (DuplicateTransitGatewayAttachment) when calling the CreateTransitGatewayVpcAttachment operation: tgw-000aaabbbccdddeee has non-deleted Transit Gateway Attachments with same VPC ID.
<h3>9. Create Transit Gateway VPC Attachment with IPV6 Support</h3>
By default the transit gateway is created without the IPv6 support. To enable support for IPv6, use the Ipv6Support option as shown below.
<code><pre>
aws ec2 create-transit-gateway-vpc-attachment \
--tag-specifications "ResourceType=transit-gateway-attachment,Tags=[{Key=Name,Value=appOnPremAccess}]" \
--options "Ipv6Support=enable" \
--transit-gateway-id ${TGW_ID} \
--vpc-id ${VPC1} \
--subnet-ids ${VPC1_PUBLIC_SUBNET1} ${VPC1_PUBLIC_SUBNET2}
</pre></code>
If you don't have IPv6 CIDR blocks associated with your subnets, you'll get the following error message:
</p>
<p>
Note: An error occurred (InvalidParameterCombination) when calling the CreateTransitGatewayVpcAttachment operation: subnet-000222aaabbbcccdd has no IPv6 CidrBlocks associated
<h3>10. Create Transit Gateway VPC Attachment with All Available Custom Options</h3>
<code><pre>
aws ec2 create-transit-gateway-vpc-attachment \
--tag-specifications "ResourceType=transit-gateway-attachment,Tags=[{Key=Name,Value=appOnPremAccess}]" \
--options "DnsSupport=disable,Ipv6Support=disable" \
--transit-gateway-id ${TGW_ID} \
--vpc-id ${VPC1} \
--subnet-ids ${VPC1_PUBLIC_SUBNET1} ${VPC1_PUBLIC_SUBNET2}
</pre></code>
The above example uses the shorthand syntax format for the options by separating the options by commas. You can also use the following JSON syntax format for the options:
<code><pre>
{
"DnsSupport": "enable"|"disable",
"Ipv6Support": "enable"|"disable"
}
</pre></code>
<h3>11. Modify Transit Gateway VPC Attachments ‐ Add or Remove Subnets</h3>
After creating a transit gateway VPC attachment, you can add or remote subnets as shown below.
<code><pre>
VPC1_TGW_ATTACHMENT_ID=tgw-attach-000aaabbbcccdddee
aws ec2 modify-transit-gateway-vpc-attachment \
--transit-gateway-attachment-id ${VPC1_TGW_ATTACHMENT_ID} \
--remove-subnet-ids subnet-111222333aaabbbcc \
--add-subnet-ids subnet-222111000aaabbbcc
</pre></code>
The following is the output of the above command:
<code><pre>
{
"TransitGatewayVpcAttachment": {
"TransitGatewayAttachmentId": "tgw-attach-000aaabbbcccdddee",
"TransitGatewayId": "tgw-000aaabbbccdddeee",
"VpcId": "vpc-d4ef7eaf",
"VpcOwnerId": "222222222222",
"State": "modifying",
"SubnetIds": [
"subnet-222111000aaabbbcc",
"subnet-111222333aaabbbcc",
"subnet-000222aaabbbcccdd"
],
"CreationTime": "2020-06-13T19:31:19+00:00",
"Options": {
"DnsSupport": "enable",
"Ipv6Support": "disable"
}
}
}
</pre></code>
<p>
As you see from the above output, while the status is in “modifying“, you'll still see the subnet that is currently getting deleted. After few seconds when the state become “available“, you should see only 2 subnets for this transit gateway attachment.
</p>
<p>
An error occurred (InvalidSubnetID.NotFound) when calling the ModifyTransitGatewayVpcAttachment operation: The subnet ID 'subnet-' does not exist
</p>
<h3>12. Modify Transit Gateway VPC Attachments ‐ Changing Options</h3>
You can also change the default options after the attachments was created. The following example shows how you can change the DNS support and IPv6 support option on the transit gateway attachment.
<code><pre>
VPC1_TGW_ATTACHMENT_ID=tgw-attach-000aaabbbcccdddee
aws ec2 modify-transit-gateway-vpc-attachment \
--transit-gateway-attachment-id ${VPC1_TGW_ATTACHMENT_ID} \
--options DnsSupport=disable,Ipv6Support=disable
</pre></code>
While modifying the attachment, you can also modify the options and add/remove subnets at the same time as shown below.
<code><pre>
VPC1_TGW_ATTACHMENT_ID=tgw-attach-000aaabbbcccdddee
aws ec2 modify-transit-gateway-vpc-attachment \
--transit-gateway-attachment-id ${VPC1_TGW_ATTACHMENT_ID} \
--options DnsSupport=enable,Ipv6Support=disable \
--remove-subnet-ids subnet-222111000aaabbbcc \
--add-subnet-ids subnet-111222333aaabbbcc
</pre></code>
<h3>13. Display existing Transit Gateway Attachments</h3>
The following example will display all available transit gateway attachments in your account:
<code><pre>
aws ec2 describe-transit-gateway-attachments
</pre></code>
You can also view the details of a specific attachment by specifying the transit-gateway-attachment-ids as shown below.
<code><pre>
VPC1_TGW_ATTACHMENT_ID=tgw-attach-000aaabbbcccdddee
aws ec2 describe-transit-gateway-attachments --transit-gateway-attachment-ids ${VPC1_TGW_ATTACHMENT_ID}
</pre></code>
The following the the output of the above command:
<code><pre>
{
"TransitGatewayAttachments": [
{
"ResourceOwnerId": "111111111111",
"TransitGatewayAttachmentId": "tgw-attach-000aaabbbcccdddee",
"ResourceType": "vpc",
"ResourceId": "vpc-000111aaabbbcccdd",
"Tags": [
{
"Value": "appOnPremAccess",
"Key": "Name"
}
],
"CreationTime": "2020-06-13T01:10:17.000Z",
"State": "available",
"TransitGatewayId": "tgw-000aaabbbccdddeee",
"TransitGatewayOwnerId": "111111111111",
"Association": {
"State": "associated",
"TransitGatewayRouteTableId": "tgw-rtb-000aaabbbcccdddee"
}
}
]
}
</pre></code>
<h3>14. Delete Transit Gateway VPC Attachment</h3>
The following example shows how to delete an existing transit gateway vpc attachment.
<code><pre>
VPC1_TGW_ATTACHMENT_ID=tgw-attach-000aaabbbcccdddee
aws ec2 delete-transit-gateway-vpc-attachment \
--transit-gateway-attachment-id ${VPC1_TGW_ATTACHMENT_ID}
</pre></code>
The output of the above command will show that the attachment is currently in deleting state.
<code><pre>
{
"TransitGatewayVpcAttachment": {
"VpcId": "vpc-000111aaabbbcccdd",
"VpcOwnerId": "111111111111",
"TransitGatewayAttachmentId": "tgw-attach-000aaabbbcccdddee",
"CreationTime": "2020-06-13T00:58:31.000Z",
"State": "deleting",
"TransitGatewayId": "tgw-000aaabbbccdddeee"
}
}
</pre></code>
<h3>15. Create a Transit Gateway attachment to a VPN</h3>
Similar to creating a transit gateway attachment to a VPC, you can also create an attachment to a VPN.
</p>
<p>
For this, you'll create the VPN connection by specifying transit-gateway-id along with customer-gateway-id as shown below.
<code><pre>
CGW_ID=cgw-000111333aaabbbcc
TGW_ID=tgw-000aaabbbccdddeee
aws ec2 create-vpn-connection \
--customer-gateway-id ${CGW_ID} \
--type ipsec.1 \
--transit-gateway-id ${TGW_ID}
</pre></code>
Note: Don't forget to specify the VPN type as ipsec.1
</p>
<p>
The following is the partial output of the above command.
<code><pre>
{
"VpnConnection": {
"CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-
..
..
</vpn_connection>",
"CustomerGatewayId": "cgw-000111333aaabbbcc",
"Category": "VPN",
"State": "pending",
"VpnConnectionId": "vpn-000111222333aaabb",
"TransitGatewayId": "tgw-000aaabbbccdddeee",
"Options": {
"EnableAcceleration": false,
"StaticRoutesOnly": false,
"TunnelOptions": [
..
..
}
</pre></code>
</p>
<p>
While creating the VPN connection, you can also specify various TunnelOptions in JSON format.
</p>
<p>
For example to use static route only with the VPN connection, set the option as shown below in the above command.
<code><pre>
‐‐options "{\"StaticRoutesOnly\":true}"
</pre></code>
</p>
<p>
Once you create a VPN transit gateway attachment, you'll see the ResourceType in the describe command output as “vpn“
</p>
<p>
The following example shows that there are two attachments. One is vpc and another one is vpn.
<code><pre>
$ aws ec2 describe-transit-gateway-attachments
{
"TransitGatewayAttachments": [
{
"TransitGatewayAttachmentId": "tgw-attach-000aaabbbcccdddee",
"ResourceType": "vpc",
..
..
},
{
"TransitGatewayAttachmentId": "tgw-attach-03210321aaabbbccc",
"ResourceType": "vpn",
..
..
},
...
</pre></code>
<h3>16. Create Resource Access Share for Transit Gateway in 1st Account</h3>
To share transit gateway across accounts use the AWS Resource Access Manager.
</p>
<p>
The following example shows how to create a resource share and associate transit gateway to it.
</p>
<p>
In this example the transit gateway was created in 111111111111 account. From this account, we are creating a resource share and sharing it with 222222222222 account.
<code><pre>
aws ram create-resource-share \
--name tgwDevShares \
--resource-arns arn:aws:ec2:us-east-1:111111111111:transit-gateway/tgw-000aaabbbccdddeee \
--principals 222222222222 \
--tags "key=Name,value=devShare"
</pre></code>
</p>
Here is the output for the above command.
<code><pre>
{
"resourceShare": {
"status": "ACTIVE",
"owningAccountId": "111111111111",
"allowExternalPrincipals": true,
"name": "tgwDevShares",
"tags": [
{
"value": "devShare",
"key": "Name"
}
],
"creationTime": 1641722024.078,
"resourceShareArn": "arn:aws:ram:us-east-1:111111111111:resource-share/11111111-2222-aaaa-bbbb-cccccccccccc",
"lastUpdatedTime": 1522722024.064
}
}
</pre></code>
<h3>17. Accept the Transit Gateway Resource Share from 2nd Account</h3>
Make sure the AWS CLI is now connected to the 2nd account 222222222222.
Execute the following command to view all the resource share invitations on the 2nd account.
<code><pre>
aws ram get-resource-share-invitations
</pre></code>
The output indicates that this invitation is still in pending status.
<code><pre>
{
"resourceShareInvitations": [
{
"resourceShareInvitationArn": "arn:aws:ram:us-east-1:111111111111:resource-share-invitation/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"resourceShareName": "tgwDevShares",
"resourceShareArn": "arn:aws:ram:us-east-1:111111111111:resource-share/11111111-2222-aaaa-bbbb-cccccccccccc",
"senderAccountId": "111111111111",
"receiverAccountId": "222222222222",
"invitationTimestamp": "2020-06-13T10:00:24.249000-07:00",
"status": "PENDING"
}
]
}
</pre></code>
Get the resourceShareInvitationArn from the above output.
Note: The ARN for the resource share invitation is different than the resource share ARN.
Using the resourceShareInvitationArn accept the invitation as shown below:
<code><pre>
aws ram accept-resource-share-invitation \
--resource-share-invitation-arn arn:aws:ram:us-east-1:111111111111:resource-share-invitation/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
</pre></code>
Once the invitation is accepted, the status of this resource share invitation will change to accepted as shown below.
<code><pre>
{
"resourceShareInvitation": {
"resourceShareInvitationArn": "arn:aws:ram:us-east-1:111111111111:resource-share-invitation/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"resourceShareName": "tgwDevShares",
"resourceShareArn": "arn:aws:ram:us-east-1:111111111111:resource-share/11111111-2222-aaaa-bbbb-cccccccccccc",
"senderAccountId": "111111111111",
"receiverAccountId": "222222222222",
"invitationTimestamp": "2020-06-13T10:57:03.509000-07:00",
"status": "ACCEPTED"
}
}
</pre></code>
<h3>18. From 1st Account Accept Transit Gateway Attachments Created in 2nd Account</h3>
Now that transit gateway is shared from 1st account to 2nd account, you can create transit gateway attachments on the 2nd account.
After that, if the AutoAcceptSharedAttachments is disabled on the transit gateway, you should manually accept the attachments from the 1st account.
First, execute the following command to see if any attachments needs to accepted.
<code><pre>
aws ec2 describe-transit-gateway-vpc-attachments
</pre></code>
As shown below, if the attachment is still not accepted the State will be shown as pendingAcceptance.
<code><pre>
{
"TransitGatewayVpcAttachments": [
{
"TransitGatewayAttachmentId": "tgw-attach-000aaabbbcccdddee",
..
..
"State": "pendingAcceptance",
}
]
}
</pre></code>
Get the TransitGatewayAttachmentId from the above output and accept the attachment as shown below:
<code><pre>
aws ec2 accept-transit-gateway-vpc-attachment \
--transit-gateway-attachment-id tgw-attach-000aaabbbcccdddee
</pre></code>
The status will change from pending acceptance to pending to available.
<h3>19. Create Transit Gateway Attachment for TGW Peering from 1st Account</h3>
When you have two transit gateways you can peer those and route traffic between those. You can peer transit gateway from another region and even from another account.
For this you should first create a transit gateway peering attachment from the 1st account where your 1st TGW exist.
From the 1st account, execute the following command to create the peering attachment:
<code><pre>
TGW_ID=tgw-000aaabbbccdddeee
PEER_TGW_ID=tgw-222333444aaabbbcc
PEER_ACCOUNT_ID=222222222222
PEER_REGION=us-east-2
aws ec2 create-transit-gateway-peering-attachment \
--transit-gateway-id ${TGW_ID} \
--peer-transit-gateway-id ${PEER_TGW_ID} \
--peer-account-id ${PEER_ACCOUNT_ID} \
--peer-region ${PEER_REGION}
</pre></code>
In the above:
TGW_ID ‐ This is the 1st transit gateway that is in your account (1st account)
PEER_TGW_ID ‐ This is the 2nd transit gateway that is in another account (2nd account) that is referred by PEER_ACCOUNT_ID
PEER_REGION The region in which the PEER_TGW_ID exists
The following is the output of the above command.
<code><pre>
{
"TransitGatewayPeeringAttachment": {
"TransitGatewayAttachmentId": "tgw-attach-111222333aaabbbcc",
"RequesterTgwInfo": {
"TransitGatewayId": "tgw-000aaabbbccdddeee",
"OwnerId": "111111111111",
"Region": "us-east-1"
},
"AccepterTgwInfo": {
"TransitGatewayId": "tgw-222333444aaabbbcc",
"OwnerId": "111111111111",
"Region": "us-east-2"
},
"State": "initiatingRequest",
"CreationTime": "2020-06-13T22:15:54+00:00"
}
}
</pre></code>
Initially the status will be in initiating request and then change to pending acceptance
<h3>20. Accept Transit Gateway Peering Attachment Request from 2nd Account</h3>
Now login to the 2nd account that is referred by PEER_ACCOUNT_ID in the above command and accept the peering attachment request.
<code><pre>
PEER_TGW_ATTACHMENT_ID=tgw-attach-111222333aaabbbcc
PEER_REGION=us-east-2
aws ec2 accept-transit-gateway-peering-attachment \
--transit-gateway-attachment-id ${PEER_TGW_ATTACHMENT_ID} \
--region ${PEER_REGION}
</pre></code>
The following is the output of the above command:
<code><pre>
{
"TransitGatewayPeeringAttachment": {
"TransitGatewayAttachmentId": "tgw-attach-111222333aaabbbcc",
"RequesterTgwInfo": {
"TransitGatewayId": "tgw-000aaabbbccdddeee",
"OwnerId": "111111111111",
"Region": "us-east-1"
},
"AccepterTgwInfo": {
"TransitGatewayId": "tgw-222333444aaabbbcc",
"OwnerId": "222222222222",
"Region": "us-east-2"
},
"State": "pending",
"CreationTime": "2020-06-13T22:16:17+00:00"
}
}
</pre></code>
Once the peering attachment is created, modify the transit gateway route table and add a static route to point to this peering attachment.
<h3>21. List all Transit gateway Peering Attachments</h3>
Execute the following command to view the details of your existing transit gateway peering attachment.
<code><pre>
aws ec2 describe-transit-gateway-peering-attachments
{
"TransitGatewayPeeringAttachments": [
{
"TransitGatewayAttachmentId": "tgw-attach-111222333aaabbbcc",
"RequesterTgwInfo": {
"TransitGatewayId": "tgw-000aaabbbccdddeee",
"OwnerId": "111111111111",
"Region": "us-east-1"
},
"AccepterTgwInfo": {
"TransitGatewayId": "tgw-222333444aaabbbcc",
"OwnerId": "111111111111",
"Region": "us-east-2"
},
"Status": {
"Code": "available",
"Message": "Available"
},
"State": "available",
"CreationTime": "2020-06-13T22:15:54+00:00",
"Tags": []
}
]
}
</pre></code>
<h3>22. Delete Transit Gateway Peering Attachment</h3>
Use the following delete-transit-gateway-peering-attachment to delete the peering attachment.
<code><pre>
PEER_TGW_ATTACHMENT_ID=tgw-attach-111222333aaabbbcc
aws ec2 delete-transit-gateway-peering-attachment \
--transit-gateway-attachment-id ${PEER_TGW_ATTACHMENT_ID}
</pre></code>
Here is the output of the above command:
<code><pre>
{
"TransitGatewayPeeringAttachment": {
"TransitGatewayAttachmentId": "tgw-attach-111222333aaabbbcc",
"RequesterTgwInfo": {
"TransitGatewayId": "tgw-000aaabbbccdddeee",
"OwnerId": "111111111111",
"Region": "us-east-1"
},
"AccepterTgwInfo": {
"TransitGatewayId": "tgw-222333444aaabbbcc",
"OwnerId": "111111111111",
"Region": "us-east-2"
},
"State": "deleting",
"CreationTime": "2020-06-13T22:15:54+00:00"
}
}
</pre></code>
Please note that you cannot use vpc-attachment command to delete it. You'll get an error as shown below.
<code><pre>
$ aws ec2 delete-transit-gateway-vpc-attachment \
--transit-gateway-attachment-id ${PEER_TGW_ATTACHMENT_ID}
</pre></code>
An error occurred (InvalidTransitGatewayAttachmentID.NotFound) when calling the DeleteTransitGatewayVpcAttachment operation: Transit Gateway Attachment tgw-attach-111222333aaabbbcc was deleted or does not exist.
<h3>23. Add Route to VPC Route Table with Entries pointing to Transit Gateway</h3>
Once you have the transit gateway created, you can add a route to your subnet routetable pointing it to the transit gateway as shown below.
<code><pre>
VPC1_PUBLIC_SUBNET_ROUTETABLE=rtb-111222333444555
aws ec2 create-route \
--route-table-id ${VPC1_PUBLIC_SUBNET_ROUTETABLE} \
--destination-cidr-block 10.0.0.0/8 \
--transit-gateway-id ${TGW_ID}
</pre></code>
If the route was added properly, you'll get the following message:
<code><pre>
{
"Return": true
}
</pre></code>
Note: An error occurred (MissingParameter) when calling the CreateRoute operation: The request must contain exactly one of gatewayId, natGatewayId, networkInterfaceId, vpcPeeringConnectionId, egressOnlyInternetGatewayId, transitGatewayId, localGatewayId or instanceId
<h3>24. Add a route to the transit gateway route table</h3>
If you want to add a route directly to the transit gateway route table, use the create-transit-gateway-route option as shown below.
In this example, the given static route is added to the TGW_ROUTE_TABLE_ID route table. In this route, any traffic going to CIDR will use TGW_ATTACHMENT_ID.
<code><pre>
CIDR=10.10.10.0/32
TGW_ROUTE_TABLE_ID=tgw-rtb-555444333222aaabb
TGW_ATTACHMENT_ID=tgw-attach-03210321aaabbbccc
aws ec2 create-transit-gateway-route \
--destination-cidr-block ${CIDR} \
--transit-gateway-route-table-id ${TGW_ROUTE_TABLE_ID} \
--transit-gateway-attachment-id ${TGW_ATTACHMENT_ID}
</pre></code>
The following is the output of the above command. This indicates that the static route was added successfully and it's active.
<code><pre>
{
"Route": {
"DestinationCidrBlock": "10.10.10.0/32",
"TransitGatewayAttachments": [
{
"ResourceId": "vpn-000aaacccddd66655",
"TransitGatewayAttachmentId": "tgw-attach-03210321aaabbbccc",
"ResourceType": "vpn"
}
],
"Type": "static",
"State": "active"
}
}
</pre></code>
<br />
<h3>Links:</h3>
<ul>
<li><a href="https://www.thegeekstuff.com/2020/09/aws-transitgateway-attachments-cli/" target=_blank>TheGeekStuff :: AWS transit gateway</a></li>
</ul>
</html>
<html>
There are several methods of using AWS:
<ul>
<li><b>Free Tier</b>, available to anyone: <a href="https://aws.amazon.com/free/" target="_blank" noreferrer noopener>https://aws.amazon.com/free/</a></li>
<li><b>AWS Educate</b>, available to students and faculty</li>
<li><b>AWS Academy</b>, available to students and faculty</li>
<li>Your own personal account</li>
<li>Your organization's AWS account</li>
</html>
<html>
<ul>
<li>Der Amazon Passkey steht allen Amazon-Kunden zur Verfügung. Es handelt sich um eine alternative Login-Methode über eine PIN, den Fingerabdruck-Sensor oder Face ID.
<ul>
<li>Zum aktuellen Zeitpunkt (Stand: Oktober 2023) können Sie den Passkey über ausgewählte Browser wie Chrome und auf mobilen iOS-Endgeräten nutzen. Der Support für Android-Endgeräte soll noch ermöglicht werden.
</li>
<li>Die Einrichtung erfolgt direkt über Ihr Amazon-Kundenkonto. Loggen Sie sich dafür wie gewohnt ein und wechseln Sie zu Mein Konto. Dort finden Sie das Untermenü Anmelden und Sicherheit.
</li>
<li>Suchen Sie die Option Passkey und klicken Sie auf Einrichten. Anschließend können Sie auswählen, ob Sie den Passkey für einen Browser oder Ihr mobiles Endgerät einrichten wollen.
</li>
<li>Wählen Sie die gewünschte Variante aus und folgen Sie den Bildschirmanweisungen, um die Einrichtung abzuschließen. Danach können Sie sich einfach über eine PIN, Face ID oder den Fingerabdrucksensor Ihres Geräts anmelden und benötigen nicht mehr Ihr Passwort.
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://praxistipps.chip.de/amazon-passkey-login-einfach-erklaert_168523"
target="_blank" rel="noreferrer noopener">
CHIP Praxistipps :: Amazon Passkey: Login einfach erklärt</a>
</li>
<li><a href="file:///media/mueller/INT-256GB/AWS-AmazonWebServices/AWS_IAM-IdentityAndAccessManagement_iam-ug-1.pdf"
target="_blank" rel="noreferrer noopener">
AWS :: AWS Identity and Access Management - User Guide</a>
</li>
<li><a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable_fido.html"
target="_blank" rel="noreferrer noopener">
AWS Online Docu :: Assign a passkey or security key in the AWS Management Console</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>CloudFormation :: Create and Manage Resources with Templates</li>
<li>CodePipeline :: Release Software using Continuous Delivery</li>
<li>IAM, Identity and Access Management :: Manage access to AWS resources</li>
<li>CodeCommit :: Store Code in Private Git Repositories</li>
<li>Elastic Beanstalk :: PaaS, Platform as a Service</li>
</ul>
</html>
<html>
Once you create a Managed AD in an AWS account, <br />
you can share this AD with other accounts.<br />
<br />
This is a common use-case when you have AWS <br />
Managed Active Directory in a shared services <br />
account that needs to be shared with other workload <br />
accounts.<br />
<br />
The following are few points to keep in mind:
<ul>
<li>Sharing to another account can happen only within <br />
the same region where the Managed AD resides</li>
<li>Shared directory will be visible to all the VPCs in the<br />
workload accounts</li>
<li>The shared directory on the workload account will <br />
get a directory id that is different than the original direc‐<br />
tory id in the shared services account.</li>
<li>If Managed AD directory is in an account where <br />
organization is enabled, then you also have the option<br />
of sharing it with all the accounts within the organiza‐<br />
tion or with a specific account</li>
</ul>
This tutorial covers the following examples:
<ol>
<li>Share Managed AD ‐ AWS CLI</li>
<li>View Current Managed AD Shares ‐ AWS CLI</li>
<li>Accept Directory Sharing ‐ AWS CLI</li>
<li>Unshare Directory ‐ AWS CLI</li>
<li>Reject Sharing ‐ AWS CLI</li>
<li>Share Managed AD ‐ AWS Console</li>
<li>Accept or Reject Directory Sharing ‐ AWS Console</li>
<li>Unshare Directory ‐ AWS Console</li>
<h3>1. Share Managed AD ‐ AWS CLI</h3>
First, set the source directory id, and the destination AWS workload account number.
<code><pre>
DIRECTORY_ID=d-123abc4567
WORKLOAD_ACCOUNT=222222222222
</pre></code>
Execute the following command to share the directory to the workload account. Execute this command using the shared services account credentials.
<code><pre>
aws ds share-directory --directory-id ${DIRECTORY_ID} \
--share-notes "AD Directory for workload accounts" \
--share-target "Id=${WORKLOAD_ACCOUNT},Type=ACCOUNT" \
--share-method HANDSHAKE
</pre></code>
To setup your aws profiles properly before executing your CLI commands, refer to this: 15 AWS Configure Command Examples to Manage Multiple Profiles for CLI
In the above example:
<ul>
<li>DIRECTORY_ID ‐ This is the Managed AD directory id that is in the shared services account</li>
<li>WORKLOAD_ACCOUNT ‐ This is the AWS account number of the workload account to which you are sharing the Managed AD</li>
<li>share-method ‐ Since we are specifically sharing with another account, use HANDSHAKE as the method</li>
</ul>
The following is the output of the above command, which displays the shared directory id.
<code><pre>
{
"SharedDirectoryId": "d-444efg5555"
}
</pre></code>
<h3>2. View Current Managed AD Shares ‐ AWS CLI</h3>
Once you've shared a directory, you can view the current status of the sharing, and also to get a list of all the existing shares as shown below.
<code><pre>
DIRECTORY_ID=d-123abc4567
aws ds describe-shared-directories \
--owner-directory-id ${DIRECTORY_ID}
</pre></code>
The following is an example output:
<code><pre>
{
"SharedDirectories": [
{
"OwnerDirectoryId": "d-123abc4567",
"ShareNotes": "AD Directory for workload accounts",
"ShareMethod": "HANDSHAKE",
"CreatedDateTime": 1558566663.171,
"SharedAccountId": "222222222222",
"SharedDirectoryId": "d-444efg5555",
"ShareStatus": "PendingAcceptance",
"OwnerAccountId": "111111111111",
"LastUpdatedDateTime": 1558566663.171
}
]
}
</pre></code>
Note: In the above output, the ShareStatus is PendingAcceptance. This will change to “Shared“ once the workload account accept the share request.
<h3>3. Accept Directory Sharing ‐ AWS CLI</h3>
Use the workload account credentials to accept the directory sharing as shown below.
<code><pre>
aws ds accept-shared-directory \
--shared-directory-id d-444efg5555
</pre></code>
In the above example, d-444efg5555 is the shared directory id (not the directory id of the Managed AD in the shared services account).
Few ways to get the shared directory id:
<ul>
<li>You'll get this as an output from this CLI: aws ds share-directory</li>
<li>Login to the workload account, and get the directory id from the console</li>
<li>Use aws ds describe-shared-directories on the workload account, to get this id</li>
</ul>
<h3>4. Unshare Directory ‐ AWS CLI</h3>
First, set the source directory id, and the destination AWS workload account number.
<code><pre>
DIRECTORY_ID=d-123abc4567
WORKLOAD_ACCOUNT=222222222222
</pre></code>
Execute the following command to share the directory to the workload account. Execute this command using the shared services account credentials.
<code><pre>
aws ds unshare-directory --directory-id ${DIRECTORY_ID} \
--unshare-target "Id=${WORKLOAD_ACCOUNT},Type=ACCOUNT"
</pre></code>
<h3>5. Reject Sharing ‐ AWS CLI</h3>
Use the workload account credentials to reject the directory sharing as shown below.
<code><pre>
aws ds reject-shared-directory \
--shared-directory-id d-444efg5555
</pre></code>
In the above example, d-444efg5555 is the shared directory id (not the directory id of the Managed AD in the shared services account).
<h3>6. Share Managed AD ‐ AWS Console</h3>
Login to your shared services account where Managed AD resides.
Go to Directory Service → Directories → Click on the directory id d-123abc4567 ‐ Below the “Directory details“, click on “Scale & Share“ tab.<br />
<br />
<img src="./pictures/TGS-AWS_1-mad-create-new-shared-directory.png" width=100 height=100 title="AWS Managed AD - Create Shared Directory"/><br />
<br />
From the action menu, click on “Create new shared directory“:<br />
<br />
<img src="./pictures/TGS-AWS_2-mad-share-your-directory.png" width=100 height=100 title="AWS Managed AD Share Directory" /><br />
<br />
<ul>
<li>In the “Choose which AWS accounts to share with“ section, select “Share this directory with other AWS accounts“</li>
<li>Enter the workload account number and click on Add</li>
<li>In the “Send a note“ section, type a message that will be seen by the workload account. This is an optional field.</li>
<li>Click on “Share“</li>
</ul>
<h3>7. Accept or Reject Directory Sharing ‐ AWS Console</h3>
Login to the workload account AWS console.<br />
<br />
Go to Directory Service -> Directories shared with me.<br />
<br />
On the top, you'll see this message:
You have a pending invitation to use a shared directory hosted by another AWS account. An administrator in another AWS account has invited you to access their AWS Managed Microsoft AD directory.<br />
<br />
Select this directory ‐ Click on Review ‐ Click on “Accept“ (or) Click on “Reject“<br />
<br />
<img src="./pictures/TGS-AWS_4-mad-workload-account-accept-reject.png" width=100 heigth=100 title="Managed AD Sharing Accept or Reject"/><br />
<h3>8. Unshare Directory ‐ AWS Console</h3>
Login to your shared services account where Managed AD resides.<br />
<br />
Go to Directory Service → Directories → Click on the directory id d-123abc4567 ‐ Below the “Directory details“, click on “Scale & Share“ tab.<br />
<br />
From the action menu, click on “Unshare directory“ ‐ Click on “Unshare“<br />
<br />
<img src="./pictures/TGS-AWS_3-mad-unshare-directory.png" width=100 height=100 title="Managed AD Unshare Directory"/><br />
<br />
<h3>Links:</h3>
<a href="https://www.thegeekstuff.com/2019/06/aws-managed-ad-sharing-cli-console/" target=_blank>TheGeekStuff :: AWS managed AD</a>
</html>
<html>
Using .exrc file<br />
<br />
Abbreviate in vi...<br />
As well as using map in your .exrc file, you can use the command:<br />
<br />
<code>ab</code><br /><br />
For example:<br />
<code>ab xmas Christmas</code><br />
<br />
So whenever you type xmas - Christmas will be displayed.<br />
Handy for writing the /etc/motd file (maint - maintenance etc).<br />
<br />
You can also use the standard set commands - for example:<br />
<br />
<code>set number</code> (handy for programmers)<br />
<code>set redraw<br />
set warn</code> (flashes screen instead of using the bell)<br />
<br />
This tip generously supported <br />
by: mbatchelor@enterprise.net<br />
</html>
<html>
<style>
CRL {
color: red;
}
</style>
<ul>
<li>Basis-Link:
<pre><code>https://www.adesso-online.de/sites/adesso.spotlight-verlag.de/files/</code></pre>
</li>
<li>der ist um folgende Angaben zu erweitern/ergänzen:
<pre><code><CRL><em>YYYY</em></CRL>–<CRL><em>MM</em></CRL>/<CRL><em>Nummer–der–Ausgabe, z.B. 0124</em></CRL>Plus_.mp3</code></pre>
</li>
<li>Beispiel:
<pre><code>https://www.adesso-online.de/sites/adesso.spotlight-verlag.de/files/2024-08/Plus%20%289%29.mp3</pre></code>
</ul>
</html>
<html>
To Make a file look older.<br />
<br />
Use <b>touch -t</b> option to change the time stamp of a file syntax is:
<code><pre>
touch -t ccyymmddhhMMSS filename
</pre></code>
You can manipulate the timings of your files using this option.<br />
<br />
This tip generously supported by: deepak.singla@ehpt.com
</html>
<html>
<b>Anmerkung:</b><br />
Einige Shortcuts unterscheiden sich zum Reader X.<br />
<br />
Per default, all single-key shortcuts are disabled. Enable them in<br />
<b>Edit</b> <br />
→ <b>Preferences</b> <br />
→ <b>General (on the left)</b><br />
→ <b>"Use single-key accelerators to access tools"</b> (first option)<br />
<h3>Select Tools</h3>
<table border="1">
<tr> <td>H (Shift-h)</td> <td>Use hand tool</td> </tr>
<tr> <td>V (Shift-v)</td> <td>Use select tool</td>
<tr> <td>G</td> <td>Use snapshot tool</td>
<table>
<h3>Zoom Features</h3>
<table border="1">
<tr> <td>Ctrl+0/Ctrl+1</td> <td>Zoom in / zoom out (or ctrl + mouse scroll)</td> </tr>
<tr> <td>Ctrl+2/Ctrl+3 </td> <td>Zoom to fit width / zoom to fit visible</td> </tr>
<tr> <td>Ctrl+4 </td> <td>Reflow document. May make it easier to read</td> </tr>
<tr> <td>Ctrl+Y </td> <td>Zoom to specific Magnification</td> </tr>
<table>
<h3>Navigation</h3>
<table border="1">
<tr> <td>Arrow Down/Arrow Up</td> <td>Scroll down / scroll up</td> </tr>
<tr> <td>Page Down/Page Up </td> <td>Jump one screen down / one screen up</td> </tr>
<tr> <td>Ctrl+Home/Ctrl+End </td> <td>Jump to beginning/ jump to end of document</td> </tr>
<tr> <td>Ctrl+Page Down/Ctrl+Page Up </td> <td>Jump one page down / one page up</td> </tr>
<tr> <td>Alt+Arrow Left/Alt+Arrow Right </td> <td>Jump to previously visited page / next page or view</td> </tr>
<tr> <td>Ctrl+Shift+N </td> <td>Goto page number specified</td> </tr>
<tr> <td>Ctrl+Shift+H </td> <td>Turn automatic scrolling on or off. Use arrow up / arrow down to control speed and direction</td> </tr>
<tr> <td> </td> <td> </td></tr>
<tr> <td> Strg+Tab </td> <td> Wechsel zur nächsten Registerkarte des geöffneten Dokuments<br /> (wenn mehrere Dokumente im gleichen Fenster geöffnet sind) </td> </tr>
<tr> <td> Strg+Umschalt+Tab</td> <td> Wechsel zur vorherigen Registerkarte des geöffneten Dokuments <br />(wenn mehrere Dokumente im gleichen Fenster geöffnet sind) </td> </tr>
<tr> <td> Strg+F6</td> <td> Wechsel zu nächstem geöffneten Dokument<br /> (Dokumentfenster ist aktiviert)</td> </tr>
<tr> <td>Strg+Umschalt+F6 </td> <td> Wechsel zu vorherigem geöffneten Dokument<br /> (Dokumentfenster ist aktiviert)</td> </tr>
<table>
<h3>Change View</h3>
<table border="1">
<tr> <td>Ctrl+Shift+[+] </td> <td>Rotate page clockwise</td> </tr>
<tr> <td>Ctrl+Shift+- </td> <td>Rotate page counter-clockwise</td> </tr>
<tr> <td>Ctrl+H </td> <td>Turn Reading Mode on or off (hide toolbar and menu bar)</td> </tr>
<tr> <td>Ctrl+L </td> <td>Turn Full Screen Mode on or off</td> </tr>
<tr> <td>F4 </td> <td>Show/hide Navigation Pane</td> </tr>
<tr> <td>Shift + F4 </td> <td>Show/hide Tools Pane</td> </tr>
<tr> <td>F8 </td> <td>Show/hide Toolbars</td> </tr>
<tr> <td>Alt + F8 </td> <td>Reset Toolbars</td> </tr>
<tr> <td>F9 </td> <td>Show/hide Menu (file, edit, etc.)</td> </tr>
<table>
<h3>Find and Select</h3>
<table border="1">
<tr> <td>Ctrl+F </td> <td>Find box (use f6 to jump between window elements to get back to document)</td> </tr>
<tr> <td>F3/Shift+F3 </td> <td>Find next / find previous (alternative is ctrl+g / ctrl+shift+g)</td> </tr>
<tr> <td>Ctrl+A </td> <td>Select all</td> </tr>
<tr> <td>Ctrl+Shift+A </td> <td>De-select all</td> </tr>
<table>
<h3>Acrobat Features</h3>
<table border="1">
<tr> <td>Shift+U </td> <td>Highlight text<br /> (zuerst Tastenkombination, dann String markieren)</td> </tr>
<tr> <td>U </td> <td>Strikethrough text<br /> (zuerst Tastenkombination, dann String markieren)</td> </tr>
<tr> <td>Ctrl+D </td> <td>Document properties</td> </tr>
<tr> <td>Ctrl+Shift+S </td> <td>Save a copy</td> </tr>
<tr> <td>Ctrl+P </td> <td>Print Page menu</td> </tr>
<tr> <td>Ctrl+O </td> <td>Open File</td> </tr>
<tr> <td>Ctrl+W </td> <td>Close current document</td> </tr>
<tr> <td>Ctrl+Q </td> <td>Exit (close all documents)</td> </tr>
<table>
<br />
</html>
<html>
<b>Anmerkung:</b><br />
Einige Shortcuts unterscheiden sich zum Reader DC.<br />
<br />
Per default, all single-key shortcuts are disabled. Enable them in<br />
<b>Edit</b> <br />
→ <b>Preferences</b> <br />
→ <b>General (on the left)</b><br />
→ <b>"Use single-key accelerators to access tools"</b> (first option)<br />
<h3>Select Tools</h3>
<table border="1">
<tr> <td>H (Shift-h)</td> <td>Use hand tool</td> </tr>
<tr> <td>V (Shift-v)</td> <td>Use select tool</td>
<tr> <td>G</td> <td>Use snapshot tool</td>
<table>
<h3>Zoom Features</h3>
<table border="1">
<tr> <td>Ctrl+[+]/Ctrl+-</td> <td>Zoom in / zoom out (or ctrl + mouse scroll)</td> </tr>
<tr> <td>Ctrl+0 </td> <td>Zoom to fit page</td> </tr>
<tr> <td>Ctrl+1 </td> <td>Zoom to 100%</td> </tr>
<tr> <td>Ctrl+2/Ctrl+3 </td> <td>Zoom to fit width / zoom to fit visible</td> </tr>
<tr> <td>Ctrl+4 </td> <td>Reflow document. May make it easier to read</td> </tr>
<tr> <td>Ctrl+Y </td> <td>Zoom to specific Magnification</td> </tr>
<table>
<h3>Navigation</h3>
<table border="1">
<tr> <td>Arrow Down/Arrow Up</td> <td>Scroll down / scroll up</td> </tr>
<tr> <td>Page Down/Page Up </td> <td>Jump one screen down / one screen up</td> </tr>
<tr> <td>Ctrl+Home/Ctrl+End </td> <td>Jump to beginning/ jump to end of document</td> </tr>
<tr> <td>Ctrl+Page Down/Ctrl+Page Up </td> <td>Jump one page down / one page up</td> </tr>
<tr> <td>Alt+Arrow Left/Alt+Arrow Right </td> <td>Jump to previously visited page / next page or view</td> </tr>
<tr> <td>Ctrl+Shift+N </td> <td>Goto page number specified</td> </tr>
<tr> <td>Ctrl+Shift+H </td> <td>Turn automatic scrolling on or off. Use arrow up / arrow down to control speed and direction</td> </tr>
<tr> <td> </td> <td> </td></tr>
<tr> <td> Strg+Tab </td> <td> Wechsel zur nächsten Registerkarte des geöffneten Dokuments<br /> (wenn mehrere Dokumente im gleichen Fenster geöffnet sind) </td> </tr>
<tr> <td> Strg+Umschalt+Tab</td> <td> Wechsel zur vorherigen Registerkarte des geöffneten Dokuments <br />(wenn mehrere Dokumente im gleichen Fenster geöffnet sind) </td> </tr>
<tr> <td> Strg+F6</td> <td> Wechsel zu nächstem geöffneten Dokument<br /> (Dokumentfenster ist aktiviert)</td> </tr>
<tr> <td>Strg+Umschalt+F6 </td> <td> Wechsel zu vorherigem geöffneten Dokument<br /> (Dokumentfenster ist aktiviert)</td> </tr>
<table>
<h3>Change View</h3>
<table border="1">
<tr> <td>Ctrl+Shift+[+] </td> <td>Rotate page clockwise</td> </tr>
<tr> <td>Ctrl+Shift+- </td> <td>Rotate page counter-clockwise</td> </tr>
<tr> <td>Ctrl+H </td> <td>Turn Reading Mode on or off (hide toolbar and menu bar)</td> </tr>
<tr> <td>Ctrl+L </td> <td>Turn Full Screen Mode on or off</td> </tr>
<tr> <td>F4 </td> <td>Show/hide Navigation Pane</td> </tr>
<tr> <td>F8 </td> <td>Show/hide Toolbar</td> </tr>
<tr> <td>F9 </td> <td>Show/hide Menu (file, edit, etc.)</td> </tr>
<table>
<h3>Find and Select</h3>
<table border="1">
<tr> <td>Ctrl+F </td> <td>Find box (use f6 to jump between window elements to get back to document)</td> </tr>
<tr> <td>F3/Shift+F3 </td> <td>Find next / find previous (alternative is ctrl+g / ctrl+shift+g)</td> </tr>
<tr> <td>Ctrl+A </td> <td>Select all</td> </tr>
<tr> <td>Ctrl+Shift+A </td> <td>De-select all</td> </tr>
<table>
<h3>Acrobat Features</h3>
<table border="1">
<tr> <td>Ctrl+D </td> <td>Document properties</td> </tr>
<tr> <td>Ctrl+Shift+S </td> <td>Save a copy</td> </tr>
<tr> <td>Ctrl+P </td> <td>Print Page menu</td> </tr>
<tr> <td>Ctrl+O </td> <td>Open File</td> </tr>
<tr> <td>Ctrl+W </td> <td>Close current document</td> </tr>
<tr> <td>Ctrl+Q </td> <td>Exit (close all documents)</td> </tr>
<table>
Links:<br />
https://www.shortcutworld.com/en/win/Adobe-Reader_X.html#link_3<br />
<br />
</html>
<html>
For quicker access to remote systems alias your telnet, <br />
ssh, ftp, or rlogin connections to save time.<br />
<br />
<code>
alias srocket 'ssh -l myaccount rocket.foo.bar.com'<br />
alias sfrocket 'sftp -l myaccount rocket.foo.bar.com'<br />
alias trocket 'telnet rocket.foo.bar.com'<br />
alias rrocket 'rlogin -l myaccount rocket.foo.bar.com'<br />
</code>
</html>
<html>
<h4> Jemand macht dich klein? 4 Wege, dich souverän zu wehren – ohne zu streiten</h4>
<ul>
<li>Ein zweideutiges Kompliment, ein als gut gemeinte Kritik verpackter Angriff, eine subtile Beleidigung – manchmal torpedieren Menschen unseren Selbstwert, ohne dass wir wissen, wie uns geschieht. Wie du in solchen Situationen reagieren kannst, liest du hier.
</li>
<li>Ob im Job, im familiären Umfeld, in einer Partner- oder Freundschaft – wann und wo immer wir mit anderen Menschen zusammenkommen, können wir lernen, lieben, lachen, Zuspruch, Sicherheit und Inspiration erfahren. Doch genauso können wir gebremst werden, deprimiert, verletzt, verunsichert und angegriffen. Wir treten uns auf die Füße, schubsen uns hin und her, tun einander weh und machen uns gegenseitig klein. Gelegentlich merken wir, wenn wir eine andere Person attackieren, tun es vielleicht sogar bewusst, doch oft genug passiert es uns aus Versehen – genau wie den anderen.
</li>
<li>Eine unbedachte Bemerkung, die von Neid motiviert ist. Ein Kommentar, der in erster Linie dem Wunsch entstammt, sich selbst besser darzustellen und zu fühlen. So etwas passiert. Uns und anderen.
</li>
<li>Während wir uns auf der einen Seite bemühen können, achtsamer zu sein und uns der Auswirkung unseres Verhaltens auf unsere Mitmenschen bewusster zu werden, ist es parallel dazu sinnvoll, Strategien für uns zu finden, mit denen wir uns vor den Trampeleien der anderen Elefanten in diesem Porzellanladen wehren, in dem wir alle zusammen leben. Folgende Strategien schlägt der Psychologe Robert Kraft in einem Blog-Eintrag für "Psychology Today" vor.
</li>
</ul>
<h4>4 Wege, dich zu wehren, wenn dich jemand klein machen will</h4>
<ul>
<li><h5>1. Die "nicht für jeden Menschen"-Antwort</h5>
Wenn sich eine Person abfällig über eine unserer Entscheidungen äußert, bietet sich als spontane Reaktion die "ist nicht für jeden Menschen"-Antwort an:
"Willst du wirklich jetzt noch gebackenen Camembert essen?" – "Klar. Aber meine Essgewohnheiten sind sicher nicht für jeden Menschen passend."
"Ich würde niemals in eine so kleine Wohnung ziehen." – "Sie ist eben nicht für jeden Menschen richtig."
Mit dieser Standard-Antwort entschärfen wir einen Angriff, nehmen ihm Wucht und Wirksamkeit, ohne eine Gegenattacke einzuleiten und einen Konflikt anzuheizen. Davon abgesehen nutzen wir, was darauf abzielte, uns zu verunsichern, um uns aufzubauen und unser Selbst zu bestärken: Indem wir herausstellen, dass wir kein beliebiger Mensch sind, sondern besonders und eigenständig.
</li>
<li><h5>2. Die Mikro-Reaktion</h5>
"Das würdest sogar du hinbekommen." – "Das liegt daran, dass du nie pünktlich bist." Bei solchen Sticheleien kann es sinnvoll sein, sie eines Blickes, jedoch keiner verbalen Reaktion zu würdigen. Eine bewusst ernste Miene, eine kurz leicht hochgezogene Augenbraue, ein Zusammenpressen von Ober- und Unterkiefer. So können wir unserem Gegenüber signalisieren, dass wir die Provokation wahrgenommen haben, sie missbilligen, aber nicht weiter darauf eingehen möchten. Gerade für Menschen, die Konfrontationen verabscheuen und sich sehr unsicher dabei fühlen, kann diese Strategie eine gute Methode sein, trotzdem für sich einzustehen und sich zu wehren.
</li>
<li><h5>3. Die Neutralisierungs-Taktik</h5>
Eine gewitzte und für Angreifende entwaffnende und enttäuschende Methode ist, der Attacke die Wucht zu nehmen, indem wir die verwendete Munition neutralisieren. "Ich wusste gar nicht, dass man in deinem Job so wenig verdient." – "Doch, doch, wir sind schon sehr unterbezahlt, ein großes Vermögen kannst du da kaum aufbauen. Liegt vielleicht mit daran, dass ihn viele Menschen gerne machen möchten, weil er insgesamt so attraktiv ist und einen hohen Lebensstandard im Sinne von Zufriedenheit und Work-Life-Balance bietet. Ich habe mir jedenfalls noch nie gewünscht, einen anderen Job zu haben, selbst wenn ich dann mehr verdienen würde."
Die Neutralisierungs-Taktik funktioniert grundsätzlich so, dass wir den Angriff erst einmal annehmen und unterstützen, ehe wir dann zu erkennen geben, dass er uns nicht verletzt. Dass die Munition, mit der unser Gegenüber geschossen hat, nicht scharf war. Diese Methode erfordert ein gewisses Maß an Witz und Geistesgegenwart und ist daher für Situationen, in denen wir sehr aufgewühlt sind, nicht immer geeignet. Wenn wir sie jedoch anwenden können und uns eine passende Neutralisierungs-Antwort einfällt, können wir einer anderen Person damit eine wertvolle Lektion erteilen – ohne sie ebenfalls zu attackieren.
</li>
<li><h5>4. Kritisch nachfragen</h5>
<ul>
<li>Bei Bemerkungen, die unterschwellig unser Selbst angreifen, bietet es sich an, den versteckten Angriff aufzudecken und gezielt anzusprechen. "Bei dir kann ich mir nicht vorstellen, dass du jemals weiter reisen würdest als nach Spanien." – "Was meinst du damit? Wie kommst du darauf, dass ich nicht dazu in der Lage wäre, eine Fernreise zu bewerkstelligen?"
</li>
<li>Auf diese Weise fordern wir unser Gegenüber auf, sich Gedanken zu machen und sich zu erklären. Wir führen ihm vor Augen, inwiefern es uns angegriffen hat, und signalisieren, dass wir ihm das nicht einfach durchgehen lassen.
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.brigitte.de/liebe/persoenlichkeit/kommunikation--4-wege--dich-souveraen-zu-wehren---ohne-zu-streiten-14018856.html"
target="_blank" rel="noreferrer noopener">
Brigitte :: Jemand macht dich klein? 4 Wege, dich souverän zu wehren – ohne zu streiten</a>
</a>
</li>
</ul>
</html>
<html>
Zukunftsängste - 7 Bewältigungsstrategien, die uns jetzt durch den Alltag helfen
Angesichts der politischen Entwicklungen und gesellschaftlichen Krisen fühlen sich viele Menschen ängstlich und unsicher. Wenn es dir auch so geht: Diese sieben Tipps können dir dabei helfen, besser mit Zukunftsängsten umzugehen.
Wir erleben gerade vielerorts einen konservativen Backlash, der Angst machen kann. Besonders Frauen, Menschen mit Migrationsgeschichte und Queere fühlen sich unsicher und schauen besorgt in die Zukunft.
Ob die Sorgen auch in Deutschland berechtigt sind, wird sich zeigen. Der Mann, der derzeit auf das Kanzleramt zusteuert, ist nicht gerade dafür bekannt, feministischen Fortschritt großzuschreiben.
Im Gegenteil: Bei Friedrich Merz und seinen Kollegen steht zuvorderst Wirtschafts- und Migrationspolitik auf der Agenda, dabei könnte auch eine gute Frauen- und Familienpolitik zum Wohlstand beitragen, aber das ist eine anderes Thema. Und wenn man bedenkt, dass allein 2023 fast jeden Tag eine Frau durch ihren Partner oder Ex-Partner getötet wurde, das Gewalthilfegesetz aber erst ab 2032 wirkt, ist es nicht verwunderlich, dass wir Angst haben – oder?
Obwohl es sich nicht bestreiten lässt, dass die Zukunft nicht allzu rosig aussieht, bringt es – wie immer– wenig, sich von Ängsten einnehmen und leiten zu lassen. Für alle, die gerade am liebsten den Kopf in den Sand stecken würden und Schwierigkeiten haben, nach vorne zu blicken, hat der Psychologe Luca-Leander Wolz Bewältigungsstrategien aufgelistet, die dabei helfen können, Zukunftsängste abzulegen oder zu minimieren.
7 Bewältigungsstrategien, die bei Zukunftsangst helfen
1. Fokussiere dich auf das Hier und Jetzt
Wir malen uns schnell Horror-Szenarien aus, die in den allermeisten Fällen niemals eintreffen werden. Statt deine Gedankenkapazitäten darauf zu verwenden, was passieren KÖNNTE, konzentriere dich lieber auf das Hier und Jetzt. Lenk' dich ab, geh' spazieren, übe dich in Achtsamkeit.
BRIGITTE-Dossier "Raus aus dem Stress"
Du möchtest wissen, wie du besser mit Stress-Situationen umgehen kannst? Du suchst nach Routinen, die dich beim Abschalten unterstützen? Du möchtest endlich mal wieder gut ein- bzw. durchschlafen? Diese und weitere Fragen beantworten wir in unserem PDF-Dossier.
2. Bleibe in deinem Einflussbereich
Was auf der Welt geschieht, liegt meist nicht in unserem direkten Einflussbereich. Statt dich daran festzubeißen, konzentriere dich lieber auf die Dinge in deinem Umfeld, die du ändern kannst. Setze dir kleine Ziele für den Alltag, die du wirklich einhältst. Die Publizistin Marina Weisband sagte kürzlich in einem Podcast von "Social Media Watchblog": "Ich kann nichts daran ändern, was Friedrich Merz sagt. (...) Ich kann auf eine Demo gehen. Ich kann ein Netzwerk vor Ort machen."
3. Schreibe deine Ängste auf
Gedanken sind oft viel einnehmender, wenn sie in unseren Köpfen kreisen. Sprich sie laut aus oder schreibe sie sogar auf. Wenn du deine Ängste zu Papier gebracht hast, sind sie meist raus aus dem Kopf – und du siehst klarer, was real ist und was vielleicht eher Schwarzmalerei.
4. Gehe in den Austausch
Sprich mit Freund:innen oder Familie über deine Sorgen. Ängste werden kleiner, wenn du sie teilst. Meist hilft es schon zu merken, dass du nicht allein damit bist. Wenn du dich sehr überfordert mit der aktuellen Situation fühlst, kannst du auch ein Erstgespräch mit einer Therapeutin in Anspruch nehmen, um an Lösungsstrategien zu arbeiten.
5. Reduziere Doomscrolling
Nachrichten zu konsumieren und sich darüber zu informieren, was gerade auf der Welt passiert, ist wichtig. Die Informationsflut, der wir heutzutage oftmals ausgesetzt sind, kann aber dazu führen, dass wir einen Kontrollverlust spüren und in einen regelrechten Bad-News-Strudel gezogen werden. Sich feste Zeiten für Nachrichtenkonsum zu setzen und wenn nötig auch mal alles abzuschalten, kann helfen.
6. Entwickle Routinen
Strukturen und ein fester Tagesablauf geben Halt, wenn du das Gefühl hast, die Welt bricht wie ein Kartenhaus über dir zusammen. Nimm dir bewusste Pausen für schöne Dinge. Auch kleine Alltagsoasen oder Rituale wie der morgendliche Kaffee oder die Yogastunde am Abend helfen, durch den Tag zu kommen.
7. Versuche Unsicherheiten anzunehmen
Viele Dinge, die um uns herum geschehen, können wir nicht kontrollieren. Übe dich in Akzeptanz und lerne mit Unsicherheiten und Ängsten zu leben. Wenn du damit Schwierigkeiten hast, kannst du dich im Alltag immer mal wieder bewusst mit Situationen konfrontieren, die ein Unwohlsein in dir auslösen. Solche kleinen Expositionen können langfristig dein Vertrauen in dich selbst aufbauen.
Wenn das alles nicht so richtig helfen mag, dann denke daran, dir Hilfe zu holen.
<h3>Links:</h3>
https://www.brigitte.de/liebe/persoenlichkeit/psychologie--7-tipps--die-gegen-zukunftsangst-helfen--13952796.html
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikihow.com/Herausfinden-ob-ein-M%C3%A4dchen-dich-mag"
target="_blank" rel="noreferrer noopener">
WikiHow :: Mag sie mich? 15+ Zeichen dafür, das sie auf dich steht</a>
</li>
<li><a href="https://www.promisera.de/blogs/tipps/mag-sie-mich"
target="_blank" rel="noreferrer noopener">
Promisera :: Mag Sie Mich Oder Nicht? 20 Eindeutige Anzeichen Und Häufige Fehler, Die Es Zu Vermeiden Gilt </a>
</li>
<li><a href="https://www.andreas-lorenz.com/flirttipps/mag-sie-mich-anzeichen/"
target="_blank" rel="noreferrer noopener">
Andreas Lorenz :: Mag sie mich? 10 Anzeichen, dass sie Interesse hat!</a>
</li>
<li><a href="https://www.flirtforschung.de/ratgeber/10-zeichen-dass-eine-frau-interesse-hat"
target="_blank" rel="noreferrer noopener">
Flirt-Forschung :: 10 Zeichen, dass eine Frau Interesse hat</a>
</li>
<li><a href="https://psycatgames.com/de/magazine/conversation-starters/how-to-tell-if-a-girl-likes-you/"
target="_blank" rel="noreferrer noopener">
PsyCatGames :: Woran du merkst, dass eine Frau dich mag </a>
</li>
<li><a href="https://www.menshealth.de/dating/steht-sie-auf-mich/"
target="_blank" rel="noreferrer noopener">
Men's Health :: Eindeutige Signale: 9 Anzeichen, dass sie auf dich steht </a>
</li>
<li><a href="https://dating-psychologie.com/artikel/hat-sie-interesse-an-mir"
target="_blank" rel="noreferrer noopener">
Dating Psychologie :: Hat sie Interesse an mir? 20 eindeutige Zeichen</a>
</li>
<li><a href="https://www.gofeminin.de/liebe/anzeichen-jemand-mag-dich-sehr-s5384626.html"
target="_blank" rel="noreferrer noopener">
GoFeminin :: Psychologie: 7 subtile Anzeichen, dass jemand dich sehr mag </a>
</li>
<li><a href="https://www.fuersie.de/psychologie/psychologie-8-anzeichen-dass-jemand-sie-mehr-mag-als-sie-denken-8746.html"
target="_blank" rel="noreferrer noopener">
Für Sie :: 8 Anzeichen, dass jemand Sie mehr mag, als Sie denken </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<h3>So machen Sie günstigen Abflussreiniger einfach selbst</h3>
<ul>
<li>Soda, auch Waschsoda oder Reine Soda genannt, ist chemisch gesehen reines Natriumcarbonat. Es reagiert zusammen mit Essig recht heftig und setzt dabei Kohlensäure und Wärme frei. Diese Reaktion sowie die entstehende alkalische Lösung führen zu einer intensiven Reinigung des Abflusses.
</li>
<li><b>Vorgehensweise:</b>
<ol>
<li>Geben Sie vier Esslöffel Soda direkt in den Ausguss.
</li>
<li>Schütten Sie sofort eine halbe Tasse hellen Essig hinterher. Sofort entsteht unter heftigem Blubbern weißer Schaum.
</li>
<li>Lassen Sie die Lösung noch zwei bis drei Minuten im Abflussrohr stehen, damit sie gut wirken kann.
</li>
<li>Spülen Sie mit reichlich heißem Wasser nach – fertig!
</li>
</ol>
<li>Diese Behandlung löst selbst hartnäckige Beläge im Siphon und macht ihn so wieder sauber und durchlässig.
</li>
<li>Wenn die Behandlung nicht anschlägt, hilft nur noch eins: Den Siphon reinigen.
</li>
<li>Das ist im Übrigen auch die umweltfreundlichste Behandlung für verstopfte Abflüsse, denn sie kommt gänzlich ohne Chemikalien aus.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.focus.de/wissen/einfach-besser-leben/effektiver-als-drogerie-produkte-mit-nur-zwei-hausmitteln-bekommen-sie-jeden-abfluss-frei_id_189102891.html"
target="_blank" rel="noreferrer">
Focus Online :: Effektiver als Drogerie–Produkte – Mit nur zwei Hausmitteln bekommen Sie jeden Abfluss frei</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>Inhalt vom File Complete.txt:<br />
<code>
01_Introduzione.mp3<br />
02_Cose_Fiat-500.mp3<br />
03_LitalianoAllaRadio.mp3<br />
04_LItaliaATavola.mp3<br />
05_IlRaccontoDelMese.mp3<br />
…
</code>
</li>
<li>Statement:<br />
<code><pre>
for i in $(ls -1 *.mp3); do str=${i//Track_/}; mv ${i} $(head -n ${str%%.mp3} Complete.txt | tail -n 1);done
</pre></code>
</li>
</ul>
</html>
<html>
<ul>
<li>dazu folgende Einstellungen vornehmen:<br />
<ul>
<li>“Fortlaufend“ :: ✓</li>
<li>“Zweiseitig“ :: ✓</li>
<!-- <li>“Zweiseitig (ungerade Seiten links)“ :: ✓</li> -->
<br />
<li>vor Druck auf Tab “Seite einrichten“ gehen<br />
und:
<ul>
<li>die Anzahl der Seiten auf “2“ setzen.</li>
<li>den Eintrag fürs <b>Layout</b> bei “Beidseitig“<br />
auf “<b>Kurzer Rand (umdrehen)</b>“ einstellen</li>
</ul>
</li>
</ul></li>
</ul>
</html>
<html>
<code><pre>
<!doctype html>
<html>
<head>
<title>Adesso :: </title>
<style>
code {
font-family: Consolas,"courier new";
font-size: 95%;
color: red;
background-color: #f1f1f1;
padding: 2px;
}
</style>
</head>
<body>
<h1>Adesso :: </h1>
<table>
<td width=30>
</td>
<td valign="top">
<img src="../pictures/" height=100 width=100 /> <!‐‐ ‐‐>
</td>
<td width=10>
</td>
<td valign="top">
<table>
<tr>
<td valign="top" width=250>
<details><summary><b>1. &hellip; </b></summary><br />
‐ <br />
<br />
</details>
</td>
<td valign="top" width=250>
<details><summary><b>7. &hellip; </b></summary><br />
‐ <br />
<br />
</details>
</td>
<td valign="top" width=250>
<details><summary><b>13. &hellip; </b></summary><br />
‐ <br />
<br />
</details>
</td>
</tr>
<tr>
<td valign="top" width=250>
<details><summary><b>2. &hellip; </b></summary><br />
‐ <br />
<br />
</details>
</td>
<td valign="top" width=250>
<details><summary><b>8. &hellip; </b></summary><br />
‐ <br />
<br />
</details>
</td>
<td valign="top" width=250>
<details><summary><b>14. &hellip; </b></summary><br />
‐ <br />
<br />
</details>
</td>
</tr>
<tr>
<td valign="top" width=250>
<details><summary><b>3. &hellip; </b></summary><br />
‐ <br />
<br />
</details>
</td>
<td valign="top" width=250>
<details><summary><b>9. &hellip; </b></summary><br />
‐ <br />
<br />
</details>
</td>
<td valign="top" width=250>
<details><summary><b>15. &hellip; </b></summary><br />
‐ <br />
<br />
</details>
</td>
</tr>
<tr>
<td valign="top" width=250>
<details><summary><b>4. &hellip; </b></summary><br />
‐ <br />
<br />
</details>
</td>
<td valign="top" width=250>
<details><summary><b>10. &hellip; </b></summary><br />
‐ <br />
<br />
</details>
</td>
<td valign="top" width=250>
<details><summary><b>16. &hellip; </b></summary><br />
‐ <br />
<br />
</details>
</td>
</tr>
<tr>
<td valign="top" width=250>
<details><summary><b>5. &hellip; </b></summary><br />
‐ <br />
<br />
</details>
</td>
<td valign="top" width=250>
<details><summary><b>11. &hellip; </b></summary><br />
‐ <br />
<br />
</details>
</td>
<td valign="top" width=250>
<details><summary><b>17. &hellip; </b></summary><br />
‐ <br />
<br />
</details>
</td>
</tr>
<tr>
<td valign="top" width=250>
<details><summary><b>6. &hellip; </b></summary><br />
‐ <br />
<br />
</details>
</td>
<td valign="top" width=250>
<details><summary><b>12. &hellip; </b></summary><br />
‐ <br />
<br />
</details>
</td>
<td valign="top" width=250>
<details><summary><b>18. &hellip; </b></summary><br />
‐ <br />
<br />
</details>
</td>
</tr>
</table>
</td>
</table>
</body>
<footer>
<h3>Links:</h3>
<ul>
<li><a href=""
target="_blank" rel="noreferrer noopener">
Adesso Plus 2023/08, pg. 10f.</a>
</li>
<!‐‐
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
‐‐>
</ul>
</footer>
</html>
</pre></code>
</html>
<html>
<ul>
<li>Befehl z.B.:
<pre><code>https://www.adesso-online.de/sites/adesso.spotlight-verlag.de/files/2024-02/PLUS.mp3</code></pre>
</li>
</ul>
</html>
<html>
<table>
<tr>
<td width=500><b>BDFL</b>, “Benevolent dictator for life“<br />
<a href="https://en.wikipedia.org/wiki/Benevolent_dictator_for_life"
target="_blank" rel="noreferrer noopener">
Wikipedia.en :: BDFL</a><br />
<a href="https://de.wikipedia.org/wiki/Benevolent_Dictator_for_Life"
target="_blank" rel="noreferrer noopener">
Wikipedia :: Benevolent Dictator for Life</a>
</td>
<td width=500><b>TLDR</b> (oder auch: TL;DR) :: “ too long, didn't read“<br />
<a href="https://www.randombrick.de/was-bedeutet-tldr-und-wie-verwendet-man-die-abkuerzung/"
target="_blank" rel="noreferrer noopener">
Randombrick :: Bedeutung & Verwendung von TLDR</a></li>
</td>
</tr>
<tr>
<td><b>FWIW</b> :: “For What It's Worth“<br />
<a href="https://www.howtogeek.com/440143/what-does-fwiw-mean-and-how-do-you-use-it/"
target="_blank" rel="noreferrer noopener">
HowToGeek :: What does FWIW mean and how do you use it</a>
</td>
<td><b>SOL</b> :: “Shit outta luck“<br />
<a href="https://www.urbandictionary.com/define.php?term=SOL"
target="_blank" rel="noreferrer noopener">
Urban Dictionary :: SOL</a>
</td>
</tr>
<tr>
<td><b>BSOD</b> :: “Blue–Screen–Of–Death“<br />
<a href="https://news.itsfoss.com/bsod-linux/"
target="_blank" rel="noreferrer noopener">
IT's FOSS :: The Blue Screen of Death Comes to Linux, Thanks to Systemd</a>
</td>
<td><b>ICYMI</b> :: “In Case You Missed It“<br />
<a href="https://praxistipps.chip.de/icymi-bedeutung-der-abkuerzung-einfach-erklaert_131485"
target="_blank" rel="noreferrer noopener">
CHIP :: ICYMI: Bedeutung der Abkürzung einfach erklärt</a>
</td>
</tr>
<tr>
<td><b>TMI</b> :: “Too much information“<br />
<a href="https://de.wikipedia.org/wiki/TMI"
target="_blank" rel="noreferrer noopener">
Wikipedia :: TMI</a>
</td>
<td><b>IMAO</b> :: “In My Arrogant Opinion“<br />
(“<em>meiner arroganten/überheblichen Meinung nach</em>“)<br />
<a href="https://www.giga.de/artikel/was-heisst-imao-bedeutung-der-abkuerzung/"
target="_blank" rel="noreferrer noopener">
GIGA :: Was heißt ”IMAO“? Bedeutung der Abkürzung</a>
</td>
</tr>
<tr>
<td><b>WAR</b> :: “Work at risk“<br />
(Kodekloud, Kurs “Linux Basics“)
</td>
<td><b>BYOVD</b> :: “Bring Your Own Vulnerable Driver“<br />
<a href="https://thehackernews.com/2024/11/researchers-uncover-malware-using-byovd.html"
target="_blank" rel="noreferrer noopener">
The HackerNews :: Researchers Uncover Malware Using BYOVD to Bypass Antivirus Protections</a>
</td>
</tr>
<tr>
<td valign="top"><b>RLHF</b> :: “Reinforcement Learning from Human Feedback“<br />
(IBM, “<a href="https://www.ibm.com/de-de/topics/rlhf"
target="_blank" rel="noreferrer noopener">
Link“)</a>
</td>
<td><b>R.I.P</b> ::
<ul>
<li>“Rest In Peace“<br />
</li>
<li>“Retrirement In Place“<br />
(<a href="https://financial-dictionary.thefreedictionary.com/Retired+in+Place"
target="_blank" rel="noreferrer noopener">
Financial Dictionary :: Retired in Place)</a>
</li>
</ul>
</td>
</tr>
<tr>
<td><b>IRL</b> :: “in real life“<br />
</td>
<td><b>AFOL</b> :: “Adult Fan of LEGO“<br />
</td>
</tr>
<!--
<tr>
<td><b></b> :: ““<br />
</td>
<td>
</td>
</tr>
-->
</table>
<!--
<br />
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<br />
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<br />
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<br />
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<br />
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</html>
Apfel entkernen mit Messer und Löffel
Für eine einfache und praktische Methode zum Entkernen von Äpfeln sind ein Messer und ein Löffel ausreichend. Diese Methode erlaubt es Ihnen, das Kerngehäuse präzise zu entfernen, während das Fruchtfleisch weitgehend erhalten bleibt. Hier führen wir Sie durch zwei Varianten dieser Vorgehensweise:
Variante 1
Apfel reinigen: Spülen Sie den Apfel gründlich unter fließendem Wasser, um Schmutz und eventuelle Rückstände zu beseitigen.
Apfel oben abschneiden: Schneiden Sie die Spitze des Apfels mit einem scharfen Messer ab, sodass der Stielansatz entfernt wird.
Kerngehäuse entfernen: Nehmen Sie einen stabilen Löffel zur Hand und führen Sie ihn entlang des freigelegten Randes des Kerngehäuses ein. Hebeln Sie vorsichtig das Kerngehäuse heraus, indem Sie es drehen und lockern.
Variante 2
Apfel reinigen: Säubern Sie den Apfel gründlich, um Unreinheiten zu entfernen.
Einschnitte machen: Setzen Sie das Messer etwa 1 cm vom Zentrum des Apfels entfernt an und schneiden Sie einmal rund um den Apfel, um das Kerngehäuse einzuschließen. Wiederholen Sie diese Schritte auf der Unterseite des Apfels.
Kerngehäuse herausschieben: Drücken Sie das gelockerte Kerngehäuse von unten nach oben aus dem Apfel heraus.
Auf diese Weise können Sie Äpfel effektiv entkernen, ohne dass spezielle Werkzeuge erforderlich sind.
(https://www.gartenjournal.net/apfel-entkernen)
Variante 1:
Ihr nehmt euren gut gewaschenen Apfel und schneidet oben ein dünnes Stück quer von dem Teil weg, wo der Apfel am Baum hing, samt Stiel.
Dann nehmt ihr einen Löffel und hebelt damit das Innere des Apfels heraus.
Solange immer im Kreis das Innere heraushebeln, bis alles entfernt ist.
Variante 2:
Ihr nehmt ein Messer und schneidet an der Oberseite des Apfels 1 cm vom Kerngehäuse in den Apfel hinein. Das wiederholt ihr auf jeder Seite.
Dann dreht ihr den Apfel und macht das Ganze auf der Unterseite. Nun schneidet ihr ein Viereck um das Kerngehäuse herum aus.
Nun müsstet ihr von unten her das komplette Kerngehäuse herausdrücken können, wenn ihr richtig geschnitten habt.
(https://www.familie.de/diy/aepfel-super-leicht-entkernen-3-schnelle-tricks/)
<html>
<ul>
<li><h3>Nierenarzt/Nephrologe :: DaVita - Ambulanz Hannover-Linden</h3>
<ul>
<li><b>Ärztin</b> :: Frau Dr. Schwarzer
</li>
<li><b>E-Mail</b> :: ambulanz.hannover-linden@davita.com
</li>
<li><b>Adresse</b> ::
<ul>
<li>Falkenstraße 27
</li>
<li>30449 Hannover
</li>
</ul>
</li>
<li><b>Öffnungszeiten</b> ::
<ul>
<li>Montag 09:00 Uhr - 13:00 Uhr und 14:00 Uhr - 16:00 Uhr
</li>
<li>Dienstag 09:00 Uhr - 13:00 Uhr
</li>
<li>Mittwoch 09:00 Uhr - 13:00 Uhr und 14:00 Uhr - 16:00 Uhr
</li>
<li>Donnerstag 09:00 Uhr - 13:00 Uhr
</li>
<li>Freitag 09:00 Uhr - 13:00 Uhr
</li>
</ul>
</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>ICS-Datei: Bedeutung und Grund-Aufbau</h3>
Ob Meetings, Veranstaltungen oder private Termine - mit einer ICS-Datei lassen sich Kalendereinträge leicht erstellen und versenden. Der Vorteil dieses Formats ist, dass es mit so gut wie allen Kalender-Anwendungen kompatibel ist.
Ursprünglich wurde sie für den Mac OS X erschaffen und trägt bei iOS-Geräten die Dateiendung "iCal". Für alle anderen Betriebssysteme ist die Endung .icl vorgesehen.
Dank des simplen Aufbaus hat sich das Format bei Entwicklern und Nutzern durchgesetzt. Am häufigsten ist es nun im Google-Kalender und im Outlook-Kalender von Microsoft in Verwendung. Es kann aber ebenso gut von jedem anderen Kalenderprogramm ausgelesen werden.
Eine ICS-Datei besteht aus einigen wenigen Zeilen Code, die ganz einfach mit dem Texteditor erstellt werden können. Die Grundstruktur ist äußerst simpel. Eine solche Datei kann ohne Vorkenntnisse im Codieren erstellt werden. Befüllen Sie mit den gewünschten Angaben zu Ort, Zeit, Dauer und Zusatzinformationen Ihrer Kalendereintragung.
Termine sind genauso gut in den Kalenderprogrammen selbst zu erstellen.
</li>
<li><h3>Eigene Datei erstellen - so geht's</h3>
Öffnen Sie ein neues leeres Dokument in einem Texteditor Ihrer Wahl. Der vorinstallierte "Editor" reicht vollkommen aus. In diesem Artikel sind die besten Text-Editoren aufgelistet.
Wenn Sie nicht auf einem PC arbeiten, sondern mit einem Mobiltelefon eine ICS-Datei erzeugen wollen, ist dies überhaupt kein Problem. Nutzen Sie dafür eigens fürs 'Codieren am Handy' entwickelte App, wie zum Beispiel Turbo Editor.
Befüllen Sie diese Datei nach dem ICS-Schema. Achten Sie darauf, dass Sie keine Tippfehler im Code einbauen. Ansonsten wird die Datei schnell unbrauchbar. Wie sich die Informationen auf die spezifischen Code-Zeilen aufteilen, lesen Sie im dritten Absatz.
Ist Ihr Dokument vollständig, müssen Sie es nur mehr richtig exportieren. Geben Sie der Datei beim Speichern eine individuelle Bezeichnung und die Endung ".ics".
Öffnen Sie nun Ihr Kalenderprogramm, um dort den Kalendereintrag zu importieren. Klicken Sie auf das entsprechende Feld und laden Sie Ihre Termin-Datei aus Ihrem Verzeichnis hoch. Schon scheint der Eintrag im Kalender auf.
</li>
<li><h3>Befüllen der einzelnen Parameter</h3>
In der Grafik rechts sehen Sie eine typische ICS-Datei abgebildet. Vorlagen wie diese sind zahlreich im Internet zu finden, aber auch leicht selber zu schreiben. Die folgenden Parameter müssen in jedem iCalender-Dokument enthalten sein:
BEGIN:VCALENDAR eröffnet jede iCalender-Datei.
VERSION:Hier ist die Version des Formats anzugeben. Diesen sollten Sie bei "2.0" belassen.
PRODID: Die sogenannte Pro-ID gibt die Instanz an, die das Dokument erstellt hat.
METHOD: Gibt die Art an, wie Sie dem Nutzer übermittelt wird. Es gibt im Grunde zwei Möglichkeiten: einerseits PUBLISH, welches den Eintrag sofort erscheinen lässt, andererseits REQUEST, das den Eintrag in eine Anfrage an den Nutzer verpackt.
BEGIN:VEVENT definiert den Beginn des Bereiches, in dem dann die relevanten Daten des Termins enthalten sind.
UID: Ist die Unique-ID einer ICS-Datei. Jeder Kalendereintrag braucht eine eigene unverwechselbare ID.
LOCATION: Hier ist der Veranstaltungsort anzugeben.
SUMMARY: Geben Sie in wenigen Worten den Inhalt wieder. Diese Information wird Ihnen schon bei der Kalenderübersicht angezeigt.
DESCRIPTION: Die ausführliche Beschreibsung kommt hier rein. Sie wird nur ersichtlich, nachdem Sie den Eintrag im Kalender geöffnet haben.
CLASS: Entscheiden Sie, ob Sie den Termin öffentlich oder privat speichern wollen. Geben Sie dementsprechend PUBLIC oder PRIVATE ein.
DTSTART gibt den Start des Kalendereintrags an, DTEND das Ende und DTSTAMP den Zeitpunkt, an dem der Eintrag erstellt wurde.
Alle 3 Parameter haben den selben Aufbau. Die ersten 4 Zahlen entsprechen dem Jahr, die nächsten 2 dem Monat, und die nächsten 2 dem Tag. Das T trennt Datum von Uhrzeit. Diese besteht aus den weiteren 6 Zahlen (2 für die Stunde, 2 für die Minute und 2 für die Sekunde). das Z beschließt die Datumsangabe.
END:VEVENT und END:VCALENDAR beenden das Ausführend der ICS-Datei
</li>
<li><h3>ICS-Datei: Verknüpfung mehrerer Termine in einem Kalender</h3>
Oft kann es vorkommen, dass Ihre Termine in mehrerern verschiedenen Kalendern verteilt sind. Doch erst wenn sich alle Termine in einem Kalender befinden, haben Sie die völlige Übersicht. Mit ICS-Dateien können Sie einen Kalender viel schneller vereinheitlichen und müssen nicht jeden Eintrag erneut eingeben.
Zuerst exportieren Sie dazu den ersten Kalender, der in den zweiten eingegliedert werden soll. Öffnen Sie dafür erst Ihr Kalender-Programm.
Wählen Sie den richtigen Kalender aus und klicken Sie mit der rechten Maustaste darauf. Nun können Sie wählen, ob Sie die Datei unter "Speichern unter" am Computer downloaden wollen, oder mit "Freigeben" via E-Mail versenden wollen.
Über die Import-Schaltfläche des Kalenderprogramms laden Sie nun den exportierten Kalender in den zweiten Kalender.
Verwenden Sie Outlook, müssen Sie zuerst auf "Kalender hinzufügen" und dann auf "Aus einer Datei" klicken. Nachdem Sie die ICS-Datei hochgeladen haben, können Sie unter Optionen noch das Kontrollkästchen "Keine Duplikate importieren" aktivieren. Dies bezweckt, dass schon im alten Kalender vorhandene Termine nicht noch einmal importiert werden.
</li>
<li>
</li>
<li>
</li>
<li>
</li>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<!--
<li><a href="https://praxistipps.chip.de/ics-datei-erstellen-das-muessen-sie-beim-aufbau-beachten_98011"
target="_blank" rel="noreferrer noopener">
CHIP Praxistipps :: ics Datei erstellen: Das müssen Sie beim Aufbau beachten </a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ol>
<li>Unten links auf das Zahnradsymbol neben dem<br />
Benutzernamen und dem Avatar klicken.
</li>
<li>In der linken Spalte nach unten scrollen und auf<br />
“Abmelden“ klicken.
</li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://support.discord.com/hc/de/articles/209572128-Wie-logge-ich-mich-aus"
target="_blank" rel="noreferrer noopener">
Discord - Support :: Wie logge ich mich aus? </a>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>CaféBackStube Seelze</h3>
<table>
<tr>
<td width=175> Am Kreuzweg 1<br />
30926 Seelze<br />
<br />
Telefon: 05137 - 3120<br />
<br />
</td>
<td>
<table>
<tr>
<th colspan=2 align="center">Öffnungszeiten:</th>
</tr>
<tr>
<td>Montag bis Freitag:
</td>
<td>06.00 Uhr - 18.00 Uhr
</td>
</tr>
<tr>
<td>Samstag:
</td>
<td>06.00 Uhr - 17.00 Uhr
</td>
</tr>
<tr>
<td>Sonntag:
</td>
<td>08.00 Uhr - 17.00 Uhr
</td>
</tr>
</table>
</td>
<tr>
<table>
</html>
<html>
<ul>
<li>Die Bedürfnispyramide von Maslow ist ein sozialpsychologisches Modell zur Hierarchisierung von menschlichen Bedürfnissen und Motivationen.
Die nächst höhere Bedürfnisstufe kann nur erreicht werden, wenn die darunterliegenden erfüllt wurden. Bedürfnisse, die bereits erfüllt sind, wirken nicht mehr motivierend.
Im Studium und in der Wissenschaft wird das Modell der Bedürfnispyramide theoretisch und empirisch angewendet.
maslowsche-bedurfnispyramide.webp
</li>
</ul>
<h3>Das ist die Maslowsche Bedürfnispyramide</h3>
<ul>
<li>Maslow unterteilt die menschlichen Bedürfnisse in 5 Stufen, die aufeinander aufbauen.
Er bezeichnet die ersten 4 Stufen als Defizitbedürfnisse und die höchste Stufe als Wachstumsmotiv.
Wenn die Defizitbedürfnisse nicht realisiert werden, kann das physische und seelische Folgen haben. Das Wachstumsbedürfnis kann jedoch nie gänzlich erfüllt werden.
Wir erklären dir alle Stufen der Pyramide anhand eines möglichen Anwendungsbeispiels für deine wissenschaftliche Abschlussarbeit.
Anwendungsbeispiel für die wissenschaftliche Arbeit
In deiner wissenschaftlichen Arbeit möchtest du beispielsweise anhand der Bedürfnispyramide folgende Forschungsfrage beantworten:
Wie kann die Produktivität von Angestellten im Unternehmen X erhöht werden?
Basierend auf der Theorie von Maslow formulierst du die Annahme:
Je mehr Stufen die Angestellten auf der Bedürfnispyramide erreichen, desto produktiver sind sie für das Unternehmen.
Methodisches Vorgehen:
Mithilfe einer systematischen Literaturanalyse findest du heraus, wie die Bedürfnisse der Angestellten auf jeder Stufe erfüllt werden können.
</li>
</ul>
<h3>Physiologische Bedürfnisse</h3>
<ul>
<li>Physiologische Bedürfnisse sind alle Grundbedürfnisse, die für das menschliche Überleben notwendig sind. Sie bilden daher die Basis der Bedürfnispyramide.
Es handelt sich dabei etwa um die Versorgung der Menschen mit
Sauerstoff
Wasser
Nahrung
Homöostase (Schutz vor Witterung, Behausung)
Anwendungsbeispiel
Basierend auf den Ergebnissen der Literaturanalyse könnten Führungskräfte die physiologischen Bedürfnisse der Angestellten erfüllen, indem sie
eine Küche zur Verfügung stellen, in der Angestellte ihr Essen aufbewahren und zubereiten können;
Getränkeautomaten aufstellen und
eine Kantine mit gesunden Speisen betreiben.
</li>
</ul>
<h3>Sicherheitsbedürfnisse</h3>
<ul>
<li>Sobald die physiologischen Bedürfnisse erfüllt sind, strebt der Mensch nach Sicherheit.
Die Sicherheitsbedürfnisse umfassen den Wunsch nach:
Schutz,
Stabilität und
Ordnung
Maslow versteht darunter auch das Bedürfnis nach:
körperlicher sowie seelischer,
finanzieller und
sozialer Sicherheit.
Zusätzlich ging Maslow davon aus, dass der Mensch das Bekannte dem Unbekannten vorziehe. Menschen verspüren den Wunsch, alles verstehen und erklären zu können.
Auch der Wunsch, von einer stärkeren Person beschützt zu werden, zählt zu den Sicherheitsbedürfnissen.
Anwendungsbeispiel
Um die Mitarbeitenden vor Risiken, die in einem Unternehmen auftreten können zu schützen, können die Führungskräfte Folgendes veranlassen:
Sichere Arbeitsumgebung schaffen (z. B. Helm, Arbeitskleidung, Warnschilder);
Gesunde Arbeitsplatzgestaltung ermöglichen und
für finanzielle Sicherheit durch ausreichende Entlohnung sorgen.
</li>
</ul>
<h3>Soziale Bedürfnisse</h3>
<ul>
<li>Werden die ersten beiden Formen von Bedürfnissen erfüllt, dann kommt die soziale Natur des Menschen zur Geltung und sein Bedürfnis nach sozialer Bindung.
Dazu gehören das Bedürfnis nach:
Kommunikation,
Gemeinschaft (Familie, Freundschaft usw.),
sozialem Austausch,
der Beibehaltung einer sozialen Rolle und
einem sicheren Platz in einer sozialen Gruppe.
Geht z. B. eine Beziehung zugrunde, dann versucht der Mensch die Lücke mit einer neuen sozialen Beziehung zu schließen.
Anwendungsbeispiel
Auch das Betriebsklima im Unternehmen ist entscheidend für die Steigerung der Produktivität von Angestellten.
Auf die sozialen Bedürfnisse kann das Unternehmen eingehen, in dem es
Bedingungen für eine Gute Work-Life-Balance schafft, damit genug Zeit für soziale Kontakte und Familie bleibt;
Teamevents und -ausflüge anbietet und
gemeinsames Coaching und Supervision ermöglicht, damit Konflikte gelöst oder gar völlig vermieden werden.
</li>
</ul>
<h3>Individualbedürfnisse</h3>
<ul>
<li>Wenn alle bisherigen Bedürfnisse erfüllt sind, strebt der Mensch nach:
Macht,
Anerkennung,
Wertschätzung und
Status.
Die Erfüllung dieser Bedürfnisse sind jedoch sehr individuell. Daher spricht man von Individualbedürfnissen. Für manche Menschen kann z. B. Macht eine große Bedeutung haben, während es für andere eine geringere Bedeutung einnimmt.
Anwendungsbeispiel
Angestellte wollen anerkannt und wertgeschätzt werden, damit sie zufrieden sind und somit produktiv arbeiten.
Das können die Führungskräfte tun:
Finanzielle Motivation: Belohnungen für das Erreichen von Zielen.
Mentale Motivation: Lob aussprechen, wertschätzende Kommunikation fördern.
Beförderungen anbieten, wenn Ziele erreicht wurden.
</li>
</ul>
<h3>Selbstverwirklichung</h3>
<ul>
<li>An oberster Stelle der Pyramide von Maslow steht das Streben nach Selbstverwirklichung.
Um zu diesem höchsten Gut zu gelangen, müssen alle bisherigen Bedürfnisse erfüllt sein.
Im Rahmen des Bedürfnis nach Selbstverwirklichung möchte der Mensch
seine Fähigkeiten,
seine Persönlichkeit und
seine Kreativität entwickeln, um
seinem Leben Sinn zu geben.
Anwendungsbeispiel
Ein Unternehmen ist am effektivsten und produktivsten, wenn sich Mitarbeitende selbst entfalten und ihr Potential voll ausschöpfen können.
Führungskräfte sollten daher:
Maßgeschneiderte Weiterbildungen und Trainings für alle Angestellten anbieten;
die Interessen und Stärken einzelner Personen fördern und
durch sinngebende Aufgaben ermöglichen, Kreativität und Innovationsfähigkeit der Angestellten steigern.
Maslow Modell 1970
Maslow hat das Modell 1970 zu einer 8-stufigen Pyramide erweitert. An oberster Stelle hat er die Transzendenz hinzugefügt, die Suche nach Gott. Es handelt sich dabei um eine Dimension, die außerhalb der menschlichen Beobachtung liegt.
Nach den Individualbedürfnissen hat er schließlich ästhetische und kognitive Bedürfnisse hinzugefügt.
Das ältere 5-stufige Modell wird jedoch wesentlich häufiger zitiert und angewendet.
</li>
</ul>
<h3>Kritik an der Bedürfnispyramide von Maslow</h3>
<ul>
<li>Wie jedes theoretische Modell wurde auch die Maslowsche Bedürfnispyramide im Zuge neuerer Forschung und Entwicklung kritisiert.
Die wesentlichen Kritikpunkte des Modells sind:
Maslow begründet die Pyramide auf Beobachtungen und nicht auf quantitative Daten.
Das Modell wurde noch nicht empirisch zufriedenstellend überprüft.
Die Bedürfnispyramide ist eine zu starke Verallgemeinerung menschlicher Bedürfnisse und Motive.
Maslow sieht die Spitze der Pyramide als Endpunkt der menschlichen Entwicklung. Diese Auffassung ist unflexibel und restriktiv.
Die Pyramide gilt nicht für alle Kulturen, da sie auf einem westlich-zentrierten Individualismus aufbaut.
Das Modell wird nach wie vor wissenschaftlich diskutiert, erweitert und angewendet.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.scribbr.de/modelle-konzepte/beduerfnispyramide-maslow/"
target="_blank" rel="noreferrer noopener">
Scribbr :: Die Bedürfnispyramide von Maslow verstehen und anwenden</a>
</li>
</ul>
</html>
<html>
<ul>
<li>Wenn ein Amazon-Paket unbestellt ins Haus kommt, ist Vorsicht geboten. Hierbei kann es sich um Identitätsdiebstahl handeln. Das ist in diesen Fällen zu tun.
</li>
<li>Wer obskure Ware in unbestellten Amazon-Paketen erhält, ist möglicherweise Opfer einer Betrugsmasche geworden. Aktuell häufen sich wieder Berichte über den sogenannten "Amazon/Riverty"-Betrug.
</li>
<li>Bei dieser Masche verschaffen sich die Betrüger durch Phishing oder Datenlecks Zugang zu persönlichen Informationen von Amazon-Kunden. Mit diesen Daten erstellen sie neue Konten im Namen der Opfer. Anschließend tätigen sie Bestellungen und lassen den ahnungslosen Geschädigten die Rechnung zukommen.
</li>
<li>Neuerdings bekommen die Opfer aber auch ein Paket – meist voller kurioser Gegenstände. Außerdem befindet sich ein Schreiben des Zahlungsdienstleisters Riverty darin, das im Namen von Amazon die Begleichung einer Monatsrechnung fordert. Darin werden alle angeblichen Käufe abgerechnet, die innerhalb eines Monats getätigt wurden.
</li>
<li>Die neue Masche soll laut dem Verbraucherportal Watchlist Internet den Druck erhöhen, sodass Betroffene eher zu einer Zahlung bereit sind, um weitere Probleme zu vermeiden. Die Betrüger splitten dafür vermutlich die Lieferung. Während die Opfer ein Paket mit Kleinigkeiten bekommen, geht die Hauptlieferung, die für den hohen Rechnungsbetrag verantwortlich ist, wohl an die Betrüger. Früher flatterte lediglich eine Rechnung oder ein Inkassoschreiben beim Geschädigten ins Haus - ohne Paket.
</li>
</ul>
<h3>Amazon-Paket mit Inkassoschreiben – Was ist jetzt zu tun?</h3>
<ul>
<li>Da eine echte Bestellung getätigt und diese auch von Amazon bearbeitet wurde, ist die Forderung grundsätzlich berechtigt. Dennoch gilt: Sie müssen nichts bezahlen. So sollten Sie jetzt vorgehen:
<ul>
<li>Nehmen Sie das Paket gar nicht erst an oder schicken Sie es mit einem Retourenformular zurück.
</li>
<li>Kontaktieren Sie sowohl Amazon als auch Riverty und schildern Sie den Identitätsdiebstahl.
</li>
<li>Amazon bietet ein entsprechendes Online-Formular, um unerwünschte Pakete zu melden.
</li>
<li>Widersprechen Sie allen Forderungen von Amazon und dem Inkassounternehmen.
</li>
<li>Bringen Sie den Identitätsdiebstahl bei der Polizei zur Anzeige.
</li>
<li>Heben Sie alle ausgestellten Dokumente als Beweis auf.
</li>
</ul>
</li>
</ul>
<h3>Auch "Brushing" kann hinter unbestellten Lieferungen stecken</h3>
<ul>
<li>Erhalten Sie Amazon-Pakete, die Sie nicht bestellt haben, kann es sich aber auch um das sogenannte "Brushing" handeln. Dabei werden unbestellte Waren an reale Adressen verschickt. Das Ziel sind jedoch keine Zahlungen, sondern gefälschte positive Bewertungen für die Produkte. Eine Rechnung erhalten Sie dafür jedoch nicht und müssen entsprechend auch nichts bezahlen. Verdächtige Lieferungen sollten Sie dennoch an den Amazon-Kundendienst melden. (sv)
</li>
</ul>
<h3>Verwendete Quellen</h3>
<ul>
<li><a href="https://www.watchlist-internet.at/news/amazon-vorsicht-identitaetsbetrug/"
target="_blank" rel="noreferrer noopener">
watchlist-internet.at: Nichts bestellt, aber trotzdem ein Amazon-Paket bekommen? Vorsicht: Identitätsbetrug!</a>
</li>
<li><a href="https://www.techbook.de/shop-pay/brushing-erklaert"
target="_blank" rel="noreferrer noopener">
Techbook: "Brushing" – warum Sie Pakete bekommen, die Sie nie bestellt haben</a>
</li>
<li><a href="https://www.amazon.de/gp/help/customer/display.html?nodeId=G33XVXQPUV79Z2ZC"
target="_blank" rel="noreferrer noopener">
Amazon: Unerwünschte Pakete und Betrug durch "Brushing" melden</a>
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://web.de/magazine/ratgeber/finanzen-verbraucher/identitaetsdiebstahl-unbestellten-amazon-paketen-41052946"
target="_blank" rel="noreferrer noopener">
Web.de :: Identitätsdiebstahl - Unbestellte Amazon-Pakete: Das steckt hinter der Betrugsmasche </a>
</li>
</ul>
</html>
<html>
<h3>Bewerbungsgespräch – “Haben Sie sich noch woanders beworben?“: Das ist die perfekte Antwort</h3>
<ul>
<p>
<li>Die Frage nach anderen Bewerbungen versetzt viele im Bewerbungsgespräch in Panik.
</li>
<li>Weder will man illoyal wirken noch uninteressant.
</li>
<li>Wie also antwortet man richtig?
</li>
</p>
<p>
<li>Viele empfinden die Frage „Haben Sie sich noch woanders beworben?“ im Bewerbungsgespräch als unangenehm.
</li>
<li>Sie glauben, auf keinen Fall sagen zu dürfen, dass sie sich noch woanders beworben haben und deshalb lügen zu müssen.
</li>
<li>Dabei kann genau das Gegenteil richtig sein.
</li>
</p>
<p>
<li>Anstatt sich durch die Frage verunsichern zu lassen oder gar in Panik zu geraten, sollten Bewerberinnen und Bewerber sie als Chance sehen, ihre Professionalität und Souveränität unter Beweis zu stellen.
</li>
<li>Ehrlichkeit könnte sich sogar auszahlen.
</li>
</p>
<h4>Frage hat pragmatischen Hintergrund</h4>
<p>
<li>Dass viele sich bei der Frage nach anderen Bewerbungen erst mal unwohl fühlen, liegt laut Bewerbungscoach Volker Klärchen daran, dass sich die Bewerber der Firma schon ein Stück weit verpflichtet fühlen.
</li>
<li>„Jeder Bewerber möchte der Firma im Gespräch vermitteln, dass er der Richtige für diese Position ist, womöglich sogar der einzig Richtige“, sagt er zu Capital.
</li>
<li>Wenn die Firma dann plötzlich frage, ob es auch noch andere Bewerbungen gibt, fühle man sich ertappt.
</li>
<li>„Fast so, als hätte einen der eigene Partner beim Fremdgehen erwischt.“
</li>
<li>Dabei sei die Frage gar nicht so gemein, wie sie vielleicht klinge.
</li>
</p>
<p>
<li>Der Personalberaterin und Bewerbungscoach Ines Schöffmann zufolge ist der Hintergrund der Frage oft schlicht ein pragmatischer, denn Recruiting-Prozesse würden gerne relativ lange dauern.
</li>
<li>Um einschätzen zu können, wie aktiv jemand auf Jobsuche ist und wie groß die Gefahr, ob jemand in wenigen Wochen nicht mehr verfügbar sein könnte, würden Arbeitgeber nach anderen Bewerbungen fragen.
</li>
<li>„Die Verantwortlichen wollen natürlich vermeiden, dass Kandidatinnen und Kandidaten ihnen abspringen, weil der Prozess schon so lange dauert“, sagt sie im Gespräch mit Capital.
</li>
<li>„Gleichzeitig möchte man das Ganze nicht übers Knie brechen und den Erstbesten nehmen.
</li>
<li>Der Hintergrund dieser Frage ist daher immer zu verstehen, wie weit jemand schon im Prozess ist.
</li>
<li>Hat jemand vielleicht sogar schon mehrere Angebote?“
</li>
</p>
<h4>Immer sagen: „Ich bin in Gesprächen“</h4>
<p>
<li>Schöffmanns Erfahrung nach werde aber häufig mehr in „Haben Sie sich noch woanders beworben?“ hineininterpretiert.
</li>
<li>Eine beliebte Annahme sei etwa, man solle lieber nicht sagen, wenn man sich noch woanders beworben habe, weil es Zweifel an der Motivation wecke.
</li>
<li>„Das ist unglaublicher Unsinn“, sagt Schöffmann.
</li>
<li>Sie hält das Gegenteil für richtig. „Ich empfehle sogar, immer zu sagen: Ja, ich bin in Gesprächen oder habe schon Gespräche geführt – auch wenn ich nur diese eine Bewerbung laufen habe.“ Das sei genau das, was jeder gute Verkäufer tun würde und als Bewerber verkaufe man schließlich sich selbst. Mit dieser Antwort baue man außerdem Zeitdruck auf.
</li>
</p>
<p>
<li>Dazu erwarten Arbeitgeber, dass sich gute Kandidaten mehrere Optionen offenhalten.
</li>
<li>Schöffmann zufolge könne es beinahe unglaubwürdig wirken, sich nur bei einem Unternehmen beworben zu haben.
</li>
<li>„Es macht einen als Bewerber oder Bewerberin interessanter, wenn man sagt, man ist bereits in Gesprächen“, sagt Schöffmann.
</li>
<li>„Wenn das Unternehmen merkt, man ist für andere Firmen auch interessant, ist das ein Vorteil.“
</li>
<li>Daher könne man ruhig sagen, wenn man schon ein oder mehrere Angebote hat.
</li>
</p>
<p>
<li>Allerdings sollte man eher offen als konkret antworten.
</li>
<li>„Man darf sich nie dazu hinreißen lassen, genaue Zahlen oder gar Unternehmen zu nennen.
</li>
<li>Das bleibt immer das Geheimnis der Bewerber“, sagt Klärchen.
</li>
<li>Eine gute Antwort könnte seiner Meinung nach lauten: „Ja, ich habe mich natürlich auch noch bei anderen Unternehmen beworben. Aber die Position bei Ihnen finde ich aus Grund xy besonders spannend.“
</li>
<li>Oder man könne sagen, es sei einem aber ganz wichtig, dass man eine wirklich fundierte Entscheidung treffe.
</li>
<li>„Das kommt auch sehr gut rüber“, empfiehlt Schöffmann.
</li>
</p>
<h4>Lügen verunsichert beim Bewerbungsgespräch</h3>
<p>
<li>Von Lügen raten beide Coaches allerdings ab, etwa wenn jemand gar keine Gespräche führt, aber behauptet, schon mehrere Angebote zu haben.
</li>
<li>Wenn es dann noch vom Lebenslauf her wenig Sinn ergebe, könne es schnell unglaubwürdig wirken.
</li>
<li>„Die meisten Menschen sind eher verunsichert, wenn sie lügen müssen.
</li>
<li>Das ist keine gute Voraussetzung in einem Vorstellungsgespräch und kostet zudem viel Energie“, sagt Schöffmann.
</li>
<li>Daher sei es immer besser, möglichst nahe an der Wahrheit zu bleiben.
</li>
</p>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.capital.de/karriere/-haben-sie-sich-noch-woanders-beworben---so-muessen-sie-antworten-35553216.html"
target="_blank" rel="noreferrer">
Capital :: Bewerbungsgespräch - “Haben Sie sich noch woanders beworben?“ </a>
</li>
</ul>
</html>
<html>
<ul>
<li><h4>So bekommen Sie Blutflecken aus Bettwäsche und Textilien wieder raus:</h4>
<ul>
<li>Lassen Sie das Blut nach Möglichkeit nicht eintrocknen. Frische Blutflecken gehen leicher raus als eingetrocknete Flecken.
</li>
<li>Verwenden Sie bei Blutflecken immer kaltes Wasser. Bei warmem Wasser gerinnt das im Blut enthaltene Eiweiß und so kann das Blut tiefer ins Gewebe eindringen. Mit Blut befleckte Kleidungsstücke / Bettwäsche usw. also möglichst gleich in kaltem Wasser einweichen.
</li>
<li>Eingetrocknete und hartnäckige Blutflecken können Sie mit altbewährten Hausmitteln bekämpfen. Als besonders wirksam haben sich hier Salz, Zitrone, Gallseife und auch Natron und Backpulver gezeigt.
</li>
</ul>
</li>
<li><h4>Frische Blutflecken entfernen:</h4>
<ul>
<li>Frische Blutflecken lassen sich noch relativ leicht entfernen. Oft reicht es schon aus den Fleck mit kaltem Wasser auszuspülen. Wenn möglich halten Sie dazu das Kleidungsstück oder zum Beispiel die Bettwäsche unter einen kräftigen kalten Wasserstrahl.
Das Blut wird so einfach aus den Fasern gespült. Reicht das nicht aus, können Sie mit etwas Waschmittel, zur Not auch Seife oder einem geeigneten Hausmittel wie Zitronensaft etwas nachhelfen.
</li>
</ul>
</li>
<li><h4>Eingetrocknete Blutflecken lösen</h4>
<ul>
</li>
<li>Bei eingetrockneten Blutflecken wird es schon etwas schwieriger. Sie sollten den Fleck nach Möglichkeit gut einweichen. (Auch hier nur kaltes Wasser verwenden!)
</li>
<li>Sie können dem Wasser etwas Acetylsalicylsäure (in ASS Tabletten wie Aspirin enthalten) hinzufügen.
</li>
<li>Alternativ können Sie Kleidungstücke auch in Salzwasser einweichen.
</li>
</ul>
</li>
<li><h4>Mit Hausmitteln Blutflecken entfernen</h4>
<ul>
<li>Natürlich gibt es im Drogeriemarkt zahlreiche Reinigungsmittel und Fleckenentferner mit denen Sie auch Blut aus der Kleidung oder anderen Gegenständen waschen können. Aber die große chemische Keule ist oft nicht nötig.
</li>
<li>Unsere Großeltern haben mit einigen sehr wirksamen Hausmitteln Blutflecken entfernt. Einige davon möchten wir hier kurz vorstellen: Mit diesen Hausmitteln können Sie Blutflecken entfernen. Etwas weiter unten erklären wir genau wie das geht.
Zitronensaft
Salz
Acetylsalicylsäure (in Aspirin Tabletten enthalten)
Backpulver
Natron
Kartoffelstärke
Gallseife
Kohelsäurehaltiges Mineralwasser
normale Seife
Alkohol
<li><b>Wichtig!</b>
<table style="background: #f1f1f1;" width=500>
<tr>
<td>
<ul>
<li>Beachten Sie dabei bitte, dass nicht alle Hausmittel für jeden Stoff / jedes Material geeignet sind.
</li>
<li>Prüfen Sie ggf. ein Reinigungsmittel / Hausmittel bzw. eine Reinigungsmethode im Zweifelsfall immer vorab an einer unauffälligen Stelle auf Verträglichkeit!
</li>
<li>Beachten Sie auch die Reingungs- und Pflegehinweise des Herstellers, z.B. die Waschsymbole.
</li>
</ul>
</td>
</tr>
</table>
</li>
</ul>
</li>
<li><h4>Mit Zitronensaft hartnäckige Blutflecken lösen</h4>
<ul>
<li>Hier löst die Säure im Zitronensaft den roten Blutfarbstoff aus dem Gewebe. Geben Sie einfach etwas Zitronensaft auf den Blutfleck und lassen Sie diesen 15 bis 45 Minuten wirken, danach gut ausspülen und das Kleidungsstück wie gewohnt waschen.
</li>
</ul>
</li>
<li><h4>Blut mit Salz entfernen</h4>
<ul>
<li>Geben Sie dazu je nach Material und Verschmutzungsgrad ca. 3 bis 6 Esslöffel Salz je Liter Wasser in einen Eimer. Lassen Sie die Salzlösung dann 30 bis 60 Minuten wirken. Danach gut ausspülen und das Kleidungsstück wie gewohnt waschen.
</li>
</ul>
</li>
<li><h4>Auch mit Natron und Backpulver können Sie Blutflecken aus Bettwäsche entfernen!</h4>
<ul>
<li>Sind die Blutflecke auf weißen Kleidungstücken oder zum Beispiel auf weißer Bettwäsche gelandet, können Sie diese recht einfach mit Backpulver oder Natron (gibt es im Drogeriemarkt) entfernen.
</li>
<li>Feuchten Sie den Fleck gut an und geben Sie dann das Natron oder das Backpulver als Paste mit etwas Wasser angerührt auf den Fleck. Evtl. vorsichtig etwas einarbeiten. Etwas wirken lassen (ca. 1 Stunde) und dann gut ausspülen. Bei Bedarf können Sie den Vorgang mit einer evtl. etwas längeren Einwirkzeit wiederholen.
</li>
</ul>
</li>
<li><h4>Gallseife und Kernseife helfen gegen alte Blutflecken</h4>
<ul>
<li>Zu Omas Zeiten durfte Gallseife und Kernseife in keinem ordentlichen Haushalt fehlen. Die hocheffizienten Reinigungsmittel haben unsere Großeltern auch gegen hartnäckige Blutflecken eingesetzt! Dazu haben sie die Seife direkt auf den vorher mit kaltem Wasser angefeuchteten Blutfleck gegeben, die Seife dort einige Minuten wirken lassen und gut ausgespült. Wenn der Stoff es zulässt, können Sie ggf. mit einer Bürste etwas nachhelfen.
</li>
</ul>
</li>
<li><h4>Blutflecken unterwegs entfernen</h4>
<ul>
<li>Sind Sie gerade untewegs und haben auf Ihrer Kleidung einen Blutfleck, können Sie versuchen mit kohlensäurehaltigem Mineralwasser den Fleck rauszureiben. Die Kohlensäure hilft hier das Blut zu lösen.
</li>
<li>Mineralwasser lässt sich an jedem Kiosk oder in jedem Supermarkt auftreiben.
</li>
</ul>
</li>
<li><h4>Blutflecken in "nicht waschbaren Material" bekämpfen</h4>
<ul>
<li>Blutflecken in Kleidung, in der Bettwäsche oder in einem Handtuch sind schon eine echte Herausforderung. Richtig ärgerlich wird es aber, wenn sich ein Blutfleck im Teppich, der Auslegeware, auf einer Matratze oder den Polstermöbeln breit gemacht hat.
</li>
<li>Die Sachen sind teuer und die Behandlung des Flecks gestaltet sich oft schwierig. Deshalb haben wir zu diesen Themen extra Artikel verfasst, in denen beschrieben wird wie Sie hier am besten vorgehen können.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.haushaltstipps.com/Waeschepflege/Flecken/blutflecken-entfernen/"
target="_blank" rel="noreferrer noopener">
Haushaltstipps :: Blutflecken entfernen</a>
</li>
<li><a href="https://www.weg-mit-dem-fleck.de/blutflecken-entfernen/eingetrocknete.php"
target="_blank" rel="noreferrer noopener">
Weg-mit-dem-Fleck :: Eingetrocknete Blutflecken entfernen</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li><b><huge>ACHTUNG!!</huge></b><br />
Um zu verhindern, dass der falsche USB‐Stick ver‐<br />
wendet wird, ist es empfehlenswert, diejenigen USB‐<br />
Sticks, die NICHT verwendet werden sollen, <b>VOR‐<br />
HER</b> abzuhängen.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.tomshardware.com/how-to/dual-boot-linux-and-windows-11"
target="_blank" rel="noreferrer noopener" >
Tom's Hardware :: How To Dual Boot Linux and Windows 11</a>
</li>
<li><a href="https://rufus.ie/de/"
target="_blank" rel="noreferrer noopener" >
Rufus ‐ Homepage</a>
</li>
</ul>
</html>
<html>
<ul>
<li>Stand: 01.01.2025
</li>
</ul>
<h3>Briefversand National</h3>
<table border="1">
<tr>
<th>Format
</th>
<th>Spezifikationen max. Gewicht
</th>
<th>Spezifikationen max. Maße
</th>
<th>Preis
</th>
</tr>
<tr>
<td>Standardbrief
</td>
<td>bis 20 g
</td>
<td>23,5 × 12,5 × 0,5 cm
</td>
<td>0,95 €
</td>
</tr>
<tr>
<td>Kompaktbrief
</td>
<td>bis 50 g
</td>
<td>23,5 × 12,5 × 1 cm
</td>
<td>1,10 €
</td>
</tr>
<tr>
<td>Großbrief
</td>
<td>bis 500 g
</td>
<td>35,3 × 25 × 2 cm
</td>
<td>1,80 €
</td>
</tr>
<tr>
<td>Maxibrief
</td>
<td>bis 1.000 g35,3 × 25 × 5 cm
bis 2.000 g60 × 30 × 15 cm, Höchstmaß: L + B + H =
90 cm (keine Seite länger als 60 cm)
</td>
<td>2,90 €
+2,20 €
</td>
</tr>
<tr>
<td>Postkarte
</td>
<td>150 – 500 g/m<sup>2</sup>
</td>
<td>23,5 × 12,5 cm
</td>
<td>0,95 €
</td>
</tr>
<tr>
</table>
<h3>Warensendung</h3>
FormatSpezifikationen max. Gewicht
Warensendungbis 1.000 g
Spezifikationen max. Maße
35,3 × 25 × 5 cm
bis 2.000 g
<h3>Briefversand International</h3>
Preis1,2
Preis1,4
2,55 €
+0,85 €
*
FormatSpezifikationen max. GewichtSpezifikationen max. MaßePreis1
Standardbrief3bis 20 g23,5 × 12,5 × 0,5 cm1,25 €
Kompaktbrief3bis 50 g23,5 × 12,5 × 1 cm1,80 €
Großbriefbis 500 g35,3 × 25 × 2 cm3,30 €
Maxibriefüber 500 bis 1.000 g35,3 × 25 × 5 cm6,50 €
über 1.000 bis 2.000 gHöchstmaß: L + B + H = 90 cm
(keine Seite länger als 60 cm)17,00 €
150 – 500 g/m223,5 × 12,5 cm1,25 €
Postkarte3
<h3>Zusatzleistungen National</h3>
Format
*
Preis1,5,6
<h3>Zusatzleistungen International</h3>
Format
*
Preis1,5
Einschreiben2,65 €Einschreiben3,70 €
Einschreiben Einwurf2,35 €Einschreiben Rückschein5,90 €
Einschreiben Rückschein4,85 €Einschreiben Wert4,45 €
1 Endpreis und nach UstG umsatzsteuerfrei.
2 Zustellung in der Regel am übernächsten Werktag nach Einlieferung.
3 Die Länge muss mindestens das 1,4-fache der Breite betragen.
4 Zustellung in der Regel am vierten Werktag nach Einlieferung.
Es gelten die AGB BRIEF NATIONAL und die AGB BRIEF INTERNATIONAL. Weitere Informationen
unter deutschepost.de/agb5 Die Preise für die Zusatzleistungen National und International verstehen
* Kompensation (GoGreen) bzw. Reduktion (GoGreen Plus) von Treibhausgasemissionen mit
der Deutschen Post. Mehr Informationen unter deutschepost.de/nachhaltigkeit6 Zustellung in der Regel am nächsten Werktag nach Einlieferung.
sich immer zuzüglich zum Beförderungsentgelt.
n:
usdrucke
n selbst a
e
rk
a
e
m
s
rk
g
tma
Ergänzun
e/interne
chepost.d
ts
u
e
.d
p
o
sh
Stand: Dezember 2024
</html>
<html>
<ul>
<li>Michael Inden:<br />
Python Challenge ‐ Fit für Prüfung, Job‐Interview und Praxis ‐ mit 100 Aufgaben und Musterlösungen <br />
ISBN-13 :: 9783864908095<br />
</li>
<br />
<li>
Günter Spanner:<br />
Machine Learning mit Python für PC, Raspberry Pi und Maixduino <br />
ISBN-13 :: 9783895764752<br />
</li>
<br />
<li>Chris Fregly, Antje Barth:<br />
Data Science mit AWS - End-to-End-Pipelines für Continuous Machine Learning implementieren <br />
ISBN-13 :: 9783960091844<br />
</li>
<br />
<li>Steffen Herbold:<br />
Data-Science-Crashkurs - Eine interaktive und praktische Einführung <br />
ISBN-13 :: 783864908620<br />
</li>
<br />
<li>Alex J. Gutman, Jordan Goldmeier:<br />
Werde ein Data Head - Data Science, Machine Learning und Statistik verstehen und datenintensive Jobs meistern <br />
ISBN-13 :: 9783960091912<br />
</li>
<br />
<li>Philipp Lichtenauer:<br />
Ohne starke Nerven geht es nicht ‐ der erfolgreiche Weg vom Angestellten zum Unternehmer ‐ Unternehmerwissen für angehende Gründer <br />
ISBN-13 :: 9783868818772<br />
</li>
<br />
<li>Valentin Plenk:<br />
Angewandte Netzwerktechnik kompakt ‐ Dateiformate, Übertragungsprotokolle und ihre Nutzung in Java-Applikationen <br />
ISBN-13 :: 9783658245221<br />
</li>
<br />
<li>Tilo Arens, Rolf Busam, Frank Hettlich:<br />
Grundwissen Mathematikstudium ‐ Analysis und Lineare Algebra mit Querverbindungen ‐ Analysis und Lineare Algebra mit Querverbindungen <br />
ISBN-13 :: 9783662633120<br />
<b><em>!! in der Stadtbibliothek Hannover vorhanden!!</em></b><br />
</li>
<br />
<li>Xenia Frentzel:<br />
Kinder erziehen <br />
C.H. Beck Verlag, 2013 <br />
</li>
<!--
<br />
<li>:<br />
<br />
<br />
</li>
<br />
<li>:<br />
<br />
<br />
</li>-->
</ul>
</html>
<html>
<ul>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://pastaweb.de/cannelloni-fuellen-trick-so-klappt-es/"
target="_blank" rel="noreferrer noopener">
PastaWeb :: Cannelloni füllen – Trick – So klappt es am besten!</a>
</li>
<li><a href="https://grillgeschichten.de/cannelloni-fuellen-die-besten-tipps-und-tricks/"
target="_blank" rel="noreferrer noopener">
Grill-Geschichten :: Cannelloni füllen: Die besten Tipps und Tricks</a>
</li>
<li><a href="https://www.frag-mutti.de/cannelloni-fuellen-schnell-sauber-einfach-a30216/"
target="_blank" rel="noreferrer noopener">
Frag Mutti :: Cannelloni füllen – schnell, sauber & einfach</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<meta keyboard Keyboard />
<ul>
<li>Um die vor eingestellten Lichtmodi auf der Corsair K55 RGB Tastatur<br />
zu ändern, halten Sie die FN-Taste gedrückt und drücken Sie die ent–<br />
sprechende Funktionstaste (F1, F2 oder F3), um zwischen den vor–<br />
definierten Farben zu wechseln.
</li>
<li>Jede der drei Zonen der RGB-Hintergrundbeleuchtung kann <br />
individuell mit einer der 8 vordefinierte Farben angepasst wer-<br />
den.
</li>
<li>Um den benutzerspezifischen Beleuchtungsmodus zu speichern,<br />
halten Sie die Kombination FN + 7 für drei Sekunden gedrückt.
</li>
<li>Die Tastatur blinkt zweimal in den ausge–<br />
wählten Farben, um zu bestätigen, dass der benutzerspezifische<br />
statische Modus gespeichert wurde.<br />
</li>
<br />
<li>die FN-Taste ist rechts unten, neben ALT-GR;
</li>
<br />
<li>"Blau" ist unter FN + 6 abgespeichert;
</li>
<li>Sollte die Einstellung verschwinden, dann einfach
<code><pre>FN + 1</code></pre>
drücken;
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.bedienungsanleitu.ng/corsair/k55-rgb/anleitung"
target="_blank" rel="noreferrer noopener">
Corsair - Tastatur - Bedienungsanleitung</a>
</ul>
</html>
<html>
<ul>
<li>Vorbei sind die Zeiten vom höflichen Small Talk, es ist an der Zeit, in die Tiefe zu gehen. Gegen ein "Hallo, wie geht's?" ist zwar nichts einzuwenden, doch wer neue Bekanntschaften richtig kennenlernen möchte, kommt mit Floskeln nicht weit. Und das gilt auch für Freundschaften oder Beziehungen. Tiefgründige Fragen regen zum Nachdenken an und eröffnen Gespräche, aus denen man lernen, sich besser verstehen oder das Handeln von seinem Gegenüber besser nachvollziehen kann. Deshalb haben wir 101 Fragen für Sie zusammengestellt, mit denen peinliches Schweigen der Vergangenheit angehört.
</li>
<li><h3>Was ist Deep Talk?</h3>
<ul>
<li>Deep Talk ist eine Form des Gesprächs, bei dem die Teilnehmer*innen tiefgründige Themen diskutieren und sich auf eine ehrliche und offene Art und Weise miteinander verbinden. Die wichtigste Voraussetzung dafür: jede*r Beteiligte muss sich wohlfühlen! Denn in einem Deep Talk geht es darum, sich gegenseitig zu verstehen, intime Gefühle und Gedanken zu teilen und unterschiedliche Perspektiven zu allen möglichen Lebensbereichen zu besprechen.
</li>
<li>Kurz: Deep Talks sind eine Gelegenheit, die Oberflächlichkeit zur Seite zu schieben und wirklich bedeutsame Gespräche zu führen. Ein Richtig oder Falsch gibt es hier nicht. Wichtig ist, dass man aufrichtig ist, nicht verurteilt und sich gegenseitig zuhört.
</li>
</ul>
</li>
<li><h3>Was sind typische Deep Talk Themen?</h3>
<ul>
<li>Für einen Deep Talk gibt es keine vorgeschriebenen Themen. Es wird darüber geredet, was einen im Moment bewegt. Das kann
die eigene Unausgeglichenheit im Alltag sein,
Probleme mit anderen Freund*innen,
Zweifel an der Beziehung,
Lebensziele,
Sorgen,
die eigene Kindheit,
aktuelle Themen und Probleme in der Familie,
eine Neuorientierung im Job,
oder spirituelle und philosophische Themen.
Bei Deep Talk dreht sich alles um die wirklich existenziellen Fragen im Leben.
</li>
</ul>
</li>
<li><h3>101 Fragen, die Sie während eines Deep Talks stellen können</h3>
<ul>
<li>Bereits mit ein paar simplen Formulierungen, kann aus jeder oberflächlichen Frage eine tiefgründige werden, die von einem aufrichtigen Interesse an der Person zeugt. Mit diesen 101 Fragen ist ein tiefgründiges und intimes Gespräch ganz leicht.
</li>
<li><h3>Wie fängt man einen Deep Talk an? Die besten Einstiegsfragen für das Gespräch</h3>
<ul>
<li>Um nicht sofort mit der Tür ins Haus zu fallen und der anderen Person zu nahe zu treten, sind hier gute, aber dennoch tiefsinnige Fragen für den Beginn eines Deep Talks.
<ol>
<li>Was ist das Schönste, was dir heute passiert ist?
</li>
<li>Was war das Aufregendste, was du am Wochenende erlebt hast?
</li>
<li>Wann hast du das letzte Mal etwas in deinem Leben zum ersten Mal gemacht?
</li>
<li>Was glaubst du, wie dein Leben als Mann/Frau wäre?
</li>
<li>Wovor hast du am meisten Angst?
</li>
<li>Wie gehst du mit einschneidenden Veränderungen und Herausforderungen um?
</li>
<li>Glaubst du an Schicksal oder glaubst du, dass wir unser eigenes Leben gestalten?
</li>
<li>Was ist für dich der Sinn von Beziehungen und zwischenmenschlicher Verbindung?
</li>
<li>In welchen Momenten fühlst du dich am lebendigsten und verbundesten mit dir selbst?
</li>
<li>Wie würdest du gerne in Erinnerung bleiben, wenn du nicht mehr da bist?
</li>
<li>Wie wichtig ist dir Geld?
</li>
<li>Wann macht dich Geld wirklich glücklich?
</li>
<li>Glaubst du Freundschaften sind mit dem Geschlecht möglich, das du anziehend findest?
</li>
<li>Wann hast du das letzte Mal geweint?
</li>
<li>Was ist deine beste Eigenschaft?
</li>
<li>Was ist deine schlechteste Eigenschaft?
</li>
<li>Wann warst du das letzte Mal so richtig stolz auf dich?
</li>
<li>Welchen Tag in deinem Leben würdest du gerne nochmal erleben?
</li>
<li>Welcher Film oder welcher Song hat dich zuletzt berührt?
</li>
<li>Worin möchtest du besser werden?
</li>
<li>Was würdest du gerne neu lernen?
</li>
<li>Welche Lebensphase war besonders prägend für dich?
</li>
<li>Was war in der Welt früher besser als heute?
</li>
<li>Wenn du entscheiden könntest: Würdest du Social Media verschwinden lassen oder nicht?
</li>
<li>Ohne was könntest du niemals leben?
</li>
</ol>
</li>
</ul>
</li>
<li><h3>Deep Talk Fragen für Ihre Beziehung</h3>
<ul>
<li>Egal ob man erst seit zwei Monaten eine Beziehung führt oder seit zehn Jahren - man hört nie auf, die andere Person besser zu verstehen und immer wieder neue Facetten von ihr kennenzulernen. Diese Deep Talk Fragen helfen Ihnen, Ihrem Partner oder Ihrer Partnerin auf eine ganz andere Art und Weise näher zu kommen:
<ol>
<li>Was bedeutet für dich wahre Liebe und wie möchtest du in unserer Beziehung geliebt werden?
</li>
<li>In welcher Hinsicht möchtest du dich persönlich weiterentwickeln und wachsen?
</li>
<li>Wie stellst du dir ein erfülltes und glückliches Leben vor?
</li>
<li>Wie können wir als Paar gemeinsam daran arbeiten, eine tiefere Verbindung zueinander aufzubauen?
</li>
<li>Was dachtest du, als du mich zum ersten Mal gesehen hast?
</li>
<li>Wann wusstest du, dass du mit mir eine Beziehung führen willst?
</li>
<li>Kannst du dich noch an den Moment erinnern, in dem du dich in mich verliebt hast?
</li>
<li>Was bedeutet es für dich ein guter Partner oder eine gute Partnerin zu sein?
</li>
<li>Was wünscht du dir von mir als Partner oder Partnerin?
Was könntest du mir niemals verzeihen?
Was sind drei Dinge, die wir von einander gelernt haben?
Hat sich deine Sichtweise auf die Liebe verändert, seitdem wir eine Beziehung führen?
Hast du Veränderungen an dir festgestellt, seitdem wir zusammen sind? Positive und negative.
Was verbindet uns als Paar am meisten?
Was haben wir von einander gelernt?
Was können wir noch von einander lernen?
Welche Eigenschaften schätzt du an mir am meisten?
Hast du etwas über dich durch mich gelernt?
In welchen Momenten empfindest du am meisten Liebe für mich?
Wenn wir an einem Ort auf der Welt leben könnten, wo wäre das?
Welche Grenzen sind dir in einer Beziehung wichtig?
Wie denkst du über unsere gemeinsame Zukunft und wie stellst du dir diese vor?
Wann benötigst du etwas Freiraum?
An welchen gemeinsamen Moment erinnerst du dich am liebsten?
Wie sieht eine perfekte Date Night für dich aus?
Womit würdest du gerne einmal von mir überrascht werden?
Hattest du schon einmal das Gefühl, von mir enttäuscht worden zu sein?
Würdest du etwas an unserer Beziehung verändern wollen und wenn ja, was?
Was schätzt du an unserer Beziehung am meisten?
Welche geheimen Fantasien hast du für unser Sexleben?
</li>
</ol>
</li>
</ul>
</li>
<li><h3>Deep Talk Fragen für Ihre Freunde und Freundinnen</h3>
<ul>
<li>Auch Freundinnen und Freunde haben manchmal Schwierigkeiten damit, sich zu öffnen. Diese Fragen machen es ihnen leichter:
<ol>
<li>Was bedeutet wahre Freundschaft für dich?
Würdest du behaupten, dass du echte Freunde oder Freundinnen hast?
Welche Eigenschaften schätzt du an unserer Freundschaft am meisten?
In welchem Moment war ich dir eine wirklich gute Freundin oder ein guter Freund?
Wann war ich dir keine gute Freundin oder kein guter Freund?
Glaubst du, dass wir als Menschen vorherbestimmt sind, einen bestimmten Weg zu gehen, oder dass wir unser Schicksal selbst formen?
Wie gehst du mit Herausforderungen und Rückschlägen in deinem Leben um?
Was ist der Sinn des Lebens für dich und wie versuchst du, diesem Sinn gerecht zu werden?
Welche Werte sind dir am wichtigsten und wie beeinflussen sie deine Entscheidungen und Handlungen?
Wie würdest du persönliches Glück und Erfolg definieren und inwieweit stimmen diese Definitionen mit deinen gegenwärtigen Lebensumständen überein?
Welche Rolle spielt deiner Meinung nach Dankbarkeit im Leben und wie manifestiert sich diese in deinem Alltag?
Wie würdest du anderen gerne in Erinnerung bleiben?
Welche Frage hast du dich noch nie getraut mir zu stellen?
Was würdest du noch gerne in deinem Leben machen oder was bereust du, bisher noch nicht getan zu haben?
Welche Ziele setzt du dir für die nächsten Jahre?
Welchen Moment aus deiner Kindheit würdest du gerne nochmal erleben?
Was macht die Welt für dich besonders grausam? Und was besonders schön?
Welche Entwicklung hast du in den letzten gemacht?
Was liebst du am meisten an dir?
Fühlst du dich manchmal von der gesellschaftlichen Norm unter Druck gesetzt, und wie versuchst du, dich dagegen zu behaupten?
Gibt es ein Erlebnis oder eine Erfahrung, die dein Leben stark verändert hat und wenn ja, inwiefern hat es dich geprägt?
Worin siehst du den Sinn des Lebens?
Wovor hast du am meisten Angst?
Inwiefern glaubst du, dass unsere Kindheitserlebnisse uns als Erwachsene prägen und welche Auswirkungen haben sie auf unsere heutigen Beziehungen und Entscheidungen?
</li>
</ol>
</li>
</ul>
</li>
<li><h3>Deep Talk Fragen für die Familie</h3>
<ul>
<li>Neben einer Tasse Kaffe und einem leckeren Stück Kuchen, machen diese Fragen das nächste Familientreffen zu etwas Besonderem.
<ol>
<li>Was ist der beste Ratschlag, den du je bekommen hast?
Wie war eure Kindheit?
Was bedeutet es für euch, eine glückliche Familie zu sein?
Wie habt ihr als Eltern gelernt, mit schwierigen Zeiten umzugehen?
Welche Werte möchtet ihr mir als Familie weitergeben?
Was sind eure größten Hoffnungen und Ängste bezüglich unserer Familie?
Wie könnt ihr euch als Eltern weiterentwickeln und wachsen?
Gibt es eine Sache in der Erziehung, die ihr heute anders machen würdet?
Was sind eure persönlichen Wünsche und Träume, die ihr noch verwirklichen möchtet?
Was war der schwierigste Moment als Mutter/Vater und wie bist du damit umgegangen?
Welchen Traum hast du dir bis heute nicht erfüllt?
Welchen Beruf würdest du heute gerne ausüben, wenn du nochmal von vorne anfangen könntest?
Was hast du von deinen Eltern gelernt?
Was würdest du heute deinem jüngeren Ich gerne sagen?
Was ist deine schönste Erinnerung aus meiner Kindheit?
Was ist die schönste Erinnerung für dich als Elternteil?
Welche Werte und Traditionen in unserer Familie sind dir besonders wichtig und warum?
Wie siehst du die Dynamik und Kommunikation in unserer Familie und gibt es etwas, das wir verbessern könnten?
Gibt es etwas, was du schon immer mit mir/uns als Familie teilen wolltest, aber bisher nicht konntest?
Inwiefern fühlst du dich von mir/uns als Familienmitglied unterstützt und verstanden?
Was bedauerst du am meisten?
Wer ist dein größtes Vorbild?
</li>
</ol>
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.elle.de/lifestyle/psycho/deep-talk-fragen"
target="_blank" rel="noreferrer noopener">
Elle :: Deep Talk statt Small Talk: 101 tiefgründige Fragen für ein richtig gutes Gespräch</a>
</ul>
</html>
<html>
<table>
<tr>
<th>Nickname
</th>
<th>Club(s)
</th>
<th>Reason
</th>
</tr>
<tr>
<td>Addicks
</td>
<td>Charlton Athletic
</td>
<td>A corruption of the word 'haddocks', named after a local fish and chip shop
</td>
</tr>
<tr>
<td>Angels
</td>
<td>Tonbridge Angels
</td>
<td>Based on the club's name
</td>
</tr>
<tr>
<td>Ash Trees
</td>
<td>Ashford Town
</td>
<td>The emblem of the town, derived both from the name of the town and from the large tree that stood in the centre of the town for many years
</td>
</tr>
<tr>
</td>
<td>Atom Men
</td>
<td>AFC Aldermaston
</td>
<td>Named after the local Atomic Weapons Research Establishment
</td>
</tr>
<tr>
<td>Avenue
</td>
<td>Bradford Park Avenue
</td>
<td>The club has always been known colloquially as "Avenue"
</td>
</tr>
<tr>
<td>Baggies
</td>
<td>West Bromwich Albion
</td>
<td>Acquired when the players played in long shorts[citation needed]
</td>
</tr>
<tr>
<td>Bantams
</td>
<td>Bradford City
</td>
<td>A reference to the claret and amber colours of the club's strip
</td>
</tr>
<tr>
<td>Beach Boys
</td>
<td>Concord Rangers
</td>
<td>Their first stadium was right next to the beach.
</td>
</tr>
<tr>
<td>Beavers
</td>
<td>Hampton & Richmond Borough
</td>
<td>From the name of the ground, Beveree, itself named after a mansion in whose former grounds it is situated.
</td>
</tr>
<tr>
</td>
<td>Bees
</td>
<td>Basildon
</td>
<td>Based on initial letter of club name
</td>
<td>Barnet
</td>
<td>Based on initial letter of club name
</td>
<td>Brentford
</td>
<td>Based on initial letter of club name
</td>
</tr>
<tr>
<td>Biscuitmen
</td>
<td>Reading
</td>
<td>Referred to former Huntley and Palmers biscuit factory in the town (not used since the 1980s; superseded by Royals, see below)
</td>
</tr>
<tr>
<td>Black Cats
</td>
<td>Sunderland
</td>
<td>Named after the Black Cat gun battery which stood on the river Wear. Also references the 'lucky' black cat which 'led' to the team winning the FA Cup
</td>
</tr>
<tr>
<td>Blades
</td>
<td>Sheffield United
</td>
<td>Local links with steel and cutlery. Formerly the nickname of rivals Sheffield Wednesday at which time United were known as the Cutlers
</td>
</tr>
<tr>
Bluebirds Cardiff City Based on club crest
Chippenham Town F.C.
</tr>
<tr>
Blues Birmingham City Colour of home football kit
Chelsea Colour of home football kit
Everton Colour of home football kit
Grays Athletic Colour of home football kit
Ipswich Town Colour of home football kit
Shrewsbury Town Colour of home football kit
Southend United Colour of home football kit
Wingate & Finchley Colour of home football kit
Worcester City
Wycombe Wanderers Colour of home football kit. Also known as The Chairboys
</tr>
<tr>
Boro Harrow Borough Based on club's name
Middlesbrough Short version of name
</tr>
<tr>
Nuneaton Borough Based on club's name
</tr>
<tr>
Stevenage Short version of original name, Stevenage Borough
</tr>
<tr>
Brakes Leamington Leamington were the works team for the local Automotive Products factory, which made, amongst other things, aeroplane brakes
</tr>
<tr>
Brickies Sittingbourne
</tr>
<tr>
Brewers Burton Albion Local links to the brewing industry
</tr>
<tr>
Bucks AFC Telford United Derived from stadium name New Bucks Head (previously The Bucks Head) which was named after a pub that was formerly situated in one corner of the ground
</tr>
<tr>
Bury St Margaretsbury Short version of name
</tr>
</table>
Canaries Hitchin Town The club's home colours
Norwich City Due to popularity of canary breeding in Norfolk in the early days of the club. The home strip became coloured to match the colour of the bird. Since 1922, is [part of] the club's badge. (See Norwich City F.C.#Colours and crest).
Castle Newcastle Town F.C. Short version of name
Casuals Corinthian-Casuals Short version of name
Cards / Cardinals Woking From the Cardinal red of the red and white shirt halves,[3] cards being a shortening of the nickname
Carpetmen Kidderminster Harriers The modern carpet industry was founded in the area
Chairboys Wycombe Wanderers Local links to the furniture making industry. Also known as The Blues.
Cherries A.F.C. Bournemouth Stadium built on a cherry tree orchard
Cityzens Manchester City From the name "City"; historically "citizen" meant "inhabitant of a city".
Citizens Norwich City Derived from 'City'. Original nickname for Norwich, now superseded by Canaries (see above)
Clarets Burnley Colour of home strip
Chelmsford City Colour of home strip
Club Sheffield F.C. World's oldest football club
Cobblers Northampton Town Local links to the shoe making industry
Cod Army Fleetwood Town Local links to the fishing industry
Cottagers Fulham From club's ground, Craven Cottage, which has a cottage in the corner
Crusaders Hungerford Town
Cumbrians Carlisle United From Cumbria, the county the club are from
Daggers Dagenham & Redbridge Based on club name
Dale Rochdale Short version of name
Darts Dartford Based on club's name
Diamonds Rushden & Diamonds Short version of name, used by its predecessor club
Dolly Blues Lancaster City Derived from the fact that team originally played in the same colour as the 'Dolly Blue' washing tablets
Donny Doncaster Rovers The regional nickname of the town
Dons AFC Wimbledon Taken from latter part of 'Wimbledon'. See also Wimbledon F.C.
Hendon F.C. Taken from latter part of 'Hendon'
MK Dons Taken from latter part of 'Wimbledon'. See Wimbledon F.C.
Eagles Bedford Town The emblem of Bedford features an eagle
Crystal Palace Introduced during the managership of Malcolm Allison in 1973. Origin unknown.[4]
FCUM FC United of Manchester Abbreviation of the club's name
Filberts Leicester City Seldom used, derives from previous ground being located on Filbert Street
Fleet Gravesend and Northfleet Short version of name
Fosse Leicester City Original name was Leicester Fosse, which derived from The Fosse Way. Name still in use by commentator Stuart Hall
Foxes Leicester City Outline of Leicestershire on a map resembles a fox's head, Hunting tradition of the county[5]
Franchise Milton Keynes Franchised football club
Gas Bristol Rovers Old ground next door to a Gasworks
Gate Margate The ending of the club's name
Gills Gillingham Short version of name
Glassboys Stourbridge F.C. Stourbridge was a centre of glass making
Glaziers Crystal Palace Reference to The Crystal Palace. No longer used
Glovers Yeovil Town Local links to the glove making industry
Grecians Exeter City Grecians was, for centuries, the nickname for people from the St Sidwells parish of Exeter where the ground is situated
Greens Hendon F.C. The club's home colours
Gulls Torquay United Seaside link
Gunners Arsenal Team was formed from munitions workers at the Royal Arsenal
Hamlet Dulwich Hamlet Shortened version of the club's name
Hammers West Ham United Although this may initially appear to be based on a simple corruption of the name, the team originated at Thames Ironworks; the club's crest depicts crossed metalworking/rivetting hammers
Harriers Kidderminster Harriers Short version of name
Hatters Luton Town Local links to hat making industry
Stockport County One of Cheshire's and Britain's main hatting industry towns
Hawks Harlow Town
Whitehawk The end of the club's name
Hippos Honiton Town Based on the fact a hippo's bones were discovered during construction of the town's bypass.[6][7]
Hillians Burgess Hill Town Based on coming from Burgess Hill
Heed Gateshead Based on shortening of Gateshead, and the local pronunciation of Head
Hoops Queens Park Rangers Design of home strip
Hornets Watford Colour of strip
Imps Lincoln City Legend of the imp statue in Lincoln Cathedral (also "Red Imps")
Ingfielders Ossett Town So nicknamed after the name of the ground, Ingfield)
Invicta Folkestone Invicta The end of the club's name
Iron Scunthorpe United Local links to the iron industry
Braintree Town The club was formed as Manor Works, the works team of the Crittall Window Company, from which they gained their nickname Iron.
Irons West Ham United The club's origins as the football team of Thames Ironworks. Used more by fans, and on matchdays, than the club's official nickname "The Hammers." Irons can be heard in chants/songs by fans such as "Come on You Irons!"
K's Kingstonian The first letter of the club's name
Knitters Hinckley United Local links to the Knitwear and Hosiery industry
Lads Sunderland Name used by the fans, locals and media on match days and used on the stand has club motto "Ha'way the Lads" fans say "Ganna watch the Lads" True nickname of Sunderland
Lambs Tamworth Team plays at The Lamb Ground, named after a local pub
Lashers Blackpool FC Known as 'Donkey Lashers' due to donkeys on Blackpool Beach
Latics Oldham Athletic Short version of name
Wigan Athletic Short version of name
Lilywhites Preston North End Colour of home strip
Fulham Colour of home strip
Cambridge City Colour of home strip
Tottenham Hotspur Colour of home strip
Linnets Burscough Name of a bird sometimes known as the 'green linnet'; nickname used for teams that play in green
King's Lynn Town F.C. Also formerly used by its predecessor club King's Lynn F.C.
Runcorn Linnets Name of a bird sometimes known as the 'green linnet'; nickname used for teams that play in green. Also used by related now dissolved Runcorn F.C. Halton
Lions Aston Villa F.C. Featured on badge
Millwall Featured on badge
Guiseley A.F.C.
Mackems Sunderland A.F.C. From their shipbuilding heritage
Magpies Newcastle United Based on black and white colour of home strip
Notts County Based on black and white colour of home strip[8]
Maidenhead United Based on black and white colour of home strip.
Chorley Based on black and white colour of home strip.
Mariners Grimsby Town The club is based on the coast
Millers Rotherham United Based on ground name (Millmoor)
Minstermen York City York Minster is a famous landmark in the city
Moatsiders Merstham They play at Moatside
Monkey hangers Hartlepool United During the Napoleonic wars the citizens of Hartlepool allegedly hanged a monkey believing it to be a French spy.[9]
Moors Solihull Moors Shortened version of their name
Mushrooms Hayes & Yeading United Due to the fact that the club's Board keep the club's supporters in the dark.
Nailers Belper Town The manufacture of nails was formerly a widespread cottage industry locally
O's Leyton Orient Based on initial letter of club name. Before squad numbers on shirts, Orient players wore large letter Os on their shirt backs
Owls Sheffield Wednesday Based on name of local area (Owlerton), after a visitor to the city drew a cartoon depicting Sheffield Wednesday as an owl
Peacocks Leeds United (Virtually obsolete). Stems from the former name of the Elland Road stadium, The Old Peacock Ground, which was in turn named after the nearby The Old Peacock pub[10]
Pilgrims Boston United Local links to the pilgrims who went to the New World
Plymouth Argyle Local links to the pilgrims who went to the New World
Pirates Bristol Rovers Local links to shipping
Pompey Portsmouth The nickname for the city of Portsmouth and HMNB Portsmouth, possibly originating from HMS Pompee (1793)
Pool Blackpool Short version of name
Pools Hartlepool United Short version of name when known as Hartlepools United
Poppies Kettering Town Stadium built on a former poppy field
Bournemouth F.C. Poppies used to flourish in the stadium
Posh Peterborough United Believed to derive from former manager Pat Tirrel proclaiming that he was looking for: "Posh players for a posh team"[11]
Potters Stoke City Local links to the pottery industry
Puritans Banbury United Traditionally in the town's history, many inhabitants were strongly involved in the Puritan movement
QPR Queens Park Rangers Abbreviation of club name
Quakers Darlington Local links to religious movement
R's Queens Park Rangers Final initial of club abbreviation, QPR
Brightlingsea Regent The first letter of the word Regent
Railwaymen Crewe Alexandra Local links to railways
Rams Derby County Folk song "The Derby Ram", and by extension an emblem of the city[12]
Hendon A ram is on their logo.
Rebels Slough Town Created the Corinthian League in protest against the Spartan League
Worthing Resigned from the West Sussex League due to a rule change in 1920
Red Rebels FC United of Manchester The club having been formed by disaffected fans after the takeover of Manchester United by Malcolm Glazer. None of the fans refer to the club by this, it is purely a media name, primarily used by the Manchester Evening News.
Red Devils Crawley Town
Manchester United Nickname originally belonged to nearby rugby league team Salford
Red Imps Lincoln City Colour of home kit and legend of the imp statue in Lincoln Cathedral
Reds Liverpool Colour of home kit
Nottingham Forest Colour of home kit
Manchester United Colour of home kit
Ricay Billericay Town Based on the club's name
Riversiders Blackburn Rovers After a side of the ground adjacent to a river
Robins Altrincham Colour of home kit same as a robin's chest
Bracknell Town
Bristol City Colour of home kit same as a robin's chest
Charlton Athletic Colour of home kit same as a robin's chest
Cheltenham Town Colour of home kit same as a robin's chest
Carshalton Athletic A robin is on the club's logo
Evesham United
Ilkeston
Swindon Town Colour of home kit same as a robin's chest
Rocks Bognor Regis Town
East Thurrock United
Romans Bath City
Rooks Lewes A common bird of the town
Royals Reading The town is in the Royal County of Berkshire
Saddlers Walsall Links to the saddle making industry
Saints Brackley Town
Southampton St. Mary's Young Men's Association[13]
St Albans City
Salop Shrewsbury Town Traditional name for the town of Shrewsbury and also Shropshire as a county (Latin name Salopia)
Sandgrounders Southport Town is on a stretch of coast known for its expansive sandy beaches
Scholars Potters Bar Town In reference of the original name of Mount Grace Old Scholars
School of Science Everton 1928, comment of Everton's attractive style of play with the team being called 'scientific' or 'the school of science'
Seagulls Brighton & Hove Albion Based on coast, also a response to the similar-sounding nickname 'Eagles' of their rivals Crystal Palace
Seals Chester City Old ground named Sealand Road
Seasiders Blackpool Based on coast
Shakers Bury Club's first chairman, JT Ingham, said before a Lancashire Cup game with Blackburn, "We will shake them. In fact, we are the Shakers."[14]
Shaymen Halifax Town Originates from the club's ground, same nickname as its predecessor club
Shots Aldershot Town Short version of name
Shrews Shrewsbury Town Short version of name
Shrimps Morecambe Related to the fishing/shrimping industry in the region and Morecambe Bay's famous "potted shrimps"
Shrimpers Southend United A historic local industry; alliterative
Shopmates Raunds Town A reference to the local boot and shoe industry, which was largely workshop-based.
Silkmen Macclesfield Town Local links to the silk industry
Sky Blues Coventry City Colour of home strip
Manchester City Colour of home strip
Smoggies Middlesbrough From the industrial pollution, or smog, from the steel and chemical plants surrounding the town
Spireites Chesterfield Reference to famous crooked spire in the town
Spitfires Eastleigh The first test flight of the Supermarine Spitfire was at the airport in Eastleigh
Sports Eastbourne Borough Due to team's previous name of Langney Sports F.C.
Spurs Tottenham Hotspur Based on the spurs that the fighting cockerel wears on its leg, of which comes from Harry Hotspur's fighting cockerels in Shakespeare's Henry IV Part1
Spartans Blyth Spartans
Stags Mansfield Town Stag head on their crest
Stones Maidstone United Based on the club's name
Wealdstone F.C. Based on the club's name
Stripes Stevenage Borough Based on the pattern of the home strip
Swans Swansea City Based on abbreviation of city name
Super Hoops Queens Park Rangers Based on the pattern of the home strip
Superwhites Tranmere Rovers Colour of their home strip
Tanners Leatherhead
Tangerines Blackpool Colour of their home kit
Tarn Barnsley 'Town' spoken in the local accent.
Terras Weymouth Club plays in a terracota coloured kit
Terriers Huddersfield Town Named after the Yorkshire Terrier breed of dog - based on a vote of their supporters to create a nickname
Teyn Northampton Town Town said in a Northampton accent
The Throstles West Bromwich Albion Based on the large number of Song Thrushes (Throstles) near the ground.
Tigers Gloucester City Colours of home strip
Hull City Colours of home strip
Tivvy Tiverton Town Based on club's name
Toffees / Toffeemen Everton The origin of the Toffee nickname dates back almost to the formation of the club. Ye Ancient Everton Toffee House was a sweet shop owned by Old Ma Bushell, who created Everton Toffee. The toffee was sold to the fans. The team was called 'Toffees' or 'Toffeemen'.[15]
Toon Newcastle United Local pronunciation of 'Town', meaning City Centre where the ground is situated
Towners Enfield Town To show they belong to the town i.e. Enfield Town
Tractor Boys Ipswich Town Local links to agriculture[16]
Tricky Trees Nottingham Forest Crest is a tree
Trotters Bolton Wanderers In the 19th century, one of their pitches was adjacent to a piggery and clearances often end up in there. Players had to 'trot' through the pig-pens to retrieve the balls.[17]
Tudors Hemel Hempstead Town Their logo contains an image of King Henry VIII
Two Blues Bishop Auckland The kit features two shades of blue, originating from the colours of Oxford University and Cambridge University.
Tykes Barnsley F.C. Colloquial name for a Yorkshireman.
Tynesiders Gateshead Gateshead is located on Tyneside
U's Cambridge United Initial of name
Colchester United Initial of name
Oxford United Initial of name
Sutton United Initial of name
United Manchester United Short version of name
Sheffield United Short version of name. Also used to differentiate between the two Sheffield clubs of Wednesday and United.
Urchins A.F.C. Hornchurch
Valiants Port Vale Based on official name
Vics Northwich Victoria Based on shortening of official name
Vikings Doncaster Rovers Based on the club badge, as well as Rovers being a term for Vikings
Goole AFC Based on the town's Viking history.
Villans Aston Villa Based on official name and for being traditional rivals of Birmingham City
Wanderers Bolton Wanderers Short form of the club's name
Dorking Wanderers Short name of the club
Wednesday Sheffield Wednesday Original name of the club
Whites Bolton Wanderers
Dover Athletic Based on the chalk from the White Cliffs of Dover
Fulham Colour of their home strip. Sometimes referred to as the Lillywhites
Leeds United Main colour of home strip
Preston North End
Salisbury Same nickname as its predecessor club
White Tigers Truro City
Wings Welling United Has a horse with wings on the logo
Wolves Wolverhampton Wanderers Based on shortening of name
Wombles AFC Wimbledon Reference to the Wombles of Wimbledon
Yellows Cambridge United Colour of home kit
Mansfield Town Colour of home kit
Oxford United Colour of home kit
Sutton United Colour of home kit
Yeltz Halesowen Town Origin of the name has been lost track of
Yids Tottenham Hotspur Based on the historically high concentration of Jewish fans
</tr>
</table>
<h3>Links:</h3>
<ul>
<li>
<a href="https://en.everybodywiki.com/List_of_football_club_nicknames_in_the_United_Kingdom"
target="_blank" rel="noreferrer noopener">
EverybodyWiki :: List of football club nicknames in the United Kingdom</a>
</li>
<!--
<li>
<a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</html>
<html>
<ul>
<li>Checke die Kommentare in den Git-Commit-<br />
meldungen!<br />
Wie schreiben die neuen Kollegen ihre Mel-<br />
dungen?
</li>
</ul>
</html>
<html>
<ul>
<li>auf das Zahnradsymbol neben dem Benutzernamen<br />
und dem Avatar klicken:<br />
<img src="./pictures/Discord_Capture4.jpg"
height= width= /><!-- -->
</li>
<li>auf den roten “Abmelden”-Knopf klicken:<br />
<img src="./pictures/Discord_Capture5.jpg"
height= width= /><!-- -->
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://support.discord.com/hc/de/articles/209572128-Wie-logge-ich-mich-aus"
target="_blank" rel="noreferrer noopener">
Discord - Support </a>
</li>
</ul>
</html>
<html>
<h3>Darf ich auf dem Fahrrad … </h3>
<ol>
<li><h4> … auf der Straße fahren, wenn dort der Belag besser ist?</h4>
Auf der Straße zu fahren, ist laut Straßenverkehrs-Ordnung (StVO) nicht untersagt. Wenn aber ein Radweg vorhanden und als benutzungspflichtig ausgeschildert ist (blaues Schild und weiße Zweirad-Silhouette), müssen Radfahrerinnen und -fahrern diese benutzen. Eine Ausnahme gibt es nur, wenn der Weg nicht benutzbar ist. Zum Beispiel, weil Autos darauf parken, Schlaglöcher eine Gefahr darstellen oder eine Baustelle ihn blockiert. Ein holpriger Belag reicht nicht aus.
</li>
<li><h4> … neben anderen auf der Straße fahren?</h4>
Was viele nicht wissen: Nebeneinander fahren ist auf der Straße erlaubt. Zumindest, wenn dadurch keine anderen Verkehrsteilnehmer behindert werden. In zwei Ausnahmen ist es immer erlaubt: Auf Fahrradstraßen und, wenn mindestens 16 Personen als Gruppe auf Fahrrädern unterwegs sind.
</li>
<li><h4> … rote Ampeln ignorieren?</h4>
Nein, natürlich nicht. Oder? Es gibt eine Sonderregelung, die nur echte Radfahr-Nerds kennen. Auch hier ist die magische Zahl „16″. Denn sobald so viele Personen gemeinsam radeln, zählen sie als Verband. Dieser Verband darf geschlossen über die Straße fahren. Wenn eine grüne Ampel also auf Rot umschaltet, obwohl ein Teil des Verbands noch nicht über die Straße gefahren ist, dürfen diese Personen trotzdem mit der Gruppe gemeinsam weiterfahren. Diese Regel kommt zum Beispiel bei der regelmäßigen Fahrraddemo „Critical Mass“ in verschiedenen deutschen Städten zum Einsatz.
</li>
<li><h4> … Musik über Kopfhörer hören?</h4>
Meistens schon. Das Handy in die Hand nehmen ist Tabu, das kostet 55 Euro. Ebenso verboten ist es, sich von einem Smartphone ablenken zu lassen, das in einer Halterung am Rad montiert ist. Musikhören ist dagegen in Ordnung, solange diese nicht so laut ist, dass man Signale von Polizei oder Krankenwagen ausblendet. Dafür gibt es ebenfalls ein Verwarngeld: 15 Euro.
</li>
<li><h4> … kurz den Gehweg mit benutzen?</h4>
Nein, wenn nicht anders ausgeschildert. Der Gehweg ist nur für Personen, die zu Fuß unterwegs sind. Wer hier auf dem Rad von der Polizei erwischt wird, muss mit 55 Euro Bußgeld rechnen. Wenn andere dabei gefährdet werden, steigt die Strafe auf 80 Euro und wer Schaden verursacht, muss 100 Euro löhnen. Eine Ausnahme: Kinder (jünger als elf Jahre) dürfen allein und gemeinsam mit einer Begleitperson (älter als 16 Jahre) auf dem Gehweg radeln. Bis zum achten Geburtstag müssen sie das sogar, oder auf baulich abgetrennten Radwegen – ein Streifen auf der Straße reicht nicht.
</li>
<li><h4> … an wartenden Autos vor einer Ampel rechts vorbeifahren?</h4>
Ja, Radfahrende dürfen in dieser Situation ausnahmsweise rechts überholen. Aber nur, wenn sie zwischen Autos und Bordstein vorbeifahren. Die Personen im Auto müssen aber nicht genügend Platz dafür freilassen. Zwischen zwei Schlangen an Fahrzeugen hindurchzufahren, ist nicht erlaubt.
</li>
<li><h4> … ein Schild mit der Aufschrift „Radfahrer absteigen“ ignorieren?</h4>
Ja. Dieses Schild zählt laut Verkehrszeichenkatalog als Zusatzschild und ist in der StVO nicht als amtliches Verkehrszeichen geführt. Steht es allein, darf es ignoriert werden. Häufig kommt es in Verbindung mit anderen Schildern vor, und kann deren Wirkung verändern. Die Empfehlung „Radfahrer absteigen“ kann außerdem als Warnung interpretiert werden, und in der StVO ist ausdrücklich geregelt, dass Verkehrsteilnehmer aufeinander Rücksicht nehmen müssen. Wer hier als Radfahrerin in einen Unfall verwickelt wird, könnte vor Gericht schlechter dastehen.
</li>
<li><h4> … freihändig fahren?</h4>
Tatsächlich nicht. Mindestens eine Hand muss stets den Lenker berühren. Sonst drohen fünf Euro Bußgeld.
</li>
<li><h4> … gegen die Fahrtrichtung in Einbahnstraßen radeln?</h4>
Nein. Einbahnstraßen gelten für alle Verkehrsteilnehmer, Radfahrerinnen sind hier nicht ausgenommen. Manchmal zeigt ein Zusatzschild aber „Radfahrer frei“, oder die Abbildung eines Fahrrads mit zwei Pfeilen in entgegengesetzten Richtungen an. Dann herrscht freie Fahrt in beide Richtungen. Das kommt nur bei Einbahnstraßen vor, in denen die Höchstgeschwindigkeit maximal 30 Kilometer pro Stunde beträgt, und die Fahrbahn eine Mindestbreite erfüllt.
</li>
<li><h4> … auf einer Fahrradstraße immer zuerst fahren?</h4>
Nein, automatisch Vorfahrt haben Radfahrerinnen und -fahrer hier nicht. Es gelten reguläre Vorfahrtsregeln. Auf Fahrradstraßen steht ihnen aber die Fahrbahn in gesamter Breite zur Verfügung. Autos, Motorräder oder vergleichbare Verkehrsmittel dürfen hier nur fahren, wenn ein Zusatzschild es ihnen erlaubt. Und auch dann maximal mit Tempo 30.
</li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://www.rnd.de/mobilitaet/fahrrad-regeln-und-gesetze-fuers-rad-im-ueberblick-JLDDPSLDRZEHRDWT62OMAFHC4Q.html"
target="_blank" rel="noreferrer noopener">
RedationsNetzwerk Deutschland :: Zehn Radfahr-Regeln, die kaum jemand kennt</a>
</li>
</ul>
</html>
<html>
<ul>
<li>red flag :=: beach is closed
</li>
<li>yellow flag :=: beach is dangerous
</li>
<li>blue flag :=: beach is open for surfers
</li>
<li>red over yellow flag :=: safe to swim
</li>
</ul>
</html>
<html>
<ul>
<li>Bevor du damit beginnst, die Scherben auf dem Boden aufzusammeln, solltest du dir zunächst Handschuhe anziehen. Dafür genügen in der Regel einfache Garten- oder Haushaltshandschuhe.
<ul>
<li>
Sammle dann zunächst die großen und leicht erkennbaren Scherben auf. Entsorge diese im Restmüll. Glas von Trinkgläsern solltest du nicht in den Glasmüll geben, denn dieses hat einen anderen Schmelzpunkt als normales Altglas.
</li>
<li>Um nun die kleinen Mini-Splitter ausfindig zu machen, brauchst du eine Taschenlampe. Schalte dann das Licht im Zimmer aus und ziehe die Vorhänge zu, sodass der Raum abgedunkelt ist. Suche nun mit der Taschenlampe den Raum ab, indem du sie nah am Boden umher schwingst. Die kleinen Splitter reflektieren das Licht der Taschenlampe, sodass du sie durch das Funkeln leicht erkennen kannst.
</li>
<li>Um die kleinen Glassplitter zu entfernen, kannst du leicht angefeuchtetes Altpapier oder Watte verwenden. Tupfe vorsichtig über die betroffene Stelle – der feuchte Stoff nimmt auch die kleinsten Splitter auf. Anschließend kannst du Stoff und Glassplitter im Restmüll entsorgen.
</li>
<li>Statt Watte oder Altpapier kannst du auch Klebeband nehmen, um die kleinen Glassplitter zu entfernen. Drücke das Klebeband einfach auf den Boden und die Splitter bleiben daran kleben.
</li>
</ul>
</li>
<li>Beachte: Nimm auf keinen Fall den Staubsauger, um Glassplitter zu entfernen. Die Splitter können den Schlauch oder den Staubsaugerbeutel beschädigen.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://web.de/magazine/ratgeber/utopia/glas-zerbrochen-trick-kleinsten-splitter-40229052"
target="_blank" rel="noreferrer noopener">
Web.de :: Glassplitter vom Boden entfernen: So geht's </a>
</li>
</ul>
</html>
<html>
<ul>
<li>The only way to remove a Gmail account from your Android device is by removing its associated Google account. However, there are things you can do to minimize its presence on your phone or tablet.
Unfortunately, removing your Gmail account means services like Google Maps, Google Play Store, and other apps will become unavailable as well. It'll require you to add another Google account to your Android device or have a second Google account already signed in to keep uninterrupted access to these apps.
Turning Off Gmail Syncing
One thing you can do to spiritually "remove" Gmail from your phone is to stop it from syncing. This will essentially kill all the processes that check for new mail and bring new mail into the app. You'll have to manually refresh it if you want to see new items.
First, open the Gmail app and go to "Settings" from the slide-out menu on the left. Select your Gmail account and then scroll down to "Sync Gmail." Uncheck the box and tap "OK" on the confirmation pop-up.
Muting Gmail Notifications
You also have the option to disable notifications for your account on Gmail, leaving it logged in and synced, but without the distracing alerts.
First, open the Gmail app and go to "Settings" from the slide-out menu on the left. Select your Gmail account and then tap "Notifications." Choose "None" from the pop-up.
Removing Your Gmail Account
If you're determined to remove your Gmail account from your device, you can do so in a few simple steps. You should consider it if you're switching to an entirely new Gmail account or if you're transferring your device to somebody else.
Again, you are not only removing your Gmail account—you're removing your entire Google account. All apps associated with your Google account—including the Play Store—will be signed out. You will need to sign in with a different account to use them again.
First, open the Settings app on your phone and go to the "Passwords & Accounts" (or similar) section. Select the Google account associated with the Gmail account you'd like to remove. Tap "Remove Account" and then confirm your device's security lock to proceed.
Remotely Removing Your Gmail Account
If you've lost your Android device or if it's been stolen, you'll be able to remove your account remotely from within your Google account settings online. You'll need another device, such as a computer, to be able to do this.
Sign in to your "My Account" page on the web from another device. Click "Security" in the left-hand menu or top bar, then scroll down to the "Devices" section and click "Manage All Devices."
Security and Manage All Devices.
From here, find the device that you'd like to remove your account from and select it. Click "Sign Out" and confirm.
Technically, while this does log you out on your device, it doesn't remove it completely. You'll receive an alert on your device to take account action, where you'll be asked to type your password again to restore access.
Doing this is important if you've lost your Android device or if you're planning to sell it. You don't have to remove your Gmail account if you want to add a second---you can be signed in to as many accounts as you like.
If you do need to remove your Gmail account, however, it shouldn't take more than a few minutes from start to finish.
</li>
<br />
<li><b>Kommentar:</b><br />
Can you just go to Settings and default to your other account ?
I default to a Duck account. No tracking, built into a fairly good ad blocker, easier to dump all the spam, notifications from every site that got ahold of the Google account. I synch to dump. Somehow, the Samsung device has it's own e-mail program that doesn't seem to care where it all comes through. It follows what I seem I to want it to do. Plus the Duck search works better with the Chrome derived search engines sharing the loads. Plus, it's all free. Every month or so, I just dump the all emails into Spam And Garbage into the giant toad and in a few minutes.... all gone, the operating system working like a charm and faster too. A quick followup with the Device Maintenance cycle and the 100% cleaning up is done. Email has always seemed to be the biggest problem on a small tablet... memory, lots of bytes leading to a big case of the slows. I like fast. Run three email programs and let them clean up the other's problems... so I dont have to... the K.I.S.S. principle. Just know how and guess at what to switch on and off allowing it to do certain things in the operating system and have fun playing around with it. If you 'break it' , it can generally fix itself by a deep restart.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.howtogeek.com/438216/how-to-remove-a-gmail-account-from-your-android-device/"
target="_blank" rel="noreferrer noopener">
How-To Geek :: How to Remove a Gmail Account from Your Android Device </a>
<li>
</ul>
</html>
<html>
<ul>
<li>Es gibt viele Gründe, das Smartphone nicht mit ins Bett zu nehmen. Aber am besten macht man es ganz aus. Wenn auch aus anderen Gründen, als Sie jetzt vielleicht vermuten.
</li>
<li>Man kennt es: Der Tag ist vorbei, endlich ist man im Bett – und daddelt dann doch noch auf dem Smartphone herum. Und auch morgens fällt gleich der erste Blick mit noch halb eöffneten Augen auf den kleinen Kasten. Doch es gibt gute Gründe, das Smartphone nachts einfach mal abzuschalten. Dabei geht es allerdings weniger um eher diffuse Dinge wie Strahlenbelastung – sondern um ganz konkrete.
</li>
<li>Das heißt natürlich nicht, dass Strahlenbelastung gar kein Thema ist. Wenn das Smartphone eingeschaltet ist, sendet es auch. Selbst wenn Sie schlafen, werden bei bestehender Internetverbindung Updates gesucht, nach neuen Push-Nachrichten gehorcht oder Backups in die Cloud hochgeladen. Die Strahlenbelastung ist zwar vermutlich nicht gefährlich, das Bundesamt für Strahlenschutz (BfS) fand auch nach Langzeituntersuchungen keine Hinweise auf gefährliche Auswirkungen durch Smartphone-Strahlung. Die Strahlung zu vermeiden ist dennoch immer die zu bevorzugenden Variante.
</li>
<h3>Nicht als Erstes zum Smartphone greifen</h3>
<li>Viel wichtiger ist aber der psychologische Faktor: Ist das Smartphone abrufbar, denken wir auch daran. Das zeigte eine Studie der Universität Paderborn. Schon das Handy vor sich auf dem Tisch liegen zu haben machte die Probanden nervös. Dabei spielte überraschenderweise nicht mal eine Rolle, ob eine Handysucht vorlag: Lag das Handy auf dem Tisch, sank die Aufmerksamkeit durch die Bank weg.
</li>
<li>Das lässt sich auch auf den Nachttisch übertragen: Wachen wir auf und das Smartphone liegt in Sicht – dann greifen wir auch eher danach. Ist es abgeschaltet, reduziert sich dieser Faktor. Denn auf das Hochfahren des Gerätes wartet man im Halbschlaf dann doch nicht. Hinzu kommt beim Zubettgehen das Signal an sich selbst: Ich schalte jetzt ab – wortwörtlich. Das hilft dabei, herunterzukommen und sich von der ewigen Verfügbarkeit durch das Handy zu lösen.
</li>
<li>Dasselbe gilt für den Start in den Tag: Muss das Smartphone erst hochfahren, kann man sich währenddessen zum Beispiel schon einen Kaffee machen, statt wie selbstverständlich noch im Bett nach eingetrudelten Nachrichten zu schauen. Das gibt dem Hirn mehr Zeit, erst mal in Fahrt zu kommen, bevor man sich damit herumschlagen muss, was anderen Leuten von einem wollen.
</li>
<h3>Smartphone nachts abschalten: Es gibt auch technische Vorteile</h3>
<li>Auch aus technischer Sicht hat das Abschalten Vorteile. Smartphones sind am Ende einfach Computer – und brauchen gelegentlich einen Neustart. Die komplexen Interaktionen der Betriebssysteme und die darauf installierten Apps können auf Dauer schlicht haken. Startet man das Gerät jeden Tag neu, treten viele potenzielle Probleme gar nicht erst auf. Zudem können dann nötige Sicherheitsupdates installiert werden.
</li>
<li>Und dann ist da natürlich der Stromverbrauch: Jede Minute, die das Gerät eingeschaltet ist, verbraucht es etwas Akkuleistung. Das gilt selbst im Flugmodus, ist es mit dem Netz verbunden, aber um so mehr. Alleine die Verbindung zu halten, Updates herunterzuladen und Ähnliches kann über Nacht eine Entladung im zweistelligen Prozentbereich ausmachen. Stellt man das Smartphone über Nacht ganz ab, spart man sich diesen Verbrauch.
</li>
<li>Das bringt nicht nur mehr Laufzeit an dem konkreten Tag, sondern hat auch Auswirkungen auf die Langlebigkeit des Geräts: Jeder Ladezyklus belastet den Akku, der dadurch auf Dauer Kapazität verliert. Verbraucht das Gerät in den Nachtstunden nicht sinnlos Strom und muss man es seltener aufladen, schont das also auf längere Sicht den Akku.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.stern.de/digital/smartphones/smartphone-nachts-abstellen--aus-diesen-gruenden-sollten-sie-das-tun-35446294.html"
target="_blank" rel="noreferrer noopener">
Stern :: Warum Sie Ihr Smartphone vor dem Schlafen lieber ganz ausschalten sollten</a>
</li>
</ul>
</html>
<html>
Warnung vor betrügerischen Telefonanrufen!
Betrüger können Telefonnummern manipulieren (=spoofen) und sich als Mitarbeiter unserer Bank oder eines anderen Unternehmens (PayPal, Amazon, etc.) ausgeben!
Seien Sie vorsichtig,
wenn Sie einen unaufgeforderten Anruf eines vermeintlichen Bankmitarbeiters (z.B. aus der Sicherheitsabteilung) erhalten. Die auf Ihrem Telefon angezeigte Anrufernummer kann gefälscht sein und sogar den in Ihrem Adressbuch zu dieser Nummer abgespeicherten Kontaktnamen (z.B. ‚HVB‘ oder ‚HVB Hotline‘) anzeigen.
wenn Ihr Konto angeblich ‚gehackt‘ worden ist.
wenn es um (betrügerische) Zahlungen geht, die gestoppt werden sollen.
wenn Zahlungen abgesichert/storniert werden sollen oder Ihr Geld ‚in Sicherheit‘ gebracht werden soll.
wenn Sie unter zeitlichen und/oder emotionalen Stress gesetzt werden.
So schützen Sie sich:
Geben Sie KEINE persönlichen Daten und Zugangsdaten weiter!
Bestätigen Sie KEINE TAN-Anforderungen, die Sie nicht selbst ausgelöst haben!
Gewähren Sie NIE Fernzugriff auf Ihrem Rechner/Smartphone.
Geben Sie KEINE (Sicherheits-/Storno-)-Zahlungen ein, die angeblich Betrug verhindern oder rückgängig machen sollen. Solche Zahlungen gibt es nicht.
Richtige Bankmitarbeiter
fragen nicht nach Ihren Zugangsdaten!
verlangen von Ihnen KEINE Zahlungseingaben oder TAN-Freigaben!
rufen nur zu den regulären Geschäftszeiten an, nicht abends und auch nicht am Wochenende/Feiertagen!
Angebliche Sicherheitsmitarbeiter anderer Unternehmen haben NIE Einsicht/Erkenntnisse über Ihren Bank-Zugang.
Im Zweifel legen Sie umgehend auf, rufen Sie selbst bei der Bank an! Verwenden Sie hierfür eine Ihnen bekannte Nummer oder eine Nummer, die Sie auf unserer hvb.de-Homepage finden.
Auf unserer HVB Betrugspräventionsseite (Suche nach ‚Betrugsprävention‘ auf www.hvb.de) werden die Betrugsmaschen ständig aktualisiert und die empfohlenen Sicherheitsmaßnahmen detailliert beschrieben.
Falls Ihnen etwas verdächtig vorkommt, sperren Sie Ihren Online Banking Zugang (durch dreimalige Falscheingabe Ihrer PIN) und informieren Sie bitte umgehend Ihren Betreuer oder melden Sie sich bei unserem Onlineservice unter der Telefonnummer +49 89 378 48888.
</html>
<html>
<ul>
<li><b>Autoschleifenpaste:</b><br />
um verkalktes Duschkabinenglas und Kacheln zu<br />
reinigen, um sie vom Kalk zu befreien;
</li>
<br />
<li><b>Entsorgung Frittierfett</b>
<ul>
<li>Frittierfett darf <b>NICHT</b> im Abfluss oder in der Toilette entsorgt werden.
</li>
<li>Nicht mehr benötigtes Frittierfett darf nicht im Garten vergraben werden.
</li>
<li>Kleine Mengen Frittierfett lassen sich im Hausmüll entsorgen.
</li>
<li>Größere Mengen von Frittierfett sollten beim Wertstoffhof abgegeben werden.
</li>
<li>Für altes Frittierfett gibt es noch verschiedene kreative Verwendungsmöglichkeiten.
</li>
</ul>
</li>
<!--
<li>
</li>
<li>
</li>
<li>
</li>
-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://entsorgen.org/frittierfett/"
target="_blank" rel="noreferrer noopener">
entsorgen.org :: Frittierfett entsorgen</a>
</li>
</ul>
</html>
<html>
<ol>
<li>The flooding smile
</li>
</ol>
</html>
<html>
<h3>Erstes-Date-Ideen: Mit unseren 52 Ideen hast du nie wieder ein langweiliges Date</h3>
<ul>
<li>Du warst schon auf genug schlechten Dates zwischen engen Barhockern und viel zu lauten Cafés? Dann verzage nicht: Denn mit unseren Ideen fürs erste Date wird dir ganz bestimmt nicht langweilig! Und selbst wenn dein Gegenüber nicht passend war, dann hattest du zumindest eine gute Zeit. Denn 2024 daten wir ja bekanntlich für den Plot – du kannst hinterher auf jeden Fall spannende Geschichte erzählen, egal, ob es die echte Liebe war oder nicht.
</li>
<li>
Übrigens: Die Date-Ideen eigenen sich natürlich nicht nur fürs erste Date, sondern auch Langzeitbeziehungen profitieren von immer neuen Ideen. Also, lasst euch inspirieren!
</li>
<li>Egal, ob du an Kultur interessiert bist, lieber drinnen oder draußen abhängst oder dein Date am liebsten zum Schwitzen bringen willst – auf dieser Liste ist für jede:n etwas dabei! Ein kleiner Tipp am Rande: Ein Überraschungs-Date mag zwar superspannend klingen, ist jedoch eher etwas für einen späteren Zeitpunkt, wenn man sich schon besser kennt. Wenn du nämlich nicht weißt, wie dein Date zu Lasertag steht, dann kann das erste Date ziemlich in die Hose gehen. Deswegen am besten zwei bis drei Date-Ideen vorschlagen und gemeinsam über das Treffen nachdenken – dann wird es auf jeden Fall zum Erfolg!
</li>
<li>Ein paar weitere grundlegende Tipps:
<ul>
<li>Bei deinem Date solltest du auf jeden Fall pünktlich auftauchen – selbst wenn du eigentlich von der verpeilteren Sorte bist. Heißt: Pünktlich bis zu früh aus dem Haus gehen und miteinbeziehen, dass sich öffentliche Verkehrsmittel verspäten können.
</li>
<li>Wenn du dich übrigens für eine Aktivität wie Jazzkonzert oder Theater entscheidest, dann wäre es gut, vorher und hinterher einen Puffer einzubauen, bei dem ihr euch bei ein paar (alkoholfreien) Drinks noch unterhalten könnt. Denn bei einem Date will man natürlich die andere Person kennenlernen.
</li>
<li>Und zuletzt: Niemand mag Phubbing. Damit ist gemeint, wenn du, statt deinem Gegenüber zuzuhören, lieber auf dein Handy schaust.
</li>
</ul>
</li>
</ul>
<h3>Erstes-Date-Ideen: Indoor</h3>
<ul>
<li>Jazzkonzert
</li>
<li>Tanzkurs
</li>
<li>Theater
</li>
<li>Impro/Stand-up-Comedy
</li>
<li>Pub-Quiz
</li>
<li>Töpfern/Töpferkurs
</li>
<li>Kochkurs
</li>
<li>Aquarium besuchen
</li>
<li>Gemeinsam (Video-)Spiele spielen
</li>
<li>Messe/Convention besuchen
</li>
<li>Gemeinsam kochen
</li>
</ul>
<h3>Erstes-Date-Ideen: Outdoor</h3>
<ul>
<li>Picknick und Sonnenuntergang anschauen
</li>
<li>Besuch im Zoo
</li>
<li>Flohmarkt besuchen
</li>
<li>Tretboot fahren
</li>
<li>Sternschnuppen anschauen (z.B. Perseiden)
</li>
<li>Leute beobachten und Geschichten zu ihnen erfinden
</li>
</ul>
<h3>Erstes-Date-Ideen: Winter</h3>
<ul>
<li>Schwarzlicht-Minigolf
</li>
<li>Escape-Room
</li>
<li>Paint and Sip (Art-Night)
</li>
<li>Planetarium
</li>
<li>Museum
</li>
<li>Therme
</li>
<li>Eislaufen/Schlittschuhlaufen
</li>
<li>Weihnachtsmarkt
</li>
</ul>
<h3>Erstes-Date-Ideen: Sommer</h3>
<ul>
<li>Minigolf
</li>
<li>Picknick
</li>
<li>Im Hochseilgarten klettern
</li>
<li>Fahrradtour
</li>
<li>Mit Deutschlandticket in eine neue Stadt fahren und diese erkunden gehen
</li>
<li>Neue Eissorten testen
</li>
<li>Autokino/Open-Air-Kino
</li>
<li>Stand-up-Paddling
</li>
<li>Botanischen Garten besuchen
</li>
</ul>
<h3>Aktives-Date-Ideen</h3>
<ul>
<li>Bowling
</li>
<li>Wintersport (Skifahren, Rodeln)
</li>
<li>Volleyball spielen
</li>
<li>Indoor-Trampolinpark
</li>
<li>Bouldern
</li>
<li>Skatepark (Skateboard, BMX, Inlineskating)
</li>
<li>Kletterpark
</li>
<li>Lasertag/Paintball spielen
</li>
<li>Gokart fahren
</li>
</ul>
<h3>Außergewöhnliche erste Dates</h3>
<ul>
<li>In einen Freizeitpark gehen
</li>
<li>Schnitzeljagd
</li>
<li>Auf den Spielplatz gehen und schaukeln
</li>
<li>Cosplay basteln/Kostümladen plündern
</li>
<li>“Dungeons and Dragons One Shot” spielen
</li>
<li>Brauereiführung/Wine-Tasting
</li>
<li>Schlossführung
</li>
<li>Indoor-Skydiving
</li>
<li>Rollschuhdisco
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.glamour.de/liebe/artikel/erstes-date-ideen"
target="_blank" rel="noreferrer noopener">
Glamour :: Dating – Erstes-Date-Ideen: 52 Aktivitäten und Ideen fürs erste Date
</li>
</ul>
</html>
<html>
<ul>
<li>von dem Produktivitätsexperten Ivy Lee vor ca. 100 Jahren entwickelt;</li>
<li>für jeden Wochentag einen Plan zu erstellen</li>
<li>
<ol>
<li><details><summary><b>Erstellen einer Liste mit den wichtigsten Aufgaben für den Tag</b></summary><br />
<ul>
<li>z.B. sollten Vorlesungen vor den dazugehörigen Übungen angeschaut werden.</li>
<li>Außerdem haben die Videos Vorrang, die nur befristet verfügbar sind. </li>
<li>Die Anzahl der To-Dos orientiert sich dabei an der individuellen Leistungsfähigkeit und Komplexität
der Aufgaben. </li>
<li>Wenn der Plan eine schwierige Vorlesung beinhaltet, sollte die besser in
Ruhe zweimal angehört werden, statt noch eine weitere zu erledigen. </li>
<li>Es kommt nicht auf die Quantität, sondern Qualität an.</li>
<li>Also: Empfindet man eine Aufgabe als besonders schwer, nimmt man sich sonst nichts vor.</li></ul>
<br /><br /></details></li>
<li><details><summary><b>Die Aufgaben werden nach der Wichtigkeit geordnet</b></summary><br />
Zunächst bearbeitet man die Aktivität mit der höchsten Priorität und blendet die anderen Tagespunkte aus.
<br /><br /></details></li>
<li><details><summary><b>Reflektieren der Aufgabe</b></summary><br />
und sie von der Liste zu streichen oder eine neue, daraus folgende Aufgabe zu erstellen.<br /><br /></details></li>
<li><b>Diesen Vorgang wiederholt man dann bei den nächsten Stichpunkten.</b></li>
</ul>
<img src="./pictures/Ivy-Lee-Methode-Ablauf-Grafik-650x433.png" height=433 width=650 /><br />
<h3>Links:</h3>
<ul>
<li>PDF :: wiwo.de-So gelingt das Onlinestudium.pdf</li>
<li><a href="https://medium.com/seyhunakyurek/productivity-hack-1-using-ivys-method-with-evernote-9e3befa6c2c0"
target="_blank" rel="noreferrer noopener">medium.com Using Ivys method with Evernote</a></li>
<li><a href="https://karrierebibel.de/ivy-lee-methode/" target="_blank" rel="noreferrer noopener">Karrierebibel :: Ivy Lee‐Methode</a></li>
<li><a href="https://projekte-leicht-gemacht.de/blog/softskills/zeitmanagement/ivy-lee-methode/" target="_blank" rel="noreferrer noopener">Projekte leicht gemacht :: Ivy Lee‐Methode</a></li>
<li><a href="https://arbeits-abc.de/ivy-lee-methode/" target="_blank" rel="noreferrer noopener">Arbeits‐ABC.de :: Ivy Lee‐Methode</a></li>
<!--
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
-->
</ul>
</html>
<html>
<h3>Job-Lektionen aus Weihnachtsfilmen: <br />
Was du von Kevin, dem Grinch und Aschenbrödel für Deine Karriere lernen kannst</h3>
<ul>
<li>Was haben Weihnachtsklassiker mit Deiner Karriere zu tun?
</li>
<li>Mehr als du denkst! Entdecke, welche Job-Learnings in Filmen wie „Kevin – allein zu Haus“ und „Der kleine Lord“ stecken.
</li>
<li><h3>The Nightmare Before Christmas: </h3>
<ul>
<li>Verantwortungsbereiche erfolgreich zu übernehmen, erfordert erst einmal die bestehenden Strukturen zu verstehen.
</li>
<br />
<li>In „The Nightmare Before Christmas“ sucht Jack Skellington, der König von Halloweentown, frustriert nach neuen Herausforderungen und übernimmt die Organisation von Weihnachten.
</li>
<li>Doch ohne Verständnis für die Tradition des Festes entsteht Chaos.
</li>
<li>Das zeigt, dass man für den Erfolg in neuen Rollen nicht nur kreativ sein muss, sondern auch die bestehenden Werte verstehen sollte.
</li>
<li>Jacks Sinnkriese spiegelt die Realität vieler Menschen, die in ihrem Beruf unzufrieden sind und nach kreativen Herausforderungen und einer Veränderung ihrer Routine suchen.
</li>
</ul>
</li>
<li><h3>Die Geister die ich rief: </h3>
<ul>
<li>Echter Erfolg wird nicht nur an Geld und Status bemessen.
</li>
<br />
<li>In der modernen Adaption von Charles Dickens Weihnachtsgeschichte dreht sich alles um Frank Cross, einen erfolgreichen, aber gefühllosen Fernsehproduzenten, dessen Karriere im Mittelpunkt seines Lebens steht.
</li>
<li>Frank ist ständig auf die Arbeit fokussiert, wodurch er sich von seinen Freunden und seiner Familie entfremdet.
</li>
<li>Durch die Geister der Vergangenheit, Gegenwart und Zukunft wird ihm klar, dass seine Karriereentscheidungen sein Leben und seine Beziehungen negativ beeinflusst haben.
</li>
<li>Diese Selbstreflexion wird zur treibenden Kraft für seine persönliche und berufliche Transformation.
</li>
</ul>
</li>
<li><h3>Drei Haselnüsse für Aschenbrödel: </h3>
<ul>
<li>Um die eigenen Ziele zu realisieren, braucht es Selbstvertrauen, Durchhaltevermögen und den Mut, den Ist-Zustand zu hinterfragen.
</li>
<br />
<li>Der Märchenklassiker handelt von Aschenbrödel, die von ihrer Stiefmutter unterdrückt wird, aber mit drei magischen Haselnüssen den Mut findet, ein selbstbestimmtes Leben zu führen.
</li>
<li>Aschenbrödel demonstriert damit, wie wichtig es ist, die eigenen Talente und Fähigkeiten zu nutzen, um für seine Träume zu kämpfen.
</li>
<li>Ihr Weg vom Dienstmädchen zur Prinzessin macht deutlich, dass man gesellschaftliche Stereotypen hinterfragen und seine Ziele unabhängig von den Erwartungen anderer verfolgen kann – eine wichtige Botschaft für alle im Berufsleben.
</li>
</ul>
</li>
<li><h3>Der kleine Lord: </h3>
<ul>
<li>Gute Beziehungen und Ehrlichkeit sind der Schlüssel zu beruflichem Erfolg
</li>
<br />
<li>Der Klassiker erzählt von Cedric Errol, einem Jungen aus einfachen Verhältnissen, der als Erbe eines britischen Lords großen Herausforderungen gegenübersteht.
</li>
<li>Trotz seines plötzlichen Aufstiegs bleibt er herzlich und respektvoll – auch gegenüber seinem autoritären Großvater. </li>
<li>Die Geschichte zeigt, dass wahre Größe nicht von Titeln abhängt, sondern davon, wie man andere behandelt.
</li>
<li>Diese Botschaft ist auch in der Arbeitswelt wichtig: Gute Beziehungen und ein respektvoller Umgang sind entscheidend um erfolgreich und zufrieden zu sein.
</li>
</ul>
</li>
<li><h3>Kevin - allein zu Haus : </h3>
<ul>
<li>Eine gute Work-Life-Balance ist entscheidend, um in stressigen Zeiten wichtige persönliche und berufliche Verpflichtungen zu bewältigen.
</li>
<br />
<li>Der Klassiker aus dem Jahr 1990 handelt vom achtjährigen Kevin, der versehentlich allein gelassen wird, während seine Familie über die Weihnachtsferien nach Paris fliegt.
</li>
<li>Obwohl die Geschichte hauptsächlich von Kevin erzählt, spielt auch die Berufswelt der Erwachsenen eine wichtige Rolle.
</li>
<li>Kevins Eltern sind beide berufstätig, und es wird deutlich, dass der Stress und die ständigen Termine des modernen Berufslebens ihre familiären Beziehungen belasten.
</li>
<li>Kevin wird zu Beginn oft missverstanden und ignoriert, was die Realität vieler Kinder zeigt, deren Eltern mit einer guten Work-Life-Balance kämpfen.
</li>
</ul>
</li>
<li><h3>Der Polarexpress: </h3>
<ul>
<li>Besonders in schwierigen Zeiten ist es wichtig, im Team zusammenzuarbeiten, um das Ziel zu erreichen.
</li>
<br />
<li>Der Polarexpress erzählt die Reise eines kleinen Jungen, der in einen Zug zum Nordpol steigt, um den Weihnachtsmann zu treffen.
</li>
<li>Die Zugarbeiter des Polarexpress sind das Herzstück des Films, denn sie arbeiten ständig zusammen, um alles am Laufen zu halten.
</li>
<li>Ihr Einsatz ist entscheidend für den Erfolg der Reise.
</li>
<li>Auch im echten Berufsleben sind solche Qualitäten wichtig, denn viele Aufgaben lassen sich nur im Team stemmen.
</li>
<li>Ihre verschiedenen Fähigkeiten passen perfekt zusammen und zeigen, dass jeder einzelne wichtig ist – ein Grundsatz, der auch im Job zählt.
</li>
</ul>
</li>
<li><h3>Der Grinch: </h3>
<ul>
<li>Soziale Kontakte im Job sind wichtig, um Isolation zu verhindern – schließlich ist Lachen der beste Stressabbau!
</li>
<br />
<li>Der Grinch erzählt von einem grimmigen Wesen, das Weihnachten hasst, bis es auf jemanden trifft, der ihm die Freude am Fest zeigt.
</li>
<li>Der Film verdeutlicht die Bedeutung sozialer Bindungen im Berufsleben. Um Isolation im Homeoffice zu vermeiden, sollte der persönliche Kontakt mit Kollegen gesucht werden.
</li>
<li>Im Film zieht sich der Grinch wegen des fröhlichen Feierns zurück, was ihn unglücklich macht.
</li>
<li>Ähnliche Isolation im Job kann in der Realität zu Stress und geringerer Motivation führen.
</li>
</ul>
</li>
</ul>
<a href="https://www.xing.com/news/article/job-lektionen-aus-weihnachtsfilmen-was-du-von-kevin-dem-grinch-und-aschenbroedel-1"
target="_blank" rel="noreferrer">
Xing :: Job-Lektionen aus Weihnachtsfilmen: Was du von Kevin, dem Grinch und Aschenbrödel für Deine Karriere lernen kannst</a>
</html>
<html>
<h3>Instrument lernen – 9 Tipps, wie Sie Ihr Kind zum Üben motivieren</h3>
<ul>
<li>Gitarre, Klavier oder Querflöte – viele Kinder lernen schon früh, ein Musikinstrument zu spielen. Das bedarf viel Training. Daher wird das Üben oft zum Streitthema zwischen Eltern und Kind. Mit diesen Tipps können Sie Ihr Kind beim Musizieren positiv unterstützen.
</li>
</ul>
<h4>Ab wann macht es Sinn, dass mein Kind ein Instrument lernt?</h4>
<ul>
<li>Viele Eltern schwören auf frühkindlichen Musikunterricht. Aber nicht jedes Instrument ist schon für kleine Kinder geeignet. Im Vorschulalter bieten sich vor allem die Blockflöte oder das Xylophon an. In Musikläden findet man kleine Gitarren, die auch mit Kinderhänden leicht zu bedienen sind. Für Klavier, Streich- und Blasinstrumente ist der Schuleintritt die passende Zeit, um mit dem Unterricht zu beginnen.
</li>
</ul>
<h4>Welches Instrument ist das richtige für mein Kind?</h4>
<ul>
<li>Das passende Instrument zu finden, kann etwas dauern. Ist Ihr Kind besonders unruhig, könnte ein Schlagzeug die richtige Wahl sein. Ist es eher ruhig und kann sich gut konzentrieren, kommen Geige und Klavier in Frage. Prinzipiell sollte sich jedoch Ihr Kind aussuchen, welche Art von Musik es am liebsten spielen möchte. Lassen Sie sich in einem Musikfachgeschäft beraten. Dort besteht oft die Möglichkeit, verschiedene Instrumente auszuprobieren.
</li>
</ul>
<h4>Wie lernt Ihr Kind am liebsten?</h4>
<ul>
<li>Ist die Wahl für ein Instrument getroffen, kann es mit dem Musizieren losgehen. Nach ein paar Wochen lässt die anfängliche Motivation jedoch etwas nach. Wie Sie Ihr Kind langfristig zum Üben motivieren können, klären wir Ihnen hier:
</li>
</ul>
<h4>Tipp 1: Einen Ort zum Üben einrichten</h4>
<ul>
<li>Damit sich Ihr Kind ganz auf das Spielen des Instruments einlassen kann, braucht es einen Ort, an dem es in Ruhe üben kann. Überlegen Sie gemeinsam, welcher Raum das sein könnte. Sprechen Sie mit den anderen Familienmitgliedern ab, dass der Raum zu bestimmten Zeiten für das Musizieren reserviert ist. So wissen alle Bescheid und können sich zurückziehen.
</li>
</ul>
<h4>Tipp 2: Aufwärmübungen vor dem Spielen</h4>
<ul>
<li>Bei vielen Instrumenten wird die Muskulatur in den Händen, Armen und im Gesicht in Anspruch genommen. Daher bietet es sich an, gemeinsam mit dem Kind einige Aufwärmübungen auszuprobieren. Das kann das Spielen eines einfachen Stücks oder eine Lockerungsübung ohne Instrument sein: Ermutigen Sie Ihr Kind, sich nach oben zu strecken und mit den Händen nach imaginären Äpfeln zu greifen. Wenn Ihr Kind ein Blasinstrument spielt, lassen Sie es vor dem Üben den Mund verziehen, die Lippen spitzen und abwechseln einzelne Vokale und Konsonanten deutlich aussprechen. Das Musizieren im Anschluss gelingt dadurch besser und entspannter.
</li>
</ul>
<h4>Tipp 3: Übungsroutinen entwickeln</h4>
<ul>
<li>Überlegen Sie sich mit Ihrem Kind feste Übungszeiten in der Woche. Am effektivsten lernen Kinder ein Musikinstrument, wenn sie jeden Tag circa 10 – 20 Minuten spielen. Das bringt mehr, als nur ein Mal in der Woche für eine Stunde zu üben. Daher ist es gut, wenn Sie für das Musizieren täglich eine feste Zeit einplanen. So wird Ihr Kind beim Üben routiniert.
</li>
</ul>
<h4>Tipp 4: Ziele formulieren</h4>
<ul>
<li>Es kann helfen, wenn Ihr Kind Ziele für die jeweiligen Übungseinheiten formuliert, z. B. „Heute möchte ich diese schwierige Stelle in dem neuen Stück üben und sie danach besser spielen können.“ Das motiviert Ihr Kind und führt zu einem Erfolgserlebnis, wenn es das gesetzte Ziel erreicht.
</li>
</ul>
<h4>Tipp 5: Setzen Sie sich beim Üben zu Ihrem Kind</h4>
<ul>
<li>Sie sollen Ihrem Kind keineswegs die ganze Zeit auf die Finger schauen oder jeden Fehler korrigieren. Aber setzen Sie sich dazu, wenn Ihr Kind übt. Sie können etwas lesen, stricken oder malen. Lauschen Sie einfach der Musik und leisten Sie Ihrem Kind Gesellschaft. Besprechen Sie Ihr Vorhaben vorab mit Ihrem Kind, damit es sich nicht durch Ihre Anwesenheit gestört fühlt.
</li>
</ul>
<h4>Tipp 6: Keinen Druck erzeugen</h4>
<ul>
<li>„Das Klavier hat uns 3000 € gekostet und jetzt spielst du so selten“ – Solche Aussagen sind vielleicht nicht vorwurfsvoll gemeint, setzen Ihr Kind aber unter Druck. Sie führen dazu, dass es ungern auf dem Instrument spielt. Versuchen Sie daher, Ihre Enttäuschung nicht an Ihrem Kind auszulassen, wenn es mal weniger euphorisch übt. Loben Sie Ihr Kind stattdessen, wenn es regelmäßig dranbleibt.
</li>
</ul>
<h4>Tipp 7: Niemals lachen</h4>
<ul>
<li>Ihr Kind legt viel Ehrgeiz und Elan in das Spielen seines Lieblingsinstruments. Umso irritierender und demotivierender ist es, wenn einem Elternteil beim Zuhören ein Lacher rausrutscht. Sei es, dass sich etwas disharmonisch anhört oder das Kind sein Gesicht beim Spielen lustig verzieht – versuchen Sie, trotzdem ernst zu bleiben.
</li>
</ul>
<h4>Tipp 8: Inspiration holen</h4>
<ul>
<li>Geben Sie Ihrem Kind neue Inspiration, indem Sie sich gemeinsam z. B. während der Autofahrt Musikstücke anhören oder zu Konzerten oder Musikabenden in der Schule gehen. Zu sehen, wie andere Menschen dem eigenen Instrument schöne und berührende Musik entlocken, kann sehr motivierend für Ihr Kind sein.
</li>
</ul>
<h4>Tipp 9: Alte Stücke wiederholen lassen</h4>
<ul>
<li>Ein neues Stück zu lernen, kann manchmal frustrierend sein. Damit Ihr Kind nicht die Lust am Spielen verliert, lassen Sie sich zwischendurch einfach einige alte Stücke, die es schon gut beherrscht, vorspielen. Das macht Ihrem Kind Spaß und stärkt das Selbstvertrauen.
Weitere Artikel zu diesem Thema:
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://magazin.sofatutor.com/eltern/instrument-lernen-9-tipps-wie-sie-ihr-kind-zum-ueben-motivieren/"
target="_blank" rel="noreferrer noopener">
SofaTutor :: Instrument lernen – 9 Tipps, wie Sie Ihr Kind zum Üben motivieren</a>
</li>
</ul>
</html>
<html>
<h3>Kochsahne</h3>
<ul>
<li>Kochsahne ist fettreduzierte Sahne, die sich nicht zum Aufschlagen eignet. Sie enthält zwischen 10 und 20 Prozent Fett. Üblich sind 15 Prozent Fett - das ist halb so viel wie bei Schlagsahne. Kochsahne eignet sich zum Verfeinern von Soßen, Suppen und Aufläufen. Wenn ein Gericht viel Säure enthält, kann Kochsahne ausflocken, deshalb sollte man sie im Zweifel erst kurz vor dem Servieren hinzufügen. Statt fertige Kochsahne zu kaufen, kann man auch normale Schlagsahne mit Milch verdünnen.
</li>
<li>Nicht zu verwechseln mit Kochsahne sind Kochcremes. Diese Sahneersatz-Produkte werden häufig als "leichte Alternative zu Sahne" vermarktet. Dabei handelt es sich um Mischungen aus Wasser, (gehärtetem) Pflanzenfett, Emulgatoren und verschiedenen weiteren pflanzlichen und/oder tierischen Stoffen.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.ndr.de/ratgeber/kochen/Kochsahne,kochsahne100.html"
target="_blank" rel="noreferrer noopener">
NDR–Ratgeber - Kochen :: Kochsahne</a>
</li>
</ul>
</html>
<html>
<meta Arbeitsrecht />
<h3>Fünf Regeln für die Krankmeldung, die Sie kennen sollten</h3>
<ol>
<li><details><summary>Arbeitgeber darf ab erstem Krankheitstag Attest verlangen</summary><br />
<ul>
<li>Arbeitgeber dürfen schon ab dem ersten Krankheitstag ein Attest verlangen, offiziell Arbeitsunfähigkeitsbescheinigung (AU) genannt. Im Gesetz ist zwar lediglich vorgesehen, dass die Bescheinigung spätestens ab dem vierten Tag der Krankheit vorliegen muss, wenn Beschäftigte weiter ihr Entgelt bekommen möchten.
</li>
<br />
<li>Arbeitgeber können aber eigene Regeln aufstellen, wie der Deutsche Gewerkschaftsbund in einem Ratgeber erklärt. Die Vorgaben müssen den Infos zufolge nicht mal im Arbeitsvertrag festgeschrieben sein. Der Arbeitgeber kann jederzeit verlangen, dass Beschäftigte bei Krankheit eine AU-Bescheinigung vorlegen - sofern das zeitlich nicht unmöglich ist.
</li>
</ul>
<br />
</details>
</li>
<li><details><summary>Krankgeschriebene müssen <u><b>nicht</b></u> im Bett liegen</summary><br />
<ul>
<li>Schnell zur Apotheke oder frische Luft schnappen im Park – manche fühlen sich unwohl, das Haus oder die Wohnung zu verlassen, wenn sie krankgeschrieben sind. Diese Sorge ist jedoch teilweise unberechtigt. Was arbeitsunfähige Beschäftigte unternehmen, darf die Krankheit zumindest nicht verschlimmern, wie die Arbeitnehmerkammer Bremen erklärt.
</li>
<br />
<li>Da alle Krankheiten unterschiedlich sind, heißt das eben nicht immer, dass Beschäftigte strenge Bettruhe halten müssen. Bei einer Grippe etwa sollten sich Arbeitnehmerinnen und Arbeitnehmer grundsätzlich schonen, etwas in der Apotheke oder im Supermarkt zu besorgen, ist aber trotzdem erlaubt.
</li>
</ul>
<br />
</details>
</li>
<li><details><summary>Krankgeschriebene müssen <u><b>nicht</b></u> an die Tür oder ans Telefon gehen</summary><br />
<ul>
<li>Beschäftigte seien nicht verpflichtet, die Tür aufzumachen, zu Hause zu sein oder Auskünfte zu ihrer Erkrankung zu geben, wenn der Arbeitgeber unangekündigt für einen Hausbesuch auftaucht, so Nathalie Oberthür, Fachanwältin für Arbeitsrecht.
</li>
<br />
<li>In aller Regel müssen Arbeitnehmerinnen und Arbeitnehmer nicht einmal telefonisch erreichbar sein oder Anrufe entgegennehmen, während sie krank sind. Anrufe zu Kontrollzwecken, weil der Arbeitgeber Zweifel an der AU-Bescheinigung hegt, sind der Anwältin zufolge allenfalls sehr begrenzt möglich.
</li>
<br />
<li>Ausnahmen können einen Anruf aber in Einzelfällen rechtfertigen – etwa, wenn ein erkrankter Mitarbeiter dringende dienstliche Fragen beantworten muss. Es kommt aber auch hier darauf an, was das konkrete betriebliche Interesse ist und welche Krankheit vorliegt.
</li>
</ul>
<br />
</details>
</li>
<li><details><summary>Grund für Krankschreibung geht Arbeitgeber nichts an</summary><br />
<ul>
<li>Manch ein Arbeitgeber ist bei Krankschreibungen vielleicht neugieriger als er sein sollte. Auch wenn Beschäftigte bisweilen schon von sich aus mitteilen, warum sie krank sind, besteht dazu eigentlich gar keine Pflicht. „Die Diagnose ist geheim“, heißt es im DGB-Ratgeber zum Thema. Falls der Arbeitgeber aktiv nach dem Grund der Erkrankung fragt, müssen Beschäftigte keine Antwort geben.
</li>
</ul>
<br />
</details>
</li>
<li><details><summary>Arbeitgeber kann Krankschreibung prüfen</summary><br />
<ul>
<li>Hat ein Arbeitgeber Zweifel daran, dass ein Mitarbeiter trotz vorliegendem Attest tatsächlich krank ist, kann er eine Krankschreibung unter Umständen auch überprüfen. Bei gesetzlich versicherten Arbeitnehmern kann der Arbeitgeber von der Krankenkasse verlangen, dass diese eine Stellungnahme des Medizinischen Dienstes zur Überprüfung der Arbeitsunfähigkeit einholt. Das ist gesetzlich geregelt. Einfach so geht das aber nicht. Der Arbeitgeber muss dafür begründete Zweifel an der Arbeitsunfähigkeit haben.
</li>
</ul>
<br />
</details>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.apotheken-umschau.de/news/krankmeldung-fuenf-regeln-die-sie-kennen-sollten-1185003.html"
target="_blank" rel="noreferrer noopener">
Apotheken-Umschau :: Krankmeldung - Fünf Regeln für die Krankmeldung, die Sie kennen sollten</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
</ul>
</html>
<html>
<h3>Medizin–Fremdwörter rund um CED</h3>
<ul>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href=""
target="_blank" rel="noreferrer noopener">
Newsletter in myTARGET–App (CED)</a>
</li>
</ul>
</html>
<html>
<ol>
<li><h3>Kein verbindlicher Zeitplan</h3>
Der erste Fehler wird meist bei der Terminierung der Sitzung gemacht ‐ etwa, wenn es<br />
in der Einladung heißt: Dienstag, 9 bis 12 Uhr. Besser ist es, immer eine äußerst knapp<br />
kalkulierte Zeitspanne festzulegen. Wenn alle Teilnehmenden von Beginn an Druck ver‐<br />
spüren, sind die Chancen, dass jeder zügig auf den Punkt kommt, wesentlich größer.<br />
Dinge, die kurz und präzise abgehandelt werden, prägen sich auch besser ins Gedächtnis<br />
ein. Bei Meetings in der Länge einer Schulstunde bleiben die meisten am ehesten mit<br />
den Gedanken bei der Arbeit. Lange Meetings können zudem frustrieren und Mitarbeiter<br />
weniger motiviert arbeiten lassen.
</li>
<li><h3>Keine feste Agenda und zu viele Teilnehmer</h3>
Um ein Meeting nicht unnötig lang werden zu lassen, ist auch eine konkrete Agenda not<br />
wendig. Diese sollte sich ebenfalls auf das Wesentliche beschränken und ein paar Tage <br />
vor dem Treffen an alle Teilnehmenden verschickt werden. Alles, was nicht zwingend in<br />
größerer Runde besprochen werden muss, kommt nicht in die Agenda. Grundsätzlich<br />
sollte bei jedem Meeting die Runde so klein wie möglich gehalten werden. Außerdem<br />
ist es möglich, einige Mitarbeiter nur zu bestimmten Punkten der Tagesordnung dazu<br />
zu bitten.
</li>
<li><h3>Entscheidungen verschieben</h3>
Je mehr Menschen an einem Meeting teilnehmen, desto schwieriger wird es, mehr<br />
heitliche Entscheidungen zu treffen. Gern wird dies dann auf das nächste Meeting<br />
verschoben. Sollten Sie der Leiter einer solchen Runde sein, bestehen Sie auf einem<br />
finalen Konsens außer es sprechen gravierende Gründe dagegen. Oft ziehen sich<br />
solche vertagten Entscheidungen sonst von Meeting zu Meeting und machen die<br />
Agenda jedes Mal länger. Damit Wochen oder Monate später noch nachvollziehbar<br />
ist, was wann besprochen wurde, sollte ein Protokoll geschrieben werden, das an<br />
schließend allen zur Verfügung gestellt wird.
</li>
<li><h3>Digitale Ablenkungen</h3>
Irgendwann zückt fast jeder sein Smartphone und liest und beantwortet während<br />
des Meetings E-Mails und andere Nachrichten. Oder checkt nebenbei die Nach<br />
richtenportale oder scrollt durch den Instagram-Feed, weil der gerade abgehan‐<br />
delte Tagesordnungspunkt für einen selbst nicht relevant ist. Jede Form der digi‐<br />
talen Ablenkung führt jedoch dazu, dass Leute nicht zuhören, Sachen verpassen<br />
und unnötige Nachfragen stellen. Darunter leidet auch bei gut vorbereiteter Agen‐<br />
da die Produktivität. Strenge Regeln sollten kein Tabu sein: 60 oder 90 Minuten<br />
sollte jeder Teilnehmende auch mal offline verbringen können.
</li>
<li><h3>Digitale Ausstattung</h3>
Mit Blick auf Technik und Technologien gilt in der Corona-Homeoffice-Zeiten auch:<br />
Unternehmen sollten die Ausstattung der Heimarbeitsplätze priorisieren und bei<br />
Bedarf in diese investieren. In vielen Firmen laufen Videokonferenzen noch immer<br />
nicht reibungslos, weil Beschäftigte zu Hause zu schlecht ausgestattet sind oder<br />
kein schnelles Internet haben. Selten sind bei einem virtuellen Meeting alle von<br />
Anfang an ‐ und bis zum Ende ‐ dabei. Das nervt nicht nur, sondern führt auch<br />
dazu, dass Absprachen aus solchen Sitzungen immer etwas unklarer bleiben oder<br />
ihre Umsetzung schlechter klappt.
</li>
<li><h3>Keine konkreten Ergebnisse</h3>
Ein Meeting ist nicht nur Gelegenheit, über Was-wäre-wenn-Szenarien zu fabulieren,<br />
sondern sollte konkrete Ergebnisse haben oder unmittelbar zu solchen führen. Nie‐<br />
mand sollte das Treffen daher ohne Aufgabe samt Deadline verlassen und sich ver‐<br />
antwortlich für etwas fühlen.
</li>
<ol>
<h3>Links:</h3>
<ul>
<li><a href="https://www.capital.de/karriere/6-kardinalfehler-bei-meetings-unproduktiv" target="_blank" rel="noreferrer noopener">Capital :: 6 Kardinalfehler, die Meetings unproduktiv machen</a></li>
</ul>
</html>
<html>
<h3>Obentraut-Apotheke:</h3>
<table>
<tr>
<th>Montag</th><th>Dienstag</th><th>Mittwoch</th><th>Donnerstag</th><th>Freitag</th><th>Samstag</th><th>Sonntag</th>
</tr>
<tr>
<td>08:00 - 13:00<br />
15:00 - 18:30
</td>
<td>08:00 - 13:00<br />
15:00 - 18:30
</td>
<td>08:00 - 13:00<br />
</td>
<td>08:00 - 13:00<br />
15:00 - 18:30
</td>
<td>08:00 - 13:00<br />
15:00 - 18:30
</td>
<td>08:00 - 13:00<br />
</td>
<td>Geschlossen<br />
</td>
</tr>
</table>
<h3>Adler-Apotheke Seelze</h3>
<table>
<tr>
<th>Montag</th><th>Dienstag</th><th>Mittwoch</th><th>Donnerstag</th><th>Freitag</th><th>Samstag</th><th>Sonntag</th>
</tr>
<tr>
<td>08:00 - 13:30<br />
14:30 - 18:30
</td>
<td>08:00 - 13:30<br />
14:30 - 18:30
</td>
<td>08:00 - 13:30<br />
14:30 - 18:30
</td>
<td>08:00 - 13:30<br />
14:30 - 18:30
</td>
<td>08:00 - 18:30<br />
</td>
<td>08:00 - 13:00<br />
</td>
<td>Geschlossen<br />
</td>
</tr>
</table>
</html>
<html>
<table>
<tr>
<th>Montag</th><th>Dienstag</th><th>Mittwoch</th><th>Donnerstag</th><th>Freitag</th><th>Samstag</th><th>Sonntag</th>
</tr>
<tr>
<td>geschlossen
</td>
<td>08:00 - 13:00<br />
14:30 - 18:00
</td>
<td>08:00 - 13:00<br />
14:30 - 18:00
</td>
<td>08:00 - 13:00<br />
14:30 - 18:00
</td>
<td>08:00 - 13:00<br />
14:30 - 18:00
</td>
<td>08:00 - 13:00<br />
</td>
</tr>
</table>
</html>
<html>
<ul>
<li>steht für:
<ol>
<li>Preview (Überfliegen, Vorausschau)
</li>
<li>Questions (Fragen stellen)
</li>
<li>Read (Lesen)
</li>
<li>Reflect (Reflektieren, Nachdenken)
</li>
<li>Recite (Wiedergeben)
</li>
<li>Review (Rückblick)
</li>
</ol>
</li>
<br />
<li>wird auch <code><b>SQ4R</b></code> genannt.<br />
Dabei steht das S für “Survey“<br />
</li>
<br />
<li>Man unterteilt den Text vor dem Lesen in kleinere Abschnitte<br />
wie zum Beispiel zuerst in Kapiteln und dann, falls notwendig,<br />
nochmal in (kleinere) Abschnitte.<br />
<br />
[Zeitschriften-Artikel :: Die Unterteilung in Absätze verwenden(?) ]
<li><h3>Schritt (0) : Ablenkungen aus dem Weg r–umen</h3>
<ul>
<li>Alles das, was zum Ablenken führen könnte (wie z.B.<br />
das Smartphone, die Spielkonsole o.ä.) muss aus<br />
dem Umfeld verschwinden.
</ul>
</li>
<li><h3>Schritt (1) : Preview (Überfliegen – Vorausschauen)</h3>
<ul>
<li>Bei der Preview überfliegt man den gesamten Text <br />
so, dass man einen groben Überblick über den In- <br />
halt hat und in der Lage ist, ihn in einzelne Ab- <br />
schnitte einzuteilen. Dazu gehört auch das Inhalts- <br />
und Stichwortverzeichnis und der Klappentext (wenn <br />
vorhanden).
</li>
<li>Ein Kapitel überfliegen, die wichtigsten Ab–<br /
schnitte feststellen;
</li>
<li>für jeden Abschnitt die folgenden fünf Schrit–<br />
te anwenden;
</li>
</ul>
</lI>
<li><h3>Schritt (2) : Questions (Fragen stellen)</h3>
<ul>
<li>Formulierung und Notieren von Fragen zum Abschnitt
</li>
<li>Eigene Fragen überlegen oder Abschnittsüberschriften<br />
neu in Frageform formulieren
</li>
<li>Diese Fragen auf einem separaten Blatt notieren.
</li>
</ul>
</li>
<li><h3>Schritt (3) : Read (Lesen)</h3>
Sorgfältiges Durchlesen des Abschnitts; <br />
Wichtiges markieren; <br />
Notizen machen
</li>
<li><h3>Schritt (4) : Reflect (Reflektieren – Wiedergeben)</h3>
In diesem Schritt denkt man über das Gelesene nach. <br />
Man versucht die neuen Informationen mit bereits <br />
Gelerntem zu verknüpfen und sucht gegebenenfalls <br />
nach Beispielen (Wo kann ich dieses Wissen anwenden?).<br />
<br />
In Lesepausen über das Gelesene nachdenken, Beispiele<br />
überlegen, den Text zum eigenen Vorwissen in Beziehung<br />
setzen
</li>
<li><h3>Schritt (5) : Recite (Wiedergeben)</h3>
Nachdem man sich Gedanken über den Abschnitt gemacht <br />
hat, versucht man, die Informationen in eigenen Worten <br />
wiederzugeben. Dabei versucht man, die im 2. Schritt <br />
formulierten Fragen zu beantworten. Wenn einem Ver- <br />
ständnisprobleme auffallen, kann man im Text oder den <br />
Notizen noch einmal nachlesen. Nun geht man zum nächsten <br />
Abschnitt über.<br />
<br />
Informationen des Abschnitts mit eigenen Worten wiedergeben,<br />
die vorher formulierten Fragen beantworten, bei Schwierigkeiten<br />
mit den Antworten einzelne Passagen noch einmal lesen.
</li>
<li><h3>Schritt (6) : Review (Rückblick)</h3>
Wenn man den Text Abschnitt für Abschnitt durchgearbeitet <br />
hat, macht man sich Gedanken über den gesamten Text und <br />
fasst alle wichtigen Informationen zusammen.<br />
<br />
Wichtige Punkte des Kapitels noch einmal gedanklich aufrufen,<br />
eventuell dabei das Buch schließen.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://methodenkompetenz.blogs.uni-hamburg.de/pq4r-methode/"
target="_blank" rel="noreferrer noopener"">
Uni Hamburg :: Methodenkompetenz – PQ4R–Methode</a>
</li>
<li><a href="http://www.teachsam.de/arb/arb_les_strat_6.htm"
target="_blank" rel="noreferrer noopener"">
Teach Sam</a>
</li>
<li><a href="http://www.eucim-te.eu/data/lb/File/Bewertungsbogen%20SKMBT_C36011032315090.pdf"
target="_blank" rel="noreferrer noopener"">
EUCIM (21.04.2016)</a>
</li>
<li><a href="https://www.uni-due.de/imperia/md/content/biwi/einrichtungen/ipaed/kindheitsforschung/merkblatt_aktives_lesen.pdf (21.4.2016)"
target="_blank" rel="noreferrer noopener"">
UniDuesseldorf :: Kindheitsforschung – merkblatt_aktives_lesen.pdf</a>
</li>
<li><a href="https://www.youtube.com/watch?v=NaR1B0jX_WE"
target="_blank" rel="noreferrer noopener"">
YouTube :: Dr. Monica Hayes : PQ4R </a>
</li>
<li><a href="https://www.youtube.com/watch?v=ziofH7N8ZOE"
target="_blank" rel="noreferrer noopener"">
YouTube :: OSLIS </a>
</li>
<li><a href="https://www.youtube.com/watch?v=DbMlIPgqXB8"
target="_blank" rel="noreferrer noopener"">
YouTube :: Steve Piscitelli</a>
</li>
<li><a href="https://www.youtube.com/watch?v=SPQSZt0QfNs"
target="_blank" rel="noreferrer noopener"">
YouTube</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener"">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>Die Perizyten sind dafür zuständig, die Struktur<br />
der Blutgefäße aufrechtzuerhalten. <br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Der Spiegel‐Newsletter “Elementarteilchen“, 2022-11-19</li>
</ul>
</html>
<html>
<li><b>Anthophobie</b><br />
die Angst vor Blumen
</li>
<li><b>Oenophobie</b><br />
die Angst vor Wein (Getränk)
</li>
<li><b>Klaustrophobie</b><br />
die Angst vor/in engen Rämen
</li>
<li><b>Agoraphobie</b><br />
Platzangst, Angst vor öffentlichen Plätzen oder weiten Rämen
</li>
<li><b>Akrophobie</b><br />
Ängste vor großen Höhen
</li>
<li><b>Arachnophobie</b><br />
Angst vor Spinnen
</li>
<li><b>Kynophobie</b><br />
Angst vor Hunden
</li>
<li><b>Hämatophobie</b><br />
Ängste vor Blut
</li>
<li><b>Aviophobie</b><br />
Angst vor dem Fliegen
</li>
<li><b>Paruresis</b><br />
Angst vor dem Urinieren auf öffentlichen Toiletten
</li>
<li><b>Dentalphobie</b><br />
Angst vor dem Zahnarzt
</li>
<li><b>Achluophobie</b><br />
Angst vor dunklen Räumen
</li>
<li><b>Coulrophobie</b><br />
Angst vor Clowns
</li>
<!--
<li><b></b><br />
</li>
<li><b></b><br />
</li>
-->
<footer>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Liste_von_Phobien"
target="_blank" rel="noreferrer">
Wikipedia :: Liste von Phobien</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer">
</a>
</li>
-->
</ul>
</footer>
</html>
<html>
<ul>
<li>Ich verdiene das Beste.
</li>
<br />
<li>Ich bin einzigartig.
</li>
<br />
<li>Ich kenne meine Talente genau.
</li>
<br />
<li>Ich werde immer selbstbewusster.
</li>
<br />
<li>Ich sehe die Dinge positiv.
</li>
<br />
<li>
</li>
<br />
<li>
</li>
<br />
<li>
</li>
<br />
<li>
</li>
<br />
<li>
</li>
<br />
<li>
</li>
<br />
<li>
</li>
<br />
<li>
</li>
<br />
<li>
</li>
<br />
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.brigitte.de/leben/15-glaubenssaetze--die-dich-langsam-aber-sicher-selbstbewusster-machen-13548806.html"
target="_blank" rel="noreferrer noopener">
Brigitte :: Positive Glaubenssätze, die dich selbstbewusster machen</a>
</li>
</ul>
</html>
<html>
<ul>
<li>die AussweisApp MUSS sowohl auf dem Betriebssystem (Windows 11)<br />
UND dem Kartenlesegerät (Smartphone (NFC-fähig)) installiert sein (wg.<br />
der späteren Kopplung der beiden Geräte);
</li>
<li>Über die AusweissApp auf dem Lesegerät wird die ePerso-PIN einge-<br />
geben;
</li>
<li>Auf der BundID-Seite werden die 5 Voraussetzungen angezeigt und<br />
auch überprüft (so wird bei Nicht-Vorhandensein der AusweissApp<br />
das angezeigt)
</li>
</ul>
</html>
<html>
<ul>
<li>Fühlst Du Dich von Deinem Arbeitspensum manchmal überfordert und hast Schwierigkeiten, alle Deine Aufgaben fristgerecht zu erledigen? Mit diesem einfachen Trick, kannst Du Deine Produktivität steigern und mehr schaffen.<br />
<br />
<b>Hast Du schon einmal von "Batching" gehört?</b><br />
<br />
Die Idee hinter dem Konzept des Batching ist schnell erklärt: Im Englischen bedeutet to batch something = etwas zu stapeln.<br />
<br />
Im Arbeitskontext heißt das, dass Du nicht wie beim Multitasking viele verschiedene Aufgaben nacheinander in loser Abfolge erledigst, sondern die Aufgaben erst einmal thematisch "stapelst" beziehungsweise bündelst.<br />
<br />
Dadurch sparst Du Zeit und Energie. Denn anstatt Dich in jede neue Aufgabe erst einmal reindenken zu müssen und gedanklich zwischen den verschiednen Kategorien hin- und her zu springen, kannst Du Dich mit dieser Methoden auf eine Art von Aufgabe konzentrieren.<br />
<br />
Und so geht's:<br />
<br />
<ol>
<li>🖍️ Nimm Dir einen bunten Stift oder Textmarker, gehe Deine To Do Liste durch und kategorisiere deine Aufgaben erst einmal nach Typ, indem Du sie mit der jeweiligen Farbe umkreist oder anmarkerst.<br />
<br />
Zum Beispiel:
<ul>
<li>🟢 grün für kreative Aufgaben,
</li>
<li>🔴 rot für administrative Aufgaben und
</li>
<li>🔵 blau für Anrufe und E-Mails, die beantwortet werden müssen.
</li>
</ul>
<br />
</li>
<li>✔️ Erledige dann erst alle Aufgaben einer Kategorie, bevor du zur nächsten Kategorie übergehst.
</li>
</ol>
<br />
Mit dieser Methode reduzierst Du nicht nur Stress und steigerst Deine Produktivität. Du bringst damit auch etwas Farbe in deine tägliche Routine.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.xing.com/news/articles/mehr-in-weniger-zeit-erreichen-kennst-du-schon-diesen-genialen-produktivitats-hack-5857699"
target="_blank" rel="noreferrer noopener">
Xing - Job & Karriere :: Mehr in weniger Zeit erreichen: Kennst Du schon diesen genialen Produktivitäts-Hack? </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li><b>RAI 1</b> :: http://icestreaming.rai.it/1.mp3<br />
Alternativ: <a href="https://radio-in-diretta.com/rai-radio-1"
target="_blank" rel="noreferrer noopener">
https://radio-in-diretta.com/rai-radio-1</a>
</li>
<li><details><summary><b>Fussball, 2. Bundesliga:</b> </summary>
<ol type="1">
<li>https://wdr-sportschau-liga2spiel1.icecastssl.wdr.de/wdr/sportschau/liga2spiel1/mp3/high?file=.mp3
</li>
<li>https://wdr-sportschau-liga2spiel2.icecastssl.wdr.de/wdr/sportschau/liga2spiel2/mp3/high?file=.mp3
</li>
<li>https://wdr-sportschau-liga2spiel3.icecastssl.wdr.de/wdr/sportschau/liga2spiel3/mp3/high?file=.mp3
</li>
<li>https://wdr-sportschau-liga2spiel4.icecastssl.wdr.de/wdr/sportschau/liga2spiel4/mp3/high?file=.mp3
</li>
<li>https://wdr-sportschau-liga2spiel5.icecastssl.wdr.de/wdr/sportschau/liga2spiel5/mp3/high?file=.mp3
</li>
<li>https://wdr-sportschau-liga2spiel6.icecastssl.wdr.de/wdr/sportschau/liga2spiel6/mp3/high?file=.mp3
</li>
<li>https://wdr-sportschau-liga2spiel7.icecastssl.wdr.de/wdr/sportschau/liga2spiel7/mp3/high?file=.mp3
</li>
<li>https://wdr-sportschau-liga2spiel9.icecastssl.wdr.de/wdr/sportschau/liga2spiel9/mp3/high?file=.mp3
</li>
<li>https://wdr-sportschau-liga2konferenz.icecastssl.wdr.de/wdr/sportschau/liga2konferenz/mp3/high?file=.mp3
</li>
</ol>
<br />
</li>
<li><details><summary><b>Fussball, 1. Bundesliga:</b></summary>
<ol>
<li>https://wdr-sportschau-liga1spiel1.icecastssl.wdr.de/wdr/sportschau/liga1spiel1/mp3/high?file=.mp3
</li>
<li>https://wdr-sportschau-liga1spiel2.icecastssl.wdr.de/wdr/sportschau/liga1spiel2/mp3/high?file=.mp3
</li>
<li>https://wdr-sportschau-liga1spiel3.icecastssl.wdr.de/wdr/sportschau/liga1spiel3/mp3/high?file=.mp3
</li>
<li>https://wdr-sportschau-liga1spiel4.icecastssl.wdr.de/wdr/sportschau/liga1spiel4/mp3/high?file=.mp3
</li>
<li>https://wdr-sportschau-liga1spiel5.icecastssl.wdr.de/wdr/sportschau/liga1spiel5/mp3/high?file=.mp3
</li>
<li>https://wdr-sportschau-liga1spiel6.icecastssl.wdr.de/wdr/sportschau/liga1spiel6/mp3/high?file=.mp3
</li>
<li>https://wdr-sportschau-liga1spiel7.icecastssl.wdr.de/wdr/sportschau/liga1spiel7/mp3/high?file=.mp3
</li>
<li>https://wdr-sportschau-liga1spiel8.icecastssl.wdr.de/wdr/sportschau/liga1spiel8/mp3/high?file=.mp3
</li>
<li>https://wdr-sportschau-liga1spiel9.icecastssl.wdr.de/wdr/sportschau/liga1spiel9/mp3/high?file=.mp3
</li>
<li>https://wdr-sportschau-liga1konferenz.icecastssl.wdr.de/wdr/sportschau/liga1konferenz/mp3/high?file=.mp3
</li>
</ol>
<br />
</li>
<li><details><summary><b>Radio Bob!</b> :: <a href="https://streams.radiobob.de/"
target="_blank" rel="noreferrer noopener">https://streams.radiobob.de/</a></summary>
<ul>
<li>Blues :: https://streams.radiobob.de/blues/mp3-192/streams.radiobob.de/play.m3u
</li>
<li>70er Rock :: https://streams.radiobob.de/70errock/mp3-192/streams.radiobob.de/play.m3u
</li>
<li>AC/DC :: https://streams.radiobob.de/bob-acdc/mp3-192/streams.radiobob.de/play.m3u
</li>
<li>Stream National :: https://streams.radiobob.de/bob-national/mp3-192/streams.radiobob.de/play.m3u
</li>
<li>80er Rock :: http://streams.radiobob.de/bob-80srock/mp3-128/streams.radiobob.de/
</li>
</ul>
</details>
</li>
<li><a href="https://en.everybodywiki.com/List_of_BBC_radio_stream_URLs"
target="_blank" rel="noreferrer noopener">
BBC</a>
</li>
<li><a href="https://www.radiobremen.de/service/hilfe/webchannels-100.html"
target="_blank" rel="noreferrer noopener">
Radio Bremen</a><br />
<a href="https://icecast.radiobremen.de/rb/bremeneins/live/mp3/128/stream.mp3"
target="_blank" rel="noreferrer noopener">
Radio Bremen Eins</a>
</li>
<li><details><summary><b>NDR</b></summary>
<ul>
<li>NDR Info – Nachrichten: http://icecast.ndr.de/ndr/ndrinfo/hamburg/mp3/128/stream.mp3
</li>
<li>NDR Info Spezial: http://icecast.ndr.de/ndr/ndrinfospezial/live/mp3/128/stream.mp3
</li>
<li><a href="https://www.ndr.de/service/livestreams101_page-2.html"
target="_blank" rel="noreferrer noopener">
NDR Livestreams</a>
</li>
<li><a href="https://www.ndr.de/resources/metadaten/audio/m3u/ndrkultur-lq.m3u"
target="_blank" rel="noreferrer noopener">
NDR Kultur - Klassik</a>
</li>
</ul>
</details>
</li>
<li><details><summary><b>MDR</b></summary>
<ul>
<li>MDR AKTUELL (Nachrichten): http://mdr-284340-0.cast.mdr.de/mdr/284340/0/mp3/high/stream.mp3
</li>
</ul>
</li>
<li><details><summary><b>RTBF</b></summary>
<ul>
<li>La Première (Unterhaltung, Nachrichten): http://radios.rtbf.be/laprem1ere-128.mp3
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.ubuntuusers.de/Internetradio/Streamadressen_ermitteln/"
target="_blank" rel="noreferrer noopener">
Ubuntu-Users :: Internetradio – Streamadressen ermitteln</a>
</li>
<li><a href="https://wiki.ubuntuusers.de/Internetradio/Stationen/"
target="_blank" rel="noreferrer noopener">
Ubuntu-Users :: Internetradio – Stationen </a>
</li>
</ul>
</html>
<html>
Rapsöl wird in Ölmühlen durch Pressung oder Extraktion der Rapssaat gewonnen.<br />
Hierbei kommen folgende Verfahren zur Anwendung:
<ul>
<li>Heißpressung/Raffination in Ölmühlen</li>
<li>Kaltpressung in dezentralen Ölmühlen</li>
</ul>
Der Ölgehalt beträgt etwa 40 bis 50 %, die Ausbeute etwa ein Drittel der Saat. <br />
Die verbleibende protein- und energiereiche Rapssaatmasse (Rapskuchen,<br />
Rapsexpeller oder Rapsextraktionsschrot) ist ein wichtiges Koppelprodukt<br />
und wird meist als Futtermittel genutzt.<br />
<br />
Bei der Herstellung von <b>Rapskernöl</b> werden vor der Pressung die schwarzen<br />
Schalen der Rapssaat entfernt und so ausschließlich die gelben Kerne verar‐<br />
beitet. Dies verhindert die Einbringung der Bitterstoffe aus der Schale der Saat<br />
in das Öl. <br />
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Raps%C3%B6l" target="_blank" rel="noreferrer noopener">Wikipedia</a></li>
<li><a href="https://www.vzth.de/wissen/lebensmittel/gesund-ernaehren/kennen-sie-den-unterschied-zwischen-rapsoel-und-rapskernoel-15344" target="_blank"
rel="noreferrer noopener">Verbraucherzentrale Thüringen :: Unterschied zwischen Rapsöl und Rapskernöl</a></li>
</ul>
</html>
<html>
<h3>Printing this certificate & exporting to PDF:</h3>
<ul>
<li>You can print this certificate or export it to a PDF<br />
file using the <code>"File > Print … "</code> option in <br />
your browser.
</li>
<li>For best results we recommend using Google <br />
Chrome with the following settings:
<pre><code>Margins = None
Background Graphics = Yes.</code></pre>
</li>
</ul>
</html>
<html>
<ul>
<li>Abfluß-frei Rohrreinigung<br />
0511 / 5 41 51 00<br />
<a href="https://abfluss-frei-rohrreinigung.de/"
target="_blank" rel="noreferrer noopener">
Homepage</a><br />
[Mitarbeiter, mit denen ich Kontakt hatte:
<ul>
<li>Herr Sudmüller, Frau Fricke (Hotline)
</li>
<li>Herr Schirmer (Klempner)
</li>
</ul>]
</li>
</ul>
</html>
<html>
<ul>
<li>Vorlage angelegt:
<ul>
<li>File "SEPA-Lastschriftmandat-Vorlage.odt";
</li>
<li>im Verzeichnis /media/mueller/EMT/
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://finantio.de/wissen/finanzen/sepa-lastschriftmandat-vorlage/"
target="_blank" rel="noreferrer noopener">
Finantio :: SEPA-Lastschriftmanadat</a>
</li>
</ul>
</html>
<html>
<h4>Gesellschaft - Psychologie :: Toxische Menschen an diesen fünf Sätzen schnell erkennen</h4>
<ul>
<li>Oft verbringt man Jahre mit Menschen, die einem nicht guttun. Wie kann man erkennen, ob jemand toxisch ist? Laut einer Psychotherapeutin verraten es fünf Sätze.
</li>
<li>Toxische Menschen offenbaren sich nicht sofort als solche, wenn man sie kennenlernt. Sie können sehr charmant sein, witzig und interessant. Gerade die Tatsache, dass die Bekanntschaft mit ihnen selten unkompliziert ist, macht sie für viele Menschen faszinierend: "Das Wechselspiel von Verletzungen und anschließenden intensiven Versöhnungen kann leidenschaftlich und anziehend sein – regelrecht süchtig machen", sagt die Psychotherapeutin Verena Düttmann von "HelloBetter".
</li>
<li>
Wer allerdings schon einmal Freundschaften oder Beziehungen nach Jahren frustriert abbrechen musste, weil sie einfach zu zehrend waren und man vor lauter Kümmern um die Launen des anderen keine Energie mehr für das eigene Leben hatte, wird das bedauern. Wie kann man Menschen, die einem nicht guttun, schon früh als solche erkennen? Die Psychotherapeutin weiß, welche Phrasen und Aussagen toxische Menschen unbewusst immer wieder verwenden, um ihren Kopf durchzusetzen und um die Konsequenzen ihrer Handlungen zu vermeiden. Wir verraten Ihnen, welche das sind.
</li>
<li><h4>Toxische Menschen verraten sich durch diese Sätze:</h4>
<ul>
<li><b>1. "Wenn ich dir wichtig wäre, dann …"</b><br />
Vermutlich haben Sie sich in der Vergangenheit als jemand bewiesen, dem andere Menschen am Herzen liegen und der sich gern kümmert. Toxische Menschen sind sehr gut darin, Empathie und soziale Verantwortung auszunutzen. Deshalb wissen sie auch, dass dieser Satz Sie wirklich empfindlich treffen wird – und Sie aus dem daraus erwachsenen Schuldgefühl womöglich etwas tun oder sagen, das Sie gar nicht wollen. Es gehe toxischen Personen hauptsächlich darum, "das Selbstwertgefühl der Betroffenen zu untergraben, Abhängigkeiten zu fördern und emotionale Manipulation zu betreiben", erklärt Psychotherapeutin Düttmann. Ein fieser, manipulativer Trick.
</li>
<li><b>2. "Das habe ich so nie gesagt."</b><br />
Sie sind ein erwachsener Mensch mit funktionierenden Sinnesorganen. Sie waren anwesend, als derjenige die entsprechende Aussage getätigt hat, haben es mit Ihren eigenen Ohren gehört. Und trotzdem ist die Chance, dass diese Person es womöglich schon mehrmals geschafft hat, Sie an Ihren eigenen Wahrnehmungen zweifeln zu lassen, sehr groß. Es ist eine erstaunliche Fähigkeit toxischer Menschen, die Realität so umzudeuten, wie es ihnen genehm ist – und ihre Version der Wahrheit überzeugend zu verkaufen. "Das kann dazu führen, dass das Gegenüber an der Gültigkeit des eigenen Erlebens zu zweifeln beginnt", sagt Verena Düttmann. Spätestens, wenn Ihnen so eine Faktenverdrehung zum zweiten Mal auffällt, sollten Sie sich das nicht länger bieten lassen.
</li>
<li><b>3. "Das war nur ein Scherz!"</b><br />
Dieser Satz erfüllt eine ähnliche Funktion wie Punkt zwei: Die toxische Person sagt etwas, das auf Sie nicht den erwarteten Effekt hatte. Anstatt zuzustimmen, reagieren Sie vielleicht schockiert oder verletzt. Ihr Gegenüber hat aber keine Lust, sich mit Ihren Befindlichkeiten zu beschäftigen. Es soll schließlich um ihn gehen. Und so annulliert er seine eigene Aussage, indem er diese zum Witz degradiert. Es gehe darum, "den anderen zu kontrollieren, zu verunsichern und Macht zu gewinnen", erklärt Psychotherapeutin Düttmann.
Wenn Sie aber trotzdem noch nicht besänftigt sind, könnten Sie den nächsten typischen Satz zu hören bekommen:
</li>
<li><b>4. "Du bist zu empfindlich."</b><br />
Solche falschen Freunde oder Lover sind nicht daran interessiert, welche Meinung Sie haben, wie es Ihnen geht oder wie Sie sich in deren Anwesenheit fühlen. Sie wollen schlicht Zustimmung, Zuspruch und Bestärkung. Und wenn Ihnen das nicht möglich ist, weil Sie vielleicht eigene Sorgen haben und selbst Beistand bräuchten, bekommen Sie das wahre Gesicht ihres Gegenübers zu sehen: Eines, das völliges Unverständnis zeigt, dass Sie andere Emotionen wichtiger finden als die seinen .
</li>
<li><b>5. "Du bringst mich dazu, so etwas zu tun / zu sagen!"</b><br />
Der vielleicht toxischste Satz – und einer, nachdem man den Kontakt zur entsprechenden Person direkt abbrechen sollte. Ein Satz, der signalisiert, dass derjenige einen eigenen Fehler erkannt hat und eingesteht (beides selten bei toxischen Menschen), aber trotzdem nicht in der Lage ist, Verantwortung zu übernehmen. Stattdessen wird Ihnen die Schuld zugeschoben. Dahinter steht laut Verena Düttman der Wunsch nach "Kontrolle, Manipulation und das Schaffen von Abhängigkeiten".
Oft sagt uns unser Bauchgefühl schon sehr viel früher als unser Kopf, wenn jemand nicht gut für uns ist. Wir sollten vielleicht einfach öfter darauf hören.
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.stern.de/gesellschaft/toxische-menschen-an-diesen-fuenf-saetzen-schnell-erkennen-35605922.html"
target="_blank" rel="noreferrer noopener">
Stern :: Psychologie: Toxische Menschen erkennen Sie schnell an diesen fünf Sätzen</a>
</li>
<li><a href="https://www.morgenpost.de/ratgeber-wissen/article406027360/toxische-beziehung-menschen-welche-saetze-verhalten-warnzeichen.html"
target="_blank" rel="noreferrer noopener">
Berliner Morgenpost</a>
</li>
<li><a href="https://hellobetter.de/blog/autoren/verena-duettmann/"
target="_blank" rel="noreferrer noopener">
HelloBetter</a>
</li>
</ul>
</html>
<html>
<ul>
<li>Settings [<em>Einstellungen</em>] <br />
→ Safety and Emergency [<em>Sicherheit & Notfall</em>] <br />
→ Medical Info [<em>Medizinische Informationen</em>]
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.howtogeek.com/add-emergency-medical-info-to-your-android-phone/"
target="_blank" rel="noreferrer noopener">
How–To Geek :: How to Add Emergency Medical Info to Your Android Phone</a>
</li>
</ul>
</html>
<html>
<p>
Werden Lebensmittel zu lange gelagert, können sie anfangen zu schimmeln und dürfen nicht mehr verzehrt werden. Nur in wenigen Fällen reicht es, lediglich die betroffenen Stellen zu entfernen.
</p>
<p>
Schimmelpilze kommen überall in der Natur vor. Sie vermehren sich durch Sporen, die über die Luft verbreitet werden. Treffen sie auf Lebensmittel, keimen sie aus und bilden Pilzzellen, die für das Auge oft unsichtbar sind. Verbraucher sehen lediglich den Schimmelrasen auf der Oberfläche, der allerdings nur ein kleiner Teil des Schimmelpilzes sein kann. Letztendlich führt Schimmel zum Verderben von Lebensmitteln.
</p>
<h3>Ausnahme Edelschimmel</h3>
<p>
Bei bestimmten Käsesorten wie Camembert bildet Edelschimmel eine schützende Hülle, die mitgegessen wird.
</p>
<p>
Eine Ausnahme ist Edelschimmel, der bei der Herstellung bestimmter Käsesorten wie beispielsweise Gorgonzola oder Roquefort genutzt wird. Er macht den Käse besonders aromatisch. Auch der typische Weißschimmel, der die Oberfläche von Weichkäsesorten wie Camembert oder Brie überzieht, ist völlig unschädlich und hilft, den Käse zu konservieren. Das Gleiche gilt für bestimmte Salamisorten, bei deren Herstellung Edelschimmelpilze zum Einsatz kommen, die der Wurst ihre typische weißliche Haut verleihen.
</p>
<h3>Krebserregende Gifte in schimmelnden Lebensmitteln</h3>
<p>
Die typischen Schimmelpilze, die sich ungewollt auf Nahrungsmitteln ansiedeln, können dagegen die Gesundheit schädigen. Denn sie produzieren krebserregende Gifte, die Mykotoxine. "Das kann akute Vergiftungssymptome hervorrufen wie Erbrechen und Durchfall. Schimmel kann auch leber- und nierenschädigend sein und das Immunsystem in Mitleidenschaft ziehen. Wenn man langfristig verschimmelte Produkte isst, kann das auch krebserregend und erbgutschädigend sein", erklärt Alexandra Borchard-Becker von der Verbraucher Initiative e.V..
</p>
<p>
Bei jungen gesunden Menschen bringt das Immunsystem den Schimmel schnell unter Kontrolle. Riskanter ist der Genuss verschimmelter Speisen für Patienten mit Diabetes oder Immundefekten. Auch Kinder und Schwangere sollten besonders darauf achten, nichts Verschimmeltes zu essen, da die Giftstoffe zu Fehlbildungen beim Embryo führen können.
</p>
<h3>Schimmelpilze lassen sich kaum abtöten</h3>
<p>
In feuchten Lebensmitteln verbreiten sich die Mykotoxine besonders schnell, deshalb sollten diese bei Schimmelbefall immer weggeworfen werden. Die Giftstoffe sind sehr stabil und lassen sich weder durch Erhitzen noch Einfrieren abtöten. Und: Sie befinden sich auch noch in Lebensmitteln, wenn der äußere Schimmel entfernt wurde.
</p>
<h3>Schimmelnde Lebensmittel: Wegwerfen oder abschneiden?</h3>
<ul>
<li><b>Verschimmeltes Brot</b> vollständig wegwerfen, da nicht direkt sichtbar ist, wie sich das Schimmelgeflecht bereits ausgebreitet hat.</li>
<li><b>Marmelade</b> mit Schimmelflecken ebenfalls komplett entsorgen, denn der Schimmel befindet sich auch auf der Glasfläche, so dass er sich nicht entfernen lässt, wenn der sichtbare Schimmel mit einem Löffel abgetragen wird.</li>
<li>Mit Schimmel befallene <b>Milchprodukte</b> vollständig entsorgen.</li>
<li>Verschimmeltes <b>Fleisch oder Wurst</b> nicht mehr verzehren.</li>
<li><b>Frisch- oder Schnittkäse</b> mit Schimmel unbedingt wegwerfen. Springt der Edelschimmel von Weichkäse oder von Salami auf andere Käse- oder Wurstsorten über, ist das zwar möglicherweise unappetitlich, aber nicht gefährlich. Die Stellen können einfach weggeschnitten werden.</li>
<li>Bei <b>Hartkäse</b> wie beispielsweise Parmesan oder lange gereiften Bergkäse reicht es, eine verschimmelte Stelle großzügig abzuschneiden.</li>
<li><b>Nüsse</b> mit verschimmelten Kernen und Schalen unbedingt aussortieren. Ranzig und bitter schmeckende Nüsse ebenfalls entsorgen. Besonders in Pistazien und Erdnüssen wurden bei Warenproben immer wieder Schimmelpilze festgestellt.</li>
<li>Bei <b>festen und harten Obst- und Gemüsesorten</b> wie etwa Möhren kann man kleine dunkle Stellen großzügig entfernen. Das garantiert aber nicht, dass das Gemüse nicht mit Schimmel durchzogen ist. Im Zweifelsfall lieber entsorgen.</li>
<li><b>Wasserreiche Sorten</b>wie Pfirsiche, Birnen, Zitrusfrüchte und Tomaten wegwerfen. In ihnen breiten sich Mykotoxine besonders schnell aus.</li>
<li><b>Eingemachtes, Kompott und Fruchtsäfte</b> ebenfalls direkt entsorgen.</li>
</ul>
<p>
Alexandra Borchard-Becker empfiehlt, im Zweifelsfall lieber einmal mehr etwas wegzuwerfen als einmal zu wenig.
</p>
<h3>Ware beim Einkauf genau prüfen und nicht zu lange lagern</h3>
<p>
Damit Lebensmittel gar nicht erst schimmeln, sollte man im Zweifelsfall lieber kleine Mengen kaufen. Bei Obst und Gemüse schon beim Kauf genau prüfen, ob es frei von Druckstellen, Verletzungen oder Schimmel ist. Bei anderen Lebensmitteln auf das Mindesthaltbarkeitsdatum achten. Zwar darf der Handel Waren laut Gesetz nur in einwandfreiem Zustand anbieten, Probeeinkäufe für den NDR Beitrag "Dürfen die das? Schimmel in Lebensmitteln" haben allerdings gezeigt, dass diese Vorgabe nicht immer eingehalten wird.
</p>
<p>
Nach dem Kauf Nahrungsmittel sauber, kühl und trocken lagern und möglichst rasch verbrauchen. Kühlschrank und Brotkasten am besten einmal pro Woche mit Essigwasser reinigen, dabei alle Brotkrümel entfernen - sie begünstigen Schimmelbefall. Generell gilt: Befallene Lebensmittel sofort entsorgen, da Schimmel "ansteckend" ist.
</p>
<h3>Links:</h3>
<ul>
<li><a href="https://www.ndr.de/ratgeber/gesundheit/Schimmel-Wann-muss-man-Lebensmittel-wegwerfen,schimmel4.html"
target="_blank" rel="noreferrer noopener">NDR Ratgeber :: Schimmel ‐ Wann muss man Lebensmittel wegwerfen?</a></li>
</ul>
</html>
<html>
Zur kalten Jahreszeit haben viele Menschen mit Schimmel im Haus oder der Wohnung zu kämpfen. Der Befall ist nicht nur schlecht für die Wände, sondern auf Dauer auch gesundheitsgefährdend. Ein Hausmittel schafft früh entdecktem Schimmel Abhilfe.
Sie entdecken Schimmel an den Wänden in Ihrem Zuhause? Dann sollten Sie herausfinden, ob der Pilz nur oberflächlich ist oder sich schon in der Bausubstanz festgesetzt hat.
Wichtig: Streichen Sie die Flecken nicht nur mit einer Anti-Schimmelfarbe über, wächst der Pilz unter der Farbschicht weiter.
Was bei oberflächlichem Schimmelbefall hilft
Wenn es sich um einen neuen Schimmelbefall handelt, der lediglich oberflächlich ist, ist 70-prozentiger Alkohol das Wundermittel. Lassen Sie den Alkohol auf die betroffene Stellen einwirken und wischen den Schimmel dann mit einem feuchten Tuch ab.
Wer will, findet im Drogeriemarkt jede Menge chemischer Schimmelentferner. Doch Vorsicht: Die Mittel enthalten meistens Chlor und können die Umwelt sowie die eigenen Atemwegen schädigen.
Professionelle Hilfe bei andauerndem Schimmelbefall
Handelt es sich bei einer betroffenen Stelle, um Schimmelpilze, die schon länger da sind, benötigen Sie professionelle Hilfe. Die Sporen haben sich wahrscheinlich bereits im Anstrich, der Tapete oder im Putz festgesetzt.
Denken Sie daran: Es reicht nicht, nur den Schimmel zu entfernen, sie müssen der Ursache der Schimmelbildung auf den Grund gehen, um das Problem langfristig zum lösen. Achten sie darauf, genügend zu lüften und zu heizen.
Das Original zu diesem Beitrag "Bei Schimmel an den Wänden hilft ein einfaches Hausmittel" stammt von Bit Projects.
<h3>Links:</h3>
<ul>
<li><a href="https://www.focus.de/immobilien/wohnen/besser-als-chemie-keulen-bei-schimmel-an-den-waenden-hilft-ein-einfaches-hausmittel_id_183850724.html"
target="_blank" rel="noreferrer noopener">
Focus Online :: Bei Schimmel an den Wänden hilft ein einfaches Hausmittel</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://www.hannover.de/Leben-in-der-Region-Hannover/B%C3%BCrger-Service/Beh%C3%B6rdenf%C3%BChrer/Behinderung/Feststellungsverfahren/Behinderung-Feststellung-auf-Antrag-des-behinderten-Menschen-Hemmingen" target="_blank" rel="noreferrer noopener">Hannover.de ‐ Leben in der Region</a></li>
<li><a href="https://soziales.niedersachsen.de/startseite/menschen_mit_behinderung/behinderung_und_ausweis/ls_online/ls-online-141.html" target="_blank" rel="noreferrer noopener">Niedersachsen.de ‐ Soziales :: </a></li>
<li><a href="https://soziales.niedersachsen.de/startseite/aktuelles_amp_service/formularservice/formularservice-der-landessozialverwaltung-296.html" target="_blank" rel="noreferrer noopener">Niedersachsen.de ‐ Soziales :: Formularservice</a></li>
<li><a href="https://schwerbehindertenausweis.biz/antrag-schwerbehindertenausweis/" target="_blank" rel="noreferrer noopener">Schwerbehindertenausweis.biz</a></li>
<li><a href="https://www.pflege-durch-angehoerige.de/wichtige-tipps-zum-beantragen-eines-schwerbehindertenausweises/" target="_blank" rel="noreferrer noopener">Pflege durch Angehörige :: Wichtige Tipss zum Beantragen eines Schwerbehindertenausweises</a></li>
<li><a href="https://www.helpster.de/behindertenausweis-beantragen-anleitung_27371" target="_blank" rel="noreferrer noopener">Helpster :: Anleitung zum Beantragen eines Behindertenausweises</a></li>
<li><a href="https://www.helpster.de/gesundheit/verband-8590" target="_blank" rel="noreferrer noopener">Helpster :: </a></li>
<li><a href="http://www.behindertenausweis.org/" target="_blank" rel="noreferrer noopener">Behindertenausweis.org :: Homepage</a></li>
<li><a href="https://de.wikipedia.org/wiki/Schwerbehindertenausweis" target="_blank" rel="noreferrer noopener">Wikipedia :: Schwerbehindertenausweis</a></li>
</ul>
</html>
<html>
<body>
<ol>
<li><details><summary><b>ESO</b> := …</summary><br />
Eisenbahnsignalordnung<br />
<br />
</details>
</li>
<li><details><summary><b>Hp</b> := …</summary><br />
Hauptsignal(e)<br />
<br />
</details>
</li>
<li><details><summary><b>Vr</b> := …</summary><br />
Vorsignal(e)<br />
<br />
</details>
</li>
<li><details><summary><b>Sk</b> := …</summary><br />
Signalkombination(en)<br />
<br />
</details>
</li>
<li><details><summary><b>Ks</b> := …</summary><br />
Kombinationssignal(e)<br />
<br />
</details>
</li>
<li><details><summary><b>HI</b> := …</summary><br />
Lichthaupt- und Lichtvorsignal(e)<br />
<br />
</details>
</li>
<li><details><summary><b>Sv</b> := …</summary><br />
Haupt- und Vorsignalverbindung(en)<br />
<br />
</details>
</li>
<li><details><summary><b>Zs</b> := …</summary><br />
Zusatzsignal(e)<br />
<br />
</details>
</li>
<li><details><summary><b>Ts</b> := …</summary><br />
Signale für Schiebelokomotiven und Sperrfahrten<br />
<br />
</details>
</li>
<li><details><summary><b>Lf</b> := …</summary><br />
Langsamfahrtsignal(e)<br />
<br />
</details>
</li>
<li><details><summary><b>Sh</b> := …</summary><br />
Schutzhaltsignal(e)<br />
<br />
</details>
</li>
<li><details><summary><b>Gsp</b> := …</summary><br />
Gleissperrsignal(e)<br />
<br />
</details>
</li>
<li><details><summary><b>Ra</b> := …</summary><br />
Rangierdienst-Signal(e)<br />
<br />
</details>
</li>
<li><details><summary><b>Wn</b> := …</summary><br />
Weichensignal(e)<br />
<br />
</details>
</li>
<li><details><summary><b>Zp</b> := …</summary><br />
Signal(e) für das Zugpersonal<br />
<br />
</details>
</li>
<li><details><summary><b>El</b> := …</summary><br />
Fahrleitungssignal(e)<br />
<br />
</details>
</li>
<li><details><summary><b>Zg</b> := …</summary><br />
Signal(e) am/an Zug/Zügen<br />
<br />
</details>
</li>
<li><details><summary><b>Fz</b> := …</summary><br />
Signal(e) am/an Fahrzeug/en<br />
<br />
</details>
</li>
<li><details><summary><b>Ro</b> := …</summary><br />
Rottenwarnsignal(e)<br />
<br />
</details>
</li>
<li><details><summary><b>Ne</b> := …</summary><br />
Nebensignal(e)<br />
<br />
</details>
</li>
<li><details><summary><b>So</b> := …</summary><br />
Sonstige Signal(e)<br />
<br />
</details>
</li>
<li><details><summary><b>Bü</b> := …</summary><br />
Signal(e) an BahnübergängenC<br />
<br />
</details>
</li>
<li><details><summary><b>LZB</b> := …</summary><br />
Linienzugbeeinflussung<br />
<br />
</details>
</li>
<li><details><summary>Ein <b>Hektometer</b> ist …</summary><br />
… eine Maßeinheit für Längen (<em>hm</em>).<br />
<br />
Die Vorsilbe “Hekto‐“ stammt aus dem Griechischen<br />
und bedeutet “hundert“.<br />
<br />
Ein Hektometer entspricht <b>100 Metern</b>.<br />
</details>
</li>
<!--
<li><details><summary><b></b> := …</summary><br />
<br />
<br />
</details>
</li>
<li><details><summary><b></b> := …</summary><br />
<br />
<br />
</details>
</li>
<li><details><summary><b></b> := …</summary><br />
<br />
<br />
</details>
</li>
-->
</ol>
</body>
<footer>
<h3>Links:</h3>
<ul>
<li><a href=""
target="_blank" rel="noreferrer noopener">
Uwe Miethe :: Signale der deutschen Eisenbahnen</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</footer>
</html>
<html>
<ul>
<li>Während einigen Menschen Smalltalk ganz einfach über die Lippen geht, ist es für andere eine große Herausforderung. Eine Expertin teilt nun die Rettung: die 3-A-Regel.
</li>
<li>Mit der Verkäuferin beim Bäcker, dem neuen Praktikanten bei der Arbeit oder einem unbekannten Gesicht auf der Gartenparty der Nachbarn – ständig gibt es Momente im Alltag, in denen Smalltalk gefragt ist. Schönes Wetter heute, oder?, fragen wir dann zum Beispiel. Und hoffen, dass das Gespräch nicht nach einem entgegneten Ja, nicht wahr? beendet ist, sondern unserem Gegenüber weitere Fragen einfallen.
</li>
<li>Warum fällt uns Smalltalk bloß so schwer?
</li>
<li>Warum ist Smalltalk für einige so leicht, für andere aber die Hölle?
</li>
<li>Das kann tatsächlich an ganz verschiedenen Gründen liegen:
<ul>
<li>In der Regel können wir uns schlecht auf Smalltalk vorbereiten, weil wir nicht wissen, wie unser Gegenüber reagiert.
</li>
<li>Wir haben Angst davor, dass eine peinliche Stille entsteht.
</li>
<li>Smalltalk fühlt sich sehr oberflächlich und damit möglicherweise nach Zeitverschwendung an.
</li>
<li>Smalltalk ist wenig aufrichtig und passiert nur aus Nettigkeit – erneut: Zeitverschwendung.
</li>
<li>Das kurze Gespräch ist für manche eine Bühne, nur über sich selbst und ihre Erfolge zu sprechen.
</li>
<li>Wir haben möglicherweise keine Ahnung, was unser Gegenüber uns versucht zu sagen.
</li>
</ul>
</li>
<li><h3>Smalltalk ist dennoch wichtig</h3>
<ul>
<li>Trotz der beklemmenden Gefühle zeigen Forschungen jedoch: Smalltalk ist wichtig und gesund.
</li>
<li>Er hilft, neue Kontakte zu knüpfen, wir entdecken zum Beispiel schnell Gemeinsamkeiten.
</li>
<li>Er löst Vertrauen aus und vermittelt Sympathie.
</li>
<li>Und auch bestehende Beziehungen profitieren, indem sie vertieft werden.
</li>
<li>Manchmal kann Smalltalk sogar der Anfang eines sehr tiefgründigen Gesprächs sein.
</li>
<li>Ab jetzt einfach auf Smalltalk zu verzichten, scheint also nicht die Lösung zu sein.
</li>
<li>Stattdessen können wir aber Methoden ausprobieren, die uns diese Situationen erleichtern sollen – zum Beispiel die 3-A-Regel.
</li>
<li>
</ul>
</li>
<li><h3>Wie dir die 3-A-Regel beim Smalltalk hilft</h3>
<ul>
<li>Die amerikanische Kommunikationscoachin und ehemalige Nachrichtensprecherin von CBS, NBC und ABC, Vinita Nair, teilt heute auf ihrem TikTok-Account Tipps und Tricks, wie wir unser Auftreten und unsere Gespräche verbessern können — insbesondere an Frauen gerichtet.
</li>
<li>Es ist die A-A-A-Regel, die sich aus drei Bestandteilen zusammensetzt:
<ul>
<li>Answer (antworten)
</li>
<li>Add (hinzufügen)
</li>
<li>Ask (fragen)
</li>
</ul>
</li>
<li>Exemplarisch zeigt Nair, wie die 3-A-Regel funktioniert:
<ul>
<li>Werde sie auf einem Event gefragt, was sie nach New York brachte, reagiert sie in drei Teilen:
<ul>
<li>Zuerst antworte sie, dass sie 2008 für einen Reporter-Job nach New York gekommen ist.
<li>Dann füge sie hinzu, was sie danach gearbeitet hat.
<li>Und zuletzt würde sie zurückfragen, wie lange ihr Gegenüber schon in der Stadt lebt.
<ul>
</li>
<li>"Sehen Sie, wie das Gespräch in einen Flow kommt, wenn ich Informationen hinzufüge, aber gleichzeitig auch die andere Person etwas frage?
</li>
</ul>
</li>
<li>So hält man ein Gespräch am Laufen", resümiert die Kommunikationsexpertin.
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.brigitte.de/liebe/persoenlichkeit/3-a-regel--so-wird-smalltalk-endlich-einfach-14014116.html"
target="_blank" rel="noreferrer noopener">
Brigitte :: Wie dir die 3-A-Regel beim Smalltalk hilft</a>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>Was sind Sperrabfälle?</h3>
Sperrabfälle sind bewegliche Gegenstände aus Privathaushalten, die auf Grund ihrer Sperrigkeit, ihres Gewichtes oder ihrer Materialbeschaffenheit nicht in die Restabfallbehälter und -säcke passen.
</li>
<li><h3>Das sind keine Sperrabfälle:</h3>
Kleinteile, Glas, Elektroschrott, Baustellenabfälle, Gegenstände mit mehr als 75 kg Gewicht, Fahrzeugteile, Autoreifen, Wertstoffe, Flüssigkeiten, Farbeimer, Asbest, Betonteile, Dachpappe und Sonderabfälle.
</li>
<li><h3>Das holen wir für Sie ab:</h3>
Sperrabfallmengen bis zu 5 m³
Gegenstände bis zu 2 m Länge
einzelnen Gegenstände bis zu einem max. Gewicht von 75 kg
</li>
<li><h3>Bitte beachten Sie:</h3>
<ul>
<li>Stellen Sie Ihre angemeldeten Sperrabfälle bitte am Abholtag bis 6:00 Uhr morgens am Fahrbahnrand bereit.
</li>
<li>Schützen Sie sich vor unliebsamen Überraschungen: Zu früh heraus gestellte Sperrabfälle können über Nacht „wachsen“. Bitte reinigen Sie den Gehweg nach der Abholung.
</li>
<li>Achtung! Sperrabfallberge können für Radfahrer und Passanten gefährlich sein. Bitte so herausstellen, dass keine Verletzungsgefahr besteht.
</li>
</ul>
</li>
<br />
<li>Die angemeldeten Sperrabfälle stehen nicht direkt an der angegebenen Adresse zur Entsorgung bereit? Dann wenden Sie sich bitte telefonisch oder per E-Mail an unseren aha-Service unter 0800/999 11 99 oder service@aha-region.de! Vielen Dank.
</li>
<br />
<li>Stornierungen oder Änderungen Ihres Abhol-Auftrags sind online nicht möglich. Bitte wenden Sie sich in diesen Fällen telefonisch unter 0800/999 11 99 oder oder per E-Mail service@aha-region.de
an unseren aha-Service. Vergessen Sie nicht, Ihren vollständigen Namen, Anschrift und Abholungsort, den Abholtermin und Ihre Telefonnummer anzugeben.
<h3>Links:</h3>
<ul>
<li><a href="https://www.aha-region.de/abfaelle-und-wertstoffe/sperrabfaelle/sperrabfallabholung"
target="_blank" rel="noreferrer noopener">
aha - Region :: Sperrmüllabholung</a>
</li>
</ul>
</html>
<html>
<ul>
<li>1. Bundesliga:
<pre><code>wget https://www.sportschau.de/live-und-ergebnisse/iframe/spielplan-kompakt/co12/wh0</code></pre>
</li>
<li>2. Bundesliga:
<pre><code>wget https://www.sportschau.de/live-und-ergebnisse/iframe/spielplan-kompakt/co3/wh0</code></pre>
</li>
<li>enthalten die Mannschaftsnamen in Langform:
<pre><code><div class="team-name team-name-home"> </code></pre>
<pre><code><div class="team-name team-name-away"> </code></pre>
</li>
<li><pre><code><div class="match_meta match_meta-audiolivestream"></code></pre>
</li>
<li><pre><code>grep -E 'team-name-[home|away]' spieltag.txt</code></pre>
</li>
<li>vllt besser:
<ul>
<li>in vim:
<pre><code>:%s/\<div/^M\<div/g     <em># Zeilenumbrüche einfügen</em></code></pre>
</li>
<li><pre><code>grep -i match_meta-audiolivestream Fussball-Liga1.txt</code></pre>
</li>
</ul>
</li>
</ul>
</html>
<html>
<table>
<tr>
<td valign="top"><ul>
<li>Picture yourself as an indomitable power <br />
filled with positive attitude and faith that <br />
you are achieving your goals.<br />
<br />
<em>— Napolean Hill</em><br />
</li>
<br />
<li>A winner is a dreamer who never gives<br />
up.<br />
<br />
<em>— Nelson Mandela</em><br />
</li>
<br />
<li>Don't give up. Normally it is the last key <br />
on the ring which opens the door.<br />
<br />
<em>— Paulo Coelho</em><br />
<br />
</li>
<li>Investieren lässt Geld arbeiten.<br />
Der einzige Grund, Geld zu sparen,<br />
ist, Geld zu investieren.<br />
<br />
<em>— G. Cardone</em><br />
</li>
<br />
<li>Wenn man die Schwächen seines <br />
Gegners kennt, braucht man vor <br />
seinen Stärken keine Angst zu haben.<br />
<br />
<em>— J. Random</em><br />
</li>
<br />
<li>The difference between a successful person<br />
and others is not a lack of strength, not a lack<br />
of knowledge, but rather a lack in will.<br />
<br />
<em>— Vince Lombardi</em><br />
</li>
<br>
<li>IT'S THE will, NOT THE skill … <br />
<br />
<em>— Jim Bunney</em><br />
</li>
<br>
</li>
<li>The beautiful thing about learning is <br />
that nobody can take it away from you.<br />
<br />
<em>— unknown</em><br />
<br />
<li>Whatever we believe about ourselves <br />
and our ability comes true for us.<br />
<br />
<em>— Susan L. Taylor</em><br />
<br />
</li>
<li>There is no substitute for hard work.<br />
<br />
<em>— Thomas Edison</em><br />
<br />
</li>
<li>For success attitude is equally impor-<br />
tant as ability.<br />
<br />
<em>— Harry F.Bank</em><br />
<br />
</li>
</ul>
</td>
<td valign="top">
<ul>
<li>The secret of success is to do the common<br />
things uncommonly well.<br />
<br />
<em>— John D. Rockefeller</em><br />
<br />
</li>
<li>The more that you read, the more things <br />
you will know. <br />
The more that you learn, the more places <br />
you'll go.<br />
<br />
<em>— Dr. Seuss</em><br />
<br />
</li>
<li>We are what we repeatedly do.<br />
Excellence, then, is not an act,<br />
but a habit.<br />
<br />
<em>— Aristotle</em><br />
<br />
</li>
<li>Always bear in mind that your own <br />
resolution to success is more im–<br />
portant than any other one thing.<br />
<br />
<em>— Abraham Lincoln</em><br />
<br />
</li>
<li>You are exactly where you need to be.<br />
You are not behind.<br />
<br />
<em>— unknown</em><br />
<br />
</li>
<li>You don’t learn to walk by following rules. <br />
You learn by doing, and falling over.<br />
<br />
<em>— Richard Branson</em><br />
<br />
</li>
<li>There are times to stay put, and what<br />
you want will come to you, and there<br />
are times to go out into the world and<br />
find such a thing for yourself.<br />
<br />
<em>— Lemony Snicket</em><br />
<br />
</li>
<li>Study hard what interests you the<br />
most in the most undisciplined, ir-<br />
reverent and original manner pos-<br />
sible.<br />
<br />
<em>— Richard P. Feynman</em><br />
<br />
</li>
<li>If you really look closely, most over-<br />
night successes took a long time.
<br />
<em>— Steve Jobs</em><br />
<br />
</li>
</td>
<td valign="top">
<ul>
<li>Neither comprehension nor learning<br />
can take place in an atmosphere of<br />
anxiety.<br />
<br />
<em>— Rose Kennedy</em><br />
<br />
</li>
<li>One big reason for a winning attitude <br />
is that you will take the necessary <br />
steps and not quit when the going <br />
gets difficult.<br />
<br />
<em>— Don M.Green</em><br />
<br />
</li>
<li>You can’t go back and change the be-<br />
ginning, but you can start where you<br />
are and change the ending.<br />
<br />
<em>— C.S. Lewis</em><br />
<br />
</li>
<li>Glaube führt zur Tat, Konzentration zum <br />
Erfolg und Wiederholung zur Meisterschaft!<br />
<br />
<em>— Nikolaus B. Enkelmann (Motivationspapst)</em><br />
<br />
</li>
<li>Die Zukunft hängt davon ab, was DU <br />
heute tust.<br />
<br />
<em>— Mahatma Ghandi</em><br />
<br />
</li>
<li>You don’t understand anything until you <br />
learn it more than one way.<br />
<br />
<em>— Marvin Minsky</em><br />
<br />
</li>
<li>The most important thing to do in solving<br />
a problem is to begin.<br />
<br />
<em>— Frank Tyger</em><br />
<br />
</li>
<li>Neither comprehension nor learning can take<br />
place in an atmosphere of anxiety.<br />
<br />
<em>— Rose Kennedy</em><br />
<br />
</li>
<li>All you need is the plan, the road map, and <br />
the courage to press on to your destination.<br />
<br />
<em>— Earl Nightingale</em><br />
<br />
</li>
<li>The best way to guarantee a loss is to quit.<br />
<br />
<em>— Morgan Freeman</em><br />
<br />
</li>
<!--
<li><br />
<br />
<em>— </em><br />
<br />
</li>
<li><br />
<br />
<em>— </em><br />
<br />
</li>
-->
</ul>
</td>
</u>
</tr>
</table>
<ul>
<li><h4>Vom Regen in die Traufe kommen</h4>
<ul>
<li>Wer vom Regen in die Traufe kommt, der ist vom Pech verfolgt. Von einer üblen Situation gerät er in eine noch schlechtere.
</li>
<li>Wer heutzutage das Sprichwort "Vom Regen in die Traufe kommen" verwendet, ist sich der historischen Bedeutung kaum bewusst. Kein Wunder, denn die Redewendung hat bereits mehrere hundert Jahre auf dem Buckel: Sie ist seit dem 16./17. Jahrhundert in Europa gebräuchlich. Die Wurzeln des Sprichworts gehen sogar noch weiter zurück und lassen sich im Orient finden.
</li>
<li>Das Wort "Traufe" ist vielen nicht geläufig, Dabei ist die Bedeutung überraschend einfach. Als Traufe bezeichnet man den Abschluss eines Dachs (= "Tropfkante"). Das Wort leitet sich vom althochdeutsche "trouf" (= "triefen") ab.
</li>
<li>Regnet es auf ein Dach, sammelt sich das Wasser in der Traufe. Heutige Regenrinnen, die das Wasser kontrolliert abfließen lassen, waren in früheren Zeiten noch nicht üblich.
</li>
<li>Wer also bereits durch den Regen gelaufen war und dann Schutz unter einem Dach suchte, dem konnte es passieren, dass er von einem Schwall des angesammelten Wassers in der Traufe überrascht wurde.
</li>
<li>Somit folgt auf das eine Übel (Regen) gleich das nächste: Ein Wasserschwall aus der Traufe, der den Schutzsuchenden nun noch deutlich nasser werden lässt.
</li>
</ul>
<a href="https://praxistipps.focus.de/vom-regen-in-die-traufe-das-steckt-hinter-der-redewendung_123320"
target="_blank" rel="noreferrer noopener">
Focus Online :: Vom Regen in die Traufe: Das steckt hinter der Redewendung</a>
</li>
</ul>
</html>
<html>
<h3>Neid ist die höchste form der anerkennung?</h3>
<ul>
<li>Zitate von Wilhelm Busch - Der Neid ist die aufrichtigste Form der Anerkennung.
</li>
<li>Ist die höchste Form der Anerkennung?<br />
Nachahmung ist die höchste Form der Anerkennung.
</li>
<li>Wer keine Neider hat?<br />
Wer Neider hat, hat Brot, wer keine hat, hat Not.
</li>
<li>Wo Erfolg ist ist auch Neid?<br />
Neid ist der Schatten, den der Erfolg wirft. In Deutschland ist die höchste Form der Anerkennung der Neid. Der Neid ist die aufrichtigste Form der Anerkennung. Erfolg zieht so viel Hass an.
</li>
<li>Wie heißt der Spruch Neid muss man sich erarbeiten?<br />
Mitleid gibt es gratis, aber Neid muss man sich hart erarbeiten. Sprüche zitate, Weisheiten sprüche, Neid.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://alleantworten.de/neid-ist-die-hoechste-form-der-anerkennung"
target="_blank" rel="noreferrer noopener">
alleantworten :: Neid ist die höchste form der anerkennung?</a>
</li>
</ul>
</html>
<html>
<code><pre>
<!doctype html>
<html>
<head>
<title></title>
<style>
code {
font-family: Consolas,"courier new";
font-size: 95%;
color: red;
background-color: #f1f1f1;
padding: 2px;
}
</style>
</head>
<body>
<table>
<tr>
<td width=30 >
</td>
<td>
<h1></h1>
<b>Stand: 2024</b><br />
<ul>
<li><details><summary><b></b></summary><br />
<br />
</details>
</li>
<li><details><summary><b></b></summary><br />
<br />
</details>
</li>
<!––
<li><details><summary><b></b></summary><br />
<br />
</details>
</li>
<li><details><summary><b></b></summary><br />
<br />
</details>
</li>
<li><details><summary><b></b></summary><br />
<br />
</details>
</li>
<li><details><summary><b></b></summary><br />
<br />
</details>
</li>
<li><details><summary><b></b></summary><br />
<br />
</details>
</li>
––>
</ul>
</td>
</tr>
</table>
<!––
<table style="background: #f1f1f1;" width=500 >
<tr>
<td>
</td>
</tr>
</table>
––>
</body>
<footer>
<h3>Links:</h3>
<ul>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<!––
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
––>
</ul>
</footer>
<pre>
<br /> <br /> <br /> <br /> <br />
</pre>
</html></pre></code>
</html>
<html>
<pre><code>Gütiger Gott,
lass deine Gnade mächtig werden
in unseren Herzen,
damit wir imstande sind,
unser eigenes Begehren zu meistern
und den Anregungen deines Geistes zu folgen.
Darum bitten wir durch Jesus Christus. </code></pre>
<h3>Links:</h3>
<ul>
<li><a href="https://www.erzabtei-beuron.de/schott/register/jahreskreis/schott_anz/index.html?file=jk05%2FMittwoch.htm"
target="_blank" rel="noreferrer noopener">
Erzabtei Beuron :: Tagesgebet</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</li>
-->
</ul>
</html>
<html>
<ul>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>[1] <a href="</li>https://www.gov.uk/guidance/apply-for-an-electronic-travel-authorisation-eta"
target="_blank" rel="noreferrer noopener">
GOV.UK :: Guidance - Apply for an electronic travel authorisation (ETA) </a>
</li>
<li>[2] <a href="https://uk-eta.de/uk-eta-foerderfaehigkeit/die-uk-eta-fuer-deutsche-staatsbuerger-alles-was-sie-wissen-sollten/"
target="_blank" rel="noreferrer noopener">
UK ETA :: Die UK ETA für deutsche Staatsbürger: Alles, was Sie wissen müssen </a>
</li>
<li>[3] <a href="https://www1.wdr.de/nachrichten/visum-gb-eta-100.html"
target="_blank" rel="noreferrer noopener">
WDR :: ETA-Abzocke: Was ihr bei Reisen nach Großbritannien beachten müsst</a>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>
21.04.2025, 08:00
3 Min.
Ob Schwarzmalerei, Lästern oder verbale Angriffe – wenn wir einmal in einem heiklen Dialog feststecken, kann es schwer sein, einen Ausweg zu finden. Der Therapeut und Anwalt Bill Eddy empfiehlt, sich in solchen Situationen an diese zwei Schritte zu halten.
Gespräche und soziale Interaktionen können völlig überraschend und blitzschnell unangenehm werden: Eine harmlose Anekdote über ein nicht zugestelltes Paket veranlasst das Gegenüber dazu, sich über den Niedergang der Welt auszulassen und über die Politik und die Unordnung in unserem Land zu verzweifeln, die es früher so niemals gegeben hätte. Ein Wiedersehen nach längerer Zeit kann eine Seite als die perfekte Gelegenheit empfinden, der anderen sofort sämtliche Vorwürfe an den Kopf zu werfen, die sich über die Monate in ihrer Vorstellung angesammelt haben. Oder unser:e Gesprächspartner:in hält es für selbstverständlich, dass uns ihre Meinung über die vermeintlich unfähigen Kolleg:innen, Vorgesetzten oder sonst jemanden interessiert. Wahrnehmungen können sehr unterschiedlich sein und so geraten wir immer wieder in soziale Situationen, in denen wir uns unwohl fühlen mit dem Verhalten, das andere als richtig und angemessen erachten. Wenn wir für solche Situationen eine Standardstrategie hätten, mit der wir darauf reagieren, könnte uns das erheblich entlasten, gegebenenfalls die eine oder andere Auseinandersetzung oder Verlegenheit ersparen.
Unangenehmes Gespräch? Experte empfiehlt zwei simple Schritte
Bill Eddy ist Anwalt und Therapeut und arbeitet als Mediator am National Conflict Resolution Center in San Diego – und er hat eine solche Strategie. In einem Beitrag für das Online-Magazin "Psychology Today" empfiehlt er, folgende zwei (eigentlich viel zu einfach wirkenden) Schritte einzuleiten, wenn ein Gespräch in eine negative, uns bedrückende Richtung läuft und wir es nicht umlenken oder konstruktiv beeinflussen können.
Eine Warnung aussprechen
Laut Bill Eddy können wir uns angewöhnen, unserem Gegenüber mit einer Warnung zu signalisieren, dass wir uns mit dem Gespräch unwohl fühlen und nicht dazu bereit sind, es in dieser Weise fortzusetzen. Zum Beispiel könnten wir sagen: "Mama, wenn du dich weiter über die ganze Welt beschweren und dich darüber aufregen möchtest, wie furchtbar alles ist, werde ich gleich aufstehen und gehen, dafür habe ich keine Zeit." Oder: "Sofern du nur mit mir sprechen möchtest, um mich anzugreifen, werde ich das Gespräch und unser Treffen an dieser Stelle beenden."
Mit einer solchen Warnung allein erreichen wir zwar in einigen Fällen erst einmal gar nichts, gegebenenfalls fühlt sich unser Gegenüber dadurch spontan sogar beleidigt oder unverstanden, doch zumindest reagieren wir auf unsere eigene Wahrnehmung und unser Gefühl. Wir verschaffen uns Erleichterung und werden uns selbst gerecht – und letztlich ist es für unsere:n Gesprächspartner:in fair, ihr:ihm unseren Standpunkt mitzuteilen. Und ihn:sie auf unseren nächsten Schritt vorzubereiten.
Das Gespräch beenden
Sofern unser Gegenüber nach unserer ausdrücklichen Warnung nicht umschwenkt, ist es an der Zeit, sie wahr zu machen. Bill Eddy empfiehlt dazu einen begleitenden Satz wie: "Wie ich sehe, hast du entschieden, dass ich das Gespräch beenden soll. Melde dich, wenn du es in zivilisierter Weise fortführen möchtest." Diesen Worten können wir einen Abschied anschließen und gehen oder auflegen.
Bei dem nächsten Kontakt mit der betreffenden Person sei es nicht unbedingt nötig, das letzte Auseinandergehen anzusprechen oder zu thematisieren, stattdessen sei es wichtig, dass wir uns darum bemühen, ihr offen und unbefangen zu begegnen und eine neue Chance zu geben. Sollte sie wieder in eine ähnliche Bahn geraten wie beim letzten Mal, sei erneut eine Warnung angebracht – die basierend auf Bill Eddys Erfahrung oft schon eine deutlich stärkere Wirkung zeigt, wenn wir zuvor einmal ein Gespräch mit dieser Person beendet haben.
Was sind die Vorteile dieser Vorgehensweise?
In unangenehmen Gesprächen diese zwei von Bill Eddy empfohlenen Schritte anzuwenden, erscheint so naheliegend und einfach, dass sie schon wieder abwegig sind und viele Menschen kaum von selbst darauf kommen würden – weder mitten in einer Situation noch wenn wir über unsere theoretischen Optionen nachdenken. Deshalb kann es hilfreich und nützlich sein, uns bewusst zu machen, dass es diese Möglichkeit, diese Vorgehensweise überhaupt gibt.
Tendenziell erwarten wir von uns, dass wir in der Lage sind, Menschen zu beruhigen, wenn sie sich aufregen, oder ihnen eine gesündere Sichtweise aufzuzeigen, wenn sie schwarzmalen, oder uns mit ihnen zu vertragen und Frieden zu schließen, wenn sie uns angreifen. Das gelingt uns aber nicht immer, schließlich sind erstens die wenigsten von uns Mediator:innen und zweitens können wir das Verhalten anderer grundsätzlich nicht zuverlässig beeinflussen oder steuern. Insofern ist die Variante, uns aus einer Gesprächssituation herauszunehmen, legitim und kann manchmal unsere klügste Option sein. Wir tun damit niemandem weh, vermeiden Eskalationen und zeigen deutlich unsere Grenzen auf. Für einige dürfte es eine Überwindung sein, sich so zu verhalten: Eine Warnung auszusprechen und schließlich ein Gespräch radikal abzubrechen, entspricht nicht unbedingt den Gewohnheiten und Rollen, die wir im Alltag pflegen und mit denen wir uns wohlfühlen. Gelegentlich lohnt es sich allerdings, aus den eingespielten Rollen auszuscheren – besonders wenn sie uns immer wieder in eine Sackgasse führen.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.brigitte.de/liebe/persoenlichkeit/psychologie--so-beendest-du-unangenehme-gespraeche-in-2-schritten-13976998.html"
target="_blank" rel="noreferrer noopener">
Brigitte :: Psychologie - Wie du unangenehme Gespräche in zwei Schritten beendest
</ul>
</html>
<html>
<ul>
<li><b>Sardinen:</b><br />
<ul>
<li>max. 27 cm lang
</li>
<li>sind rundlicher als Sardellen
</li>
<!--
<li>
</li>
-->
</ul>
</li>
<li><b>Sardellen:</b><br />
<ul>
<li>auch: Anchovis
</li>
<li>max. 20 cm lang
</li>
<li>sind schlanker als Sardinen
</li>
</ul>
</li>
</ul>
<!--
<h3>Links:</h3>
<ul>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
</ul>
-->
</html>
<html>
<ul>
<li><h3>Hintergrundfarbe:</h3>
<ul>
<li>Rot: 43
</li>
<li>Gelb: 89
</li>
<li>Blau: 139
</li>
<li>Hex: 2b598b
</li>
</ul>
</lI>
<li><h3>Format:</h3>
<ul>
<li>85 mm x 55 mm
</li>
</ul>
</ul>
</html>
<html>
<ul>
<li>Eine Frage am Ende des Interviews enthüllt die wahren Unternehmenswerte. Sie überrascht Manager und sorgt dafür, dass sie auf einmal Klartext sprechen.
</li>
<li>Vorstellungsgespräche sind keine Einbahnstraße. Bewerber und Unternehmen sollten sich ehrlich darstellen und kennenlernen. Das heißt, Kandidaten können auch Fragen zu ihrem neuem Arbeitgeber stellen.
</li>
<li>Die CEO, Autorin und Dozentin Suzy Welch verrät gegenüber CNBC eine Frage, die Sie in jedem Vorstellungsgespräch stellen sollten. Sie bringe auch die routiniertesten Chefs dazu, ihre wahren Wünsche und Werte zu verraten: „Welche Art von Person sollte nicht bei diesem Unternehmen arbeiten?“
</li>
<li>Oft entsprechen die behaupteten Werte nicht dem wirklichen Arbeitsklima
</li>
<li>Laut Welch überwindet diese Frage die meisten Standardantworten. Im Rahmen von Bewerbungsgesprächen offenbart sie ehrliche und oft unbequeme Wahrheiten über Unternehmenswerte. Die Dozentin berichtet dem Sender von einigen Antworten, die ihre Studenten in Job-Interviews auf diese Frage erhielten:
<ul>
<li>„Eine Person, die nicht am Wochenende arbeiten will.“
<li>„Menschen, die zu sozial sind.“
<li>„Übermäßige Political Correctness kommt hier nicht wirklich gut an.“
</ul>
</li>
<li>Oft schreiben sich Unternehmen Werte auf die Fahnen, um für junge Bewerber überhaupt infrage zu kommen. Die Antworten ihrer Studenten weisen laut Welch auf eine Diskrepanz zwischen den schönen Worten in der Broschüre, „Work-Life-Balance, Community und Toleranz“, und der Realität am Arbeitsplatz hin. Die Karriere-Expertin rät allerdings dazu, diese Frage erst am Ende des Interviewprozesses zu platzieren, idealerweise nach einem Angebot. Dies minimiert das Risiko, dass die überraschende Frage defensives Verhalten auslöst.
</li>
<li>Laut Suzy Welch kennen nur sieben Prozent der Arbeitnehmer ihre Karriere-Werte
</li>
<li>Tipps für Bewerber: 90 Sekunden entscheiden
</li>
<li>Oftmals stehen in Bewerbungsgesprächen aber die Kandidaten unter Druck. Sie müssen aus der Masse herausstechen und ihr Gegenüber schnell überzeugen. Laut Michael Chad Hoeppner, Professor an der Columbia Business School, haben Bewerber 90 Sekunden, um Interesse zu wecken und einen bleibenden Eindruck zu hinterlassen.
</li>
<li>Der Experte rät dazu, Antworten mit klaren, bildhaften Anekdoten zu beginnen – so bleiben sie besser im Gedächtnis.
</li>
<li>Außerdem wenden HR-Profis immer wieder geheime Tests und Tricks an:
<ul>
<li><b>Begrüßung:</b><br />
Bereits bei der Begrüßung achten Personaler auf Hierarchie und respektvollen Umgang. Ein fester Händedruck und Augenkontakt sind entscheidend. Dabei sollte aber die Führungskraft die Initiative haben.
</li>
<li><b>Wasserglas-Test:</b><br />
Manche Arbeitgeber beobachten das Trinkverhalten der Bewerber. Normales Trinken signalisiert Selbstbewusstsein, übermäßiges Trinken hingegen fehlende Selbstkontrolle. Wichtig ist auch, ob verschüttetes Wasser aufgewischt wird.
</li>
<li><b>Lieblingsfrage: </b><br />
CEO Gary Shapiro fragt Kandidaten, wann sie anfangen können. Wer einen zu frühen Termin nennt, weise damit auf mangelnde Loyalität hin.
</li>
<li><b>Kaffeetassen-Test: </b><br />
CEO Trent Innes achtet darauf, ob Bewerber ihre leere Tasse nach dem Gespräch zurückbringen. Wer dies nicht tut, wird nicht eingestellt. Damit will er ihr Verantwortungsbewusstsein testen.
</li>
<li><b>Business-Lunch: </b><br />
Beim gemeinsamen Essen wird das Verhalten der Bewerber weiter analysiert. Ungeduld und voreilige Entscheidungen zeigen sich, wenn das Gericht sofort nachgewürzt wird.
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.focus.de/finanzen/karriere/ceo-verraet-die-nummer-1-frage-die-jeder-im-bewerbungsgespraech-stellen-muss_d7e09527-f69a-42a8-bd1c-d9ffdf41d154.html"
target="_blank" rel="noreferrer noopener">
Focus :: CEO verrät die Nummer-1-Frage, die jeder im Bewerbungsgespräch stellen sollte</a>
</li>
</ul>
</html>
<html>
<meta Haushalt />
<ul>
<h3>Einführung</h3>
<ul>
<li>Das WC zu reinigen, ist aus hygienischen Gründen regelmäßig nötig. Dazu brauchst du keine aggressiven und teuren Reinigungsmittel. Wir zeigen dir, wie du deine Toilette mit Hausmitteln putzen kannst.
</li>
<li>Die Toilette zu putzen, gehört sicherlich nicht zu den angenehmsten Tätigkeiten im Haushalt. Dennoch solltest du regelmäßig das WC reinigen, damit du den Urinstein und schlechte Gerüche loswirst. Dafür brauchst du weder Spezialreiniger noch aggressive chemisch-synthetische Reinigungsmittel. Viele dieser Scheuermittel beziehungsweise Chemikalien können schädlich sein, da sie die Oberfläche der Toilette zerkratzen oder anderweitig schädigen, anstatt nur das WC zu reinigen. Mit vielen Hausmitteln kannst du ordentlich putzen und dabei auch noch Geld sparen.
</li>
</ul>
<h3>Tipp 1: WC reinigen mit Essig</h3>
<ul>
<li>Mit Essigessenz kannst du Kalkablagerungen in der Toilette entfernen.
Essigessenz oder weißer Tafelessig gelten als natürliche Desinfektionsmittel, deren Säure Kalkablagerungen zuverlässig löst. Um mit Essig dein WC zu reinigen, schütte einfach etwas Essigessenz in die schmutzige Toilette, lass sie rund 30 Minuten einwirken, putze mit der Bürste die Innenwände und spüle dann mit Wasser nach.
Solltest du stark verschmutzte Stellen auf oder an der Unterseite der Klobrille haben, dann gib je nach Größe des Flecks etwa zwei Esslöffel Essigessenz auf ein Tuch und verteile es darauf. Lass den Essig auch in diesem Fall rund eine halbe Stunde einwirken, ehe du die Stellen mit Wasser abwäschst. Bei sehr hartnäckigen Verschmutzungen kann es sinnvoll sein, wenn du das Mittel über Nacht einwirken lässt.
</li>
</ul>
<h3>Tipp 2: Mit Natron Urinstein entfernen</h3>
<ul>
<li>In Kombination mit anderen Hausmitteln kann Natron das WC reinigen.
In Kombination mit anderen Hausmitteln kann Natron das WC reinigen. (Foto: CC0 / Pixabay / Monfocus)
Manchmal reicht Essig nicht aus, um starke Verschmutzung aufzulösen. Solltest du damit keinen Erfolg haben, benötigst du noch ein anderes Hausmittel, um das WC zu reinigen: Natron. Du kannst Natronpulver mit Essig kombinieren und so selbst starke Verschmutzungen entfernen. Die chemische Reaktion der beiden Hausmittel löst hartnäckige Ablagerungen. Schrubbe nach etwa zehn bis 15 Minuten Einwirkzeit mit der Klobürste die Verkrustungen ab und spüle mit Wasser nach.
Tipp: Bei hartnäckigen Ablagerungen helfen dir auch selbstgemachte Reinigungstabs aus Zitronensäure und Natron. Wie du so einen kraftvollen WC-Reiniger selber machst, erklären wir dir in einer ausführlichen Anleitung. Du kannst auch eine DIY-Toiletten-Bombe herstellen, indem du Essig, Natron, Zitronensäure und Spülmittel mit heißem Wasser kombinierst. In einem anderen Beitrag zeigen wir dir, welche Mittel du sonst noch anwenden kannst, um Urinstein zu entfernen.
</li>
</ul>
<h3>Tipp 3: Gebissreiniger wirken stark gegen Kalk</h3>
<ul>
<li>Sind die Ablagerungen im WC schwer erreichbar, weil sie sich beispielsweise direkt beim Abflussrohr befinden? Dann solltest du erwägen, einen Gebissreiniger einzusetzen, um das WC zu reinigen. Verwende dazu einfach eine Tablette und wirf sie in deine Toilette. Nach einer Einwirkzeit von etwa 15 Minuten kannst du die Spülung betätigen, sodass keine Rückstände zurückbleiben.
</li>
</ul>
<h3>Tipp 4: Waschmittel wirkt bei Toilettenschmutz</h3>
<ul>
<li>Auch mit Waschmittel lässt sich eine Toilette putzen.
Möchtest du ein stark verschmutztes WC reinigen, kannst du auch auf Waschmittel zurückgreifen. Besonders Waschpulver für Weißwäsche erweist sich bei Kalkablagerungen und anderen Rückständen als hervorragendes Mittel. Die darin enthaltenen Tenside lösen die Schmutzpartikel auf, sodass deine Toilette wieder blitzsauber wird. Lass das Waschmittel am besten über Nacht einwirken. Kippe dafür etwa eine halbe Tasse Waschmittel in die Toilettenschüssel.
</li>
</ul>
<h3>Tipp 5: Toilette reinigen mit der Bürste</h3>
<ul>
<li>Die wohl bekannteste Möglichkeit, das WC zu reinigen, ist die bewährte Bürste. Der Umwelt zuliebe greifst du am besten auf eine nachhaltige Holzbürste zurück, um dein Klo zu putzen. Auch die Bürste solltest du einmal wöchentlich reinigen. Wie das funktioniert, liest du hier: So kannst du deine Klobürste hygienisch reinigen.
Verwende die Klobürste möglichst nach jedem „größeren“ Toilettengang, um Verschmutzungen am Rand zu entfernen, bevor sie sich festsetzen. Auch bei schwer zugänglichen Stellen kannst du dir mit einer solchen Bürste behelfen. Gut geeignet ist auch eine alte Zahnbürste, deren Borsten du mit Essig oder einem anderen Reinigungsmittel benetzt. Damit kannst du die Ablagerungen unter den Toilettenrändern wirksam entfernen.
</li>
</ul>
<h3>Tipp 6: Seifenlauge bekämpft Bakterien</h3>
<ul>
<li>Verwende am besten zwei verschiedene Lappen, um das WC zu reinigen.
Zu guter Letzt solltest du natürlich auch Toilettendeckel und -brille putzen. Nutze dazu am besten eine milde Seifenlauge, die die Haut nicht reizt. Trage sie auf die Toilettenbrille auf und wasche sie anschließend mit einem weichen, sauberen Lappen ab.
Achtung: Um das WC zu reinigen, solltest du nach Möglichkeit zwei Lappen verwenden: Einen für die „Oberflächen“, sprich die Toilettenbrille und den Deckel sowie die Außenseite der Keramikschüssel, den anderen für die Innenseite der Kloschüssel (falls du diesen Bereich nicht ausschließlich mit der Klobürste putzt). Das verhindert, dass Bakterien aus der Schüssel auf die Klobrille oder den Deckel gelangen. Nutze Materialien, die du problemlos in der Waschmaschine bei 60 Grad Celsius waschen kannst. Damit du die Lappen nicht vertauschst, sollten sie unterschiedliche Farben haben.
Toilettendeckel schließen beim Spülen kann der Verbreitung von Keimen vorbeugen
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://utopia.de/ratgeber/wc-mit-hausmitteln-reinigen-6-tipps-zum-kloputzen_251600/"
target="_blank" rel="noreferrer noopener">
Utopia - Ratgeber :: WC mit Hausmitteln reinigen: 6 Tipps zum Kloputzen</a>
</li>
</ul>
</html>
<html>
<ul>
<li>Normales Backpulver besteht überwiegend aus Natrium–<br />
hydrogencarbonat - kurz: Natron - oder Kaliumhydrogen–<br />
carbonat (E 501), kombiniert mit dem Säuerungsmittel <br />
Phosphat und einem Trennmittel.
</li>
<li>Eine Alternative dazu ist Weinstein-Backpulver, bei dem<br />
das Phosphat durch natürlichen Weinstein, das Salz der<br />
Weinsäure, ersetzt wird. Dieser entsteht bei der Produk–<br />
tion von Wein, Sekt und Prosecco.
</li>
<li>Weinstein-Backpulver ist in der Regel etwas teurer als<br />
herkömmliches Backpulver.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.ndr.de/ratgeber/kochen/zutaten/Weinstein-Backpulver,zutat904.html"
target="_blank" rel="noreferrer noopener">
NDR – Kochen :: Weinstein–Backpulver</a>
</li>
</ul>
</html>
<html>
<ul>
<li>ist ein Nadelbaum;</li>
</ul>
</html>
<html>
<meta Digital Cloud Training Bootcamp />
<body>
<table border="1">
<tr style="background: #f1f1f1;">
<th align="center">USA /<br />
Florida
</th>
<th align="center">Deutschland / <br />
Frankfurt [<em>UTC</em>]
</th>
</tr>
<tr>
<td>12:00 pm ET (<em>noon</em>)
</td>
<td>18:00 MEZ
</td>
</tr>
<tr>
<td>01:00 pm ET
</td>
<td>19:00 MEZ
</td>
</tr>
<tr>
<td>02:00 pm ET
</td>
<td>20:00 MEZ
</td>
</tr>
<tr>
<td>03:00 pm ET
</td>
<td>21:00 MEZ
</td>
</tr>
<tr>
<td>06:00 pm ET
</td>
<td>24:00 MEZ
</td>
</tr>
<tr>
<td>09:00 pm ET
</td>
<td>03:00 MEZ
</td>
</tr>
<tr>
<td>12:00 am ET (<em>midnight</em>)
</td>
<td>06:00 MEZ
</td>
</tr>
</table>
</body>
<footer>
<h3>Links:</h3>
<ul>
<li><a href="https://www.timeanddate.de/uhrzeit/am-pm-bedeutung"
target="_blank" rel="noreferrer noopener">
timeanddate :: AM und PM – Bedeutung</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</footer>
<br />
</html>
<html>
<ul>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://unternehmen.focus.de/wegzugsbesteuerung.html"
target="_blank" rel="noreferrer noopener">
Focus Online :: Wegzugsbesteuerung: Ab ins “Steuerparadies Schweiz“ — trotz deutscher Wegzugsbesteuerung? </a>
</li>
<li><a href="https://www.focus.de/finanzen/steuern/steuer-mauer-auswandern-um-steuern-zu-sparen-ab-2022-nicht-mehr-so-einfach_id_23076075.html"
target="_blank" rel="noreferrer noopener">
Focus Online :: Ab 2022 gilt eine neue Steuer-Mauer — Auswandern ist dann nicht mehr so einfach </a>
</li>
<li><a href="https://www.roedl.de/themen/wegzug-aus-deutschland-besteuerung/exit-besteuerung-privatperson-aufenthaltsort-grundsatz"
target="_blank" rel="noreferrer noopener">
Rödl & Partner :: Wegzugs– bzw. Exit-Besteuerung bei einer Privatperson: Definition und Voraussetzungen </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ol>
<li>Im Tablet über “Info zu Tablet“ in den Bereich<br />
“Softwareinformationen“ wechseln.
</li>
<li>Hier mehrmals (7-8 mal) auf den Eintrag “Build‐<br />
nummer“ tippen. Es wird ein Countdown ange‐<br />
zeigt, und am Ende wird einem mitgeteilt, dass<br />
man den “Enwicklermodus“ erreicht habe.
</li>
<li>Dann wird man aufgefordert, sein Passwort ein‐<br />
zugeben.
</li>
<li>Nach der Eingabe wird man informiert, dass der<br />
“Enwicklermodus“ aktiviert wurde.
</li>
<li>Dann wechselt man dann auf die Eingangsseite<br />
der “Einstellungen“ und sieht am unteren Ende<br />
einen weiteren Eintrag, “Enwickleroptionen“
</li>
<li>Als Letztes muss noch das “USB-Debugging“ <br />
aktiviert werden. Hierzu wechselt man in den<br />
Bereich “Entwickleroptionen“, scrollt nach un‐<br />
ten, in den Bereich “Debugging“ und durch das<br />
Schieben des Reglers am Eintrag “USB-Debug‐<br />
ging (Debugmodus bei Anschluss über USB)“<br />
wird das USB-Debugging aktiviert.
</li>
<li>Das Ausschalten der Entwickleroptionen erfolgt<br />
auf derselben Seite mit dem Schieberegler am<br />
oberen Seitenende.
</li>
</ol>
Basis / Hilfe war der Artikel "<a href="https://www.android-user.de/entwickleroptionen-freischalten-und-usb-debugging-aktivieren-adb-zugriff/
" target="_blank" rel="noreferrer noopener">Android User :: Entwickleroptionen freischalten, USB-Debugging aktivieren und Zugriff per ADB</a>".
</html>
<html>
<h2>1. Einleitung</h2>
User Definable Fields sind ein mächtiges Werkzeug, um Murex auf die Bedürfnisse<br>
des Kunden anzupassen, oder neudeutsch: zu customizen.<br>
<br>
Mit Ihnen können Daten gespeichert werden, die Murex so nicht vorgesehen hat.<br>
Als typischstes Beispiel können wohl Daten aus Schnittstellen zu anderen<br>
Systemen genannt werden, so bspw. eine ID aus einem liefernden System. Kommen<br>
also Deals aus einem anderen System (Kondor+, Imagine etc.), so kann man nicht<br>
nur in der external ID von Murex die ID des Fremdsystems speichern, sondern auch<br>
eben in einem UDF.<br>
<br>
Manchmal werden die Felder aber auch manuell gepflegt und dann ist es schön,<br>
wenn man die Felder mit gewissem Komfort aufsetzt, bspw. als Dropdown-Feld, bei<br>
dem nur gewisse Einträge zur Verfügung stehen; das erhöht auch die<br>
Datenqualität, weil Tippfehler ausgeschlossen werden.<br>
<br>
Deshalb wird hier nach ein paar weiteren Grundlagen zunächst ein einfaches<br>
Textfeld als UDF aufgesetzt, dann ein Listenfeld.<br>
<br>
<h3>1.1 Elemente</h3>
In einer 2.11er Config-Session sieht das
Menü unter Data --> User definable tables so aus:<br>
<br>
<img src="./pictures/pic-UDF-1.png" alt="">
<br>
<h4>1.1.1 Structures</h4>
Hier werden die Datenstrukturen, dh. die eigentlichen Datentabellen
definiert.<br>
<h4>1.1.2 Lists</h4>
Hier werden Listen (Einträge ?) für Dropdown-Felder definiert.<br>
<h4>1.1.3 Links</h4>
Hier werden Zuordnungen von Layouts der Structures zu den Masken in einer<br>
Enduser-Session definiert.<br>
<h4>1.1.4 Rules</h4>
Hier kann man sogenannte Consistency Rules definieren. Das sind Regeln,die<br>
festlegen, dass oder wie bestimmte Felder ausgefüllt werden sollen.<br>
<h4>1.1.5 Adapt data models & Verify configuration</h4>
Mit Adapt data models speichert man die vorgenommenen Definitionen/Änderungen<br>
und erst danach sind sie in einer Enduser-Session verfügbar <br />
1. Der andere Eintrag ist wohl selbsterklärend.<br>
<br>
<h3>1.2 Daten und Layout</h3>
Murex ist bei der Definition der UDFs sogar so flexibel, dass es zwischen
den<br>
eigentlichen Daten und deren Darstellung unterscheidet. So kann man 20
Felder<br>
definieren und sie gleichzeitig auf zig verschiedene Arten
anzeigen/bearbeiten.<br>
Dazu mehr in den Beispielen.<br>
<br>
<h2>2. Einfaches Textfeld</h2>
Wie oben erwähnt, erstellt man ein UDF in einer Config-Session2 unter
Data --><br>
User definable tables --> Structures:<br>
<br>
<img src="./pictures/pic-UDF-2.png" alt="">
<br>
Auf dieser Ebene definiert man die Tabellen, nicht die Felder. Diese
Tabellen,<br>
oder eben "structures"
können dann mehrere Felder aufnehmen und bestimmten<br>
Objektklassen wie Trades, Market Operations, Counterparties zugeordnet
werden.<br>
<br>
<h4>2.1 Structure definieren</h4>
Als Beispiel wollen wir eine Tabelle anlegen, die Felder
für Trades enthält und<br>
bspw.später für eine Import-Schnittstelle von Kondor die ID zu
speichern. Dazu<br>
legen wir eine Structure "Trades"an:<br>
<br>
<img src="./pictures/pic-UDF-3.png" alt="">
<br>
Auf der linken Seite definieren wir nun die Felder dieser Tabelle, rechts<br>
definieren wir die Layouts.<br>
<br>
<h4>2.2 Feld definieren</h4>
Also definieren wir zunächst das Feld KONDOR_ID:<br>
<br>
<img src="./pictures/pic-UDF-4.png" alt="">
<br>
Durch die Angabe von "Manual" als "Entry type" wird dieses Feld zu
einem reinen<br>
Textfeld.<br>
<br>
<h4>2.3 Layout definieren</h4>
Damit das Feld später auch angezeigt wird, muss ein Layout definiert
werden. Wir<br>
definieren hier einfach nur ein einziges Layout, da alle Felder, die hier<br>
angegeben sind, auch angezeigt werden sollen:<br>
<br>
<img src="./pictures/pic-UDF-5.png" alt="">
<br>
Unser Layout kann nun 2 Spalten und 12 Zeilen aufnehmen, was auch die
Maske<br>
zeigt, wenn man auf "Edit" klickt:<br>
<br>
<img src="./pictures/pic-UDF-6.png" alt="">
<br>
Um eine Zeile im Layout zu definieren, geht man in das Feld und
drückt die<br>
Leertaste. Damit gelangt man zur "Layout Item Defintion":<br>
<br>
<img src="./pictures/pic-UDF-7.png" alt="">
<br>
über die Auswahlliste "type" wählt man, ob man einen Title, also
einen<br>
sprechenden Text, ein Label oder ein Feld eingeben möchte.<br>
<br>
Oben ist der Title ausgewählt. Hier kommt nun das Feld:<br>
<br>
<img src="./pictures/pic-UDF-8.png" alt="">
<br>
(Auf die Zeile "line/column" achten:<br>
in Form einer Matrix werden die Einträge vorgenommen. Dh an Position
(0/0) kommt<br>
der Schriftzug "Kondor ID:", an Position (0/1) wird die
spätere ID zu sehen<br>
sein, die sich hinter dem "Feld-Namen" KONDOR_ID versteckt.)<br>
<br>
Das macht man mit allen Feldern und abschliessend kann man über
"view" das<br>
produzierte Layout ansehen:<br>
<br>
<img src="./pictures/pic-UDF-9.png" alt="">
<br>
Hinweis: Wie man sieht, werden alle nicht definierten Zeilen im Layout (es
waren<br>
ja 12 Zeilen angesetzt) unterdrückt. Man muss also nicht unbedingt
die passende<br>
Zeilenzahl wählen, sondern kann die gross dimensionieren.<br>
<br>
<h4>2.4 Link definieren</h4>
Unter Links definiert man nun, welches Business Object diese
selbstdefinierte<br>
Struktur nutzen soll, in unserem Falle die Trades:<br>
<br>
<img src="./pictures/pic-UDF-10.png" alt="">
<br>
Hier sieht man, dass den Deals der Klasse EQD die Struktur "Trades"
zugeordnet<br>
ist. D.h., dass bei Eingabe von Trades in einer Enduser-Session diese
Felder<br>
angezeigt werden, die wir soeben definiert haben:<br>
<br>
<img src="./pictures/pic-UDF-11.png" alt="">
<br>
Man kann jetzt auch noch für verschiedene Unterklassen von "Deal [EQD]"
<br>
verschiedene Layouts
wählen, indem man einfach das entsprechende Layout bei den<br>
verschiedenen Dealtypen einstellt:<br>
<br>
<img src="./pictures/pic-UDF-12.png" alt="">
<br>
Wenn jedoch nur ein Layout vorhanden ist, nimmt er per default immer
dieses,<br>
ohne dass man das angeben muss.<br>
<br>
Auf diese Weise hat man die Möglichkeit 20 Felder in einer Struktur
(Tabelle) zu<br>
definieren, aber je nach Dealtyp nur jeweils 2 anzeigen zu lassen oder<br>
ähnliches.<br>
<br>
<h4>2.5 Adapt Data Model</h4>
Der letzte Schritt ist immer "Adapt Data Model" laufen zu lassen, damit
Murex<br>
die Änderungen übernimmt. Effektiv werden jetzt erst die Tabellen
und Felder<br>
angelegt. Erst nach einem Neustart einer Enduser-Session sind dann die
Felder<br>
auch zu sehen/zu benutzen.<br>
<br>
<h2>3. Listenfeld definieren</h2><br>
Um ein Listenfeld zu definieren muss man prinzipiell genauso vorgehen wie
beim<br>
einfachen Textfeld. Jedoch muss man vorher das Feld definieren, dass den<br>
Listenwert bereithält. Man muss also quasi eine Ehrenrunde vorher
drehen.<br>
<br>
<h4>3.1 Feld
für die Werte der Liste erstellen</h4>
<h6>3.1.1 Struktur
für Listenfelder anlegen</h6>
Zunächst muss man ein Feld erstellen, in dem die Listenwerte
gespeichert werden.<br>
Dies läuft absolut analog zu obigem Beispiel.<br>
Am besten legt man sich eine Struktur an, die alle Listenfelder
enthält.<br>
Natürlich kann man auch diese Listenfeld-Strukturen noch mal
unterteilen nach<br>
Listenfelder für Trades, für Kontrahenten etc. Wir haben der
Einfachheit halber<br>
in unserem Beispiel nur eine einzige Struktur angelegt:<br>
<br>
<img src="./pictures/pic-UDF-13.png" alt="">
<br>
In dieser Struktur haben wir lediglich ein Feld definiert,
nämlich LOC, welches<br>
verschiedene Lokationen speichern soll, die dann später zur Auswahl
stehen.<br>
<br>
<h6>3.1.2 Listenfelder anlegen</h6>
Das Feld ist wie folgt definiert:<br>
<br>
<img src="./pictures/pic-UDF-14.png" alt="">
<br>
Also ein ganz normales Textfeld wie zuvor auch schon.<br>
<br>
Als Layout haben wir diesmal jedoch nicht ein Default-Layout definiert,
sondern<br>
eines, dass nur dieses eine Feld zeigt. Es gibt in unserem Beispiel zwar nur
ein<br>
Feld und damit auch nur ein Layout, aber es könnte natürlich 20
Felder geben und<br>
dann hätten wir auch 20 Layouts definiert.<br>
<br>
<img src="./pictures/pic-UDF-15.png" alt="">
<br>
<img src="./pictures/pic-UDF-15a.png" alt="">--> <img
src="./pictures/pic-UDF-15b.png" alt="">
<br>
Nun haben wir ein Feld, dass Listenwerte aufnehmen kann. Nach einem Adapt
Data<br>
Model kann nun die Liste erstellt werden unter dem Menüpunkt Lists.<br>
<br>
<h4>3.2 Liste erstellen</h4>
Unter Lists sieht man alle vordefinierten Listen und kann dort auch per<br>
insert/Einfg neue hinzufügen:<br>
<br>
<img src="./pictures/pic-UDF-16.png" alt="">
<br>
<h6>3.2.1 Liste selber anlegen</h6>
Hier im Beispiel haben wir selber die Liste LOCATIONS erstellt, die die
Werte<br>
der späteren Listenauswahl bereithält und ihre Werte selber
wiederum in dem<br>
soeben erstellen Feld LOC der Struktur "Lists" speichert:<br>
<br>
<img src="./pictures/pic-UDF-17.png" alt="">
<br>
Hier sieht man den Sinn der Layout sehr deutlich. Man möchte später
ja nur das<br>
eine Feld sehen und somit ist ein Layout "LOC" nötig, dass nur das eine
Feld der<br>
Tabelle darstellt. Die gemachten Einstellungen sind nun mittels Adapt Data
Model<br>
abzuspeichern.<br>
<br>
<h6>3.2.2 Listenwerte eingeben</h6>
Die Werte dieser Liste können nun mittels Rechtsklick auf die Liste und
Auswahl<br>
von "browse list" eingeben werden:<br>
<br>
<img src="./pictures/pic-UDF-17a.png" alt=""> --> <img
src="./pictures/pic-UDF-17b.png" alt="">
<br>
Man hat jetzt also eine Liste definiert und deren Werte eingegeben. Es
steht<br>
einer weiteren Verwendung nichts mehr im Wege.<br>
<br>
<h4>3.3 Das eigentliche Listenfeld erstellen</h4>
In unserem Beispiel zum einfachen Textfeld haben wir eine Struktur erstellt,
die<br>
die UDFs
für Trades aufnehmen soll. Nehmen wir an, dass wir dort auch ein
Feld<br>
haben wollen, in dem wir einen Standort speichern (bspw. der Standort der<br>
Kondor-Installation, von der die Deals kommen, weil bei mehreren
Installationen<br>
von Kondor die ID nicht eindeutig ist), und dass man den Standort über
eine<br>
Liste auswählen möchte.<br>
Wir erstellen also in der Struktur
"Trades" folgendes Feld:<br>
<br>
<img src="./pictures/pic-UDF-18.png" alt="">
<br>
Hier sehen wir nun, dass wir einfach als "Entry type"
"List" auswählen und unter<br>
"List tables" die von uns erstellte Liste auswählen.<br>
Man sieht auch, dass man hier auch wieder sehr flexibel ist. Man kann<br>
beispielsweise mehrspaltige Listen erstellen und als "Main return" die
erste<br>
Spalte definieren. Oder man kann sehr grosse Listen erstellen und über
einen<br>
Filter nur bestimmte anzeigen...<br>
<br>
Nun ist man fertig und nach einem erneuten Adapt Data Model kann man das
fertige<br>
Feld in einer Enduser-Session nutzen:<br>
<br>
<img src="./pictures/pic-UDF-19.png" alt="">
<br>
<h2>4. Consistency Rules</h2><br>
To be done<br>
</html>
<html>
<ul>
<li>Finanzierungsmodell (für Immobilien)</li>
<li>Dieses zeichnet sich dadurch aus, dass die<br />
Höhe der monatlich zu zahlenden Rate<br />
(die sogenannte <b>Annuität</b>) über <br />
die gesamte Laufzeit konstant bleibt. </li>
<li>Berechnung des Annuitädarlehens mittels Excel:</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="http://www.helpster.de/annuitaetendarlehen-mit-excel-berechnen-so-geht-s_66471" target=_blank>Helpster :: Annuitätendarlehen ‐ mit Excel berechnen</a></li>
</ul>
</html>
<html>
von Christian Himbert<br />
<br />
Zur Finanzierung einer Wohnimmobilie gibt es viele <br />
Finanzierungsmodelle. Ein gängiges und sehr beliebtes<br />
Modell ist das Annuitätendarlehen. Dieses zeichnet <br />
sich dadurch aus, dass die Höhe der monatlich zu<br />
zahlenden Rate (die sogenannte Annuität) über die<br />
gesamte Laufzeit konstant bleibt. Die Berechnung<br />
des Annuitätendarlehens können Sie selbst mit Excel<br />
vornehmen.<br />
<br />
Andere Finanzierungsmodelle:<br />
<ul>
<li>Tilgungsdarlehen</li>
<li>Fälligkeitsdarlehen</li>
</ul>
<h3>Die Bestandteile der monatlichen Raten des Annuitätendarlehens</h3>
<ul>
<li>Die monatlich zu zahlende Rate des Annuitätendarlehens - <br />
die sogenannte Annuität - besteht aus zwei Teilen, nämlich <br />
dem Zins- und dem Tilgungsanteil.</li><br />
<li>Die Höhe des Zinsanteils wird durch die Konditionen des<br />
Kreditvertrags vorgegeben. Ein Darlehen über eine Gesamt-<br />
summe von 100.000 Euro zu einem effektiven Jahreszins von<br />
3,6 % ergibt eine Zinsschuld von 3.600 Euro pro Jahr bzw. <br />
300 Euro pro Monat.</li><br />
<li>Die Höhe des Tilgungsanteils ergibt sich aus der Differenz<br />
der monatlichen Annuität und des Zinsanteils. In unserem Bei-<br />
spiel verbleibt bei einer monatlichen Annuität von 1.000 Euro<br />
nach Abzug der Zinszahlungen ein Tilgungsanteil in Höhe von<br />
700 Euro im ersten Monat.</li><br />
<li>Jeden Monat verschiebt sich das Verhältnis zwischen Zins<br />
und Tilgung, da sich kontinuierlich die Restschuld um die ge-<br />
leisteten Tilgungszahlungen verringert. Der Zinsanteil nimmt<br />
somit stetig ab, während sich der Tilgungsanteil im selben<br />
Maße erhöht.</li>
</ul>
<h3>Berechnen Sie Ihre Raten mit Excel</h3>
<ul>
<li>Erstellen Sie zur Berechnung Ihres Annuitätendarlehens<br />
eine neue Excel-Datei.</li><br />
<li>Formatieren Sie die Zelle B1 mit dem Format "Prozent",<br />
und tragen Sie hier den effektiven Jahreszins gemäß Ihres<br />
Kreditvertrags ein (z.B. 3,6 %).</li><br />
<li>Die Zellen B2 und B3 formatieren Sie mit dem Format <br />
"Währung". Tragen Sie in B2 den Darlehensbetrag (in <br />
unserem Beispiel 100.000 €) und in B3 die
gewünschte<br />
monatliche Annuität (in unserem Beispiel 1.000 €) ein.</li>
<li>Erstellen Sie nun in derselben Excel-Arbeitsmappe eine<br />
fortlaufende Matrix zur Darstellung des Verlaufs des Annui-<br />
tätendarlehens. Tragen Sie hierfür zunächst die
Überschriften<br />
"Monat", "Zins", "Tilgung" und "Restschuld" in die Zellen A5-D5<br />
in dieser Reihenfolge ein.</li><br />
<li>Nun kann der erste Monat der Rückzahlungsperiode des<br />
Annuitätendarlehens modelliert werden. Tragen Sie in die Zelle<br />
A6 den Wert "1" ein. In Zelle B6 steht die Formel "=$B$2*$B$1/12".<br />
In Zelle C6 ist die Formel "=$B$3-B6" einzugeben. Nachdem<br />
in der Zelle D6 nun noch die Formel "=$B$2-C6" eingegeben<br />
worden ist, ist die erste Zeile der Matrix komplett.</li><br />
<li>In der zweiten Zeile der Matrix müssen die Excel-Formeln<br />
etwas angepasst werden. In der Zelle A7 ist der Wert "2" zu<br />
erfassen, in der Zelle B7 ist die Formel "=D6*$B$1/12" einzu-<br />
geben. Die Zelle C7 ist mit der Formel "=$B$3-B7", und die<br />
Zelle D7 mit der Formel "=D6-C7" zu versehen.</li><br />
<li>Sie erkennen anhand der berechneten Werte, dass sich bereits<br />
im zweiten Monat die Höhe der Zinszahlungen zugunsten einer<br />
höheren Tilgung verringert hat.</li><br />
<li>Markieren Sie nun mit der Maus die Zellen A7-D7 und vervoll-<br />
ständigen Sie die Tabelle mit gehaltener linker Maustaste <br />
genau so weit nach unten, bis der Wert in der Zelle "Restschuld"<br />
bei 0 angekommen ist.</li><br />
</ul>
<br />
Im oberen Beispiel beträgt die Restschuld nach 119 Monaten<br />
noch exakt 69,78 Euro, welche im 120. Monat dann zu zahlen und<br />
das Annuitätendarlehen somit nach genau 10 Jahren Laufzeit<br />
getilgt ist. Die Summe der insgesamt geleisteten Zins- und Tilgungs-<br />
zahlungen können Sie in derselben Excel-Arbeitsmappe durch<br />
Addition der entsprechenden Spalten der Matrix ermitteln, im oberen<br />
Beispiel die Zellen B6-B124 bzw. C6-C124.<br />
<h3>Link:</h3>
<ul>
<li><a href="http://www.helpster.de/annuitaetendarlehen-mit-excel-berechnen-so-geht-s_66471" target="_blank" rel="noreferrer noopener">Helpster :: Annunitätendarlehen mit Excel berechnen</a></li>
<li><a href="http://www.immobilienscout24.de/baufinanzierung/ratgeber/darlehen/annuitaetendarlehen.html" target="_blank" rel="noreferrer noopener">Immobilienscout24 :: Annuitätendarlehen</a></li>
</ul>
<br />
</html>
<html>
If you have occasion where you need to <br />
translate upper case to lower and vice <br />
versa, and happen to run a ksh, enter <br />
the following functions into your .profile: <br />
<br /><code>
function trans <br />
{ <br />
tr '[:upper:]' '[:lower:]' < $1 > $2 <br />
} <br />
<br />
function TRANS <br />
{ <br />
tr '[:lower:]' '[:upper:]' <$1 > $2 <br />
} <br />
</code>
<br />
The first function will translate all uppercase <br />
letters in the first file (argument) to lowercase <br />
in the second file. <br />
<br />
The second function TRANS does the exact opposite. <br />
</html>
<html>
Here is a quick script that you can use to <br />
filter the list of active processes to only <br />
those that contain a specified string.<br />
<br />
Edit into the file <b>/usr/local/bin/psfind</b>:
<code><pre>
ps -ef|grep -i $1| grep -iv grep
</pre></code>
Change permissions so that it is executable
<code><pre>
#chmod a+x,go-w /usr/local/bin/psfind
</pre></code>
<br />
Use it:<br />
<code><pre>
#/usr/local/bin/psfind oracle
</pre></code>
This tip generously supported <br />
by: bill.anglea@oracle.com<br />
</html>
<html>
Changing file names from UPPER TO LOWER <br />
case and vice versa. <br />
<br />
This script can be used to convert the file names <br />
from upper case to lower case and vice versa. <br />
<br /><code>
#################### <br />
typeset -u Lcase <br />
for Ucase in `ls` <br />
do <br />
Lcase=$Ucase <br />
mv $Ucase $Lcase <br />
done <br />
###################### <br />
</code> <br />
And to convert from lower case to upper case, just <br />
change (typeset -u ) to be ( typeset -l ). <br />
<br />
This tip generously supported by: <br />
yousif_morckos@yahoo.com <br />
</html>
<html>
Keeping your system up to date and applying all security patches is an essential task for sysadmins and developers. One can use the apt module of Ansible to manages apt packages for Debian/Ubuntu-based Linux distros. This module can either use aptitude or apt-get command on the remote server for package management. Similarly, it would be best if you used the reboot module of Ansible to reboot a machine, wait for it to go down, come back up, and respond to commands. This page explains how to run apt/apt-get update and upgrade all packages via Ansible and reboot the machine if the need occurs.
<h3>Ansible apt update all packages using apt module</h3>
Typically you run the following to refresh package cache using the apt-get command or apt command:
<code><pre>sudo apt-get update</pre></code>
To update repositories cache using Ansible:
<code><pre>
- name: Update apt-get repo and cache
apt: update_cache=yes force_apt_get=yes cache_valid_time=3600
</pre></code>
Where,
<ul>
<li> <code><b>update_cache=yes</b></code> Run the equivalent of apt-get update command on all servers</li>
<li> <code><b>force_apt_get=yes</b></code> Do not use the aptitude command, instead use the apt-get command on Debian/Ubuntu boxes</li>
<li> <code><b>cache_valid_time=3600</b></code> Update the apt cache if its older than the cache_valid_time. This option is set in seconds. In this examples, it is set to 3600 seconds.</li>
</ul>
<h3>Upgrading all apt packages using Ansible</h3>
The syntax is:
<code><b>
- name: Upgrade all apt packages
apt: upgrade=dist force_apt_get=yes
</b></code>
Where,
<code><b>upgrade=dist</b></code> Run the equivalent of <code><b>apt-get upgrade</b></code> command on all Ubuntu or Debian Linux servers. In other words, upgrade all packages to latest version.
<code><b>force_apt_get=yes </b></code> Use apt-get instead of aptitude.
<h3>Find out if we need to reboot the servers</h3>
If the file /var/run/reboot-required exists, you need to reboot your Debian or Ubuntu Linux box. We need to register a new variable if file /var/run/reboot-required exists on the system as follows:
<code><b>
- name: Check if a reboot is needed for Debian and Ubuntu boxes
register: reboot_required_file
stat: path=/var/run/reboot-required get_md5=no
</b></code>
Where,
<code><b>register: reboot_required_file</b></code> The 'register' keyword decides what variable to save a result in and we are going to use it as follows to reboot the box.
<code><b>stat: path=/var/run/reboot-required</b></code> Determine if a path (/var/run/reboot-required) exists
<code><b>get_md5=no</b></code> Algorithm to determine checksum of file. In this example, I am using md5, but you can use sha1, sha224, sha256, sha384, and sha512.
<h3>Rebooting server when a new kernel installed</h3>
You can use either command or shell module to reboot the Linux server when kernel updated as follows:
<code><b>
- name: Reboot the Debian or Ubuntu server
reboot:
msg: "Reboot initiated by Ansible due to kernel updates"
connect_timeout: 5
reboot_timeout: 300
pre_reboot_delay: 0
post_reboot_delay: 30
test_command: uptime
when: reboot_required_file.stat.exists
</b></code>
Where,
<code><b>test_command: uptime</b></code> Execute uptime command on the rebooted server and expect success from to determine the machine is ready for further tasks.
<code><b>when: reboot_required_file.stat.exists</b></code> First, check that the file named /var/run/reboot-required exists using a variable named reboot_required_file. The reboot module will only work if that file exists and it is enforced using 'when: reboot_required_file.stat.exists' Ansible condition.
<h3>Using Ansible for system updates and reboot Linux servers if necessary</h3>
Now that you are aware of basic logic let us create a new host file:
vi hosts
Append the following:
<code><pre>
## set up ssh user name and path to python3 ##
[all:vars]
ansible_user='ubuntu'
ansible_become=yes
ansible_become_method=sudo
ansible_python_interpreter='/usr/bin/env python3'
##########################
## our aws server names
## aws-ls-www-1 may be mapped using /etc/hosts or ~/.ssh/config
## you can use ip address here too
###########################
[servers]
aws-ls-www-1
aws-ls-www-2
aws-ls-www-3
aws-ls-www-4
</pre></code>
<h3>Sample playbook</h3>
Create a new file named update.yml as follows:
<code><pre>vi update.yml</pre></code>
Append the following Ansbile code:
<code><pre>
---
- hosts: servers
become: true
become_user: root
tasks:
- name: Update apt repo and cache on all Debian/Ubuntu boxes
apt: update_cache=yes force_apt_get=yes cache_valid_time=3600
- name: Upgrade all packages on servers
apt: upgrade=dist force_apt_get=yes
- name: Check if a reboot is needed on all servers
register: reboot_required_file
stat: path=/var/run/reboot-required get_md5=no
- name: Reboot the box if kernel updated
reboot:
msg: "Reboot initiated by Ansible for kernel updates"
connect_timeout: 5
reboot_timeout: 300
pre_reboot_delay: 0
post_reboot_delay: 30
test_command: uptime
when: reboot_required_file.stat.exists
</pre></code>
Make sure you set up ssh keys and run it as follows:
<code><pre>ansible-playbook -i hosts update.yml</pre></code>
<img src="./pictures/Ansible-apt-update-all-packages-and-reboot-Debian-or-Ubuntu-Linux_02.webp" height=451 width=599/>
<h3>Link:</h3>
<a href="https://www.cyberciti.biz/faq/ansible-apt-update-all-packages-on-ubuntu-debian-linux/" target=_blank>nixCraft :: Ansible - apt update …</a>
</html>
<html>
Es gibt (mindestens) folgende zwei Möglichkeiten:
<ol>
<li><h3>Adding Ansible command shell completion</h3>
You can add shell completion of the Ansible command line utilities<br />
by installing an optional dependency called <code><b>argcomplete</b></code>. <code><b>argcomplete</b></code><br />
supports bash, and has limited support for zsh and tcsh.<br />
<br />
For more information about installation and configuration, see the<br />
<code><b>argcomplete</b></code> documentation.<br />
<h4>Installing argcomplete</h4>
<pre><code>python3 ‐m pip install ‐‐user argcomplete</code></pre>
<h4>Configuring argcomplete</h4>
Global completion requires bash 4.2.
<pre><code>activate‐global‐python‐argcomplete [ ‐‐user ]</code></pre>
</li>
<li><h3>von dysosmus (GitHub)</h3>
</li>
</ol>
<h3>Link:</h3>
<ul>
<li><a href="https://docs.ansible.com/ansible/devel/installation_guide/intro_installation.html#adding-ansible-command-shell-completion" target="_blank"
rel="noreferrer noopener">Ansible Documentation :: Adding Ansible command shell completion</a></li>
<li><a href="https://github.com/dysosmus/ansible-completion" target="_blank" rel="noreferrer noopener">GitHub :: dysosmus ‐ ansible‐completion</a></li>
</ul>
</html>
<html>
Changes can be made and used in a configuration file which <br />
will be searched for in the following order:
<ol>
<li> <b>ANSIBLE_CONFIG</b> (environment variable if set) </li>
<li> <b> ansible.cfg</b> (in the current directory) </li>
<li> <b> ~/.ansible.cfg</b> (in the home directory) </li>
<li> <b> /etc/ansible/ansible.cfg </b></li>
</ol>
Ansible will process the above list and use the first file found, <br />
all others are ignored.
<h3>Links:</h3>
<a href="https://docs.ansible.com/ansible/latest/reference_appendices/config.html" target=_blank> Ansible-Doku :: Configuration</a><br />
<a href="https://www.paulleasure.com/how-to/how-to-where-to-create-an-ansible-configure-file/" target=_blank>Paul K. Leasure</a>
</html>
<html>
<h3>Latest Releases Via Apt (Debian)</h3>
Debian users may leverage the same source as the Ubuntu PPA.<br />
<br />
Add the following line to /etc/apt/sources.list:<br />
<br /><code>
deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main<br />
</code><br />
Then run these commands:<br />
<br /><code>{<em>DEPRECATED</em>}
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367</code><br />
Ausgabe:<br />
<code> Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.FlcPgFIIOR --no-auto-check-trustdb --trust-model always --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-security-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-wheezy-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-wheezy-stable.gpg --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367<br />
gpg: fordere Schlüssel 7BB9C367 von hkp-Server keyserver.ubuntu.com an<br />
gpg: Schlüssel 7BB9C367: öffentlicher Schlüssel "Launchpad PPA for Ansible, Inc." importiert<br />
gpg: Anzahl insgesamt bearbeiteter Schlüssel: 1<br />
gpg: importiert: 1 (RSA: 1)<br />
</code><br />
⇒ es wird im Verzeichnis /etc/apt ein oder mehrere gpg-Files (trusted.gpg) und das Verzeichnis trusted.gpg.d angelegt<br />
<br />
<code>$ sudo apt-get update</code><br />
<code>$ sudo apt-get install ansible</code><br />
</code><br />
⇒ es wurden folgende Pakete (mit-)instaliert:<br />
<ul>
<li>Entpacken von python-markupsafe (0.23-1+b1) ...</li>
<li>Entpacken von python-jinja2 (2.7.3-1) ...</li>
<li>Entpacken von python-yaml (3.11-2) ...</li>
<li>Entpacken von python-crypto (2.6.1-5+deb8u1) ...</li>
<li>Entpacken von python-ecdsa (0.11-1) ...</li>
<li>Entpacken von python-paramiko (1.15.1-1) ...</li>
<li>Entpacken von python-httplib2 (0.9+dfsg-2) ...</li>
<li>Entpacken von python-setuptools (5.5.1-1) ...</li>
<li>Entpacken von sshpass (1.05-1) ...</li>
<li>Entpacken von ansible (2.4.0.0-1ppa~trusty) ...</li>
</ul>
Note<br />
<br />
This method has been verified with the Trusty sources in Debian Jessie <br />
and Stretch but may not be supported in earlier versions.<br />
<br />
</html>
<html>
<meta check syntax />
<h3>Command line options</h3>
<ul>
<li><code><pre><b>‐‐syntax‐check</b></pre></code> :: <br /></li>
<li><code><pre><b>‐C, ‐‐check</b></pre></code> :: <br /></li>
<li>Setting <code><pre><b>check_mode</b></pre></code> :: <br /></li>
<li><code><pre><b></b></pre></code> :: <br /></li>
</ul>
<h3>Test Modules</h3>
<h3>Playbook Debugger</h3>
<h3>Links:</h3>
<ul>
<li><a href="htttps://app.pluralsight.com/library/courses/testing-debugging-ansible-automation/table-of-contents" target="_blank" rel="noreferrer noopener">
Pluralsight :: Testing and Debugging Ansible Automation</a></li>
<lI><a href="https://stackoverflow.com/questions/35339512/ansible-fast-way-to-check-syntax"
target="_blank" rel="noreferrer noopener">
StackOverflow :: Ansible ‐ Fast way to check syntax</a>
</li>
</ul>
</html>
<html>
<ul>
<li><pre><code>fatal: [ubuntu]: FAILED! => {"msg": "Unable to encrypt nor hash, passlib must be installed. \
No module named 'passlib'. Unable to encrypt nor hash, passlib must be installed. \
No module named 'passlib'"}</code></pre>
</li>
<li><h3>Lösung:</h3>
<ol>
<li>I also had this issue today. I had to pip install passlib <br />
on the ansible server itself, not the target host. (Feel<br />
free to omit <code>--break-system-packages</code> as needed.
<pre><code>pip install --break-system-packages passlib</code></pre>
</li>
<li>Use the subcommand inject to add passlib in your An-<br />
sible virtual environment:
<pre><code>pipx inject ansible passlib</code></pre>
</li>
</ol>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://stackoverflow.com/questions/78525098/ansible-unable-to-encrypt-nor-hash-passlib-must-be-installed"
target="_blank" rel="noreferrer noopener">
StackOverflow :: Ansible Unable to encrypt nor hash, passlib must be installed</a>
</li>
</ul>
</html>
<html>
<ul>
<li>folgende Fehlermeldung bei Aufruf des<br />
Befehls <code>ansible ––list all</code> erhal–<br />
ten:
<pre><code>[WARNING]: Unable to parse /home/vagrant/inventory as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'</code></pre>
</li>
<li>Ursache war eine falsche Schreibweise<br />
des inventory-Files (“inventar“ statt “in–<br />
ventory“)
</li>
</ul>
</html>
<html>
<ul>
<li>Aktionen vor der Installation mit apt:
<code><pre>
- name: Update apt cache and system
apt:
upgrade: dist
update_cache: yes
cache_valid_time: 3600
dpkg_options: 'force-confold,force-confdef'
</pre></code>
</li>
</ul>
</html>
<html>
<h3>Question: </h3>
I need to run a Linux command over 20 servers using <br />
a root user and password in Ansible too. How do I pass<br />
a user and password in Ansible over ssh based session? <br />
How can I set a default Ansible username/password for ssh connection?
<h3>Answer:</h3>
There are two ways to solve this problem.
<h3>Method #1: Force username and password while using ssh</h3>
The syntax is:<br />
<code>
export ANSIBLE_HOST_KEY_CHECKING=false<br />
ansible --user {user} --ask-pass -i {inventory} {hostname} -a "command" -c paramiko<br />
ansible --user root --ask-pass -i ~/myhosts www1 -a "uptime" -c paramiko<br />
ansible --user root --ask-pass -i ~/myhosts cluster -a "/bin/date" -c paramiko
</code><br />
<br />
First create an inventory file using cat command:<br />
<code>$ cat inventory<br />
[cluster]<br />
ln.cbz01<br />
ln.cbz01<br />
ln.cbz01<br />
ln.cbz01<br />
</code><br />
For example, run date command on all hosts in cluster with root user and<br />
prompt for root user password, run:<br />
<code>
$ export ANSIBLE_HOST_KEY_CHECKING=false<br />
$ ansible --user root --ask-pass -i inventory cluster -a "/bin/date" -c paramiko<br />
</code><br />
Sample outputs:<br />
<img src="./pictures/ansible-user-password.png" width=599 height=190><br />
Fig.01: Setting up default Ansible username/password for ssh connection<br />
<br />
Where,
<ul>
<li> export ANSIBLE_HOST_KEY_CHECKING=false : <br />
Host key checking enabled by default and it can be disabled with this option. <br />
Otherwise you may get an error that read as: <br />
<code><i>“The authenticity of host 'ln.cbz01' can't be established.“</i></code></li>
<li> --user root :Connect as root user for ssh.</li>
<li> --ask-pass : Ask for connection password for ssh.</li>
<li> -i inventory : Set inventory file name.</li>
<li> cluster : Set host names or variable</li>
<li> -a "/bin/date" : Run /bin/date command all given hosts</li>
<li> -c paramiko : Use paramiko module for ssh connection.</li>
</ul>
Please note that SSH keys are recommended but password authentication<br />
can be used as explained earlier. See method #2 below for more info on how<br />
to setup ssh keys for login.<br />
A note about setting up the connection type and user on a per host basis in<br />
inventory file<br />
<br />
The syntax is:<br />
<code>
$ cat inventory<br />
[cluster]<br />
ln.cbz01 ansible_connection=ssh ansible_user=vivek<br />
ln.cbz01 ansible_connection=ssh ansible_user=root<br />
ln.cbz01 ansible_connection=ssh ansible_user=rootv<br />
############### WARNING #################<br />
## never do the following i.e. never store<br />
## the root account ssh password to use in<br />
## a text file<br />
##########################################<br />
ln.cbz01 ansible_connection=ssh ansible_user=root ansible_ssh_pass=foo<br />
</code>
<h4>Method #2: Set and use ssh keys (recommended)</h4>
Create ssh keys if not created, run:<br />
<code>
## [ Set password for your keys ] ##<br />
$ ssh-keygen -t rsa<br />
## [ Copy pub key to all remote boxes ] ##<br />
$ ssh-copy-id -i $HOME/.ssh/id_rsa.pub root@ln.cbz01<br />
$ ssh-copy-id -i $HOME/.ssh/id_rsa.pub root@ln.cbz02<br />
$ ssh-copy-id -i $HOME/.ssh/id_rsa.pub root@ln.cbz03<br />
$ ssh-copy-id -i $HOME/.ssh/id_rsa.pub root@ln.cbz04<br />
## [ Test it ] ##<br />
$ ssh root@ln.cbz01<br />
## [ Set up SSH agent to avoid retyping passwords ] ##<br />
$ ssh-agent bash<br />
$ ssh-add ~/.ssh/id_rsa<br />
## [ Run ansible ] ##<br />
$ ansible all -m ping<br />
$ ansible -i inventory cluster -a "/bin/date" <br />
</code>
<br />
<h4>Remarks:</h4>
Randy says:<br />
May 29, 2017 at 5:11 am<br />
<br />
Don't forget about <b>become_user</b> and <b>become_user_pass</b> flags<br />
in the event that sudo is not available and need to su to root.<br />
<br />
Link:<br />
<a href="https://www.cyberciti.biz/faq/how-to-login-with-root-password-when-using-ansible-tool/" target="_blank">https://www.cyberciti.biz/faq/how-to-login-with-root-password-when-using-ansible-tool/</a><br />
</html>
<html>
<h3>Question:</h3>
How do I use Ansible to upload ssh public key to as authorized_key <br />
to multiple Linux or Unix servers saved in an inventory file?
<h3>Answer</h3>
To add or remove SSH authorized keys for particular user accounts <br />
use authorized_key module.<br />
<br />
<b>Use Ansible to Add Users and their SSH public Keys</b><br />
<br />
This quick tutorial shows how to create an Ansible PlayBook that <br />
will add public ssh keys to multiple Unix or Linux servers for login securely.<br />
<h3>Step 1: Create hosts inventory file</h3>
You need to tell Ansible which hosts you are going to use:<br />
<br />
<code>$ cat my_ssh_hosts</code><br />
<br />
Sample outputs:<br />
<br /><code>
server1.cyberciti.biz
server2.cyberciti.biz
server3.cyberciti.biz
</code>
<h3>Step 2: Create playbook</h3>
Create a file called <b>upload_ssh_keys.yml</b> as follows:<br />
<br /><code>
---<br />
- hosts: all<br />
remote_user: vivek<br />
tasks:<br />
# upload ssh key <br />
- authorized_key:<br />
user: vivek<br />
state: present<br />
manage_dir: yes<br />
key: "{{ lookup('file', '/path/to/your/www_id_rsa.pub') }}"<br />
# vim:ft=ansible:<br />
</code><br />
The above will place public key file <b>(/path/to/your/www_id_rsa.pub) </b><br />
to all server listed my_ssh_hosts file. Make sure you setup ssh keys <br />
for root account.<br />
<h3>Step 3: Run playbook</h3>
The syntax is:<br />
<code><pre>
$ ansible-playbook -i my_ssh_hosts upload_ssh_keys.yml
</pre></code>
<b>Another example</b>
In this example, a new user named vivek is created. Next ssh key added for user vivek<br />
and ssh server configured to drop password based login using ssh-setup.j2 template.
<h3>File: ssh-setup.yml</h3>
<code><pre>
---
- hosts: cluster
tasks:
# create users for us
# note user vivek added to sudo group
# on many system you may need to use wheel
# user in sudo or wheel group can sudo
- user:
name: vivek
comment: "Vivek Gite"
shell: /bin/bash
groups: sudo
append: yes
generate_ssh_key: yes
## run command 'mkpasswd --method=sha-512' to create your own encrypted password ##
password: $6$gF1EHgeUSSwDT3$xgw22QBdZfNe3OUjJkwXZOlEsL645TpacwiYwTwlUyah03.Zh1aUTTfh7iC7Uu5WfmHBkv5fxdbJ2OkzMAPkm/
ssh_key_type: ed25519
# upload ssh key
- authorized_key:
user: vivek
state: present
manage_dir: yes
key: "{{ lookup('file', '/home/vivek/.ssh/id_ed25519.pub') }}"
# configure ssh server
- template:
src: ssh-setup.j2
dest: /etc/ssh/sshd_config
owner: root
mode: '0600'
validate: /usr/sbin/sshd -t -f %s
backup: yes
# restart sshd
- service:
name: sshd
state: restarted
</pre></code>
<h3>File: ssh-setup.j2</h3>
The following will disable root login and password login. Only user named vivek <br />
may be login over ssh using public key (you need to issue sudo -i command to gain root shell):
<code><pre>
Port 22
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
UsePrivilegeSeparation sandbox
KeyRegenerationInterval 3600
ServerKeyBits 1024
SyslogFacility AUTH
LogLevel INFO
LoginGraceTime 120
PermitRootLogin {{ sshd_permitroot_login }}
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
LogLevel VERBOSE
IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM {{ sshd_use_pam }}
PasswordAuthentication {{ sshd_password_authentication }}
ChallengeResponseAuthentication {{ sshd_challenge_response_authentication }}
{% for nip in ansible_all_ipv4_addresses %}
ListenAddress {{ nip }}
{% endfor %}
</pre></code>
<h3>File: my-inventory.hosts</h3>
<code><pre>
[all:vars]
ansible_user=root
ansible_port=22
[cluster:vars]
sshd_use_pam=no
sshd_password_authentication=no
sshd_challenge_response_authentication=no
sshd_permitroot_login=no
[cluster]
server1.cyberciti.biz
server2.cyberciti.biz
server3.cyberciti.biz
</pre></code>
You run it as follows:
<code><pre>
$ ansible-playbook -i my-inventory.hosts ssh-setup.yml
</pre></code>
You can also use loops as follows to upload file for each user:
<code><pre>
- hosts: all
user: root
# ....
my_ssh_users:
- name: vivek
key: "{{ lookup('file', 'vivek.pub') }}"
- name: tom
key: "{{ lookup('file', 'tom.pub') }}"
- name: wendy
key: "{{ lookup('file', 'wendy.pub') }}"
- name: jerry
key: "{{ lookup('file', 'jerry.pub') }}"
# ...
- name: Add ssh pub keys
authorized_key: user={{ item.name }} key="{{ item.key }}"
with_items: my_ssh_users
</pre></code>
<br />
See <a href="https://docs.ansible.com/ansible/authorized_key_module.html">authorized_key module doc</a> for more info.<br />
<br />
Link:<br />
<a href="https://www.cyberciti.biz/faq/how-to-upload-ssh-public-key-to-as-authorized_key-using-ansible/">https://www.cyberciti.biz/faq/how-to-upload-ssh-public-key-to-as-authorized_key-using-ansible/</a><br />
</html>
<html>
<h3>Question</h3>
I am trying to use ansible apt autoremove option but it is not working. I wanted to remove all unused Linux kernel and unwanted package dependency with the apt command/apt-get command. How can I run sudo apt-get autoremove on remote Ubuntu/Debian Linux servers with ansible?
<h3>Answer</h3>
To manages apt packages for Debian/Ubuntu and friends use apt module of Ansible. The autoremove is used to remove packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed as dependencies changed or the package(s) needing them were removed in the meantime.
Is there a way to run sudo apt-get autoremove with ansible
To do so you run the apt command or apt-get command as follows:
<code><pre>
$ sudo apt autoremove
</pre></code>
OR
<code><pre>
$ sudo apt-get autoremove
</pre></code>
For removing unused Linux kernel on a Debian/Ubuntu Linux use:
<code><pre>
$ sudo apt -y --purge autoremove
</pre></code>
## OR ##
<code><pre>
$ sudo apt-get -y --purge autoremove
</pre></code>
<h4>Running sudo apt-get autoremove with ansible</h4>
Update your yml file as follows:
<code><pre>
- name: Clean unwanted olderstuff
apt:
autoremove: yes
purge: yes
</pre></code>
Where,
<ul>
<li><b>autoremove : </b><br />If yes, remove unused dependency packages for all module states except build-dep. It can also be used as the only option. You must use Ansible version 2.1.</li>
<li><b>purge :</b><br /> This will force purging of configuration files if the module state is set to yes.</li>
</ul>
Here is my vpn.yml file:
<code><pre>
---
- hosts: vpn
become: true
become_user: root
tasks:
- name: Updating host using apt
apt:
update_cache: yes
upgrade: dist
- name: Update kernel to spefic version
apt:
name: "{{ k_ver }}"
state: latest
- name: Clean unwanted olderstuff
apt:
autoremove: yes
purge: yes
</pre></code>
My hosts file:
<code><pre>
[vpn:vars]
ansible_user=vivek
k_ver="linux-image-4.10.0-38-generic"
[vpn]
blr-vpn
mum-vpn
tx-vpn
tok-vpn
del-vpn
lon-vpn
</pre></code>
Run it as follows:
<code><pre>
$ ansible-playbook -i hosts vpn.yml
</pre></code>
OR
<code><pre>
$ export ANSIBLE_HOSTS=~/opshelper/hosts
$ ansible-playbook vpn.yml
</pre></code>
A note about running apt autoremove on LXD based vm
You can update your yml file as follows to run same command on three vm named db, proxy, and www as follows:
<code><pre>
- name: Run lxc apt-autoremove on cbz01 lxd host per vm
command: /usr/bin/lxc exec {{ item }} -- /usr/bin/apt-get --purge -y autoremove
with_items:
- db
- proxy
- www
</pre></code>
<br />
Link:<br />
<a href="https://www.cyberciti.biz/faq/how-to-use-ansible-to-autoremove-unwanted-package-dependency-with-apt/" target="_blank">nixCraft :: How to use Ansible to autoremove unwanted package dependency with apt</a>
</html>
<html>
<ul>
<li>Ansible ist ein Tool für Konfigurationsmanagement und zur Orchestrierung von Servern</li>
<br />
<li>Im Vergleich zu anderen Systemen ist es “agent-less “ und nutzt SSH.<br />
Dadurch muss keine zusätzliche Software auf jedem System installiert<br />
werden. <br />
<br />
Es wird eine SSH‐Verbindung zum Zielrechner aufgebaut, der Befehl<br />
ausgeführt und die SSH‐Verbindung danach wieder abgebaut.<br />
</li>
<li><h3>Installation:</h3>
am einfachsten mit dem Python‐Tool <b>pip</b />
<pre><code>pip install ansible</code></pre>
</li>
<li><h3>Upgrade:</h3>
<pre><code>pip[3] install ansible</code></pre>
</li>
<li><h3>Konfiguration:</h3>
<li>verwendete Konfigurationssprache: YAML</li>
<br />
<li> Beispiel KonfigFile:
<pre><code>- hosts: clt
tasks:
-name: install required packages
apt:
name "{{ item }}"
state: present
install_recommends: no
with_items:
-apache2<pre><code>
</li>
<li>benötigte KonfigFiles:
<ul>
<li><b>simple.yml</b>
</li>
<li><b>site.yml</b>
</li>
</ul>
</li>
<li>Bei Ausführung eines Befehls wird auf dem Zielrechner ein Verzeichnis<br />
im Home‐Verzeichnis des Users erstellt:
<pre><code>$HOME/.ansible<pre><code>
→ in diesem Verzeichnis wird das (verwendete) Modul abgelegt, ausgeführt<br />
und danach wieder gelöscht.<br />
<br />
Dieses Verhalten kann mittels der Variablen<br />
<pre><code>ANSIBLE_KEEP_REMOTE_FILES = 1<pre><code> geändert, abgeschaltet werden.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://chemnitzer.linux-tage.de/2017/de/programm/beitrag/174" target="_blank" rel="noreferrer noopener">CLT 2017 :: Einführung in Ansible</a></li>
<li><a href="https://www.golinuxcloud.com/getting-started-with-ansible/" target="_blank" rel="noreferrer noopener">Go Linux Cloud :: Ansible</a></li>
</ul>
</html>
<html>
<h3>Installation</h3>
You must configure the PPA on your system to install the latest version <br />
of ansible. To manage the repositories that you install software from <br />
various PPA (Personal Package Archives). It allow you to upload Ubuntu<br />
source packages to be built and published as an apt repository by Launch–<br />
pad. <br />
<br />
Type the following apt-get command or apt command:<br />
<code>
$ sudo apt update<br />
$ sudo apt upgrade<br />
$ sudo apt install software-properties-common<br />
</code>
<br />
Next add ppa:ansible/ansible to your system's Software Source:<br />
<code>
$ sudo apt-add-repository ppa:ansible/ansible<br />
</code>
<br />
Ansible is a radically simple IT automation platform that makes your applications<br />
and systems easier to deploy. Avoid writing scripts or custom code to deploy and<br />
update your applications' automate in a language that approaches plain English,<br />
using SSH, with no agents to install on remote systems.<br />
<br />
<code>
http://ansible.com/<br />
More info: https://launchpad.net/~ansible/+archive/ubuntu/ansible<br />
Press [ENTER] to continue or Ctrl-c to cancel adding it.<br />
<br />
gpg: keybox '/tmp/tmp6t9bsfxg/pubring.gpg' created<br />
gpg: /tmp/tmp6t9bsfxg/trustdb.gpg: trustdb created<br />
gpg: key 93C4A3FD7BB9C367: public key "Launchpad PPA for Ansible, Inc." imported<br />
gpg: Total number processed: 1<br />
gpg: imported: 1<br />
OK<br />
</code>
<br />
Update your repos:<br />
<code>
$ sudo apt update<br />
</code>
<br />
Sample outputs:<br />
<code>
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease<br />
Hit:2 http://dl.google.com/linux/chrome/deb stable Release <br />
Get:4 http://in.archive.ubuntu.com/ubuntu artful InRelease [237 kB] <br />
Hit:5 http://security.ubuntu.com/ubuntu artful-security InRelease <br />
Get:6 http://ppa.launchpad.net/ansible/ansible/ubuntu artful InRelease [15.9 kB] <br />
Get:7 http://ppa.launchpad.net/ansible/ansible/ubuntu artful/main amd64 Packages [560 B]<br />
Get:8 http://in.archive.ubuntu.com/ubuntu artful-updates InRelease [65.4 kB] <br />
Hit:9 http://in.archive.ubuntu.com/ubuntu artful-backports InRelease <br />
Get:10 http://ppa.launchpad.net/ansible/ansible/ubuntu artful/main i386 Packages [560 B]<br />
Get:11 http://ppa.launchpad.net/ansible/ansible/ubuntu artful/main Translation-en [340 B] <br />
Fetched 319 kB in 5s (62.3 kB/s) <br />
Reading package lists... Done<br />
</code>
<br />
To install the latest version of ansible, enter:<br />
<code>
$ sudo apt install ansible<br />
</code>
Sample outputs:<br />
<code>
Reading package lists... Done<br />
Building dependency tree <br />
Reading state information... Done<br />
The following additional packages will be installed:<br />
python-crypto python-httplib2 python-jinja2 python-markupsafe python-paramiko python-pyasn1 python-setuptools python-yaml sshpass<br />
Suggested packages:<br />
python-crypto-dbg python-crypto-doc python-jinja2-doc python-gssapi python-setuptools-doc<br />
The following NEW packages will be installed:<br />
ansible python-crypto python-httplib2 python-jinja2 python-markupsafe python-paramiko python-pyasn1 python-setuptools python-yaml sshpass<br />
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.<br />
Need to get 3,610 kB of archives.<br />
After this operation, 27.3 MB of additional disk space will be used.<br />
Do you want to continue? [Y/n] y<br />
Get:1 http://in.archive.ubuntu.com/ubuntu artful/main amd64 python-markupsafe amd64 1.0-1build1 [13.0 kB]<br />
Get:2 http://ppa.launchpad.net/ansible/ansible/ubuntu artful/main amd64 ansible all 2.4.0.0-1ppa~artful [2,669 kB]<br />
Get:3 http://in.archive.ubuntu.com/ubuntu artful/main amd64 python-jinja2 all 2.9.6-1 [107 kB]<br />
Get:4 http://in.archive.ubuntu.com/ubuntu artful/main amd64 python-yaml amd64 3.12-1build2 [115 kB]<br />
Get:5 http://in.archive.ubuntu.com/ubuntu artful/main amd64 python-pyasn1 all 0.1.9-2 [45.4 kB]<br />
Get:6 http://in.archive.ubuntu.com/ubuntu artful/main amd64 python-paramiko all 2.0.0-1 [109 kB]<br />
Get:7 http://in.archive.ubuntu.com/ubuntu artful/main amd64 python-httplib2 all 0.9.2+dfsg-1 [34.6 kB]<br />
Get:8 http://in.archive.ubuntu.com/ubuntu artful/main amd64 python-crypto amd64 2.6.1-7build2 [245 kB]<br />
Get:9 http://in.archive.ubuntu.com/ubuntu artful/main amd64 python-setuptools all 36.2.7-2 [260 kB]<br />
Get:10 http://in.archive.ubuntu.com/ubuntu artful/universe amd64 sshpass amd64 1.06-1 [10.5 kB]<br />
Fetched 3,610 kB in 23s (154 kB/s) <br />
Selecting previously unselected package python-markupsafe.<br />
(Reading database ... 193191 files and directories currently installed.)<br />
Preparing to unpack .../0-python-markupsafe_1.0-1build1_amd64.deb ...<br />
Unpacking python-markupsafe (1.0-1build1) ...<br />
Selecting previously unselected package python-jinja2.<br />
Preparing to unpack .../1-python-jinja2_2.9.6-1_all.deb ...<br />
Unpacking python-jinja2 (2.9.6-1) ...<br />
Selecting previously unselected package python-yaml.<br />
Preparing to unpack .../2-python-yaml_3.12-1build2_amd64.deb ...<br />
Unpacking python-yaml (3.12-1build2) ...<br />
Selecting previously unselected package python-pyasn1.<br />
Preparing to unpack .../3-python-pyasn1_0.1.9-2_all.deb ...<br />
Unpacking python-pyasn1 (0.1.9-2) ...<br />
Selecting previously unselected package python-paramiko.<br />
Preparing to unpack .../4-python-paramiko_2.0.0-1_all.deb ...<br />
Unpacking python-paramiko (2.0.0-1) ...<br />
Selecting previously unselected package python-httplib2.<br />
Preparing to unpack .../5-python-httplib2_0.9.2+dfsg-1_all.deb ...<br />
Unpacking python-httplib2 (0.9.2+dfsg-1) ...<br />
Selecting previously unselected package python-crypto.<br />
Preparing to unpack .../6-python-crypto_2.6.1-7build2_amd64.deb ...<br />
Unpacking python-crypto (2.6.1-7build2) ...<br />
Selecting previously unselected package python-setuptools.<br />
Preparing to unpack .../7-python-setuptools_36.2.7-2_all.deb ...<br />
Unpacking python-setuptools (36.2.7-2) ...<br />
Selecting previously unselected package sshpass.<br />
Preparing to unpack .../8-sshpass_1.06-1_amd64.deb ...<br />
Unpacking sshpass (1.06-1) ...<br />
Selecting previously unselected package ansible.<br />
Preparing to unpack .../9-ansible_2.4.0.0-1ppa~artful_all.deb ...<br />
Unpacking ansible (2.4.0.0-1ppa~artful) ...<br />
Setting up python-setuptools (36.2.7-2) ...<br />
Setting up python-yaml (3.12-1build2) ...<br />
Setting up python-crypto (2.6.1-7build2) ...<br />
Setting up python-pyasn1 (0.1.9-2) ...<br />
Setting up python-markupsafe (1.0-1build1) ...<br />
Setting up python-httplib2 (0.9.2+dfsg-1) ...<br />
Setting up python-paramiko (2.0.0-1) ...<br />
Setting up sshpass (1.06-1) ...<br />
Processing triggers for doc-base (0.10.7) ...<br />
Processing 1 added doc-base file...<br />
Processing triggers for man-db (2.7.6.1-2) ...<br />
Setting up python-jinja2 (2.9.6-1) ...<br />
Setting up ansible (2.4.0.0-1ppa~artful) ...<br />
</code>
<h3>Finding out Ansible version</h3>
Type the following command:<br />
<code>
$ ansible --version<br />
</code>
<br />
Sample outputs:<br />
<code>
ansible 2.4.0.0<br />
config file = /etc/ansible/ansible.cfg<br />
configured module search path = [u'/home/vivek/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']<br />
ansible python module location = /usr/lib/python2.7/dist-packages/ansible<br />
executable location = /usr/bin/ansible<br />
python version = 2.7.14 (default, Sep 23 2017, 22:06:14) [GCC 7.2.0]<br />
</code>
<h3>Creating your hosts file</h3>
Ansible needs to know your remote server names or IP address. This <br />
information is stored in a file called hosts. The default is /etc/ansible/hosts.<br />
You can edit this one or create a new one in your $HOME directory:<br />
<code>
$ sudo vi /etc/ansible/hosts<br />
</code>
Or<br />
<code>
$ vi $HOME/hosts<br />
</code>
<br />
Append your server's DNS or IP address:<br />
<code>
[webservers]<br />
server1.cyberciti.biz<br />
104.20.187.5<br />
104.20.186.5<br />
<br />
[devservers]<br />
10.98.222.4<br />
10.98.222.7<br />
10.98.222.8<br />
</code>
<br />
I have two groups. The first one named as webserver and other is called devservers.<br />
<h3>Setting up ssh keys</h3>
You must configure ssh keys between your machine and remote servers <br />
specified in ~/hosts file:<br />
<code>
$ ssh-keygen -t rsa -b 4096 -C "My ansisble key"<br />
</code>
<br />
Use scp or ssh-copy-id command to copy your public key file (e.g., $HOME/.ssh/id_rsa.pub)<br />
to your account on the remote server/host:<br />
<code>
$ ssh-copy-id -i $HOME/.ssh/id_rsa.pub root@server1.cyberciti.biz<br />
$ ssh-copy-id -i $HOME/.ssh/id_rsa.pub root@10.98.222.4<br />
$ ssh-copy-id -i $HOME/.ssh/id_rsa.pub root@10.98.222.7<br />
$ ssh-copy-id -i $HOME/.ssh/id_rsa.pub root@10.98.222.8<br />
$ eval $(ssh-agent)<br />
$ ssh-add<br />
</code>
<br />
Now ansible can talk to all remote servers using ssh command.
<h3>Send ping server to all servers</h3>
Just type the following command:<br />
<code>
$ ansible -i ~/hosts -m ping all<br />
</code>
<br />
Sample outputs:<br />
<code>
10.98.222.4 | SUCCESS => {<br />
"changed": false, <br />
"failed": false, <br />
"ping": "pong"<br />
}<br />
10.98.222.7 | SUCCESS => {<br />
"changed": false, <br />
"failed": false, <br />
"ping": "pong"<br />
}<br />
10.98.222.8 | SUCCESS => {<br />
"changed": false, <br />
"failed": false, <br />
"ping": "pong"<br />
}<br />
</code>
<h3>Find out uptime for all hosts</h3>
<code>
$ ansible -i hosts -m shell -a 'uptime' all<br />
</code>
<br />
Sample outputs:<br />
<code>
do-de.public | SUCCESS | rc=0 <br />
10:37:02 up 1 day, 8:39, 1 user, load average: 0.95, 0.27, 0.12<br />
<br />
do-blr-vpn | SUCCESS | rc=0 <br />
16:07:11 up 1 day, 8:43, 1 user, load average: 0.01, 0.01, 0.00<br />
<br />
ln.gfs01 | SUCCESS | rc=0 <br />
10:37:17 up 22 days, 5:30, 1 user, load average: 0.18, 0.12, 0.05<br />
</code>
<br />
Where,<br />
<ul>
<li>-i ~/hosts : Specify inventory host path. You can setup shell variable and skip the -i option. For e.g.: export ANSIBLE_HOSTS=~/hosts</li>
<li>-m shell : Module name to execute such as shell, apt, yum and so on</li>
<li>-a 'uptime' : Module arguments. For example, shell module will accept Unix/Linux command names. The apt module will accept options to update remote boxes using apt-get/apt command and so on.</li>
<li>all : The all means “all hosts“ You can speificy group name such as devservers (ansible -i hosts -m shell -a 'uptime' dbservers) or host names too.</li>
</ul>
<h3>Update all Debian/Ubuntu server using apt module</h3>
Run the following command:<br />
<code>
$ ansible -i ~/hosts -m apt -a 'update_cache=yes upgrade=dist' dbservers<br />
</code>
<h3>Writing your first playbook</h3>
You can combine all modules in a text file as follows in yml format i.e. create<br />
a file named update.yml:<br />
<code><pre>
---
- hosts: dbservers
tasks:
- name: Updating host using apt
apt:
update_cache: yes
upgrade: dist
</pre></code>
Now you can run it as follows:<br />
<code>
$ ansible-playbook -i ~/hosts update.yml<br />
</code>
<img src="./pictures/ansible-playbookoutputs.jpg" width=599 height=361>
<br />
Fig.01: Ansible playbook in action
<br />
That is all. Now you have a working ansible setup running on Ubuntu <br />
desktop/laptop and communication with remote servers. <br />
<br />
I suggest you learn how to write playbook and <a href="https://docs.ansible.com/ansible/latest/index.html" target="_blank">other stuff in the official documents</a>.<br />
<br />
Link:<br />
<a href="https://www.cyberciti.biz/faq/how-to-install-and-configure-latest-version-of-ansible-on-ubuntu-linux/" target="_blank">https://www.cyberciti.biz/faq/how-to-install-and-configure-latest-version-of-ansible-on-ubuntu-linux/</a>
</html>
<html>
<ul>
<li>https://www.jeffgeerling.com/blog/yaml-best-practices-ansible-playbooks-tasks</li>
<li>http://docs.ansible.com/ansible/latest/playbooks_intro.html</li>
<li>Playbooks
Learn what playbooks can do and how to write/run them.
http://docs.ansible.com/ansible/latest/playbooks.html</li>
<li>YAMLLint
YAML Lint (online) helps you debug YAML syntax if you are having problems
http://yamllint.com/</li>
<li>Github examples directory
Complete playbook files from the github project source
https://github.com/ansible/ansible-examples</li>
<li><a href="https://chemnitzer.linux-tage.de/2017/de/programm/beitrag/286" target="_blank">CLT 2017 :: Grundlagen im Konfigurationsmanagement</a></li>
<li><a href="https://chemnitzer.linux-tage.de/2017/de/programm/beitrag/174" target="_blank">CLT 2017 :: Einführung in Ansible</a></li>
<li><a href="https://chemnitzer.linux-tage.de/2017/de/programm/beitrag/244" target="_blank">CLT 2017 :: Softwaretest für das Konfigurationsmanagement mit Test Kitchen</a></li>
<li><a href="https://www.ansible.com/overview/how-ansible-works" target=_blank>Red Hat Ansible :: How Ansible Works</a>
</ul>
</html>
<html>
Hunderte Server manuell zu verwalten ist nicht nur mëhsam, <br />
sondern auch zeitaufwändig und fehleranfällig. Hier setzt das<br />
Konfigurationsmanagementtool Ansible an, das 2015 von RedHat<br />
übernommen wurde. Von Befehlen, die man auf mehreren Servern<br />
zugleich ausführen möchte, bis hin zu vorbereiteten Konfigurationen<br />
für Gruppen von Servern ist alles möglich.<br />
<br />
Ansible benötigt im Gegensatz zu seinen Kontrahenten Cheff, Puppet,<br />
CFEngine und Saltstack keinerlei Agentsoftware auf den zu verwaltenden<br />
Maschinen, da es zur Kommunikation SSH benutzt. Dadurch ist es <br />
im Handumdrehen einsatzbereit.<br />
<br />
Die <b>Konfiguration in YAML</b> erleichtert den Einstieg, so dass man innerhalb<br />
weniger Minuten ein erstes Playbook erstellen kann.<br />
<br />
Ein <b>Playbook</b> ist dabei eine Sammlung ein oder mehrerer Plays, d.h. eine<br />
Reihe von Schritten, die ausgeführt werden sollen.<br />
<h2>An Ansible2 Tutorial</h2>
<p>
Ansible is a <b>configuration management and provisioning tool</b>, similar<br />
to Chef, Puppet or Salt.<br />
<br />
I've found it to be one of the simplest and the easiest to get started with. <br />
A lot of this is because it's "just SSH"; It uses SSH to connect to servers<br />
and run the configured tasks.<br />
<br />
One nice thing about Ansible is that it's very easy to convert bash scripts<br />
(still a popular way to "do" configuration management) into Ansible Tasks.<br />
Since it's primarily SSH based, it's not hard to see why this might be the<br />
case - Ansible ends up running the same (ish) commands.<br />
<br />
We could just script our own provisioners, but Ansible is much cleaner because<br />
it automates the process of getting context before running Tasks. With this context,<br />
Ansible is able to handle most edge cases - the kind we usually take care of with<br />
long, increasingly complex scripts.<br />
<br />
Ansible Tasks are idempotent. Without a lot of extra coding, bash scripts are<br />
usually not safety run again and again. Ansible uses "Facts", which is system<br />
and environment information it gathers ("context") before running Tasks.<br />
<br />
Ansible uses these facts to check state and see if it needs to change anything<br />
in order to get the desired outcome. This makes it safe to run Ansible Tasks<br />
against a server over and over again.<br />
<br />
Here I'll show how easy it is to get started with Anible. We'll start basic and then<br />
add in more features as we improve upon our configurations.<br />
</p>
<h3>Installation</h3>
<p>
Of course we need to start by installing Ansible. Tasks can be run off of any <br />
machine Ansible is installed on.<br />
<br />
This means there's usually a "central" server running Ansible commands, <br />
although there's nothing particularly special about what server Ansible is<br />
installed on. Ansible is "agentless" - there's no central agent(s) running. <br />
We can even run Ansible from any server; I often run Tasks from my laptop.
<h4>Ubuntu</h4>
Here's how to install Ansible on Ubuntu 16.04. We'll use the easy-to-remember<br />
ppa:ansible/ansible repository as per the official docs.<br />
<code>
sudo apt-add-repository -y ppa:ansible/ansible<br />
sudo apt-get update<br />
sudo apt-get install -y ansible<br />
</code><br />
This installs Ansible globally.
<h4>Virtualenv's</h4>
This is my preferred way to install Ansible.
<br />
We can also use Pip to install virtualenv, which lets us install Python libraries<br />
in their own little environment that won't affect others (nor force us to install tools<br />
globally).<br />
<br />
Here's how:<br />
<code>
# Install python2.7 (Ubuntu 16.04 comes with python 3 out of the box) and Pip<br />
sudo apt-get install -y python2.7 python-pip<br />
<br />
## Use Pip to install virtualenv<br />
### -U updates it if the package is already installed<br />
sudo pip install -U virtualenv<br />
</code><br />
Once we have pip and virtualenv installed globally, we can get Ansible inside<br />
of a virtual environment:<br />
<code>
# Go to my user's home directory, <br />
# make a directory to play with ansible<br />
cd ~/<br />
mkdir ansible-play<br />
cd ansible-play<br />
<br />
# Create a python virtual environment<br />
virtualenv .venv<br />
# Enable the virtual environment<br />
source .venv/bin/activate<br />
<br />
# Then anything we intall with pip will be<br />
# inside that virtual environment<br />
pip install ansible<br />
</code><br />
Those commands will install the latest stable Ansible 2 (as of this writing).<br />
<br />
<b>Later, when you're done, you can deactivate the virtualenv via the deactivate command</b><br />
<br />
At any time, you can update ansible by running:<br />
<code>
# Assumes the virtualenv is active - `source .venv/bin/activate`<br />
# Assuming the virtualenv is active<br />
pip install -U ansible
</code></p>
<h3>Configuration</h3>
<p>
In my first article on Ansible (v1), I had us install Ansible globally <br />
and use some default configuration from /etc/ansible.<br />
<br />
However, a common use is to put Ansible in a virtualenv as we've <br />
done above. In that case, we won't have (or want!) those default files. <br />
We'll continue on this way - we can create the configuration files within <br />
our local directory as needed. We won't need any configuration files in <br />
/etc or other locations, which makes it a little more sane to use.
<h4>Managing Servers: Inventory</h4>
Ansible has you create an inventory file used to define which servers <br />
it will be managing. This file can be named anything, but we'll typically<br />
name it hosts.<br />
<br />
Within the hosts file, we can define some servers to manage. Here's <br />
we'll define two servers we may want to manage under the “<i>web</i>“ label. <br />
The label is arbitrary:<br />
<code><b>
[web]<br />
192.168.22.10<br />
192.168.22.11<br />
</b></code>
<br />
That's good enough for now. If needed, we can define ranges of hosts, <br />
multiple groups, reusable variables, and use other fancy setups, including<br />
creating a dynamic inventory.<br />
<br />
For testing this article, I spun up an Ubuntu 16.04 server on AWS (doesn't <br />
matter where or what cloud you use though). Then I then ran Ansible Tasks<br />
directly on that server. This means I'm running Ansible on the same server<br />
that I'm managing, which is valid way to run Ansible (although not it's main<br />
use case).<br />
<br />
When we run Ansible against the local machine, we don't need to care about<br />
what's in the inventory file - I'll show you running Ansible locally and against<br />
a remote server.<br />
<br />
For now, let's set the hosts file to point to local host under local and a fake <br />
remote host under the remote name:<br />
<code><b>
[local]<br />
127.0.0.1<br />
<br />
[remote]<br />
192.168.1.2<br />
</b></code>
<br />
I'll show you commands for running connects against localhost and remote servers.
</p>
<h3>Basics: Running Commands</h3>
<p>
<ul>
<li>Ansible will assume you have SSH access available to your servers, usually based on SSH-Key. Because Ansible uses SSH, the server it's on needs to be able to SSH into the inventory servers.
</li>
<li>However, Ansible will attempt to connect as the current user it is being run as. If I'm running Ansible as user ubuntu (as is the case for me on AWS), it will attempt to connect as user ubuntu on the other servers.
</li>
<li>If Ansible can directly SSH into the managed servers, we can run commands without too much fuss:
<pre><code># Run against localhost
$ ansible -i ./hosts --connection=local local -m ping
# Run against remote server
$ ansible -i ./hosts remote -m ping
127.0.0.1 | success >> {
"changed": false,
"ping": "pong"
}</code></pre>
</li>
<li>If you get an SSH error here for "Too many authentication failures", we can add some SSH options, and have Ansible ask us for our password to log in with:
<pre><code>ansible -i ./hosts --ask-pass --ssh-extra-args='-o "PubkeyAuthentication=no"' all -m ping</code></pre>
</li>
<li>Using --connection=local tells Ansible to not attempt to run the commands over SSH, since we're just affecting the local host. However, we still need a hosts file telling us where to connect to - it won't assume localhost or 127.0.0.1 by itself (for some reason!).
</li>
<li>In either case, we can see the output we get from Ansible is some JSON which tells us if the Task (our call to the ping module) made any changes and the result.
</li>
<li>Let's cover these commands:
<ul>
<li>-i ./hosts - Set the inventory file, the one named hosts
</li>
<li>remote, local, all - Use the servers defined under this label in the hosts inventory file. "all" is a special keyword to run against every server defined in the file
</li>
<li>-m ping - Use the "ping" module, which simply runs the ping command and returns the results
</li>
<li>-c local | --connection=local - Run commands on the local server, not over SSH
</li>
</ul>
</li>
<li><h4>Modules</h4>
Ansible uses "modules" to accomplish most of its Tasks. Modules can do things like install software, copy files, use templates and much more.
Modules are the way to use Ansible, as they can use available context ("Facts") in order to determine what actions, if any need to be done to accomplish a Task.
If we didn't have modules, we'd be left running arbitrary shell commands, and we might as well just use bash script. Here's what an arbitrary shell command looks like in Ansible (it's using the shell module!):
# Run against a local server
ansible -i ./hosts local --connection=local -b --become-user=root \
-m shell -a 'apt-get install nginx'
# Run against a remote server
ansible -i ./hosts remote -b --become-user=root all \
-m shell -a 'apt-get install nginx'
Here, the sudo apt-get install nginx command will be run using the "shell" module.
We have some new flags too:
-b - "become", tell Ansible to become another user when running the command. This is how you run as different users or promote yourself to the root user.
--become-user=root - Run the following commands as user "root" (e.g. use "sudo" with the command). We can define any existing user here.
-a used to pass any arguments to the module defined with -m
However this isn't particularly powerful. While it's handy to be able to run these commands on all of our servers at once, we still only accomplish what any bash script might do.
If we used a more appropriate module instead, we can run commands with an assurance of the result. Ansible modules ensure indempotence - we can run the same Tasks over and over without affecting the final result.
For installing software on Debian/Ubuntu servers, the "apt" module will run the same command, but ensure idempotence.
# Run against a local server
ansible -i ./hosts local --connection=local -b --become-user=root \
-m apt -a 'name=nginx state=installed update_cache=true'
127.0.0.1 | success >> {
"changed": false
}
# Run against a remote server
ansible -i ./hosts remote -b --become-user=root \
-m apt -a 'name=nginx state=installed update_cache=true'
127.0.0.1 | success >> {
"changed": false
}
This will use the apt module to update the repository cache and install Nginx (if not installed).
The result of running the Task was "changed": false. This shows that there were no changes; I had already installed Nginx using the shell module. The nice thing is that I can run this command over and over without worrying about it changing the desired result - Nginx is already installed, Ansible knows that, and doesn't attempt to re-install it.
Going over the command:
-i ./hosts - Set the inventory file, the one named hosts
-b - "become", tell Ansible to become another user to run the command
--become-user=root - Run the following commands as user "root" (e.g. use "sudo" with the command)
local | remote - Run on local or remote defined hosts from the inventory file
-m apt - Use the apt module
-a 'name=nginx state=installed update_cache=true' - Provide the arguments for the apt module, including the package name, our desired end state and whether to update the package repository cache or not
We can run all of our needed Tasks (via modules) in this ad-hoc way, but let's make this more managable. We'll move this Task into a Playbook, which can run and coordinate multiple Tasks.
</p>
<h3>Playbooks</h3>
<p>
Playbooks can run multiple Tasks and provide some more advanced functionality that we would miss out on using ad-hoc commands. Let's move the above Task into a playbook.
Playbooks and Roles in Ansible all use Yaml.
Create file nginx.yml:
---
# hosts could have been "remote" or "all" as well
- hosts: local
connection: local
become: yes
become_user: root
tasks:
- name: Install Nginx
apt:
name: nginx
state: installed
update_cache: true
This Task does exactly the same as our ad-hoc command, including setting the use of a local connection.
This would use the servers under the [local] label in the hosts file.
If we weren't using a local connection, we'd do something like this:
---
- hosts: remote
become: yes
become_user: root
tasks:
- name: Install Nginx
apt:
name: nginx
state: installed
update_cache: true
This would use the servers under the [remote] label in the hosts file.
Use use become and become_user again in our Tasks file to tell Ansible to use sudo to run commands as user root, and then pass the Playbook file.
With a Yaml playbook file, we need to use the ansible-playbook command, which becomes simpler to run now:
$ ansible-playbook -i ./hosts nginx.yml
PLAY [local] ******************************************************************
GATHERING FACTS ***************************************************************
ok: [127.0.0.1]
TASK: [Install Nginx] *********************************************************
ok: [127.0.0.1]
PLAY RECAP ********************************************************************
127.0.0.1 : ok=2 changed=0 unreachable=0 failed=0
We get some useful feedback while this runs, including the Tasks Ansible runs and their result. Here we see all ran OK, but nothing was changed. I have Nginx installed already.
Handlers
A Handler is exactly the same as a Task (it can do anything a Task can), but it will only run when called by another Task. You can think of it as part of an Event system; A Handler will take an action when called by an event it listens for.
This is useful for "secondary" actions that might be required after running a Task, such as starting a new service after installation or reloading a service after a configuration change.
---
# Example shows using the local machine still
# Remove 'connection' and set hosts to 'remote' for a remote connection
- hosts: local
connection: local
become: yes
become_user: root
tasks:
- name: Install Nginx
apt:
name: nginx
state: installed
update_cache: true
notify:
- Start Nginx
handlers:
- name: Start Nginx
service:
name: nginx
state: started
Here we add a notify directive to the installation Task. This notifies any Handler named "Start Nginx" after the Task is run.
Then we can create the Handler called "Start Nginx". This Handler is the Task called when "Start Nginx" is notified.
This particular Handler uses the Service module, which can start, stop, restart, reload (and so on) system services. In this case, we tell Ansible that we want Nginx to be started.
Note that Ansible has us define the state you wish the service to be in, rather than defining the change you want. Ansible will decide if a change is needed, we just tell it the desired result.
Let's run this Playbook again:
$ ansible-playbook -i ./hosts nginx.yml
PLAY [local] ******************************************************************
GATHERING FACTS ***************************************************************
ok: [127.0.0.1]
TASK: [Install Nginx] *********************************************************
ok: [127.0.0.1]
NOTIFIED: [nginx | Start Nginx] ***********************************************
ok: [127.0.0.1]
PLAY RECAP ********************************************************************
127.0.0.1 : ok=2 changed=0 unreachable=0 failed=0
We get the similar output, but this time the Handler was run.
Notifiers are only run if the Task is run. If I already had Nginx installed, the Install Nginx Task would not be run and the notifier would not be called.
We can use Playbooks to run multiple Tasks, add in variables, define other settings and even include other playbooks.
More Tasks
Next we can add a few more Tasks to this Playbook and explore some other functionality.
---
# Example shows using the local machine still
# Remove 'connection' and set hosts to 'remote' for a remote connection
- hosts: local
connection: local
become: yes
become_user: root
vars:
- docroot: /var/www/serversforhackers.com/public
tasks:
- name: Add Nginx Repository
apt_repository:
repo: ppa:nginx/stable
state: present
register: ppastable
- name: Install Nginx
apt:
pkg: nginx
state: installed
update_cache: true
when: ppastable|success
notify:
- Start Nginx
- name: Create Web Root
file:
path: '{{ docroot }}'
mode: 775
state: directory
owner: www-data
group: www-data
notify:
- Reload Nginx
handlers:
- name: Start Nginx
service:
name: nginx
state: started
- name: Reload Nginx
service:
name: nginx
state: reloaded
There are now three Tasks:
Add Nginx Repository - Add the Nginx stable PPA to get the latest stable version of Nginx, using the apt_repository module.
Install Nginx - Installs Nginx using the Apt module.
Create Web Root - Finally, create a web root directory.
Also new here are the register and when directives. These tell Ansible to run a Task when something else happens.
The "Add Nginx Repository" Task registers "ppastable". Then we use that to inform the Install Nginx Task to only run when the registered "ppastable" Task is successful. This allows us to conditionally stop Ansible from running a Task.
This particular example of only installing Nginx when the ppa repository was added is superfluous, as if adding the repository fails, Ansible will stop and report the error. However it's good to know the functionality exists.
You can register the results of a modules action as well, and use the variable defined in register to conditionally perform actions when based on the registered variables values. For example, registering the result of the command run via the shell module can let you access the stdout of that command.
We also use a variable. The docroot variable is defined in the var section. It's then used as the destination argument of the file module which creates the defined directory.
Note that the path configuration uses brackets {{ var-name }} - This is Jinja2 templating. In order for Ansible to parse the Jinja2 template variable within the brackets, the line must be in single or double quotes - e.g. path: '{{ docroot }}' instead of path: {{ docroot }}. Not using quotes will result in an error.
This playbook can be run with the usual command:
ansible-playbook -i ./hosts nginx.yml
So, we've run some ad-hoc commands, used Ansible modules, and organized a few related tasks into a playbook.
Next we'll take Ansible further by organizing the Playbook into a Role, which helps us organize related items such as files and templates, while also helping us organize more complex related tasks and actions.
</p>
<h3>Roles</h3>
<p>
Roles are good for organizing multiple, related Tasks and encapsulating data needed to accomplish those Tasks. For example, installing Nginx may involve adding a package repository, installing the package, and setting up configuration. We've seen installation via a Playbook, but once we start configuring our installations, the Playbooks tend to get a little more busy.
Furtermore, real-world configuration often requires extra data such as variables, files, dynamic templates and more. These tools can be used with Playbooks, but we can do better immediately by organizing related Tasks and data into one coherent structure: a Role.
Roles have a directory structure like this:
roles
rolename
- files
- handlers
- meta
- templates
- tasks
- vars
Within each directory, Ansible will search for and read any Yaml file called main.yml automatically.
We'll break apart our nginx.yml file and put each component within the corresponding directory to create a cleaner and more complete provisioning toolset.
Creating a Role
We can use the ansible-galaxy command to create a new role. This tool can be used to save roles to Ansible's public registry, however I generally just use it to bootrap a role locally.
Let's see how to set this up:
# Head to our previously created directory
cd ~/ansible-example
# In case we left our virtualenv at some point
source .venv/bin/activate
# Create a roles directory
mkdir roles
cd roles
# Bootstrap a new role named "nginx"
ansible-galaxy init nginx
The directory name roles is a convention Ansible uses to find roles when running a playbook. The directory should always be named roles.
The ansible-galaxy init nginx command, run within the roles directory, will create the directories/files needed to get started with a new role.
Let's run through each part of our new Nginx role found at ~/ansible-example/roles/nginx.
Files
First, within the files directory, we can add files that we'll want copied into our servers. For Nginx, I often copy H5BP's Nginx component configurations. I simply download the latest from Github, make any tweaks I want, and put them into the files directory.
~/ansible-example
- roles
- - nginx
- - - files
- - - - h5bp
As we'll see in a bit, the H5BP configuration files will be added to the server via the copy module.
Handlers
Inside of the handlers directory, we can put all of our Handlers that were once within the nginx.yml Playbook.
Inside of handlers/main.yml:
---
- name: Start Nginx
service:
name: nginx
state: started
- name: Reload Nginx
service:
name: nginx
state: reloaded
Once these are in place, we can reference them from other yaml configuration freely.
Meta
The main.yml file within the meta directory contains Role meta data, including dependencies.
If this Role depended on another Role, we could define that here. For example, I have the Nginx Role depend on the SSL Role, which installs SSL certificates.
---
dependencies:
- { role: ssl }
If I called the "nginx" Role, it would attempt to first run the "ssl" Role.
Otherwise we can omit this file, or define the Role as having no dependencies:
---
dependencies: []
Template
Template files can contain template variables, based on Python's Jinja2 template engine. Files in here should end in .j2, but can otherwise have any name. Similar to files, we won't find a main.yml file within the templates directory.
Here's an example Nginx server ("virtual host") configuration. Note that it uses some variables which we'll define later in the vars/main.yml file.
This Nginx config file in our example is placed at templates/serversforhackers.com.conf.j2:
server {
# Enforce the use of HTTPS
listen 80 default_server;
server_name {{ domain }};
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl default_server;
root /var/www/{{ domain }}/public;
index index.html index.htm index.php;
access_log /var/log/nginx/{{ domain }}.log;
error_log /var/log/nginx/{{ domain }}-error.log error;
server_name {{ domain }};
charset utf-8;
include h5bp/basic.conf;
ssl_certificate {{ ssl_crt }};
ssl_certificate_key {{ ssl_key }};
include h5bp/directive-only/ssl.conf;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; }
location ~ \.php$ {
include snippets/fastcgi.conf;
fastcgi_pass unix:/var/run/php7.1-fpm.sock;
}
}
This is a fairly standard Nginx configuration for a PHP application. There are three variables used here:
domain
ssl_crt
ssl_key
These three variables will be defined in the variables section.
Variables
Before we integrate everything together using the Tasks, let's look at variables. The vars directory contains a main.yml file which simply lists variables we'll use. This provides a convenient place for us to change configuration-wide settings.
Here's what the vars/main.yml file might look like:
---
domain: serversforhackers.com
ssl_key: /etc/ssl/sfh/sfh.key
ssl_crt: /etc/ssl/sfh/sfh.crt
These are three variables which we can use elsewhere in this Role. We saw them used in the template above, but we'll see them in our defined Tasks as well.
If you have sensitive information to add into a variable file, you can encrypt the file using ansible-vault, which is explained more below.
Tasks
Let's finally see this all put together into a series of Tasks.
The main file run when we use a role is the tasks/main.yml file. Let's see what that will look like for our use case:
---
- name: Add Nginx Repository
apt_repository:
repo: ppa:nginx/stable
state: present
- name: Install Nginx
apt:
pkg: nginx
state: installed
update_cache: true
notify:
- Start Nginx
- name: Add H5BP Config
copy:
src: h5bp
dest: /etc/nginx
owner: root
group: root
- name: Disable Default Site Configuration
file:
dest: /etc/nginx/sites-enabled/default
state: absent
# `dest` in quotes as a variable is used!
- name: Add SFH Site Config
register: sfhconfig
template:
src: serversforhackers.com.j2
dest: '/etc/nginx/sites-available/{{ domain }}.conf'
owner: root
group: root
# `src`/`dest` in quotes as a variable is used!
- name: Enable SFH Site Config
file:
src: '/etc/nginx/sites-available/{{ domain }}.conf'
dest: '/etc/nginx/sites-enabled/{{ domain }}.conf'
state: link
# `dest` in quotes as a variable is used!
- name: Create Web root
file:
dest: '/var/www/{{ domain }}/public'
mode: 775
state: directory
owner: www-data
group: www-data
notify:
- Reload Nginx
# `dest` in quotes as a variable is used!
- name: Web Root Permissions
file:
dest: '/var/www/{{ domain }}'
mode: 775
state: directory
owner: www-data
group: www-data
recurse: yes
notify:
- Reload Nginx
This is a longer series of Tasks, which makes for a more complete installation of Nginx. The Tasks, in order of appearance, accomplish the following:
Add the nginx/stable repository
Install & start Nginx
Add H5BP configuration files
Disable the default Nginx configuration by removing the symlink to the default file from the sites-enabled directory
Copy the serversforhackers.com.conf.j2 virtual host template into the Nginx configuration, rendering the template as it does
Enable the Nginx server configuration by symlinking it to the sites-enabled directory
Create the web root directory
Change permission (recursively) for the project root directory, which is one level above the web root created previously
There's some new modules (and new uses of some we've covered), including copy, template, & file modules. By setting the arguments for each module, we can do some interesting things such as ensuring files are "absent" (delete them if they exist) via state: absent, or create a file as a symlink via state: link. You should check the docs for each module to see what interesting and useful things you can accomplish with them.
Running the Role
To run one or more roles against a server, we'll re-use another playbook. The playbook should be in the same directory as the roles directory, which is where we need to cd into as well when running the ansible-playbook command.
Remove the ssl dependency from meta/main.yml before running this Role if you are following along and added that.
Let's create a "master" yaml file which defines the Roles to use and what hosts to run them on:
File ~/ansible-example/server.yml, which is in the same directory as the roles directory:
<code><pre>
---
# run locally here, yadda yadda yadda
- hosts: local
connection: local
roles:
- nginx
</pre></code>
So, instead of defining all our variables and tasks in this Playbook file, we simply define the Role. The Role takes care of the gritty details.
Then we can run the Role(s):
ansible-playbook -i ./hosts server.yml
Here's the output from the run of the Playbook file, which runs the Nginx Role:
<code><pre>
PLAY [all] ********************************************************************
GATHERING FACTS ***************************************************************
ok: [127.0.0.1]
TASK: [nginx | Add Nginx Repository] ******************************************
changed: [127.0.0.1]
TASK: [nginx | Install Nginx] *************************************************
changed: [127.0.0.1]
TASK: [nginx | Add H5BP Config] ***********************************************
changed: [127.0.0.1]
TASK: [nginx | Disable Default Site] ******************************************
changed: [127.0.0.1]
TASK: [nginx | Add SFH Site Config] *******************************************
changed: [127.0.0.1]
TASK: [nginx | Enable SFH Site Config] ****************************************
changed: [127.0.0.1]
TASK: [nginx | Create Web root] ***********************************************
changed: [127.0.0.1]
TASK: [nginx | Web Root Permissions] ******************************************
ok: [127.0.0.1]
NOTIFIED: [nginx | Start Nginx] ***********************************************
ok: [127.0.0.1]
NOTIFIED: [nginx | Reload Nginx] **********************************************
changed: [127.0.0.1]
PLAY RECAP ********************************************************************
127.0.0.1 : ok=8 changed=7 unreachable=0 failed=0
</pre></code>
Awesome, we put all the various components together into a coherent Role and now have Nginx installed and configured!
</p>
<h3>Facts</h3>
<p>
Notice that the first line when running a playbook is always "gathering facts".
Before running any Tasks, Ansible will gather information about the system it's provisioning. These are called Facts, and include a wide array of system information such as the number of CPU cores, available ipv4 and ipv6 networks, mounted disks, Linux distribution and much more.
Facts are often useful in Tasks or Template configurations. For example Nginx is commonly set to use as many worker processors as there are CPU cores. Knowing this, you may choose to set your template of the nginx.conf.j2 file like so:
<code><pre>
user www-data;
worker_processes {{ ansible_processor_cores }};
pid /var/run/nginx.pid;
# And other configurations...
</pre></code>
Or if you have a server with multiple CPU's, you can use:
<code><pre>
user www-data;
worker_processes {{ ansible_processor_cores * ansible_processor_count }};
pid /var/run/nginx.pid;
# And other configurations...
</pre></code>
Ansible facts all start with anisble_ and are globally available for use any place variables can be used: Variable files, Tasks, and Templates.
Try running the following against your local machine to see what facts are available:
<code><pre>
# Run against a local server
# Note that we say to use "localhost" instead of defining a hosts file here!
ansible -m setup --connection=local localhost
# Run against a remote server
ansible -i ./hosts remote -m setup
</pre></code>
</p>
<h3>Vault</h3>
<p>
We often need to store sensitive data in our Ansible templates, Files or Variable files; It unfortunately cannot always be avoided (which is a pain when we check these files into a remote Git repository). Ansible has a solution for this called Ansible Vault.
Vault allows you to encrypt any Yaml file, which typically boil down to our Variable files. Vault will not encrypt Files and Templates, only Yaml files.
When creating an encrypted file, you'll be asked a password which you must use to edit the file later and when calling the Roles or Playbooks.
Keep the password you create somewhere safe.
For example we can create a new Variable file:
<code><pre>
ansible-vault create vars/main.yml
Vault Password:
</pre></code>
After entering in the encryption password, the file will be opened in your default editor, usually Vim or Nano.
The editor used is defined by the EDITOR environmental variable. The default is usually Vim. If you are not a Vim user, you can change it quickly by setting the environmental variabls:
EDITOR=nano ansible-vault edit vars/main.yml
T> The editor can be set in the users profile/bash configuration, usually found at ~/.profile, ~/.bashrc, ~/.zshrc or similar, depending on the shell and Linux distribution used.
Ansible Vault itself is fairly self-explanatory. Here are the commands you can use:
<code><pre>
$ ansible-vault -h
Usage: ansible-vault [create|decrypt|edit|encrypt|rekey] \
[--help] [options] file_name
Options:
-h, --help show this help message and exit
</pre></code>
For the most part, we'll use ansible-vault create|edit /path/to/file.yml. Here, however, are all of the available commands:
<ul>
<li><b>create</b> - Create a new file and encrypt it</li>
<li><b>decrypt</b> - Create a plaintext file from an encrypted file</li>
<li><b>edit</b> - Edit an already-existing encrypted file</li>
<li><b>encrypt</b> - Encrypt an existing plain-text file</li>
<li><b>rekey</b> - Set a new password on a encrypted file</li>
</ul>
If you have an existing configuration file to encrypt, use ansible-vault encrypt /path/to/file.yml.
Example: Users
Let's pretend we have a second Role named "users":
<code><pre>
cd ~/ansible-example/roles
ansible-galaxy init users
</pre></code>
I use Vault when creating new users and setting their passwords. In a User Role, you can set a Variable file with users' passwords and a public key to add to the users' authorized_keys file (thus giving you SSH access).
T> Public SSH keys are technically safe for the general public to see - all someone can do with them is allow you access to their own servers. Public keys are intentionally useless for gaining access to a sytem without the paired private key, which we are not putting into this Role.
Here's an example variable file which can be created and encrypt with Vault. While editing it, it's of course in plain-text.
Here is file ~/ansible-example/roles/users/variables/main.yml:
<code><pre>
admin_password: $6$lpQ1DqjZQ25gq9YW$mHZAmGhFpPVVv0JCYUFaDovu8u5EqvQi.Ih
deploy_password: $6$edOqVumZrYW9$d5zj1Ok/G80DrnckixhkQDpXl0fACDfNx2EHnC
common_public_key: ssh-rsa ALongSSHPublicKeyHere
</pre></code>
Note that the passwords for the users are also hashed. You can read Ansible's documentation on generating encrypted passwords, which the User module requires to set a user password. As a quick primer, it looks like this on Ubuntu:
<code><pre>
# The whois package makes the mkpasswd
# command available on Ubuntu
$ sudo apt-get install -y whois
# Create a password hash
$ mkpasswd --method=SHA-512
Password:
</pre></code>
This will generate a hashed password for you to use with the user module.
The passwords in the variable file are hashed, but I still like encrypting the yaml file containing the hashed passwords. Often these files contain unhashed data such as API tokens or SSH private keys, making encryption very important.
Once you have set the user passwords and added the public key into the Variables file we can encrypt the file and then make a Task to use these encrypted variables.
<code><pre>
ansible-vault encrypt roles/users/variables/main.yml
> INPUT PASSWORD
</pre></code>
Then we can edit our tasks file to use add our new users with the (encrypted) variables:
Here is file ~/ansible-example/roles/users/tasks/main.yml:
<code><pre>
---
- name: Create Admin User
user:
name: admin
password: '{{ admin_password }}'
groups: sudo
append: yes
shell: /bin/bash
- name: Add Admin Authorized Key
authorized_key:
user: admin
key: '{{ common_public_key }}'
state: present
- name: Create Deploy User
user:
name: deploy
password: '{{ deploy_password }}'
groups: www-data
append: yes
shell: /bin/bash
- name: Add Deployer Authorized Key
authorized_key:
user: deploy
key: '{{ common_public_key }}'
state: present
</pre></code>
These Tasks use the user module to create new users, passing in the passwords set in the Variable file.
It also uses the authorized_key module to add the SSH pulic key as an authorized SSH key in the server for each user.
Encrypted variables are used like usual within the Tasks file. However, in order to run this Role, we'll need to tell Ansible to ask for the Vault password so it can unencrypt the variables.
Let's edit our server.yml Playbook file to call our user Role:
<code><pre>
---
# Local connection here, yadda yadda yadda
- hosts: local
connection: local
sudo: yes
roles:
- nginx
- user
</pre></code>
To run this Playbook, we need to tell Ansible to ask for the Vault password, as we're running a Role which contains an encrypted file:
ansible-playbook --ask-vault-pass -i ./hosts server.yml
</p>
<h3>Recap</h3>
<p>
Here's what we did:
<ul>
<li> Installed Ansible</li>
<li> Configured an Ansible inventory file (only technically needed when not using connection: local)</li>
<li> Ran idempotent ad-hoc commands on multiple servers simultaneously</li>
<li> Created a basic Playbook to run multiple Tasks, using Handlers</li>
<li> Abstracted the Tasks into a Role to keep everything Nginx-related organized</li>
<ul>
<li> Saw how to set dependencies</li>
<li> Saw how to register Task "dependencies" and run other Tasks only if they are successful</li>
<li> Saw how to use more templates, files and variables in our Tasks</li>
</ul>
<li> Saw how to incorporate Ansible Facts</li>
<li> Saw how to use Ansible Vault to add security to our variables</li>
</ul>
We covered a lot of ground, and it will get you pretty far. However, there are many more tools provided by Ansible to explore!
If this edition piqued your interest, the Servers for Hackers eBook goes into more depth with Ansible and many other topics!
</p>
<h3>Additional Resources</h3>
<p>
Many more example Roles in the Servers for Hackers Github repo.
Use Ansible Vault to encrypt secure data, making it more safe if your playbooks or Roles end up in version control or are otherwise shared
See the Module Index for more information on available modules
There are a lot of useful things you can do with Ansible. Explore the documentation! ommon_public_key }}" state=present
These Tasks use the `user` module to create new users, passing in the passwords set in the Variable file.
It also uses the `authorized_key` module to add the SSH pulic key as an authorized SSH key in the server for each user.
Variables are used like usual within the Tasks file. However, in order to run this Role, we'll need to tell Ansible to ask for the Vault password so it can unencrypt the variables.
Let's setup a `provision.yml` Playbook file to call our `user` Role:
<code><pre>
```yaml
---
- hosts: all
sudo: yes
roles:
- user
</pre></code>
To run this Playbook, we need to tell Ansible to ask for the Vault password, as we're running a Role which contains an encrypted file:
<code><pre>
ansible-playbook --ask-vault-pass provision.yml
</pre></code>
</p>
Link:<br />
<a href="https://serversforhackers.com/c/an-ansible2-tutorial" target="_blank">https://serversforhackers.com/c/an-ansible2-tutorial</a><br />
<br />
</html>
<html>
<meta ansible-inventory ansible-doc />
<ul>
<li><h3>ansible‐config :: </h3>
utility that allows users to see all the configuration settings <br />
available, their defaults, how to set them and where their<br />
current value comes from.
</li>
<br />
<li><h3>ansible‐console :: </h3>
is a REPL (read ‐ eval ‐ print ‐ loop)<br />
<br />
<b>Optionen:</b>
<ul>
<li></li>
</ul>
</li>
<br />
<li><h3>ansible‐doc :: </h3>
<b>Optionen:</b>
<ul>
<li>‐l :: sämtliche zur Verfügung stehende Module auflisten</li>
</ul>
</li><br />
<li><h3>ansible‐playbook :: </h3>
<b>Optionen:</b>
<ul>
<li>‐‐check</li>
<li>‐‐diff</li>
</ul>
</li><br />
<li><h3>ansible‐inventory:: </h3>
<b>Optionen:</b>
<ul>
<li>‐‐list</li>
<li>‐‐graph</li>
<li>‐‐vars</li>
</ul>
</li><br />
<li><h3>ansible‐vault :: </h3>
<h4>Links:</h4>
<a href="https://docs.ansible.com/ansible/latest/cli/ansible-vault.html" target="_blank" rel="noreferrer noopener">Ansible Dokumentation :: ansible-vault</a>
</li><br />
</ul>
<h3>Links:</h3>
<a href="https://docs.ansible.com/ansible/latest/reference_appendices/config.html" target=_blank> Ansible-Doku :: Configuration</a>
</html>
<html>
<ul>
<li><b>‐m <em>ModulName</em></b><br />
Angabe des Moduls, das verwendet werden soll;
</li>
<li><b>‐‐check</b><br />
sozusagen ein dry-run für Ansible;
</li>
<li><b>‐‐diff</b><br />
gibt die Unterschiede resp. die Änderungen, <br />
die gemacht wurden, aus;
</li>
</ul>
</html>
<html>
<a href="https://www.cyberciti.biz/programming/vim-plug-a-beautiful-and-minimalist-vim-plugin-manager-for-unix-and-linux-users" target="_blank">nixCraft :: vim-plug: A beautiful and minimalist vim plugin manager for Unix and Linux users</a>
</html>
<html>
<meta Build Management Tool />
<ul>
<li><b>Apache Ant</b> (englisch für Ameise) ist ein in Java geschriebenes<br />
Programm zum automatisierten Erzeugen von ausführbaren <br />
Computerprogrammen aus Quelltexten.</li>
<br />
<li>Es erfüllt den gleichen Zweck wie das sehr verbreitete Programm<br />
make, nämlich die automatisierte Erstellung von installierbaren <br />
Software‐Paketen aus existierendem Quelltext, Bibliotheken und<br />
sonstigen Dateien. </li>
<br />
<li>Ant ist Open Source und ist ein Akronym. Es steht für „Another<br />
Neat Tool“ (englisch für „Noch ein hübsches Werkzeug“). </li>
<br />
<li>Im Gegensatz zu make ist Ant in Java implementiert, und benötigt<br />
somit zur Ausführung eine <b>Java-Laufzeitumgebung (JRE)</b>.</li>
<br />
<li>Weiteres:
<ul>
<li> Apache Maven – konkurrierendes Build-Management-Tool für Java</li>
<li>Apache Ivy – Subprojekt von Apache Ant zur Verwaltung und Einbindung von Abhängigkeiten</li>
<li> Gradle – weiteres Build-Management-Tool für Java</li>
</ul>
</li></ul>
</html>
<html>
<ul>
<li><pre><code>$ for i in $(\ls -1 *.html); do echo "mv $(basename ${i} html){html,txt}"; done</code></pre>
</li>
<li>Ausgabe:
<pre><code>mv AWS-Bootcamp_TF_01_Course-Overview.{html,txt}
mv AWS-Bootcamp_TF_01_HashiCorp-Stack.{html,txt}
mv AWS-Bootcamp_TF_01_HOL-Installing-Terraform-on-Linux.{html,txt}
mv AWS-Bootcamp_TF_01_HOL-Installing-Terraform-on-macOS.{html,txt}
mv AWS-Bootcamp_TF_01_HOL-Installing-Terraform-on-Windows.{html,txt}
mv AWS-Bootcamp_TF_01_HOL-Installing-VS-Code-Extensions.{html,txt}
mv AWS-Bootcamp_TF_01_The-HCTA0-003-Exam.{html,txt}
mv AWS-Bootcamp_TF_01_Understanding-Infrastructure-as-Code.{html,txt}
mv AWS-Bootcamp_TF_01_Understanding-Terraform.{html,txt}</code></pre>
</li>
<li><pre><code>$ for i in $(\ls -1 *.html); do mv $(basename ${i} html){html,txt}; done</code></pre>
</li>
<li>Ausgabe:
<pre><code>
Datei umbenannt 'AWS-Bootcamp_TF_01_Course-Overview.html' -> 'AWS-Bootcamp_TF_01_Course-Overview.txt'
Datei umbenannt 'AWS-Bootcamp_TF_01_HashiCorp-Stack.html' -> 'AWS-Bootcamp_TF_01_HashiCorp-Stack.txt'
Datei umbenannt 'AWS-Bootcamp_TF_01_HOL-Installing-Terraform-on-Linux.html' -> 'AWS-Bootcamp_TF_01_HOL-Installing-Terraform-on-Linux.txt'
Datei umbenannt 'AWS-Bootcamp_TF_01_HOL-Installing-Terraform-on-macOS.html' -> 'AWS-Bootcamp_TF_01_HOL-Installing-Terraform-on-macOS.txt'
Datei umbenannt 'AWS-Bootcamp_TF_01_HOL-Installing-Terraform-on-Windows.html' -> 'AWS-Bootcamp_TF_01_HOL-Installing-Terraform-on-Windows.txt'
Datei umbenannt 'AWS-Bootcamp_TF_01_HOL-Installing-VS-Code-Extensions.html' -> 'AWS-Bootcamp_TF_01_HOL-Installing-VS-Code-Extensions.txt'
Datei umbenannt 'AWS-Bootcamp_TF_01_The-HCTA0-003-Exam.html' -> 'AWS-Bootcamp_TF_01_The-HCTA0-003-Exam.txt'
Datei umbenannt 'AWS-Bootcamp_TF_01_Understanding-Infrastructure-as-Code.html' -> 'AWS-Bootcamp_TF_01_Understanding-Infrastructure-as-Code.txt'
Datei umbenannt 'AWS-Bootcamp_TF_01_Understanding-Terraform.html' -> 'AWS-Bootcamp_TF_01_Understanding-Terraform.txt'</code></pre>
</li>
</ul>
</html>
<html>
<h4>Installation</h4>
s. Dokument "TheGeekStuff_InstallApache2FromSourceOnLinux.pdf"
<h4>Konfiguration</h4>
- bzgl. des Konfigurationsfile sind mir folgende Unterschiede aufgefallen:<br />
<table border="1">
<tr><th>_</th><th>Manuelle<br /> Installation</th><th>Installation via<br /> Yast/Zypper</th><th>Installation unter<br /> Debian</tr>
<tr><td>Konfig-File: </td><td> /usr/local/apache2/httpd.conf </td><td> /etc/apache2/httpd.conf </td><td> /etc/apache2/apache2.conf</td></tr>
<tr><td>User: </td><td> daemon - daemon </td><td> wwwrun - www</td><td>www-data - www-data</td></tr>
<tr><td>Server-Root-Dir: </td><td> /usr/local/apache2 </td><td> /srv/www</td><td></td></tr>
<tr><td>Document-Root-Dir: </td><td> /usr/local/apache2/htdocs </td><td> /srv/www/htdocs,<br />
definiert in default-server.conf</td><td>/var/www/html</td></tr>
<tr><td>CGI-BIN-Dir: </td><td> /usr/local/apache2/cgi-bin </td><td> /srv/www/cgi-bin, <br />definiert in default-server.conf</td><td>/usr/lib/cgi-bin</td></tr>
</table>
<br />
die Einstellungen in der ersten Spalte sind bei einer manuellen,<br />
diejenigen in der zweiten Spalte bei einer Installation über Yast<br />
vorzufinden. (Vermutung?)<br />
<br />
(ob das nur für SuSE-Distro gilt, aktuell schleierhaft)<br />
<h4>Installation überprüfen</h4>
- im Browser die Adresse <b>http://localhost</b> eingeben<br />
→ ist alles ok, so muss 'It Works!' erscheinen<br />
<br />
- erscheint "Directory index forbidden by Options directive:",<br />
dann überprüfen, ob das File index.html im Verzeichnis "Document-Root-Dir" liegt
<h4>Restart von der Shell aus</h4>
*apache2ctl graceful* bzw. *apachectl -k graceful*
<h4>Logfile</h4>
*/var/log/httpd/error_log* bzw. */var/log/apache2/error.log*
<h4>Literatur</h4>
<ul>
<li>"Apache Cookbook" von Ken Coar und Rich Bowen (O\u2019Reilly)</li>
<li>"Pro Apache" von Peter Wainwright (Apress)</li>
<li>"Run Your Own Web Server Using Linux & Apache" von Stuart Langridge und Tony Steidler-Dennison (SitePoint)</li>
</ul>
</html>
<html>
<ul>
<li> Webserver manuell restarten:
<pre><code>sudo service apache2 restart</pre></code>
</li>
<li>Webserver stoppen:
<pre><code>/etc/init.d/apache2 stop</pre></code>
</li>
</ul>
</html>
Geben Sie den Text für 'Neuer Tiddler' ein
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://riptutorial.com/de/oozie" target=_blank>RipTutorial</a></li>
<li><a href="https://www.tutorialspoint.com/apache_oozie/apache_oozie_introduction.htm" target=_blank>Tutorialspoint :: Apache Oozie introduction</a></li>
<li><a href="https://docs.microsoft.com/de-de/azure/hdinsight/hdinsight-use-oozie-linux-mac" target=_blank>Microsoft :: Use Oozie</a></li>
<!-- li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li -->
</ul>
</html>
<html>
<ul>
<li><h4>Hadoop:</h4>
durch HW skalierbare Lösung zur Analyse von <br />
strukturierten und unstrukturierten Daten;</li>
<br />
<li><h4>“Normale“ (SQL‐)DB:</h4>
Sie speichern Daten in einem festen Schema ab <br />
→ dieses Schema muß bereits vor dem Laden <br />
der Daten definiert sein<br />
→ sog. <em>Schema‐on‐Write‐Prinzip;</em><br />
z.B. Oracle, Sybase, PostgreSQL;</li>
<br />
<li>Im Hadoop‐File System (HDFS) wird ein Schema<br />
(erst ?) bei lesendem Zugriff erstellt;</li>
<br />
<li>Apache Spark ist ein Allzweck‐Tool zur Daten‐<br />
verarbeitung, eine sog. <em>Daten‐Processing Engine;</em></li>
<br />
</ul>
</html>
<html>
<ul>
<li><a href="https://zeppelin.apache.org" target=_blank> Homepage Zeppelin</a></li>
<li>web-based notebook</li>
<li>enables:<ol><li>data-driven, interactive data analytics</li>
<li>collaborative documents with SQL, Scala et.al.</li>
</ol></li>
<li>akt. Version: 0.8 (Stand: 07/2019)</li>
<li>Zeppelin arbeitet u.a. mit SQL, Spark und Python</li>
</ul>
</html>
<html>
<ol>
<li><b>Download:</b><br />
<code><b>wget http://mirror.synyx.de/apache/zookeeper/stable/</b></code><br />
→ Files:<br />
<ul>
<li><code><b>apache-zookeeper-3.5.6-bin.tar.gz</b></code> (Executable, mit jar-Files)</li>
<li>Alternativ: <code><b>apache-zookeeper-3.5.6.tar.gz</b></code> (Muss neu übersetzt werden)</li>
</ul>
<br />
<li><b>tar-File extrahieren:</b><br />
<code><b>tar -xzf zookeeper-?.?.?-bin.tar.gz<br />
cd zookeeper-?.?.?<br />
mkdir data</b></code><br />
<br />
<li><b>Config-File erstellen</b><br />
<code><b>vi conf/zoo.cfg</b></code><br />
→ einige Parameter neu setzen
</li>
<br />
<li><b>Starten des Zookeeber-Servers:</b><br />
<code><b>bin/zkServer.sh start</b></code><br />
<br />
→ Ausgabe:<br />
<code>
mueller@Debian-Laptop:~/Programme/ApacheKafka/apache-zookeeper-3.5.6$ ./bin/zkServer.sh start<br />
/usr/bin/java<br />
ZooKeeper JMX enabled by default<br />
Using config: /home/mueller/Programme/ApacheKafka/apache-zookeeper-3.5.6/bin/../conf/zoo.cfg<br />
Starting zookeeper ... STARTED<br />
mueller@Debian-Laptop:~/Programme/ApacheKafka/apache-zookeeper-3.5.6$
</code><br />
<br />
Liste der Aufruf-/Startparameter:<br />
[start | start-foreground | print-cmd | stop | restart | status ]<br />
<br />
</li>
<li><b>CommandLine-Interface (CLI) starten:</b><br />
<code><b>bin/zkCli.sh</b></code><br /><br />
→ letztendlich erscheint ein Prompt:<br />
<code>[zk: localhost:2181(CONNECTED) 0] </code><br />
<br />
→ um diese “Shell“ wieder zu verlassen:<br />
<code>quit</code>
</li>
<br />
<li><b>Stoppen des Zookeeper‐Server:</b><br />
<code><b> ./bin/zkServer.sh stop</b></code><br />
<br />
→ Ausgabe:<br />
<code>
/usr/bin/java<br />
ZooKeeper JMX enabled by default<br />
Using config: <br />
/home/mueller/Programme/ApacheKafka/apache-zookeeper-3.5.6-bin/bin/../conf/zoo.cfg<br />
Stopping zookeeper ... STOPPED
</code></li>
</ol>
<h3>Mögliche Fehller:</h3>
<ol>
<b>Fehler: Hauptklasse org.apache.zookeeper.server.quorum.QuorumPeerMain konnte nicht gefunden oder geladen werden</b><br />
→ die jar-Files fehlten, hatte die “normale“-Version verwendet;<br />
Nach der Installation der bin-Version funktionierte alles
</ol>
<h3>Links:</h3>
<a href="https://cwiki.apache.org/confluence/display/ZOOKEEPER/Index" target=_blank>Apache Zookeeper :: Confluence-Wiki</a>
</html>
<html>
<ul>
<li>Nach § 2 Absatz 1 ArbZG wird die Arbeitszeit als ein Zeitraum definiert, <br />
der vom Beginn der Arbeit bis zu dessen Ende andauert. Die Ruhepausen <br />
werden nicht berücksichtigt.</li>
<li><h3>Mittagspause ‐ Unterbrechung der Arbeitszeit zur Nahrungsaufnahme</h3>
<u><em>Ist die Mittagspause verpflichtend?</em></u><br />
Laut geltendem Arbeitsrecht ist die Mittagspause Pflicht. Schließlich ist sie als<br />
Ruhepause gemäß § 4 Arbeitszeitgesetz (ArbZG) anzusehen.<br />
<br />
<u><em>Wie lange muss die Mittagspause andauern?</em></u><br />
Beträgt die Arbeitszeit mehr als sechs Stunden, muss die Mittagspause mindestens<br />
30 Minuten umfassen. Sie kann jedoch in zwei Blöcke von jeweils 15 Minuten aufge‐<br />
teilt werden. Arbeiten Sie länger als neun Stunden, muss die Mittagspause sogar 45<br />
Minuten andauern.<br />
<br />
<u><em>Muss die Mittagspause vergütet werden?</em></u><br />
Da die Mittagspause nicht zur Arbeitszeit zählt, wird in dieser Zeit normalerweise<br />
auch keine Vergütung gezahlt.<br />
</li>
<li><h4>Wichtig!</h4>
Nicht nur der Arbeitgeber ist angehalten, darauf zu achten, dass der Arbeitnehmer<br />
die Pausenzeiten einhält, auch der Mitarbeiter selbst muss nach gültigem Arbeits‐<br />
recht eine Mittagspause spätestens nach sechs Stunden einlegen. Sie dürfen nicht<br />
durcharbeiten, um früher zu Hause zu sein. Die Mittagspause ist demnach Pflicht!<br />
<br />
<u><em>Zählt die Mittagspause zur Arbeitszeit?</em></u><br />
Die Mittagspause ist kein Bestandteil der Arbeitszeit. Denn gemäß § 2 Abs. 1 ArbZG<br />
beschreibt die Arbeitszeit die Dauer der Arbeit ohne die Ruhepausen. Eine Pause und<br />
damit auch die Mittagspause beschreibt ein Unterbrechen der Arbeit.<br />
<br />
Damit wird die Mittagspause nicht vergütet. Bezahlte Pausen gibt es laut Arbeitsrecht<br />
nur in bestimmten Branchen und stellen damit eine Ausnahme dar.<br />
<br />
Eine Mittagspause wird nur bezahlt, wenn dies gesondert vereinbart wurde und vor<br />
allem nur dann, wenn es sich um Tätigkeiten handelt, bei denen die menschliche<br />
Leistungsvoraussetzungen schnell beeinträchtigt wird und hierdurch die Qualität<br />
des Arbeitsprozesses leidet.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.gansel-rechtsanwaelte.de/arbeitsrecht-arbeitnehmer/arbeitszeit-das-sind-ihre-rechte-laut-arbeitszeitgesetz#was-ist-arbeitszeit" target="_blank" rel="noreferrer noopener">RA Gansel :: Was ist Arbeitszeit</li>
<li><a href="https://www.arbeitsrechte.de/mittagspause/" target="_blank" rel="noreferrer noopener">Arbeitsrechte.de :: Mittagspause</li>
</ul>
</html>
<html>
<ul>
<li>Fileendung: .xz </li>
<li>zur Verfügung stehende Befehle:
<ul>
<li>xzless, xzmore </li>
<li>xzcmp, xzdiff </li>
<li>xz, unxz, xzcat </li>
</ul> </li>
<li>Empfehlung: <br /> beim Dekomprimieren den Befehl <b>xz</b> mit den entsprechenden Argumenten<br />
statt unxz oder xzcat verwenden<br />
⇒ <b>xz -d</b> bzw. <b>xz -dc</b></li>
<li>unterstützt auch das veraltete LZMA-Format </li>
<li>Operation Modes:
<ul>
<li>-z, --compress </li>
<li>-d, --de-/--uncompress </li>
<li>-t, --test<br />
testet die Integrität der komprimierten Files </li>
<li>-l, --list<br />
gibt Informationen über die komprimierten Files aus </li>
</ul><br /> Die Ausgabe erfolgt zeilenweise;<br />
Für genauere Informationen ⇒ "--verbose" (auch mehrfach) verwenden (! time consuming !);<br />
Überschreitet die Ausgabe die Grenze von 80 Zeichen, <br />
den Datenstrom z.B. durch "less -S" zu pipen (sollte das Terminal nicht breit genug);</li>
</ul>
</html>
<html>
Die Archiving Groups unterteilen sich in folgende Gruppen:<br>
1. H<nr>_H1S<br>
und<br>
2. HS<nr>_HIS<br>
<br>
Verbindung/Zusammenführung von Instrument und Markt<br>
unter einem anderen Gesichtspunkt als bei "Contract" <br>
--> historische Daten
</html>
<html>
<h3>Datenblatt Asus Eee PC 1001P (Eee PC 1001 Serie)</h3>
<table border="1">
<tr>
<td>Prozessor
</td>
<td>Intel Atom N450 1 x 1.7 GHz (Intel Atom)
</td>
<tr>
</tr>
<td>Grafikkarte
</td>
<td>Intel Graphics Media Accelerator (GMA) 3150
</td>
<tr>
</tr>
<td>Hauptspeicher
</td>
<td>1024 MB, PC2-6400
</td>
<tr>
</tr>
<td>Bildschirm
</td>
<td>10.10 Zoll 16:10, 1024 x 600 Pixel, spiegelnd: nein
</td>
<tr>
</tr>
<td>Mainboard
</td>
<td>Intel NM10
</td>
<tr>
</tr>
<td>Massenspeicher
</td>
<td>160 GB - 5400 rpm, 160 GB, 5400 U/Min, Hitachi HTS545016B9A300
</td>
<tr>
</tr>
<td>Soundkarte
</td>
<td>Realtek ALC272 @ Intel 82801GBM ICH7-M - High Definition Audio Controller [B-0]
</td>
<tr>
</tr>
<td>Anschlüsse
</td>
<td>3 USB 2.0, 1 VGA, Audio Anschlüsse: Line-Out, Mic, Card Reader: MMC, SD
</td>
<tr>
</tr>
<td>Netzwerk
</td>
<td>Atheros AR8132 PCI-E Fast Ethernet Controller (10/100MBit/s)
</td>
<tr>
</tr>
<td>Abmessungen
</td>
<td>Höhe x Breite x Tiefe (in mm): 25.7 x 296 x 178
</td>
<tr>
</tr>
<td>Akku
</td>
<td>48 Wh Lithium-Ion, 4.400 mAh
</td>
<tr>
</tr>
<td>Betriebssystem
</td>
<td>Microsoft Windows XP Home 32 Bit
</td>
<tr>
</tr>
<td>Kamera
</td>
<td>Webcam: VGA
</td>
<tr>
</tr>
<td>Sonstiges
</td>
<td>24 Monate Garantie
</td>
<tr>
</tr>
<td>Gewicht
</td>
<td>1.295 kg, Netzteil: 138 g
</td>
<tr>
</tr>
<td>Preis
</td>
<td>249 Euro
</td>
</tr>
</table>
<h3>Links:</h3>
<ul>
<li><a href="https://www.notebookcheck.com/Test-Asus-Eee-PC-1001P-Netbook.25504.0.html"
target="_blank" rel="noreferrer noopener">
NotebookCheck :: Asus Eee PC 1001P Netbook</a>
</li>
</ul>
</html>
<html>
<ul>
<li><b>RSA</b>, Rivest-Shamir-Adleman</li>
<li><b>Diffie‐Hellmann</b>, </li>
<li><b>DSA</b>, </li>
</ul>
</html>
<html>
<ul>
<li>Kombination aus <b>private key</b> + <b>public key</b></li>
<li>auch: 2-Schlüsselverfahren</li>
<li><table>
<tr><td><b>privkey</b></td><td>bleibt beim Eigentümer</td></tr>
<tr><td><b>pubkey</b></td><td>wird dem jeweiligen Kontakt geschickt</td></tr>
</table></li>
<li><b>eMail‐Verschlüsselung:</b><br />
Jemand möchte mir eine verschlüsselte Mail schicken. Dazu<br />
nimmt er <em><u>meinen</u></em> öffentlichen Schlüssel, verschlüsselt damit<br />
seine Mail und schickt diese dann mir zu. Ich entschlüssele<br />
diese Mail dann mit meinem Private Key (<em>privkey</em>).</li>
<li></li>
</ul>
</html>
<html>
<ol>
<li><b>06.08.1945</b> :: Hiroshima<br />
“<em>Little boy</em>“<br />
Material: Uran (<em><sup>235</sup>U</em>)<br />
</li>
<br />
<li><b>09.08.1945</b> :: Nagasaki<br />
“<em>Fat man</em>“<br />
Material: Plutonium (<em><sup>239</sup>Pu</em>)<br />
</li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Little_Boy"
target="_blank" rel="noreferrer noopener">
Wikipedia :: Little boy</a>
</li>
<li><a href="https://de.wikipedia.org/wiki/Fat_Man"
target="_blank" rel="noreferrer noopener">
Wikipedia :: Fat man</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
Murex Session<br>
⇒ Processing<br>
⇒ Dokument Workflow<br>
⇒ Monitor<br>
⇒ MxML Workflow Monitor erscheint<br>
⇒ Sheet auswählen<br>
⇒ General Monitor Icon: "i",<br />
<img src="./pictures/GeneralMonitor-Icon.png" height=83 width=82><br>
⇒ separates Fenster erscheint: "DS Entitycode"<br>
⇒ OK-Button drücken<br>
⇒ neues Fenster: Eingaben "Reference Type", "Reference Action"<br>
</html>
Consider two hosts.
host1.domain.com
host2.domain.com
>From hosts(user:deepak),
you wish to logon to
host1(user:paul).
Paul would create a .rhosts
file in his directory
chmod 744 .rhosts
(No write permission for
others) The first line
would contain
host1.domain.com deepak
Now, deepak should be able
to logon to host2.domain.com
as user paul by using rlogin.
Deepak will type
e.g
rlogin hosts.domain.com -l paul
And he should be in.
<html>
To set automatically the DISPLAY variable after rlogin (csh):
<code><pre>
if (`who am i | wc -w` > 5) then
setenv DISPLAY `who am i | cut -d"(" -f2 | cut -d")" -f1`:0.0
endif
</pre></code>
May vary from flavor to flavor.<br />
<br />
This tip generously supported by:<br />
labrache@gaulois.cad.cea.fr<br />
</html>
<html>
To avoid 'Permission Denied'<br />
messages when using the<br />
'find' command:<br />
<br />
<b>in ksh :-</b>
<pre><code>find <dir> -name '<file>' -print 2> /dev/null</code></pre>
<b>in csh :-</b>
<pre><code>(find <dir> -name '<file>' -print > /dev/tty)>& /dev/null</code></pre>
<br />
</html>
<html>
<ul>
<li> <b>NR :</b> Anzahl der Datensätze (resp. der Zeilen) im Inputfile
</li><br />
<li> <b>NF :</b> Anzahl der Felder (resp. der Spalten) im Inputfile
</li><br />
<li> <b>OFS :</b> "<b>O</b>utput <b>F</b>ield <b>S</b>eparator", Datentrenner bei der Datenausgabe
</li><br />
<li> Letzte Spalte löschen:<br />
<code><pre>awk '{ if (NF > 58) { $NF=""; print }}' inputfile</pre></code>
(das geht auch mit einer x-beliebigen Spalte)
</li>
<br />
<li> Zeilen zählen (entspricht "wc -l"):<br />
<code><pre>awk -F";" 'BEGIN { $n = 0 }
{ $n =$n+1 }
END { print "Ergebnis:" $n}' inputfile</pre></code>
alternativ:<br />
<code><pre>awk -F";" 'END { print "Ergebnis:" $NR }' inputfile</pre></code>
</li>
<br />
<li>Mit if-then-else-Bedingung:<br />
<code><pre>awk -F";" 'BEGIN { OFS = ";" }
{ if (NF > 58) { $(NF-1) =""; print }
else { print $0 }
}' inputfile</pre></code><br />
(das geht auch mit einer x-beliebigen Spalte)
</li>
<br />
<li>Vertauschen des ersten und des letzten Feldes:
<pre><code><pre>awk '{ x = $1;
$1 = $NF;
$NF = x;
print }' inputfile</pre></code></pre>
</li>
<li><b>AWK macht mathematische Berechnungen</b>, z.B.<br />
die (automatische) Neuberechnung der height- <br />
und width-Werte bei Bildern:
<pre><code>file ./pictures/KodeKloud_DomainNames-0* | awk -F" " '{ print $5*0.75"\n"$7*0.75 }'</code></pre>
</li>
</ul>
</html>
<html>
Most of the time when you use awk from the command line,<br>
you're doing something simple like this:<br>
<br><code>
ps -ef | grep netscape | awk '{print $2}'<br>
</code><br>
To save typing, use this script when you only want to<br>
use awk to print out one or more columns:<br>
<br>
<code>
------------------- CUT HERE ---------------------------<br>
#!/bin/ksh<br>
# awkc - print out one or more columns<br>
<br>
p=\$$( echo $1 | sed 's/,/,\$/g' )<br>
shift<br>
eval "awk '{ print $p }'" $*<br>
<br>
# eof<br>
------------------- CUT HERE ---------------------------<br>
</code>
<br>
Now you can do things like:<br>
ps -ef | awkc 2,1<br>
or<br>
awkc 1,2,3 /var/adm/messages*<br>
<br>
This tip generously supported <br>
by: kbeer@dbna.com<br>
</html>
<html>
AWK script for getting statistics.<br />
<br />
The script gives the statistics of the default<br />
shell set for the users.<br />
<br />
i.e. Number of users using csh,ksh or sh<br />
<code><pre>
$cat stat_demo.awk
#start here
BEGIN{
FS=":" #seperator is set to :
}
{
stat_array[$7]=stat_array[$7]+1; #$7, is the seventh field in passwd file
}
END{
print "Login-Shell Count" ;
for (i in stat_array) print i, stat_array[i] #Displays statistics
}
#end here</pre></code>
To use this , just say<br />
<br /><code>
awk -f stat_demo.awk /etc/passwd<br />
</code><br />
or<br />
<br /><code>
cat /etc/passwd | awk stat_demo.awk<br />
</code><br />
This tip generously supported <br />
by: dkotian1@rediffmail.com<br />
</html>
<html>
<ul>
<li>ARM :=: Azure Resource Manager ?</li>
<li>LRS :=: Local redundant storage</li>
<li>ZRS :=: Zone redundant storage</li>
</ul>
</html>
<html>
<ul>
<li><h3>Add tags to a resource group without existing tags:</h3>
<code><pre>
Set-AzResourceGroup -Name myrg -Tag @{ "Department"="Finance"; "Environment"="Test" }
</pre></code>
</li>
<li><h3>Add tags to a resource group that has existing tags,<br />
retrieve the existing tags, add the new tag, and re‐<br />
apply the tags:</h3>
<code><pre>
$tags = (Get-AzResourceGroup -Name myrg).Tags
$tags.Add("Status", "Approved")
Set-AzResourceGroup -Tag $tags -Name myrg
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://www.thomasmaurer.ch/2020/02/use-azure-tags-to-organize-resources/" target="_blank"
rel="noreferrer noopener">Thomas Maurer :: Use Azure tags to organize resources</a></li>
</ul>
</html>
<html>
LRS :=: Local Redundant Storage<br />
ZRS :=:Zone Redundant Storage<br />
<br />
Runterfahren einer VM <=|=> Deallokieren:<br />
Um keine weiteren Kosten zu haben, muss die VM<br />
deallokiert werden! Beim Runterfahren bleibt die <br />
Berechnung der Kosten weiterhin bestehen.<br />
<h3>Links:</h3>
<ul>
<li>https://learn.microsoft.com/en-us/azure/storage/common/storage-redundancy</li>
</ul>
</html>
<html>
<ul>
<li>A list of all the region names and locations for Azure.</li>
<br />
<li>List all Azure regions using … <br />
<details><summary><b><em>Azure Portal</em></b></summary>
<br />
<ul>
<li>Einloggen in <a href="https://portal.azure.com" target="_blank" rel="noreferrer noopener">Azure Portal</a>
</li>
<li>
You can recreate the list anytime using this command:
<code><pre>
az account list-locations -o table
</pre></code>
</li>
<li>aktuelle Liste [Okt. 2021]:
<code><pre>
DisplayName Latitude Longitude Name
------------------- ---------- ----------- ------------------
East Asia 22.267 114.188 eastasia
Southeast Asia 1.283 103.833 southeastasia
Central US 41.5908 -93.6208 centralus
East US 37.3719 -79.8164 eastus
East US 2 36.6681 -78.3889 eastus2
West US 37.783 -122.417 westus
North Central US 41.8819 -87.6278 northcentralus
South Central US 29.4167 -98.5 southcentralus
North Europe 53.3478 -6.2597 northeurope
West Europe 52.3667 4.9 westeurope
Japan West 34.6939 135.5022 japanwest
Japan East 35.68 139.77 japaneast
Brazil South -23.55 -46.633 brazilsouth
Australia East -33.86 151.2094 australiaeast
Australia Southeast -37.8136 144.9631 australiasoutheast
South India 12.9822 80.1636 southindia
Central India 18.5822 73.9197 centralindia
West India 19.088 72.868 westindia
Canada Central 43.653 -79.383 canadacentral
Canada East 46.817 -71.217 canadaeast
UK South 50.941 -0.799 uksouth
UK West 53.427 -3.084 ukwest
West Central US 40.890 -110.234 westcentralus
West US 2 47.233 -119.852 westus2
Korea Central 37.5665 126.9780 koreacentral
Korea South 35.1796 129.0756 koreasouth
France Central 46.3772 2.3730 francecentral
France South 43.8345 2.1972 francesouth
Australia Central -35.3075 149.1244 australiacentral
Australia Central 2 -35.3075 149.1244 australiacentral2
UAE Central 24.466667 54.366669 uaecentral
UAE North 25.266666 55.316666 uaenorth
South Africa North -25.731340 28.218370 southafricanorth
South Africa West -34.075691 18.843266 southafricawest
</pre></code>
</li>
</ul>
</details>
<!-- </li>
<br />
<li><details><summary>List all Azure regions using …-->
<details><summary><b><em>PowerShell</em></b></summary>
<br />
<ul>
<li>To list all the Azure regions, first log into Azure using the following command<br />
(Note: If you are on macOS or Linux, run pwsh to start PowerShell) :<br />
<code><pre>
login-azaccount
</pre></code></li>
<li>To list all the available regions run the following command:<br />
<code><pre>
Get-AzLocation | select displayname,location
</pre></code></li>
<br />
</details></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://gist.github.com/ausfestivus/04e55c7d80229069bf3bc75870630ec8" target="_blank" rel="noreferrer noopener">GitHub</a></li>
<li><a href="https://www.ntweekly.com/2021/06/27/list-all-azure-regions-using-powershell/" target="_blank" rel="noreferrer noopener">NTWeekly :: List all Azure regions using PowerShell</a></li>
<li><a href="https://azuretracks.com/2021/04/current-azure-region-names-reference/" target="_blank" rel="noreferrer noopener">Azuretracks :: Current Azure Region Names ‐ Reference</a></li>
</ul>
</html>
<html>
Ever needed to backup all of your configuration <br />
files in one fail swoop?<br />
<br />
Using an editor create a file:<br />
<br /><code>
vi configlist<br />
</code><br />
Enter the full path of the files needed to backup.<br />
<br /><code>
/etc/passwd<br />
/etc/inetd.conf<br />
/etc/hosts/allow<br />
/etc/hosts.deny<br />
</code><br />
and so on until you have a full list of files.<br />
<br />
Save the file and quit<br />
<br /><code>
:wq!<br />
<br /></code>
Compress the files using tar:<br />
<br /><code>
tar cvfzT /tmp/backup.tar.gz configlist<br />
tar: Removing leading `/` from absolute path names in the archive<br />
etc/passwd<br />
etc/inetd.conf<br />
<br /></code>
<br />
WARNING! This file contains some files that could only be read by a<br />
limited number of users. Store it carefully so only the Administrator can<br />
access it.<br />
<br />
Check "man tar" on your flavor, the "z" and "T" options are<br />
not available on all flavors of unix.<br />
<br />
This tip generously supported <br />
by: darren.mallett@tradermedia.co.uk<br />
</html>
<html>
<h3>Backofen-Symbole erklärt und Tipps zur Nutzung</h3>
Sie sollten wissen, was die einzelnen Backofen-Symbole bedeuten. Nur so können Sie <br />
die Funktionen des Haushaltsgeräts richtig nutzen. Wir erklären Ihnen in diesem Haus‐<br />
haltstipp, was hinter den einzelnen Zeichen steckt und wie Sie sie stromsparend be‐<br />
nutzen.
<h3>Die Backofen-Symbole im Überblick</h3>
Haben Sie sich einen neuen Backofen gekauft, werden Sie mit zahlreichen Symbolen am<br />
Display konfrontiert. Jedes Symbol zeigt Ihnen eine Funktion des Backofens an, die Sie<br />
nutzen können. Backen Sie nur hin und wieder, werden Sie sich die einzelnen Bedeu‐<br />
tungen zu den Symbolen sicher nicht gemerkt haben. Gebrauchsanleitungen sind oft viel‐<br />
seitig und mehrsprachig, da müssten Sie lange blättern. Von daher finden Sie nun hier<br />
nachfolgend die wichtigsten Symbole im Überblick sowie kurz und verständlich erklärt.<br />
<ul>
<li><b>Oberhitze:</b><br />
Sie sehen einen oberen geraden Strich.</li>
<li><b>Unterhitze:</b><br />
Hier ist ein gerader Strich unten abgebildet.<br />
<img src="./pictures/Backofen_Unterhitze.png" height=100 width=100 /><br /></li>
<li><b>Ober‐ und Unterhitze:</b><br />
Für diese Funktion gibt es einen gerade Strich oben und einen unten:<br />
<img src="./pictures/Backofen_Ober-Unterhitze.png" height=100 width=100 /><br /></li>
<li><b>Umluft:</b><br />
Sie sehen einen Ventilator.</li>
<li><b>Heißluft:</b><br />
Hier befindet sich der Ventilator in einem Kreis.<br />
<img src="./pictures/Backofen_Heissluft.png" height=100 width=100 /><br /></li>
<li><b>Grill:</b><br />
Auch hier sehen einen oberen geraden Strich. Jedoch ist er stärker aufgezeichnet als bei der Oberhitze.</li>
<li><b>Umluft und Grill:</b><br />
Hier bekommt der Ventilator eine gezackte Linie übergesetzt.<br />
<img src="./pictures/Backofen_Umluft-Grill.png" height=100 width=100 /><br /></li>
<li><b>Umluftgrill und Unterhitze:</b><br />
Für diese Funktion suchen Sie nach dem gezackten Strich oberhalb des Ventilators. Unten drunter befindet sich noch ein gerader Strich.</li>
<li><b>Pizzafunktion:</b><br />
Achten Sie auf die Abbildung Ventilator im Kreis und gerader Strich darunter.</li>
<li><b>Pyrolyse:</b><br />
Dieses Symbol besteht aus mehreren kleinen Kreisen.</li>
<li><b>Dampfgaren:</b><br />
Diese Funktionen hat der Backofen, wenn Sie ein Symbol sehen, das aus drei Wellen besteht, die Wolken ähneln.</li>
<li><b>Licht:</b><br />
Dieses Symbol sieht aus wie eine kleine Lampe.</li>
</ul>
<h3>So nutzen Sie die Backofen-Symbole</h3>
Um den Backofen möglichst stromsparend zu betreiben, sollten Sie überwiegend die Funktionen Umluft oder Heißluft benutzen. Die Luft wird dabei gleichmäßig im Ofen verteilt. Das hat den Vorteil, dass Sie bei niedrigeren Temperaturen backen und auf das Vorheizen verzichten können. Hierzu rät im Übrigen auch die Verbraucherzentrale.
<ul>
<li>Sowohl Heißluft als auch Umluft eignen sich für die Pizza-Zubereitung. Im Prinzip werden alle Teige mit dünnem Boden bei dieser Funktion schön knusprig. Nutzen Sie sie also auch für Flammkuchen oder Plätzchen.</li>
<li>Der Unterschied zwischen Um- und Heißluft besteht darin, dass der Backofen bei der Umluft mit der Ober- und Unterhitze erhitzt wird. Dazu wird bei Heißluft die Wärme zusätzlich mit einem Ventilator verteilt. Sie ist der Umluft vorzuziehen. Bei einem Neukauf lohnt es sich also darauf zu achten, dass der neue Backofen die Heißluft-Funktion besitzt.</li>
<li>Besitzt der Ofen eine Pizzafunktion, werden gleichzeitig Unterhitze und Heißluft genutzt. Das macht den Boden am Ende so richtig kross.</li>
<li>Ober- und Unterhitze gehören zum Standard eines jeden handelsüblichen Backofens. Jedoch sollten Sie diese Funktionen nur selten benutzen. Sie verbrauchen den meisten Strom und sind deswegen nicht besonders energieeffizient. Nutzen Sie sie nur für Blechkuchen, der saftig werden soll oder auch für jegliche Quark-Käsekuchen-Arten.</li>
<li>Zum Überbacken eignen sich am besten die Oberhitze- oder auch die Grill-Funktion. Sie können beide Funktionen auch dann einsetzen, wenn Sie einer Speise ganz am Ende noch etwas Bräune verleihen möchten.</li>
<li>Etwas teurere Modelle besitzen die so genannte Pyrolyse-Funktion. Sie nutzen sie nicht zum Backen. Es handelt hierbei um eine Selbstreinigungsfunktion des Backofens. Jedoch verbrauchen Sie hier so viel Strom für die Reinigung, als würde Sie zweimal hintereinander Kuchen backen. Überlegen Sie im Hinblick auf die Stromersparnis, ob Sie den Backofen nicht doch mit Hausmitteln reinigen wollen.</li>
<li>Manche Backöfen sind auch mit der Zusatzfunktion Dampfgaren ausgestattet. Diese Funktion gart Ihr Essen schonend bei nur 100 Grad. Dasselbe erreichen Sie jedoch auch, wenn Sie Ihr Essen im Topf erwärmen oder garen. Außerdem ist auch diese Variante energiesparender.</li>
</ul>
<h3>Stromspartipps</h3>
Der Backofen gehört zu den Haushaltsgeräten, die am meisten Strom verbrauchen. Von daher lohnt es sich, einen Blick auf die folgenden Stromspartipps zu werfen.
<ul>
<li>Auch wenn viele Rezepte danach verlangen - tatsächlich müssen Sie den Backofen nur höchst selten vorheizen. Wenn möglich, verzichten Sie hierauf.</li>
<li>Öffnen Sie die Backofen nicht ständig zwischendurch. Die entwichene Wärme muss der Backofen dann immer wieder neu aufheizen. Sie sehen durch die transparente Scheiben ebenfalls den Garzustand.</li>
<li>Nutzen Sie nach Möglichkeit Umluft oder Heißluft.</li>
<li>Zum Aufbacken müssen Sie nicht den Backofen anwerfen. Brötchen und sonstige aufzubackende Lebensmittel können Sie auch kostengünstiger auf dem Brötchenaufsatz des Toasters aufbacken.</li>
<li>Der Backofen heizt noch eine ganze Weile nach, nachdem Sie ihn ausgestellt haben. Nutzen Sie diese Restwärme regelmäßig aus. </li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://praxistipps.focus.de/backofen-symbole-erklaert-und-tipps-zur-nutzung_132138"
target="_blank" rel="noreferrer noopener">Focus Online</a></li>
</ul>
</html>
<html>
Before modifying critical system files, make a backup copy<br />
using the date as an extension:<br />
<br /><code>
$ cp /etc/hosts /etc/hosts.971006<br />
</code><br />
If you keep a number of these they provide a potentially<br />
valuable archive as well as a means of finding out any<br />
changes that have been made and when.<br />
</html>
<html>
<ul>
<li><b>Definition / Erklärung:</b><br />
Terminkurs der Öl-Futures notiert unter dem Kassapreis;</li>
</ul>
</html>
<html>
For showing the banner on a telnet session.<br />
<br />
Add the following in <code>/etc/inetd.conf</code>:<br />
<br /><code>
telnet stream tcp nowait root /usr/lbin/telnetd telnetd -b /etc/issue<br />
</code><br />
The -b option then the banner file after this allow<br />
inetd to reread the conf file by , inetd -c.<br />
<br />
After this you will be getting your banner on telnet session.<br />
<br />
This tip generously supported <br />
by: tb.unnikrishnan@citicorp.com<br />
<br />
</html>
<html>
<ul>
<li>
<p>
It's a performance thing; instead of searching the whole path for the<br />
binary every time it is called, it's put into a hash table for quicker look‐<br />
up. So any binary that's already in this hash table, is hashed. If you<br />
move binaries around when they're already hashed, it will still try to<br />
call them in their old location.
</p>
<p>
See also <b>help hash</b>, or <b>man bash</b> and search for <b>hash</b> under<br />
builtin commands there.
</p>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://unix.stackexchange.com/questions/105876/what-does-rm-is-hashed-mean" target="_blank" rel="noreferrer noopener">StackExchange :: What does “rm is hashed“ mean?</a></li>
</ul>
</html>
<html>
In vim you could also use <br />
<code><br />
:set ff=unix<br />
</code><br />
and then save the file, or <br />
<code><br />
:set ff=dos<br />
</code> <br />
to get DOS formatting again.<br />
<br/>
<b>Alternativ:</b><br />
Aufruf <code>dos2unix FILENAME</code><br />
</html>
<html>
<pre><code>echo "Entering ~/.bash_aliases"
alias tmux_list-server="ps -ef | grep -i tmux | grep -v grep"
alias less="less -X -N"
alias lsblk="lsblk -s | grep ^s"
alias ls="ls -lisatrF"
alias lsf="\ls -la | grep -v ^d" # list only files
alias lsd="\ls -la | grep ^d" # list only dirs
alias ae='deactivate &> /dev/null && source ./bin/activate'
alias de='deactivate'
alias vim="vim -p"
alias vi="vim -p"
alias cdStuff="cd /media/mueller/MUELLER/StuffToDo"
alias rmdir="rmdir -v"
alias mv="mv -iv"
</code></pre>
</html>
<html>
<ul>
<li>Applikation “font-manager“ installiert:
<pre><code>sudo apt install font-manager</code></pre>
</li>
<li>verwendeter Link:<br />
<a href="https://www.pragmaticlinux.com/2022/06/show-the-git-branch-in-your-bash-terminal-prompt/" target="_blank" rel="noreferrer noopener">https://www.pragmaticlinux.com/2022/06/show-the-git-branch-in-your-bash-terminal-prompt/</a>
</li>
<br />
<li>empfohlene Fonts:
<ul>
<li><em>DejaVuSansMono Nerd Font Mono</em></li>
<li><em>JetBrainsMono Nerd Font Mono</em></li>
</ul>
</ul>
<ul>
<h3>Links:</h3>
<ul>
<li><a href="https://github.com/diogocavilha/fancy-git" target="_blank" rel="noreferrer noopener"><em>fancygit</em>‐Homepage</a></li>
<li><a href="https://www.pragmaticlinux.com/2022/06/show-the-git-branch-in-your-bash-terminal-prompt/" target="_blank" rel="noreferrer noopener">https://www.pragmaticlinux.com/2022/06/show-the-git-branch-in-your-bash-terminal-prompt/</a></li>
<li><a href="https://github.com/magicmonty/bash-git-prompt" target="_blank" rel="noreferrer noopener">https://github.com/magicmonty/bash-git-prompt</a></li>
<li><a href="https://thucnc.medium.com/how-to-show-current-git-branch-with-colors-in-bash-prompt-380d05a24745" target="_blank" rel="noreferrer noopener">https://thucnc.medium.com/how-to-show-current-git-branch-with-colors-in-bash-prompt-380d05a24745</a></li>
<li><a href="https://blog.devgenius.io/how-to-customize-the-git-bash-shell-prompt-336f6aefcf3f?gi=d9dddb8051a4" target="_blank" rel="noreferrer noopener">https://blog.devgenius.io/how-to-customize-the-git-bash-shell-prompt-336f6aefcf3f?gi=d9dddb8051a4</a></li>
<li><a href="https://www.shellhacks.com/show-git-branch-terminal-command-prompt/" target="_blank" rel="noreferrer noopener">https://www.shellhacks.com/show-git-branch-terminal-command-prompt/</a></li>
<li><a href="https://www.linux.com/training-tutorials/how-make-fancy-and-useful-bash-prompt-linux/" target="_blank" rel="noreferrer noopener">https://www.linux.com/training-tutorials/how-make-fancy-and-useful-bash-prompt-linux/</a></li>
</ul>
</html>
<html>
<h3>Unix-Befehl “help“</h3>
to display help about built-in Bash commands.<br />
A shell builtin is nothing but a command or a function,<br />
called from a shell, that is executed directly in the shell</br />
itself. No external command loaded from $PATH settings. <br />
<br />
We use the help command to get short summaries of built‐in<br />
commands or internal commands.<br />
<br />
<b>Syntax:</b><br />
<code><pre>help [-dms] [command]</pre></code
<br />
wobei:<br />
‐d :: einfache, einzeilige Ausgabe der Aufgabe des Befehls<br />
‐m :: Ausgabe im Pseudo‐Manpage‐Format (ausführlich)<br />
‐s :: Zeigt die Syntax des Befehls an (einzeilig)<br />
<br />
z.B. help -d exit<br />
<br />
Ohne Parameter (und Befehl) werden alle aktuell verfügbaren<br />
built‐in‐Befehle angezeigt.<br />
<br />
<details><summary>Liste der Shell-Built-in-Befehle:</summary><br />
<table>
<tr>
<td>Jobbezeichnung [&]</td><td>history [-c] [-d Offset] [n] oder history -anrw [Dateiname] oder history -ps Argume></td>
</tr>
<tr>
<td>(( Ausdruck )) </td><td>if Kommandos; then Kommandos; [ elif Kommandos; then Kommandos; ]... [ else Kommand></td>
</tr>
<tr>
<td>. Dateiname [Argumente] </td><td> jobs [-lnprs] [Jobbez. ...] or jobs -x Kommando [Arg]</td>
</tr>
<tr>
<td> : </td><td>kill [-s Signalname | -n Signalnummer | -Signalname] pid | jobspec ... oder kill -l></td>
</tr>
<tr>
<td> [ Argument... ] </td><td> let Argument [Argument ...]</td>
</tr>
<tr>
<td> [[ Ausdruck ]]</td><td> local [Option] Name[=Wert] ...</td>
</tr>
<tr>
<td> alias [-p] [Name[=Wert] ... ] </td><td> logout [n]</td>
</tr>
<tr>
<td> bg [Jobbezeichnung ...] </td><td> mapfile [-d Begrenzer] [-n Anzahl] [-O Quelle] [-s Anzahl] [-t] [-u fd] [-C></td>
</tr>
<tr>
<td> bind [-lpsvPSVX] [-m Tastaturtabelle] [-f Dateiname] [-q Name] [-u Name] [-r Tasten> popd [-n] [+N | -N]</td>
</tr>
<tr>
<td> break [n] </td><td> printf [-v var] Format [Argumente]</td>
</tr>
<tr>
<td> builtin [Shellkommando [Argument ...]] </td><td> pushd [-n] [+N | -N | Verzeichnis]</td>
</tr>
<tr>
<td> caller [Ausdruck] </td><td> pwd [-LP]</td>
</tr>
<tr>
<td> case Wort in [Muster [| Muster]...) Kommandos ;;]... esac </td><td> read [-ers] [-a Feld] [-d Begrenzer] [-i Text] [-n Zeichenanzahl] [-N Zeichenanzahl></td>
</tr>
<tr>
<td> cd [-L|[-P [-e]] [-@]] [Verzeichnis] </td><td> readarray [-d Begrenzer] [-n Anzahl] [-O Quelle] [-s Anzahl] [-t] [-u fd]></td>
</tr>
<tr>
<td> command [-pVv] Kommando [Argument ...]</td><td> readonly [-aAf] [Name[=Wert] ...] oder readonly -p</td>
</tr>
<tr>
<td> compgen [-abcdefgjksuv] [-o Option] [-A Aktion] [-G Suchmuster] [-W Wortliste] [-F F </td><td>return [n]</td>
</tr>
<tr>
<td> complete [-abcdefgjksuv] [-pr] [-DEI] [-o Option] [-A Aktion] [-G Suchmuster] [-W Wo</td><td> select Name [in Wort ... ;] do Kommandos; done</td>
</tr>
<tr>
<td> compopt [-o|+o Option] [-DEI] [Name ...] </td><td> set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]</td>
</tr>
<tr>
<td> continue [n] </td><td> shift [n]</td>
</tr>
<tr>
<td> coproc [Name] Kommando [Umleitungen] </td><td> shopt [-pqsu] [-o] [Optionsname ...]</td>
</tr>
<tr>
<td> declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] [name ...] </td><td> source Dateiname [Argumente]</td>
</tr>
<tr>
<td> dirs [-clpv] [+N] [-N] </td><td> suspend [-f]</td>
</tr>
<tr>
<td> disown [-h] [-ar] [Jobbezeichnung ... | pid ...] </td><td> test [Ausdruck]</td>
</tr>
<tr>
<td> echo [-neE] [Argument ...] </td><td> time [-p] Pipeline</td>
</tr>
<tr>
<td> enable [-a] [-dnps] [-f Dateiname] [Name ...] </td><td> times</td>
</tr>
<tr>
<td> eval [Argument ...] </td><td> trap [-lp] [[Argument] Signalbezeichnung ...]</td>
</tr>
<tr>
<td> exec [-cl] [-a Name] [Kommando [Argument ...]] [Umleitung ...]</td><td> true</td>
</tr>
<tr>
<td> exit [n] </td><td> type [-afptP] Name [Name ...]</td>
</tr>
<tr>
<td> export [-fn] [Name[=Wert] ...] oder export -p </td><td> typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] [name ...]</td>
</tr>
<tr>
<td> false </td><td> ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]</td>
</tr>
<tr>
<td> fc [-e Editor] [-lnr] [Anfang] [Ende] oder fc -s [Muster=Ersetzung] [Kommando] </td><td> umask [-p] [-S] [Modus]</td>
</tr>
<tr>
<td> fg [Jobbezeichnung] </td><td> unalias [-a] Name [Name ...]</td>
</tr>
<tr>
<td> for Name [in Wort ... ] ; do Kommandos; done </td><td> unset [-f] [-v] [-n] [NAME ...]</td>
</tr>
<tr>
<td> for (( Ausdr1; Ausdr2; Ausdr3 )); do Kommandos; done </td><td> until COMMANDS; do COMMANDS-2; done</td>
</tr>
<tr>
<td> function Name { Kommandos ; } oder Name () { Kommandos ; } </td><td> variables - Namen und Bedeutung einiger Shellvariablen</td>
</tr>
<tr>
<td> getopts Optionen [Argumente ...] </td><td> wait [-fn] [-p Variable] [id ...]</td>
</tr>
<tr>
<td> hash [-lr] [-p Pfadname] [-dt] [Name ...] </td><td> while COMMANDS; do COMMANDS-2; done</td>
</tr>
<tr>
<td> help [-dms] [Muster ...] </td><td> { Kommandos ; }</td>
</tr></table>
<br />
</details>
<h3>Links:</h3>
<ul>
<li><a href="https://bash.cyberciti.biz/guide/Help_command" target="_blank">Cyberciti :: Help command</a></li>
</ul>
</html>
<html>
<ul>
<li>Files liegen im Verzeichnis
<pre><code>/etc/bash_completion.d/</code></pre>
</li>
<li>
</li>
</ul>
<!--
<h3>Links:</h3>
<ul>
<li><a href=""
target="_blank" rel="noreferrer"
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer"
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer"
</a>
</li>
</ul>
-->
</html>
<html>
<ul>
<li>The question asked for regular expressions. Bash, and thus ls,<br />
does <b>NOT</b> support regular expressions here. What it supports is<br />
<u><em>filename expressions</em> (Globbing)</u>, a form of wildcards.
</li>
<li><pre><code>ls -la {<em>START</em>..<em>ENDE</em>}*</code></pre>
z.B. <pre><code>ls -la {4..9}*.txt</code></pre>
</li>
<li><pre><code>ls -la ??_*.txt</code></pre>
zwei Zeichen vor dem Underscore;
</li>
<li><pre><code>ls -la [[:digit:]]_*.txt</code></pre>
</li>
<li><pre><code> \ls -1 *Lab-[01][02-9]*.txt</code></pre>
alle Files mit "Lab-00" bis "Lab-19", ausser "Lab-01"
</li>
<li><h3>Using Brace Expansion</h3>
<ul>
<li>We can use the brace expansion mechanism to get the same results as before without the hassle of extending the shell globs.
</li>
<li>Using the last command, let’s keep the basic globbing asterisk wildcards as they are and switch what’s in between to a brace expression:
<pre><code>$ ls *{alpha,sigma}*
-rw-r--r-- 1 ZZZ 33011 0 Aug 5 12:37 7_sigma_bouhannana
-rw-r--r-- 1 ZZZ 33011 0 Aug 5 12:37 alpha_51
-rw-r--r-- 1 ZZZ 33011 0 Aug 5 12:37 sigma_33</code></pre>
</li>
<li>The curly brace expression expands to the given comma-separated values which results in something similar to *alpha* and *sigma*.
</li>
<li>Then, the ls command takes care of the rest and matches the expanded results against our filenames.
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://unix.stackexchange.com/questions/44754/listing-with-ls-and-regular-expression"
target="_blank" rel="noreferrer noopener">
UNIX-StackExchange :: Listing with `ls` and regular expression</a>
</li>
</ul>
</html>
<html>
<h3>Befehle zur String-Manipulation</h3>
<table border="1">
<tr><td>${#variable}</td><td>Länge der "variable" in Zeichen</td></tr>
<tr><td>${variable:?string}</td><td>Gibt "string" aus, wenn "variable" leer ist oder nicht existiert;<br /> <em>anscheinend beendet sich das Programm automatisch</em></td></tr>
<tr>
<td>${variable:-string}</td>
<td>Ergebnis ist "string", wenn "variable" leer ist oder nicht existiert,<br />
andernfalls wird "variable" zurückgegeben;<br />
<b>Wichtig!</b> Der Variablen wird KEIN Wert zugewiesen!<br />
Die Variable ist danach immer noch leer, ungesetzt!
</td>
</tr>
<tr><td>${variable:=string}</td><td>"string" wird "variable" zugewiesen, wenn "variable" leer ist oder nicht existiert, andernfalls wird "variable" zurückgegeben</td></tr>
<tr>
<td>${variable:+string}
</td>
<td> Ergebnis ist "string", wenn "variable" existiert und nicht leer ist,<br />
andernfalls wird nichts zurückgegeben;
</td>
</tr>
<tr><td>${variable:offset}</td><td> Liefert den Inhalt von "variable" ab Position "offset" bis zum Ende. <br />Ist "variable" ein Array, so werden alle Elemente ab "offset" bis zum Ende des Arrays zurückgegeben</td></tr>
<tr><td>${variable:offset:länge}</td><td> Liefert "länge" Zeichen des Inhalts von "variable" ab Position "offset". <br />Ist "variable" ein Array, so werden "länge" Elemente ab Element "offset" zurückgegeben</td></tr>
<tr><td>${variable#muster}</td><td> Entfernt das <b>kleinste</b> zutreffende "muster" aus "variable" (genügsam). Sucht von vorn nach hinten<br />
Beispiel:<code><pre>~$ echo ${var}
jetzt aber Butter bei de Fische
~$ echo ${var#* }
aber Butter bei de Fische
</pre></code></td></tr>
<tr><td>${variable##muster}</td><td> Entfernt das <b>größte</b> zutreffende "muster" aus "variable" (gierig). Sucht von vorn nach hinten<br />
Beispiel:<code><pre>~$ echo ${var}
jetzt aber Butter bei de Fische
~$ echo ${var##* }
Fische
</pre></code>
(es wird alles gelöscht bis zum letzten Auftreten des Blanks,
der Rest wird zurückgegeben.)</td></tr>
<tr>
<td>${variable%muster}
</td>
<td> Entfernt das <b>kleinste</b> zutreffende "muster" aus "variable" (genügsam). Sucht von hinten nach vorn<br />
Beispiel:<code><pre>
~$ echo ${var}
jetzt aber Butter bei de Fische
~$ echo ${var% *}
jetzt aber Butter bei de
</pre></code>
Anmerkung: <br />
Alles nach dem ersten Blank (vom String‐Ende betrachtet) wird entfernt und <br />
der Rest zurückgegeben.<br />
<br />
Anderes Beispiel:<br />
Das ":"-Zeichen am Ende eines Strings entfernen:<br />
- Ausgangspunkt:
<pre><code>
$ for i in $(\ls -1 Realp* ); do echo ${i}; done
Realpython_Numpy-array-programming:
Realpython_numpy-tensorflow-performance:
Realpython_python-keras-text-classification:
Realpython_pytorch-vs-tensorflow:
- gewünschtes Ergebnis:
$ for i in $(\ls -1 Realp* ); do echo <b><u>${i%:}</u></b>; done
Realpython_Numpy-array-programming
Realpython_numpy-tensorflow-performance
Realpython_python-keras-text-classification
Realpython_pytorch-vs-tensorflow
</code></pre>
</td>
</tr>
<tr><td>${variable%%muster}</td><td> Entfernt das <b>größte</b> zutreffende "muster" aus "variable" (gierig). Sucht von hinten nach vornn<br />
Beispiel:<code><pre>
~$ echo ${var}
jetzt aber Butter bei de Fische
~$ echo ${var%% *}
jetzt</pre></code>
Anmerkung: <br />
Alles nach dem letzten (und somit “größten“) Blank (vom String‐Ende betrachtet) wird entfernt und <br />
der Rest zurückgegeben.
</td></tr>
<tr><td>${variable/muster}</td><td> Durchsucht "variable" von vorn nach hinten und entfernt das erste zutreffende "muster"<br /> <br />Beispiel: <code><pre>for i in $(ls -1 purge*)
do
echo ${i}
mv ${i} ${i/purge/purge-EXCH_WF}
done</pre></code></td></tr>
<tr><td>${variable//muster}</td><td> Durchsucht "variable" von vorn nach hinten und entfernt alle zutreffenden "muster"</td></tr>
<tr><td>${variable/muster/string}</td><td> Durchsucht "variable" von vorn nach hinten und ersetzt das erste zutreffende "muster" durch "string"</td></tr>
<tr><td>${variable//muster/string}</td><td> Durchsucht "variable" von vorn nach hinten und ersetzt alle zutreffenden "muster" durch "string"<br />
Beispiel:<br /><code><pre>for i in $(ls -1d USB-Stick_[CI]*/)
do
mv ${i} <em><b>${i//????-??-??/$(date +%Y-%m-%d)}</b></em>
done</pre></code></td></tr>
</table>
<h3>String in eine Einzelteile splitten</h3>
<table>
<tr>
<td valign="top">
<b>Split string using tr command in Bash:</b>
<code><pre>
#!/bin/bash
#
# Script to split a string based
# on the delimiter
my_string="Ubuntu;Linux Mint;Debian;Arch;Fedora"
my_array=($(echo $my_string | tr ";" "\n"))
#Print the split string
for i in "${my_array[@]}"
do
echo $i
done
</pre></code>
</td>
<td valign="top">
<b>Split string by a symbol using the IFS variable:</b>
<code><pre>
#!/bin/bash
#String
text="Welcome@to@GeeksforGeeks@!!"
# Set @ as the delimiter
IFS='@'
# Read the split words into an array
# based on space delimiter
read -ra newarr <<< "$text"
# Print each value of the array by
# using the loop
for val in "${newarr[@]}";
do
echo "$val"
done
</pre></code>
</td>
</tr>
</table>
Beispiel:
<code><pre>
for i in $(ls -1 Adesso_0*); do echo ${i}; separated=${i/Adesso_}; separated=${separated/.html}; separated=($(echo $separated | tr "-" "\n")); newstr=$(echo "Adesso :: 101 Tipps - ${separated[2]} ${separated[0]} - ${separated[1]}"); echo $newstr;echo; done
</pre></code>
<h3>Link:</h3>
<ul>
<li><a href="https://www.linuxnix.com/linuxunix-shell-scripting-10-string-manapluation-examples/"
target="_blank" rel="noreferrer noopener">
LinuxNix.com :: Shell-Scripting - String Manipulation</a>
</li>
<li><a href="https://www.baeldung.com/linux/bash-string-manipulation"
target="_blank" rel="noreferrer noopener">
Baeldung.com :: Bash - String Manipulation</a>
</li>
<li><a href="https://unixutils.com/string-manipulation-with-bash/"
target="_blank" rel="noreferrer noopener">
UnixUtils.com :: String Manipulation with Bash</a>
</li>
<li><a href="https://www.geeksforgeeks.org/bash-scripting-split-string/"
target="_blank" rel="noreferrer noopener">
Geeks for geeks :: Bash Scripting ‐ Split String</a>
</li>
<li><a href="https://linuxhandbook.com/bash-split-string/"
target="_blank" rel="noreferrer noopener">
Linux Handbook :: How to Split String in Bash Script</a>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>Die Variable <code><b>$*</b></code></h3>
In der Variablen $* werden alle Argumente in der Kommandozeile (aus‐<br />
genommen der Scriptname = $0) als eine einzige Zeichenkette gespeichert.
<code><pre>
# Beachtet alle Argumente der Kommandozeile
# Name: aargumstr
echo "Scriptname : $0"
echo "Die restlichen Argumente : $*"
</pre></code>
Die Variable $* wird gern bei Shellscripts verwendet, die eine variable<br />
Anzahl von Argumenten erwarten. Wenn Sie nicht genau wissen, wie<br />
viel Argumente in der Kommandozeile eingegeben werden, müssten<br />
Sie Ihr Script immer um die Anzahl der Positionsparameter ($1 bis $n)<br />
erweitern. Verwenden Sie hingegen $*, ist die Anzahl der Argumente<br />
unwichtig, weil hierbei alle in $* zusammengefasst werden. Dies lässt<br />
sich z. B. hervorragend in einer for-Schleife verwenden.
</li>
<h3>Die Variable <code><b>$@</b></code></h3>
<li>
Im Gegensatz zur Variablen $* fasst die Variable $@ die Argumente in<br />
einzelne Zeichenketten zusammen. Die Funktion wird ähnlich verwendet<br />
wie $*, nur mit dem eben erwähnten Unterschied. Das Anwendungsge‐<br />
biet dieser Variablen liegt ebenfalls vorwiegend in einer Schleife,
</li>
<li>
<b>Merke:</b>
Alle Argumente (auch mehr als 9) sind durch $* oder $@ erreichbar. <br />
$* liefert sie als ein Wort, verkettet mit Leerzeichen, und $@ liefert sie als<br />
ein Argument pro Wort.
</li>
<h3>Die Variable <code><b>$# </b></code></h3>
</li>
Die Variable $# enthält die Anzahl der Argumente, die beim Aufruf des<br />
Shellscripts mit angegeben wurden. Als Beispiel dient folgendes Shellscript:
<code><pre>
# Anzahl von Argumenten
# Name: acountarg
echo $*
echo "Das sind $# Argumente"
</pre></code>
</li>
<li><h3>Special Parameters</h3>
The shell treats several parameters specially. These <br />
parameters may only be referenced; assignment to <br />
them is not allowed.<br />
<br />
* Expands to the positional parameters, starting from one. When the expansion is not within double quotes,
each positional parameter expands to a separate word. In contexts where it is performed, those words are
subject to further word splitting and pathname expansion. When the expansion occurs within double quotes,
it expands to a single word with the value of each parameter separated by the first character of the IFS
special variable. That is, "$*" is equivalent to "$1c$2c...", where c is the first character of the value
of the IFS variable. If IFS is unset, the parameters are separated by spaces. If IFS is null, the parame–
ters are joined without intervening separators.
@ Expands to the positional parameters, starting from one. In contexts where word splitting is performed,
this expands each positional parameter to a separate word; if not within double quotes, these words are
subject to word splitting. In contexts where word splitting is not performed, this expands to a single
word with each positional parameter separated by a space. When the expansion occurs within double quotes,
each parameter expands to a separate word. That is, "$@" is equivalent to "$1" "$2" ... If the double-
quoted expansion occurs within a word, the expansion of the first parameter is joined with the beginning
part of the original word, and the expansion of the last parameter is joined with the last part of the
original word. When there are no positional parameters, "$@" and $@ expand to nothing (i.e., they are re–
moved).
</li>
<li><h3>Die Variable $?</h3>
Expands to the exit status of the most recently executed foreground pipeline.
</li>
<li><h3>Die Variable $-</h3>
Expands to the current option flags as specified upon<br />
invocation, by the set builtin command, or those set<br />
by the shell itself (such as the -i option).<br />
<br />
Beispiel:
<code><pre>
himBHs
</pre></code>
</li>
<li>
<h3>Die Variable $$</h3>
$ Expands to the process ID of the shell. In a subshell, it expands to the process ID of the current shell,
not the subshell.
</li>
<li>
<h3>Die Variable $!</h3>
! Expands to the process ID of the job most recently placed into the background, whether executed as an asyn–
chronous command or using the bg builtin (see JOB CONTROL below).
</li>
<li>
<h3>Die Variable $0</h3>
0 Expands to the name of the shell or shell script. This is set at shell initialization. If bash is invoked
with a file of commands, $0 is set to the name of that file. If bash is started with the -c option, then
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="openbook.rheinwerk-verlag.de/shell_programmierung/shell_005_002.htm" target="_blank" rel="noreferrer noopener">OpenBook Rheinwerk‐Verlag :: Shell‐Programmierung</a></li>
</ul>
</html>
<html>
<table>
<tr><th>Shortcut</th><th>Bedeutung</th></tr>
<tr><td><code><b>Ctrl+X</b></code> + <code><b>Ctrl+E</b></code></td><td>Öffnet/Startet einen Editor (definiert in $EDITOR bzw. $VISUAL)</td></tr>
</table>
<table>
<tr><th colspan="2">Controlling The Screen</th></tr>
<tr><td><center><b>Shortcut</b></center></td><td><center><b>Bedeutung</b></center></td></tr>
<tr><td>Ctrl + l</td><td>clears the screen (same effect as the “clear“ command).</td></tr>
<tr><td>Ctrl + s</td><td>pause all command output to the screen. If you have executed a command <br />
that produces verbose, long output, use this to pause the output scrolling down the screen.</td></tr>
<tr><td>Ctrl + q</td><td>resume output to the screen after pausing it with Ctrl+s</td></tr>
</table>
<table>
<tr><th colspan="2">Move Cursor on The Command Line</th></tr>
<tr><td><center><b>Shortcut</b></center></td><td><center><b>Bedeutung</b></center></td></tr>
<tr><td>Ctrl + a</td><td>moves the cursor to the start of a line<br /> Alternativ: <code><b>Home</b></code>‐Taste</td></tr>
<tr><td>Ctrl + e</td><td>moves the cursor to the end of the line<br /> Alternativ: <code><b>End</b></code>‐Taste</td></tr>
<tr><td>Ctrl + b</td><td>moves the cursor back one character at a time<br /> Alternativ: <code><b>left arrow</b></code> ‐Taste</td></tr>
<tr><td>Ctrl + f</td><td>moves the cursor forward one character at a time<br /> Alternativ: <code><b>right arrow</b></code> ‐Taste</td></tr>
<tr><td>Esc + b</td><td>moves the cursor back one word at a time<br /> Alternativ: <code><b>Ctrl + ←</b></code> ‐Taste bzw. <code><b>Alt + b</b></code></td></tr>
<tr><td>Esc + f</td><td>moves the cursor forward one word at a time<br /> Alternativ: <code><b>Ctrl + →</b></code> ‐Taste bzw. <code><b>Alt + c</b></code></td></tr>
<tr>
<td>Ctrl + xx
</td>
<td>Switches between the start of the line<br />
and the current cursor position.
</td>
</tr>
<tr>
<td>Alt + #
</td>
<td>jump to the start of the line and insert a "#" (hash) sign
</td>
</tr>
<!--
<tr>
<td>
</td>
<td>
</td>
</tr>
-->
</table>
<table>
<tr><th colspan="2">Search Through Bash History</th></tr>
<tr><td>Up arrow key </td><td> retrieves the previous command. If you press it constantly, it takes <br />
you through multiple commands in history, so you can find the one <br />
you want. Use the Down arrow to move in the reverse direction<br />
through the history.</td></tr>
<tr><td>Ctr l+ P and Ctrl + N </td><td> alternatives for the Up and Down arrow keys, respectively.</td></tr>
<tr><td>Ctrl + R </td><td> starts a reverse search, through the bash history, simply type <br />
characters that should be unique to the command you want to find in the history.</td></tr>
<tr><td>Ctrl + S </td><td> stops command output to the screen.</td></tr>
<tr>
<td>Ctrl + G
</td>
<td>quits reverse or forward search, through the bash history.;<br />
exits from the history searching mode.
</td>
</tr>
</table>
<table>
<tr><th colspan="2">Delete Text on the Command Line</th></tr>
<tr><td>Ctrl + D or Delete </td><td> remove or deletes the character under the cursor.</td></tr>
<tr><td>Ctrl + K </td><td> removes all text from the cursor to the end of the line.</td></tr>
<tr><td>Ctrl + U </td><td> removes all the text from the cursor to the beginning of the line.</td></tr>
<tr><td>Ctrl + Y </td><td>Will paste the erased text that you saw with Ctrl + W, Ctrl + U and Ctrl + K shortcuts </td></tr>
</table>
<table>
<tr><th colspan="2">Transpose Text or Change Case on the Command Line</th></tr>
<tr><td>Ctrl + T </td><td> transposes the character before the cursor with the character under the cursor.</td></tr>
<tr><td>Esc + T </td><td> transposes the two words immediately before (or under) the cursor.</td></tr>
<tr><td>Esc + U </td><td> transforms the text from the cursor to the end of the word to uppercase.</td></tr>
<tr><td>Esc + L </td><td> transforms the text from the cursor to the end of the word to lowercase.</td></tr>
<tr><td>Esc + C </td><td> changes the letter under the cursor (or the first letter of the next word) to uppercase, leaving the rest of the word unchanged.</td></tr>
</table>
<table>
<tr><th colspan="2">Working With Processes in Linux</th></tr>
<tr><td>Ctrl + Z </td><td> suspend the current foreground process. This sends the SIGTSTP signal to the process. You can get the process back to the foreground later using the fg process_name (or %bgprocess_number like %1, %2 and so on) command.</td></tr>
<tr><td>Ctrl + C </td><td> interrupt the current foreground process, by sending the SIGINT signal to it. The default behavior is to terminate a process gracefully, but the process can either honor or ignore it.</td></tr>
<tr><td>Ctrl + D </td><td> exit the bash shell (same as running the exit command).</td></tr>
</table>
<table>
<tr><th colspan="2">Bash Bang (!) Commands</th></tr>
<tr><td>!! </td><td> execute last command.</td></tr>
<tr><td>!top v </td><td> execute the most recent command that starts with “top“ (e.g. !).</td></tr>
<tr><td>!top:p </td><td> displays the command that !top would run (also adds it as the latest command in the command history).</td></tr>
<tr><td>!$ </td><td> execute the last word of the previous command (same as Alt +., e.g. if last command is “cat tecmint.txt“, then !$ would try to run “tecmint.txt“).</td></tr>
<tr><td>!$:p </td><td> displays the word that !$ would execute.</td></tr>
<tr><td>!* </td><td> displays the last word of the previous command.</td></tr>
<tr><td>!*:p </td><td> displays the last word that !* would substitute.</td></tr>
</table>
<h3>Links:</h3>
<ul>
<li><a href="https://linuxsimply.com/linux-bash-terminal-keyboard-shortcuts/"
target="_blank" rel="noreferrer noopener">
LinuxSimply :: 60 Bash Terminal Keyboard Shortcuts in Linux </a>
</li>
<li><a href="https://www.tecmint.com/linux-command-line-bash-shortcut-keys/"
target="_blank" rel="noreferrer noopener">
TecMint :: Useful Linux Command Line Bash Shortcuts You Should Know</a>
</li>
<li><a href="https://linuxhandbook.com/linux-shortcuts/"
target="_blank" rel="noreferrer noopener">
LHB :: 13 Linux Terminal Shortcuts Every Power Linux User Must Know</a>
</li>
</ul>
</html>
<html>
<!--
vi -d infos.txt infos_105-3.txt<br />
<br />
sdiff !!:-2 !!:-1<br />
<br />
sdiff vi -d infos.txt vi -d<br />
<br />
sdiff !-2:$<br />
sdiff infos_105-3.txt<br />
<br />
sdiff infos_105-3.txt !-4:-2 "-2" bedeutet: bis zum zweiten Glied!!!<br />
<br />
sdiff infos_105-3.txt vi -d infos.txt<br />
<br />
sdiff infos_105-3.txt !-5:3 hier wird das dritte Glied genommen<br />
<br />
vi :=: 1<br />
<br />
-d :=: 2<br />
<br />
infos.txt :=: 3<br />
<br />
sdiff infos_105-3.txt infos.txt<br />
<br />
-->
<h3>cp ‐i mrc_fx_sfo_ndf.txt /transfer/murex/mueller/!#:2:p</h3>
→ Aktion:<br />
die gesamte Befehlszeile wird wieder ausgegeben (“:p“), <br />
aber erweitert um den Filenamen “mrc_fx_sfo_ndf.txt“, <br />
da er ja an zweiter Stelle steht (“!#:2“). Die zweite Stel–<br />
le deswegen, weil <code>-i</code> als erster Parameter angesehen<br />
wird.<br />
<br />
Ergebnis:<br />
<code><pre>
cp ‐i mrc_fx_sfo_ndf.txt /transfer/murex/mueller/mrc_fx_sfo_ndf.txt
</pre></code>
(Link: <a href="http://unix.stackexchange.com/questions/149715/bash-history-in-script"> http://unix.stackexchange.com/questions/149715/bash-history-in-script)</a><br />
<p />
<h3>^string1^string2^</h3>
Quick Substitution. Repeat the last command, replacing string1 with string2. <br />
Equivalent to <i>!!:s/string1/string2/</i> → only the first occurrence<br />
<br />
<i>!!:gs/string1/string2/</i> → every occurrence will be substituted<br />
<br />
(Link: <a href="https://bash.cyberciti.biz/bash-reference-manual/Event-Designators.html"> https://bash.cyberciti.biz/bash-reference-manual/Event-Designators.html)</a><br />
<br />
<img src="./pictures/Bash_EventDesignators_erweitert_01.png" height=148 width=627 />
</html>
<html>
<meta StuffToDo />
<ul>
<li><code><b>
for i in $(seq 0 100); do date --date="${i} days tomorrow" +%Y-%m-%d_%A; done
</b></code></li>
<br />
<li><b>Verzeichnisse mit Datumsangaben erstellen:</b><br />
<code><b>for i in $(seq 0 120); do mkdir $(date --date="${i} days tomorrow" +%Y-%m-%d_%A); done
</b></code></li>
<br />
<li>weitere Befehle:<br />
<ul>
<li><code><b>for i in $(ls -d ./*_Samstag); do echo ${i}; touch ${i}/"Backup von den USB-Sticks erstellen".txt; done</b></code></li>
<br />
<li><code><b>for i in $(ls -d ./*_Samstag/); do echo ${i}; cp ./2020-01-17/GIT-Uebungen.html ${i}; done</b></code></li>
<br />
<li><code><b>(echo "nächster Termin: ____-__-__ "; echo "============================="; for i in -1 0 2 5 10 17; do echo $(date --date="${i} days tomorrow" +%Y-%m-%d_%A); done) > Datumsliste.txt</b></code></li>
</ul></li>
<br />
<li>
Datum relativ zu einem anderen Datum:<br />
<code><b>MY_DATE=20230529<br />
for i in $(seq 0 5); do y=$(( ${i} * 14 )); date -d "$MY_Date + ${y} days"; done
</b></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.cyberciti.biz/tips/linux-unix-get-yesterdays-tomorrows-date.html" target=_blank>Cyberciti :: Get yesterdays / tomorrows date</a></li>
<!--
<li><a href="" target=_blank></a></li>
-->
</ul>
</html>
<html>
Habe folgende Methoden zum Debugging von Shell-Skripten ausgemacht:
<ol>
<li><b>Cyberciti :: Debugging shell scripts – Option ‐x</b></li>
<li><b>Cyberciti :: Debugging shell scripts – Tool shellcheck</b></li>
<li><b>Cyberciti :: Debugging shell scripts</b></li>
<li><b>IT-Administrator :: bashdb</b></li>
<li><b>IT-Administrator :: Eclipse-Plugin</b></li>
</ol>
<h2>bash‐Option -x</h2>
Run a shell script with -x option.
<code><pre>
$ bash -x script-name
$ bash -x domains.sh
</pre></code>
<h3>Link:</h3>
<a href="http://www.cyberciti.biz/tips/debugging-shell-script.html" target=_blank>Cyberciti :: Debugging shell scripts</a>
<h2>Use shellcheck to lint script</h2>
<a href="https://www.cyberciti.biz/programming/improve-your-bashsh-shell-script-with-shellcheck-lint-script-analysis-tool/" target=_blank>ShellCheck</a> is a static analysis tool for shell scripts. One<br />
can use it to finds bugs in your shell scripts. It is written <br />
in Haskell. You can find warnings and suggestions for <br />
bash/sh shell scripts with this tool. Let us see how to <br />
install and use ShellCheck on a Linux or Unix-like sys‐<br />
tem to enhance your shell scripts, avoid errors and <br />
productivity.<br />
<h3>Link:</h3>
<a href="http://www.cyberciti.biz/tips/debugging-shell-script.html" target=_blank>Cyberciti :: Debugging shell scripts</a><br />
<a href="https://www.cyberciti.biz/programming/improve-your-bashsh-shell-script-with-shellcheck-lint-script-analysis-tool/" target=_blank>Cyberciti :: Tool shellcheck</a>
<h2>Cyberciti :: Debugging shell scripts</h2>
This one allows me to view the command before choosing to run it or to ignore it.
<code><pre>
debug_cmd ()
{
if [ ! -z "${DEBUG}" ]
then
msg_head=$(caller 0)
echo "[ ${msg_head} ] $@" >&2
read -p "Run it [N/y] ? "
if [ "$REPLY" = "y" ] || [ "$REPLY" = "Y" ]
then
eval $@
fi
fi
}
</pre></code>
<h3>Link:</h3>
<a href="http://www.cyberciti.biz/tips/debugging-shell-script.html" target=_blank>Cyberciti :: Debugging shell scripts</a><br />
<h2>IT-Administrator :: bashdb</h2>
<h3>Quelle / Link:</h3>
<h2>IT-Administrator :: Eclipse-Plugin</h2>
<h3>Quelle / Link:</h3>
</html>
<html>
<ul>
<li>aus dem Ubuntu-Users-Forum:
<p>Kleiner Nachtrag:<br />
Solch ein Problem lässt sich auch ganz <br />
einfach dadurch lösen, dann man der <br />
betreffenden Zahl beim Rechnen aus- <br />
drücklich die Basis 10 mitgibt, wie im <br />
Manual beschrieben:
<pre><code>track@track:~$ for i in {06..14}; do echo $i $(( 50 + 10#$i )); done
06 56
07 57
08 58
09 59
10 60
11 61
12 62
13 63
14 64 </code></pre>
</p>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://forum.ubuntuusers.de/post/8881597/"
target="_blank" rel="noreferrer noopener">
Ubuntu-Users - Forum :: for Schleife mit Addition - Wert ist für aktuelle Basis zu groß</a>
</li>
</ul>
</html>
<html>
<ul>
<li><b><u>Einfache Anführungszeichen</u></b> sorgen dafür, dass Umgebungsvariablen (wie z.B. $HOME) <br />
<em><b>nicht</b></em> expandiert werden. Somit versucht die Shell in ein Verzeichnis $HOME zu wechseln, <br />
was es aber nicht gibt. </li>
<br />
<li>
Mit <b><u>doppelten Anführungszeichen</u></b> wird $HOME zum korrekten Namen ersetzt und es sollte<br />
klappen. Man musst die doppelten Anführungszeichen innerhalb des Alias maskieren (mit \)<br />
oder durch einfache Anführungszeichen ersetzen.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://forum.ubuntuusers.de/topic/git-alle-dateien-in-einem-ordner-indexieren-u" target=_blank>Ubuntu‐Users :: Git ‐ Alle Dateien in einem Ordner indexieren</a>/</li>
</ul>
</html>
<html>
<ul>
<li><pre><code>stty -echo</code></pre>
</li>
</ul>
</html>
<html>
<ul>
<li>der Befehl war:
<pre><code>mv ${i} ${fileName}</code></pre>
</li>
<li>Grund für die Fehlermeldung war, dass die Files, <br />
die hinter den Variablen standen, Blanks enthielten,<br />
was beim Expandieren zu einem Carriage Return<br />
wurde;
</li>
<li>Lösung:<br />
am besten beide Variablen (double-)quoten:
<pre><code>mv "${i}" "${fileName}"</code></pre>
</li>
</ul>
</html>
<html>
Fehlermeldung:
<code><pre>
xterm: Xt error: Can't open display: localhost:0.0
</pre></code>
<h3>Link:</h3>
<ul>
<li><a href="https://www.computerhilfen.de/info/loesung-error-cant-open-display-null.html" target=_blank>Computerhilfen :: error can't open display</a></li>
</ul>
</html>
<html>
<ul>
<li>Beim Aufruf von
<pre><code>mueller@HPLaptop:/sys/kernel$ sudo !!
sudo cd debug/</code></pre>
kam folgende Fehlermeldung zurück:
<pre><code>sudo: cd: Befehl nicht gefunden
sudo: »cd"« ist ein Shell-internes Kommando, das nicht direkt gestartet werden kann.
sudo: Die Option »-s« kann zum Start einer privilegierten Shell verwendet werden.
sudo: Die Option »-D« kann zum Start des Programms im angegebenen Verzeichnis verwendet werden.
</code></pre>
</li>
<li><h4>Erklärung:</h4>
The reason you can't do this is simple and two fold:
<ol>
<li>cd is <b><em>not</em></b> a program but an in-built command<br />
and sudo only applies to programs.
</li>
<li>If it were possible to use sudo to cd to a protected<br />
directory then having run the command <br />
sudo cd /var/named you would be in that directory <br />
as a normal user but normal users are not allowed <br />
to be in that directory.<br />
<br />
This is not possible.<br />
</li>
</ol>
</li>
<li><h4>Lösung:</h4>
You can use sudo -i to elevate yourself to super user. <br />
For example:
<pre><code>sudo -i
cd /var/named </code></pre>
You are now logged on as root and can use whatever <br />
commands you wish. When finished type exit and you <br />
are back to being logged on as a normal user.<br />
</li>
<li>Grund: “cd“ ist kein Programm im eigentlichen Sinn,<br />
sondern ein Shell-Built-in, also Bestandteil der Shell<br />
(als Funktion)
</li>
<li>“sudo“ aber erwartet ein (binäres) Programm,<br />
was in diesem Fall nicht vorliegt;
</li>
<li>Wenn es möglich wäre, mit sudo in ein geschütztes<br />
Verzeichnis zu wechseln (i.d.R. gehört es nur dem<br />
User root), würde man als normaler User in diesem<br />
Verzeichnis sein, was aber - aus sicherheitstechni–<br />
schen Gründen - nicht vorgesehen ist.
</li>
<li><b>Workaround:</b><br />
Mit <pre><code>sudo -i</code></pre> in eine Root-Shell wechseln und dann als User root<br />
in das gewünschte Verzeichnis wechseln;
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://askubuntu.com/questions/291666/why-doesnt-sudo-cd-var-named-work"
target="_blank" rel="noreferrer">
Ask Ubuntu :: Why doesn't `sudo cd /var/named` work?</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li><b>… das scheint die einfachste Variante zu sein:</b><br />
Der ls‐Befehl von GNU hat die Option ‐v, die die Zahlen im<br />
Namen auf natürliche Art sortiert.<br />
<br />
Unter BSD‐ls (z.B. unter OS X) funktioniert das <b>nicht</b>, dort<br />
hat die Option ‐v eine andere Bedeutung.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://qexe.de/question/wie-sortiert-man-strings-mit-zahlen-in-bash" target="_blank" rel="noreferrer noopener">Qexe :: Wie sortiert man Strings mit Zahlen in Bash?</a></li>
</ul<
</html>
<html>
<head>
<meta name="Leerzeichen in Filenamen" charset="utf-8" />
</head>
<body>
<ul>
<li><h3>Bearbeiten von Files mit Leerzeichen im Namen in einer for‐Loop:</h3>
In der for‐loop wird die (Umgebungs‐)Variable $IFS verwendet, <br />
um den aktuell verwendeten Feldtrenner (<em>field separator</em>) anzu‐<br />
geben.<br />
<br />
Defaultmäßig ist $IFS mit dem Leerzeichen (<em>space character</em>)<br />
belegt.<br />
<br />
<code><pre>
<em># aktuelle Einstellung speichern:</em>
oldIFS=$IFS
<em># IFS‐Variable neu setzen:</em>
<em># ‐e :: die mit einem Backslash angegebenen Zeichen sollen interpretiert werden
        (enable interpretation of backslash escapes)</em>
<em># ‐n :: Do not append a new line</em>
<em># \n :: Newline‐Zeichen setzen</em>
<em># \b :: Backspace</em>
IFS=$(echo ‐en “\n\b“)
<em># eigentliches Shell-Kommando ausführen</em>
<em># ursprüngliche Einstellung wiederherstellen:</em>
IFS=$oldIFS
</pre></code>
</li>
<li><h3>Ersetzen Leerzeichen durch Underscore:</h3>
<em>scheint irgendwie nicht mehr zu funktionieren</em>
<code><pre>
for i in $(ls -1 Rec*); do mv “${i}“ $(echo ${i} | tr ' ' '_'); done
</pre></code>
… dann lässt sich das File leicher bearbeiten.<br />
<br />
Dasselbe funktioniert auch mit anderen Sonderzeichen als<br />
einem Leerzeichen (z.B. ), (, …)</li>
<li><h3>Alternative:</h3>
<code><pre>
for f in *\ *.srt; do mv "$f" "${f// /_}"; done
</pre></code>
Though it's not recursive, it's quite fast and simple. I'm<br />
sure someone here could update it to be recursive.<br />
<br />
The ${f// /_} part utilizes bash's parameter expansion<br />
mechanism to replace a pattern within a parameter<br />
with supplied string. The relevant syntax is <code>${parameter/pattern/string}</code>. <br />
<br />
See: <a href="https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html" target="_blank" rel="noreferrer noopener">GNU :: Bash manual ‐ Shell‐Parameter Expansion</a><br />
or <a href="http://wiki.bash-hackers.org/syntax/pe" target="_blank" rel="noreferrer noopener">Bash‐Hackers :: Wiki ‐ Parameter Expansion</a> .
</li>
<li><h3>Alternative:</h3>
<code><pre>
while read -r line; do echo -e “${line//\ /_}“; done <test.txt
</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.cyberciti.biz/tips/handling-filenames-with-spaces-in-bash.html" target="_blank" rel="noreferrer noopener">nixCraft :: BASH ‐ Handling filenames with spaces</a></li>
<li><a href="https://stackoverflow.com/questions/2709458/how-to-replace-spaces-in-file-names-using-a-bash-script"
target="_blank" rel="noreferrer noopener">Stackoverflow :: How to replace spaces in file names using a bash script</a></li>
<li><a href="https://www.geeksforgeeks.org/bash-scripting-how-to-read-a-file-line-by-line/"
target="_blank" rel="noreferrer noopener">
Geeks for geeks: Bash ‐ How to read a file line by line</a>
</li>
</ul>
</body>
</html>
<html>
<br />
<b>Link:</b><br />
<a href="https://www.cyberciti.biz/howto/insult-linux-unix-bash-user-when-typing-wrong-command/" target="_blank">Fun with bash</a><br />
<br />
</html>
<html>
<ul>
<li>In Bash shell, you can use the Bash shell expansions to boost your terminal productivity.<br />
<br />
For example, the <code><b>$_</b></code> can be used to get the last argument of the previous command.
<pre><code>mv oldname.txt newname.txt && cat $_</code></pre>
This will rename the file and then displays the renamed version.
</li>
<li>Or use the <code><b>!!</b></code> to repeat the last command. Useful when you forget to add sudo.
<pre><code>apt update
sudo !!</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://linuxhandbook.com/newsletter/25-06/"
target="_blank" rel="noreferrer noopener">
LHB :: Linux Digest #25.06 - Newsletter
</li>
</ul>
</html>
<html>
A here document is nothing but I/O redirection that tells the bash<br />
shell to read input from the current source until a line containing <br />
only delimiter is seen.<br />
<br />
This is useful for providing commands to ftp, cat, echo, ssh and<br />
many other useful Linux/Unix commands. This feature should <br />
work with bash or Bourne/Korn/POSIX shell too.<br />
<h3>heredoc syntax</h3>
The syntax is:
<code><pre>
command <<EOF
cmd1
cmd2 arg1
EOF
</pre></code>
OR allow here-documents within shell scripts to be indented in a natural fashion using EOF<<-
<code><pre>
command <<-EOF
msg1
msg2
$var on line
EOF
</pre></code>
OR
<code><pre>
command <<'EOF'
cmd1
cmd2 arg1
$var won't expand as parameter substitution turned off
by single quoting
EOF
</pre></code>
OR redirect and overwrite it to a file named my_output_file.txt:
<code><pre>
command <<EOF > my_output_file.txt
mesg1
msg2
msg3
$var on $foo
EOF
</pre></code>
OR redirect and append it to a file named my_output_file.txt:
<code><pre>
command <<EOF >> my_output_file.txt
mesg1
msg2
msg3
$var on $foo
EOF
</pre></code>
<h3>Examples</h3>
The following script will write the needed contents to a file named /tmp/output.txt:
<code><pre>
#!/bin/bash
OUT=/tmp/output.txt
echo "Starting my script..."
echo "Doing something..."
cat <<EOF >$OUT
Status of backup as on $(date)
Backing up files $HOME and /etc/
EOF
echo "Starting backup using rsync..."
</pre></code>
You can view /tmp/output.txt with the cat command:
<code><pre>
$ cat /tmp/output.txt
</pre></code>
Sample outputs:
<code><pre>
Status of backup as on Thu Nov 16 17:00:21 IST 2017
Backing up files /home/vivek and /etc/
</pre></code>
<h3>Disabling pathname/parameter/variable expansion, <br />
command substitution, arithmetic expansion</h3>
Variable such as $HOME and command such as $(date) were interpreted substitution in script. To disable it use single quotes with 'EOF' as follows:
<code><pre>
#!/bin/bash
OUT=/tmp/output.txt
echo "Starting my script..."
echo "Doing something..."
# No parameter and variable expansion, command substitution, arithmetic expansion, or pathname expansion is performed on word.
# If any part of word is quoted, the delimiter is the result of quote removal on word, and the lines in the here-document
# are not expanded. So EOF is quoted as follows
cat <<'EOF' >$OUT
Status of backup as on $(date)
Backing up files $HOME and /etc/
EOF
echo "Starting backup using rsync..."
</pre></code>
You can view /tmp/output.txt with the cat command:
<code><pre>
$ cat /tmp/output.txt
</pre></code>
Sample outputs:
<code><pre>
Status of backup as on $(date)
Backing up files $HOME and /etc/
</pre></code>
<h3>A note about using tee command</h3>
The syntax is:
tee /tmp/filename <<EOF >/dev/null
line 1
line 2
line 3
$(cmd)
$var on $foo
EOF
Or disable variable substitution/command substitution by quoting EOF in a single quote:
tee /tmp/filename <<'EOF' >/dev/null
line 1
line 2
line 3
$(cmd)
$var on $foo
EOF
Here is my updated script:
#!/bin/bash
OUT=/tmp/output.txt
echo "Starting my script..."
echo "Doing something..."
tee $OUT <<EOF >/dev/null
Status of backup as on $(date)
Backing up files $HOME and /etc/
EOF
echo "Starting backup using rsync..."
A note about using in-memory here-docs
Here is my updated script:
<code><pre>
#!/bin/bash
OUT=/tmp/output.txt
## in memory here docs
## thanks https://twitter.com/freebsdfrau
exec 9<<EOF
Status of backup as on $(date)
Backing up files $HOME and /etc/
EOF
## continue
echo "Starting my script..."
echo "Doing something..."
## do it
cat <&9 >$OUT
echo "Starting backup using rsync..."
</pre></code>
<br />
Link:<br />
<a href="https://www.cyberciti.biz/faq/using-heredoc-rediection-in-bash-shell-script-to-write-to-file/" target="_blank">nixCraft :: How to use a here documents to write data to a file in bash script</a>
</html>
<html>
Bash history is very powerful. Understanding how to effectively<br />
use the bash history expansions will make you extremely pro‐<br />
ductive on the Linux command line.<br />
<br />
This article explains 15 examples that uses the following bash<br />
history expansion features:<br />
<ul>
<li><b>Event designators</b> ‐ Refers to a particular command in the history. It starts with a <code><b>!</b></code></li>
<li><b>Word designators</b> ‐ Refers to a particular word of a history entry. Typically this gets combined with an even designator. Event designators and word designators are separated by a colon</li>
<li><b>Modifiers</b> ‐ Modifies the result of the substitution done by the event or word designators</li>
</ul>
As you already know, to view all the history entries, use the his‐<br />
tory command. This will display all the commands that were exe‐<br />
cuted earlier along with the number for that command in the his‐<br />
tory table.
<code><pre>
$ history
1 tar cvf etc.tar /etc/
2 cp /etc/passwd /backup
3 ps -ef | grep http
4 service sshd restart
5 /usr/local/apache2/bin/apachectl restart
</pre></code>
<h2>Bash History Event Designators</h2>
<h3>1. Execute a specific command from the history using !n</h3>
If you've executed a command earlier, instead of re-typing it again, you can quickly execute it by using the corresponding number of the command in the history.
For example, to execute command #4, do the following. This will display command #4 from the history, and execute it immediately.
<code><pre>
$ !4
service sshd restart
</pre></code>
To execute a command that was typed 2 commands back, do the following.
<code><pre>
$ !-2
</pre></code>
To execute the previous command, do any one of the following:
<code><pre>
$ !!
$ !-1
</pre></code>
You can also press <Ctrl>-P (if you are in the default emacs mode) to get to the previous command.
If you've enabled vi style editing for the command line using “set -o vi“, use <Esc>-k to get to the previous command.
<h3>2. Execute a command with keywords using !string and !?string</h3>
You can also use keywords to execute a command from the history.
The following example will search for previous command that STARTS with the keyword “ps“ and execute it. In this example, it picks up the previous command “ps -ef | grep http“ and executes it.
<code><pre>
$ !ps
ps -ef | grep http
</pre></code>
The following example will search for previous command that CONTAINS the keyword “apache“ and execute it. In this example, it picks up the previous command “/usr/local/apache2/bin/apachectl restart“ and executes it.
<code><pre>
$ !?apache
/usr/local/apache2/bin/apachectl restart
</pre></code>
<h3>3. Replace a string from the previous command using ^str1^str2^</h3>
In the following example, first we executed the ls command to verify a file. Later we realized that we want to view the content of the file. Instead of typing the whole file name again, we can just replace the “ls“ in the previous command with “ as shown below.
<code><pre>
$ ls /etc/cron.daily/logrotate
$ ^ls^cat^
cat /etc/cron.daily/logrotate
</pre></code>
Note: For additional bash history tips, refer to 15 Examples To Master Linux Command Line History. This explains how to display timestamp in the history, and how to use various history related environment variables including HISTTIMEFORMAT, HISTSIZE, HISTFILE, HISTCONTROL, and HISTIGNORE
<h2>Bash History Word Designators</h2>
Word designators are very helpful when you want to type a new command, but use the argument from one of the command that was executed earlier. Some of the examples are shown below.
<h3>4. Get the 1st argument of a command using :^</h3>
In the following example, “!cp:^“ was given as an argument to “ls -l“ command. “!cp:^“ locates the previous command in the history that starts with “cp“ and gets the 1st argument of that command.
<code><pre>
$ cp /etc/passwd /backup
$ ls -l !cp:^
ls -l /etc/passwd
</pre></code>
The following example gets the 1st argument from the previous command.
<code><pre>
$ ls -l !!:^
</pre></code>
<h3>5. Get the last argument of a command using :$</h3>
In the following example, “!cp:$“ was given as an argument to “ls -l“ command. “!cp:$“ locates the previous command in the history that starts with “cp“ and gets the last argument of that command.
<code><pre>
$ cp /etc/passwd /backup
$ ls -l !cp:$
ls -l /backup
</pre></code>
The following example gets the last argument from the previous command.
<code><pre>
$ls -l !!:$
</pre></code>
<h3>6. Get the nth argument of a command using :n</h3>
In the following example, ‐ was given as an argument to 'ls -l'command. “!tar:2“ locates the previous command in the history that starts with “tar“ and gets the 2nd argument of that command.
<code><pre>
$ tar cvfz /backup/home-dir-backup.tar.gz /home
$ ls -l !tar:2
ls -l /backup/home-dir-backup.tar.gz
</pre></code>
<h3>7. Get all the arguments from a command using :*</h3>
In the following example, “!cp:*“ was given as an argument to “ls -l“ command. “!cp:*“ locates the previous command in the history that starts with “cp“ and gets all it's arguments.
<code><pre>
$ cp /etc/passwd /backup
$ ls -l !cp:*
ls -l /etc/passwd /backup
</pre></code>
<h3>8. Refer to the recently searched word using !%</h3>
As we explained above, the “!?apache“ will search for the previous history command that CONTAINS the keyword “apache“ and execute it.
<code><pre>
$ /usr/local/apache2/bin/apachectl restart
$ !?apache
/usr/local/apache2/bin/apachectl restart
</pre></code>
!% will refer to the whole word that was matched by the previous “?“ search.
For example, If you've searched previously “?apache“, the “!%“ will match the whole word “/usr/local/apache2/bin/apachectl“. Note that “/“is treated as part of one word in this context.
So, in this case, by executing the following, you can stop the apache.
<code><pre>
$ !% stop
/usr/local/apache2/bin/apachectl stop
</pre></code>
<h3>9. Get range of arguments from a command using x-y</h3>
In the following example, “!tar:3-5“ was given as an argument to “ls -l“ command. “!tar:3-5“ locates the previous command in the history that starts with “tar“ and gets the arguments from 3 through 5.
<code><pre>
$ tar cvf home-dir.tar john jason ramesh rita
$ ls -l !tar:3-5
ls -l john jason ramesh
</pre></code>
The following gets all the arguments from 2.
<code><pre>
$ ls -l !tar:2-$
</pre></code>
Please note the following:
<table>
<tr><td>!!:* </td><td>Gets all the arguments from the previous command.</td></tr>
<tr><td>!!:2* </td><td>Gets all the arguments starting from 2nd argument.</td></tr>
<tr><td>!!:2-$ </td><td>Same as above. Gets all the arguments starting from 2nd argument.</td></tr>
<tr><td>!!:2- </td><td>Gets all the arguments starting from 2nd argument (except the last argument).</td></tr>
</table>
<h2>Bash History Modifers</h2>
Modifers are given after the word designators, as explained in the examples below.
<h3>10. Remove the trailing path name from a word using :h</h3>
In the following example, “!!:$:h“ takes the last argument of the previous command, and removes the trailing path name. In this case, it removes the filename, and gets only the full path.
<code><pre>
$ ls -l /very/long/path/name/file-name.txt
$ ls -l !!:$:h
ls -l /very/long/path/name
</pre></code>
<h3>11. Remove all leading path name from a word using :t</h3>
This is exact opposite of the previous example.
In the following example, “!!:$:t“ takes the last argument of the previous command, and removes all the leading path names. In this case, it gets only the file name.
<code><pre>
$ ls -l /very/long/path/name/file-name.txt
$ ls -l !!:$:t
ls -l file-name.txt
</pre></code>
<h3>12. Remove the file name extension from a word using :r</h3>
In the following example, “!!:$:r“ takes the last argument of the previous command, and removes only the “.suffix“ (which is file name extension here). In this case, it removed .txt
<code><pre>
$ ls -l /very/long/path/name/file-name.txt
$ ls -l !!:$:r
ls -l /very/long/path/name/file-name
</pre></code>
<h3>13. Sed like Substitution in bash history using :s/str1/str2/</h3>
Instead of using the “^original^replacement^“ as we discussed earlier, we can also use a sed like substitution in the bash history as shown in the example below. This might be easy to remember. !! is to call previous command, “:s/original-string/replacement-string/“ is the sed-like syntax to replace a string.
<code><pre>
$ !!:s/ls -l/cat/
</pre></code>
You can also use the g flag (along with s flag) to do global substitution as shown below. This is helpful when you've mistyped multiple word and would like to change all of them together and execute the command again.
In the following example, by mistake I've given “password“ twice (instead of passwd).
<code><pre>
$ cp /etc/password /backup/password.bak
</pre></code>
To fix this, just do the following global history sed like substitution.
<code><pre>
$ !!:gs/password/passwd/
cp /etc/passwd /backup/passwd.bak
</pre></code>
<h3>14. Repeat the substitution quickly using :&</h3>
If you've already executed a bash history substitution successfuly as shown above, you can repeat the same substitution quickly again using :&.
I've by mistake typed “password“ again instead of “passwd“ in another command.
<code><pre>
$ tar cvf password.tar /etc/password
</pre></code>
Now, instead of retyping the command, or doing the “gs/password/passwd“, I can just use “:&“, which will reuse the last substitution. Use “:g&“ for reusing the last subsitution by globally.
<code><pre>
$ !!:g&
tar cvf passwd.tar /etc/passwd
</pre></code>
<h3>15. Print the command without executing it using :p</h3>
This is very helpful when you are doing complex history substitution, and you want to view the final command before executing it.
In the following example, “!tar:3-:p“, doesn't really execute the command.
Since we've given “:p“ here, it just does the substitution and displays the new command. Once you've verified the bash history expansion, and if you think this is the command you intended to run, remove the “:p“ and execute it again.
<code><pre>
$ tar cvf home-dir.tar john jason ramesh rita
$ tar cvfz new-file.tar !tar:3-:p
tar cvfz new-file.tar john jason ramesh
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://www.thegeekstuff.com/2011/08/bash-history-expansion/" target=_blank>The GeekStuff :: 15 Linux Bash History Expansion Examples You Should Know</a></li>
</ul>
<br /><br /><br /><br />
</html>
<html>
Bash provides many hot keys to ease use. Like
<table border="1">
<tr>
<td>ctrl - l</td>
<td>clear screen</td>
</tr>
<tr>
<td>ctrl - r</td>
<td>does a search in the previously given commands so that you don't <br />
have to repeat long command</td>
</tr>
<tr>
<td>ctrl - u</td>
<td>clears the typing <b>before</b> the hotkey</td>
</tr>
<tr>
<td>ctrl - k</td>
<td>clears the typing <b>after</b> the hotkey</td>
</tr>
<tr>
<td>ctrl - a</td>
<td>takes you to the <b>begining</b> of the command you are currently typing</td>
</tr>
<tr>
<td>ctrl - e</td>
<td>takes you to the <b>end</b> of the command you are currently typing in.</td>
</tr>
<tr>
<td>esc - b</td>
<td>takes you back by one word while typing a command.</td>
</tr>
<tr>
<td>ctrl - c</td>
<td>kills the current command or process.</td>
</tr>
<tr>
<td>ctrl - d</td>
<td>kills the shell.</td>
</tr>
<tr>
<td>ctrl - h</td>
<td>deletes one letter at a time from the command you are typing in.</td>
</tr>
<tr>
<td>ctrl - z</td>
<td>puts the currently running process in background, the process<br />
can be brought back to run state by using fg command.</td>
</tr>
<tr>
<td>esc - p</td>
<td>like ctrl-r lets you search through the previously given commands.</td>
</tr>
<tr>
<td>ctrl - l</td>
<td>esc-. -- gives the last command you typed.</td>
</tr>
</table>
This tip generously supported by: mchulet@cabletron.com
</html>
<html>
Es gibt mehrere Möglichkeiten, Kommentare in Shell‐<br />
Skripten einzutragen:
<ul>
<li></li>
<li></li>
<li><b>Using the HERE‐DOCUMENT:</b><br />
<code><pre>
#!/bin/bash
echo “Say Something“
<<<COMMENT1
your comment 1
comment 2
blah
COMMENT1
echo “Do something else“
</pre></code></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.cyberciti.biz/faq/bash-comment-out-multiple-line-code/" target="_blank">nixCraft :: How To Put Multi-Line Comment in Shell Script</a></li>
</ul>
</html>
<html>
<ul>
<li>Von <b>hexadezimal</b> nach <b>dezimal</b>:
<code><b>$ echo “ibase=16; FF“ | bc</b></code><br />
⇒ Ausgabe: 255
</li>
<br />
<li>Von <b>dezimal</b> nach <b>hexadezimal</b>:
<code><b>$ echo “obase=16; 120“ | bc</b></code><br />
⇒ Ausgabe: 78
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href=""
target="_blank" rel="noreferrer noopener">
nixCraft :: </a>
</li>
</ul>
</html>
<html>
<head>
<meta zeilenweise File lesen/>
</head>
<body>
Every now and then, I have to do a loop that <br />
will take each line from a file and process it <br />
as a complete line. Since I do this infrequently, <br />
I always have to stop and ask myself "Now, <br />
how do I do that again?". Unlike my everyday <br />
"for word in `cat file`" logic that breaks every <br />
line in separate words and loops on each of <br />
them, these while statements read and process<br />
a line at a time.
<code><pre>
while read line
do
name=$line
echo "Text read from file - $name"
done < $1
<br />
while read line
do
if [ "$list" == "" ]; then
list=$line
else
list="$list, $line"
fi
done < /tmp/u$$
</code></pre>
<h3>Link: </h3>
<ul>
<li><a href="http://www.itworld.com/operating-systems/436163/unix-scripting-templates" target="_blank" rel="noreferrer noopener">ITWorld :: Looping through a file at a time</a></li>
</ul>
</body>
</html>
<html>
<code><pre>
[Strg]+[Shift]+[u]
</pre></code>
(<b>“[u]“</b> steht für <b>“unicode“</b>)<br />
<br />
Es erscheint ein u, unterstrichen, dann dahinter einfach die Zeichennummer<br />
als Hexwert angeben, zB. für A 41, und mit Enter bestätigen.
<h3>Links:</h3>
<ul>
<li><a href="https://forum.ubuntuusers.de/topic/ascii-steuerzeichen-per-tastatur-eingeben/" target=_blank>Ubuntu-Users</a></li>
</ul>
</html>
<html>
<code><pre>
date --date="tomorrow" +%Y-%m-%d_%A
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://www.cyberciti.biz/tips/linux-unix-get-yesterdays-tomorrows-date.html" target="_blank">Cyberciti :: Get yesterdays or tomorrows date</a></li>
</ul>
</html>
<html>
<h4>Anzeigen der Tage und der Anzahl der dafür vorgesehenen Jobs:</h4>
<ul>
<li><pre><code>cd .. && for i in $(ls -d ./20*); do echo ${i}; ls -l ${i} | grep -v insgesamt | wc -l ; done | less && cd -</code></pre>
</li>
<li><pre><code>for i in $(ls -1d *Samstag*); do echo ${i}; pwd; cp -i "00_Backup von den USB-Sticks erstellen.txt" ./${i}; done</code></pre>
bzw.
<pre><code>for i in $(ls -1d *Samstag*); do echo ${i}; pwd; touch ./${i}/“00_Backup von den USB-Sticks erstellen.txt“; done</code></pre>
</li>
<li><code><pre>for i in $(cut -f1 Tiddly_Sonderzeichen.txt ); do echo ${i}; grep ${i} Wiki.html; echo; done</code></pre>
</li>
</ul>
<h4>Veraltete Datumsverzeichnisse anzeigen (um sie später zu löschen):</h4>
<ul>
<li>
<pre><code>currentDate=$(date +%Y-%m-%d_%A)
for i in $(ls -d 202*); do if [ ${i} \< ${currentDate} ]; then echo ${i}; fi; done</code></pre>
</li>
<li><pre><code>for i in $(\ls -1d 2024-06-2[2-7]*); do echo ${i}; mv ${i}/* 2024-06-28_Freitag; done
for i in $(\ls -1d 2024-06-2[2-7]*); do echo ${i}; rmdir ${i}; done</code></pre>
</li>
</ul>
<h4>Liste von Files aus einem File lesen & und nummeriert anlegen:</h4>
<ul>
<li><pre><code>j=0 && for i in $(cat videolist.txt); do j=$(( j + 1 )); if [[ ${j} -lt 10 ]]; then touch 0${j}_${i}; else touch ${j}_${i}; fi; done</code></pre>
</li>
<li><pre><code>for i in {01..19}; do echo ${i}_$( head -n ${i} Videolist.txt | tail -1 ); done</code></pre>
</li>
<li><pre><code>for i in {01..21}; do echo ${i}_$( batcat --line-range ${i} --decorations never VideoList.txt ) ; done</code></pre>
</li>
</ul>
<h4>Files per "<em>find</em>" finden & verschieben:</h4>
<ul>
<li><pre><code>for i in "*Vertical Pod Autoscaler*" "*Constraints with limits, requests, and quotas*" "*Pod Requests and Limits*"; \
do var=$(echo ${i// /*} | xargs -n 1 find . -iname); \
echo "mv ${var} $TODAY"; done</code></pre>
</li>
</ul>
<h4>Leerzeichen in Filenamen ersetztn:</h4>
<ul>
<li><pre><code>echo 'Erfahrene Männer wissen Finger weg von Frauen mit diesen 10 Merkmalen.mp4' | tr ' ' '-' | xargs -n 1 mv 'Erfahrene Männer wissen_ Finger weg von Frauen mit diesen 10 Merkmalen.mp4' </code></pre>
</li>
<li><pre><code>for i in $(\ls -1 [01]*); do mv ${i} $(echo ${i} | sed -e 's/\ //g'); done
</li>
</ul>
<h4>StuffToDo-Template auf mehrere Files anwenden</h4>
<ul>
<li><pre><code>value=0; for i in $(cat VideoList.txt); do cat /media/mueller/MUELLER/StuffToDo/StuffToDo-Template.html > /media/mueller/MUELLER/StuffToDo/$TODAY/20250813_D_AWS-Bootcamp_CKA-04_${i/\.txt}.html; done</code></pre>
</li>
<li><pre><code>for i in $( cat VideoList.txt | tr -d '[:digit:]+_'); do cat /media/mueller/MUELLER/StuffToDo/StuffToDo-Template.html > /media/mueller/MUELLER/StuffToDo/2025-08-22_Freitag/20250822_D_AWS-Bootcamp_SAA_10_${i/txt/html}; done
</code></pre>
</li>
</ul>
</html>
<html>
<ul>
<li><b>-D</b></li>
<li><b>- --dump-po-strings</b><br />
Equivalent to -D, but the output is in the GNU gettext po (portable object) file format. </li>
<li><b>- -dump-strings</b><br />
Equivalent to -D. </li>
<li><b>-l</b><br />make this shell act as if it had been directly invoked by login. <br />When the shell is <u>interactive</u>, this is equivalent to starting a login shell with '<code>exec -l bash</code>'. <br />When the shell is <u>not interactive</u>, the login shell startup files will be executed. '<code>exec bash -l</code>' or '<code>exec bash --login</code>' will replace the current shell with a Bash login shell. <br />See Bash Startup Files, for a description of the special behavior of a login shell.
</li>
</ul>
<h3>Links:</h3>
<a href="https://www.gnu.org/software/bash/manual/bashref.html" target=_blank>GNU :: Bash reference</a>
</html>
<html>
The sub-section of interest today is <b>Parameter Expansion</b> ‐<br />
that is, $var in its many forms. Don't be confused by the name<br />
though, it's really about <u>parameter and variable expansion</u>.<br />
<h3>Case Conversion</h3>
Gone are the days of using <code>tr '[[:lower:]]' '[[:upper:]]' </code> <br />
to convert strings to uppercase:
<code><pre>
$ a=hello
$ echo ${a^} # First character only
Hello
$ echo ${a^^} # All characters
HELLO
</pre></code>
And for going to lowercase:
<code><pre>
$ a=HELLO
$ echo ${a,} # First character only
hELLO
$ echo ${a,,} # All characters
hello
</pre></code>
You also can specify a character after the operator and change<br />
the case only of characters that match:
<code><pre>
$ a=hello
$ b=love
$ echo ${a^l} # First character if it is an 'l'
hello
$ echo ${b^l}
Love
$ echo ${a^^ll} # All characters that are 'l's
heLLo
$ echo ${b^^l}
Love
</pre></code>
<h3>Names Starting with Some Prefix</h3>
Need a list of all the variables whose names match a certain<br />
prefix? Do this:
<code><pre>
$ mya=1
$ myb=2
$ yourc=3
$ echo ${!my*}
mya myb
</pre></code>
<h3>Indirection</h3>
Bash even can give you a taste of the good-old days of pro‐<br />
gramming C and Assembler and using indirect addressing ‐ <br />
well sort of:
<code><pre>
$ var=somevalue
$ var_name=var
$ echo ${!var_name}
somevalue
</pre></code>
What's happening here is that the value of var_name gives <br />
you the name of the actual variable to be expanded. That<br />
variable then is expanded and becomes the result of the<br />
expansion. In this case, “var_name“; has the value “;var“;,<br />
so the variable “;var“; is expanded to yield the ultimate value<br />
of “;somevalue“;.
<h3>Short Detour into Namerefs</h3>
As a bit of an aside, because it's not really “parameter<br />
expansion“, let's take a quick look at namerefs in bash. <br />
<br />
A <b>nameref variable</b> is a variable that references another<br />
variable:
<code><pre>
$ var=no
$ declare -n ref=var # -n == nameref
$ ref=yes
$ echo $ref
yes
</pre></code>
The variable “ref“ is a reference to the variable “var“. When <br />
you assign to “ref“, you actually change the value of “var“.<br />
This can be particularly handy in getting values out of a <br />
function by passing the name of a variable to the function:
<code><pre>
$ cat nref.sh
function func()
{
local -n up_value=$1 # -n == nameref
up_value=new_value
echo "Changing '${!up_value}' in ${FUNCNAME[0]}"
}
aval=old_value
echo
echo "Before function call, aval is $aval"
func aval # pass var *name* to func
echo "After function call, aval is $aval"
</pre></code>
Running that, you get:
<code><pre>
$ bash nref.sh
Before function call, aval is old_value
Changing 'aval' in func
After function call, aval is new_value
</pre></code>
Since indirection is automatic with nameref variables, you <br />
don't use the exclamation point expansion to get the value<br />
of the referenced variable; normal $var expansion works.<br />
In the case of namerefs, the exclamation point expansion<br />
yields a different result: the name of the referenced variable.<br />
So, this slight detour dealt with parameter expansion after all.
<h3>Transformation</h3>
There are also a number of expansions of the form ${var@?},<br />
where the "?" is one of the letters "Q", "E", "P", "A" or "a" that <br />
can transform the value or get you information about the vari‐<br />
able itself. For example:
<code><pre>
$ declare -a array=(1 2)
$ echo Attributes: ${array@a}
Attributes: a # i.e. array was declared with -a
</pre></code>
Check the man page for more information about these "@" <br />
expansions.
<h3>Unset or Null</h3>
And to wrap it up, one other subtle thing that can be easy to<br />
overlook when reading the parameter expansion section re&hpyhen;<br />
lates to the colon (:) in many of the expansions. For example, <br />
the :- form of expansion allows a default value to be specified<br />
if a variable is unset or null:
<code><pre>
unset var
$ echo var: ${var:-default}
var: default
var=
$ echo var: ${var:-default}
var: default
</pre></code>
And now if you leave out the colon:
<code><pre>
unset var
$ echo var: ${var-default}
var: default
var=
$ echo var: ${var-default}
var:
</pre></code>
So leaving out the colon changes the test from "unset or null" to<br />
just a test for "unset". This applies to the :-, :=, :?, and :+ forms<br />
of parameter expansion as well.
<h3>Your Mileage May Vary</h3>
If something doesn't seem to work, check your bash version:
<code><pre>
$ echo $BASH_VERSION
4.4.23(1)-release
</pre></code>
<br />
<h3>Links:</h3>
<ul>
<li><a href="https://www.linuxjournal.com/content/whats-new-bash-parameter-expansion"
target="_blank" rel="noreferrer noopener">
Linux Journal :: What's New in Bash Parameter Expansion</a>
</li>
</ul>
<br /><br /><br /><br />
</html>
<html>
<b>jam@linux-188m:~/.config/pcmanfm/LXDE> less desktop-items-0.conf</b><br>
[computer_programming_using_gnu_smalltalk.pdf]<br>
x=949<br>
y=5<br>
<br>
[Baerwolff_2]<br>
x=590<br>
y=151<br>
<br>
[PhysicalModellingInOctave]<br>
x=584<br>
y=32<br>
<br>
[EXtra_Magazin_02_2012_web.pdf]<br>
x=765<br>
y=369<br>
<br>
[HUBerlin_AnalysisI-II.pdf]<br>
x=776<br>
y=6<br>
<br>
[Baerwolff_1]<br>
x=764<br>
y=110<br>
<br>
[unix-shell.pdf]<br>
x=408<br>
y=538<br>
<br>
</html>
<html>
<h3>erste Möglichkeit:</h3>
hat nicht so funktioniert, wie ich es mir vorgestellt habe;
<ul>
<li>You can specify a window's position by editing $HOME/.config/openbox/lubuntu-rc.xml.
</li>
<li>Back-up lubuntu-rc.xml as a safety measure.
</li>
<li>Open $HOME/.config/openbox/lubuntu-rc.xml with a plain text editor.
</li>
<li>Scroll down to the section titled <applications>. You'll see a lot of text commented out.
</li>
<li>Immediately after the last commented line, paste the following:
<pre><code><application class="Lxterminal" name="lxterminal">
<position force="yes">
<x>-0</x>
<y>0</y>
</position>
</application></code></pre>
</li>
<li>Save lubuntu-rc.xml (as a plain text file).
</li>
<li>Open a terminal and run openbox --reconfigure. There should be no error dialog window indicating parsing errors, etc.
</li>
<li>Now, when you run lxterminal, it should open at the top right corner of your screen. Once you're sure, lxterminal opens as specified in the example, edit lubuntu-rc.xml to adjust the x and y values to suit your needs remembering to run openbox --reconfigure to make the changes register after saving your edits.
</li>
<li>You can consult http://openbox.org/wiki/Help:Applications for more details.
</li>
</ul>
<h3>zweite Möglichkeit:</h3>
<ul>
<li>Startmenü
</li>
<li>→ Einstellungen
</li>
<li>→ Openbox Konfiguration Manager
</li>
<li>→ neues Fenster erscheint;<br />
  in diesem Fenster folgende Einstellungen machen:<br />
<img src="./pictures/Openbox-Einstellungsmanager.png"
height=264 width=800 /><!-- height=352 width=1067 -->
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://askubuntu.com/questions/1003080/how-do-i-specify-the-position-of-an-lxterminal"
target="_blank" rel="noreferrer noopener">
</a>
</li>
</ul>
</html>
<html>
Beim Programmieren eines One‐Liners ist folgende Fehlermeldung aufgetaucht:
<code><pre>
[…]
17
17 - Esercizio 5: Per ricapitolare -- 17:Track 17.mp3
mv: das Verschieben von 'Track 17.mp3' in ein Unterverzeichnis seiner selbst ('17 - Esercizio 5: Per ricapitolare.mp3') ist nicht möglich
[…]
</pre></code>
<br />
→ Grund / Auslöser waren/sind:
<ul>
<li> der Doppelpunkt hinter der “5“.</li>
<li> ein Fragezeichen (an anderer Stelle)</li>
</ul>
</html>
<html>
<table>
<tr>
<td><b>\d</b></td><td>the date in "Weekday Month Date" format (e.g. "Tue May 26")</td>
</tr>
<tr>
<td><b>\e</b></td><td>an ASCII escape character (033)</td>
</tr>
<tr>
<td><b>\h</b></td><td>the hostname HQDN</td>
</tr>
<tr>
<td><b>\H</b></td><td>the complete hostname</td>
</tr>
<tr>
<td><b>\n</b></td><td>newline</td>
</tr>
</table>
<table>
<tr>
<td><b>\r</b></td><td>carriage return</td>
</tr>
<tr>
<td><b>\s</b></td><td>the name of the shell</td>
</tr>
<tr>
<td><b>\t</b></td><td>the current time in 24-hour HH:MM:SS format</td>
</tr>
<tr>
<td><b>\T</b></td><td>the current time in 12-hour HH:MM:SS format</td>
</tr>
<tr>
<td><b>\@</b></td><td>the current time in 12-hour am/pm format</td>
</tr>
</table>
<table>
<tr>
<td><b>\A</b></td><td>the current time in 24-hour HH:MM format</td>
</tr>
<tr>
<td><b>\u</b></td><td>the username of the current user</td>
</tr>
<tr>
<td><b>\w</b></td><td>the current working directory, <br />with $HOME abbreviated with a tilde</td>
</tr>
<tr>
<td><b>\W</b></td><td>the basename of the current working directory,<br />with $HOME abbreviated with a tilde</td>
</tr>
<tr>
<td><b>\$</b></td><td>if the effective UID is 0, a #,<br />otherwise a $</td>
</tr>
</table>
</html>
<html>
<meta Addition Subtraktion Multiplikation Division Modulo />
<ul>
<li><b>Modulo</b><br />
<code><b>value=$(( ${no} % 2 ))</b></code>
</li>
<li>analog die anderen Rechenoperationen
</li>
<br />
<li>Bash <b>ONLY</b> does integers! <br />
If necessary you must delegate to a tool such as bc:
<pre><code>for i in 1019 1232 871 1232 871 1232 228 1080 264;
do
value=$(echo "scale=10; ${i} * 0.5" | bc);
<em>ALTERNATIVE:
value=$(bc <<<"scale=10; ${i} * 0.5")
</em>
echo ${value};
done</code></pre>
</li>
<li>statt <code>bc</code> auch <code>dc</code> (ist zu installieren) möglich (s. Links);
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://stackoverflow.com/questions/12722095/how-do-i-use-floating-point-arithmetic-in-bash"
target="_blank" rel="noreferrer noopener">
StackOverflow :: How do I use floating-point arithmetic in bash?</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li><a href="http://jdurrett.ba.ttu.edu/Resources/Linux/bash_quick_reference_card.pdf" target=_blank>http://jdurrett.ba.ttu.edu/Resources/Linux/bash_quick_reference_card.pdf</a></li>
<li><a href="file:///G:/TiddlyWiki/docu/bash_quick_reference_card.pdf" target=_blank>bash_quick_reference_card.pdf</a></li>
</ul>
</html>
<html>
<ul>
<li>To learn more about regular expressions, you can type:
<pre><code>$ man 7 regex</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://berkeley-scf.github.io/tutorial-using-bash/regex.html"
target="_blank" rel="noreferrer noopener">
Berkeley Statistics :: Bash shell tutorial
</html>
<html>
<h3>!bezieht sich auf xterm!</h3>
If you don't already have one, create a file in your home directory named .Xresources<br />
to store your preferences for various X programs. Append a line to the file such as<br />
<code><pre>
xterm*font: *-fixed-*-*-*-18-*
</pre></code>
This informs xterm to use the 'fixed' font at size 18.<br />
<br />
From here, you can either restart X or run
<code><pre>
xrdb -merge ~/.Xresources
</pre></code>
in a terminal to incorporate the changes you've made. All new xterms should now<br />
have the font change.<br />
<br />
If you run <b>man xterm</b> and go down to the <b>RESOURCES</b> section, you can<br />
find a wealth of additional, configurable xterm options.
<h3>Links</h3>
<ul>
<li><a href="https://askubuntu.com/questions/161652/how-to-change-the-default-font-size-of-xterm" target=_blank>AskUbuntu :: How to change the default font size of xterm</a></li>
<li><a href="https://www.udoo.org/forum/threads/how-to-set-default-xterm-font-and-screen-size.348/" target=_blank>Udoo :: How to set default xterm font and screen size</a></li>
</ul>
</html>
<html>
<b>ShellCheck</b> is a static analysis tool for shell scripts. One can use it to finds bugs in your shell scripts. It is written in Haskell. You can find warnings and suggestions for bash/sh shell scripts with this tool. Let us see how to install and use ShellCheck on a Linux or Unix-like system to enhance your shell scripts, avoid errors and productivity.
Shell scripting is fun. It is useful to create nice (perhaps ugly) things in shell scripting. Shell scripts are useful for automating processes that you repeat at the prompt.
how to lint your bash sh zsh shell scripts on linux unix macos
The quality of the shell script can be dangerous. Most new users will use StackOverflow, Google, Q & A site about Linux/Unix for copy and pasting code. It can lead to lots of bad code and errors. For example, catastrophic rm command as VAR not defined at all:
<code><pre>
rm -rf "/$VAR/*"
</pre></code>
You can fix many such problems while writing shell scripts using a linting tool such as shellcheck.
<h3>Installation</h3>
The simplest way to install ShellCheck locally is through your package managers such as apt/apt-get/yum and friends as per your Linux distro or Unix variant.
<ul>
<li><h3>Install ShellCheck on a Debian/Ubuntu Linux</h3>
Type the following apt command/apt-get command:
<code><pre>
$ sudo apt install shellcheck
</pre></code>
Sample outputs:
<code><pre>
[sudo] password for vivek:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
shellcheck
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,841 kB of archives.
After this operation, 15.5 MB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu artful/universe amd64 shellcheck amd64 0.4.6-1 [1,841 kB]
Fetched 1,841 kB in 42s (43.4 kB/s)
Selecting previously unselected package shellcheck.
(Reading database ... 196100 files and directories currently installed.)
Preparing to unpack .../shellcheck_0.4.6-1_amd64.deb ...
Unpacking shellcheck (0.4.6-1) ...
Setting up shellcheck (0.4.6-1) ...
Processing triggers for man-db (2.7.6.1-2) ...
</pre></code>
</li>
<li><h3>Install ShellCheck on a CentOS/RHEL/Fedora/Oracle Linux</h3>
First enable EPEL repo on a CentOS/RHEL:
<code><pre>
$ sudo yum -y install epel-release
</pre></code>
Next, type the following yum command:
<code><pre>
$ sudo yum install ShellCheck
</pre></code>
<code><pre>
Sample outputs:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* epel: mirror.nes.co.id
* extras: mirrors.vonline.vn
* updates: centos-hcm.viettelidc.com.vn
Resolving Dependencies
--> Running transaction check
---> Package ShellCheck.x86_64 0:0.3.5-1.el7 will be installed
--> Processing Dependency: ghc(ShellCheck-0.3.5-297097a7f5fa37100847be7f096be51e) for package: ShellCheck-0.3.5-1.el7.x86_64
.....
..
...
Dependencies Resolved
===============================================================================
Package Arch Version Repository Size
===============================================================================
Installing:
ShellCheck x86_64 0.3.5-1.el7 epel 495 k
Installing for dependencies:
ghc-ShellCheck x86_64 0.3.5-1.el7 epel 540 k
ghc-array x86_64 0.4.0.1-26.4.el7 epel 113 k
ghc-base x86_64 4.6.0.1-26.4.el7 epel 1.6 M
ghc-bytestring x86_64 0.10.0.2-26.4.el7 epel 182 k
ghc-containers x86_64 0.5.0.0-26.4.el7 epel 287 k
ghc-deepseq x86_64 1.3.0.1-26.4.el7 epel 45 k
ghc-directory x86_64 1.2.0.1-26.4.el7 epel 59 k
ghc-filepath x86_64 1.3.0.1-26.4.el7 epel 60 k
ghc-json x86_64 0.7-4.el7 epel 96 k
ghc-mtl x86_64 2.1.2-27.el7 epel 33 k
ghc-old-locale x86_64 1.0.0.5-26.4.el7 epel 50 k
ghc-parsec x86_64 3.1.3-31.el7 epel 105 k
ghc-pretty x86_64 1.1.1.0-26.4.el7 epel 57 k
ghc-regex-base x86_64 0.93.2-29.el7 epel 28 k
ghc-regex-compat x86_64 0.95.1-35.el7 epel 15 k
ghc-regex-posix x86_64 0.95.2-30.el7 epel 47 k
ghc-syb x86_64 0.4.0-35.el7 epel 39 k
ghc-text x86_64 0.11.3.1-2.el7 epel 379 k
ghc-time x86_64 1.4.0.1-26.4.el7 epel 187 k
ghc-transformers x86_64 0.3.0.0-34.el7 epel 100 k
ghc-unix x86_64 2.6.0.1-26.4.el7 epel 160 k
Transaction Summary
===============================================================================
Install 1 Package (+21 Dependent packages)
Total download size: 4.6 M
Installed size: 28 M
Is this ok [y/d/N]: y
Downloading packages:
(1/22): ghc-bytestring-0.10.0.2-26.4.el7.x86_64.rpm | 182 kB 00:09
(2/22): ghc-array-0.4.0.1-26.4.el7.x86_64.rpm | 113 kB 00:09
....
..
...
ghc-parsec.x86_64 0:3.1.3-31.el7
ghc-pretty.x86_64 0:1.1.1.0-26.4.el7
ghc-regex-base.x86_64 0:0.93.2-29.el7
ghc-regex-compat.x86_64 0:0.95.1-35.el7
ghc-regex-posix.x86_64 0:0.95.2-30.el7
ghc-syb.x86_64 0:0.4.0-35.el7
ghc-text.x86_64 0:0.11.3.1-2.el7
ghc-time.x86_64 0:1.4.0.1-26.4.el7
ghc-transformers.x86_64 0:0.3.0.0-34.el7
ghc-unix.x86_64 0:2.6.0.1-26.4.el7
Complete!
</pre></code>
If you are using a Fedora Linux, run the following dnf command:
$ sudo dnf install ShellCheck
</li>
<li><h3>Install ShellCheck on an Arch Linux</h3>
Type the following pacman command:
<code><pre>$ sudo pacman -S shellcheck</pre></code>
</li>
<li><h3>Install ShellCheck on a Gentoo Linux</h3>
Type the following emerge command:
<code><pre>$ sudo emerge --ask shellcheck</pre></code>
</li>
<li><h3>Install ShellCheck on an OpenSUSE Linux</h3>
Type the following zypper command:
<code><pre>$ sudo zypper in ShellCheck</pre></code>
</li>
<li><h3>Install ShellCheck on a macOS Unix</h3>
Type the following port command if you are using MacPorts:
<code><pre>$ port install shellcheck</pre></code>
If you use Homebrew on a macOS/OS X, type the following brew command:
<code><pre>$ brew install shellcheck</pre></code>
</li>
</ul>
<h3>How to use ShellCheck</h3>
Let us see my sample shell script with the cat command:
<code><pre>
$ cat -n backupme
</pre></code>
Sample outputs:
<code><pre>
1 #!/bin/bash
2 t="/tmp/exclude.$$"
3 source ~/.backup.conf
4 >$t
5 for w in $WHATNOT
6 do
7 echo $w >> $t
8 done
9 rsync $OPT -avr --exclude-from=$t $WHAT $SERVER:$WHERE
10 rm -rf $t
</pre></code>
Run shellcheck backupme in the terminal:
<code><pre>$ shellcheck backupme</pre></code>
Sample outputs:<br />
<img src="./pictures/shellcheck-output.jpg" width=1019 height=454><br />
ShellCheck in action <br />
<br />
The shellcheck asked me to fix unquoted variables and other issues. Here is my updated script as per warnings:
<code><pre>$ cat -n backupme</pre></code>
Sample outputs:
<code><pre>
1 #!/bin/bash
2 t="/tmp/exclude.$$"
3 source ~/.backup.conf
4 touch $t
5 for w in $WHATNOT
6 do
7 echo "$w" >> $t
8 done
9 rsync "$OPT" -avr --exclude-from=$t "$WHAT" "$SERVER:$WHERE"
10 rm -rf "$t"
</pre></code>
<h3>How to integrate shellcheck in your text editor</h3>
You can shellcheck with VIM or emacs text editor directly. I am using neomake vim plugin. It is an asynchronous linting and make framework for Neovim/Vim. I installed it using vim-plug plugin manager in my ~/.vimrc:
<code><pre>
call plug#begin('~/.vim/plugged')
Plug 'pearofducks/ansible-vim'
" install and use neomake linting
Plug 'neomake/neomake'
call plug#end()
</pre></code>
To install ansible-vim and neomake/neomake type the following command in vim:
<code><pre>
:PlugInstall
</pre></code>
To use plugin type the following command while writing/editing your bash/sh scripts:
<code><pre>
:Neomake
</pre></code>
Sample outputs:
Fig.02: Neomake displaying warning/errors with shellcheck
<h3>Conclusion</h3>
Overall it is an excellent little tool for improving and fixing your shell scripts. It can detect many common mistakes and errors. For more info see https://github.com/koalaman/shellcheck or https://www.shellcheck.net
<h3>Link:</h3>
<ul>
<li><a href="https://www.cyberciti.biz/programming/improve-your-bashsh-shell-script-with-shellcheck-lint-script-analysis-tool/" target="_blank">Cyberciti :: ShellCheck</a></li>
</ul>
</html>
<html>
<table>
<tr><td>$?</td><td> Exit status of last task</td></tr>
<tr><td>$!</td><td> PID of last background task</td></tr>
<tr><td>$$</td><td> PID of shell</td></tr>
<tr><td>$0</td><td> Filename of the shell script</td></tr>
</table>
<h3>Links:</h3>
<ul>
<li><a href="https://devhints.io/bash"
target="_blank" rel="noreferrer noopener">
DevHints.io :: Bash</a>
</li>
<li><a href="https://github.com/rawiriblundell/wiki.bash-hackers.org/blob/main/syntax/shellvars.md"
target="_blank" rel="noreferrer noopener">
Bash-Hackers Wiki :: Special parameters and shell variables</a>
</li>
</ul>
</html>
<html>
<img src="./pictures/Bash_Logins.JPG" width=607 height=438>
<br />
Quelle: LinuxMagazin 10/10, S. 106f
<h3>Das Paket bash und /etc/profile</h3>
Bash ist die Standard-Shell in SUSE Linux. Wenn sie als<br />
Login-Shell verwendet wird, werden mehrere Initialisierungs-<br />
dateien gelesen. Bash verarbeitet sie in der Reihenfolge der<br />
folgenden Liste.
<ol>
<li>/etc/profile</li>
<li>~/.profile</li>
<li>/etc/bash.bashrc</li>
<li>~/.bashrc </li>
</ol>
In <b>~/.profile</b> oder in <b>~/.bashrc</b> können benutzerdefinierte <br /> Einstellungen vorgenommen werden. Um die richtige Ver-<br />
arbeitung der Dateien zu gewährleisten, müssen die Grund-<br />
einstellungen aus <b>/etc/skel/.profile</b> oder <b>/etc/skel/.bashrc</b><br />
in das Home-Verzeichnis des Benutzers kopiert werden.
<br />
Es empfiehlt sich, die Einstellungen aus <b>/etc/skel</b> nach <br />
einer Aktualisierung zu kopieren. Führen Sie die folgenden<br />
Shell-Befehle aus, um den Verlust persönlicher Einstellungen<br />
zu vermeiden:
<code><pre>
mv ~/.bashrc ~/.bashrc.old
cp /etc/skel/.bashrc ~/.bashrc
mv ~/.profile ~/.profile.old
cp /etc/skel/.profile ~/.profile
</pre></code>
Kopieren Sie anschließend die persönlichen Einstellungen<br />
zurück aus den *.old-Dateien. <br />
<br />
Das File <code><b>~/.profile</b></code> wird nur dann gelesen, wenn die Files<br />
<code><b>~/.bash_profile</b></code> oder <code><b>~/.bash_login</b></code> nicht vorhanden sind<br />
resp. existieren.<br />
<br />
<h3>Quelle:</h3>
<a href="http://www.mpipks-dresden.mpg.de/~mueller/docs/suse10.0/suselinux-manual_de/manual/cha.suse.html" target=_blank>MPIKS Dresden :: Suse 10.0 - Manual</a>
</html>
<html>
What the following does:<br />
<br />
<code>
rm `ls -al | grep str | awk '{if ($9 !~ /^str/) {print $9}'`<br />
</code>
<br />
Removes all files that contains the string "str" excepts <br />
those that begin with it. Changing the !~ to =~ does the<br />
opposite.<br />
</html>
<html>
<ol>
<li><b>(1) bad ex.</b><br />
<code>if [ `echo "$OPTARG" | sed '/^[0-9][0-9]*$/!d` = "" ]</code></li>
<br>
<li><b>(2) fixed ex.</b><br />
<code>if [ `echo "$OPTARG" | sed '/^[0-9][0-9]*$/ s//X/' `= "X" ]</code></li>
<br>
<li><b>(3) another fixed ex. (Bourne Shell, ksh)</b><br />
<code>if [ -n "`echo "$OPTARG" | sed '/^[0-9][0-9]*$/!d'`" ]</code></li>
</ol>
<br>
(1) This produces an easy to overlook error. On<br>
success and the lack of double quotes on the left<br>
side cause test to think there is no parameter,<br>
producing an error (1). This is because the result<br>
is an empty string without quotes and test doesn't<br>
know that it is dealing with a string, no parameter<br>
seen.<br>
<br>
Adding a character to the beginning of each string is<br>
a trick to fix it (2). The test command sees a string<br>
and simply compares as normal, passing over the pair of<br>
initial and equal characters.<br>
<br>
Another fix (3) is to surround the empty/not empty string with<br>
double quotes. Test will see the empty string and things<br>
work as normal. This (3) works in Bourne Shell and ksh but NOT<br>
in csh.<br>
<br>
Simple ex.<br>
$ foo=""<br>
$ test -n $foo # fails, because string is not “not empty“<br>
$ test -n `echo $foo` # fails<br>
$ test -z `echo x$foo` # works, might throw off the logic<br>
$ test -n "`echo $foo`" # works in sh & ksh<br>
<br>
<br>
This tip generously supported <br>
by: bigoldbulldog@hotmail.com<br>
</html>
<html>
<code><pre>
<b>sdiff</b> ‐bis <em>File‐1</em> <em>File‐2</em>
</pre></code>
Die Optionen bedeuten:
<ul>
<li><b>‐b</b> :: <br />
<em>‐‐ignore‐space‐change</em><br />
Änderungen der Anzahl von Leerräumen ignorieren
</li>
<li><b>‐i</b> :: <br />
<em>‐‐ignore‐case</em><br />
behandelt Groß‐ und Kleinschreibung gleich
</li>
<li><b>‐s</b> :: <br />
<em>‐‐suppress-common-lines</em><br />
Gemeinsame Zeilen nicht ausgeben
</li>
<li><b>‐B</b> :: <br />
<em>‐‐ignore‐blank‐lines</em><br />
Änderungen ignorieren, die nur leere Zeilen betreffen
</li>
</ul>
</html>
<html>
<p>
There are some misconceptions that shell scripts <br />
are only for a CLI environment. You can efficiently <br />
use various tools to write GUI and network (socket) <br />
scripts under KDE or Gnome desktops. Shell scripts <br />
can make use of some of the GUI widget (menus, <br />
warning boxes, progress bars, etc.). You can always <br />
control the final output, cursor position on the screen, <br />
various output effects, and more. With the following <br />
tools, you can build powerful, interactive, user-friendly <br />
UNIX / Linux bash shell scripts.
</p>
<p>
Creating GUI application is not an expensive task<br />
but a task that takes time and patience. Luckily, <br />
both UNIX and Linux ships with plenty of tools to<br />
write beautiful GUI scripts. The following tools are<br />
tested on FreeBSD and Linux operating systems<br />
but should work under other UNIX like operating<br />
systems.
</p>
<h2>#1. notify-send Command</h2>
The notify-send command allows you to send desktop notifications to the user via a notification daemon from the command line. This is useful to inform the desktop user about an event or display some form of information without getting in the user's way. You need to install the following package on a Debian/Ubuntu Linux using apt command/apt-get command:<br />
<code><b>$ sudo apt-get install libnotify-bin</b></code><br />
<br />
CentOS/RHEL user try the following yum command:<br />
<code><b>$ sudo yum install libnotify</b></code><br />
<br />
Fedora Linux user type the following dnf command:<br />
<code><b>$ sudo dnf install libnotify</b></code><br />
<br />
In this example, send simple desktop notification<br />
from the command line, enter:<br />
<code><b>
## send some notification ##<br />
notify-send "rsnapshot done :)"<br />
</b></code>
<br />
Sample outputs:<br />
Fig:01: notify-send in action<br />
<br />
Here is another code with additional options:<br />
<code><b>
....<br />
alert=18000<br />
live=$(lynx --dump http://money.rediff.com/ | grep 'BSE LIVE' | awk '{ print $5}' | sed 's/,//g;s/\.[0-9]*//g')<br />
[ $notify_counter -eq 0 ] && [ $live -ge $alert ] && { notify-send -t 5000 -u low -i "BSE Sensex touched 18k"; notify_counter=1; }<br />
...<br />
</b></code>
<br />
Sample outputs:<br />
Fig.02: notify-send with timeouts and other options<br />
<br />
Where,
<ul>
<li><code><b>-t 5000</b></code>: Specifies the timeout in milliseconds ( 5000 milliseconds = 5 seconds)</li>
<li><code><b>-u low</b></code> : Set the urgency level (i.e. low, normal, or critical).</li>
<li><code><b>-i gtk-dialog-info</b></code> : Set an icon filename or stock icon to display (you can set path as -i /path/to/your-icon.png).</li>
</ul>
For more information on use of the notify-send utility,<br />
please refer to the notify-send man page, viewable<br />
by typing man notify-send from the command line:<br />
<code><b>man notify-send</b></code>
<h2>#2: tput Command</h2>
The tput command is used to set terminal features. With tput you can set:
<ol>
<li>Move the cursor around the screen.</li>
<li>Get information about terminal.</li>
<li>Set colors (background and foreground).</li>
<li>Set bold mode.</li>
<li>Set reverse mode and much more.</li>
</ol>
Here is a sample code:
<code><pre>
#!/bin/bash
# clear the screen
tput clear
# Move cursor to screen location X,Y (top left is 0,0)
tput cup 3 15
# Set a foreground colour using ANSI escape
tput setaf 3
echo "XYX Corp LTD."
tput sgr0
tput cup 5 17
# Set reverse video mode
tput rev
echo "M A I N - M E N U"
tput sgr0
tput cup 7 15
echo "1. User Management"
tput cup 8 15
echo "2. Service Management"
tput cup 9 15
echo "3. Process Management"
tput cup 10 15
echo "4. Backup"
# Set bold mode
tput bold
tput cup 12 15
read -p "Enter your choice [1-4] " choice
tput clear
tput sgr0
tput rc
</pre></code>
Sample outputs:
Fig.03: tput in action
Fig.03: tput in action
For more detail concerning the tput command, see the following man page:
man 5 terminfo
man tput
<h2>#3: setleds Command</h2>
The setleds command allows you to set the keyboard leds. In this example, set NumLock on:
<code><pre>
setleds -D +num
</pre></code>
To turn it off NumLock, enter:
<code><pre>
setleds -D -num
-caps : Clear CapsLock.
+caps : Set CapsLock.
-scroll : Clear ScrollLock.
+scroll : Set ScrollLock.
</pre></code>
See setleds command man page for more information and options:
man setleds
<h2>#4: zenity Command</h2>
The zenity commadn will display GTK+ dialogs box, and return the users input. This allows you to present information, and ask for information from the user, from all manner of shell scripts. Here is a sample GUI client for the whois directory service for given domain name:
<code><pre>
#!/bin/bash
# Get domain name
_zenity="/usr/bin/zenity"
_out="/tmp/whois.output.$$"
domain=$(${_zenity} --title "Enter domain" \
--entry --text "Enter the domain you would like to see whois info" )
if [ $? -eq 0 ]
then
# Display a progress dialog while searching whois database
whois $domain | tee >(${_zenity} --width=200 --height=100 \
--title="whois" --progress \
--pulsate --text="Searching domain info..." \
--auto-kill --auto-close \
--percentage=10) >${_out}
# Display back output
${_zenity} --width=800 --height=600 \
--title "Whois info for $domain" \
--text-info --filename="${_out}"
else
${_zenity} --error \
--text="No input provided"
fi
</pre></code>
Sample outputs:
Fig.04: zenity in Action
Fig.04: zenity in Action
See the zenity man page for more information and all other supports GTK+ widgets:
zenity --help
man zenity
<h2>#5: kdialog Command</h2>
kdialog is just like zenity but it is designed for KDE desktop / qt apps. You can display dialogs using kdialog. The following will display message on screen:
<code><pre>
kdialog --dontagain myscript:nofilemsg --msgbox "File: '~/.backup/config' not found."
</pre></code>
Sample outputs:
Fig.05: Suppressing the display of a dialog
Fig.05: Suppressing the display of a dialog
See shell scripting with KDE Dialogs tutorial for more information.
<h2>#6: Dialog</h2>
Dialog is an application used in shell scripts which displays text user interface widgets. It uses the curses or ncurses library. Here is a sample code:
<code><pre>
#!/bin/bash
dialog --title "Delete file" \
--backtitle "Linux Shell Script Tutorial Example" \
--yesno "Are you sure you want to permanently delete \"/tmp/foo.txt\"?" 7 60
# Get exit status
# 0 means user hit [yes] button.
# 1 means user hit [no] button.
# 255 means user hit [Esc] key.
response=$?
case $response in
0) echo "File deleted.";;
1) echo "File not deleted.";;
255) echo "[ESC] key pressed.";;
esac
</pre></code>
See the dialog man page for details:
man dialog<br />
<br />
<b>A Note About Other User Interface Widgets Tools</b><br />
UNIX and Linux comes with lots of other tools to display and control apps from the command line, and shell scripts can make use of some of the KDE / Gnome / X widget set:
<ul>
<li> gmessage – a GTK-based xmessage clone.</li>
<li> xmessage – display a message or query in a window (X-based /bin/echo)</li>
<li> whiptail – display dialog boxes from shell scripts</l>
<li> python-dialog – Python module for making simple Text/Console-mode user interfaces</l>
</ul>
<h2>#7: logger command</h2>
The logger command writes entries in the system log file such as /var/log/messages. It provides a shell command interface to the syslog system log module:
<code><pre>
logger "MySQL database backup failed."
tail -f /var/log/messages
logger -t mysqld -p daemon.error "Database Server failed"
tail -f /var/log/syslog
</pre></code>
Sample outputs:
<code><pre>
Apr 20 00:11:45 vivek-desktop kernel: [38600.515354] CPU0: Temperature/speed normal
Apr 20 00:12:20 vivek-desktop mysqld: Database Server failed
</pre></code>
See howto write message to a syslog / log file for more information. Alternatively, you can see the logger man page for details:
man logger
<h2>#8: setterm Command</h2>
The setterm command can set various terminal attributes. In this example, force screen to turn black in 15 minutes. Monitor standby will occur at 60 minutes:
<code><pre>
setterm -blank 15 -powersave powerdown -powerdown 60
</pre></code>
In this example show underlined text for xterm window:
<code><pre>
setterm -underline on;
echo "Add Your Important Message Here"
setterm -underline off
</pre></code>
Another useful option is to turn on or off cursor:
<code><pre>
setterm -cursor off
</pre></code>
Turn it on:
<code><pre>
setterm -cursor on
</pre></code>
See the setterm command man page for details:
man setterm
<h2>#9: smbclient: Sending Messages To MS-Windows Workstations</h2>
The smbclient command can talk to an SMB/CIFS server. It can send a message to selected users or all users on MS-Windows systems:
<code><pre>
smbclient -M WinXPPro <<eof
Message 1
Message 2
...
..
EOF
OR
echo "${Message}" | smbclient -M salesguy2
</pre></code>
See smbclient man page or read our previous post about “
<a href"https://www.cyberciti.biz/tips/freebsd-sending-a-message-to-windows-workstation.html" target="_blank">sending a message to Windows Workstation</a>“ with smbclient command:
man smbclient
<h2>#10: Bash Socket Programming</h2>
Under bash you can open a socket to pass some data through it. You don't have to use curl or lynx commands to just grab data from remote server. Bash comes with two special device files which can be used to open network sockets. From the bash man page:
<ol>
<li> /dev/tcp/host/port – If host is a valid hostname or Internet address, and port is an integer port number or service name, bash attempts to open a TCP connection to the corresponding socket.</li>
<li> /dev/udp/host/port – If host is a valid hostname or Internet address, and port is an integer port number or service name, bash attempts to open a UDP connection to the corresponding socket.</li>
</ol>
You can use this technic to dermine if port is open or closed on local or remote server without using nmap or other port scanner:
<code><pre>
# find out if TCP port 25 open or not
(echo >/dev/tcp/localhost/25) &>/dev/null && echo "TCP port 25 open" || echo "TCP port 25 close"
</pre></code>
You can use bash loop and find out open ports with the snippets:
<code><pre>
echo "Scanning TCP ports..."
for p in {1..1023}
do
(echo >/dev/tcp/localhost/$p) >/dev/null 2>&1 && echo "$p open"
done
</pre></code>
Sample outputs:
<code><pre>
Scanning TCP ports...
22 open
53 open
80 open
139 open
445 open
631 open
</pre></code>
In this example, your bash script act as an HTTP client:
<code><pre>
#!/bin/bash
exec 3<> /dev/tcp/${1:-www.cyberciti.biz}/80
printf "GET / HTTP/1.0\r\n" >&3
printf "Accept: text/html, text/plain\r\n" >&3
printf "Accept-Language: en\r\n" >&3
printf "User-Agent: nixCraft_BashScript v.%s\r\n" "${BASH_VERSION}" >&3
printf "\r\n" >&3
while read LINE <&3
do
# do something on $LINE
# or send $LINE to grep or awk for grabbing data
# or simply display back data with echo command
echo $LINE
done
</pre></code>
See the bash man page for more information:
man bash
<b>A Note About GUI Tools and Cronjob</b><br />
You need to request local display/input service using export DISPLAY=[user's machine]:0 command if you are using cronjob to call your scripts. For example, call /home/vivek/scripts/monitor.stock.sh as follows which uses zenity tool:
<code><pre>
@hourly DISPLAY=:0.0 /home/vivek/scripts/monitor.stock.sh
</pre></code>
<br />
<h3>Link:</h3>
<a href="https://www.cyberciti.biz/tips/spice-up-your-unix-linux-shell-scripts.html" target="_blank">Cyberciti :: Shell-Scripts</a>
</html>
<html>
<meta charset="utf-8" redirection />
Zunächst fassen wir alle Möglichkeiten zur Umleitung von Ein- und Ausgaben zusammen:
<table>
<tr><td>< datei </td><td>Standardeingabe, <br />Lesen aus <em>“datei“</em></td></tr>
<tr><td>> datei </td><td>Standardausgabe, <br />Schreiben in <em>“datei“</em></td></tr>
<tr><td>2> datei </td><td>Standardfehlerausgabe, <br />Schreiben der Fehler in <em>“datei“</em></td></tr>
<tr><td>&> datei oder >& datei </td><td>Standard- und Standardfehlerausgabe, <br />gleichzeitig in <em>“datei“</em> schreiben</td></tr>
<tr><td>>> datei </td><td>Standardausgabe, <br />Anhängen an <em>“datei“</em></td></tr>
<tr><td>> datei 2>&1</td><td>Standard- und Standardfehlerausgabe in die Datei <em>“datei“</em> umleiten,<br />
wobei hier zunächst die Standardausgabe in die Datei <em>“datei“</em> um–<br />
geleitet wird und nachfolgend die Standardfehlerausgabe dorthin<br />
gelenkt wird, wohin auch die Standardausgabe zeigt.<br />
<br />
In solchen Situationen ist die Reihenfolge der Umlenkung wichtig,<br />
da die Evaluierung von links nach rechts erfolgt.</td></tr>
</table>
<h3>Links:</h3>
<ul>
<li><a href="https://cgvr.cs.uni-bremen.de/teaching/programming_literatur/linuxfibel/eaumleitung.htm"
target="_blank" rel="noreferrer noopener">
Linuxfibel :: Die Bash - Umleitung der Ein- und Ausgabe</a>
</li>
</ul>
</html>
<html>
\u00F6 ö<br />
\u00D6 Ö<br />
<br />
\u00C4 Ä<br />
\u00E4 ä<br />
<br />
\u00DC Ü<br />
\u00FC ü<br />
<br />
\u00DF ß<br />
<br />
\u0065 e<br />
<h3>Link:</h3>
<ul>
<li><a href="http://www.gymel.com/charsets/ISO8859-1.html" target="_blank">gymel :: Unicode-Zeichensatz-Tabelle</a></li>
<li><a href="https://unicode-table.com/de/" target="_blank">Unicode-Zeichensatz-Tabelle</a></li>
</ul>
</html>
<html>
<ul>
<li><br />
<table border="1">
<tr><td>[:alnum:] </td><td>alle alphanumerischen Zeichen [A-Za-z0-9] </td></tr>
<tr><td>[:alpha:] </td><td>alle Buchstaben [A-Za-z] </td></tr>
<tr><td>[:blank:] </td><td>ein oder mehrere Leerzeichen und Tab </td></tr>
<tr><td>[:cntrl:] </td><td>alle Kontrollzeichen wie z.B. : NL (newline) CR LF TAB VT FF NUL SOH STX EXT EOT ENQ ACK SO SI DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC IS1 IS2 IS3 IS4 DEL </td></tr>
<tr><td>[:digit:] </td><td>alle dezimalen Zahlen [0-9] </td></tr>
<tr><td>[:graph:] </td><td>alle druckbaren Zeichen (ASCII 33 - 126) ausser das Leerzeichen (SPACE, TAB). Many system abbreviate as \\W </td></tr>
<tr><td>[:print:] </td><td>alle druckbaren Zeichen </td></tr>
<tr><td>[:lower:] </td><td>alle Kleinbuchstaben [a-z] </td></tr>
<tr><td>[:upper:] </td><td>alle Großbuchstaben [A-Z] </td></tr>
<tr><td>[:space:] </td><td>Leerzeichen und horizontales Tab; (space, tab, NL, FF, VT, CR). Many system abbreviate as \\s </td></tr>
<tr><td>[:xdigit:] </td><td>alle hexadezimalen Zahlen [0-9A-Fa-f] </td></tr>
<tr><td>[:punct:] </td><td> Satzzeichen (punctuation symbols), wie . , " \' ? ! ; : # $ % & ( ) * + - / = @ [ ] \\ ^ _ { } </td></tr>
</table>
</li>
<li>alle Files ausgeben, die NICHT "en" im Filenamen haben:
<pre><code>lang_[^:en:]*.srt</code></pre>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>zwei benachbarte Zeilen in einem File joinen:</h3>
<code><pre>:g/$/j</pre></code>
<details><summary>Beispiel:</summary><br />
<ul>
<li>Ausgangspunkt:
<code><pre>
1 first
2 second
3 third
4 fourth
5 fifth
6 sixth
7 seventh
8 eighth
9 nineth
10 tenth
</pre></code>
</li>
<li>nach Ausführung des Befehls:
<code><pre>
1 first second
2 third fourth
3 fifth sixth
4 seventh eighth
5 nineth tenth
</pre></code>
</li>
</ul>
<br />
</details>
</li>
<li><h3>alle Zeilen im File zu einer Zeile joinen:</h3>
<code><pre>:%j</pre></code>
<details><summary>Beispiel:</summary><br />
<ul>
<li>Ausgangspunkt:
<code><pre>
1 first
2 second
3 third
4 fourth
5 fifth
6 sixth
7 seventh
8 eighth
9 nineth
10 tenth
</pre></code>
</li>
<li>nach Ausführung des Befehls:
<code><pre>first second third fourth fifth sixth seventh eighth nineth tenth</pre></code>
</ul>
<br />
</details>
</li>
</ul>
</html>
<html>
<ul>
<li>Um beim Aufruf des Scripts mit dem Flag <code>–x</code> (<em>xtrace</em>)<br />
auch die Zeilennummern anzuzeigen, ist in der<br />
Shell die Umgebungsvariable <b>PS4</b> z.B. wie folgt<br />
zu setzen:
<code><pre>PS4='Line ${LINENO}: '</pre></code>
</li>
<li>u.U. muss die Variable exportiert werden;
</li>
<li>nach dem Setzen der Variable dann das Skript<br />
mit dem Bash-Flag <code>–x</code> (<em>xtrace</em>) aufrufen, ent–<br />
weder innerhalb des Skripts gesetzt oder beim<br />
Aufruf:
<pre><code>bash –x <em>script</em></code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://stackoverflow.com/questions/17804007/how-to-show-line-number-when-executing-bash-script"
target="_blank" rel="noreferrer noopener">
StackOverflow :: How to show line number when executing bash script</a>
</li>
</ul>
</html>
<html>
<ul>
<li>a syntax highlighting replacement for cat and more commands</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://wslguy.net/2021/06/26/batcat-syntax-highlighting-replacement-for-cat-and-more-commands/" target="_blank" rel="noreferrer noopener">
wslguy.net :: batcat ‐ Syntax Highlighting Replacement for cat and more Commands</a></li>
<li><a href="https://www.tecmint.com/bat-a-cat-clone-with-syntax-highlighting/" target="_blank" rel="noreferrer noopener">
TecMint :: Bat ‐ A Cat Clone with Syntax Highlighting and Git Integration</a></li>
</ul>
</html>
<html>
<ul>
<li><h3>Syntax:</h3>
<b><em>Möglichkeit 1:</em></b>
<code><pre>
case $variable-name in
pattern1)
command1
…
commandN
;;
… <em><weitere Patterns></em>
patternN)
command1
…
commandN
;;
*)
esac
</pre></code>
<b><em>Möglichkeit 2:</em></b><br />
<code><pre>
case $variable-name in
pattern1|pattern2|pattern3)
command1
…
commandN
;;
pattern4|pattern5|pattern6)
command1
…
commandN
;;
pattern7|pattern8|patternN)
command1
…
commandN
;;
*)
esac
</pre></code></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://bash.cyberciti.biz/guide/The_case_statement" target="_blank" rel="noreferrer noopener">nixCraft :: The case statement</a></li>
</ul>
</html>
<html>
<ul>
<li><code><b>date -Iseconds</b></code> (ein großes i):<br />
<code><pre>2023-05-17T12:28:23+02:00</pre></code>
</li>
</ul>
</html>
<html>
<ul>
<li>bisher <b>nur</b> mit GNU‐Version von <em>date</em> möglich;</li>
<li>Syntax:
<code><pre>
date ‐‐date=“STRING“
date ‐‐date=“next Friday“
date ‐‐date=“2 days ago“
date ‐‐date=“yesterday“
date ‐‐date=“yesterday“ +“%format“
# Get yesterday's date in dd-mm-yy format
date ‐‐date=“yesterday“ +“%d-%m-%y“
# US date format
date ‐‐date=“yesterday“ +“%m-%d-%y“
# YYYY-mm-dd format
date ‐‐date=“yesterday“ +“%Y-%m-%d“
## store y'day date in a shell variable called yday and display it ##
yday=$(date ‐‐date=“yesterday“ +“%Y-%m-%d“)
echo “$yday“
</pre></code></li>
<li><h4>Moving Date Using More Precise Units</h4>
You can use:
<ul>
<li> <b>fortnight</b> for 14 day.</li>
<li> <b>week</b> for 7 days.</li>
<li> <b>hour</b> for 60 minutes</li>
<li> <b>minute</b> for 60 seconds</li>
<li> <b>second</b> for one second</li>
<li> <b>this</b> / <b>now</b> / <b>today</b> keywords to stress the meaning.</li>
</ul>
<li><h4>Moving Date Using the Day of Week Items</h4>
To print the date of this Friday, enter:
<code><pre>
date --date='this Friday'
## OR ##
date --date='next Friday'
</pre></code>
Days of the week may be spelled out in full: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday. Days may be abbreviated to their first three letters, optionally followed by a period
<code><pre>
date --date='this Fri'
## OR ##
date --date='next Fri.'
</pre></code>
You can also move forward supplementary weeks as follow:
<code><pre>
date --date='2 Fri'
## OR ##
date --date='second Fri.'
## OR ##
date --date='Second Friday'
####
#### last DAY or next DAY move one week before or after the day that DAY by itself
####
date --date='last Friday'
date --date='next Friday'
</pre></code></ll>
<!--li></li>
<li></li>
<li></li-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.cyberciti.biz/tips/linux-unix-get-yesterdays-tomorrows-date.html" target=_blank>nixCraft :: Getting Yesterday's or Tomorrow's Day with bash on Linux or Unix</a></li>
</ul>
</html>
<html>
<ul>
<li>wurde anscheinend durch “whiptail“ ersetzt</li>
</ul>
<b>Syntax:</b>
<code><pre>dialog [optionen] [Art des Feldes] “Text“ [breite] [höhe]</pre></code>
<br>
Beispiel:
<code><pre>rene@thor:~> dialog --msgbox “Hallo“ 0 0</pre></code>
<br>
Das Ergebnis ist eine Messagebox mit dem Text "Hallo" und einem OK-Button. Der<br />
Befehl wartet so lange bis der OK-Button gedrückt wurde (durch Return). Da<br />
wir nur einen Befehl abgeschickt haben, landen wir danach wieder in unserer Shell.<br />
Das "Bild" der Messagebox wurde allerdings nicht ganz entfernt. Daher sollte man<br />
am Ende eines Scripts, stets daf&uul;r sorgen, das derBildschirminhalt geleert wird<br />
(z. B. durch clear). Für Breite und Höhe haben wir in diesem Fall 0 ver‐<br />
wendet. Durch 0 wird die Dialogbox einfach so angepasst, dass Ihr Inhalt optimal<br />
darin Platz hat.<br>
<br>
Die oben benutzte einfache Messagebox, lässt jedoch noch keine<br />
echte Interaktion aufkommen. Anders sieht es schon bei einer Ja/Nein Box<br />
aus:
<br>
<code><pre>dialog --yesno "Finden Sie Dialog gut?" 0 0</pre></code>
<br>
Doch wie nehme ich nun die Antwort in meinem Script entgegen? Schreiben wir<br />
ein kleines Script zur Veranschaulichung:<br>
<br>
<code><pre>#!/bin/bash
dialog --yesno "Finden Sie Dialog gut?" 0 0
dialog --msgbox "Ihre Antwort war: $?" 0 0
clear
exit 0
</pre></code>
Machen Sie das Script mit chmod ausführbar und starten es. Sie werden<br />
feststellen, dass wenn Sie mit Ja antworten, die Variable $? automatisch den<br />
Wert 0 bekommt, während wenn Sie mit Nein antworten die Variable $? den<br />
Wert 1 annimmt. Was ist die Variable "$?"?<br>
<br>
In der Umgebungsvariable $? steht immer der Exitstatus des letzten ausge‐<br />
führten Befehls. Der Exitstatus eines Befehls ist 0, wenn er ohne Fehler be‐<br />
endet wurde und ungleich 0 wenn ein Fehler aufgetreten ist. dialog verwendet <br />
einfach die Antwort als Exitstatus, also Ja für 0 und Nein für 1. Sie<br />
können daher unmittelbar nach Beendigung des Befehls, $? auswerten. <br />
Sollte allerdings noch vor der Auswertung ein weiterer Befehl stehen, würde<br />
sich $? auf diesen Befehl beziehen. Die Auswertung muss daher unmittelbar<br />
dahinter erfolgen. Was aber wenn es nicht nur um ein einfaches Ja/Nein geht,<br />
sondern um eine vollständige Zeichenkette?<br>
<br>
Versuchen wir uns an einem neuen Script:<br>
<code><pre>
#!/bin/bash
dialog --inputbox "Wie heissen Sie?" 0 0 2> tmp.dialog
clear
cat tmp.dialog
echo ““
exit 0
</pre></code>
In eine Inputbox kann beliebiger Text hinein geschrieben werden. Dieser wird<br />
einfach auf die Standardfehlerausgabe geschrieben. Normalerweise landet die<br />
Standardfehlerausgabe einfach auf dem Bildschirm. In diesem Fall haben wir sie<br />
durch 2>, in die Datei tmp.dialog geschrieben. Den Inhalt dieser Datei<br />
können wir beliebig weiterverwenden. In diesem Fall geben<br />
wir Ihn einfach mit cat aus.<br>
<br />
Darüberhinaus gibt es noch Optionen die dialog noch ein wenig aufpeppen<br />
können. Sie können beispielsweise einen Titel för die Dialogboxen <br />
einblenden:<br>
<code><pre>dialog --title "Titel" --msgbox "Box mit Titel" 0 0</pre></code>
<br>
Mit der Option --backtitle kann auch noch ein Hintergrundtitel eingeblendet werden:<br>
<code><pre>dialog --title "Titel" --backtitle "Titel" --msgbox "Box mit Titel" 0 0</pre></code>
<h3>Dialog - Funktionen (Parameter)</h3><br>
<br>
Die einzelnen Funktionen von Dialog werden über Parameter beim Aufrufen
von Dialog übergeben. Eine kurze Übersicht der Möglichkeiten
erhält man, wenn man Dialog ohne Parameter aufruft. Auf die Verwendung
eines Dialog RC-Files wird im Beispiel bewusst verzichtet. Jedem Dialog-Fenster
muss die Höhe und Breite in Zeilen bzw. Zeichen mitgegeben werden. Dies
ist leider etwas inkonsistent ... ässt sich jedoch durch Probieren sehr schnell ermitteln.<br>
<br>
Ich habe im Tutorial, die für mich wichtigsten Funktionen eingebaut/getestet.<br>
<br>
Allen Funktionen ist gemeinsam, dass die Dialog-Ausgabe auf den Standard
Output geroutet ist. Funktionen die Parameter zurückliefern, übergeben diese
defaultmässig an Error Out und werden daher entsprechend mit 2>datei
umgeleitet und anschliessend aus der Datei gelesen. Im Fehlerfall muss man
diese Datei lesen, da auch die Errormeldungen dort landen.<br>
<br>
Viele Dialoge können auch über eine Abrrechen-Funktion verlassen werden.
Ob nun zuletzt [ok] oder [abbrechen] gewählt wurde, kann man über den
RETURN-Code $? abfragen.<br>
<br>
<ul>
<li><b>‐‐calendar</b><br>
dialog ‐‐calendar "Datum auswählen" 2 1 01 11 2007<br>
<br>
Zeigt einen Monatskalender mit Datum vom 1.11.2007, in dem mit Tabulator und
Cursor Tasten geblättert und ein bestimmtes Datum ausgewählt
werden kann.</li>
<br>
<li><b>‐‐checklist</b><br>
dialog --checklist "tag item(s) to choose" 15 50 8 \<br>
01 "Erste Auswahl" off\<br>
02 "Zweite Auswahl" on\<br>
...<br>
<br>
Bietet die
Möglichkeit per Checkboxen einen Multiselect durchzuführen. Je Auswahlmäglichkeit
müssen 3 Parameter übergeben werden. Der 3te Parameter bestimmt per on/off die
Vorselektion der Auswahl.<br></li>
<br>
<li><b>‐‐clear</b><br>
Löscht das angezeigte Widget, bevor ein neues erstellt/angezeigt wird.<br />
Dabei bleibt der Hintergrund im Fenster unverändert.<br />
<code>dialog ‐‐clear</code><br>
<br>
</li>
<br>
<li><b>‐‐fselect</b><br>
“file‐selection“<br />
<code>dialog ‐‐fselect /home/mueller/ 10 60</code><br>
<br>
The fselect (file-selection) dialog box shows a text data entry window in which operator <br>
can type or select a filename / directory name from the directory or filepath.<br>
An operator can use tab or arrow keys to move between the windows. <br>
Press the space-bar to select the filename into box. <br>
<a href="http://bash.cyberciti.biz/guide/The_file_selection_box" target=_blank>Link</a><br>
<br />
ACHTUNG!<br />
Das Statement
<code><pre>xterm -e "dialog --scrollbar --clear --fselect /tmp 30 80"</pre></code>
brach immer mit der Fehlermeldung
<code><pre>Can't make new window at (-5,21), size (40,80).</pre></code>
ab. Grund ist ‐ IMHO ‐ daß das zu erstellende Fenster zu <br />
groß ist, um es im Terminal‐Fenster anzeigen zu können.</li>
<br>
<li><b>‐‐gauge</b><br>
dialog --gauge "Fertig zu:" 6 60 50<br>
Stellt einen statischen semigrafischen Progress Balken dar. Die letzte Ziffer
(hier 50) gibt die Fertigstellung in Prozent an. Ein komplettes Beispiel mit
laufendem Balken siehe Skript Listing gauge() Funktion<br></li>
<br>
<li><b>‐‐inputbox</b><br>
Einfache Box zur Eingabeaufforderung.<br></li>
<br>
<li><b>‐‐menu</b><br>
Erlaubt den Aufbau von Menüs.<br></li>
<br>
<li><b>‐‐msgbox</b><br>
Dient der Augabe von Informationen, die mit [ok] bestätigt werden müssen.<br>
Bsp.: dialog --msgbox "let's try it" 15 50<br></li>
<br>
<li><b>‐‐radiolist</b><br>
dialog --radiolist "tag item(s) to choose" 15 50 8 \<br>
01 "Erste Auswahl" off\<br>
02 "Zweite Auswahl" on\<br>
...<br>
<br>
Entspricht ‐‐checklist, jedoch ist nur eine Selektion erlaubt. Das "Anklicken"
einer Auswahl disabled automatisch die anderen Möglichkeiten.<br></li>
<br>
<li><b>‐‐tailbox</b><br>
Entspricht dem Aufruf von tail -f datei. Wird entsprechend in einem Fenster
dargestellt.</li>
<br>
<li><b>‐‐textbox</b><br>
Ist ein Viewer für ASCII-Dateien mit der Möglichkeit zum Blättern.<br></li>
<br>
<li><b>‐‐yesno</b><br>
Einfache Dialogbox mit Ja/Nein Antwortmöglichkeit.</li><br>
</ul>
<h3>weitere Optionen:</h3>
<ul>
‐‐dselect <directory> <height> <width>
‐‐editbox <file> <height> <width>
‐‐infobox <text> <height> <width>
‐‐inputmenu <text> <height> <width> <menu height> <tag1> <item1>...
‐‐passwordbox <text> <height> <width> [<init>]
‐‐pause <text> <height> <width> <seconds>
‐‐progressbox <height> <width>
‐‐radiolist <text> <height> <width> <list height> <tag1> <item1> <status1>...
‐‐tailboxbg <file> <height> <width>
‐‐timebox <text> <height> <width> <hour> <minute> <second>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="http://www.bin-bash.de/artikel.php?id=1076580085" target=_blank>Bin‐Bash</a></li>
<li><a href="http://www.cc-c.de/german/linux/linux-dialog.php" target=_blank>CC :: Linux dialog</a></li>
<li><a href="http://www.linuxjournal.com/article/2460" target=_blank>LinuxJournal :: </a></li>
<li><a href="https://bash.cyberciti.biz/guide/Bash_display_dialog_boxes" target=_blank>nixCraft :: Bash : dialog</a></li>
<li><a href="https://linux.die.net/man/1/dialog" target="_blank">Linux Manpages :: dialog</a></li>
</ul>
</html>
<html>
<h2>Options Available with Echo Command</h2>
Following are the options available with echo command :
<table>
<tr><th>Option</th><th>Description</th><th>Example</th></tr>
<tr><td>‐n</td><td>Trailing outline is omitted<br /><em>(Keinen abschließenden Zeilenumbruch ausgeben)</em></td><td><code><pre>echo -n "Learn Bash"</pre></code></td></tr>
<tr><td>‐E</td><td>Disable interpretation of backslash escaped characters</td><td><code><pre>echo -E "Learn\nBash"</pre></code></td></tr>
<tr><td>‐e</td><td>Enable interpretation of backslash escaped characters</td><td><code><pre>echo -e "Learn\nBash"</pre></code></td></tr>
</table>
<ul>
<li><b>Tabulator einsetzen:</b><br />
<code><pre>echo <b>-e</b> "text1<b><em>\t</em></b>text2"</pre></code>
⇒ Ausgabe: <code><pre>text1 text2</pre></code>
<br />
</li>
<li><b>Newline‐Zeichen setzen (ein CR erzeugen):</b><br />
<code><pre>echo -e "Learn\nBash"</pre></code>
⇒ Ausgabe: <code><pre>Learn
Bash</pre></code>
<br />
</li>
<li><b>Rückschritt (“backspace“)</b><br />
<code><pre>echo -e "Learn\bBash"</pre></code>
⇒ Ausgabe: <code><pre>LearBash</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.tutorialkart.com/bash-shell-scripting/bash-echo/" target=_blank>TutorialKart :: echo (Bash)</a></li>
<li>man‐Page von <b>echo</b></li>
</ul>
</html>
<html>
<code><b>
• for i in $( ls *.pdf )<br />
do<br />
...<br />
done<br />
<br />
• (( for i=0; i<10; i++ ))<br />
do<br />
...<br />
done<br />
</b></code>
</html>
<html>
Je nachdem, wie die (Aufrufparameter-Variable) <code><b>$@</b></code> “geschrieben“ wird,<br />
wird sie in einer Schleife anders behandelt:
<ul>
<li><code><b>$@</b></code> ::
hier wird jeder Teil, der durch ein Blank getrennt ist, als String ausgegeben:
<code><pre> for i in $@; do </pre></code>
⇒ <code><pre>(base) mueller@Debian-Laptop:~$ settitle "alsamixer" "git - Wiki" "pandas"
alsamixer
git
-
Wiki
pandas
</pre></code></li>
<li><code><b>“$@“</b></code> :: <br />
hier wird jeder Teil zwischen Anführungszeichen als eigenständiger String ausgegeben:
<code><pre> for i in “$@“; do </pre></code>
⇒ <code><pre>(base) mueller@Debian-Laptop:~$ settitle "alsamixer" "git - Wiki" "pandas"
alsamixer
git - Wiki
pandas
</pre></code></li>
</ul>
</html>
<html>
<ul>
<li>ist in das File <b>~/.bashrc</b> einzutragen:
<pre><code>HISTCONTROL=ignoreboth:ignoredups</code></pre>
</li>
<li>verschiedene Optionen:<br />
<ul>
<li>ignoredups</li>
<li>erasedups</li>
<li>ignorespace</li>
</ul>
</li>
</ul>
</html>
<html>
Don't you find it annoying when you have been using the same command in bash <br />
a few times in a row, and then you scroll through the history to a previous <br />
command only having to go through many duplicates of the command you just used.
<br >
For this use bash's HISTIGNORE variable, set in in your ~/.bashrc file.
<code><pre>HISTIGNORE="&"</pre></code>
<br />
Will mean you will not have duplicates in your bash history, but you can use <br />
other varables too, say you don't want the commands beggining with c to be <br />
put in the history.<br />
<br />
An example of this together with not having duplicates:
<code><pre>HISTIGNORE="c*:&" </pre></code>
<h3>Link:</h3>
<a href="http://www.nuxified.org/blog/use_histignore_in_bash" target=_blank>Nuxified-Blog :: Use histignore in bash</a>
<p>
Ich habe folgenden Eintrag:<br />
<code><pre>
export HISTIGNORE="pwd:ls:h:ls -[latr]*:ls -ld:man *:ls a-ltr:help:"
</pre></code>
⇒ besonders "man *:" hat es mir angetan: <br />
jeder Aufruf der man-Page eines Befehls wird _nicht_ mitprotokolliert
</html>
<html>
<ul>
<li><a href="http://www.thegeekstuff.com/2011/08/bash-history-expansion/"
target="_blank" rel="noreferrer noopener">
The Geek Stuff :: Bash history expansion</a>
</li>
<li><a href="http://www.tecmint.com/history-command-examples/"
target="_blank" rel="noreferrer noopener">
TecMint :: “history“ command examples</a>
</li>
<li><a href="http://www.thegeekstuff.com/2008/08/15-examples-to-master-linux-command-line-history"
target="_blank" rel="noreferrer noopener">
The Geek Stuff :: 15 examples to master linux command line history</a>
</li>
</ul>
</html>
<html>
<table border="1">
<tr>
<td>-c
</td>
<td>"clear", Löscht die Verlaufsliste, indem alle Einträge<br />
gelöscht werden.
</td>
</tr>
<tr>
<td>-d offset
</td>
<td>löscht den Verlaufseintrag an der Position OFFSET;<br />
Negative Offsets zählen vom Verlaufslistenende zu-<br />
rück.
</td>
</tr>
<tr>
<td>-a
</td>
<td>Anhängen vom Verlauf dieser Sitzung an die<br />
Verlaufsdatei.
</td>
</tr>
<tr>
<td>-n
</td>
<td>alle nicht bereits aus der Verlaufsdatei gele-<br />
senen Verlaufszeilen lesen und an die Ver-<br />
laufsliste anhängen.
</td>
</tr>
<tr>
<td>-r
</td>
<td>"read", liest die Verlaufsdatei und hängt den<br />
Inhalt an die Verlaufsliste an.
</td>
</tr>
<tr>
<td>-w
</td>
<td>schreibt den aktuellen Verlauf in die Verlaufsdatei.
</td>
</tr>
<tr>
<td>-p
</td>
<td>führt eine Verlaufserweiterung für jedes ARG <br />
durch und zeigt das Ergebnis an, ohne es in <br />
der Verlaufslise einzutragen.
</td>
</tr>
<tr>
<td>-s
</td>
<td>die ARGs als einen einzigen Eintrag an die <br />
History-Liste anhängen.
</td>
</tr>
</table>
</html>
<html>
Befehl:<br />
<code>
history -d <nr><br />
</code>
</html>
<html>
<ul>
<li><b>history-Liste löschen, "clear history":</b><br />
<pre><code>history -c</code></pre>
</li>
<br />
<li><b>append history lines from this session to the history file:</b><br />
<pre><code>history –a</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://powercampus.de/dokumentation/shells/effizientes-arbeiten-mit-der-bash/arbeiten-mit-der-bash-history/das-kommando-history/"
target="_blank" rel="noreferrer noopener">
PowerCampus :: Effizientes Arbeiten mit der bash - Arbeiten mit der bash-History </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>The following will append the contents of file.txt<br />
to the current in-memory history list:
<pre><code>history -r file.txt</code></pre>
</li>
<li>You can optionally run
<pre><code>history -c</code></pre>
before this to clear the in-memory history.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://stackoverflow.com/questions/25761326/how-to-load-bash-command-history-from-file"
target="_blank" rel="noreferrer noopener">
Stackoverflow :: How to load bash command history from file</a>
</li>
</ul>
</html>
<html>
Most of us use love and use the jq command. It works on Linux or Unix-like systems to extract data from JSON documents. Recently I found htmlq, which is like jq and written in Rust lang. Imagine being able to sed or grep for HTML data. We can search, slice, and filter HTML data with htmlq. Let us see how to install and use this handy tool on Linux or Unix and play with HTML data.
<h3>What is htmlq tool?</h3>
It is like jq, but for HTML. Uses CSS selectors to extract bits of content from HTML files. In CSS, selectors are used to target the HTML elements on our web pages that we want to style. For example, we can extract the images or other URLs using this tool easily.
<h3>Installing htmlq on Linux or Unix</h3>
Here is how to install cargo and rustc on Ubuntu or Debian Linux using the apt command/apt-get command:
sudo apt install cargo
Then you would run:
cargo install htmlq
macOS installing cargo
Open the Terminal app and then run the port command as follows:
sudo port install cargo
Or you can install Homebrew on macOS to use the brew package manager as follows:
brew install rustup # installs both cargo and rustc
rustup-init
rustc --version
<h3>FreeBSD intall cargo</h3>
I am going to use the pkg command as follows to install rustc:
sudo pkg install rust
See how to install Rust for other operating systems. Now that I have both rustc and cargo tools, then I type the following simple command to get htmlq on my development system:
cargo install htmlq
<h3>How to install htmlq to extract content from HTML files on Ubuntu Linux</h3>
Have you installed Rust lang? Now install htmlq for fun and profit using the cargo command.
Setting up your PATH
Make sure you add $HOME/.cargo/bin to your PATH variable to be able to run the installed binaries using the export command
# sh/bash/ksh etc
export PATH="$PATH:$HOME/.cargo/bin"
# tcsh/csh etc
setenv PATH $PATH:$HOME/.cargo/bin
How to use htmlq to extract content from HTML files on Linux or Unix
Let us use the curl command to find part of a page by ID:
curl -s url | htmlq '#css-selector'
curl -s url2 | htmlq '#css-selector'
curl -s https://www.cyberciti.biz/faq/ | htmlq --pretty '#content' | more
htmlq outputs
Click to enlarge
Let us find all the links in a page. For example:
curl -s https://www.nixcraft.com | htmlq --attribute href a
Getting help
Simply run:
htmlq --help
htmlq 0.0.1
Michael Maclean <michael@mgdm.net>
Runs CSS selectors on HTML
USAGE:
htmlq [FLAGS] [OPTIONS] <selector>...
FLAGS:
-h, --help Prints help information
-w, --ignore-whitespace When printing text nodes, ignore those that consist entirely of whitespace
-p, --pretty Pretty-print the serialised output
-t, --text Output only the contents of text nodes inside selected elements
-V, --version Prints version information
OPTIONS:
-a, --attribute <attribute> Only return this attribute (if present) from selected elements
-f, --filename <FILE> The input file. Defaults to stdin
-o, --output <FILE> The output file. Defaults to stdout
ARGS:
<selector>... The CSS expression to select
<h3>Summing up</h3>
The htmlq is a lovely tool indeed, and I liked it very much. Do check the Github source code.
<h3>Links:</h3>
<ul>
<li><a href="https://www.cyberciti.biz/open-source/command-line-hacks/using-htmlq-to-extract-content-from-html-files-on-linux-unix/" target="_blank">nixCraft :: How to use htmlq to extract content from HTML files on Linux, macOS or FreeBSD</li>
</ul>
</html>
<html>
<code><pre>
if [ <some test> ]
then
<commands>
elif [ <some test> ]
then
<different commands>
else
<other commands>
fi
</pre></code>
</html>
<html>
<ul>
<li>JSON := “JavaScript Object Notation“</li>
<li><h3>Installation:</h3>
<pre><code>sudo apt-get install jq</code></pre>
</li>
<li><h3>Aufruf:</h3>
<pre><code>$ jq
jq - commandline JSON processor [version 1.6]
Usage: jq [options] <<em>jq filter</em>> [file … ]
jq [options] --args <<em>jq filter</em>> [strings … ]
jq [options] --jsonargs <<em>jq filter</em>> [JSON_TEXTS … ]
… </code></pre>
</li>
<li><h3>Verwendbare Filter:</h3>
<ul>
<li>. (einfacher Punkt) :: “prettifying“ der Ausgabe<br />
takes the input and produces it unchanged as output with the <br />
caveat that by default jq pretty-prints all output.<br />
<br />
<b>Beispiel:</b> <code><pre>jq '.' fruit.json</pre></code></li>
<li></li>
<!--li></li>
<li></li>
<li></li-->
</ul></li>
<li></li>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://ostechnix.com/how-to-parse-and-pretty-print-json-with-linux-commandline-tools/" target=_blank>OS-Technix :: Command line tools for JSON</a></li>
<li><a href="https://www.baeldung.com/linux/jq-command-json" target=_blank>Baeldung :: Guide to Linux jq Command for JSON </a></li>
<!--li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li-->
</ul>
</html>
<html>
<ul>
<li>unter Debian 10 wird mit <b><code>mail</code></b> auf das Programm <b><code>/usr/bin/mail.mailutils</code></b> zugegriffen</li>
<li><h3>Interne mail-Befehle:</h3>
<table border="1">
<tr><td>a[lias] [alias [address...]]</td><td></td></tr>
<tr><td>alt[ernates] name...</td><td></td></tr>
<tr><td>C[opy] [msglist]</td><td></td></tr>
<tr><td>cd [directory]</td><td></td></tr>
<tr><td>ch[dir] directory</td><td></td></tr>
<tr><td>c[opy] [[msglist] file]</td><td></td></tr>
<tr><td>dec[ode] [msglist]</td><td></td></tr>
<tr><td>d[elete] [msglist] </td><td> # Löschen von Nachrichten <br />
# (mark messages as deleted. Upon exiting with quit command<br />
# these messages will be deleted from the mailbox. Until the<br />
# end of current session the deleted messages can be referred<br />
# to in message lists using :d notation.)<br />
# "d 17-19" :: Löschen der Nachrichten 17 bis inkl. 19
<tr><td>di[scard] [header-field...]</td><td></td></tr>
<tr><td>dp [msglist]</td><td>Deletes the current message and prints the next message.<br />
If msglist is specified, deletes all messages from the list<br />
and prints the message immediately following last deleted<br />
one.</td></tr>
<tr><td>dt [msglist]</td><td>Deletes the current message and prints the next message.<br />
If msglist is specified, deletes all messages from the list<br />
and prints the message immediately following last deleted<br />
one.</td></tr>
<tr><td>ec[ho] string ...</td><td></td></tr>
<tr><td>e[dit] [msglist]</td><td>Edits each message in msglist with the editor, specified in<br />
EDITOR environment variable.</td></tr>
<tr><td>el[se]</td><td></td></tr>
<tr><td>en[dif]</td><td></td></tr>
<tr><td>en[velope]</td><td></td></tr>
<tr><td>ex[it]</td><td></td></tr>
<tr><td>F[ollowup] [msglist]</td><td></td></tr>
<tr><td>fi[le] [file]</td><td></td></tr>
<tr><td>fold[er] [file]</td><td></td></tr>
<tr><td>folders</td><td></td></tr>
<tr><td>fo[llowup] [msglist]</td><td></td></tr>
<tr><td>f[rom] [msglist]</td><td></td></tr>
<tr><td>g[roup] [alias [address...]]</td><td></td></tr>
<tr><td>h[eaders] [msglist] </td><td> # gibt eine Liste der aktuell vorhandenen eMails aus
<tr><td>hel[p] [command...]</td><td></td></tr>
<tr><td>ho[ld] [msglist]</td><td></td></tr>
<tr><td>i[f] s|r|t</td><td></td></tr>
<tr><td>ig[nore] [header-field...]</td><td></td></tr>
<tr><td>inc[orporate]</td><td></td></tr>
<tr><td>l[ist]</td><td></td></tr>
<tr><td>m[ail] [address...]</td><td></td></tr>
<tr><td>mb[ox] [msglist]</td><td></td></tr>
<tr><td>n[ext] [message]</td><td></td></tr>
<tr><td>nos[ender] [header-field...]</td><td></td></tr>
<tr><td>nou[nfold] [header-field]</td><td></td></tr>
<tr><td>P[rint] [msglist]</td><td></td></tr>
<tr><td>pi[pe] [[msglist] command]</td><td></td></tr>
<tr><td>pre[serve] [msglist]</td><td></td></tr>
<tr><td>prev[ious] [message]</td><td></td></tr>
<tr><td>p[rint] [msglist]</td><td></td></tr>
<tr><td>q[uit] </td><td> # Exit mit Speichern der Änderungen
<tr><td>R[eply] [msglist]</td><td></td></tr>
<tr><td>R[espond] [msglist]</td><td></td></tr>
<tr><td>r[eply] [msglist]</td><td></td></tr>
<tr><td>r[espond] [msglist]</td><td></td></tr>
<tr><td>ret[ain] [header-field]</td><td></td></tr>
<tr><td>S[ave] [msglist]</td><td></td></tr>
<tr><td>s[ave] [[msglist] file]</td><td></td></tr>
<tr><td>sen[dheader] [[header][: value]]</td><td></td></tr>
<tr><td>se[t] [name[=[string]]...] [name=number...] [noname...]</td><td></td></tr>
<tr><td>sen[der] [header-field...]</td><td></td></tr>
<tr><td>sete[nv] [name[=value]]</td><td></td></tr>
<tr><td>sh[ell] [command]</td><td></td></tr>
<tr><td>si[ze] [msglist]</td><td></td></tr>
<tr><td>so[urce] file</td><td></td></tr>
<tr><td>st[ruct] [msglist]</td><td></td></tr>
<tr><td>su[mmary]</td><td></td></tr>
<tr><td>T[ype] [msglist]</td><td></td></tr>
<tr><td>ta[g] [msglist]</td><td></td></tr>
<tr><td>to[p] [msglist]</td><td></td></tr>
<tr><td>tou[ch] [msglist]</td><td></td></tr>
<tr><td>t[ype] [msglist]</td><td></td></tr>
<tr><td>una[lias] [alias]...</td><td></td></tr>
<tr><td>u[ndelete] [msglist]</td><td></td></tr>
<tr><td>unf[old] [header-field]</td><td></td></tr>
<tr><td>uns[et] name...</td><td></td></tr>
<tr><td>unt[ag] [msglist]</td><td></td></tr>
<tr><td>variable [name...]</td><td></td></tr>
<tr><td>ve[rsion]</td><td></td></tr>
<tr><td>v[isual] [msglist]</td><td>Edits each message in msglist with the editor, specified in <br />
VISUAL environment variable.</td></tr>
<tr><td>wa[rranty]</td><td></td></tr>
<tr><td>W[rite] [msglist]</td><td></td></tr>
<tr><td>w[rite] [[msglist] file]</td><td></td></tr>
<tr><td>x[it] </td><td> # Exit ohne zu speichern
<tr><td>z[+|-|. [count]]</td><td></td></tr>
<tr><td>? [command...] </td><td># "?" gibt die gesamte Befehlsliste aus (ist sowas wie "help")
<tr><td>![command]</td><td></td></tr>
<tr><td>=</td><td>Displays the current message number</td></tr>
<tr><td># comment</td><td></td></tr>
<tr><td>*</td><td></td></tr>
<tr><td>+ [message]</td><td></td></tr>
<tr><td>| [[msglist] command]</td><td></td></tr>
<tr><td>- [message]</td><td></td></tr>
</table>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Manpage “mail“</li>
<li>info mailutils (erfordert das Package <b><code>mailutils-doc</code></b>)</li>
<li><a href="https://mailutils.org/manual/html_section/mail.html" target="_blank">GNU Mailutils :: Abschnitte 3.5.2.* </a></li>
</ul>
</html>
<html>
<ul>
<li>Im Bash-Skriptfile folgende Zeile eintragen:
<code><pre>set -x # "xtrace" </pre></code>
Print commands just before execution ‐ <br />
with all expansions and substitutions done, <br />
and words marked ‐ useful for debugging.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://bash-hackers.gabe565.com/"
target="_blank" rel="noreferrer noopener">
Bash Hackers - Homepage</a>
</li>
</ul>
</html>
https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
<html>
<ul>
<li><b>set -e</b><br />exit immediately / terminate program if a command exits with a non-zero status.</li>
<br />
<li><b>set -u</b><br />
<ul>
<li>alle Variablen sollen vor ihrer Benutzung vorhanden resp. nicht leer sein
</li>
<li>Prevent Unused Variables ::<br />
Bash variables are used to store different types of information.<br />
It is expected that a variable should be initialized and used pro–<br />
perly. The set -u command can be used to prevent and print <br />
errors for the unused variables in bash scripts.
</li>
<li>“unbound variable“
</li>
<li>the bash shows an error when it tries to use an undefined variable.
</li>
<li>Alternativ: <b>bash -u <i><Skriptfile></i></b>
</li>
</ul>
</li>
<br />
<li><b>set -o <i><optionname></i></b><br /></li>
<br />
<li><b>set -n</b><br />überprüft die Syntax des Skripts;<br />read commands but do not execute them.</li>
<br />
<li><b>set -x</b><br />Trace-Modus;<br />
alternativ: set xtrace<br />
print commands and their arguments as they are executed;<br />hilfreich zum Debuggen;<br />ist <u>nur</u> in der aktuellen Shell und den Subshells aktiv ist.<br />
jedes Shell‐Kommando wird vor der Ausführung nochmals ausgegeben,<br />
und zwar mit den intern vorgenommenen Erweiterungen, was bei der<br />
Fehlersuche nützlich sein kann.</li>
<br />
<li><b>set -C</b><br />if set, disallow existing regular files to be overwritten by redirection of output;<br />prevent output redirection using '>', '>&', and '<>' from overwriting existing files</li>
<br />
<li><b>set ‐v</b><br />
Print shell input lines as they are read.</li>
<br />
<li><b>set ‐o noclobber</b><br />
damit wird der Ausgabeumleitung untersagt, vorhandene Dateien zu überschreiben<br />
<br />
When noclobber option is set, then the shell will complain if a shell redirect (>) is trying<br />
to overwrite an existing file. noclobber option is activated using the set command in<br />
bash/ksh. By default, the option is disabled.<br />
<br />
To override noclobber behavior temporarily a special redirection operator (>|) is used.<br />
<br />
Another way is to return to the default behaviour by disabling the shell option:<br />
<code><b>set +o noclobber</b></code><br />
<br />
noclobber option protect file overwrites only for redirection. Removing the file through<br />
rm and appending it to the file via “>>“ redirection works normally.<br />
<br />
<a href="https://www.geeksforgeeks.org/how-to-protect-linux-shell-file-using-noclobber-in-bash-shell/" target="_blank" rel="noreferrer noopener">Geeks for Geeks :: How to protect shell file using noclobber in bash shell</a></li>
<br />
<li><b>set noglob</b><br />
für Dateinamen sind keine Platzhalter wie * und ? möglich sind</li>
<br />
<!--
<li><b></b><br /></li>
<br />
<li><b></b><br /></li>
-->
</ul>
<h3>Links:</h3>
<a href="http://www.linuxcommand.org/lc3_man_pages/seth.html" target=_blank>LinuxCommand :: Set - Manpage</a><br />
<a href="https://ss64.com/bash/set.html" target=_blank>SS64 :: Bash</a><br />
<a href="http://wiki.bash-hackers.org/commands/builtin/set" target=_blank>Bash-Hackers :: set</a>
</html>
<html>
<h3>A note about option which change globbing behavior for bash shell</h3>
Turn on extglob by running the following shopt command:
<code><pre>
$ shopt -s extglob
</pre></code>
From the bash man page:<br />
Composite patterns may be formed using one or more of the following sub-patterns:
<table border="1">
<tr><td><b>?(pattern-list)</b></td><td>Matches zero or one occurrence of the given patterns</td></tr>
<tr><td><b>*(pattern-list)</b></td><td>Matches zero or more occurrences of the given patterns</td></tr>
<tr><td><b>+(pattern-list)</b></td><td>Matches one or more occurrences of the given patterns</td></tr>
<tr><td><b>@(pattern-list)</b></td><td>Matches one of the given patterns</td></tr>
<tr><td><b>!(pattern-list)</b></td><td>Matches anything except one of the given patterns</td></tr>
</table>
To see all the mp4 and mov files that start with either “foo“ or “bar&ldquo:
<code><pre>
$ ls +(foo|bar)*+(.mp4|.mov)
</pre></code>
To list all the files except ones matching *.mp4:
<code><pre>
$ ls -l !(*.mp4)
</pre></code>
OR delete all the files except ones matching *.gif files:
<code><pre>
$ rm -v !(*.gif)
</pre></code>
For more info see your shell man page:<br />
<ul>
<li> man bash</li>
<li> man ksh</li>
</ul>
<br />
Link:<br />
<a href="https://www.cyberciti.biz/faq/how-to-delete-files-containing-character-numberdigit/" target="_blank">https://www.cyberciti.biz/faq/how-to-delete-files-containing-character-numberdigit/</a>
</html>
<html>
<ul>
<li>um zu prüfen, ob das Password für <code>sudo</code> noch<br />
aktiv (resp. gecashed) ist, den Befehl <pre><code>sudo -v</code></pre> eingeben:
<ul>
<li>ist das Passwort <b><u>nicht</u></b> mehr aktiv, <br />
wird danach gefragt:
<pre><code>mueller@HPLaptop:/usr/local/games$ sudo -v
[sudo] Passwort für mueller:
mueller@HPLaptop:/usr/local/games$</code></pre>
</li>
<li>ist das Passwort aktiv, so wird nichts aus–<br />
gegeben und der Prompt erscheint:
<pre><code>mueller@HPLaptop:/usr/local/games$ sudo -v
mueller@HPLaptop:/usr/local/games$</code></pre>
</li>
<ul>
</li>
<ul>
</html>
<html>
<meta Vergleichsoperatoren />
<h3>Syntax of Bash test command</h3>
<code><pre>
<b>test</b> <em>condition</em>
</pre></code>
Another form of Bash test command
<code><pre>
<b>[</b> <em>condition</em> <b>]</b>
</pre></code>
Note: <br />
In general, we use square brackets to evaluate condition. Always <br />
remember one thing, you must provide a space after the opening<br />
square bracket and a space before the closing square bracket. If<br />
you forget to do this, you will get an error message.<br />
<br />
<details>
<summary><b>String Comparison Operators</b></summary>
<table>
<tr><th>String Comparison Operators</th><th>Description</th></tr>
<tr><td>[ string1 = string2 ] </td><td> returns True if both string1 and string2 are same </td></tr>
<tr><td>[ string1 == string2 ] </td><td> returns True if both string1 and string2 are same;<br />
used with the [[ command;<br />
Bash also allows == to be used for equality with [,<br />
but this is not the standard usage; </td></tr>
<tr><td>[ string1 != string2 ] </td><td> returns True if both string1 and string2 are not same.</td></tr>
<tr><td>[ string1 > string2 ] </td><td> returns True if string1 is greater than string2.</td></tr>
<tr><td>[ string1 < string2 ] </td><td> returns True if string1 is less than string2.</td></tr>
<tr><td>[ -n string1 ] </td><td rowspan=2> returns True if the length of the string is greater than zero.</td></tr>
<tr><td>[ string ] </td>
</tr>
<tr><td>[ -z string1 ] </td><td> “Zero ‐ Check“<br />
returns True if the length of the string is zero.<br />
For checking whether string is null or not.</td></tr>
<tr><td>[ -n "string" ] </td><td rowspan="2"> returns True if a string is not null;<br />
use double quotes around variable<br />
names. Not specifying double<br />
quotes causes word splitting or<br />
globbing issues.</td></tr>
<tr><td>[ "string" ] </td></tr>
<tr><td>[ -z "string" ] </td><td> returns True if a string is null.</td></tr>
</table>
</details>
<br />
<details>
<summary><b>Numeric Comparison Operators</b></summary>
<table>
<tr><th>Condition</th><th>Explanation</th></tr>
<tr><td>[ num1 -gt num2 ] </td><td> Checks if num1 is greater than num2.</td></tr>
<tr><td>[ num1 -ge num2 ] </td><td> Checks if num1 is greater than or equal to num2.</td></tr>
<tr><td>[ num1 -lt num2 ] </td><td> Checks if num1 is less than num2.</td></tr>
<tr><td>[ num1 -le num2 ] </td><td> Checks if num1 is less than or equal to num2.</td></tr>
<tr><td>[ num1 -eq num2 ] </td><td> Checks if num1 is equal to num1.</td></tr>
<tr><td>[ num1 -ne num2 ] </td><td> Checks if num1 is not equal to num2.</td></tr>
</table>
<b>Negation:</b><br />
Use an exclamation mark ("!") in front of the comparison operator.<br />
Leave a blank between exclamation mark and following string.<br />
</details>
<br />
<details>
<summary><b>File Check Operators</b></summary>
<table>
<tr><th>Operator</th><th>Explanation</th></tr>
<tr><td>-d file </td><td> checks if the file exists and is it's a directory</td></tr>
<tr><td>-e file </td><td> checks if the file exists on system</td></tr>
<tr><td>-w file </td><td> checks if the file exists on system and if it is writable</td></tr>
<tr><td>-r file </td><td> checks if the file exists on system and it is readable</td></tr>
<tr><td>-s file </td><td> checks if the file exists on system and it is not empty</td></tr>
<tr><td>-f file </td><td> checks if the file exists on system and it is a file</td></tr>
<tr><td>-O file </td><td> checks if the file exists on system and if it's is owned by the current user</td></tr>
<tr><td>-G file </td><td> checks if the file exists and the default group is the same as the current user</td></tr>
<tr><td>-x file </td><td> checks if the file exists on system and is executable</td></tr>
<tr><td>file A -nt file B </td><td> checks if file A is newer than file B</td></tr>
<tr><td>file A -ot file B </td><td> checks if file A is older than file B</td></tr>
</table>
<b>Negation:</b><br />
Use an exclamation mark ("!") in front of the comparison operator.<br />
Leave a blank between exclamation mark and following string.<br />
</details>
<br />
<details><summary><b>Logical Operators</b></summary>
<table>
<tr><th>Operator</th><th>Explanation</th></tr>
<tr><td> ODER / OR </td><td> Es gibt folgende Möglichkeiten:
<code><pre>• [[ $# -eq 0 || $# -eq 1 ]]</pre></code>
<code><pre>• { [ $# -eq 0 ] || [ $# -eq 1 ]; }</pre></code>
<code><pre>• [ $# -eq 0 -o $# -eq 1 ]</pre></code>
</td>
</tr>
<tr>
<td> UND / AND </td><td></td>
</tr>
</table>
</details>
<br />
<h3>Links:</h3>
<ul>
<li><a href="https://www.tutorialsandyou.com/bash-shell-scripting/bash-test-6.html"
target="_blank" rel="noreferrer noopener">
Tutorials And You :: Bash test</a>
</li>
<li><a href="https://www.tutorialsandyou.com/bash-shell-scripting/bash-file-comparison-19.html"
target="_blank" rel="noreferrer noopener">
Tutorials And You :: Number comparison</a>
</li>
<li><a href="https://phoenixnap.com/kb/bash-string-comparison"
target="_blank" rel="noreferrer noopener">
PhoenixNap :: String comparison</a>
</li>
<li><a href="https://www.linuxtechi.com/compare-numbers-strings-files-in-bash-script/"
target="_blank" rel="noreferrer noopener">
Linux Techi :: Compare in bash script</a>
</li>
<li><a href="/media/mueller/INT-256GB/SystemAdministration/Bash/AdvancedBashScriptingGuide_abs-guide.pdf"
target="_blank" rel="noreferrer noopener">
Advanced Bash-Scripting Guide, S. 56f</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>“terminal put“</li>
<li><h3>Befehle</h3>
<table>
<tr><td><code><pre><b>cup x y</b></pre></code></td><td>setzt den Cursor an die Position (x, y)<br />
im Terminalfenster</td></tr>
<tr><td><code><pre><b>clear</b></pre></code></td><td>Löscht den Terminalfenster‐Inhalt</td></tr>
</table></li>
<!--
<li></li>
<li></li>
<li></li>
<li></li>
-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.linuxcommand.org/lc3_adv_tput.php" target="_blank" rel="noreferrer noopener">
LinuxCommand.org :: tput</a></li>
<li><a href="https://linuxhint.com/tput-printf-and-shell-expansions-how-to-create-awesome-outputs-with-bash-scripts/"
target="_blank" rel="noreferrer noopener">LinuxHint :: tput, printf and shell expansions with bash</a></li>
<!--
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
-->
</ul>
</html>
<html>
<ul>
<li> describes how its arguments would be interpreted if used as command names.</li>
<li>Optionen:
<ul><li>-a :: “all“<br />
The -a option can be used to find out if given command is disk file, <br />
alias, keyword or function. It will display all of the places that con-<br />
tains an executable available including aliases, builtins, and functions. </li>
</ul>
</ul>
<h3>Link:</h3>
<a href="https://bash.cyberciti.biz/guide/Type_command" target=_blank>Cyverciti :: type command</a>
</html>
<html>
<ul>
<li><h3>Benötigte Plugins</h3>
Vim Plugins:
<ul>
<li><a href="https://github.com/Yggdroot/indentLine" target="_blank" rel="noreferrer noopener">indentLine</a></li>
<li><a href="https://github.com/pedrohdz/vim-yaml-folds" target="_blank" rel="noreferrer noopener">vim-yaml-folds</a></li>
<li><a href="https://github.com/dense-analysis/ale" target="_blank" rel="noreferrer noopener">ALE</a></li>
</ul>
<br />
Applications
<ul>
<li><a href="https://github.com/adrienverge/yamllint" target="_blank" rel="noreferrer noopener">yamllint</a></li>
</ul>
</li>
<li><h3>Anpassungen in config‐Files</h3>
In ~/.vimrc or ~/.config/nvim/init.vim
<code><pre>
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
set foldlevelstart=20
let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
let g:ale_sign_error = '#rotesKreuz#'
let g:ale_sign_warning = '#Dreieck Gefahrenzeichen#'
let g:ale_lint_on_text_changed = 'never'
</pre></code>
In ~/.config/yamllint/config
<code><pre>
extends: relaxed
rules:
line-length: disable
</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.arthurkoziel.com/setting-up-vim-for-yaml/" target="_blank" rel="noreferrer noopener">
Arthur Koziel :: Setting up vim for YAML</a></li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://www.redhat.com/sysadmin/use-whiptail" target="_blank" rel="noreferrer noopener">Red Hat :: How to use whiptail to create more user-friendly interactive scripts</a></li>
<li><a href="https://www.linuxfordevices.com/tutorials/shell-script/interactive-shell-scripts-whiptail" target="_blank" rel="noreferrer noopener">Linux for devices :: Creating Interactive Shell Scripts With Whiptail</a></li>
<li><a href="https://www.dev-insider.de/dialogboxen-mit-whiptail-erstellen-a-860990/" target="_blank" rel="noreferrer noopener">Dev-Insider :: Dialogboxen mit Whiptail erstellen</a></li>
<li>https://ostechnix.com/create-gui-dialog-boxes-in-bash-scripts-with-whiptail/</li>
</ul>
</html>
<html>
<ul>
<li>A <em>linter</em> is an application that verifies the syntax of a file. The yamllint<br />
command is a great way to ensure your YAML is valid before you<br />
hand it over to whatever application you're writing YAML for (Ansible,<br />
for instance).
</li>
<li><h3>Validation of a YAML file:</h3>
<code><pre>
$ yamllint ‐‐strict shop.yaml || echo “Fail“
</pre></code>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.redhat.com/sysadmin/yaml-beginners" target="_blank" rel="noreferrer noopener">RedHat :: Yaml for beginner</a></li>
</ul>
</html>
<html>
<ul>
<li><h3>Vorbereitungen:</h3>
<code><pre>
$ sudo apt update
$ sudo apt install snapd
$ sudo snap install core
</pre></code>
<h3>Installation:</h3>
<code><pre>
$ sudo snap install yq
</pre></code>
</li>
<li><h3>Aktionen:</h3>
<ul>
<li><b>Files lesen:</b> r
<code><pre>
yq r YAML‐File “<em>PFAD ZUM WERT</em>“
</pre></code>
Beispiel: <code><pre>yq r pod.yaml “spec.containers[0].env[0].value“</pre></code>
</li>
<li><b>Werte ändern:</b> w
<code><pre>
yq w YAML‐File “<em>PFAD ZUM WERT</em>“ “<em>NEUER WERT</em>“
</pre></code>
Beispiel: <code><pre>yq w pod.yaml “spec.containers[0].env[0].value“ “postgres://prod:5432“</pre></code>
yq druckt das Ergebnis auf den Standard Output. If you prefer<br />
to edit the YAML in place, you should add the ‐i flag (s.u.).<br />
</li>
<br />
<li><b>Merging YAML files:</b> m
<code><pre>
yq m ‐‐append <em>ERSTES‐YAML‐FILE ZWEITES‐YAML‐FILE</em>
</pre></code>
Beispiel: <code><pre> yq m ‐‐append pod.yaml envoy-pod.yaml </pre></code>
<br />
Please note that yq sorts the YAML fields in the output alphabetically, <br />
so the order of fields in your output could be different from the > <br />
above listing.<br />
<br />
In other words, the two YAML files are merged into one.<br />
</li>
</ul>
<li><h3>Optionen</h3>
<ul>
<li>‐i, “inplace“</li>
</ul>
<br />
<li><b>Alternative:</b> <a href="https://kustomize.io/" target="_blank" rel="noreferrer noopener">Kustomize</a></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://dev.to/vikcodes/yq-a-command-line-tool-that-will-help-you-handle-your-yaml-resources-better-8j9" target="_blank"
rel="noreferrer noopener">DevTo :: yq, a command line tool</a></li>
</html>
<html>
<ul>
<li><h3>Allgemeine Optionen:</h3>
<ul>
<li>‐‐title</li>
<li>‐‐window-icon</li>
<li>‐‐width</li>
<li>‐‐height</li>
<li>‐‐timeout</li>
</ul></li>
<br />
<li><h3>Meldungsdialoge</h3>
<ul>
<li>Information, ‐‐info</li>
<li>Fehler, ‐‐error</li>
<li>Frage, ‐‐question</li>
<li>Warnung, ‐‐warning</li>
<li>Fortschrittsdialog, ‐‐progress</li>
</ul></li>
<br />
<li><h3>Eingabefelder</h3>
<ul>
<li>Kalender, ‐‐calendar</li>
<li>Text‐Eingabe, ‐‐entry</li>
<li>Liste, ‐‐list</li>
</ul>
<br />
<h3>Links:</h3>
<ul>
<li><a href="https://linuxconfig.org/how-to-use-graphical-widgets-in-bash-scripts-with-zenity" target="_blank">LinuxConfig :: How to use graphical widgets in bash scripts with zenity</a></li>
<li><a href="https://www.howtoforge.de/anleitung/so-zeigen-sie-gui-dialoge-in-einem-bash-skript-mit-zenity-an/" target="_blank">HowToForge :: Anleitung - So zeigen Sie GUI‐Dialoge in einem Bash‐Skript</li>
<li><a href="https://wiki.ubuntuusers.de/Zenity/" target="_blank">Ubuntu‐Users Wiki :: Zenity</a></li>
<li><a href="https://jamesslocum.com/blog/post/55694754191! target="_blank">James Locum :: Blog</li>
</ul>
</html>
<html>
Name the following script "alarm". Make it executable<br />
and them invoke it as:
<code><pre>
<b>% alarm 10 "Time for tea"</b>
</pre></code>
After 10 seconds machine will<br />
<br />
echo Time for Tea<br />
<br />
and beep five times.....<br />
<code><pre>
#! /usr/bin/ksh
# alarm program
# displays a message at
if [ $# -ne 2 ]
then
echo "USAGE : $0 seconds message"
exit 1
fi
time=$1
mesg=$2
signal_alarm()
{
sleep $time
banner $mesg
for i in 1 2 3 4 5 6 7 8 9
do
if [ $i -eq 2 -o $i -eq 4 -o $i -eq 6 -o $i -eq 8 ]
then
sleep 1
else
tput bel
fi
done
}
case $1 in
[0-9][0-9][0-9] | [0-9] | [0-9][0-9] ) signal_alarm &;;
*) echo Seconds range is from 0 to 199;;
esac
</pre></code>
</html>
<html>
To rebuild your /etc/passwd file use:<br />
<code>
nisaddent -rv -f /etc/passwd passwd<br />
</code>
<br />
<b>HOWEVER</b>, if you perform the above command<br />
you must perform the following command on<br />
the shadow file:<br />
<code>
nisaddent -mv -f /etc/shadow shadow<br />
</code>
<br />
<b>DO NOT USE</b>the nisaddent -rv -f command on<br />
the /etc/shadow file, this command will confuse<br />
replica servers and lock everyone off of a system.<br />
<br />
</html>
<html>
<ul>
<li><h2>Bereitstellungszinsen vergleichen</h2>
<p>
Wer eine Immobilie bauen lässt oder kaufen will, nimmt meistens ein Darlehen auf.
</p><p>
Beim Vergleich mehrerer Angebote sollten Kreditnehmer unbedingt auf die Höhe der<br />
<b>Bereitstellungszinsen</b> achten, rät die Stiftung Warentest in ihrer Zeitschrift “Finanztest“.
</p><p>
Bereitstellungszinsen fallen an, wenn Kreditnehmer die Darlehenssumme in Etappen je <br />
nach Baufortschritt abrufen. Im Effektivzins sind sie <u>nicht</u> enthalten.
</p>
Quelle:<br />
RTL-Videotext, S. 431 (2017-05-14)</li>
</ul>
</html>
<html>
<ul>
<li>Wenn an verschiedenen Merkmalsträgern zu einem festen Zeit<br />
punkt die Ausprägungen eines Merkmals erfasst werden, resultiert <br />
eine <u>Querschnittsreihe</u>. Verfolgt man ein Merkmal im Zeitverlauf an‐<br />
hand eines einzigen Merkmalsträgers, erhält man eine <u>Zeitreihe</u>.</li>
<li>Häufig wird ein Merkmal anhand mehrerer fester Merkmalsträger <br />
im Zeitverlauf beobachtet. Durch eine solche Kombination von Quer&hypehn;<br />
schnitts- und Zeitreihenanalysen entsteht eine <u>Längsschnittstudie</u>,<br />
die auch <u>Panel</u> genannt wird. </li>
</ul>
<img src="./pictures/1.1-6-start.gif" />
</html>
<html>
<ul>
<li><b>Art der Erzeugung:</b><br />
Statistische Daten können durch Befragung, durch Beobachtung <br />
oder durch planmäßig angelegte Experimente gewonnen werden.</li>
<li><b>Herkunft der Daten:</b><br />
Wenn Daten für einen Untersuchungszweck eigens erhoben werden, <br />
spricht man von einer <u>Primärerhebung</u>. Bei einer <u>Sekundärerhebung</u> <br />
greift man hingegen auf vorhandenes Datenmaterial aus amtlichen <br />
oder sonstigen Quellen zurück.</l>
</ul>
<img src="./pictures/1.1-4-start.gif" />
</html>
<html>
<ul>
<li>Eine zweite Klassifikationsmöglichkeit für Merkmale geht von der <br />
Menge aller öglichen Merkmalswerte aus.</li>
<li>Bei einem diskreten Merkmal ist die Anzahl der Elemente dieser<br />
Menge endlich oder zumindest abzählbar.<br />
⇒ z.B. der Familienstand: ledig, verheiratet, verwitwet</li>
<li>Ein stetiges Merkmal ist hingegen dadurch gekennzeichnet, dass<br />
die Ausprägungen ein Intervall bilden.<br />
⇒ z.B. die Körpergröße: sie bildet ein Intervall, z.B. zwischen 40 und 230</li></li>
<li></li>
</ul>
</html>
<html>
<ol>
<li><a href="file:///media/mueller/5637-0479/TiddlyWiki/Wiki.html#%5B%5BBeschreibende%20Statistik%20%3A%3A%20Merkmalstraeger%20und%20Merkmalsauspraegung%5D%5D" target="_blank">Merkmalsträger und Merkmalsausprägung</a></li>
<li><a href="file:///media/mueller/5637-0479/TiddlyWiki/Wiki.html#%5B%5BBeschreibende%20Statistik%20%3A%3A%20Skalentypen%5D%5D" target="_blank">Skalentypen</a></li>
<li>Diskrete und stetige Merkmale</li>
<li>Datengewinnung</li>
<li>Datenerhebung</li>
<li>Arten statistischer Untersuchungen</li>
<li>Veranschaulichung statistischer Daten</li>
</ol>
</html>
<html>
<ul>
<li>Daten beziehen sich auf <b>Merkmalsträger</b> oder <b>statistische Einheiten</b>. <br />
Die Menge aller für eine Fragestellung interessierenden Objekte <br />
bildet eine <b>Grundgesamtheit</b>. <br />
<br />
<ul>
<li><u>Beispiel "Grundgesamtheit (Einwohner Münchens)"</u><br />
Ein Beispiel für eine Grundgesamtheit ist die Menge aller Personen, die in <br />
München ihren Erstwohnsitz angemeldet haben. Ob eine Person zur<br />
Grundgesamtheit zählt, ist sachlich, räumlich und zeitlich eindeutig <br />
festgelegt, wenn man einen festen Stichtag zugrunde legt.<br />
<br />
Die statistischen Einheiten sind hier durch die Einzelpersonen gegeben.<br />
</li><br />
<li><u>Beispiel "Grundgesamtheit (Sparkassenkunden)"</u><br />
Auch die Kunden der Sparkasse können eine Grundgesamtheit konstituieren. <br />
<br />
Jeder einzelne Kunde fungiert dann als statistische Einheit. <br />
</li><br />
<li><u>Beispiel "Grundgesamtheit (Schraubenproduktion)"</u><br />
Die von einem stahlverarbeitendem Unternehmen in einem Monat produzierten<br />
Teile einer Serienfertigung repräsentieren ebenfalls eine Grundgesamtheit.<br />
<br />
Statistische Einheiten sind hier die einzelnen Serienteile. </li></ul>
<br />
<li>Die Eigenschaften statistischer Einheiten werden <b>Merkmale</b> genannt.<br />
Die möglichen Werte, die ein Merkmal annehmen kann, heißen <b>Merkmalsausprägungen</b>. <br />
<br />
<ul>
<li><u>Beispiel "Merkmalsausprägung (Einwohner Münchens)"</u><br />
Ein Merkmal einer in München gemeldeten Einzelperson ist der <br />
Familienstand. Dieser kann z.B. die Ausprägung "ledig" haben. </li>
<br />
<li><u>Beispiel "Merkmalsausprägung (Sparkassenkunden)"</u><br />
Eine Sparkasse kann sich bei ihren Kunden etwa für das Merkmal "Kreditwürdigkeit"<br />
interessieren. Anhand der vorhandenen Vorinformationen über den Kunden wird sie <br />
einem konkreten Kunden z.B. die Merkmalsausprä:gung "nicht kreditwürdig" zuordnen.</li>
<br />
<li><u>Beispiel "Grundgesamtheit (Schraubenproduktion)"</u><br />
Ein Merkmal eines Serienteils ist dessen Länge. Die möglichen Merkmals–<br />
werte sind durch ein Intervall nicht-negativer reeller Zahlen gegeben.</li>
</ul>
</li>
</ul>
</html>
<html>
Merkmale lassen sich hinsichtlich der verwendeten Messskala klassifizieren. <br />
Wenn die Ausprägungen Kategorien ohne Rangordnung darstellen, liegt eine <br />
Nominalskala zugrunde.<br />
<ul>
<li>[Nominalskala (Familienstand)] [Nominalskala (Geschlecht)] [Nominalskala (Materialart)]
<br />
Falls sich die Ausprägungen auch in eine Rangfolge bringen lassen,<br />
gründet die Datenerhebung auf einer Rangskala.
</li><br />
<li>[Rangskala (Schulabschluss)] [Rangskala (Kreditwürdigkeit)] [Rangskala (Qualitätsimage)]
<br />
Wenn auch Abstände interpretierbar sind, basieren die Daten auf einer metrischen Skala.
</li><br />
<li>[metrische Skala (Alter)] [metrische Skala (Nettoeinkommen)] [metrische Skala (Herstellungsdatum)]
<br />
Die Skalenarten unterscheiden sich also hinsichtlich der zulässigen Operationen.
</li>
</html>
<html>
<ul>
<li>Wenn man bei einer Untersuchung alle Elemente der Grund‐<br />
gesamtheit erfasst, spricht man von einer <u>Vollerhebung</u>. Falls man <br />
nur Stichproben aus der Grundgesamtheit heranzieht, liegt eine <u>Teil‐<br />
erhebung</u> vor. </li>
<li>Ein häufig angewendetes Stichprobenverfahren ist die <u>Ziehung <br />
einer Zufallsstichprobe</u>. Daneben gibt es auch systematische Auswahl‐<br />
techniken und Mischformen, etwa bei geschichteten Stichproben.</li>
</ul>
<img src="./pictures/1.1-5-start.gif" />
</html>
<html>
<ul>
<li>In den Zeitungen findet man täglich grafische Darstellungen statis‐<br />
tischer Untersuchungsbefunde, häufig ergäzt durch Bilder mit inhalt‐<br />
lichem Bezug (“Infografiken“).</li>
<li>Die Wirkung solcher Grafiken auf den Betrachter kann durch Verän‐<br />
derung des Maßstabs oder des dargestellten Ausschnitts stark beein‐<br />
flusst werden. Wer dies nicht weiß, läuft Gefahr manipuliert zu werden.</li>
</ul>
</html>
<html>
Grundkonzepte der beschreibenden Statistik und der explorativen Datenanalyse;
<ul>
<li> 0. Einführung</li>
<li> 1. <a href="file:///media/mueller/5637-0479/TiddlyWiki/Wiki.html#%5B%5BBeschreibende%20Statistik%20%3A%3A%20Grundbegriffe%20der%20Datenerhebung%5D%5D" target="_blank">Grundbegriffe der Datenerhebung</a></li>
<li> 2. Empirische Verteilungen univariater Daten</li>
<li> 3. Kenngrößen univariater Verteilungen</li>
<li> 4. Konzentrationsmessung</li>
<li> 5. Empirische Verteilung multivariater Daten</li>
<li> 6. Zusammenhangsmaße</li>
<li> 7. Regressionsrechnung</li>
<li> 8. Indexrechnung</li>
<li> 9. Zeitreihenanalyse</li>
</ul>
<br />
<h3>Literatur & Links</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Portal:Statistik" target=_blank>Wikipedia :: Statistik-Portal</a></li>
</ul>
</html>
<html>
<center><img src="./pictures/besteck.jpeg" height=354 width=629 /></center>
<h2>“20 nach 8“ ‐ Sie pausieren das Essen</h2>
Wenn Sie eine Pause beim Essen machen möchten, sollten Sie die<br />
Griffel von Messer und Gabel auf ungefähr 8 Uhr und 4 Uhr in Form<br />
eines Dreiecks positionieren, soweit es trotz des Essens auf dem<br />
Teller möglich ist. Die gesamte “Uhr“ zeigt hierbei etwa 08:20 Uhr an.
<h2>“20 nach 7“ ‐ Sie möchten Nachschlag mit altem Besteck</h2>
Kreuzen Sie Messer und Gabel in der Mitte des Tellers, sodass die<br />
Griffe bei 5 Uhr und 7 Uhr auf dem Tellerrand liegen, so teilen Sie<br />
dadurch der Bedienung mit, dass Sie Ihr bereits verwendetes Be‐<br />
steck weiterhin nutzen und/oder einen Nachschlag möchten.
<h2>“20 vor 8“ ‐ Es hat Ihnen nicht geschmeckt</h2>
Hat Ihnen das Essen nicht geschmeckt, so können Sie das ausdrük‐<br />
ken, indem Sie Messer und Gabel mit gekreuzter Klinge und Zinken<br />
zu einem Dreieck zueinander legen, sodass in etwa die Uhrzeit 07:40<br />
Uhr angezeigt wird.
<h2>“5 nach halb 7“ ‐ Es hat Ihnen geschmeckt</h2>
Möchten Sie ein Kompliment für das Essen aussprechen, so können<br />
Sie Messer und Gabel mit beiden Griffen nach links unten und paral‐<br />
el zueinander auf etwa 07:35 Uhr legen. Das bedeutet für den Kel‐<br />
lner, dass er abräumen und dem Koch Ihr Kompliment übermitteln<br />
kann.
<h2>“20 nach 4“ ‐ Sie haben fertig gegessen</h2>
Haben Sie fertig gegessen und möchten die Bedienung bitten, ab‐<br />
zuräumen, so können Sie Messer und Gabel parallel zueinander,<br />
mit den Griffen nach schräg rechts unten, auf dem Teller positio‐<br />
nieren, sodass ungefähr 04:20 Uhr angezeigt wird.
<h3>Links:</h3>
<ul>
<li><a href="https://www.focus.de/wissen/mit-gabel-und-messer-so-zeigen-sie-dem-kellner-mit-ihrem-besteck-ob-es-im-restaurant-geschmeckt-hat_id_75583334.html"
target="_blank" rel="noreferrer noopener">Focus Online :: Mit Gabel und Messer!</a></li>
</ul>
</html>
<html>
<ul>
<li>
</li>
<li> […] Ein Beziehungsstreit sollte niemals ein absichtliches <br />
Niedermachen des Partners sein.
<li>Denn Streit an sich ist nichts Negatives innerhalb einer Be–<br />
ziehung, wenn man gewisse Grundregeln einhält, die nicht<br />
unter die Gürtellinie gehen.
</li>
<li>Es heißt, dass man für eine negative Beziehungserfahrung<br />
wie einen Streit, fünf positive zum Neutralsieren benötigt,<br />
lachen hilft also, um das Gleichgewicht wieder herzustellen.<br />
[ … ]
</li>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.ndr.de/nachrichten/info/Familientreffen-Naehe-und-Distanz-in-Beziehungen,audio1424274.html"
target="_blank" rel="noreferrer noopener">
NDR Info, “Familientreffen ‐ Nähe und Distanz in Beziehungen“, 20230716</a>
</li>
<li><a href="https://www.stern.de/lifestyle/liebe-sex/sieben-zeichen--dass-die-beziehung-eine-starke-basis-hat-34219208.html"
target="_blank" rel="noreferrer noopener">
Stern :: 7 Zeichen, dass Ihre Beziehung eine starke Basis hat</a>
</li>
</ul>
</html>
<html>
<ul>
<li>wird vom britischen Wirtschaftsmagazin “The Economist“ präsentiert;</li>
<li>1986 von der “Economist“-Korrespondentin Pamela Woodall erfunden;</li>
<li>Ziel war es, einen leicht verständlichen Währungsvergleich auf Basis<br />
von Kaufkraftparitäten zu ermöglichen und Über‐ und Unterbewertun‐<br />
gen von Währungen zu zeigen.</li>
<li>er wird halbjährlich neu berechnet;</li>
<li>ein beliebter globaler Kaufkraft- und Devisenmarkt-Index;</li>
<li>Der <b>Big Mac‐Index</b> ist ein Indikator, der die Kaufkraft verschiedener<br />
Währungen anhand der Preise eines Big Mac in den jeweiligen Län‐<br />
dern vergleicht.</li>
<li>Der <b>Big Mac‐Index</b> gibt vereinfachend Auskunft über die Kaufkraft<br />
des US-Dollars, die Kaufkraft einzelner Währungen und die Ausge‐<br />
glichenheit der Devisenmärkte.</li>
<br />
<li><b><u>Erstellung / Berechnung:</u></b><br />
<ul>
<li>Die “Economist“-Redakteure fragen die Preise des McDonald's-Burgers Big Mac<br />
in den Währungen der betrachteten Länder jedes Mal neu ab.</li>
<li>Diese Preise in Lokalwährungen rechnen die Redakteure dann in US-Dollar um.</li>
<li>Die US-Dollar-Preise werden dann der Höhe nach geordnet, um sie mit dem<br />
echten US-Preis eines Big Macs zu vergleichen.</li>
<li>Daraus werden dann Schlüsse über die Kaufkraft und die Devisenmärkte gezogen.</li>
</ul>
</li><br />
<li>Durch die Umrechnung der lokalen Big Mac-Preise in US-Dollar und<br />
den Vergleich dieser Preise mit dem Preis eines amerikanischen Big<br />
Macs in US-Dollar kann zunächst abgelesen werden, welche Kauf‐<br />
kraft der US-Dollar im Vergleich zu anderen Währungen hat. D.h. die<br />
aktuelle Kaufkraft der Währungen wird vereinfachend miteinander<br />
verglichen.<br />
</li>
<br />
<li>Zudem wird auch für jede einzelne Währung sichtbar, wie hoch die<br />
Kaufkraft dieser Währung in den jeweils anderen Ländern ist. Das<br />
ist interessant für Touristen und Investoren: Menschen aus einem<br />
Land mit höheren Big Mac-Preisen bekommen in Ländern mit ge‐<br />
ringeren Big Mac-Preisen mehr für ihr Geld. Umgekehrt gilt: Men‐<br />
schen aus Ländern mit geringeren Big Mac-Preisen müssen in<br />
einem Land mit höheren Big Mac-Preisen viel mehr Geld auf den<br />
Tisch legen.</li>
<br />
<li><u>Schließlich zeigt der Big Mac Index auch, ob die Devisenmärkte<br />
im Gleichgewicht sind.</u> Das heißt, ob sie dort stehen, wo sie nach<br />
der reinen ökonomischen Lehre (also ohne den Eingriff von No‐<br />
tenbanken) stehen müssten. Generell gilt:<br />
<ul>
<li>Währungen der Länder mit einem <b>höheren</b> Big Mac‐Preis als in den USA<br />
gelten als <b>überbewertet</b>. Investoren können davon ausgehen, dass die<br />
Kurse dieser Währungen zukünftig <b>sinken</b>.</li>
<li>Währungen der Länder mit einem <b>niedrigeren</b> Big Mac‐Preis als in den USA<br />
gelten als <b>unterbewertet</b>. Investoren können davon ausgehen, dass die<br />
Kurse dieser Währungen in der nächsten Zeit <b>steigen</b>.</li>
</ul></li>
<!--
<li></li>
<li></li>
-->
</ul>
<h3>Link:</h3>
<li>Traders' 10/2022, S. 11</li>
<li><a href="https://www.ardmediathek.de/video/zweifelsfrei/big-mac-index-armes-land-billiger-burger/funk/Y3JpZDovL2Z1bmsubmV0LzEyMjYzL3ZpZGVvLzE4MjAwMDEvc2VuZHVuZw"
target="_blank" rel="noreferrer noopener">
ARD Mediathek :: Big Mac‐Index: Armes Land, billiger Burger?</a></li>
<li><a href="https://www.boerse.de/geldanlage/Big-Mac-Index-Was-steckt-hinter-dem-Kaufkraft-Indikator-von-Volker-Rechberger/32018471"
target="_blank" rel="noreferrer noopener">
Börse.de :: Big Mac‐Index: Was steckt hinter dem Kaufkraft‐Indikator?</a></li>
</ul>
</html>
<html>
<ul>
<li>2015 gründete sich ein Konsortium aus führenden Unternehmen<br />
der digitalen Wirtschaft. Es setzte sich zur Aufgabe, die Komprimierung von Bildern zu verbessern. Im Blick hatte die Alliance for Open Media (AOMedia), der u. a. Amazon, Cisco, Facebook, Google (inklusive YouTube), Mozilla, Microsoft, Netflix, Intel, AMD, Tencent und Apple angehören, vor allem den Datenverkehr im Internet. Denn mehr als die Hälfte der durchschnittlichen Bandbreite einer Website wird von Bildern beansprucht. Von einer verbesserten Bildkomprimierung profitiert nicht nur die Performance einzelner Webseiten. Die Gesamtleistung des Webs wird optimiert, da kleinere Dateien den Datenverkehr beschleunigen, den Energieverbrauch senken und weniger Speicherplatz verbrauchen.
</li>
<li>Damit sich die neue Technologie möglichst schnell als Standard verbreiten kann, sollte sie keine Lizenzkosten verursachen und im Sinne des Open-Source-Gedankens frei verwendbar sein. Im März 2018 machte AOMedia die Spezifikation eines neuen freien Videocodecs öffentlich. Ab dem Zeitpunkt wurde offiziell eine finale erste Version von AOMedia Video 1 (kurz AV1) zur Verfügung gestellt.
</li>
<li> Aus den Bemühungen des Industriekonsortiums ging nicht nur ein lizenzfreier offener Videocodec für Bewegtbilder, sondern auch das AV1 Image File Format (AVIF) für Standbilder hervor. AVIF kombiniert die effizienten Kompressionsalgorithmen des AV1-Videocodecs mit der Containertechnik des HEIF-Formats (High Efficiency Image File), das bereits seit einiger Zeit beispielsweise von Apple genutzt wird. Das HEIF-Containerformat stellt u. a. eine einheitliche und auf Normen basierende Basis für den Austausch, die Speicherung (z. B. Vorgaben für Metadaten) sowie für die Übertragung AV1-codierter Bildinhalte zur Verfügung.
</li>
<li>Es gibt also gewisse Überschneidungen zwischen AVIF und HEIF. Die Bildformate verwenden aber verschiedene Kompressionsverfahren für das Kodieren von Bildinformationen. Das HEIF-Format nutzt anstelle der AV1-Kompression überwiegend das Video-Format HEVC (High Efficiency Video Coding). Gelegentlich wird auch der Videokompressionsstandard H.264/MPEG-4 AVC eingesetzt.
</li>
<li> Die von AVIF verwendete HEIF-Containertechnik ist eine spezielle Ausprägung des grundlegenden Mediendateiformats ISOBMFF. Das ISO/IEC Base Media File Format (formal auch ISO/IEC 14496-12 genannt) spezifiziert beispielsweise, wie Metadaten angelegt und gespeichert sowie einzelne Bilder und Bildsequenzen aufbereitet werden (etwa als verschachtelte Bildinformationen für effizientes Streaming). Der ISO-Standard gibt dadurch eine generelle und allgemeinverbindliche Struktur für Multimedia- und Containerdateien vor und schafft z. B. wichtige Voraussetzungen für die Interoperabilität eines Bildformats (also etwa die Fähigkeit zur Zusammenarbeit mit anderen Systemen und Techniken). ISOBMFF wurde 2001 von der Moving Picture Experts Group (MPEG) definiert.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.ionos.de/digitalguide/websites/webdesign/avif-format-vorgestellt/"
target="_blank" rel="noreferrer noopener">
IONOS :: AVIF – lizenzkostenfreies Bildformat für die Zukunft </a>
</li>
<li><a href="https://www.giga.de/tipp/avif-datei-in-jpg-umwandeln-oeffnen/"
target="_blank" rel="noreferrer noopener">
GIGA :: AVIF‐Datei in JPG umwandeln & öffnen</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li><h3>“Wal“</h3>
Darunter wird ein Besitzer von Bitcoin bezeichnet, der mind. 1000 Bit‐<br />
coins besitzt.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus‐Money 38/2021 (15.09.2021), S. 16f</li>
</ul>
</html>
<html>
Unter einer <b>Blockchain</b> (auch Block Chain, englisch für Blockkette) wird<br />
eine (verteilte) Datenbank verstanden, deren Integrität (Sicherung gegen<br />
nachträgliche Manipulation) durch Speicherung des Hashwertes des<br />
vorangehenden Datensatzes im jeweils nachfolgenden, also durch krypto‐<br />
graphische Verkettung, gesichert ist.[1]<br />
<br />
Das Verfahren ist die technische Basis für sogenannte Kryptowährungen, kann<br />
aber ggf. darüber hinaus in verteilten Systemen zur Verbesserung/Vereinfachung <br />
der Transaktionssicherheit im Vergleich zu zentralen Systemen beitragen.<br />
<br />
Die Funktionsweise ähnelt dem Journal der Buchführung. Es wird daher auch <br />
als “Internet der Werte„ (Internet of value) bezeichnet. Eine Blockchain ermöglicht es,<br />
dass in einem dezentralen Netzwerk eine Einigkeit zwischen den Knoten erzielt werden kann.<br />
(Siehe auch: Byzantinischer Fehler.)<br />
<br />
Link:<br />
<a href="https://de.wikipedia.org/wiki/Blockchain">https://de.wikipedia.org/wiki/Blockchain</a><br />
<br />
</html>
<html>
<p>
<b>einfacher gleitender Durchschnitt, “simple moving average“, <em>SMA (200)</em> [Preis‐Indikator]</b><br />
</p>
<h3>Einfach, aber bewährt :: 200-Tage-Linie als Maß aller Dinge</h3>
von Angela Göpfert
<p>
Charttechniker wissen schon seit Jahrzehnten um die Bedeutung der 200-Tage-Linie. Doch auch Privatanleger können dieses Hilfsmittel nutzen. Beachten sie hierbei ein paar einfache Regeln, können sie ein deutliches Renditeplus erzielen.
</p><p>
Die 200-Tage-Linie gehört wohl zu den einfachsten und bekanntesten Hilfsmitteln der Charttechnik. Der ursprüngliche Zweck des Indikators bestand darin, die oft wilden Kursschwankungen von Aktien oder Indizes zu glätten, damit der große Trend besser sichtbar wird.
</p>
<h4>Simple Berechnung</h4>
<p>
Das zeigt schon die Berechnung: In ihrer einfachen Form wird die 200-Tage-Linie ermittelt, indem für jeden Tag das arithmetische Mittel der Schlusskurse der vergangenen 200 Handelstage berechnet wird und anschließend die einzelnen Durchschnittskurse miteinander verbunden werden.
</p><p>
Diese Linie beschreibt also den gleitenden Durchschnitt der vergangenen 200 Börsentage. Damit läuft sie den Kursen quasi hinterher und gehört daher zur Gruppe der trendfolgenden Indikatoren.
</p>
<h4>"The trend is your friend"</h4>
<p>
Diese finden in der Charttechnik von jeher große Beachtung, schließlich lautet die wohl wichtigste Regel der technischen Analyse: "The trend is your friend."
</p><p>
Oder, um es mit dem Experten Wieland Staud von Staud Research zu sagen: "Die richtig großen Gelder werden nicht im täglichen Rein und Raus verdient, sondern beim konsequenten Abreiten langer Trends."
</p>
<h4>Bestechend einfache Regel</h4>
<p>
Doch was bedeutet das im Falle der 200-Tage-Linie genau? Die Faustregel lautet: Klettert der beobachtete Index oder die ausgewählte Aktie über den gleitenden Durchschnitt, der in diesem Fall als Widerstandslinie fungiert, dann heißt es kaufen. Anleger können davon ausgehen, dass der Kurs weiter steigt.
</p><p>
Durchbricht hingegen der Kurs die 200-Tage-Linie, die in diesem Fall eine Unterstützungslinie darstellt, von oben nach unten, dann heißt es verkaufen. Der Kurs dürfte weiter fallen.
</p><p>
Viele Anleger dürften sich nun fragen, warum man ausgerechnet den gleitenden Durchschnitt der vergangenen 200 Tage beobachtet - und nicht etwa die 137-Tage-Linie. Ganz einfach deshalb: Im Backtesting hat sich die 200-Tage-Linie als besonders valider Indikator erwiesen.
</p>
<h4>Gefahr von Fehlsignalen</h4>
<p>
Weil sie selbst fundamental ausgerichteten Marktteilnehmern geläufig ist, ist schon allein die psychologische Wirkung der 200-Tage-Linie enorm groß. Zudem besticht sie im Gegensatz zu vielen anderen technischen Hilfsmitteln durch ihre große Einfachheit.
</p><p>
Diesen Vorteilen stehen aber auch zahlreiche Nachteile gegenüber: Die Gefahr von Fehlsignalen etwa ist bei dieser Strategie nicht zu verachten, häufig greift sie einfach zu kurz. So überwand der Dax Anfang 2002 die 200-Tage-Linie nur kurz, um dann wieder zurückzufallen.
</p>
<h4>Transaktionskosten nicht vergessen</h4>
<p>
2010 hatte der Dax etwa im Mai, Juli und August die 200-Tage-Linie kurzfristig von oben nach unten durchbrochen - nur um sie wenige Tage später wieder zurückzuerobern. Anleger, die sich strikt an der 200-Tage-Linie als Signalgeber für Kaufen oder Verkaufen orientiert hätten, hätten mit dieser Strategie somit viel Geld verloren.
</p><p>
Darüber hinaus ist diese Strategie äußerst aufwändig. So kann es durchaus sein, dass Investoren in einem schwankungsfreudigen Jahr im Schnitt einmal pro Monat zum Handeln gezwungen sind. Bei jedem Verkauf oder Kauf fallen zudem je nach Broker teils hohe Transaktionskosten an, die den Gewinn wiederum schmälern.
</p>
<h4>Bitte mit mehr Raffinesse!</h4>
<p>
Viele technische Analysten wenden daher eine verfeinerte, raffiniertere Variante der oben erläuterten Strategie an. Einfach nur zu kaufen oder verkaufen je nachdem, ob ein Kurs ober- oder unterhalb der 200-Tage-Linie notiert, ist ihnen zu pauschal. Auch die Richtung der Linie muss beachtet werden, um einen klaren Trend auszumachen.
</p><p>
Steigt demnach die 200-Tage-Linie nach einer Baisse wieder an und der Kurs notiert darüber, dann ist dies ein klares Kaufsignal. Dies war rückblickend etwa 1999, 2003 und 2009 der Fall (siehe Grafik). Die lange Hausse zwischen 2003 und 2008 hätten Investoren somit in voller Gänze mitgenommen.
Gewinne mit fallenden Kursen
</p><p>
Dreht die 200-Tage-Linie hingegen nach einer Hausse wieder nach unten und der Kurs notiert darunter, dann heißt es verkaufen. Anleger, die dieser Regel gefolgt wären, wären Ende 2000 und Anfang 2008 aus dem Markt ausgestiegen.
</p><p>
Damit hätten sie nicht nur die schlimmsten üche nach dem Platzen der Dotcom-Blase und nach Ausbruch der Finanzkrise vermieden. Mutige Investoren hätten sogar Gewinne machen können, indem sie über Zertifikate oder andere Derivate auf einen fallenden Markt gewettet hätten.
</p>
<h4>Es gibt noch mehr Indikatoren</h4>
<p>
Die Orientierung an der 200-Tage-Linie gemäß dieser raffinierteren Variante bietet Privatanlegern somit ein einfaches Hilfsmittel, um einerseits zu überprüfen, ob sie nicht einen wichtigen Trend beziehungsweise eine wichtige Trendwende verpassen. Zugleich bietet ihnen diese Strategie klare Regeln für den Ein- und Ausstieg an.
</p><p>
Sich jedoch nur am gleitenden Durchschnitt der 200-Tage-Linie zu orientieren, wäre indes zu eindimensional. Dafür ist sie einfach zu träge. Investoren würden viel an Performance verpassen, wenn sie sich nur nach ihr richten würden. Technische Analysten berücksichtigen daher in ihren Anlageempfehlungen stets ein ganzes Bündel von Indikatoren.
</p>
<h4>Nichts für Seitwärtsmärkte</h4>
<p>
Als Anlagestrategie für Privatinvestoren empfiehlt sich die reine 200-Tage-Methode vor allem bei ausgeprägten Markttrends. In einer volatilen Seitwärtsbewegung ist hingegen die Gefahr von Fehlsignalen erhöht, und die Kosten für Käufe und Verkäufe fressen die Gewinne auf.
</p>
<h4>Links:</h4>
<ul>
<li><a href="https://boerse.ard.de/boersenwissen/boersenwissen-fuer-fortgeschrittene/die-200-tage-linie-als-mass-aller-dinge-100.html" target=_blank>ARD - Börsenwissen :: 200-Tage-Linie</a></li>
</ul>
</html>
<htmL>
<ul>
<li>Laut der Bank of America gilt die sogenannte Rule of 20 ‐ oder übersetzt<br />
die 20er Regel ‐ als wichtiger Indikator, ob Aktien ihre Talsohle erreicht<br />
haben. Doch wie funktioniert die Regel eigentlich genau?<br />
</li>
<li><h3>Was besagt die 20er‐Regel?</h3
Die 20er‐Regel der Bank of America besagt, dass in Zeiten eines Tiefpunkts<br />
bei Aktien immer Folgendes der Fall war: Die Summe aus der US‐Verbraucher‐<br />
inflation und dem nachlaufenden 12‐Monats‐Kurs‐Gewinn‐Verhältnis des S&P‐<br />
500 fiel unter den Wert von 20. Das trat ‐ so zeigen es die Daten der Bank ‐ <br />
bei jedem einzelnen Bärenmarkt seit den 1970er Jahren ein. Vereinfacht ge‐<br />
sagt: Die 20er‐Regel kombiniert das KGV und die Inflation. In den letzten<br />
Jahren haben die Aktienmärkte gezeigt, dass sie tendenziell immer wieder<br />
zu einem Wert von 20 zurückkehren.<br />
</li>
<li><h3>Wer hat die 20er‐Regel entwickelt?</h3>
Ins Leben gerufen wurde die Regel von James E. "Jim" Moltz in den frühen<br />
1980er Jahren. Er ist Berater für Anlagestrategien und Portfolio‐Manager<br />
und startete seine Karriere 1957 bei der Investmentfirma C.J. Lawrence als<br />
Finanzanalyst. Dort war er zwischen 1973 und 1995 Präsident.<br />
</li>
<li><h3>Wie sieht die aktuelle Situation aus?</h3>
Der Verbraucherpreis‐Indes liegt derzeit bei 8,5 Prozent, dass Kurs‐Gewinn‐<br />
Verhältnis bei 20,1. Mit 28,6 [additiv: 8,5 + 20,1 = 28,6 ] ist man aktuell<br />
also noch ein Stück weit vom 20er‐Wert entfernt. Die Schlussfolgerung der<br />
Bank of America: Die Talsohle bei Aktien ist noch nicht erreicht.<br />
</li>
<li><h3>Was bedeutet das für die Zukunft?</h3>
Um den Wert von 20 und somit ein nahendes Ende des Bärenmarkts zu erreichen,<br />
müsste es für den Aktienmarkt in naher Zukunft also noch einmal etwas nach un‐<br />
ten gehen. Laut der Bank of America und vielen anderen Marktbeobachtern ist es<br />
nämlich unwahrscheinlich, dass die Inflationsrate in nächster Zeit deutlich zurück‐<br />
geht, außerdem seien die Gewinnschätzungen noch zu hoch. Behält die 20er‐Re‐<br />
gel also ein weiteres Mal recht, sollten sich Anleger auf eine Fortsetzung des Bä‐<br />
renmarktes gefasst machen. Der US‐Aktienmarkt gilt nach dieser Regel nach<br />
wie vor als überbewertet.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus Money 39/2022 (21.09.2022), S. 24</li>
</ul>
</html>
<html>
Nun gewinnen sie auch in Deutschland immer mehr an Bedeutung: Aktivistische<br />
Investoren werden von Unternehmen gefürchtet ‐ und Anleger müssen auf deren<br />
Engagements achten.<br />
<ul>
<li><h3>Was ist ein aktivistischer Investor?</h3>
Aktivistische Investoren besitzen einen bedeutenden Anteil an Aktien eines bör‐<br />
sennotierten Unternehmens. Sie erwerben diesen Anteil, um Veränderungen in<br />
der Geschäftspolitik zu bewirken. Aktivistische Investoren können vermögende<br />
Privatpersonen sein, häufig sind es aber Hedge‐Fonds.<br />
</li>
<li><h3>Was treibt aktivistische Investoren an?</h3>
Für gewöhnlich steckt dahinter eine Strategie namens “Aktionärsaktivismus“: Der<br />
Investor versucht, mit einem Kurswechsel den Aktienpreis des Unternehmens in<br />
die Höhe zu treiben und so den Wert der eigenen Minderheitsbeteiligung zu stei‐<br />
gern. Manche Fonds verfolgen daneben aber auch eigene Wertvorstellungen wie<br />
eine ökologische Unternehmensausrichtung.<br />
</li>
<li><h3>Was bedeuten aktivistische Investoren für Konzerne?</h3>
In Verbindung mit aktivistischen Investoren wir häufig von Angriffen gesprochen.<br />
Manche Investoren gehen aggressiv vor. Unternehmensvorstände fürchten dann<br />
einen kompletten Austausch der Chefetage oder einen radikalen Management‐<br />
wechsel. Ist ein aktivistischer Investor nur daran interessiert, eine Aktie hochzu‐<br />
treiben, um den eigenen Gewinn zu maximieren, handelt er vermutlich weder<br />
nachhaltig noch wohlwollend für das Unternehmen.<br />
<br />
Jedoch können aktivistische Investoren auch neue Ideen einbringen, alte Struk‐<br />
turen auflösen und ein Unternehmen mittels Kurswechsel voranbringen.<br />
</li>
<li><h3>Wie sieht der Angriff eines aktivistischen Investors aus?</h3>
Ein aktuelles Beispiel ist der Druck, den der Londoner Hedge-Fonds Bluebell<br />
Capital und der US-Fonds Inclusive Capital Partners auf den Pharma- und A‐<br />
grarkonzern Bayer ausüben. Seit zwei Jahren ringt Bayer mit seinen auslän‐<br />
dischen Anteilseignern ‐ die prangern die Milliardenkosten durch die Übernah‐<br />
me des US-Saatgutriesen Monsanto an. Beide Fonds fordern den Rücktritt<br />
von Vorstandschef Werner Baumann ‐ Bluebell Capital schreit sogar nach der<br />
Zerschlagung Bayers.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus Money 07/2023 (08.02.2023), S. 50</li>
</ul>
</html>
<html>
Derzeit läuft die Berichtssaison zum dritten Quartal. Bange Frage vieler<br />
Anleger: Werden die Unternehmen, deren Aktie ich halte, die Prognosen <br />
der Analysten übertreffen ‐ und idealerweise danach steigen?<br />
<ul>
<li><h3>Warum ist diese Berichtssaison so wichtig?</h3>
Da die US‐Notenbank Fed quasi angekündigt hat, ihre ultralockere Geldpolitik<br />
langsam zurückzufahren (“Tapering“, Entscheidung wohl am 3. November),<br />
müssen insbesondere die Gewinne der Unternehmen die Kurse unterfüttern.<br />
Schon jetzt gilt: “Die Gewinnrevisionen (noch oben, Anmerkung der Redaktion)<br />
waren die Hauptantriebskraft hinter dem weltweit starken Abschneiden der<br />
Aktien in diesem Jahr“, schrieb die französische Großbank BNP Paribas ver‐<br />
gangene Woche. “Wir erwarten, dass dieses Momentum bis in das Jahr 2022<br />
anhält, und sind weiter zuversichtlich für europäische Aktien.“<br />
</li>
<li><h3>Warum betreiben Konzerne Erwartungsmanagement?</h3>
Gewinnsteigerungen sind in Zeiten gerissener Lieferketten und anziehender<br />
Energiepreise besonders schwer zu schaffen. Wem es gelingt, Analysten vor<br />
der Vorlage der Quartalsbilanz mit verhaltenen Aussagen zu einer vorsichtigen<br />
Gewinnprognose zu bewegen, der kann diese Vorhersagen leichter übertreffen.<br />
</li>
<li><h3>Reicht es, die Gewinnprognose zu schlagen?</h3>
Das kommt darauf an, wie stark die Prognose übertroffen wird. Natürlich gilt:<br />
je deutlicher, desto besser. Noch bessser ist es, wenn die Unternehmen auch<br />
mehr umsetzen als von den Analysten prognostiziert, und das am besten or‐<br />
ganisch, aus eigener Kraft, nicht nur durch zugekaufte Töchter.<br />
</li>
<li><h3>Wie ist die US‐Berichtssaison angelaufen?</h3>
Von den ersten 117 Gesellschaften aus dem Leitindex S&P‐500, die Zahlen<br />
vorgelegt haben, haben fast 84 Prozent die Gewinnprognosen übertroffen<br />
(langjähriger Schnitt: nur 65,8 Prozent).<br />
</li>
<li><h3>Wie ist der Ausblick für die deutsche Berichtssaison?</h3>
M.M. Warburg hat 40 deutsche Unternehmen unter die Lupe genommen, die<br />
fast alle im November Zahlen vorlegen. Bei sechs Firmen glauben die Exper‐<br />
ten, dass die “Guidance“ in Gefahr ist. Bei vier Konzernen gilt es als wahr‐<br />
scheinlich, dass sie die Erwartungen toppen, bei 30 wird eine positive Gewinn‐<br />
überraschung zumindest für möglich gehalten.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus Money 45/2021 (03.11.2021), S.47</li>
</ul>
</html>
<html>
<ul>
<li>auch: β‐Faktor</li>
<li>findet in der Finanzwirtschaft, inbesondere in der Kapitalmarkttheorie (<em>CAPM</em>), Anwendung</li>
<li>beschreibt das systematische Risiko (auch <em>Marktrisiko</em> genannt)</li>
<li>statistische Kennzahl</li>
<li>Einfach ausgedrückt, ist der Betafaktor ein Gradmesser, der angibt, <br />
wie stark die Aktie im Vergleich zum Markt schwankt. </li>
<li>Formel:<code><pre>
<math><mi>β‐Faktor</mi><mo>=</mo>
<mfrac>
<mrow><mi>Kovarianz</mi><mo>(</mo><msub><mi>r</mi><mi>i</mi></msub><mo>;</mo><msub><mi>r</mi><mi>m</mi></msub><mo>)</mo></mrow>
<mrow><mi>Varianz</mi><mo>(</mo><msub><mi>r</mi><mi>m</mi></msub><mo>)</mo></mrow>
</mfrac>
</math>
</pre></code></li>
<li>Der Einsatz des Beta funktioniert wie folgt:
<ul>
<li><h4>Betafaktor < 0</h4>
Die Aktie besitzt keinen positiven Zusammenhang mit Dax & Co.<br />
Steigt der Index, fällt die Aktie ‐ und umgekehrt.</li>
<li><h4>Betafaktor = 1</h4>
Man geht davon aus. dass sich die Aktie wie die Benchmark oder<br />
der Vergleichsindex verhält.</li>
<li><h4>Betafaktor < 1</h4>
Die Aktie ist nicht so volatil wie die Benchmark. Das Risiko eines Port‐<br />
folios kann so gesenkt werden. Defensive Branchen wie Versorger be‐<br />
sitzen oft einen Betafaktor unter 1.</li>
<li><h4>Betafaktor > 1</h4>
Die Aktie ist schwankungsintensiver als die Benchmark. Das erhöht<br />
das Risiko. Dafür steigen auch die Chancen auf höhere Renditen.<br />
Deshalb nutzen viele Profis Werte mit einem hohen Beta, wenn sie<br />
von einer Hausse ausgehen.</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Betafaktor" target="_blank">Wikipedia :: Betafaktor</a></li>
<li>Focus Money, 4. August 2021, Ausgabe 32, S. 20</li>
</ul>
</html>
<html>
<table>
<tr>
<th>Feiertag</th><th>Börse</th><th>Jahr 2024</th>
</tr>
<tr>
<td>Neujahr</td><td>geschlossen</td><td>01.01.2024</td>
</tr>
<tr>
<td>Karfreitag</td><td>geschlossen</td><td>29.03.2024</td>
</tr>
<tr>
<td>Ostermontag</td><td>geschlossen</td><td>01.04.2024</td>
</tr>
<tr>
<td>Tag der Arbeit</td><td>geschlossen</td><td>01.05.2024</td>
</tr>
<tr>
<td>Christi Himmelfahrt</td><td>eingeschränkt</td><td>09.05.2024</td>
</tr>
<tr>
<td>Pfingstmontag</td><td>eingeschränkt</td><td>20.05.2024</td>
</tr>
<tr>
<td>Fronleichnam</td><td>eingeschränkt</td><td>30.05.2024</td>
</tr>
<tr>
<td>Tag der Deutschen Einheit</td><td>eingeschränkt</td><td>03.10.2024</td>
</tr>
<tr>
<td>Heiligabend</td><td>geschlossen</td><td>24.12.2024</td>
</tr>
<tr>
<td>1. Weihnachtstag</td><td>geschlossen</td><td>25.12.2024</td>
</tr>
<tr>
<td>2. Weihnachtstag</td><td>geschlossen</td><td>26.12.2024</td>
</tr>
<tr>
<td>Silvester</td><td>geschlossen</td><td>31.12.2024</td>
</tr>
</table>
<h3>Links:</h3>
<ul>
<li><a href="https://finanzradar.de/trading/boersenfeiertage/"
target="_blank" rel="noreferrer noopener">
Finanzradar :: Börsenfeiertage</a>
</li>
<li><a href="https://www.interactivebrokers.com/en/general/calendar/calendar.php"
target="_blank" rel="noreferrer noopener">
Interactive Brokers :: Börsenfeiertage</a>
</li></ul>
</html>
<html>
<table>
<tr><th> Feiertag </th><th> Datum </th><th> Jahr 2024 </th></tr>
<tr><td>New Year's Day (Neujahr) </td><td> 1. Januar </td><td align="center"> <b>01. Jan</b><br /> (<em>Ersatztermin: 02. Jan</em>)</td></tr>
<tr><td>Martin Luther King Day </td><td> dritter Montag im Januar </td><td align="center"> <b>15. Jan</b> </td></tr>
<tr><td>Washington's Birthday (Presidents' Day) </td><td> dritter Montag im Februar </td><td align="center"> <b>19. Feb</b> </td></tr>
<tr><td>Karfreitag (“<em>Good Day</em>“)</td><td> </td><td align="center"> <b>29. März</b> </td></tr>
<tr><td>Memorial Day (Gedenktag) </td><td> letzter Montag im Mai </td><td align="center"> <b>27. Mai</b> </td></tr>
<tr><td>Juneteenth National Independence Day</td><td> 19. Juni</td><td align="center"> <b>19. Juni</b></td></tr>
<tr><td>Independence Day<br /> (Unabhängigkeitstag) </td><td> 4. Juli </td><td align="center"> <b>04. Juli</b></td></tr>
<tr><td>Labor Day (Tag der Arbeit) </td><td> erster Montag im September </td><td align="center"> <b>02. Sept.</b> </td></tr>
<tr><td>Thanksgiving Day (Erntedankfest) </td><td> vierter Donnerstag im November </td><td align="center"> <b>28. Nov.</b> </td></tr>
<!--
<tr><td>Brückentag (verkürzter Handel) </td><td> </td><td align="center"> <b>26.Nov.</b></td></tr>
-->
<tr><td>Heilig Abend (verkürzter Handel) </td><td> </td><td align="center"> <b>24.Dez.</b></td></tr>
<tr><td>Christmas Day (Weihnachten) </td><td> 25. Dezember </td><td align="center"> <b>25. Dez.</b></td></tr>
<tr><td>Silvester </td><td> </td><td align="center"> <b>31.Dez.</b></td></tr>
</table>
<h3>Links:</h3>
<ul>
<li><a href="https://www.interactivebrokers.com/en/general/calendar/calendar.php"
target="_blank" rel="noreferrer noopener">
Interactive Brokers :: Börsenfeiertage</a>
</li>
<li><a href="https://de.wikipedia.org/wiki/Staatliche_Feiertage_in_den_Vereinigten_Staaten"
target="_blank" rel="noreferrer noopener">
Wikipedia :: Staatliche Feiertage in den USA</a>
</li>
<li><a href="https://www.timeanddate.de/feiertage/usa/2021?hol=25"
target="_blank" rel="noreferrer noopener">
TimeAndDate :: Feiertage USA - 2021</a>
</li>
<li><a href="https://finanzradar.de/trading/boersenfeiertage/"
target="_blank" rel="noreferrer noopener">
Finanzradar :: Börsenfeiertage</a>
</li>
</ul>
</html>
<html>
<ul>
<li>Gewinne kommen von alleine, kümmern muss man sich nur um die Verluste.</li>
<!--
<br />
<li></li>
<br />
<li></li>
<br />
<li></li>
<br />
<li></li>
-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.lynxbroker.de/boerse/trading/traden-lernen/technische-analyse-stoppkurse-richtig-setzen/"
target="_blank" rel="noreferrer noopener">Lynx :: Technische Analyse ‐ Stoppkurse richtig setzen</a></li>
<!--
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
-->
</ul>
</html>
<html>
<h2>Handelszeiten</h2>
<ul>
<li>Börsen sind an Handelstagen geöffnet.</li>
<li>Bei den Handelszeiten (oder Börsenzeiten) an allen Börsen wird unterschieden<br />
zwischen dem Parketthandel und dem Computerhandel (wie zum Beispiel Xetra).</li>
<li>Kleinere Börsen verfügen oftmals nur über den Parketthandel.</li>
</ul>
<table>
<tr><th> Börse </th><th> Parkethandel <em>(Handelszeiten)</em> </th></tr>
<tr><td> Frankfurt, Berlin, <br /> Düsseldorf und München </td><td> 08:00 Uhr bis 20 Uhr Ortszeit (bezogen auf Deutschland), </td></tr>
<tr><td> Stuttgart </td><td> 08:00 Uhr bis 22 Uhr Ortszeit (bezogen auf Deutschland)</td></tr>
<tr><td> Xetra </td><td> 9:00 Uhr bis 17:30 Uhr Ortszeit (bezogen auf Deutschland)</td></tr>
<br />
<tr><td> NASDAQ </td><td> 9:30 bis 16:00 New Yorker Ortszeit (EST) (entspricht 15:30 bis 22 Uhr (MEZ))</td></tr>
<tr><td> NYSE <br /><em>(New York Stock Exchange)</em></td><td> 9:30 bis 16 New Yorker Ortszeit (EST) (entspricht 15:30 bis 22:00 Uhr (MEZ) </td></tr>
<br />
<tr><td> Tokio </td><td> 9 Uhr bis 11:30 Uhr Ortszeit (entspricht 1 Uhr bis 3:30 Uhr MEZ)<br />12:30 Uhr bis 15 Uhr Ortszeit (entspricht 4:30 Uhr bis 7 Uhr MEZ). </td></tr>
</table>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/B%C3%B6rse#Handelszeiten" target="_blank"
rel="noreferrer noopener">Wikipedia :: Börse</a></li>
</ul>
</html>
<html>
Ein hierzulande weniger bekannter technischere Signalgeber misst die<br />
Stärke und Dynamik von Kursbewegungen ‐ und kann so den Beginn<br />
von Bullenmärkten anzeigen. Im Januar schlug er zum ersten Mal seit<br />
2020 an.
<ul>
<li><h3>So ist der Indikator konzipiert</h3>
Die Kennzahl, die sich ins Deutsche mit "Breitenschub‐Indikator" über‐<br />
setzen lässt, zeigt die Stärke bzw. Schwäche der Bewegung am Aktien‐<br />
markt an. Konkret setzt der Indikator die Anzahl der Dividendentitel ‐ <br />
zumeist an der New York Stock Exchange (NYSE) ‐, die in den vergan‐<br />
genen zehn Handelstagen gestiegen sind, ins Verhältnis zur Anzahl<br />
aller dort notierten Titel. Aus diesem Verhältnissen wird ein gleitender<br />
10‐Tage‐Durchschnittswert, angegeben in Prozent, gebildet. Entwickelt<br />
wurde der Breadth‐Thrust‐Indikator im Jahr 1973 vom US‐Analysten<br />
Martin Zweig. Er wird deshalb auch manchmal Zweig‐Breadth‐Thrust‐<br />
Indikator genannt.
</li>
<li><h3>Dann kann ein Bullenmarkt starten</h3>
Dahinter steht der Gedanke, dass ein kräftig ansteigender Indexwert<br />
die Umschichtung hoher Geldmittel in Aktien binnen kurzer Zeit an‐<br />
zeigt. So begann in der Vergangenheit in vielen Fällern ein neuer<br />
längerfristiger Aufwärtstrend, wenn der Wert von einem Niveau von<br />
unter 40 Prozent innerhalb einer 10‐Tages‐Periode auf Werte höher<br />
als 61,5 Prozent gestiegen ist. Konkret bedeutet das: Fast zwei Drit‐<br />
tel der Aktien müssen in den zehn vergangenen Handelstagen an der<br />
NYSE gestiegen sein und nur etwa ein Drittel darf gefallen sein. Zu<br />
finden ist der Indikator zum Beispiel für die NSYE sowie die US‐Tech‐<br />
nologie‐Börse Nasdaq, aber auch für andere Märkte, auf dem Finanz‐<br />
portal <a href="www.marketvolume.com" target="_blank" rel="noreferrer noopener">www.marketvolume.com</a>
</li>
<li><h3>Wie oft schlägt der Indikator an?</h3>
Eine Untersuchung für die Jahre von 1945 bis 2009 für die New Yor‐<br />
ker Börse ergab, dass der Indikator in diesem Zeitraum 14‐mal einen<br />
Bullenmarkt angezeigt hat. Im Schnitt folgten danach binnen elf Mona‐<br />
te Gewinne vo 24,6 Prozent. Nun hat der Indikator Mitte Januar wieder<br />
grünes Licht gegeben‐das erste Mal seit Juni 2020. Allerdings ist es<br />
gut möglich, dass aufgrund der in den vergangenen sechs Monaten<br />
bereits rasant gestiegenen Kurse die Anschlussgewinne diesmal ge‐<br />
ringer ausfallen.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus Money /2023 (23.02.2023), S. </li>
<li><a href="https://www.quantifiedstrategies.com/zweig-breath-thrust-indicator/"
target="_blank" rel="noreferrer noopener">
Quantified Strategies :: Zweig Breadth Thrust Indicator ‐ How To Measure Market Breadth</a>
</li>
<li><a href="https://www.barchart.com/story/news/9411550/here-is-how-to-identify-the-market-bottom-with-this-breadth-thrust-indicator"
target="_blank" rel="noreferrer noopener">
Barchart :: Here Is How To Identify The Market Bottom With This Breadth Thrust Indicator</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<h3>So funktionieren <em>die Spezialderivate</em></h3>
<h3>Wertvoller <em>Signalgeber</em></h3>
<h3>So ist die <em>aktuelle Situation</em></h3>
<h3>Links:</h3>
<ul>
<li><a href=""
target="_blank" rel="noreferrer noopener">
Focus–Money 26/2022, S. 17</a>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>Formel:</h3>
CRV
<math mathsize=1.5em>
<mo>=</mo>
<mfrac>
<mrow>
<mi>oberes Kursziel</mi><mo>−</mo><mi>Kaufkurs</mi>
</mrow>
<mrow>
<mi>Kaufkurs</mi><mo>−</mo> <mi>unteres Kursziel</mi>
</mrow>
</mfrac>
</math></li>
<br />
<li>Unter erfahrenen Börsianern gilt die Regel, dass man nur <br />
Geschäfte abschließen sollte, bei denen das CRV min‐<br />
destens 1,5 beträgt, ein extrem günstiger Wert wäre 3<br />
oder sogar höher.</li>
<br />
<li><h3>Vorgehen:</h3>
<ul>
<li><h4>mit Stopp‐Loss:</h4></li>
<li><h4>ohne Stopp‐Loss:</h4></li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus Money, 18/2022, S. 98</li>
</ul>
</html>
<html>
Das Prinzip ist: Gemeinsam sind wir stark. Denn was ein einzelner<br />
Privatanleger allein nicht stemmen könnte, wird in einer Gruppe von<br />
Mitstreitern möglich, etwa ein Investment in ein Start‐up. Doch die<br />
Risiken sind enorm.<br />
<ul>
<li><h3>Warum kam der Durchbruch der Digitalisierung?</h3>
Weil es um eine neue, digital organisierte Finanzierungsform<br />
ging. Prinzip: Über besondere Online‐Plattformen sammeln<br />
zahlreiche Investoren vergleichsweise kleine Beträge ein,<br />
um sich mit der gemeinsamen aufgebrachten größeren Geld‐<br />
summe an jungen Unternehmen oder auch an Immobilien<br />
zu beteiligen.<br />
</li>
<li><h3>Wie ist der Ablauf im Detail?</h3>
Zunächst schreiben Firmen auf speziellen Online‐Plattformen<br />
ein Crowd‐Investment aus. Zum Beispiel ein frisch gegründe‐<br />
tes Start‐up, das ein Anschubfinanzierung braucht. Die Schwel‐<br />
le für die Investition legt die Firma auf 350 000 Euro fest. Da‐<br />
nach steigen die Investoren in die digitale Finanzierungsrunde<br />
ein. Manche per Knopfdruck mit 500 Euro, andere vielleicht mit<br />
5000 Euro. Sobald die 350 000 Euro erreicht sind, wird die In‐<br />
vestition abgeschlossen.<br />
</li>
<li><h3>Wie wird das Risiko der Investoren entlohnt?</h3>
In der Regel erhalten die Mikroinvestoren im Gegenzuf für ihr<br />
Geld eine fest vereinbarte Verzinssung, die entsprechend dem<br />
höhren Risiko weit über dem sicheren Zins am Kapitalmarkt<br />
liegen muss. Da sich Anleger oft mit nachrangigen Darlehen<br />
beteiligen, gehen sie beim Scheitern des Projekts häufig leer<br />
aus. Krediforderungen von Banken werden nämlich vorrangig<br />
bedient. Manche Jungunternehmen geben aber auch soge‐<br />
nannte Genussrechte an die Crowd‐Investoren aus. Das heißt,<br />
dass sie am künftigen Gewinn des Unternehmens beteiligt<br />
werden.<br />
</li>
<li><h3>Was sind denn die angesprochenen großen Risiken?</h3>
Dem Anleger kann bei jedem Crowd‐Investment ein Totalverlust<br />
drohen, wenn z.B. das Unternehmen scheitert. Nach einer älteren<br />
Studie des Bundesfinanzministeriums betrug die Quote bei Crowd‐<br />
Investments gut 14 Prozent, in jüngerer Zeit wurden bis zu 30 Pro‐<br />
zent genannt. Verbraucherschützer monieren zudem immer wie‐<br />
der unzureichende Informationen für die Investoren und mangeln‐<br />
de Mitspracherechte bei der Mittelverwendung oder bei unter<br />
nehmerischen Entscheidungen.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus Money 10/2023 (01.03.2023), S. 27f </li>
</li>
</ul>
</html>
<html>
<ul>
<li>DAX :=: Deutscher Aktienindex</li>
<li>spiegelt den Kursverlauf der 40 größten börsennotierten<br />
deutschen Konzerne wider;</li>
<li>ist ein <b>Performance‐Index</b>, d.h. die ausgeschütteten Di‐<br />
videnden werden wieder angelegt und in die Berech‐<br />
nung mit einbezogen;</li>
<li></li>
</ul>
</html>
<html>
Ein Nobel‐Skiort in den Rocky Mointains ist jedes Jahr Ende August die<br />
Kulisse für das wichtigste geldpolitische Treffen der Welt. Von Noten‐<br />
bank‐Chef Jerome Powell werden Signale für die künftige Geldpolitik<br />
erwartet.<br />
<ul>
<li><h3>Was ist Jackson Hole?</h3></li>
Jackson Hole ist ein Ort in den Rocky Mountains im US‐Bundesstaat<br />
Wyoming. Direkte Nachbarn sind die Nationalparks Yellowstone und<br />
Grand Teton. Im Winter gilt Jackson Hole als eines der besten und<br />
anspruchsvollsten Skigebiete der USA ‐ “Champagne Powder“, fein‐<br />
ster Pulverschnee. Schon die Rockefellers kauften in den 30er‐Jahren<br />
Land in Jackson Hole und bauten ein berühmtes Luxus‐Hotel. Heute<br />
ist der Ort ein Promi‐Hotspot: Kim Kardashian, Harrison Ford oder der<br />
Ex‐Vizepräsident Dick Cheney besitzen dort Häuser.<br />
<li><h3>Warum ist Jackson Hole für die Finanzwelt so wichtig?</h3></li>
Ende August ändert sich das Publikum in dem Nobel‐Ort. Dieses Jahr<br />
von 25. bis 27. August. Dann findet dort auf Einladung der Federal Re‐<br />
serve Bank of Kansas ein geldpolitisches Symposium statt. Neben US‐<br />
Notenbank‐Chef Jerome Powell und den wichtigsten Vertretern der Fe‐<br />
deral Reserve kommen insgesamt gut 120 Vertreter aus Notenbanken,<br />
Universitäten, Banken und Journalisten zusammen, um Themen rund<br />
um Konjunktur, Zinsen und Währungen zu diskutieren. Das Treffen gibt<br />
es seit 1978, seit 1982 findet es in der Traumkulisse von Jackson Hole<br />
statt.<br />
<li><h3>Was wird dieses Jahr für Anleger entscheidend?</h3></li>
Der Höhepunkt des Treffens ist traditionell die Rede des amtierenden<br />
Fed‐Chefs. Nach den zwei Zinserhöhungen im Juni und Juli um jeweils<br />
75 Basispunkte hoffen Anleger auf Hinweise, wie es mit der Zinspolitik<br />
in den USA weitergeht. Tritt die Fed weiter kräftig auf die Bremse ‐ oder<br />
gibt es sogar eine Pause bei den Zinserhöhungen? Vom Treffen in Jack‐<br />
son Hole sendet die US‐Notenbank traditionell Signale, wie ihre länger‐<br />
fristige Strategie aussehen könnte ‐ deswegen ist das Treffen so wichtig.<br />
Dieses Jahr sind die Aussagen von Powell vielleicht sogar noch entschei‐<br />
dender als sonst. Die große Frage: Rutscht die US‐Konjunktur in eine<br />
schwere Rezession, wenn die Fed die Leitzinsen weiter in diesem Tem‐<br />
po erhöht? Antworten gibt es in den Rocky Mountains.<br />
</ul>
<h3>Links:</h3>
<ul>
<li>Focus-Money 34/2022, S. 19</li>
</ul>
</html>
<html>
<ul>
Ein Phänomen aus dem Lieferkettenmanagement könnte bewirken, <br />
dass nach Warenengpässen ein Überangebot an Produkten herrscht.<br />
Ein US‐Kult‐Investor hält deshalg sogar eine Kehrtwende in der Zins‐<br />
politik für möglich.
<li><h3>Darum geht es bei dieser Begebenheit</h3>
Der Effekt, der auf Englisch Bullwhip‐ oder Whiplash Effect heißt, stammt<br />
aus dem Warenmanagement (Englsich: Supply Chain Management) und<br />
besagt, dass Bestellungen von Endverkäufern bei ihren Lieferanten stärker<br />
schwanken als die Nachfrage der Kunden. Diese können sich so dynami‐<br />
sieren und im Verlauf der Logistikkette so aufschaukeln wie ein Peitschen‐<br />
hieb. Das hat zur Folge, dass es nach Produktengpässen regelmäßig zu<br />
überangeboten kommt ‐ vergleichbar mit dem bekannten “Schweinezyklus“<br />
in der Landwirtschaft.<br />
</li>
<li><h3>Kann der Effekt jetzt eintreten?</h3>
Der US‐Investor und Chef des Vermögensverwalters Scion Asset Manage‐<br />
ment, Michael Burry, der seit seinen erfolgreichen Wetten gegen den US‐Im‐<br />
mobilienmarkt um das Jahr 2008 “The Big Short“ genannt wird, glaubt das <br />
jedenfalls ‐ zumindest für sein Land. Die Läger der Einzelhändler füllen sic<br />
derzeit rasant, weil Konsumenten aufgrund der Inflation Kaufzurückhaltung<br />
übten und weil bestellte Waren nun vermehrt einträfen. Burry stellt sogar <br />
das Gedankenexperiment an, dass der Effekt diesmal so stark ausfallen<br />
könnte, dass Kunden, die Einkäufe zurückgeben wollen, diese ausnahms‐<br />
weise sogar behalten dürfen und trotzdem das Geld zurückbekommen.<br />
</li>
<li><h3>Und was hat das mit der US‐Zinspolitik zu tun?</h3>
Laut Burry hat die plötzliche Angebotsschwemme dämpfende Auswirkung‐<br />
en auf die derzeit sehr hohe Inflation, sie könnte im Extremfall sogar defla‐<br />
tionär wirken. Deshalb kann es sein, dass die US‐Notenbank Fed schon im<br />
späteren Jahresverlauf ‐ und damit viel früher als erwartet ‐ ihre Zinspolitik<br />
lockert. Tatsächlich machen jüngste Inflationsdaten aus den USA Hoffnung, <br />
dass dort der Höhepunkt bei der Teuerung erreicht sein könnte. Die soge‐<br />
nannte PCE‐Kerninflationsrate (ohne Energie und Nahrungsmittel), die das<br />
bevorzugte Inflationsmaß der US‐Notenbank Fed ist, sank im Mai bereits<br />
den dritten Monat in Folge. Gut für die Börse!<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus‐Money 29/2022, S. 21</li>
</ul>
</html>
<html>
<ul>
<li><b>die verzögerte Vorlage von Quartalszahlen</b><br />
<br />
Gefordert wird seitens der Börse, dass die Mitteilung binnen 75 Tagen<br />
nach Quartalsende vorgelegt wird. Das ist ein Basiskriterium für die In‐<br />
dexmitgliedschaft.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>DSW‐Newsletter, September 2022, S. 5</li>
</ul>
</html>
<html>
An den Strombörsen explodieren die Notierungen zu Lasten von Verbrauchern<br />
und Unternehmen. Schuld daran ist auch ein komplexes Preisfindungsmodell,<br />
das vielen Versorgungsunternehmen große Gewinne ermöglicht.<br />
<ul>
<li><h3>Das ist die fatale Lage am Energiemarkt</h3>
Vor allem weil Gas aufgrund des Ukraine‐Kriegs derzeit sehr knapp und teuer<br />
ist, steigen auch die Kosten für Strom. Denn Gas wird umfangreich für dessen<br />
Produktion genutzt und zudem ersetzen Firmen und Konsumenten teilweise<br />
Gas durch Strom. Für Versorger, die sich damit an den Börsen eindecken müs‐<br />
sen, um ihre Abnehmer zu bedienen, ist der Preis im Jahresvergleich um rund<br />
850 Prozent gestiegen. Klar, dass sie das großteils an ihre Kunden weiterge‐<br />
ben, um nicht selbst in Schieflage zu geraten. Die Kostenexplosion liegt auch<br />
daran, dass die Notierungen an den Strombörsen wie der European Energy Ex‐<br />
change (EEX) anders ermittelt werden als an Wertpapierbörsen (bei denen ein<br />
Gleichgewichtspreis aus Angebot und Nachfrage festgestellt wird.<br />
</li>
<li><h3>So funktioniert das System zu Strompreis‐Ermittlung</h3>
An den Strombörsen kommt die sogenannte Merit‐Order zum Einsatz. Dabei<br />
gehen bei steigendem Bedarf nacheinander Kraftwerke ans Netz und zwar in<br />
der Reihenfolge ihrer variablen Kosten (Grenzkosten). Je mehr Kraftwerke be‐<br />
nötigt werden, umso höher wird der Preis je Kilowattstunde. Das Problem:<br />
Das letzte ans Netz gegangene und somit aktuell teuerste Kraftwerk setzt den<br />
Preis. Dieser gilt dann für alle anderen Stromproduzenten ebenfalls ‐ auch<br />
wenn diese wesentlich günstiger produzieren. Dieser sogenannte Einheits‐<br />
preis führt zu überschießenden, unerwarteten Gewinnen ("Windfall Profits")<br />
bei günstigen Anbietern. Aktuell sind Gaskraftwerke besonders teuer, werden<br />
aber benötigt und setzen somit die (hohen) Preise.<br />
</li>
<li><h3>Kann man dagegen etwas tun?</h3>
Sowohl die deutsche Bundesregierung als auch die Europäische Komission<br />
haben das Problem erkannt und arbeiten an einer Lösung. So könnte zum<br />
Beispiel festgelegt werden, dass der Einheitspreis nicht mehr für alle Anbieter<br />
gilt. Das würde jedoch staatliche Preisfestsetzungen, also Markteingriffe, er‐<br />
fordern. Langfristig dürfte auch ein Ausbau der erneuerbaren Energien die<br />
teueren Produzenten verdrängen.<br />
</li>
</ul>
<h3>Links:</h3>
<u>
<li>Focus‐Money 36/2022, S. 25</li>
</ul>
</html>
<html>
<ul>
<li>Eine Faustformel des US‐Ökonomen John Taylor setzt die kurzfristigen<br />
Zinsen mi der Inflationsrate und der Konjunktur in Zusammenhang.<br />
Aktuell (Mai 2022) müssten die Leitsätze entsprechend der Teuerung<br />
massiv steigen.</li>
<h3>Funktionsweise Taylor‐Regel</h3>
<li>die Zinsen, besonders am “kurzen Ende“, also vor allem die Sätze, die <br />
die Notenbanken vorgeben, hängen direkt mit der Höhe der Teuerung und<br />
der wirtschaftlichen Lagen zusammen.<br />
<li>engl. “Taylor Rule“</li>
<li>Formel wurde vom US-Ökonom John Taylor 1993 entwickelt;</li>
<li>Formelaufbau:<br />
<b>Taylor‐Zins</b> = realer Gleichgewichtszins<br />
      + erwartete Inflationsrate <br />
      + gewichtete Produktionslücke <br />
      + gewichtete Inflationslücke</li>
<li>Gemeint ist damit, dass zum aktuellen Marktzins die Inflationserwartung,<br />
Lieferengpässe in der Industrie sowie die Differenz zwischen dem Noten‐<br />
bank‐Inflationsziel und der tatsächlichen derzeitigen Inflation (Inflations‐<br />
lücke) hinzugerechnet werden.</li>
<li>Damit lässt sich der Zinssatz bestimmen, den Notenbanken zur Bekäm‐<br />
pfung der Inflation wählen sollten.</li>
<li>Die sich andeutenden sehr hohen Werte entsprechen der derzeit immer<br />
wieder artikulierten Aussage von Ökonomen, dass irgendwann in jedem<br />
Inflationszyklus der Leitzins deutlich über der Teuerungsrate liegen muss,<br />
um die Geldentwertung wirksam einzudämmen.</li>
</ul>
<h3>Das signalisiert die Formel aktuell (2022)</h3>
Die Fondsgesellschaft DJE Kapital AG aus der Nähe von München hat<br />
errechnet, dass laut der Taylor‐Regel der Satz für den US‐Leitzins Fed<br />
Funds Rate, der auch für alle anderen Kapitalmärkte den Trend vorgibt,<br />
bei rund neun Prozent leigen müsste. Massiv mehr als die momentanen<br />
0,25 bis 0,5 Prozent.
<h3>Einschränkungen bei der Daumenregel</h3>
Ohne Kritik ist die Taylor Rule ‐ so wie die meisten volkswirtschaftlichen<br />
Theorienmodelle ‐ keineswegs. So wenden Wissenschaflter ein, dass <br />
sich die bestimmenden Größen wie die Produktionslücke nur schwer<br />
korrekt beziffern lassen und dass Zukunftsaussagen zur Inflation mit Un‐<br />
sicherheiten behaftet sind. Börsianer dürfen also hoffen, dass es mit den<br />
Zinsen nicht ganz so schlimm kommt, wie es die Regel derzeit (2022)<br />
voraussagt.
<h3>Links:</h3>
<ul>
<li>Focus‐Money 19/2022, pg. 52</li>
</ul>
</html>
<html>
<table>
<tr>
<th><b>Land</b>
</th>
<th><b>Börse</b>
</th>
<th><b>Leitindex</b>
</th>
</tr>
<tr>
<td>USA
</td>
<td>New York Stock Exchange
</td>
<td>Dow Jones Industrial Average
</td>
</tr>
<tr>
<td>USA
</td>
<td>Nasdaq
</td>
<td>Nasdaq Composite
</td>
</tr>
<tr>
<td>Deutschland
</td>
<td>Börse Frankfurt
</td>
<td>DAX
</td>
</tr>
<tr>
<td>Japan
</td>
<td>Börse Tokio
</td>
<td>Nikkei 225
</td>
</tr>
<tr>
<td>Großbritannien
</td>
<td>London Stock Exchange (LSE)
</td>
<td>Financial Times Stock / Exchange Index (FTSE)
</td>
</tr>
<tr>
<td>Frankreich
</td>
<td>Börse Paris
</td>
<td>Cotation Assistee en Continu (CAC 40)
</td>
</tr>
<tr>
<td>China
</td>
<td>Shanghai Stock Exchange
</td>
<td>Shanghai Composite Index
</td>
</tr>
<tr>
<td>Hongkong
</td>
<td>Hong Kong Stock Exchange
</td>
<td>Hang Seng
</td>
</tr>
<tr>
<td>Schweiz
</td>
<td>Swiss Exchange Zürich
</td>
<td>Swiss Market Index
</td>
</tr>
<tr>
<td>Österreich
</td>
<td>Börse Wien
</td>
<td>Austrian Traded Index (ATX)
</td>
</tr>
<tr>
<td>Brasilien
</td>
<td>Börse Sao Paolo
</td>
<td>Bovespa Index
</td>
</tr>
<tr>
<td>Indien
</td>
<td>Mumbai Stock Exchange
</td>
<td>Sensex 30
</td>
</tr>
<tr>
<td>Russland
</td>
<td>Börse Moskau
</td>
<td>Russian Traded Index (RTS)
</td>
</tr>
</table>
<h3>Links:</h3>
<ul>
<li><a href="https://wertpapier-helden.de/lernkapitel.php?sid=2#/browse/3//11//19/Funktionen_der_Boerse
target="_blank" rel="noreferrer noopener">
Wertpapier–Helden: Funktionen der Börse</a>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>Dieser Gedanke liegt dem Modell zugrunde</h3>
Mit der Methodik soll möglichst genau der derzeitige Unternehmenswert<br />
anhand erwarteter Zahlungsflüsse ermittelt werden (wenn man bei AGs die‐<br />
sen Firmenwert durch die Aktienanzahl dividiert, erhält man einen fairen<br />
Aktienkurs). Weil Einnahmen in ferner Zukunft weniger wertvoll sind als<br />
Mittel, die zeitnah fließen (schon wegen der zunehmenden Unsicherheit<br />
und der Teuerung), werden die Finanzströme umso stärker “abgezinst“,<br />
je weiter weg sie liegen. Das Verfahren wird häufig bei Wachstumsunter‐<br />
nehmen zur Wertermittlung angewendet, die jetzt noch keine Gewinne<br />
erzielen und Dividenden ausschütten. Bei etablierteren AGs ist es ge‐<br />
bräuchlich, die Dividenden oder Erträge abzuzinsen, um einen Firmen‐<br />
wert zu berechnen.<br />
</li>
<li><h3>So funktioniert die Ermittlung konkret</h3>
Für Mathe-Nerds hier die vereinfachte Formel:<br />
<code><pre>
<math>
<mi>DCF</mi>
<mo> = </mo>
<mfrac>
<mi>CF1</mi>
<msup>
<mrow>
<mo>(</mo><mi>1</mi><mo>+</mo><mi>r</mi><mo>)</mo>
</mrow>
<mn>1</mn>
</msup>
</mfrac>
<mo> + </mo>
<mfrac>
<mi>CF2</mi>
<msup>
<mrow>
<mo>(</mo><mi>1</mi><mo>+</mo><mi>r</mi><mo>)</mo>
</mrow>
<mn>2</mn>
</msup>
</mfrac>
<mo>+</mo><mo>(</mo><mn>…</mn><mo>)</mo>
</math></pre></code>
wobei DCF für die Summe der diskontierten Cashflows beziehungsweise<br />
den Unternehmens‐ oder Aktienwert steht. CF1 ist der Cashflow in der<br />
ersten Periode und r der Zinssatz, dann geht es mit CF2 usw. weiter.<br />
</li>
<li><h3>Das bewirken Inflation und Zinsen</h3>
Es ist naheliegend, dass Erträge, die zum Beispiel erst in mehreren Jahren fließen,<br />
in einem Umfeld hoher Inflation real weniger Kaufkraft entsprechen. Die dann stei‐<br />
genden Zinsen “entwerten“ die künftigen Cashflows (aber auch Dividenden oder<br />
Gewinne) direkt, weil in der Formel dadurch der Nenner größer wird und so den<br />
Wert der einzelnen Cashflows schmälert.<br />
</li>
<li><h3>Diese Probleme können das Ergebnis verfälschen</h3>
Wie bei fast allen Bewertungsschemata gibt es auch beim DCF‐Modell Kritik. In <br />
erster Linie bezieht sich diese darauf, dass über die Höhe der zukünftigen Cash‐<br />
flows zahlreiche Annahmen getroffen werden müssen, die sich als falsch erwei‐<br />
sen können. Auch können die Prognosen zu Inflationsraten und somit zu den<br />
Zinssätzen nicht eintreffen.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus‐Money, 30/2022 (20.07.2022), S. 35</li>
</ul>
</html>
<html>
<ul>
<li><a href="https://aktienfinder.net/dividenden-kalender" target="_blank" rel="noreferrer noopener">
Aktienfinder :: Dividendenkalender</a></li>
</ul>
</html>
<html>
<ul>
<li><details><summary>Iron Mountain</summary>
<table>
<tr><td> WKN </td><td> A14MS9 </td></tr>
<tr><td> ISIN </td><td> US46284V1017 </td></tr>
<tr><td> Symbol </td><td> IRM </td></tr>
</table>
</details></li>
</ul>
</html>
<html>
Bei Zinspapieren gibt es plötzlich wieder nennenswerte Erträge. Das<br />
bringt auch Anleihenkennzahlen zurück in den Fokus der Anleger. <br />
Hier ein sehr wichtiges Risikomaß aus dem wiedergekehrten Invest–<br />
ment–Segment.
<ul>
<li><h3>So funktionieren Zinspapiere</h3>
Mit Anleihen (englisch "Bonds") nehmen Staaten oder Firmen<br />
am Kapitalmarkt Geld auf. Dafür zahlen sie den Käufern regel–<br />
mäßig Zinsen, die fest oder variabel sein können - dann spricht<br />
man von "Floatern" (Ausnahme: Nullkuponanleihen). Am Ende<br />
der festgelegten Laufzeit werden die Papiere zu 100 Prozet zu–<br />
rückgezahlt (außer der Emittent geht pleite). Weil während der<br />
Laufzeit stetig Erträge fließen, ist das eingesetzte Kapital der<br />
Anleger nicht bis zur Endfälligkeit gebunden. Die Duration be–<br />
zeichnet der Zeitraum, bis das in die Anleihe investierte Kapi–<br />
tal wieder an den Anleger zurückgeflossen ist und somit kein<br />
Risiko mehr besteht. Das Konzept wurde 1938 vom kanadi–<br />
schen Ökonomen Frederick R. Macaulay entwickelt.
</li>
<li><h3>Wann der Einsatz wieder hereinkommt</h3>
Grundsätzlich gilt: Je kürzer die Laufzeit einer Anleihe und je<br />
höher, je früher und je häufiger die Zinszahlungen erfolgen,<br />
desto niedriger fällt die Duration aus - was positiv ist (die For–<br />
mel lautet:<br />
<br />
<math>
<mi>Duration</mi>
<mo>=</mo>
<mfrac>
<mi>Summe der gewichteten Barwerte</mi>
<mi>Kurs der Anleihe</mi>
</mfrac>
</math><br />
<br />
Steigt der Marktzins (wie derzeit), hat ds zwei Auswirkungen: <br />
<br />
<ol>
<li>Der Kurs von Anleihen sinkt, da die Kuponzahlungen nun<br />
weniger attraktiv sind. Ein krasses Negativbeispiel: Eine <br />
100 Jahre laufende österreichische Staatsanleihe, die<br />
eine extrem hohe Duration aufweist, ist im Zuge der jüngs–<br />
ten Zinssteigerungen von 140 Prozen auf 40 (!) Prozet ab–<br />
gestürzt. Das nennt man den Marktwerteffekt.
</li>
<br />
<li>Der zweite (positive) Effekt ist der Wiederanlageeffekt, <br />
durch den die Verzinsung der ausgeschütteten Kupon–<br />
zahlungen zum neuen Marktzis steigt.
</li>
</ol><br />
<br />
Bei sinkenden Renditen gilt das Gleiche umgekehrt.
</li>
<li><h3>Wo Anleger die Duration finden</h3>
Beispielsweise auf den Finanzportalen <a href="https://www.onvista.de" target="_blank" rel="noreferrer noopener">www.onvista.de</a> und<br />
<a href="https://www.finanzen.net" target="_blank" rel="noreferrer noopener">www.finanzen.net</a> wird zu allen Anleihen die Duration ange–<br />
geben. Bei Renten- oder Mischfonds, aber auch bei Ver–<br />
sicherungsprodukten wird oft die durchschnittliche Duration<br />
der Anleihen im Portfolio genannt. Dies ermöglicht deren<br />
Besitzern auf einen Blick eine Einschätzung der Kursrisiken.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href=""
target="_blank" rel="noreferrer noopener">
Focus–Money 47/2022, S. 49
</a>
</li>
</ul>
</html>
<html>
<meta "Dynamisches KGV" "Rule of 40" "Shiller-KGV" />
Das klassische Kurs‐Gewinn‐Verhältnis (KGV) gilt als die am<br />
meisten beachtete Kennzahl der Aktienbewertung. Da es so<br />
einfach ist, hat es seine Grenzen ‐ das sollen Weiterentwik‐<br />
klungen ändern.<br />
<ul>
<li><h3>Was ist das Shiller‐KGV?</h3>
Viele Experten ziehen deshalb modifizierte Kennzahlen zurate. Beispielsweise<br />
das Shiller‐KGV, benannt nach dem Nobelpreisträger Robert J. Shiller. Dieses<br />
KGV basiert nicht auf dem aktuellen Unternehmensgewinn, sondern auf dem<br />
Durchschnitt der vergangenen zehn Jahre. Der Gewinn wird so um Ausreißer<br />
nach oben oder unten bereinigt. Das Shiller‐KGV zeigt derzeit eher höhere Be‐ <br />
wertungen an. Doch Shiller selbst räumt ein, dass es bei der Geldanlage immer<br />
auch um die Alternativen geht ‐ vor allem um Zinspapiere.
</li>
<li><h3>Was versteht man unter dem dynamischen KGV?</h3>
Einen anderen Ansatz verfolgt das dynamische KGV. Dynamisch, weil damit<br />
das statische KGV mit dem geschätzten Gewinnwachstum vom nächsten zum<br />
übernächsten Geschäftsjahr in Relation gesetzt wird. So lässt sich abklopfen,<br />
ob ein hohes KGV durch eine attraktive Gewinnentwicklung gedeckt ist. In <br />
manchen Fällen tun es aber die bloßen Abwandlungen des KGV nicht mehr.<br />
Etwa bei den High-Growth-Papieren. Dahinter verbergen sich vor allem Unter‐<br />
nehmen, die hohe Wachstumssprünge zumindest einplanen - etwa Tech-Fir‐<br />
men mit einem neuen Ansatz. Dieser kostet am Anfang Geld, kann dem Unter‐<br />
nehmen aber mittelfristig einen erheblichen Vorteil gegenüber der Konkurrenz<br />
verschaffen, der sich auch in den Bilanzen positiv niederschlagen dürfte. Ein<br />
Beispiel: Software zu entwickeln, ist zunächst teuer. Es geht darum, eine Idee<br />
in die Tat umzusetzen, sie zu programmieren und zu testen, immer wieder.<br />
Aber wenn der Verkauf erst einmal läuft, stehen kaum weitere Kosten an. Und<br />
jeder Verkauf steigert den Gewinn.<br />
<br />
Nun mag das KGV solcher Unternehmen hoch sein. Doch angesichts ihrer<br />
Wachstumschancen ist das nicht ausschlaggebend, weshalb Tech-Investo‐<br />
ren wie der Digital Leaders Fund stattdessen zusätzlich Kennzahlen wie die<br />
"Rule of 40" zur Bewertung nutzen. Dieser Regel zufolge müssen die Wachst‐<br />
umsrate des Umsatzes und die Gewinnmarge zusammen mindestens 40 Pro‐<br />
zent ergeben.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus‐Money 47/2021, S. 59</li>
<li><a href="https://aktien.guide/blog/rule-of-40-einfach-erklaert"
target="_blank" rel="noreferrer noopener">
Aktien.Guide :: Rule of 40 - Einfach erklärt</a>
</li>
<li><a href="https://growthequityinterviewguide.com/rule-of-40"
target="_blank" rel="noreferrer noopener">
Growth equity :: Rule of 40</a>
</li>
<li><a href="https://strategyinvest.de/ranglisten/rule-of-40/"
target="_blank" rel="noreferrer noopener">
Strategy invest :: Rule of 40 - Rangliste </a>
</li>
</ul>
</html>
<html>
<ul>
<li><details><summary><b>Invesco L&G‐Hydrogen Economy</b></summary><br />
<ul>
<li>A2QMAL / IE00BMYDM794</li>
<li>physisch nachgebildet</li>
<li>thesaurierend</li>
<li>Kurs: 4,715 Euro [05.01.2023]</li>
</ul>
</details>
</li>
<br />
<li><details><summary><b>VanEck Hydrogen Economy</b></summary><br />
<ul>
<li>A2QMWR / IE00BMDH1538</li>
<li>physisch</li>
<li>thesaurierend</li>
<li>Kurs: 10,014 Euro [05.01.2023])</li>
</ul>
</details>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus Money 02/2023 (04.01.2023), S. 42</li>
</ul>
</html>
<html>
Im Kampf gegen den Klimawandel ist die Reduzierung von Emissionen<br />
unerlässlich. Das zentrale europäische Klimaschutzinstrument ist dabei<br />
der EU‐Emissionshandel. Er schafft Anreize, weniger <math mathsize="1.15em"><msub><mi>CO</mi><mn>2</mn></msub></math> auszustoßen.
<h3>Die Grundlage des Emissionshandels: <math mathsize="1.15em"><msub><mi>CO</mi><mn>2</mn></msub></math>‐Zertifikate</h3>
Wer in der EU <math mathsize="1.15em"><msub><mi>CO</mi><mn>2</mn></msub></math> in die Luft bläst, braucht dafür seit 2005 eine Geneh‐<br />
migung ‐ ein sogenanntes <math mathsize="1.15em"><msub><mi>CO</mi><mn>2</mn></msub></math>‐Zertifikat. Das berechtigt dazu, innerhalb
<br />
eines definierten Zeitraums eine Tonne Kohlendioxid zu produzieren.Am <br />
Ende dieser Periode muss der Konzern Zertifikate in Höhe seiner Emis‐<br />
sionen verweisen, ansonsten folgen Strafzahlungen. Bislang betreffen<br />
die Regelungen insbesondere Energie‐ und Industrieanlagen sowie dem<br />
Flugverkehr. Diese Branchen verursachen rund 50 Prozent der europä‐<br />
ischen <math mathsize="1.15em"><msub><mi>CO</mi><mn>2</mn></msub></math>‐Emissionen, die Zahl der emissionshandelspflichtigen An‐<br />
lagen nimmt kontinuierlich zu.
<h3>Anreize für Unternehmen, Emissionen einzusparen</h3>
Der EU-Emissionshandel (EU-ETS) basiert auf dem “Cap & Trade“ ‐<br />
Prinzip. Heißt: Die Mitgliedsstaaten legen eine Obergrenze ihrer Emis-<br />
sionen fest (Cap). Die entsprechende Menge an Zertifiakten bringen<br />
sie auf den Markt, indem sie sie Verursachern von Emissionen kosten‐<br />
los zuteilen oder versteigern. Überschüssige Emissionsberechtigungen<br />
können frei gehandelt werden (Trade) ‐ sowohl zwischen Staaten als<br />
auch zwischen Unternehmen. Angebot und Nachfrrage bestimmen<br />
damit den Preis. Während dieser jahrelang um die fünf Euro je Tonne<br />
<math mathsize="1.15em"><msub><mi>CO</mi><mn>2</mn></msub></math> dümpelte, zog er seit 2018 deutlich an und liegt aktuell bei 84<br />
Euro je Tonne. Der Grund: Die Zahl der zur Verfügung stehenden Zertifi‐<br />
kate sinkt von Jahr zu Jahr. Zudem nimmt die kostenlose Vergabe auf‐<br />
grund der gestrafften Klimaziele ab. Für Unternehmen werden Emissio‐<br />
nen also immer teuerer ‐ der Anzeiz, <math mathsize="1.15em"><msub><mi>CO</mi><mn>2</mn></msub></math> einzusparen, wächst.
<h3>Kritik an der Praxis</h3>
Der Emissionshandel soll Klimaschutz und ökonomische Ziele mitein‐<br />
ander vereinbaren. Kritiker wie die Umweltschutzorgainsation WWF<br />
bemängeln jedoch, dass die Gesamtmenge an erlaubten Emissionen<br />
in der EU zu hoch kalkuliert sei. Hinzu kommt, dass für die Volkswirt‐<br />
schaft wichtige Industriesektoren nach wie vor zu viele kostenlose Zer‐<br />
tifikate erhielten, damit sie nicht in andere Länder abwandern. Doch<br />
gerade in diesen Branchen bestehe ein großer Handlungsbedarf.<br />
<h3>Links:</h3>
<ul>
<li>Focus Money 28/2022, S. 23</li>
</ul>
</html>
<html>
<ul>
<li>Begriff, den ich bei der EZB (das erste Mal) gehört habe;
</li>
<li>technischer Begriff;
</li>
<li>damit wird die “<em>silence period</em>“ (“Schweigezeitraum“) bezeichnet, <br />
in der Eingeweihte keine Äusserungen oder Aktivitäten, die mit <br />
der Thematik zu tun haben, tun dürfen;
</li>
<li>i.d.R. ist das der Zeitraum (eine Woche?) vor den öffentlichen <br />
Stellungnahmen der EZB zur wirtschaftlichen Lage (z.B. ob sie,<br />
die EZB, den Zins stabil hält oder nicht);
</li>
</ul>
</html>
<html>
Corona hat es Anlegern eindrücklich vor Augen geführt: Der Erfolg <br />
oder Misserfolg von klinischen Studien sorgt bei Pharma‐ und Bio‐<br />
tech‐Unternehmen immer wieder für große Kursbewegungen. Was<br />
die Ergebnisse aussagen.
<ul>
<li><h3>Wann ist ein Medikament markreif?</h3>
</li>
<li><h3>Was passiert in Phase 1?</h3>
</li>
<li><h3>Warum ist Phase 2 so wichtig?</h3>
</li>
<li><h3>Wozu dient Phase 3?</h3>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus Money 03/2023 (11.01.2023), S. 17</li>
</ul>
</html>
<html>
Der Ex‐Tag ist für Aktionäre Fluch und Segen zugleich. Wer an dem<br />
Tag die Aktie hält, hat Anspruch auf die Dividende. Andererseits wird<br />
der Kurs um den Ausschüttugsbetrag gekürzt.
<ul>
<li><h3>Was ist der Ex‐Tag?</h3></li>
Der Ex‐Tag ist in der Regel der erste Handelstag nach der Haupt‐<br />
versammlung, auf der die Aktionäre die Höhe der Dividende fest‐<br />
gelegt haben.
<li><h3>Was passiert am Ex‐Tag?</h3></li>
Weil sich mit Auszahlung der Dividende an die Anteilseigner der<br />
Wert des Unternehmens entsprechend verringert, wird am Ex‐<br />
Tag der Dividendenbetrag (je Anteilsschein) aus dem Aktienkurs<br />
herausgerechnet. Der Wert der Aktie sinkt also entsprechend.
<li><h3>Was heißdas für Dividendenjäger?</h3></li>
Anleger, die die Dividende kassieren wollen, müssen die Aktie <br />
spätestens am Tag der Hauptversammlung im Bestand haben. <br />
Tatsächlich Anspruch auf Auszahlung der Dividende besteht <br />
aber nur dann, wenn das Papier mindestesns bis zum Ex‐Tag<br />
gehalten wird. Mit anderen Worten: Wer die Aktie am Tag der<br />
Hauptversammlung besitzt und verkauft (um den Dividenden‐<br />
abschlag am Ex‐Tag zu vermeiden), geht leer aus.<br />
<li><h3>Was lohnt mehr ‐ der Kauf vor oder nach dem Ex‐Tag?</h3></li>
Die Ausschüttung kann sich weniger lohnen als gedacht.<br />
Denn am Nettovermögen des Aktionärs ändert sich wegen<br />
der entsprechend niedrigeren Aktiennotierung am Ex‐Tag<br />
erst mal nichts. Wichtig: Auf die Ausschüttung fallen Kapital‐<br />
ertragssteuer und Solidaritätszuschlag an ‐ bei Auslandsaktien<br />
noch eine Quellensteuer. Der Nachteil ist daher umso größer,<br />
je höher dei Quellensteuer und der Aufwand des Rückerstat‐<br />
tungsverfahrens ist. Heißt: Ein Kauf vor dem Ex‐Tag lohnt sich<br />
daher vor allem, wen die Steuerbelastung nicht so hoch aus‐<br />
fällt, da der Kurs dann niedriger und das Aufwärtspotenzial<br />
höher ist. Grund: Für gewöhnlich wird der Dividendenabschlag<br />
in einem positiven Marktumfeld zügig aufgeholt.<br />
<li><h3>Wo gibt es die Termine rund um den Ex‐Tag?</h3></li>
Die genauen Termine zu Hauptversammlung, Ausschüttung<br />
und Ex‐Tag finden sich auf der Web‐Seite des Unternehmens.
</ul>
<h3>Links:</h3>
<ul>
<li>Focus Money 05/2023, S. 23</li>
</ul>
</html>
<html>
Exponentiell gleitende Durchschnitte gibt es in der Charttechnik fast schon<br />
so lange wie die technische Analyse selbst. Die Darstellungsform ist gut ge‐<br />
eignet, um kurzfristige Trends besser zu erkennen.<br />
<ul>
<li><h3>Was ist ein exponentiell gleitender Durchschnitt?</h3>
Gleitende Durchschnitte geben für eine Aktie oder einen Index den Mittelwert<br />
für einen bestimmten Zeitraum. Typische Beispiele sind die 38- oder die 200-<br />
Tage-Line. Sie errechnen sich aus den durchschnittlichen Kursen der zurück‐<br />
liegenden 38 beziehungsweise 200 Handelstage. Kommt ein neuer Handels‐<br />
tag dazu, fliegt der zeitlich am weitesten zurückliegende Wert aus der Berech‐<br />
nung. Außerdem sind bei einem herkömmlichen gleitenden Durchschnitt alle<br />
Kurse beziehungsweise Handelstage gleich gewichtet. Bei einem exponentiell<br />
gleitenden Durchschnitt sind dagegen die jüngeren Kurse höher gewichtet als<br />
die älteren. Dadurch spiegelt er aktuelle Kurstrends schneller und deutlicher<br />
wider als einfache gleitende Durchschnitte. Der erste Artikel über das Konzept<br />
stammt von Professor Charles C. Holt aus dem Jahr 1957.<br />
</li>
<li><h3>Wie erfolgt die Berechnung?</h3>
Der Indikator basiert auf komplexen mathematischen Modellen und ist vergleichs‐<br />
weise schwierig zu berechnen. Das stellt aber insofern kein größeres Problem<br />
dar, als sich die entsprechenden Werte auf Trading-Plattformen oder Finanz‐<br />
seiten im Internet finden lassen ‐ etwa bei <a href="https://www.onvista.de" target="_blank" rel="noreferrer noopener">www.onvista.de</a>. Hier lässt sich der<br />
exponentiell gleitende Durchschnitt als einer von vielen aus einer entsprechen‐<br />
den Liste auswählen. Anleger können den Indikator für 38, 90 oder 200 Tage<br />
abrufen.<br />
</li>
<li><h3>Was haben die Anleger von diesem Durchschnitt?</h3>
Erst einmal handelt es sich um einen vergleichsweise zuverlässigen Trend‐<br />
indikator. Notiert der exponentiell gleitende Durchschnitt über einem "normal"<br />
gleitenden Durchschnitt, der sich in einer Aufwärtsbewegung befindet, deutet<br />
dies auf weiter steigende Kurse hin. Bewegt er sich draunter, sind tendenziell<br />
fallende Kurse zu erwarten. Allerdings sendet der Indikator aufgrund seiner<br />
höheren Sensibilität für jüngere Preisentwicklungen immer wieder auch Fehl‐<br />
signale. Anleger sollten ihn daher möglichst immer in Kombination mit an‐<br />
deren Indikatoren verwenden.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus Money 28/2021 (07.07.2021), S. 49</li>
</ul>
</html>
<html>
<ul>
<li><a href="https://www.cmegroup.com/markets/interest-rates/cme-fedwatch-tool.html"
target="_blank" rel="noreferrrer noopener">
CME :: Fed Watch Tool</a>
</li>
<br />
<li>Ein kostenfreies EDV‐Programm der weltweit wichtigsten Terminbörse CME<br />
berechnet anhand von Preisen für Zinskontrakte die Wahrscheinlichkeit zu‐<br />
künftiger Leitzinsschritte der US‐Notenbank Fed ‐ gut, das zu kennen.<br />
</li>
<li><h3> Wissen, was die Notenbank tut</h3>
Zweifelsohne ist die US‐amerikanische Fed (Federal Reserve System) die<br />
mächtigste Zentralbank der Wel, hinter der die Leitwährung Dollar und die<br />
größte Volkswirtschaft der Erde stehen. Klar, dass deren Entscheidungen<br />
das Börsengeschehen auch in anderen Ländern maßgeblich beeinflussen - <br />
und Investoren sich möglichst gut Prognosen für deren zukünftige Politik<br />
wünschen. Dafür stellt die global umsatzstärkste Terminbörse Chicago<br />
Mercantile Exchange (CME Group) ein Gratisprogramm zur Berechnung<br />
der wahrscheinlichen Höhe der kommenden Zinsschritte der Fed zur Ver‐<br />
fügung.<br />
</li>
<li><h3> Wie das Programm funktioniert</h3>
An der CME werden umfangreich Terminmarktprodukte, so genannte Futures,<br />
auch auf kurzlaufende zuküntige Zinssätze gehandelt. Aus den Preisen, die<br />
die Tausenden von Profis bereit sind, für die Zins-Futures zu zahlen, lässt sich<br />
ermitteln, wie die anstehende Zinspolitik der Fed aussehen könnte. Da die Pro‐<br />
fianleger überdurchschnittlich gut informiert sind und echtes Geld setzen, sind<br />
die Prognosen sehr aussagekräfig.<br />
</li>
<li><h3> Das ist die aktuelle Voraussage (Stand: 07/2022)</h3>
Schon bisher hat die Fed die Leitzinsen (Fed Funds Target Rate) auf eine<br />
Spanne von 1,50 bis 1,75 Prozent erhöht. Laut Tool erwarten:<br />
<ul>
<li>86,2 Prozent der Investoren bei der nächsten Fed-Sitzung<br />
am 27. Juli eine weitere Straffung auf 2,25 bis 2,50 Prozent;<br />
</li>
<li>13,8 Prozent gehen von 2,00 bis 2,25 Prozent aus. <br />
<li>Für das Jahresende 2022 erwarten die Profis mehrheit‐<br />
lich 3,5 Prozent.<br />
</li>
</ul>
</li>
<li><h3> Wo Anleger das Werkzeug finden</h3>
Die CME Group ist unter Investoren bekannt für sehr gute Lehrvideos<br />
auf ihrer Hompage, sogenannte Tutorials. In Bewegtbildern, aber auch<br />
klassisch als Text finden sich dort Anleitungen zur Nutzung des Pro‐<br />
gramms (zu finden unter: <a href="www.cmegroup.com/education" target="_blank" rel="noreferrer noopener">www.cmegroup.com/education</a>). Auf der Inter‐<br />
net-Seite investing.com sind die Resultate besonders anschaulich dar‐<br />
gestellt (konkret unter <a href="https://de.investing.com/central‐banks/fed‐rate‐monitor" target="_blank" rel="noreferrer noopener">https://de.investing.com/central‐banks/fed‐rate‐monitor</a>).<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus Money 27/2022, pg. 25</li>
</ul
</html>
<html>
Gibt es eine viel beachtete volkswirtschaftliche Zahl, deren Entwicklung von<br />
einem einzigen Unternehmen maßgeblich beeinflusst wird? Die gibt es ‐ die<br />
Auftragseingänge zu langlebigen Gebrauchsgütern in den USA.<br />
<ul>
<li><h3>Was umfassen die langlebigen Gebrauchsgüter?</h3>
Das sind zunächst einmal nach einer Definition der US-Behörde Bureau of<br />
Economic Analysis anfassbare Wirtschaftgüter mit einer Nutzungszeit von<br />
mindestens drei Jahren, zum Beispiel Autos, Haushaltsgeräte oder Möbel.<br />
Die anderen Kategorien neben diesen “durable goods“ sind “nondurable<br />
goods“ (zum Beispiel Essen und Getränke oder Schuhe) und “services“,<br />
also Dienestleistungen (Haarschnitt, Gartengestaltung, Autoreperatur). Die<br />
langlebigen Wirtschaftsgüter gelten als der schwankungsfreudigste Teilbe‐<br />
reich. In unsicheren Wirtschaftlagen zögern Verbraucher zum Beispiel den<br />
Kauf teurer Anschaffungen wie eines Autos einfach länger hinaus.<br />
</li>
<li><h3>Warum kann ein Konzern hier viel Einfluss haben?</h3>
Hier kommt der amerikanische Flugzeubauer Boeing ins Spiel, der ge‐<br />
meinsam mit dem europäischen Flugzeughersteller Airbus ein weltwei‐<br />
tes Duopol bei Lang‐ und Mittelstreckenjets innnehat; beide Konzerne<br />
dominieren überdies auch bei den Passagierflugzeugen für kürzere<br />
Strecken. Aufträge für die teuren zivilen Jets können schnell im Multi‐<br />
milliardenbereich landen und somit monatiche Zahlen bei den lang‐<br />
lebigen Gebrauchsgütern verzerren. Zum Beispiel fielen in den USA<br />
die Aufträge für diese Produktkategorie im Januar 2023 gegenüber<br />
Dezember 2022 um 4,5 Prozent ‐ weil sich die Flugzeugaufträge nach<br />
einem besonders starken Dezember wieder normalisiert haben, wie<br />
die Bank Barclays vergangene Woche kommentierte. Bestellungen<br />
für zivile Flugzeuge sind sehr volatil und können damit kurzfristig den<br />
Gesamtwert neuer Aufträge deutlich in die Höhe treiben.<br />
</li>
<li><h3>Wie wird dieser Sonderfaktor berücksichtigt?</h3>
Der Auftragseingang langlebiger Gebrauchsgüter in der sogennanten<br />
Kernrate beschreibt dann nur noch die Nachfrage nach den langlebi‐<br />
gen Gütern ohne Transportmittel. Um Trends richtig erkennen zu kön‐<br />
nen, werden Bestellungen wie die von Boeing‐Zivilflugzeugen bei der<br />
Kernrate ausgekammert, zusätzlich auch Automobile.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus Money 11/2023 (08.03.2023), S. 58</li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://digitalesfamilyoffice.de/glossar-verstaendlich-erklaert/fms-most-crowded-trade/"
target="_blank" rel="noreferrer noopener">
Digitales Family Office ‐ Breidenbach von Schlieffen & Co. :: FMS most crowded trade </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
Sparer und Anleger müssen auf sämtliche Kapitalerträge wie Zinsen, Dividenden<br />
und Veräußerungsgewinne Steuern zahlen. Per Freistellungsauftrag können sie<br />
einen bestimmten Anteil der Erträge steuerfrei kassieren.<br />
<ul>
<li><h3>Was ist ein Freistellungsauftrag?</h3>
Mit einem Freistellungsauftrag können Anleger einen Teil ihrer Erträge steuerfrei<br />
stellen. Den Auftrag müssen Bankkunden bei ihrem Krediinstitut einreichen. Die<br />
Höhe der Freistellung richtet sich nach dem Sparerpauschbetrag ‐ 801 Euro pro<br />
Person, für Ehegatten also 1602 Euro. Bis zu dieser Höhe fällt auf Kapitalerträge<br />
dann keine Abgeltungsteuer an. Die Bundesregierung plant, den Sparerpauschbe‐<br />
trag ab 2023 auf 1000 Euro bzw. 2000 Euro für Ehepaare zu erhöhen.<br />
</li>
<li><h3>Darf der Freistellungsauftrag verteilt werden?</h3>
Wer Kunde bei mehreren Banken oder depotführenden Fondsgesellschaften ist,<br />
darf den Freistellungsauftrag auch aufteilen. Anleger können beliebig viele Frei‐<br />
stellungsaufträge erteilen, der Sparerpauschbetrag darf in Summe aber nicht <br />
überschritten werden. Für neu eingereichte Freistellungsaufträge müssen Sparer<br />
die Steueridentifikationsnummer angeben. Ohne ID-Nr. gestellte Freistellungs‐<br />
aufträge sind seit 1. Januar 2016 ungültig. Folge: Die Bank führt die Abgeltung‐<br />
steuer automatisch an den Fiskus ab.<br />
</li>
<li><h3>Wie kann der Freistellungsauftrag beantragt werden?</h3>
Der Freistellungsauftrag ist bei der jeweiligen inländischen Bank einzureichen.<br />
Der Auftrag ist entweder unbefristet oder bis auf Widerruf oder Änderung durch<br />
den Anleger gültig. Während des Jahres ist eine Änderung beliebig oft möglich.<br />
Der Freistellungsauftrag (amtliches Formular) kann per Fax oder auch via Inter‐<br />
net (z.B. PIN/TAN‐Verfahren) erteilt werden. Die meisten Banken bieten diesen<br />
Service an. Ehegatten können getrennte oder gemeinsame Aufträge erteilen.<br />
Banken dürfen für die Verwaltung der Freistellungsaufträge keine Gebühren er‐<br />
heben. Die Banken melden die Daten aus den Freistellungsaufträgen an das<br />
Bundeszentralamt für Steuern. Auf diese Daten können die Finaznämter zug‐<br />
reifen. Wichtig: Wird das Konto oder Depot aufgelöst, müssen Anleger der Bank<br />
einen separaten Auftrag zur Löschung des Freistellungsauftrages erteilen - <br />
sonst bleibt ein ungenutzter Freibetrag bestehen.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus‐Money, 33/2022, S. 13</li>
</ul>
</html>
<html>
Mit diesen interessanten Fakten über das gelbe Edelmetall glänzen<br />
Sie am Stammtisch, im Familienkreis sowie bei Anlagediskussionen<br />
(Quellen: World Gold Council, INN, Focus‐Money):<br />
<!--------------- Teil 1 --------------->
<ul>
<li><h3>Fort Knox</h3>
In dem riesigen Hochsicherheitslager der US Bullion Depository in Fort<br />
Knox liegen rund 4600 Tonnen (147,3 Millionen Unzen) Gold.
</li>
<li><h3>Goldreiche Weltmeere</h3>
Es wird angenommen, dass in Ozeanen rund 15 000 Tonnen Gold <br />
schwimmen. Ein Herausfiltern lohnt bei einem Verhältnis von 1 Teil<br />
Gold zu 1 Billion Teilen Wasser nicht.
</li>
<li><h3>Blattgold</h3>
Eine Unze Gold kann zu einem neun Quadratmeter großen durchsichti‐<br />
gen Blatt ausgerollt werden, das nur mehr 0,000018 cm dick ist. Ein Ka‐<br />
bel wäre 80 km lang.
</li>
<li><h3>Größter Goldschatz</h3>
Dei USA besitzen in den Zentralbank‐Kellern das meiste Gold. Der‐<br />
zeit sind es gut 8133 Tonnen. Zu Beginn der 70er‐Jahre des vergan‐<br />
genen Jahrhunderts waren es mehr als 12 000 Tonnen, ehe andere<br />
Länder den Tausch von Dollar in Gold forcierten.
</li>
<li><h3>Goldmenge</h3>
Die Menschen haben bisher gut 205 000 Tonnen Gold in einigen<br />
Tausend Jahren aus der Erde geholt.
</li>
<li><h3>Junges Gold</h3>
Mehr als 90 Prozent des heute bereits geförderten Goldes wurde<br />
seit dem Goldrausch in Kalifornien gefunden.
</li>
<li><h3>Goldrausch in Kalifornien</h3>
Die gut 40 000 Bergleute, die sich 1849 dem kalifornischen Gold‐<br />
rausch anschlossen, wurden “49ers“ genannt.
</li>
<li><h3>Golrausch in Südafrika</h3>
Beim Steineausgraben für den Bau eines Hauses fand George<br />
Harrison 1885 in der Nähe von Johannesburg Gold, was den<br />
südafrikanischen Goldrausch auslöste.
</li>
</ul>
<!--------------- Teil 2 --------------->
<!--------------- Teil 3 --------------->
<ul>
<li><h3>Goldschmuck</h3>
Rund die Hälfte des heue geförderten Goldes wird zu Schmuck<br />
verarbeitet.
</li>
<li><h3>Goldene Kriegsbeute</h3>
Julius C&wuml;sar gab jedem seiner Soldaten 200 Golmünzen<br />
aus der Kriegsbeute, als er Gallien besiegte.
</li>
<li><h3>Rekord–Goldmünze</h3>
Die größte Goldmünze wurde 2012 von der Perth Mint gegossen.<br />
Das Gewicht betrug eine Tonne und der Durchmesser 80 Zenti–<br />
meter.
</li>
<li><h3>Zähe Angelegenheit</h3>
Eine Unze Gold kann auf eine Länge von 80 Kilometern gedehnt<br />
werden. Der Draht wäre dabei allerdings nur fünf Mikrometer breit.
</li>
<li><h3>Dünn und lang</h3>
Würde das auf der Erde bisher geförderte Gold in diesen fünf Mi–<br />
krometer dicken Faden gezogen, könnte dieser 11,2 Millionen<br />
Mal um die Erde gespannt werden.
</li>
<li><h3>Nugget</h3>
Das größte Goldnugget wog 2316 Feinunzen, als es 1869 in<br />
Moliagul in Australien gefunden wurde. Es wurde “Welcome<br />
Stranger“ genannt.
</li>
<li><h3>Voll in Ordnung</h3>
Die Ordnungszahl von Gold ist 79, was bedeutet, dass sich im<br />
Kern jedes Atoms 79 Protonen befinden.
</li>
<li><h3>Abbaukosten</h3>
Die durchschnittlichen Gesamtkosten (Fachbegriff: AISC, <em>All-In<br />
Sustaining Costs</em>) betragen derzeit gut 1200 US-Dollar je Fein–<br />
unze.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>
</li>
<li>Focus‐Money 44/2022 (26.10.2022), S. 41
</li>
<li>Focus‐Money 45/2022 (02.11.2022), S. 21
</li>
</ul>
</html>
<html>
Gold einfach aus dem Boden graben ‐ das war einmal. Die Funde von großen<br />
Goldklumpen, Nuggets genannt, sind im Allgemeinen vorbei. Heute werden im‐<br />
mer ausgefeiltere Abbaumethoden angewandt.
<ul>
<li><h3>Wie schmutzig ist eigentlich die Goldförderung?</h3>
Wenn Kritiker sagen: “Beim Goldschürfen wird Quecksilber eingesetzt,<br />
das verdampft und wieder herabregnet“, dann trifft dies auf kleine, in<br />
der Regel unerlaubte Goldsucher zu. Große Goldkonzerne vor allem<br />
aus westlichen Ländern wie Kanada und Australien haben dagegen<br />
sehr hohe Auflagen, das fängt beim Straßenbau an und geht über Ab‐<br />
bau- und Verarbeitungsmethoden bis hin zur Renaturierung der aus‐<br />
gebeuteten Minen.<br />
</li>
<li><h3>Wo wird am meisten gefördert?</h3>
Pro Jahr werden rund 3000 Tonnen gefördert. Südafrika war die Num‐<br />
mer eins, wurde aber in den letzten Jahren von China abgelöst. 370<br />
Tonnen Gold wurden dort 2021 aus dem Boden gegraben. In Austra‐<br />
lien waren es 330 Tonnen und in Russland ebenfalls 300 Tonnen. Süd‐<br />
afrika kommt mit 100 Tonnen nur mehr auf Rang sieben. Bei den ab‐<br />
bauwürdigen Goldreserven liegt Südafrika noch auf Rang drei mit 5000<br />
Tonnen, Spitzenreiter ist Australien mit 11000 Tonnen. China dürfte auf‐<br />
grund der geringeren Reserven von 2000 Tonnen bald Schwierigkeiten<br />
bekommen, größter Produzent zu bleiben.<br />
</li>
<li><h3>Was gibt es an technologischem Fortschritt?</h3>
Um 1900 wurden weltweit rund 400 Tonne Gold jährlich gefördert. Durch<br />
die Modernisierung der Minen und verbesserte Extraktionstechnologien<br />
stieg diese Menge bis Mitte der 1960er‐Jahre auf rund 1500 Tonnen an.<br />
Ab den 1980er‐Jahren wurde dann das Haufenlaugungsverfahren in der<br />
Branche genutzt. Dadurch konnten auch Vorkommen mit geringen Gold‐<br />
gehalten wirschaftlich ausgebeutet werden. Dies gab der Herstellung ei‐<br />
nen enormen Schub. Immer schwerer zugängliche Goldvorkommen be‐<br />
dörfen technischen Fortschritts und verbesserter Explorationsmethoden,<br />
um abbauwürdig zu sein. Beispiele sind Geländeuntersuchungen mittels<br />
Drohnen, Belüftungsaggregate für tiefe Bergwerke, umweltfreundliche<br />
Abraummethoden, Elektromobilität sowie autonomes Fahren bei Lkws<br />
und weiterem schwerem Gerät.<br />
</li>
</u>
<h3>Links:</h3>
<ul>
<li>Focus Money 14/2023 (29.03.2023), S. 52
</li>
</ul>
</html>
<html>
<ul>
<li>aus der Charttechnik;</li>
<li>ein Kaufsignal;</li>
<li>der kürzere gleitende Durchschnitt (in Form der 50‐Tage‐Linie) kreuzt <br />
den längeren Durchschnitt (200‐Tage‐Linie) von unten nach oben.</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus Money 09/2021 (24.02.2021), S. 63, "Chartsignal der Woche :: Goldenes Kreuz bei Cancom"</li>
</ul>
</html>
<html>
An manchen Tagen spielen die Kurse regelrecht verrückt. Aktien und Indizes<br />
springen dann ohne erkennbaren Grund wild hin und her. Dahinter stecken<br />
sogenannte Verfallstage an der Terminbörse.
<ul>
<li><h3>Gespenstische Achterbahnfahrt</h3>
Vielleicht ies es Ihnen schon einmal aufgefallen: Es gibt diese Tage an den<br />
Finanzmärkten, an denen sich Aktien und Indizes in Deutschland, allen vor‐<br />
an der Dax, unter hohen Volumina wie wild rauf‐ und runterbewegen. Und<br />
das, obwohl keinerlei kursbewegende Neuigkeiten eintreffen ‐ wie von Geis‐<br />
terhand quasi. Ominöserweise tritt das Phänomen immer an Freitagen auf.<br />
</li>
<li><h3>Was dann genau passiert</h3>
Ausgelöst werden die Schwankungen durch sogenannte Verfallstage hier‐<br />
zulande an der Terminbörse Eurex. Der große Verfallstag heißt dreifacher<br />
Hexensabbat (<em>“Triple Witching Day“</em>). Dabei laufen an der Eurex vier Deri‐<br />
vatetypen gleichzeitig aus ‐ Optionen und Futures auf Indizes und einzel‐<br />
ne Aktien. Um 12:00 Uhr verfallen zunächst die Derivate der Stoxx‐Fami‐<br />
lie, um 13:00 Uhr folgen die Futures und Optionen auf den Dax und den<br />
TecDax, um 13:05 Uhr jene auf den MDax. Erst gegen Ende des Handels‐<br />
tags um 17:30 Uhr verfallen Optionen und Futures auf Einzelaktien. Ne‐<br />
ben den großen gibt es noch die kleinen Verfallstage an der Terminbör‐<br />
se, an denen nur Optionen auf Aktien und Indizes abgerechnet werden.<br />
Die kräftigen Kurswechsel resultieren daraus, dass mächtige Investoren<br />
versuchen, die Notierungen in die von ihnen gewünschte Richtung zu be‐<br />
wegen, um mit Derivaten, die sie besitzen, ordentlich Geld zu verdienen<br />
oder möglichst wenig zu verlieren. Bei diesem Tauziehen entgegenge‐<br />
setzter Parteien geht es wild hin und her.<br />
</li>
<li><h3>Wann die Hexenparty steigt</h3>
Große Verfallstage finden viermal im Jahr statt ‐ stets am dritten Freitag der Mo‐<br />
nate März, Juni, September und Dezember. Die kleinen Verfallstage treffen je‐<br />
den Monat auf den dritten Freitag. Der nächste kleine Verfall findet also am 16. <br />
April statt, der nächste Hexensabbat schon am 19. März.<br />
</li>
<li><h3>Tipp für Anleger</h3>
Die Zappel‐Tage lassen sich nutzen, um limitierte Kauf‐ oder Verkaufsaufträge zu<br />
platzieren, deren Limits weiter weg vom aktuellen Kurs liegen. Mit etwas Glück <br />
werden sie ausgeführt.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus Money 09/2021 (24.02.2021), S. 63</li>
</ul>
</html>
<html>
Zu Haus schmeckt's am besten: Nicht nur in Deutschland investieren Anleger<br />
überproportional in den Heimatmarkt. Damit gehen sie ein unnötiges Risiko ein<br />
und verzichten freiwillig auf Renditechancen.<br />
<ul>
<li><h3>Warum unterliegen Anleger dem Home Bias?</h3>
Die Gründe, warum viele Investoren den internationalen Markt meiden, sind unter‐<br />
schiedlich: Aufgrund des Wechselkurses scheint manchen der eigene Währungs‐<br />
raum risikofreier und teilweise werden Wertpapiergeschäfte im Ausland zusätzlich<br />
besteuert. Meist sorgen jedoch emotionale Gründe für die Beliebtheit des deutschen<br />
Aktienmarkts: Viele Anleger treffen Entscheidungen nicht objektiv, sondern vertrauen<br />
auf Branchen und Unternehmen, die sie kennen und bei denen sie glauben, die Risi‐<br />
ken richtig einschätzen zu können.<br />
</li>
<li><h3>Was sind die Folgen?</h3>
Wer nur deutsche Aktien kauft, macht sich abhängig von der Konjunktur des Heimat‐<br />
marktes. Ein Blick nach Griechenland zeigt, wie gefährlich es ist: Der dort wichtigste<br />
Leitindex Athex‐Composite ist seit der Staatsschuldenkrise eingebrochen. Allerdings<br />
wächst die deutsche Wirtschaft und der Dax ist stabil. Anleger, die dem Home Bias<br />
verfallen, verlassen sich allerdings auf die Wertentwicklung eines vergleichsweise<br />
kleinen Aktienmarkts: Der Börsenwert aller deutschen Unternehmen beträgt nur knapp<br />
zwei Prozent der weltweiten Marktkapitalisierung. Hinzu kommt der hohe Anteil ein‐<br />
zelner Branchen wie der Maschinenbau‐ und Automobilbranche, während andere<br />
unterrepräsentiert sind. Die großen Tech‐Giganten kommen beispielsweise fast<br />
alle aus den USA oder China.<br />
</li>
<li><h3>Wie minimieren Investoren ihr Klumpenrisiko?</h3>
Mit Diversifikation! Anleger, die in unterschiedliche Länder und Branchen inves‐<br />
tieren, reduzieren das Klumpenrisiko und verbessern dadurch ihre Risiko‐Ren‐<br />
dite‐Relation. Die einfachste Möglichkeit einer breiten Streuung ist die Investi‐<br />
tion in einen ETF, der die globale Weltwirtschaft abbildet, wie beispielsweise<br />
den iShares MSCI All Country World (WKN: A1JMDF). Anleger, die bereits<br />
einen großen Anteil an deutschen Einzelwerten im Depot haben, können ge‐<br />
zielt mit Themen‐ETFs wie dem iShares MSCI Emerging Markets (WKN: <br />
A111X9) in wachstumsstärkere Märkte investieren.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus‐Money 38/2021 (15.09.2021), S. 61</li>
</ul>
</html>
<html>
Zitat von Robert Halver (Analyst, Baader Bank):<br />
<em>“Wenn Inflation nicht bekämpft wird, ist sie kein<br />
Feind des Aktienmarkts, sondern ihr bester Freund.“</em><br />
<h3>Links:</h3>
<ul>
<li><a href=""
target="_blank" rel="noreferrer noopener">
Focus–Money 51/2021, Editorial </a>
</li>
</ul>
</html>
<html>
<h3>What is JOLTS?</h3>
<ul>
<li>The <b>Job Openings and Labor Turnover Survey <em>(JOLTS)</em></b> is conducted by the<br />
Bureau of Labor Statistics of the U.S. Department of Labor. The program invol‐<br />
ves the monthly collection, processing, and dissemination of job openings and<br />
labor turnover data. The data, collected from sampled establishments on a vo‐<br />
luntary basis, include employment, job openings, hires, quits, layoffs and dis‐<br />
charges, and other separations.<br />
</li>
<li>The number of unfilled jobs ‐ used to calculate the job openings rate ‐ is an<br />
important measure of the unmet demand for labor. With that statistic, it is pos‐<br />
sible to paint a more complete picture of the U.S. labor market than by looking<br />
solely at the unemployment rate, a measure of the excess supply of labor.<br />
</li>
<li>Information on labor turnover is valuable in the proper analysis and inter‐<br />
pretation of labor market developments and as a complement to the unem‐<br />
ployment rate.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.bls.gov/jlt/jltwhat.htm" target="_blank" rel="noreferrer noopener">U.S. Bureau of Labor Statistics :: What is JOLTS?</a></li>
<li>UMWA-Börsenbrief, 05.09.2022</li>
</ul>
</html>
<html>
Die Kapitalrücklage erscheint auf der Passivseite der Bilanz, die erklärt, <br />
woher das Geld stammt, mit dem ein Unternehmen arbeitet, und ist Teil<br />
des Eigenkapitals.
<ul>
<li><h3>Woraus setzt sich die Kapitalrücklage zusammen?</h3>
Das sind immerhin vier Bestandteile. Zum einen ist das der Betrag über<br />
den Nennbetrag hinaus, der bei der Ausgabe von Anteilen einschließlich<br />
von Bezugsanteilen erzielt worden ist (im Fachjargon sogennanntes Agio).<br />
Ferner zählt dazu das Agio bei der Ausgabe von Wandelanleihen und<br />
Optionsanleihen.<br />
<br />
Dazu treten noch Zuzahlungen, die Gesellschafter gegen Gewährung<br />
eines Vorzugs für ihre Anteile leisten, und andere Zuzahlungen der Ge‐<br />
sellschafter ins Eigenkapital.
</li>
<li><h3>Was ist das gemeinsame Merkmal dieser Schritte?</h3>
Das Geld kommt hier also jeweils von außen in das Unternehmen. Da‐<br />
gegen werden Gewinnrücklagen gebildet, weil die Firma Gewinne ein‐<br />
behält, die intern erwirtschaftet wurden.
</li>
<li><h3>Wie hoch sollte die Kapitalrücklage sein?</h3>
Grundsätzlich müssen deutsche AGs Rücklagen in Höhe von zehn Pro‐<br />
zent des Eigenkapitals vorweisen. Liegt die Summe aus gesetzlicher <br />
Rücklage und Kapitalrücklage unter diesen zehn Prozent, muss aufge‐<br />
stockt werden ‐ mit jährlich fünf Prozent des überschusses, die in die<br />
gesetzlische Rücklage gehen, bis die 10-Prozent-Schwelle erreicht ist.
</li>
<li><h3>Warum sind solche Rücklagen wichtig?</h3>
Eine Stärkung des Eigenkapitals erhöht stets die finanzielle Stabilität, <br />
denn damit können Verluste (Jahresfehlbetrag, Verlustvortrag) abge‐<br />
deckt werden. In unsicheren Zeiten, wie derzeit wird von den Investor‐<br />
en darauf wieder viel stärker geachtet, ist die Kapitalrücklage hoch ge‐<br />
nug, kann damit auch das Kapital aus Gesellschaftsmitteln erhöhrt wer‐<br />
den (Ausgabe sogenannter Gratisaktien, bei der die Altaktionäre nicht<br />
verwässert werden).
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus‐Money, 32/2022, S. 25</li>
</ul>
</html>
<html>
Während das Kurs‐Gewinn‐Verhältnis (KGV) in keiner Aktienanalyse<br />
fehlen darf, bleibt dessen Erweiterung, das KGWV, häufig außen vor.<br />
Dabei ist es ‐ vor allem bei Wachstumswerten ‐ nicht weniger relevant.<br />
<ul>
<li><h3>Was ist das KGWV?</h3>
Das Kurs‐Gewinn‐Wachstums‐Verhältnis, auch in der englischen Bezeichnung<br />
als <b>PEG‐Ratio</b> (<em><b>Price Earnings to Growth Ratio</b></em>) bekannt, gilt als Erweiterung<br />
des KGV. Die Kennzahl schließt die Wachstumsprognose des zu analysierenden<br />
Unternehmens ein, wodurch Anleger Wachstumswerte noch genauer unter die<br />
Lupe nehmen können. Am besten schauen sich Investoren immer beide Kenn‐<br />
ziffern an.<br />
</li>
<li><h3>Wie wird das KGWV berechnet?</h3>
Die Brechnung der PEG‐Ratio ist recht simpel: Das Kurz‐Gewinn‐Verhältnis, das<br />
sich aus dem Aktienkurs und dem Gewinn je Aktie errechnet, wird durch das pro‐<br />
gnostizierte Gewinnwachstum pro Jahr geteilt.
</li>
<li><h3>Wie lässt sich das KGWV interpretieren?</h3>
Wie das KGV gibt das KGWV Auskunft darüber, ob eine Aktie unter‐ oder überbe‐<br />
wertet ist. Die PEG‐Ratio dient als Ergänzung und versucht, die Schwächen des<br />
KGV abzufangen. Als fair bewertet gelten Aktien, deren KGV und Wachstumsrate<br />
gleich hoch sind. Dann ergibt sich beim KGWV ein Wert von eins. Ist das KGV<br />
höher als die Wachstumsprognose, steigt der Wert über eins und die Aktie gilt<br />
als überbewertet. Demzufolge wird ein Papier als unterbewertet betrachet, wenn<br />
das KGV niedriger als die erwartete Wachstumsrate ist und der Quotient somit<br />
unter eins fällt. Je weiter der Wert von der fairen Bewertung entfernt ist, desto<br />
stärker ist die jeweilige Aktie über‐ oder unterbewertet. Generell gilt, dass die<br />
PEG‐Ratio vor allem bei stark wachsenden Unternehmen interessant ist.<br />
</li>
<li><h3>Welche Schwächen hat die Kennzahl?</h3>
Für das KGWV werden Prognosen herangezogen, die sich zum einen schnell<br />
ändern und zum anderen gar nicht erst eintreffen können. Oft werden die Ge‐<br />
winnerwartungen von den Unternehmen veröffentlicht, die Zahlen sind also nicht<br />
objektiv. Anleger müssen sich zusätzlich bewusst machen, dass die PEG‐Ratio<br />
nicht auf den langfristigen Ausblich ausgelegt ist.<br />
</li>
</ul>
</html>
<html>
<h3>Einfach Kursziele berechnen</h3>
Das hat Charme und bietet viel praktischen Nutzen für Anleger: Die<br />
Möglichkeit, mithilfe der Price-Earnings-to-Growth-Ratio (PEG) sel‐<br />
bst rechnerische Kursziele für Aktien ermitteln zu können. Denn<br />
keineswegs für alle Dividendenwerte gibt es Kursprojektionen von<br />
Bankanalysten. Dies gilt speziell für kleinere AGs.<br />
<h3>Vorgehensweise:</h3>
<code><pre>
<math>
<mi>Kursziel</mi> = <mo>(</mo>
<mfrac>
<mrow><mn>1</mn> − <mi>P</mi><mi>E</mi><mi>G</mi></mrow>
<mrow><mi>P</mi><mi>E</mi><mi>G</mi></mrow>
</mfrac> + <mn>1</mn>
<mo>)</mo> · <mi>Aktienkurs</mi>
</math>
</pre></code>
Und das geht so:<br />
Beträgt die PEG z.B. 0,8, wären bis zur fairen Bewertung von 1,0<br />
genau 0,2 Prozentpunkte Platz.<br />
<br />
→ Das bedeutet, die Aktie könnte um 25 Prozent steigen (0,2 geteilt<br />
  durch 0,8 mal 100).<br />
<h3>Beispiel (<em>Deutsche Telekom</em>):</h3>
Bei einem PEG von 0,54 sind bis zur fairen Bewertung 1,0 exakt<br />
0,46 Prozentpunkte. Das heißt, die Telekom könnte bei einem<br />
Kurs von 15 Euro auf 27,77 Euro zulegen ( (0,46 geteilt durch<br />
0,54) plus 1 mal 15).
<h3>Zu beachten ist:</h3>
<ul>
<li>Die PEGs und damit die Kursziel können durch den Corona‐<br />
Einbruch 2020 verzerrt sein, weil bei vielen Firmen einem<br />
sehr starken Einbruch ein weit überdurchschnittliches Wachs‐<br />
tum folgt;</li>
<br />
<li>Anders als bei Banken‐Kurszielen, die stets auf zwölf Mona‐<br />
te abzielen, kann die Erreichung der PEG‐Kursziele länger<br />
dauern;</li>
<br />
<li>Auch gibt es konkurrierende Modelle zur Ermittlung von Kurs‐<br />
zielen, die möglicherweise zu durchaus anderen Ergebnissen<br />
kommen;</li>
<br />
<li>Zudem können Sonderfaktoren oder allgemeine Konjunktur‐<br />
einbrüche von solchen mathematischen Modellen nicht er‐<br />
fasst werden;</li>
</ul>
Als gute Hinweise und Tendenzgeber oder für Vergleiche von<br />
Aktien einer Branche sind die über die PEG ermittelten Kurs‐<br />
zielen aber allemal gut geeignet.<br />
<h3>Links:</h3>
<ul>
<li>Focus‐Money 09/2021 (24.02.2021), S. 15</li>
</ul>
</html>
<html>
Meistens werden Charts von Aktien oder Indizes linear dargestellt. <br />
Manchmal sollten Anleger jedoch auch logarithmische Darstellun‐<br />
gen nutzen.
<ul>
<li><h3>Was ist ein <em>logarithmischer Chart</em>?</h3>
In der Regel werden bei Charts die Abstände gleich dargestellt. <br />
Dann ist beispielsweise der Abstand zwischen der Linie bei fünf<br />
und der bei zehn Euro genauso groß wie der zwischen der 10-<br />
Euro-Linie und der bei 15 Euro. Diese Darstellung heißt <b>linearer<br />
Chart</b>.<br />
<br />
Bei <b>logarithmischen Charts</b> sind die Abstände nicht absolut be–<br />
trachtet gleich, sondern sie werden mit zunehmend höheren <br />
Werten auf der Y-Achse immer kleiner. Das hängt damit zusam–<br />
men, dass hier die Abstände prozentual angegeben werden.
</li>
<li><h3>Was ist der <em>Sinn</em> dieser Charts?</h3>
Wenn eine Aktie etwa von fünf auf zehn Euro steigt, bedeutet dies<br />
eine Verdoppelung. Legt der Kurs weiter von zehn auf 15 Euro zu,<br />
beträgt der prozentuale Anstieg “nur“ noch 50 Prozent (fünf geteilt<br />
durch zehn multipliziert mit 100). Das Plus von zehn auf 15 Euro ist<br />
also, prozentual betrachtet, nur halb so groß wie der Anstieg von<br />
fünf auf zehn Euro. Genau das spiegelt sich bei logarithmischen<br />
Charts wider. Auf der vertikalen Y–Achse sind die Abstände nicht<br />
absolut gleich, sondern prozentual.
</li>
<li><h3>Welchen <em>Nutzen</em> haben Anleger davon?</h3>
Zunächst vermitteln die auf prozentualen Veränderunge aufbauen–<br />
den Charts ein anderes Bild von Kursanstiegen oder –verlusten. Die<br />
Auschläge werden in einer gegenüber linearen Charts gedämpften<br />
oder abgemilderten Weise gezeigt. <br />
<br />
Die unterschiedliche Darstellung ist zudem bei der Charttechnik<br />
von Bedeutung. So werden Aufwärts– und Abwärtstrends bei den<br />
verschiedenen Darstellungsformen zu abweichenden Zeitpunkten<br />
gebrochen. Damit kann ein Aufwärtstrend in einem linearen Chart<br />
noch intakt sein, der in der logarithmischen Darstellung bereits<br />
gebrochen ist. <br />
<br />
Beispiel: Steigt eine Aktie jeden Tag um fünf Euro, geht der Chart,<br />
linear dargestellt, gerade nach oben. Beim logarithmischen Chart <br />
flacht die Kurve jedoch ab, da das prozentuale Plus von fünf Euro<br />
immer kleiner wird, je höher die Aktie notiert.<br />
<br />
Tendenziell eignen sich lineare Charts eher für kürzere Betrach–<br />
tungszeiträume und logarithmische für längere.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus–Money 27/2021, S. 63
</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<h3>Moving Average Convergence-Divergence</h3>
<ul>
<li>Developed by Gerald Apple in the 1970s</li>
<li>it shows the relationship (aka MACD line) between the longer term 26-day<br />
Exponential Moving Average (EMA) and the shorter term 12-day EMA. </li>
<li>An Average line is then created by calculating a 9-day EMA from the result<br />
of the MACD line.</li>
<li>When the Average line crosses over the MACD line, this positive divergence<br />
creates a bullish crossover Buy signal and similarly when the Average line<br />
crosses below the MACD line this negative divergence is considered a bearish<br />
crossover Sell signal.</li>
<li>Understanding how to read the Buy and Sell signals can help a trader better<br />
identify entry and exit points ⇒ Barchart's daily "eMACD New Buy Signal" page.<br />
It's a great tool to find new trading ideas, featuring large cap stocks where the<br />
12-26-9 Day eMACD Indicator has identified a new bullish crossover Buy signal<br />
for today.</li>
</ul>
</html>
<html>
<ul>
<li>NHT := Nach-Handels-Transparenz<br />
⇒ Realisiert bei der NordLB mittels der Anwendung: MessageDB </li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://digitalesfamilyoffice.de/glossar-verstaendlich-erklaert/fms-most-crowded-trade/"
target="_blank" rel="noreferrer noopener">
Digitales Family Office ‐ Breidenbach von Schlieffen & Co. :: FMS most crowded trade </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<h2>So läuft der Handel mit Optionen ab</h2>
<p>
Sich gegen Kursschwankungen absichern oder mit ihnen spekulieren ‐ für beides eignen sich Optionen. Die wichtigsten Fragen rund um den Optionshandel klären wir hier.
</p>
<p>
Mit ihnen lassen sich Kursschwankungen absichern ‐ aber eben auch spekulieren: Optionen sind mittlerweile bei vielen Anlegern beliebt. Ein gewisse Risikobereitschaft und Erfahrung sollten Anleger für den Optionshandel allerdings mitbringen ‐ sonst kann es schnell böse enden.
</p>
<p>
<div id="tw-hreftoc">Die wichtigsten Fragen zum Optionshandel und was Optionen von Optionsscheinen unterscheidet:</div>
<ol>
<li><a href="#eins">Was sind Optionen?</a></li>
<li><a href="#zwei">Was ist der Unterschied zwischen Call- und Put-Optionen?</a></li>
<li><a href="#drei">Wie hoch ist eine Optionsprämie?</a></li>
<li><a href="#vier">Wo kann ich Optionen kaufen?</a></li>
<li><a href="#fuenf">Was ist der Unterschied zwischen Long und Short?</a></li>
<li><a href="#sechs">Was unterscheidet Optionen und Optionsscheine?</a></li>
<li><a href="#sieben">Preisbildung bei Zertifikaten & Optionsscheinen</a></li>
<li><a href="#acht">Hohe Volatilität senkt den Preis</a></li>
<li><a href="#neun">Optionsscheine: Komplexe Preisermittlung</a></li>
</ol>
</p>
<div id="eins"/>
<h2>Was sind Optionen?</h2>
Optionen bilden einen Basiswert ab: Das kann eine Aktie, ein Index, eine Währung, Anleihe oder ein Rohstoff sein. Weil Optionen eine vorher festgelegte Laufzeit mit Verfallsdatum haben, wird der Handel mit ihnen auch "Termingeschäft" genannt.
</p>
<p>
Wer eine Option kauft, sichert sich damit das Recht, den Basiswert nach Ablauf der Laufzeit zu einem bestimmten Preis (Basispreis) zu kaufen oder zu verkaufen. Doch wie der Name schon sagt, hat der Käufer eben eine "Option". Das heißt: Er muss sein Recht nicht nutzen.
</p>
<p>
Damit er diese Möglichkeit hat, zahlt der Käufer eine Prämie an den Verkäufer der Option. Der Verkäufer wird <b>"Stillhalter"</b> genannt. Anleger können beide Positionen, also die des Options-Inhabers oder die des Stillhalters übernehmen.
</p>
<p>
<img src="./pictures/Optionen-01.jpg" width=120 height=120 title="Grafische Darstellung von Option"/>
</p>
<p>
Beispiel: <br />
Peter kauft eine Verkaufsoption auf auf eine Aktie der Firma X. Sie ist heute 25 Euro wert. In einem Jahr könnte er sie genau für diesen Preis an den Stillhalter verkaufen. Ein Jahr später ist es soweit: Die Option wird fällig.
</p>
<ul>
<li><b>Möglichkeit 1:</b><br />
Der Basiswert, also die Aktie, ist von 25 Euro auf 20 Euro gefallen. Peter stört das nicht: Er hat sich gegen den Kursverlust abgesichert. Er nutzt jetzt seine Option und verkauft die Aktie für 25 Euro an den Stillhalter.
</li>
<li><b>Möglichkeit 2:</b><br />
Die Aktie ist innerhalb des Zeitraums von 25 Euro auf 30 gestiegen. Jetzt ist es für Peter sinnlos, sein Verkaufsrecht zu nutzen. Schließlich kann er seine Option auch verfallen lassen - und die Aktie am Kapitalmarkt zum höheren Preis als dem Basispreis verkaufen.
</li>
</ul>
<a href="#tw-hreftoc">back to TOC</a>
<div id="zwei"/>
<h2>Was ist der Unterschied zwischen Call- und Put-Optionen?</h2>
<p>
Mit Optionen kann auf fallende oder steigende Kurse gesetzt werden. Wer glaubt, dass eine Aktie in Zukunft fallen wird, kann eine Verkaufsoption auf die Aktie kaufen. Das nennt sich Put-Option. Falls der Aktienkurs fällt, kann er die Aktie während der Laufzeit an den Stillhalter zu einem höheren Preis verkaufen, als sie dann eigentlich wert ist.
</p>
<p>
Wer glaubt, dass eine Aktie im Wert steigen wird, kauft eine Kaufoption auf diesen Basiswert ‐ also eine Call-Option. Dann kann er sie zum gegebenen Zeitpunkt günstiger vom Stillhalter kaufen, als sie eigentlich wert ist.
</p>
<a href="#tw-hreftoc">back to TOC</a>
<div id="drei"/>
<h2>Wie hoch ist eine Optionsprämie?</h2>
<p>
Die Höhe einer Prämie wird entsprechend dem Basispreis, der erwarteten Kursentwicklung des Basiswerts und dessen Volatilität sowie der Laufzeit berechnet. Der Käufer einer Option muss sie auch dann zahlen, wenn er sein Recht verfallen lässt. Meist ist die Prämie direkt mit dem Kauf fällig.
</p>
<a href="#tw-hreftoc">back to TOC</a>
<div id="vier"/>
<h2>Wo kann ich Optionen kaufen?</h2>
<p>
Optionen werden nur an speziellen Terminbörsen gehandelt. Die wichtigste Börse für deutsche Privatanleger ist die deutsch-schweizerische Eurex. In den USA ist es die Chicago Board Options Exchange (CBOE).
</p>
<a href="#tw-hreftoc">back to TOC</a>
<div id="fuenf"/>
<h2>Was ist der Unterschied zwischen Long und Short?</h2>
<p>
Im Zusammenhang mit Optionen wird auch oft von "long" und "short" gesprochen. Damit ist jeweils die Position gemeint, die der Käufer mit seinem Kauf einnimmt. Setzt er darauf, dass der Basiswert steigt, kauft er eine Long-Option. Wenn er mit fallenden Kursen rechnet, eine Short-Position.
</p>
<a href="#tw-hreftoc">back to TOC</a>
<div id="sechs"/>
<h2>Was unterscheidet Optionen und Optionsscheine?</h2>
<p>
Auch Optionsscheine verbriefen dem Käufer das Recht, innerhalb der Laufzeit einen Basiswert zu einem festgelegten Preis, dem Basispreis, zu kaufen oder zu verkaufen. Sie können an verschiedenen Börsen oder im außerbörslichen Handel direkt beim Emittenten gekauft werden.
</p>
<p>
Darin liegt auch der Unterschied zu Optionen: Bei Optionsscheinen bleibt der Stillhalter, also Verkäufer, immer der Emittent. Das stellt ein gewisses Risiko dar, auch Emittentenrisiko genannt: Denn wenn der Emittent Pleite geht, verlieren auch die ausgegebenen Optionsscheine ihren Wert. Das ist 2008 durch die Insolvenz von der Bank Lehman Brothers passiert.
</p>
<a href="#tw-hreftoc">back to TOC</a>
<div id="sieben"/>
<h2>Preisbildung bei Zertifikaten & Optionsscheinen </h2>
<p>
Beliebt, aber für viele Privatanleger fast undurchschaubar: Bei vielen Derivaten erfolgt die Preisbildung auf Basis komplizierter Finanzmathematik. Das liegt an der eigentümlichen Konstruktion der Produkte.
</p>
<p>
Viele Tausend Discount-Zertifikate werden an deutschen Börsen gehandelt und erfreuen sich bei Privatanlegern großer Beliebtheit. Denn sie puffern Verluste eines Basiswertes, also einer Aktie oder eines Index ab und schützen so das Depot des Anlegers. Der Preis eines Discounters hängt aber konkret vom Zusammenspiel seiner Komponenten ab. Dies ist einerseits der Basiswert selbst, zum anderen aber ein Terminmarktgeschäft, hier eine Call-Option, die vom Emittenten des Produkts verkauft wird. Die Prämie, die dabei vereinnahmt wird, bildet den Discount, der vor Kursverlusten bis zu einem bestimmten Maß schützt.
</p>
<a href="#tw-hreftoc">back to TOC</a>
<div id="acht"/>
<h2>Hohe Volatilität senkt den Preis</h2>
<p>
Diese Prämie ist jedoch an die Schwankungsanfälligkeit des Basiswertes, die Volatilität gekoppelt. Steigt diese "Vola" in schwierigen Marktsituationen an, dann steigt auch die Prämie der Option und mit ihr der Discount des Discount-Zertifikates. Für den Anleger, der ein solches Produkt bereits länger hält, kann dies allerdings unangenehme Folgen haben: Obwohl der Preis des Basiswertes relativ konstant bleibt, kann die Notierung des Discount-Zertifikates sinken. Umgekehrt kann ein Anleger von diesem niedrigen Preis beim Einstieg in einen Discounter profitieren. Der Preis des Zertifikates steigt nach einer Beruhigung des Marktes von ganz allein, ohne dass der Basiswert klettern muss.
</p>
<p>
<img src="./pictures/Optionen-02.jpg" height=120 widht=120 title="Grafische Darstellung von Volatilität" />
</p>
<p>
Discount-Zertifikate sind nur eine Spielart im unüberschaubaren Angebot aus dem Zertifikate-Universum. Anleger sollten sich über die Konstruktion ihres Produktes im Klaren sein, wenn sie es erwerben. Die Emittenten der Zertifikate geben darüber im Emissionsprospekt Auskunft. Viele Online-Broker und Finanzseiten im Internet stellen Anlegern zudem Rechenhilfen bereit, mit denen die Veränderung des Zertifikatepreises bei bestimmten Szenarien annäherungsweise berechnet werden kann. Die tatsächlich verfügbaren Preise werden allerdings in der Regel vom Emitteten an den wichtigsten Zertifikatebörsen in Frankfurt (Scoach) oder Stuttgart (Euwax) sowie im Direkthandel "gestellt".
</p>
<p>
Wer die Funktionsweise eines solchen Derivates nicht nachvollziehen kann oder will, sollte vom Kauf Abstand nehmen. Auf Indizes kann der private Anleger zum Beispiel auch mittels ETFs (Exchange Traded Funds) setzen, die deutlich transparenter sind.
</p>
<a href="#tw-hreftoc">back to TOC</a>
<div id="neun"/>
<h2>Optionsscheine: Komplexe Preisermittlung</h2>
<p>
Noch mehr als bei Zertifikaten ist der Preis eines Optionsscheines eine kleine Aufgabe höherer Mathematik. Die Hauptfaktoren bei der Preisbildung sind hier der <b>Bezugspreis (Strike)</b>, die <b>Restlaufzeit</b> und das <b>Bezugsverhältnis</b>. Zudem besitzt ein Optionsschein einen "inneren Wert", wenn der Preis des Basiswertes über dem Bezugspreis liegt. Hat man also einen Call auf den Dax mit Bezugspreis 6.000 gekauft, hat dieser einen inneren Wert, solange der Index nicht unter 6.000 Punkte fällt.
</p>
<p>
In die Preisbildung ein geht aber auch noch der <b>"Zeitwert"</b> des Scheins. Dieser errechnet sich aus der Restlaufzeit, dem Abstand des Index oder der Aktie zum Basispreis, dem allgemeinen Zinsumfeld und nicht zuletzt der erwarteten Schwankungsbreite des Wertes, der "impliziten Volatilität". Ein Anhaltspunkt für die Schwankungen des Dax liefert etwa der VDax, der Volatilitäts-Dax. Liegt er bei 20, dann erwarten die Marktteilnehmer eine Schwankungsbreite von 20 Prozent um den derzeitigen Kurs.
Emittent bestimmt die Volatilität
</p>
<p>
Die in den Optionsscheinpreisen enthaltene "implizite Volatilität" beeinflusst den Preis der Produkte direkt. Wird diese Größe höher angesetzt, steigt der Kurs des Scheins, liegt sie tiefer, notiert der Optionsschein niedriger. Die Volatilität richtet sich prinzipiell nach den Erwartungen der Marktteilnehmer an den Terminbörsen und den Optionsprämien. Da Emittenten frei bei der Ermittlung der impliziten Volatilität sind, können sich Preisdifferenzen bei Optionsscheinen ergeben, die ansonsten mit der gleichen Restlaufzeit und dem gleichen Basispreis ausgestattet sind.
</p>
<p>
So notiert ein Put-Optionsschein auf den EuroStoxx 50 mit Basispreis 2.000 Punkte und Laufzeit bis zum 19.12.2014 von Goldman Sachs (WKN GT04L7) bei 3,28 Euro. Ein Optionsschein der Deutschen Bank, der zwei Tage früher ausläuft, aber ansonsten die gleichen Bedingungen hat, kostet 3,50 Euro. Beim Goldman Sachs-Schein liegt die implizite Vola bei 26 Prozent, beim Deutsche-Bank-Pendant aber bei 28 Prozent.
</p>
<p>
Aus Sicht von Kritikern liegt darin freilich auch eine potenzielle Manipulationsmöglichkeit beim Preis eines Optionsscheines: Setzt der Emittent die Vola niedriger an, muss er dem Verkäufer prinzipiell auch weniger zahlen, denn der Preis des Scheins sinkt unmittelbar.
</p>
<a href="#tw-hreftoc">back to TOC</a>
<h3>Links:</h3>
<ul>
<li><a href="https://boerse.ard.de/boersenwissen/boersenwissen-fuer-fortgeschrittene/so-laeuft-der-handel-mit-optionen-ab100.html" target=_blank>ARD - Boersenwissen fü Fortgeschrittene :: So läuft der Handel mit Optionen</a></li>
<li><a href="https://boerse.ard.de/boersenwissen/boersenwissen-fuer-fortgeschrittene/hintergrund-preisbildung-bei-zertifikaten-und-optionsscheinen-100.html" target=_blank>ARD - Boersenwissen fü Fortgeschrittene :: Preisbildung bei Zertifikaten und Optionsscheinen</a></li>
</ul>
</html>
<html>
<ul>
<li><h3>Verkauf einer Put‐Option</h3>
</li>
<li><h3>Verkauf einer Call‐Option</h3></li>
</ul>
</html>
<html>
<ul>
<li>In dieser Ausgabe beschäftigen wir uns mit einer wei–<br />
teren Variante der Long-Optionsstrategien: dem <b>Long<br />
Strangle</b>. Von einer Strategie spricht man, wenn ver–<br />
schiedene Wertpapiere kombiniert werden, um von <br />
einer bestimmten Marktsituation zu profitieren.
</li>
<li>
Die Strategie des Long Strangle ähnelt der in der vor–<br />
herigen Ausgabe vorgestellten Long-Straddle-Strate–<br />
gie. Bei beiden Strategien erfolgt eine gleichzeitige<br />
Investition in einen Call und Put Optionsschein auf<br />
denselben Basiswert mit identischem Bezugsver–<br />
hältnis und gleicher Restlaufzeit. Der wesentliche<br />
Unterschied zwischen beiden Strategien liegt in der<br />
Wahl des Basispreises. Während beim Long Strad–<br />
dle Call und Put mit identischem Basispreis ausge–<br />
stattet sind, werden beim Long Strangle unterschied–<br />
liche Basispreise für Call und Put gewählt. Dabei<br />
liegt der Basispreis des Puts niedriger als der des <br />
Calls. Typischerweise handelt es sich bei beiden<br />
Optionsscheinen um sogenannte Out-of-the-Money-<br />
Optionsscheine, das heißt, sie weisen keinen in–<br />
neren Wert auf.
</li>
<li>
Beispiel: Angenommen die Aktie des Unternehmens X notiert derzeit bei 10,00 Euro. Der Anleger erwartet einen starken Kursanstieg bzw. Rückgang der Aktie, zum Beispiel aufgrund einer bevorstehenden Veröffentlichung betriebswirtschaftlicher Daten. Der Investor möchte von dieser Situation profitieren und entscheidet sich für eine Long-Strangle-Strategie.
</li>
<li>
Dazu kauft er 1.000 Call Optionsscheine mit einem Basispreis von 10,50 Euro zu einem Preis von 0,50 Euro und 1.000 Put Optionsscheine mit einem Basispreis von 9,50 Euro, für die er jeweils 0,30 Euro aufwendet. Die Optionsscheine beziehen sich auf das Unternehmen X, haben ein Bezugsverhältnis von 1:1 und sind mit der gleichen Restlaufzeit ausgestattet. Insgesamt zahlt der Investor somit einen Gesamtpreis in Höhe von 800 Euro (1.000 Euro x 0,50 Euro + 1.000 x 0,30 Euro).
</li>
<li>
<h3>Folgende Szenarien können sich am Ende der Laufzeit ergeben:</h3>
<b>Szenario 1:</b> Die Aktie notiert am Ende der Laufzeit bei 8,00 Euro. Der gekaufte Call besitzt keinen inneren Wert und verfällt somit wertlos. Der Put weist hingegen einen inneren Wert von 1,50 Euro auf (Differenz zwischen Aktienkurs 8,00 Euro und Basispreis 9,50 Euro). Der Erlös aus dem Put beläuft sich auf 1.500 Euro (1.000 x 1,50 Euro). Abzüglich der gezahlten Optionsprämien von 800 Euro erzielt der Anleger einen Gewinn in Höhe von 700 Euro (1.500 Euro – 800 Euro).
</li>
<li>
<b>Szenario 2:</b> Die Aktie notiert am Ende der Laufzeit bei 9,00 Euro. Ebenso wie in Szenario 1 verfällt der gekaufte Call wertlos. Der Put weist hingegen einen inneren Wert von 0,50 Euro auf (Differenz zwischen Aktienkurs 9,00 Euro und Basispreis 9,50 Euro). Der Erlös aus dem Put beläuft sich auf 500 Euro (1.000 x 0,50 Euro). Abzüglich der gezahlten Optionsprämien von 800 Euro erleidet der Anleger jedoch einen Verlust in Höhe von 300 Euro (500 Euro – 800 Euro).
</li>
<li>
<b>Szenario 3:</b> Die Aktie notiert am Ende der Laufzeit bei 10,00 Euro. Da sowohl der Call als auch der Put keinen inneren Wert aufweisen, verfallen beide Optionsscheine wertlos. Der Anleger erleidet somit einen Totalverlust seines eingesetzten Kapitals in Höhe der gezahlten Optionsprämien von 800 Euro.
</li>
<li>
<b>Szenario 4:</b> Die Aktie notiert am Ende der Laufzeit bei 11,00 Euro. Der gekaufte Put besitzt keinen inneren Wert und verfällt somit wertlos. Der Call weist hingegen einen inneren Wert von 0,50 Euro auf (Differenz zwischen Basispreis 10,50 Euro und Aktienkurs 11,00 Euro). Der Erlös aus dem Call beläuft sich auf 500 Euro (1.000 x 0,50 Euro). Abzüglich der gezahlten Optionsprämien von 800 Euro erleidet der Anleger jedoch einen Verlust in Höhe von 300 Euro (500 Euro – 800 Euro).
</li>
<li>
<b>Szenario 5:</b> Die Aktie notiert am Ende der Laufzeit bei 12,00 Euro. Ebenso wie in Szenario 4 verfällt der gekaufte Put wertlos. Der Call weist hingegen einen inneren Wert von 1,50 Euro auf (Differenz zwischen Basispreis 10,50 Euro und Aktienkurs 12,00 Euro). Der Erlös aus dem Call beläuft sich auf 1.500 Euro (1.000 x 1,50 Euro). Abzüglich der gezahlten Optionsprämien von 800 Euro erzielt der Anleger einen Gewinn in Höhe von 700 Euro (1.500 Euro – 800 Euro).
</li>
<li>
Wie aus der Grafik deutlich wird, ist das Gewinnpotenzial der Strategie theoretisch unbegrenzt, der Verlust hingegen beschränkt sich auf die gezahlten Prämien beider Optionsscheine. Ein Totalverlust stellt sich also dann ein, wenn sich der Basiswert nicht aus der Kursspanne von 9,50 Euro (Basispreis Put) und 10,50 Euro (Basispreis Call) herausbewegt. Der Anleger erzielt erst dann einen Gewinn, wenn einer der beiden Optionsscheine einen inneren Wert von mehr als 0,80 Euro besitzt und somit seine Ausgaben, die er für die Optionsprämien aufgewendet hat, kompensiert. Dieses Szenario tritt ein, wenn der Kurs des Basiswerts entweder unter 8,70 Euro (unterer Break-even-Point) fällt oder 11,30 Euro (oberer Break-even-Point) übersteigt.
<img src="./pictures/SocieteGenerale-Optionsstrategie-LongStrangle_Grafik_Wissen_ideas256.png" height=445 width=840 /><br />
<div style="ont-size: 5px;&">Quelle: Société Générale</div><br />
</li>
<li>
Mit der Long-Strangle-Strategie spekulieren Anleger also auf stark steigende oder stark fallende Basiskurse. Aber worin liegt nun der Unterschied zur Long-Straddle-Strategie? Denn auch hier spekulieren Anleger auf eine ähnliche Reaktion des zugrunde liegenden Basiswerts. Der Unterschied wird durch die Wahl der unterschiedlichen Basispreise deutlich. Denn im Vergleich zum Long Straddle ist die erwartete Kursreaktion seitens des Anlegers beim Long Strangle wesentlich größer. Das heißt, um einen Gewinn mit der Long-Strangle-Strategie zu erzielen, muss sich der Kurs des Basiswerts deutlich stärker bewegen. Dafür liegt allerdings die aufzuwendende Optionsprämie beim Long Strangle deutlich unter der des Long Straddle. Denn je weiter die Basispreise der beiden Optionsscheine auseinanderliegen, desto weniger muss der Anleger für die Prämien aufbringen.
</li>
<li>
Wie auch beim Long Straddle kann die Long-Strangle-Strategie sinnvoll sein, wenn die implizite Volatilität beim Kauf niedrig ist und man eine steigende Volatilität erwartet. Denn damit erhöht sich die Wahrscheinlichkeit, dass einer der beiden Optionsscheine im Geld notiert. Diese Kombinationsstrategie lässt sich mit passenden Optionsscheinen von Sociètè Gènèrale umsetzen.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.ideas-magazin.de/2023/ausgabe-256/wissen/optionsstrategien-long-strangle/"
target="_blank" rel="noreferrer noopener">
Societe Generale :: Optionsstrategien – Long Strangle</a>
</li>
</ul>
</html>
<html>
<ul>
<li>Optionsstrategie, die Profite generiert, auch wenn nichts passiert</li>
<br />
<li>Bei dem Short Strangle verkaufen Sie also die Optionen-Kombi–<br />
nation (Beim Gegenteil, dem Long Strangle, wird die Kombina–<br />
tion gekauft)</li>
<li><h3>Aufbau des Short Strangles</h3>
Diese Strategie beinhaltet den Leerverkauf einer Call Option, die<br />
aus dem Geld ist (deren Basispreis über dem aktuellen Aktien–<br />
kurs liegt) und einer Put Option, die ebenfalls aus dem Geld ist <br />
(deren Basispreis unter dem aktuellen Aktienkurs liegt), mit dem–<br />
selben Verfallsdatum.<br />
<br />
Der Short Strangle zusammengefasst:
<ul>
<li>Short Put mit Basispreis A</li>
<li>Short Call mit Basispreis B</li>
<li>Der Aktienkurs liegt in der Regel zwischen A und B</li>
<li>Beide Optionen haben das gleiche Verfallsdatum</li>
</ul>
</li>
<li><h3>Profil eines Short Strangles</h3>
<img src="./pictures/Boerse_gewinn-verlust-profil-short-strangle-online-broker-lynx.png" height=383 width=500 /><br />
Der Short Strangle: Geld verdienen mit “ruhigen“ Aktien: Gewinn/Verlust Profil eines Short Strangle
</li>
<li><h3>Prinzip des Short Strangles</h3>
Mit einem Short Strangle sind Sie verpflichtet, die Aktie zum Basispreis A zu kaufen oder sie zum Basispreis B zu verkaufen, wenn die Optionen ausgeübt werden.<br />
<br />
Ihre Erwartung wird sein, dass der Aktienkurs irgendwo zwischen dem Basispreis A und dem Basispreis B bleiben wird und dass die von Ihnen verkauften Optionen wertlos verfallen werden.<br />
<br />
Durch den Verkauf von zwei Optionen erhalten Sie eine Prämie, die umso größer ist, je näher sich die Basispreise der Optionen am aktuellen Aktienkurs befinden. Der maximale Gewinn wird auf diese Prämie begrenzt sein. Der theoretische maximale Verlust ist allerdings unbegrenzt. Das Aufwärtsrisiko ist mit dem leerverkauften Call unbegrenzt, während das Abwärtsrisiko erheblich ist, allerdings insofern begrenzt, dass die Aktie nicht tiefer als null fallen kann.<br />
<br />
Fortgeschrittene Trader setzen diese Strategie um, um einen möglichen Rückgang der impliziten Volatilität auszunutzen. Wenn die implizite Volatilität einer Aktie ohne ersichtlichen Grund ungewöhnlich hoch ist, sind Call und Put Optionen möglicherweise überbewertet. Der Leerverkauf dieser Optionen ist dann entsprechend besonders lukrativ. Fällt dann die implizite Volatilität, verbilligen sich die Optionen, was sich auf den eingegangenen Short Strangle positiv auswirkt. Um den Zusammenhang zwischen einer hohen Volatilität und dem Preis einer Option zu verstehen, verweise ich auf meinen Artikel “Werden Sie mithilfe der Volatilität zum Profi-Trader“).<br />
<br />
In der Umsetzung ist ein Short Strangle sehr einfach. Sie können ihn entweder als Optionen-Kombination handeln, indem Sie gleichzeitig die Put Option und die Call Option leerverkaufen, oder Sie können die Put Option und die Call Option nacheinander leerverkaufen.
</li>
<li><h4>Meine persönlichen Tipps für den Handel von Short Strangles</h4>
Ich würde bei einem Short Strange empfehlen, die Basispreise A und B so auszuw&aum;hlen, dass sie mindestens eine Standardabweichung oder mehr von dem aktuellen Aktienkurs entfernt sind. Das erhöht Ihre Erfolgswahrscheinlichkeit. Je weiter entfernt die Basispreise allerdings sind, desto niedriger ist die Prämie, die Sie vereinnahmen. Optionen mit einem Delta von 16 (auffindbar in der Optionskette im OptionTrader Ihrer Handelsplattform), entsprechen einer Standardabweichung.<br />
<br />
Wählen Sie für einen Short Strangle kurze Laufzeiten, da die Optionen in den letzten 60 Tagen vor ihrem Verfallsdatum schneller an Wert verlieren. Dieser Zeitwertverlust ist für Sie als Verkäufer der Optionen ein Vorteil. Siehe dazu auch meinen Artikel zu Thema Zeitwertverfall.<br />
<br />
Nehmen Sie die Gewinne vorzeitig mit. Meine Erfahrung hat gezeigt, dass es ratsam ist, die Gewinne zu realisieren, wenn 25% bis 50% der vereinnahmten Prämie bereits zu Buche stehen. Sie können im Anschluss einen neuen Short Strangle eröffnen, mit neuen nachjustierten Basispreisen, die den Aktienkurs wieder besser umklammern.<br />
</li>
<li><h3>Für wen ist der Short Strangle geeignet?</h3>
Diese Strategie ist nur für die fortgeschrittenen Trader gedacht, die in der Lage sind, Ihr Depot ständig zu überwachen und schnell zu reagieren.<br />
<br />
Der Short Strangle ist zwar in seiner Ausführung nicht besonders kompliziert, er erfordert dennoch eine große Expertise im Handel. Sie müssen in der Lage sein, einzuschätzen, ob die Optionen teuer oder billig sind (anhand der impliziten Volatilität zum Beispiel), und nur dann den Short Strangle eingehen, wenn Sie wissen, dass die Optionen teuer sind.<br />
<br />
Die größte Gefahr bei einem Short Strangle liegt in den potenziellen unbegrenzten Verlusten Geht Ihr Handelsplan nicht auf, können Sie mehr als Ihren Einsatz verlieren.<br />
</li>
<li><h3>Wann sollte ein Short Strangle eingegangen werden?</h3>
Sie eröffnen einen Short Strangle, wenn Sie davon ausgehen, dass sich die Aktie wenig bewegen wird. Ein Einstieg in einen Short Strangle könnte Sinn ergeben, wenn sich eine Aktie gerade aufgrund von besonderen Ereignissen stark bewegt hat, und von der Sie jetzt eine Beruhigung erwarten.<br />
<br />
Die meisten Anleger, die den Short Strangle handeln, werden auch nach wichtigen Nachrichtenereignissen Ausschau halten, die zu einem Kollaps der impliziten Volatilität der Aktie führen können. Die Veröffentlichung von Quartalsergebnissen kann beispielsweise dazu führen, dass sich eine Aktie stark nach oben oder nach unten bewegt, was schlecht für den Short Strangle (und gut für den Long Strangle) wäre. Sie führen aber auch in der Regel zu einem deutlichen Rückgang der impliziten Volatilität. Man spricht in dem Fall von dem “Volatilitäts‐Crush“. Dieser Fall der impliziten Volatilität wirkt sich auf den Short Strangle extrem positiv.<br />
</li>
<li><h3>Wo liegen Ihre “Breakevens“?</h3>
Bei einem Short Strangle, gibt es zwei Breakeven-Punkte:
<ul>
<li>Breakeven nach oben = Basispreis des Calls + vereinnahmte Prämie</li>
<li>Breakeven nach unten = Basispreis des Puts − vereinnahmte Prämie</li>
</ul>
</li>
<li><h3>Was ist der maximale potenzielle Gewinn bei einem Short Strangle?</h3>
Ihr potenzieller Gewinn ist auf die vereinnahmte Prämie begrenzt. Er wird erzielt, wenn der Aktienkurs zwischen den Basispreisen bleibt. Ein Teilgewinn wird erzielt, wenn der Aktienkurs zwischen den Breakeven-Punkten bleibt. Ein Short Strangle muss nicht bis zum Ende der Laufzeit der Optionen gehalten werden. Sie können die Position vorzeitig glattstellen und die Gewinne (oder die Verluste) mitnehmen.
</li>
<li></h3>Was ist der maximale potenzielle Verlust bei einem Short Strangle?</h3>
Ihr maximaler potenzieller Verlust ist unbegrenzt, wenn die Aktie steigt. Wenn die Aktie fällt, kann Ihr Verlust wegen der leerverkauften Put Option ebenfalls sehr stark ausfallen, ist aber begrenzt, da die Aktie nicht tiefer als 0 fallen kann.<br />
<br />
Der Bruttoverlust am Verfallsdatum wauml;re die Differenz zwischen dem Aktienkurs und dem Basispreis B der Call Option (wenn der Aktienkurs höher ist) beziehungsweise zwischen dem Aktienkurs und dem Basispreis A der Put Option (wenn der Aktienkurs niedriger ist). Der Nettoverlust ist der Bruttoverlust abzüglich der vereinnahmten Prämie, die Ihnen auf jeden Fall erhalten bleibt.
</li>
<li><h3>Was sind die Margin Anforderungen bei einem Short Strangle?</h3>
Die Margin-Anforderung für einen Short Strangle ist die Margin-Anforderung des Short Puts oder des Short Calls, je nachdem, welcher Wert höher ist, abzüglich der von der anderen Option-Seite erhaltenen Prämie.<br />
<br />
Achtung: Die Margin-Anforderung kann sich im Laufe der Zeit ändern. Je nachdem, wie sich der Basiswert entwickelt, ist eine Erhöhung (oder Verringerung) der erforderlichen Margin möglich.<br />
</li>
<li><h3>Wie wirkt sich die Zeit auf die Position aus?</h3>
Für diese Strategie ist der Zeitverfall Ihr bester Freund. Er wirkt sich doppelt zu Ihren Gunsten aus, da beide gehandelten Optionen von dem Zeitwertverfall profitieren. Jeder Tag, der vergeht, ohne dass sich der Aktienkurs ändert, bringt beide Optionen einen Tag näher an den wertlosen Verfall.<br />
</li>
<li><h3>Was ist der Einfluss der impliziten Volatilität?</h3>
Nachdem die Strategie umgesetzt wurde, möchten Sie, dass die implizite Volatilität abnimmt. Eine Erhöhung der impliziten Volatilität wäre von Nachteil, da sie doppelt gegen Sie wirkt, indem sie den Preis fü beide verkaufte Optionen erhöht.<br />
<br />
Ein Anstieg der impliziten Volatilität deutet auch auf eine erhöhte Wahrscheinlichkeit eines starken Kursschwungs hin, wä der Aktienkurs zwischen dem Basispreis A und dem Basispreis B bleiben sollte.<br />
</li>
<li><h3>Risiko einer Ausübung der Optionen</h3>
Eine vorzeitige Ausübung der Optionen ist zwar jederzeit möglich, erfolgt jedoch in der Regel für die Call Option nur dann, wenn eine Dividenden-Ausschüttung vor der Tür steht, oder für die Put Option, wenn sie tief im Geld ist.
</li>
<li><h3>Die Vorteile und Nachteile des Short Strangles auf den Punkt gebracht</h3>
<ul>
<li><b>Vorteile:</b>
<ul>
<li>Der Short Strangle erzielt den maximalen Gewinn bei 3 möglichen Szenarien:<br />
Eine Seitwärtsbewegung, eine leichte Aufwärtsbewegung und eine leichte Abwärtsbewegung der zugrunde liegenden Aktie.</li>
<li>Der Short Strangle profitiert vom Rückgang der impliziten Volatilität.</li>
<li>Der Short Strangle profitiert vom Zeitwertverfall.</li>
</ul>
</li>
<br />
<li><b>Nachteile:</b>
<ul>
<li>Der maximale Gewinn ist begrenzt.</li>
<li>Eine starke Kursbewegung der Aktie führt zum Verlust der Position.</li>
<li>Der maximale mögliche Verlust ist unbegrenzt (Totalverlust)</li>
</ul>
</li>
</ul>
</li>
<li><h3>Beispiele für eine Short Strangle …</h3>
<ol>
<li><b> … auf 3M (Ticker: MMM)</b><br />
Nehmen wir als Beispiel an, dass die Aktie von 3M (MMM) derzeit mit 176$ gehandelt wird. Um die Short Strangle Strategie umzusetzen, verkauft ein Trader zwei Optionen, einen Call und einen Put.<br />
<br />
Der Call mit einer Laufzeit von 60 Tagen hat einen Basispreis (Strike) von 195$ und seine Prämie beträgt 0,70$ für einen Gesamtpreis von 70$ (0,70$ x Multiplikator von 100). Die Put Option mit einer Laufzeit von 60 Tagen hat einen Basispreis von 155$ und die Prämie beträgt 1,00$ für einen Gesamtpreis von 100$ (1,00$ x 100). Beide Optionen haben dasselbe Verfallsdatum. Die Gesamt-Prämie, die der Trader vereinnahmt, beläuft sich auf 170$.<br />
<br />
Der Breakeven der Position auf der oberen Seite liegt bei 195$ + 1,70$ = 196,70$. Über diesem Kurs fängt der Trader an, Verluste zu machen. Der Breakeven der Position auf der unteren Seite liegt bei 155$ −1,70$ = 153,30$. Unter diesem Kurs entstehen die ersten Verluste.<br />
<br />
Wenn der Aktienkurs während der Laufzeit der Optionen zwischen 155$ und 195$ bleibt, beläuft sich der Gewinn für den Trader auf 170$. Das ist die Prämie, die anfangs vereinnahmt wurde. Die Margin-Anforderung der Position würde schätzungsweise 2.400$ betragen, so dass die Rendite des Short Strangle ca. 7% in 60 Tagen entsprechen würde (170$ / 2.400$).<br />
<br />
Nehmen wir an, dass die Aktie von 3M aufgrund guter Quartalsergebnisse steigen würde. Wenn der Kurs der Aktie am Ende der Laufzeit der Optionen bei 193$ notiert, verfallen beide Optionen wertlos. Der Trader realisiert seine Prämie von 170$ zu 100% als Gewinn.<br />
<br />
Wenn der Kurs aufgrund einer Gewinnwarnung auf 150$ fallen sollte, verfällt die Call Option wertlos. Die Put Option ist aber stark im Geld und 5$ wert. Mit dem Multiplikator von 100 entsteht mit der Put Option ein Verlust von 500$. Nach Abzug der Prämie von 170$ bleibt für den Trader ein Verlust von 330$. Der Verlust ist in diesem Fall fast doppelt so hoch wie der mögliche Gewinn.<br />
<br />
Dieses Beispiel zeigt, dass die Wahrscheinlichkeit des Gewinns beim Short Strangle hoch ist. Wenn der Plan aber nicht aufgeht, können verheerende Verluste drohen. Ein Ausstieg aus der Position könnte beispielsweise von einem Trader vorgenommen werden, sobald die Verluste das Zweifache des potenziellen Gewinns erreichen.</li>
<br />
<li><b> … auf ATVI</b><br />
Zum einen habe ich einen 54 P bis nächsten Freitag verkauft, hier würde ich dann weitere 100 Aktien einkaufen müssen, was zu dem Preis ok ist. Hier gab es eine Miete von 0,24 USD.<br />
<br />
Parallel habe ich einen 61 C für nächsten Freitag für unsere bestehenden Aktien verkauft. Hier gab es eine Miete von 0,22 USD. </li>
</ol>
</li>
<li><h3>Fazit: Der Short Strangle als Einnahme-Strategie für Fortgeschrittene</h3>
Der Short Strangle ist eine beliebte Einnahme-Strategie, da sie eine hohe Gewinnwahrscheinlichkeit aufweist. Sie ist darüber hinaus sehr einfach umzusetzen, was diese Strategie noch attraktiver macht. Die Gewinne sind zwar auf die vereinnahmte Prämie begrenzt, können aber im Verhältnis zur Margin-Anforderung prozentual sehr stark ausfallen.<br />
<br />
Die Strategie geht auf, wenn sich während der Laufzeit der Optionen die zugrunde liegende Aktie wenig bewegt. Das ist an einem Short Strangle besonders charmant: Der Trader kann bei 3 Szenarien gewinnen: Wenn sich die Aktie seitwärts bewegt, leicht steigt oder leicht fällt. Dabei profitiert der Trader sowohl vom Zeitwertverfall als auch von einer fallenden impliziten Volatilität.<br />
<br />
Aufgrund ihrer potenziellen unbegrenzten Verluste ist diese Strategie jedoch nur für fortgeschrittene Trader geeignet, die geübt sind, ihre Risiken konsequent zu managen.</li>
</ul>
<h3>Links:</h3>
<ul>
<li>UMWA‐Börsenbrief, 10.12.2021 - Freitag (Musterdepot)</li>
<li><a href="https://www.lynxbroker.de/boerse/boerse-kurse/optionen/optionsstrategien/der-short-strangle-geld-verdienen-mit-ruhigen-aktien/" target="_blank" rel="noreferrer noopener">
Lynx‐Broker ‐ Optionsstrategien :: Short Strangle</a></li>
</ul>
</html>
<html>
<h3>1‐Click Trading</h3>
<ul>
<li>Aktivierung in den ProRealTime‐Kontoeinstellungen</li>
<li>Dieser Service ermöglicht es, einen oder mehrere Orderaufträge mit<br />
einem einzigen Klick zur Ausführung zu übermitteln.</li>
<li>Um diesen Service zu nutzen, sind folgende Schritte auf der Plattform zu machen:<br />
<br />
<ul>
<li>Klicken Sie im Hauptmenü auf “Einstellungen“ => “Trading“.</li>
<li>Klicken Sie auf “Manuelles Trading“.</li>
<li>Im Bereich “Order‐Bestätigung“ klicken Sie auf “Niemals (1‐Click Trading)“.</li>
<li>Es erscheint ein Pop‐up‐Fenster; bitte lesen Sie dieses sorgfältig durch.</li>
<li>Unterschreiben Sie und klicken Sie auf “1‐Click‐Trading aktivieren“.</li>
</ul>
</li>
<br />
<li><b>Wichtig:</b><br />
Die Befreiung von der Auftragsbestätigung birgt das Risiko, dass man im<br />
Falle einer fehlerhaften Eingabe der Auftragsparameter diesen Orderauf‐<br />
trag vor dessen Ausführung nicht mehr stornieren kann.</li>
<li>Man setzt sich also einem Verlustrisiko aus, falls sich eine Position,<br />
die nach der Ausführung eines solchen Orderauftrags eröffnet<br />
wurde, ungünstig entwickelt.</li>
<li>Wir bitten Sie, bei der Nutzung dieses Service wachsam zu sein,<br />
da sich das Risiko einer unbeabsichtigten Auftragserteilung erhöht.<br />
ProRealTime haftet nicht für fehlerhafte Auftragserteilungen.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="www.youtube.com"
target="_blank" rel="noreferrer noopener">
YouTube - ProRealtime - Trading</a>
</li>
</ul>
</html>
<html>
<ul>
Für Anleger ist es eine der wichtigsten Fragen: Steigen oder fallen<br />
die amerikanischen Leitzinsen? Die Federal Reserve gibt den Fi‐<br />
nanzmärkten mit den sogenannten <b><em>Dot Plots</em></b> eine wichtige Orien‐<br />
tierung.
<li><h3>Was zeigen die “Dot Plots“?</h3>
Wie entwicklen sich die US‐Leitzinsen in den nächsten Jahren? Wir<br />
wissen, was die 18 Mitglieder des Offenmarktausschusses der Fe‐<br />
deral Reserve (FOMC) ‐ das Gremium, das über die Zinspolitik ent‐<br />
scheidet ‐ erwarten. Das zeigen die sogennten Dot Plots. Für 2022<br />
gehen jetzt alle Mitglieder davon aus, dass die Leitzinsen 2022 stei‐<br />
gen, die Mehrheit von zehn Mitgliedern prognostiziert eine Erhöhung<br />
auf 0,74 Prozent ‐ das entspräche drei Zinserhöhungen im nächsten<br />
Jahr.
</li>
<li><h3>Was bedeutet das für Anleger?</h3>
Die Dezember‐Sitzung brachte einen kräftigen Umschwung: Mehrere<br />
Zinserhöhungen scheinen für 2022 eine ausgemachte Sache. Noch<br />
im Juni hatten nur sieben der 18 FOMC‐Mitglieder für nächstes Jahr<br />
überhaupt eine Zinserhöhung prognostiziert.
</li>
<li><h3>Muss sich die Fed an die Dot Plots halten?</h3>
Die Fed hat 2012 diesen Indikator eingeführt, um ihre Entscheidun‐<br />
gen transparenter zu machen. Die Dot Plots sind aber nur eine Mo‐<br />
mentaufnahme. Ändern sich die Daten ‐ vor allem zu Inflation und<br />
Arbeitsmarkt ‐, können die FOMC‐Mitglieder auch ihre Meinung <br />
ändern. Wichtig für Anleger ist vor allem die Tendenz, die die Dot<br />
Plots beschreiben: Haben die “Falken“, die für eine straffere Zins‐<br />
politik stehen, oder die lockeren “Tauben“ die Oberhand?
</li>
<h3>Links:</h3>
<ul>
<li>Focus‐Money 52/1 2021/22, S. 52</li>
</ul>
</html>
<html>
Reklassifizierung ist die Umstellung von Inhaberaktien in Namensaktien.<br />
Dabei werden zu einem bestimmten Tag (Ex-Tag) die Inhaberaktien aus‐<br />
gebucht und die Namensaktien (unter einer separaten WKN / ISIN) ein‐<br />
gebucht. Die Aktionäre werden in diesem Zuge gebeten, sich an den<br />
Emittenten, zwecks Eintragung in das Aktienregister zu wenden.
</p>
<p>
Ein Grund für die Umstellung von Inhaber- auf Namensaktien ist, dass die<br />
Aktiengesellschaft dadurch Kenntnisse ihres Aktionärskreises bekommt<br />
und in der Lage ist, die Aktionärsstruktur und die Bestandsentwicklungen<br />
institutioneller Investoren besser analysieren zu können.
</p>
<h3>Links:</h3>
<ul>
<li><a href="http://www.bankinside.de/wpgesch1.php#rekla" target="_blank" rel="noreferrer noopener">Bin :: Reklassifizierung</a> <em>(Bin (bankinside.de) ist das Nachschlagewerk für Banker und Fondsbuchhalter.)</em></li>
</ul>
</html>
<html>
Der psychologische Begriff der Resilienz umschreibt eine starke seelische<br />
Widerstandsfähigkeit von Personen. Er wird immer öfter auch auf den Aktien‐<br />
markt übertragen, weiß die Fonsdgesellschaft Alpha Star.
<ul>
<li><h3>Was sind Kennzeichen widerstandsfähiger Aktien?</h3>
Den Unternehmen, die von exogenen, nicht von ihnen selbst verursachten Ein‐<br />
flüssen und Schocks wenig erschüttert werden, schreiben die Fondsexperten <br />
dreierlei zu.<br />
<br />
Zunächst ein starkes Geschäftsmodell. "Eine Branche, die kein Wachstum auf‐<br />
weist, oder ein Unternehmen, dessen Produkte in zehn Jahren niemand mehr <br />
benötigt, ist höchstwahrscheinlich kein gutes Investment", hält Alpha Star<br />
fest.<br />
<br />
Zum Zweiten nennen sie eine starke Bilanz als wichtigen Faktor: "Unternehmen,<br />
die eine hohe Verschuldung aufweisen, haben eine viel höhere Wahrscheinlich‐<br />
keit, in schwieriges Fahrwasser zu geraten, wenn sich die Lage anspannt." Wer<br />
dagegen keine oder wenige Gläubiger hat, hat wenig Sorge, dass jemand von außen<br />
wegen der Verbindlichkeiten zusätzlichen Stress ins Unternehmen bringt.<br />
<br />
Schließlich ein dritter Faktor, der entscheidend zur Resilienz beiträgt: eine<br />
hohe Kapitalrendite. "Wie stark ein Unternehmen ist, lässt sich am besten durch<br />
die Kapitalrendite (Fachbegriff: Return on Invested Capital = ROIC) messen",<br />
hält Alpha Star hier fest. "Die Kapitalrendite gibt an, mit welchem Prozent‐<br />
satz ein Unternehmen sein Unternehmenskapital verzinst. Je höher die Verzinsung<br />
ist, desto besser. Eine hohe Kapitalrendite indiziert dabei, dass die Produkte<br />
des Unternehmens entweder einen hohen Kundennutzen aufweisen oder das Unterneh‐<br />
men sehr effizient produziert."
</li>
<li><h3>Sind solche Börsenfirmen auch weniger volatil?</h3>
Da sehen die Fondsexperten keinen Zusammenhang. Aktienkurse zeigen ja häufig<br />
ohne besonderen Anlass große Ausschläge. Das gilt erst recht in Bärenmärkten,<br />
wenn das Grundvertrauen der Investoren sowieso angeknackst ist. Das ändert den<br />
wahren Wert des Unternehmens jedoch nicht, der sich "nur über die Kapitalren‐<br />
diten, Gewinne und Cashflows bestimmen" lasse. Alpha Star setzt sogar noch<br />
einen drauf: "Vielmehr sinkt das Risiko von guten Unternehmen mit fallenden<br />
Aktienkursen sogar, weil sich der Preisabschlag zum fairen Wert vergrößert."<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus‐Money, 49/2022 (30.11.2022), S. 48</li>
</ul>
</html>
<html>
<ul>
<li>Eine <b>Special Purpose Acquisition Company</b> (SPAC) ist ein Akquisitionszweckunternehmen<br />
bzw. eine Mantelgesellschaft, die zunächst Kapital über einen Börsengang einsammelt, um dieses<br />
in einem zweiten Schritt in die Übernahme eines (vorher nicht fest bestimmten) Unternehmens zu<br />
investieren.</li>
<br />
<li><b>Was bedeutet SPAC?</b><br />
Eine Special-purpose acquisition company (SPAC) ist eine Gesellschaft ohne Geschäftsbetrieb<br />
und ist auch als "Blankoscheckgesellschaft" bekannt. Diese Gesellschaft wird ausschließlich zur<br />
Kapitalbeschaffung durch einen IPO (Börsengang) gegründet. Im zweiten Schritt strebt eine SPAC<br />
die Übernahme eines bestehenden Unternehmens an. Welches Unternehmen übernommen wird,<br />
steht vorher nicht explizit fest. Themengebiete wie z. B. Nachhaltigkeit, Fintech usw. werden aber<br />
oftmals vorab eingegrenzt.</li>
<li></li>
<li></li>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.wiwo.de/my/finanzen/geldanlage/akquisitionsvehikel-spacs-boersenmaentel-fuer-start-ups-das-neue-hobby-der-topmanager/26615424.html" target="_blank" rel="noreferrer noopener">Wiwo online :: Akquisitionsvehikel SPAC</a></li>
<li><a href="https://www.wiwo.de/finanzen/geldanlage/neues-spac-ex-credit-suisse-chef-thiam-baut-anlage-vehikel-auf/26788026.html" target="_blank" rel="noreferrer noopener">Wiwo online :: Ex-Credit-Suisse Chef baut Anlagehikel SPAC</a></li>
<li><a href="https://de.wikipedia.org/wiki/Special_Purpose_Acquisition_Company" target="_blank"
rel="noreferrer noopener">Wikipedia :: SPAC, Special Purpose Acquisition Company</a></li>
<li><a href="https://spacnews.de/was-ist-ein-spac.html" target="_blank" rel="noreferrer noopener">
SPAC News :: Was ist ein SPAC?</a></li>
<!--
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
-->
</ul>
</html>
<html>
<ul>
<li>The ProShares Short VIX Short-Term Futures ETF [SVXY] is a bet against volatility.</li>
<li><table>
<tr><td>WKN: </td><td> A1JZDM</td></tr>
<tr><td>ISIN: </td><td> US74347W6277</td></tr>
<tr><td>US-Symbol: </td><td> SVXY</td></tr>
<tr><td>Typ: </td><td> ETF</td></tr>
</table></li>
<li>scheint über die HVB tradable zu sein;</li>
<li></li>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://seekingalpha.com/symbol/SVXY" target="_blank" rel="noreferrer noopener">
SeekingAlpha.com :: SVXY</a></li>
<li><a href="https://www.investing.com/analysis/how-does-svxy-work-200149107" target="_blank"
rel="noreferrer noopener">Investing :: How does SVXY work?</a></li>
<li><a href="https://investormint.com/investing/what-is-svxy" target="_blank" rel="noreferrer noopener">
Investormint :: What is SVXY?</a></li>
<li><a href="https://www.onvista.de/index/PROSHARES-SHORT-VIX-SHORT-TERM-FUTURES-ETF-Index-145433998"
target="_blank" rel="noreferrer noopener">Onvista :: SVXY Infos & Chart</a></li>
<li><a href="https://www.ariva.de/proshares_short_vix_short-term_futures_etf-fonds" target="_blank"
rel="noreferrer noopener">Ariva :: SVXY</a></li>
<!--
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
-->
</ul>
</html>
<html>
<meta schräg rollen>
<ul>
<li>um eine Woche weiter rollen (Zeitgewinn) </li>
und
<li>auf einen niedrigeren Strike‐Preis runterrollen (Gewinn mit Basispreis).</li>
</ul>
<h3>Links:</h3>
<ul>
<li>UMWA ‐ Börsenbrief, 23.09.2022 ‐ Freitag (Musterdepot)</li>
<li><a href="https://www.deltavalue.de/optionen-rollen/" target="_blank" rel="noreferrer noopener">DeltaValue :: Das Rollen von Optionen</a></li>
<li><a href="https://www.trading-fuer-anfaenger.de/optionen-rollen/" target="_blank" rel="noreferrer noopener">Trading für Anfänger :: Rollen von Optionen</a></li>
<li><a href="https://www.lynxbroker.de/boerse/boerse-kurse/optionen/optionsgrundlagen/das-rollen-von-optionen/" target="_blank" rel="noreferrer noopener">
Lynx‐Broker :: Optionsgrundlagen ‐ Das Rollen von Optionen</a></li>
</ul>
</html>
<html>
<ul>
<li>ein spezieller Risikoindikator der Chicagoer Terminbörse CBOE;</li>
<li>ähnlich der Volatilitätsindizes wie Vix (S&P 500) oder<br />
VDax‐New (Dax) ⇒ “Angstbarometer“;</li>
<li>sie geben die Schwankungsbreite für das jeweilige Aktien‐<br />
segment an, die Finanzprofis für die nächsten Monate er‐<br />
warten;</li>
<li>kann auf Extremereignisse auf Finanzmarkt hindeuten;</li>
<li>Name stammt vom englischen Wort “<b>Skewness</b>“, was Schiefe<br />
oder Schiefheit bedeutet;</li>
<li>dies bezieht sich hier auf die Wahrscheinlichkeitskurve, deren<br />
Abweichung von der Norm auf außergewöhnliche Geschehnisse<br />
an der Börse hinweisen kann;</li>
<li>im Extremfall auf sog. <b><em>Schwarze Schwäne</em></b>, also Ereignisse,<br />
die kaum ein Investor auf dem Schirm hat;</li>
<h3>Funktionsweise</h3>
<li>wird durch die Preise von Kauf‐ und Verkaufsoptionen auf die<br />
Indizes ermittelt; ⇒ in diesem Preisen steckt “implizit“ die Infor‐<br />
mation, welche Volatilität die Akteure erwarten;</li>
<li>es werden Optionen gewählt, die “weit aus dem Geld“ sind,<br />
deren Basispreise sehr weit weg von den aktuellen Indexkur‐<br />
sen liegen;</li>
<li>Bei Vix und VDax‐New werden Optionen mit Basispreisen ge‐<br />
wählt, die relativ nahe an den aktuellen Indexständen liegen;</li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus Money, 18/2022, S. 31, “Börsenwissen“</li>
<li><a href="https://kamiltaylan.blog/skew-index-2/" target="_blank" rel="noreferrer noopener">KamilTaylan.blog ‐ Finanzielle Enzyklopädie</a></li>
<li><a href="https://de.tradingview.com/symbols/CBOE-SKEW/" target="_blank" rel="noreferrer noopener">TradingView :: Skew Chart</a></li>
<li><a href="https://finanzmarktwelt.de/der-schwarze-schwan-index-634/" target="_blank" rel="noreferrer noopener">Finanzmarktwelt :: Der Schwarze Schwan Index</a></li>
</ul>
</html>
<html>
<ul>
<li><h3>Standard & Poor's</h3>
Die weltweit führende und seit über 150 Jahren aktive Rating‐Agentur Standard & Poor's (S&P) <br />
gehört heute zum McGraw‐Hill‐Konzern und hat ihren Hauptsitz in New York. Der umfassende<br />
Analyseansatz beruht sowohl auf öffentlich zugänglichen als auch auf unternehmensinternen<br />
Daten sowie intensiven Managementgesprächen. <br />
<br />
Verwendete Notenskala: AAA, AA, A, BBB, BB, B, CCC, CC, C, D<br />
<br />
Weitere Infos unter: <a href="https://www.standardandpoors.com" target="_blank" rel="noreferrer noopener"><b>www.standardandpoors.com</b></a>.<br />
</li>
<li><h3>Fitch Ratings</h3>
Gegründet 1913, hat die amerikanische Full‐Service‐Agentur Fitch Ratings außer in New York<br />
auch einen eigenen Firmensitz in London. Wie S&P bildet Fitch zur Bonitätsanalyse spezielle<br />
Rating‐Komitees, die die Finanzkraft der untersuchten Unternehmen auf Herz und Nieren prü‐<br />
fen.<br />
<br />
Fitch Ratings verwendet dabei dieselbe Notenskala wie S&P: AAA, AA, A, BBB, BB, B, CCC, CC, C, D.<br />
<br />
Nähere Informationen unter: <a href="https://www.fitchratings.com" target="_blank" rel="noreferrer noopener"><b>www.fitchratings.com</b></a>.<br />
</li>
<li><h3>Moody's</h3>
Gemeinsam mit S&P und Fitch gehört Moody's zu den großen drei der Branche. Das an der<br />
Börse gelistete Rating‐Schwergewicht ist ebenfalls in New York beheimatet. Der Rating‐Pro‐<br />
zess gleicht grundsätzlich dem der anderen internationalen Analysehäuser, allerdings verwen‐<br />
det Moody's eine leicht abweichende Rating‐Skala:
<h4>Anlagewürdig (englisch <em>investment grade</em>)</h4>
<ul>
<li>Aaa ‐ Zuverlässige und stabile Schuldner höchster Qualität</li>
<li>Aa ‐ Gute Schuldner, etwas höheres Risiko als Aaa</li>
<li>A ‐ Wirtschaftliche Gesamtlage ist zu beachten</li>
<li>Baa ‐ Schuldner mittlerer Güte, die momentan zufriedenstellend agieren</li>
</ul>
<h4>Spekulativ (englisch <em>speculative grade</em>)</h4>
<ul>
<li>Ba ‐ Sehr abhängig von wirtschaftlicher Gesamtlage</li>
<li>B ‐ Finanzielle Situation ist notorisch wechselhaft</li>
<li>Caa ‐ Spekulativ, niedrige Einnahmen des Schuldners</li>
<li>Ca ‐ in der Regel liegen hier bereits Zahlungsstörungen vor</li>
<li>C ‐ in Zahlungsverzug</li>
<li>NR ‐ keine Bewertung (englisch not rated)</li>
</ul>
<br />
Weitere Details: <a href="https://www.moodys.com" target="_blank" rel="noreferrer noopener"><b>www.moodys.com</b></a>
</li>
<li><h3>A.M. Best</h3></li>
<li><h3>Assekurata</h3></li>
<li><h3>DFSI</h3></li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus‐Money 13/2022, S. 3 (Beilage)</li>
</ul>
</html>
<html>
<ul>
<li><table>
<tr><td><b>ISIN</b> </td><td> US78378X1072</td></tr>
<tr><td><b>WKN</b> </td><td> A0AET0</td></tr>
<tr><td><b>Symbol</b> </td><td> S500</td></tr>
<tr><td><b>RIC</b> </td><td> ^SPX</td></tr>
<tr><td><b>Bloomberg-Code</b> </td><td> SPX <INDEX></td></tr>
<tr><td><b>Kategorie</b> </td><td> Aktienindex</td></tr>
<tr><td><b>Typ</b> </td><td> Kursindex</td></tr>
</table></li>
<li>Ist ein Aktienindex, der die Aktien von 500 der größten börsennotierten US-amerikanischen<br />
Unternehmen umfasst. </li>
<li>Der S&P 500 ist nach der Marktkapitalisierung gewichtet und gehört zu den meistbe‐<br />
achteten Aktienindizes der Welt. </li>
</ul>
<h3>E-mini S&P 500 Future</h3>
<ul>
<li>Der S&P 500 Future (Kürzel: ES) gehört zu den am häufigsten gehandelten und liquidesten Future der Welt.</li>
<li>Der Future basiert auf dem S&P 500 Index, einem breit aufgestellten Index, der als Benchmark für die US-Aktienmärkte dient.</li>
<li>1997 wurde dieser Kontrakt von der Chicago Mercantile Exchange (CME) eingeführt, weil der bestehende Future auf den S&P 500 Index einen sehr großen Multiplikator hatte.</li>
<li>Dieser Future wurde im Jahr 1982 mit einem Multiplikator von 500 eingeführt und auf dem Börsenparkett von Chicago gehandelt.</li>
<li>Um die Liquidität zu erhöhen und den Future für die breite Masse attraktiver zu machen, führte die CME 15 Jahre später den E-mini S&P 500 Future ein. Der E-Mini hat einen Multiplikator von 50 und wird vollständig elektronisch über das Globex-System gehandelt. </li>
<li>Im übrigen entschied die CME nach Einführung des neuen Kontrakts, auch den Multiplikator des großen Kontrakts auf 250 zu halbieren.</li>
<li>Noch existieren beide Kontrakte nebeneinander und der ursprüngliche Future wird während des amerikanischen Handels auf dem Börsenparkett gehandelt. Ehrlicherweise muss man aber sagen, dass das Volumen des großen Bruders im Vergleich mit dem E-mini S&P 500 vergleichsweise sehr gering ist. Allerdings muss man festhalten, dass durch diesen Kontrakt die meisten Index-Futures in den letzten Jahrzenten viel an Popularität gewonnen haben.</li>
<li>Der E-mini S&P 500 Future ist ein Kontrakt, in welchem sowohl institutionelle als auch private Anleger tätig sind. Das Tagesvolumen liegt bei über 1 Million Kontrakte und der Handel ist 23 Stunden am Tag, an 5 Tagen in der Woche möglich. Da der Handel fast ununterbrochen stattfindet, sind Sie immer in der Lage, eine Position mit einem Stop-Loss abzusichern. Sollte nachts, wenn Sie schlafen, etwas in der Welt passieren und die Kurse würden dadurch am nächsten Tag viel niedriger eröffnen, dann sind Sie bereits aus Ihrer Position ausgestiegen, da der Stop-Loss seine Arbeit getan hat.</li>
<li>Der Future selbst ist ein Indikator für die Preisentwicklung an den US-Märkten. Weil der Future fast durchgängig gehandelt wird, liefert dieser quasi jederzeit einen Indikator für das Verhalten an den US-Märkten. Wenn die europäischen Märkte um 9 Uhr öffnen, kann anhand des S&P 500 Future ein Eröffnungsindikator von den US-Märkten abgeleitet werden. Und wie es oft der Fall ist, geben die amerikanischen Märkte die Richtung vor.</li>
<li>Der Kontrakt ist leicht handelbar, da die Liquidität hoch ist. Die Anzahl der angebotenen Kontrakte auf der Geld- (Bid) und Briefseite (Ask) bewegen sich außerhalb der regulären Handelszeiten zwischen 100 und 200. Ab 15:30 Uhr steigt diese Zahl auf einen Durchschnitt von 500 Einheiten an. Durch den Multiplikator von 50 ist jeder Punkt 50 US-Dollar wert. Die minimale Tickgröße beträgt 0,25 Punkte, womit die Differenz zwischen Bid- und Ask-Preis nominal 12,50 US-Dollar beträgt.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/S%26P_500" target="_blank" rel="noreferrer noopener">Wikipedia :: S&P 500</a></li>
<li><a href="https://www.lynxbroker.de/boerse/boerse-kurse/futures/futures-news-tipps/der-e-mini-sp-500-meine-top-5-futures/" target="_blank" rel="noreferrer noopener">
Lynxbroker :: E-Mini S&P 500</a></li>
<li><a href="https://corporatefinanceinstitute.com/resources/knowledge/trading-investing/sp-500-index-ticker-symbol/" target="_blank" rel="noreferrer noopener">
Corporate Finance Institute :: S&P 500 Ticker symbol</a></li>
</ul>
</html>
<html>
Wer an der Börse Gewinne erzielt, will diese möglichst ungeschmälert<br />
kassieren. Deswegen ist es wichtig, auch steuerliche Freibeträge, Steuer‐<br />
pauschbeträge und Steuerfreigrenzen unterscheiden zu können.
<h3>Was ist ein Steuerfreibetrag?</h3>
<h3>Wie wirkt sich ein Steuerpauschbetrag aus?</h3>
<h3>Was sind Steuerfreigrenzen?</h3>
<h3>Links:</h3>
<ul>
<li>Focus‐Money 38/2022, S. 46</li>
</ul>
</html>
<html>
<ul>
<li>Funktionsweise einer Dividendenzahlung:<br />
Man kauft sich Aktien von einem Unternehmen, welches Teile deines<br />
Gewinns in Form von Dividenden an die Aktionäre ausschüttet. Je<br />
nach Land und Unternehmen kann man mitunter mehrmals im Jahr<br />
eine Dividendenauszahlung für seine Aktie erhalten.<br />
</li>
<li>Nun gibt es aber einige Unternehmen, welche statt der Bardividende<br />
alternativ auch neue Aktien anbieten. Diese werden Stockdividende ge‐<br />
nannt. Diese Form der Dividendenausschüttung wird oft auch Bonus‐<br />
aktien, Aktiendividende, Wertpapierdividende oder eben Stockdividende<br />
genannt.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Gratisaktie" target="_blank" rel="noreferrer noopener">Wikipedia :: Gratisdividende</a></li>
<li><a href="https://podcast.app/stockdividende-e97942090/" target="_blank" rel="noreferrer noopener">Podcast “Dividenden‐Alarm“ :: Stockdividende</a></li>
</ul>
</html>
<html>
<ul>
<li>Kursuntergrenze</li>
<li>Wird der von Ihnen angegebene Limit-Kurs erreicht oder unterschritten,<br />
so wird zum nächsten handelbaren Kurs ausgeführt.</li>
<br />
<li><b>Trailing-Stop: Wenn sich dynamische Stop-Loss-Limits an den Markt anpassen</b><br />
<p>
Durch eine Stop-Loss-Limit-Order sind Sie so gut abgesichert, wie es im Aktienbereich nun einmal geht. Allerdings: Die Börsen sind ständig in Bewegung, da ist nichts statisch. Daher sollten Sie ein einmal gesetztes Limit, das eine längere Gültigkeitsdauer hat, gelegentlich überprüfen. Wenn Sie beispielsweise eine Verlustgrenze von 10 % wünschen und der Kurs Ihrer Aktie gestiegen ist, sollten Sie das Limit nachziehen.
</p>
<p>
Dieser Vorgang lässt sich auch automatisieren, indem Sie die Funktion “Trailing-Stop-Loss-Order“ nutzen. Das ist eine Stop-Order, die auf Basis Ihrer Vorgaben dem aktuellen Marktgeschehen folgt. Der Abstandswert, den Sie in Prozent oder in Euro setzen können, gibt an, mit wie viel Abstand sich das Limit automatisch nach oben anpasst. Wenn Sie eine “Toleranz nach Stop“ setzen, wird die Order bei Erreichen oder Unterschreiten der Kursschwelle (Trailing-Stop-Loss) in eine Limit-Order umgewandelt.
</p>
<p>
Beispiel für ein Trailing-Stop-Loss: Der Kurs der Aktie liegt bei 100 Euro und Sie setzen den Folge-Abstand (Trailing-Wert) für Ihren Stop-Kurs bei 10 Euro. Der Stop-Kurs liegt zunächst bei 90 Euro. Steigt die Aktie auf 120 Euro, wird der Stop-Kurs nachgezogen, in dem Fall auf 110 Euro (Sie haben ja festgelegt, dass der Abstand 10 Euro betragen soll). Das ist dann Ihr neuer Stop-Kurs. Bei einem fallenden Kurs bleibt der Stop-Preis unverändert. Sobald der Börsenkurs Ihrer Aktie den Stop-Kurs erreicht oder unterschreitet, wird die Aktie zum nächsten handelbaren Kurs verkauft.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.hermoney.de/ihr-wissen/investieren/aktien/stopp-loss-limits/" target="_blank" rel="noreferrer noopener">HerMoney.de :: Depot absichern: So funktionieren Stopp-Loss-Limits & Co.</a></li>
<li><a href="https://www.tagesschau.de/wirtschaft/finanzen/stop-loss-order-101.html" target="_blank" rel="noreferrer noopener">Tagesschau.de :: Ordertypen : Die Stop‐Loss‐Order ‐ gewusst wie</a></li>
<li><a href="https://admiralmarkets.com/de/wissen/articles/forex-strategy/stop-loss-forex-trading" target="_blank"
rel="noreferrer noopener">Admiral‐Markets :: Stopp Loss</a></li>
<li><a href="https://www.rechnungswesen-verstehen.de/lexikon/stop-loss.php" target="_blank" rel="noreferrer noopener">
Rechnungswesen‐verstehen :: Stop Loss</a></li>
<li><a href="https://www.aktienrunde.de/trailing-stop-loss/" target="_blank" rel="noreferrer noopener">Aktienrunde :: Trailing Stop Loss berechnen und richtig setzen</a></li>
<li><a href="https://markteinblicke.de/28605/2013/01/stop-loss-richtig-gesetzt-teil-1/" target="_blank" rel="noreferrer noopener">
Markteinblicke :: Stop-Loss richtig gesetzt (Teil 1)</a></li>
<!--
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
-->
</ul>
</html>
<html>
<meta TOM />
<ul>
<li>“TOM“ := “Turn of the month“</li>
<li>Monatswechselstrategie für Aktien‐ETFs</li>
<li><h3>Einstieg:</h3>
<ul>
<li>der Einstieg erfolgt am <b>letzten</b> Handelstag eines Monats zum<br />
Kassaschlusskurs;<br />
<em>da es den Kassakurs nicht mehr gibt, stattdessen den Kurs um<br />
die Mittagszeit (12:00 oder 13:00) nehmen;</em></li>
<li>ein Einstieg wird <b><em>nur</em></b> zugelassen, wenn der zugrunde liegende <br />
ETF‐Kurs am Ende des Monats <b>oberhalb</b> seines GD(100)<br />
[<em>Gleitender Durchschnitt über 100 Tage</em>] notiert<br />
(einfacher Trendfilter, zur Vermeidung von Investitionen in Bä‐<br />
renmärkten);</li>
</ul>
</li>
<li><h3>Ausstieg:</h3>
<ul>
<li>erfolgt am <b>vierten</b> Tag des neuen Monats zum (Kassa‐)Schluss‐<br />
kurs;</li>
</ul>
</li>
<li><h3>empfohlene Aktien‐ETFs:</h3>
<ul>
<li><b>US‐Technologie‐Aktien‐ETF</b><br />
<table>
<th colspan=2><center>Invesco QQQ Trust</center></th>
<tr><td>US‐Tickersymbol</td><td>QQQ</td></tr>
<tr><td>WKN</td><td>801498</td></tr>
<tr><td>ISIN</td><td>IE0032077012</td></tr>
<tr><td>Kurs am 26/10/2022</td><td>$ 278</td></tr></table>
</li>
<li><b>Emerging Markets‐Aktien‐ETF</b><br />
<table>
<th colspan=2><center>iShares MSCI‐Emerging Markets‐Aktien</center></th>
<tr><td>US‐Tickersymbol</td><td>EEM</td></tr>
<tr><td>WKN</td><td>469253</td></tr>
<tr><td>ISIN</td><td>US4642872349</td></tr>
<tr><td>Kurs am 26/10/2022</td><td>$ 35</td></tr>
</table>
</li>
</ul>
</li>
<li>Beide ETFs werden dabei mit 50 Prozent der verfügbaren Kapital‐<br />
summe gehandelt, aufgelaufene Gewinne jeweils reinvestiert.</li>
<li>Am erfolgreichsten erwies sich eine Haltedauer von vier Tagen.</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Traders' Magazin, 10/2022, S. 54ff</li>
<li><a href="https://www.ariva.de" target="_blank" rel="noreferrer noopener">Ariva</a> (zum Auffinden der WKN & ISIN zum Tickersymbol)</li>
</ul>
</html>
<html>
<ul>
<li>Er besagt: <br />
Gewinnt ein Team aus der National Football Conference (NFC) den Super Bowl,<br />
wird es ein gutes B¨rsenjahr, ist hingegen ein Team aus der Konkurrenzliga<br />
American Football Conference (AFC) erfolgreich, werden die Kurse fallen.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>DSW-Newsletter, September 2022, S. 10f </li>
</ul>
</html>
<html>
<meta "Tracking Error" "Tracking Difference" />
Eines der wichtigsten Qualitätsmerkmale eines Indexfonds (ETF) ist, wie<br />
genau er den Index abbildet. Die Abbildungsgenauigkeit lässt sich mes‐<br />
sen ‐ mit den Kennzahlen Tracking Error und Tracking Difference.
<ul>
<li><h3>Was ist die Rolle der Kennzahlen?</h3>
Beide Kennzahlen sind nützliche Istrumente beim Vergleich von ETFs, die den<br />
gleichen Index abbilden. Sie ergänzen andere Vergleichspunkte wie Größe, Li‐<br />
quidität, Anbieter oder die Art der Indexabbildung.<br />
</li>
<li><h3>Was ist der Tracking Error?</h3>
Der Tracking Error misst die Streuung des ETF-Kurses um den Mittelwert des<br />
Index, also die Standardabweichung der Fondsrendite um die Indexperforman‐<br />
ce. Je geringer diese ist, desto stabiler folgt der ETF seinem Index.<br />
</li>
<li><h3>Was ist die Tracking Difference?</h3>
Die Tracking Difference misst die Abweichung der ETF-Rendite von der Index‐<br />
performance zum Ende eines Beobachtungszeitraums, unabhängig von den<br />
Bewergungen innerhalb dieses Zeitraums. Während die Tracking Difference<br />
also im Ziel misst, wie weit der ETF von seiner Spur abweicht, sagt der Trac‐<br />
king Error etwas aus über die Fehltritte auf dem Weg dorthin.<br />
</li>
<li><h3>Was ist für Privatanleger wichtiger?</h3>
Wem die Rendite bei einem Investment am wichtigsten ist, für den stellt die<br />
Tracking Difference die wichtigere Kennzahl dar. So gilt sie bei vielen priva‐<br />
ten Anlegern derzeit als ausschlaggebendes Kriterium bei der Auswahl eines<br />
ETF, nicht zuletzt, wei sie einfach zu ermitteln ist.<br />
</li>
<li><h3>Was ist bei der Beurteilung der Kennzahlen zu beachten?</h3>
Beide Kennzahlen werden mit historischen Daten berechnet und bieten keine<br />
Garantie für die Zukunft. Wenn zum Beispiel ein swapbasierter ETF, der einen<br />
komplexeren Index abbildet, auf physische Abbildung umgestellt wird, erhöht<br />
sich mit hoher Wahrscheinlichkeit der Tracking Error. In der Regel sind beide<br />
Kennzahlen umso valider als Prognoseinstrument, je länger der Beobachtungs‐<br />
zeitraum gewählt wird. Da das Management und die Effizienz eines ETF-Anbie‐<br />
ters sich ändern können, sollten die Kennzahlen von Zeit zu Zeit erhoben wer‐<br />
den. So lassen sich Optimierungen bei ETFs erkennen und nutzen.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus‐Money 48/2021, S. 57</li>
</ul>
</html>
<html>
<ul>
<li>für kurzfristigen Zeithorizont (Tage bzw. Wochen)</li>
<li>in erster Linie für Posten mit weniger als 100 Aktien</li>
<li><h3>Beispiel: Blackrock</h3>
<img src="./pictures/Boersenseminar_20220719.png" height=823 width=582 />
<ul>
<li><h4>Einstieg:</h4>
<ul>
<li><h5>Stochastik:</h5></li>
<li><h5>MACD:</h5></li>
<li><h5>RSI:</h5></li>
</ul>
</li>
<li><h4>Ausstieg:</h4>
<ul>
<li><h5>Stochastik:</h5></li>
<li><h5>MACD:</h5></li>
<li><h5>RSI:</h5></li>
</ul>
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>UMWA ‐ Boersensupport, 19.07.2022</li>
</ul>
</html>
<html>
<ul>
<li><h3>14.07.2022 ‐ Donnerstag (Börsenbrief)</h3>
<ul>
<li>Unsicherheit in der Wirtschaft durch Unsicherheit in der Gaslieferung</li>
<li>Chinesische Aktien mit ausgezeichneter Perspektive (Teil 1 von 2) ::<br />
<ul>
<li>JD.com, Inc. (JD)</li>
</ul></li>
<li>Rezessionsstabile Unternehmen aus allen Sektoren (4 von 4) :: <br />
<ul>
<li>Im Sektor <b>Financials (XLF)</b> werden empfohlen:
<ul>
<li><a href="https://investor.travelers.com/home/default.aspx" target="_blank" rel="noreferrer noopener">Travelers (TRV) </a> </li>
<li><a href="https://ir.berkley.com/" target="_blank" rel="noreferrer noopener">W.R. Berkley (WRB) </a> </li>
<li><a href="https://investors.chubb.com/home/default.aspx" target="_blank" rel="noreferrer noopener">Chubb (CB) </a> </li>
<li><a href="https://ir.loews.com/" target="_blank" rel="noreferrer noopener">Loews (L) </a> </li>
<li><a href="https://www.berkshirehathaway.com/" target="_blank" rel="noreferrer noopener">Berkshire Hathaway (BRK-B) </a> </li>
</ul></li>
<li>Im Sektor <b>Healthcare (XLV)</b> werden empfohlen:
<ul>
<li><a href="https://investors.amgen.com/" target="_blank" rel="noreferrer noopener">Amgen (AMGN) </a> </li>
<li><a href="https://investors.gilead.com/" target="_blank" rel="noreferrer noopener">Gilead (GILD) </a> </li>
<li><a href="https://www.merckgroup.com/en/investors.html" target="_blank" rel="noreferrer noopener">Merck (MRK) </a> </li>
<li><a href="https://www.investor.jnj.com/" target="_blank" rel="noreferrer noopener">J&J (JNJ) </a> </li>
<li><a href="https://www.bms.com/investors.html" target="_blank" rel="noreferrer noopener">Bristol-Myers (BMY) </a> </li>
</ul>
</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>01.11.2021 - Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<b>Achtung Zeitumstellung!</b> Diese Woche Öffnungszeiten an der Börse 14:30 ‐ 21:00 Uhr<br />
<br />
<ul>
<li>Ein interessantes Monatsende liegt hinter uns</li>
<li>Beachtenswerte Earnings </li>
<li>Tagestipp: Facebook (FB)</li>
<li>Empfehlungen:<br />
<img src="./pictures/UMWA-Boersenbrief_Empfehlungen_2021-11-01.png" height=392 width=621 /></li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>04.07.2022 ‐ Montag (Börsenbrief)</h3>
<ul>
<li>Halbzeit</li>
<li>Beachtenswerte Termine</li>
<li>Tagestipp: Kein Tagestipp, aber ein Hinweis</li>
<li>Empfehlungen</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>11.07.2022 ‐ Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li>Spannung vor Beginn der Earningssaison</li>
<li><b>Beachtenswerte Termine</b>:<br />
<br />
<ul>
<li><b>Eine Erfahrung aus der letzten Rezession:</b><br />
Unternehmen, die ihre Dividenden auch in Rezessionen weiter erhöhen,<br />
sind die Unternehmen, die man besitzen sollte.</li>
<br />
</ul></li>
<li>Zwei Tagestipps: <b>BABA</b> und <b>SHOP</b></li>
<li>Empfehlungen</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>18.07.2022 ‐ Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li>Sehen wir bald eine Stabilisierung am Markt?</li>
<li>Beachtenswerte Termine</li>
<li>Tagestipp: AT&T (T) und Bristol Myers Sqibb (BMS)</li>
<li>Empfehlungen</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>20.06.2022 ‐ Montag (Börsenbrief)</h3>
<ul>
<li>Warum der SPY höchstens noch 300 Punkte fallen darf</li>
<li>Beachtenswerte Termine</li>
<li>Tagestipp: Kein Tipp, aber ein “was wäre, wenn“ die Börse offen wäre</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>21.03.2022 ‐ Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li>Wissenswertes zum Handel mit chinesischen Aktien</li>
<li>Wissenswertes zu Microsoft (<b>MSFT</b>)</li>
<li>Beachtenswerte Earnings </li>
<li>Empfehlungen</li>
<li>Tagestipp: Petròleo Brasileiro S.A. (<b>PBR</b>)</li>
</li>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>21.07.2022 ‐ Donnerstag (Börsenbrief)</h3>
<ul>
<li>Energiewende durch die Hintertür?</li>
<li>Weißt Du, was ein “Wash out“ ist?</li>
<li>Auf und Ab? ‐ oder nun endlich “Auf“ im Kryptomarkt?</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>23.06.2022 ‐ Donnerstag (Börsenbrief)</h3>
<ul>
<li>Die Wechselwirkung von Zinsen und Inflation</li>
<li>Wie positionieren wir uns ‐ und wie machen das die Investmentbanken?</li>
<li>Erläuterung zur Serie über rezessionsstabile Unternehmen</li>
<li>Kurzvorstellung rezessionsstabiler Unternehmen (1 von 4)</li>
</ul></li>
</ul>
</html>
<html>
<ul>
<li><h3>28.07.2022 ‐ Donnerstag (Börsenbrief)</h3>
<ul>
<li>Die Fed hat die Erwartungen erfüllt</li>
<li><b>Wissenswertes rund um “Rezession“:</b><br />
<ul>
<li>Darauf sollten wir uns einstellen:
<ul>
<li>Wenn das BIP von zwei Quartalen unter dem Wert des Vorjahres<br />
liegt, spricht man von einer Rezession. <br />
</li>
<li>Abgesehen vom BIP, was gehört noch zu einer Rezession?
<ul>
<li>Fallende Börsenkurse </li>
<li>Abbau von Überstunden und beginnende Kurzarbeit</li>
<li>Kündigung von Arbeitskräften </li>
<li>Stilllegung von Produktionsanlagen</li>
<li>Weniger oder ausbleibende Investitionen</li>
<li>Stagnierende oder sinkende Preise, Löhne und Zinsen</li>
<li>Rückgang der Nachfrage</li>
<li>Überfüllte Lager</li>
</ul>
</li>
</ul></li>
<li>Das wäre ein alternatives Szenario</li>
</ul>
<br />
</li>
<li>REITs als alternative Anlageklasse in einer Rezession</li>
</li>
</ul>
</li>
</ul>
</ul>
</html>
<html>
<ul>
<li><h3>29.07.2022 ‐ Freitag (Update + Dividenden + Tagestipp)</h3>
<ul>
<li>Wissenswertes zur Steuer in Deutschland </li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Dividendentitel ‐ Warum sie langfristig so erfolgreich sind (am Beispiel von 3M Comp.)</li>
<li>Tagestipp heute: Alliance Resources Partners (ARLP)</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>30.06.2022 - Donnerstag (Börsenbrief)</h3>
<ul>
<li>Anmerkungen zum Crash im Kryptomarkt</li>
<li><details><summary>Kurzvorstellung rezessionsstabiler Unternehmen (Teil 2 von 4)</summary>
<ul>
<h3>Im Sektor Utilities (XLU) werden empfohlen:</h3>
<li><a href="https://ir.dteenergy.com/home/default.aspx" target="_blank" rel="noreferrer noopener">DTE Energie (DTE)</a> </li>
<li><a href="https://investors.dominionenergy.com/home/default.aspx" target="_blank" rel="noreferrer noopener">Dominion (D)</a></li>
<li><a href="https://investor.pseg.com/home/default.aspx" target="_blank" rel="noreferrer noopener">Public Service Enterpr. (PEG)</a></li>
<li><a href="https://www.duke-energy.com/our-company/investors" target="_blank" rel="noreferrer noopener">Duke Energy (DUK)</a></li>
<li><a href="https://www.amereninvestors.com/Home/default.aspx" target="_blank" rel="noreferrer noopener">Ameren (AEE)</a></li>
<h3>Im Sektor Real Estate (XLRE) werden empfohlen:</h3>
<li><a href="https://ir.healthpeak.com/" target="_blank" rel="noreferrer noopener">Healthpeak Properties (PEAK)</a></li>
<li><a href="https://ir.maac.com/corporate-profile/default.aspx" target="_blank" rel="noreferrer noopener">Mid-America Apartments (MAA)</a></li>
<li><a href="https://www.avaloncommunities.com/about-us" target="_blank" rel="noreferrer noopener">AvalonBay (AVB) </a></li>
<li><a href="https://welltower.com/investors/" target="_blank" rel="noreferrer noopener">Welltower (WELL)</a></li>
<li><a href="https://www.realtyincome.com/investors" target="_blank" rel="noreferrer noopener">Realty Income (O)</a></li>
<h3>Im Sektor Industrials (XLI) werden empfohlen:</h3>
<li><a href="https://investors.3m.com/ir-home/default.aspx" target="_blank" rel="noreferrer noopener">3M (MMM)</a></li>
<li><a href="https://investorrelations.gd.com/ir-home/default.aspx" target="_blank" rel="noreferrer noopener">General Dynamics (GD)</a></li>
<li><a href="https://investor.republicservices.com/" target="_blank" rel="noreferrer noopener">Republic Services (RSG)</a></li>
<li><a href="https://investors.ametek.com/" target="_blank" rel="noreferrer noopener">AMETEK (AME)</a></li>
<li><a href="https://investors.wm.com/" target="_blank" rel="noreferrer noopener">Waste Management (WM)</a></li>
</ul>
</li>
</ul></li>
</ul>
</html>
<html>
<ul>
<li><b>VWAP</b> :=: Volume Weighted Average Price</li>
</ul>
</html>
<html>
Volatilität wird von Anlegern fast ausschließlich mit Risiko assoziiert, gerade in<br />
Tagen mit Einbrüchen wie nach dem Banken‐Beben an der US‐Westküste.<br />
Doch das greift zu kurz.<br />
<ul>
<li><h3>Was ist Volatilität?</h3>
Ganz grundsätzlich wird darunter ein Schwankungsbereich während eines<br />
bestimmten Zeitraums verstanden, zum Beispiel der Kurse von Aktien und<br />
Anleihen, aber auch von Devisennotierungen, Rohstoffpreisen oder Zins‐<br />
sätzen. Angegeben wird die Volatiltät in der Regel in Prozent.<br />
</li>
<li><h3>Warum ist sie eine Risiko‐Kennzahl?</h3>
Weil sie zeigt, welche Kursverluste man mit einer Aktie (oder einem belie‐<br />
bigen anderen Investment) in einem gewissen Zeitabschnitt erleiden kann.<br />
Dabei gilt: Je größer der Wert, desto höher ist auch das Risiko einzuschä‐<br />
tzen. Das gilt auch auf der Ebene der Indizes. Deswegen werden Volatili‐<br />
tätsindizes wie der VDax‐New, der die erwarteten Kursschwankungen<br />
(implizite Volatilität) des Dax für die nächsten 30 Tage abbildet, so stark<br />
beachtet. In den USA misst der Volatilitätsindex Vix die implizite Volatili‐<br />
tät von Optionen auf den US‐amerikanischen S&P‐500‐Aktien‐Index und<br />
bildet ebenfalls die am Terminmarkt erwartete Schwankungsbreite oder<br />
implizite Volatilität des S&P‐500‐Index für die kommenden 30 Tage ab.<br />
</li>
<li><h3>Warum geht es nicht nur um Risiko?</h3>
Eine hohe Volatiltät zeigt nicht nur Risiken an. Sie bietet Anlegern auch<br />
die Chance auf hohe Kursgewinne. Dann an der Volatilität lässt sich ab‐<br />
lesen, wie sehr der Kurs einer Aktie im Mittel von der durchschnittlichen<br />
Wertentwicklung abweichen kann ‐ nach oben und nach unten! Beispiel:<br />
Anleger, die sich zwischen einer Aktie mit 20 Prozent Vola und einer mit<br />
30 Prozent unterscheiden sollen, wissen zunächst nur, dass aktuell mit<br />
der ersten Aktie voraussichtlich geringere Einbußen zu befürchten sind<br />
als mit dem zweiten Papier. Aber ebenso, dass sie mit der ersten Aktie<br />
‐ rein statistisch ‐ weniger Ertrag erzielen können als mit dem zweiten<br />
Dividendenpapier. Anhand der Vola wissen Anleger nicht, wohin die Rei‐<br />
se geht, sondern nur, dass sie entweder auf einer ziemlich geraden<br />
Straße oder auf einer recht kurvigen Etappe unterwegs sein werden.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus Money 12/2023 (15.03.2023), S. 58</li>
</ul>
</html>
<html>
<meta charset="utf-8" Vix VDAX />
Wenn der Volatilitätsindex steigt, dann ist's in der Welt und <br />
an der Börse nicht langweilig, das steht fest, Das Barometer<br />
zeigt das Nervenspiel der Märkte bei besonderen Ereignis‐<br />
sen. Wie er Anlegern als Kompass dient.
<h3>Was erzeugt Volatilität?</h3>
Wie steht es um den Russland‐Ukraine‐Konflikt? Marschieren <br />
die Russen nun ein oder nicht? Für Anleger sind das nerven‐<br />
aufreibende Zeiten, weiß man doch nicht, was kommt. Das<br />
schürt Unsicherheiten an den Börsen. Hektik kommt auf, Ab‐<br />
verkäufe beginnen. Andere Markteilnehmer nutzen das wie‐<br />
derum für Kaufgelegenhiten. Das führt zu einer höheren In‐<br />
tensität an Kursschwankungen. Die Fole: Mal verliert ein In‐<br />
dex an einem Tag drei Prozent, um am nächsten wieder <br />
zwei Prozent zuzlegen. Ob dieZeiten unruhig bleiben und die<br />
Nervosität vielleicht sogar weiter steigt, lässt sich aus dem<br />
Volatilitätsindex (Vix) ablesen. Er ermittelt in Echtzeit die<br />
Markterwartungen für die Schwankungsintensität (implizierte<br />
Volatilität; Gegenstück: historische Volatilität) innerhalb der<br />
nächsten 30 Tage.
<h3>Berechnung des Stimmungsindikators</h3>
Der Vix ist das (Angst-)Barometer des Chicago Board Options Exchange (CBOE),<br />
also der US-Börse für Optionshandel. Er dient als Risikoindikator und berechnet<br />
sich aus den Kursen der Index-Optioen auf den S&P-500. Das Ergebnis ist immer<br />
über null und drückt sich in Prozent aus. Ein hoger Wert lässt sich auf turbulente<br />
Zeiten schließen, ein niedriger Satz spricht für eine Entwicklung ohne starke Kurs‐<br />
schwankungen. Daraus läßt sich aber nicht ablesen, ob die Kurse steigen oder<br />
fallen. Als Grundregel gilt jedoch: Steigt der Vix, fäll der S&P‐500.
<h3>Panik oder Entspannung beim Dax?</h3>
Das deutsche Pendant zum VIX st der VDax‐New. Er basiert auf den gehandelten<br />
Dax‐Optionen und misst entsprechend die Schwankugsbreite des deutschen Leit‐<br />
index in den nächsten 30 Tagen (VDax: 45 Tage). Beispiel: Steht der VDax‐New<br />
bei 15 Prozent, bedeutet das, dass die Börsianer mit einer Volatilität von 15 Pro‐<br />
zent um den annualisiserten Mittelwert des Dax zu rechnen haben. Den bislang<br />
höchsten Wert erzielte der VDax-New im März 2020, als er aufgrund von Corona<br />
bei über 85 Prozent lag (Stand 15. Februar 2020: 26 Prozent). Sowohl auf den VIX<br />
wie auch auf den VDax‐New gibt es Anlageprodukte.
<h3>VIX:</h3>
The most well-known measure of market sentiment is the CBOE Volatility Index,<br />
or VIX. The VIX measures expected price fluctuations or volatility in the S&P 500<br />
Index options over the next 30 days. The VIX often drops on days when the broader<br />
market rallies and soars when stocks plunge. But the key is to look at the VIX over<br />
time. It tends to be lower in bull markets and higher when the bears are in control.<br />
The Fear & Greed Index uses increasing market volatility as a signal for Fear.<br />
<h3>Links:</h3>
<ul>
<li>Focus‐Money, 09/2022, pg. 9</li>
<li><a href="https://edition.cnn.com/markets/fear-and-greed" target="_blank" rel="noreferrer noopener">Abschnitt “VIX“ auf der Fear&Greed‐Seite von CNN Business</a></li>
</ul>
</html>
<html>
<meta Cable Swissy Loonie />
Manche Währungspaare haben eine Art Spitznamen, so steht “Cable“ im<br />
Fachjargon für das Währungspaar britisches Pfund Sterling gegen US Dol‐<br />
lar. Der Devisenmarkt folgt eigenen Gesetzen - und Begriffen.<br />
<ul>
<li><h3>Woher kommt der Name “Cable“?</h3>
<p>
Der Namen für das Währungspaar geht auf das Kabel zurück, das unterhalb<br />
des Atlantiks verlief, um den Wechselkurs zu übertragen. Im Jahr 1866 war<br />
die erste telegrafische Kabelverbindung als Tiefseekabel durch den Atlantik<br />
verlegt worden (Cable = Kabel), sie verband ab diesem Zeitpunkt Großbritan‐<br />
nien mit den USA.<br />
</p>
<p>
Mag die Technologie das Kabel überflüssig gemacht haben, der traditions‐<br />
reiche Name ist geblieben. Mit den gängigen Abkürzungen wird das Paar<br />
typischerweise GBP/USD oder GBPUSD geschrieben. Devisenhändler, <br />
die speziell den ganzen Handelstag nur “Cable“ (GBP/USD) weltweit am<br />
Devisenmarkt handeln, bezeichnet man als “Cabledealer“.<br />
</p>
<p>
Übrigens:<br />
In seltenen Fällen wird auch allein der Preis des Pfund Sterling als “Cable“<br />
bezeichnet.
</p>
</li>
<li><h3>Gibt es weitere derartige Währungsbezeichnungen?</h3>
Andere Spitzname für Währungspaare sind “Loonie“ für CAD/UAD (kana‐<br />
discher Dollar/amerikanische Dollar) und “Swissy“ für CHF/USD (Schwei‐<br />
zer Franken/US Dollar).<br />
</li>
<li><h3>Wieso ist der Bezugspunkt immer der US‐Dollar?</h3>
Das liegt schlicht daran, dass der amerikanische Dollar als mit Abstand<br />
wichtigste Währung der Welt auch die am häufigsten genutzte Notierungs‐<br />
währung darstellt.<br />
</li>
<li><h3>Notierungswährung ‐ was ist das nun wieder?</h3>
Die Notierungswährung ist jeweils die zweitgenannte Währung in einem<br />
Devisenpaar. Sie wird auch als Gegenwährung bezeichnet. Die an erster<br />
Stelle aufgeführte Währung ist hingegen die Basiswährung. “Der Kurs<br />
eines Währungspaars spiegelt den Preis einer Einheit der Basiswährung<br />
durch den Verkauf der Notierungswährung wider“, erläutern die Experten<br />
von IG. “Beim GBP/USD ist USD die Notierungswährung. Beim EUR/CHF<br />
ist CHF die Notierungswährung.“<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus Money 06/2023 (01.02.2023), S. 29</li>
</ul>
</html>
<html>
<ul>
<li>Von vielen unbemerkt entstehen derzeit im Segment für Zinstitel, das<br />
um ein Vielfaches größer ist als der Aktienmarkt, massive Verluste. Wa‐<br />
rum und wie weit die eigentlich sicheren Papiere bei weiteren Zinsschüben fallen.</li>
<li><h3>Der Preis sinkt, wenn die Konkurrenz steigt</h3>
Anlegen erhoffen sich von Zinspapieren regelmäßige Erträge bei hoher<br />
Sicherheit. In den vergangenen Dekaden hat das wunderbar funktioniert. <br />
Zwar wurden die laufenden Einnahmen aufgrund der Nullzinspolitik wich‐<br />
tiger Notenbanken stetig geringer, dafür aber gab es Kursgewinne. Doch<br />
nachdem die Renditen in den USA oder der Euro‐Zone von historisch<br />
niedrigen Niveaus merklich steigen, erleiden selbst US‐Treasuries, der <br />
Goldstandard unter den Anleihen, dramatische Verluste. Denn neu auf‐<br />
gelegte Papiere werfen auf einmal viel mehr ab. So verloren zehn Jahre<br />
laufende US‐Treasuries mehr als zehn Prozent, entsprechende Bundes‐<br />
anleihen sogar fast 15 Prozent. Aber auch andere Faktoren bringen Zins‐<br />
papiere zum Absturz: drohende oder eingetretene Staatspleiten etwa <br />
oder Schieflagen einzelner Firmen.<br />
</li>
<li><h3>Je länger, desto riskanter</h3></li>
Besonders, wenn die Restlaufzeit einer Anleihe noch lang ist, fallen die Kurseinbußen<br />
bei Zinssteigerungen deutlich aus ‐ einfach, weil dann deren nun relativ gesehen schlech‐<br />
tere Verzinsung für eine größere Dauer festgeschrieben ist. Als Daumenregel gilt: Steigen<br />
die Marktrenditen um einen Prozentpunkt, verlieren Anleihen mit zehn Jahren (Rest‐)Lauf‐<br />
zeit rund zehn Prozent. Würde also der Marktzins für zehnjährige Papiere von derzeit<br />
rund einem Prozent auf drei Prozent steigen, würden Bundesanleihen dieser Fälligkeit<br />
rund 20 Prozent verlieren. Kleiner Trost: Am Ende der Laufzeit gibt es bei den soliden<br />
Zinspapieren den Nennwert zu 100 Prozent zurück.<br />
<li><h3>Es geht um sehr viel Geld</h3></li>
Der aktuell Ausverkauf trifft Millionen Menschen, oft indirekt. Denn viele Versicherer<br />
und Pensionskassen müssen gesetzlich hohe Bestände an Zinspapieren halten. Zudem ist<br />
der Anleihenmarkt eine wichtige Finanzierungsquelle für Staaten und Unternehmen. Der<br />
globale Anleihenmarkt ist mit über 120 Billionen Dollar Volumen geschätzt fünfmal so<br />
groß, wie der summierte Aktienmarkt. Entsprechend hoch sind auch die aktuellen gesamten<br />
Verluste.<br />
</ul>
<h3>Links:</h3>
<ul>
<li>Focus‐Money 23/2033 (1. Juni 2022), S. 52</li>
</ul>
</html>
<html>
<head>
<meta charset="utf-8" gaps
</head>
<body>
<ul>
<li><h4>Warum Gaps entstehen</h4>
Zumeist beginnen die Notierungen von Aktien oder Indizes den<br />
nächsten Handelstag etwa auf dem Niveau des Vortags. In beweg‐<br />
ten Börsenzeiten wie jetzt ‐ aufgrund des Ukraine‐Kriegs und der<br />
US‐Zinswende ‐ kommt es verstärkt zu markanten Kurslücken nach<br />
oben oder unten, auf Englisch “<em>Gaps</em>“. Das kann an Notenbanker‐<br />
Äußerungen oder Entwicklungen im Konfligktgeschehen liegen. So<br />
schloss der Dax am Tag vor Russlands Invasion (23.2.) mit 14 631<br />
Punkten, um am Tag darauf 642 Zähler tiefer zu eröffnen. In an‐<br />
deren Fällen entstehen Gaps, wenn AGs Ergebnisse melden, die<br />
stark von den Erwartungen abweichen.
</li>
<li><h4>Warum Kurslücken oft geschlossen werden</h4>
In der Praxis ist zu beobachten, dass die Kurse nach diesen<br />
dynamischen Bewegungen ‐ teils erst nach geraumer Zeit ‐ <br />
wieder in die Gegenrichtung laufen und die gerissene Lücke<br />
schließen. Das liegt vor allem daran, dass Kauf‐ und Verkaufs‐<br />
aufträge, deren Limitierungen in den Breichen der Kurslücke<br />
liegen, zum Teil nicht ausgeführt wurden. Es besteht die Ten‐<br />
denz des Marktes, diese Ausführungen nachzuholen.</li>
<li><h4>Die wichtigsten Arten von Gaps</h4>
<ul>
<li>Ein <b>Runaway‐Gap</b> ist eine agile Bewegung nach oben oder unten<br />
innerhalb eines Trends und bestätigt diesen Trend.</li>
<li>Ein <b>Breakaway‐Gap</b> entsteht, wenn ein Trend fulminant gedreht wird.</li>
<li>Ebenfalls zum Ende eines Trends entstehen <b>Exhausting‐Gaps</b>, aber<br />
in Richtung desselben, sie markieren dann oft den finalen Ausverkauf<br />
oder Kaufpanik.</li>
<li>Schließt sich direkt ein weiteres Gap in Gegenrichtung an, so spricht<br />
man vom <b>Island‐Gap</b>.</li>
</ul>
</li>
<li><h4>So nutzen Anleger das Phänomen</h4>
<ul>
<li>Da sich Kurslücken oft schließen, kann man bei einem bestehenden<br />
<b>Aufwärts‐Gap</b> mit dem Einstieg warten, bis das Ausbruchsniveau<br />
wieder erreicht ist, und dort gezielt ein Kauflimit platzieren.</li>
<li>Umgekehrt kann man nach einem <b>Abwärts‐Gap</b> mit einem Ausstieg<br />
darauf warten, dass die Kurse wieder das Niveau vor dem Verfall<br />
erreichen, und dort ein Verkaufslimit setzen.</li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus‐Money, 13/2022, pg.50</li>
</ul>
</body>
</html>
<html>
<ul>
<li><h3>Kurs‐Gewinn‐Verhältnis (<em>KGV</em>)</h3>
englisch “Price Earnings Ratio“, PER<br />
<br />
Der Aktienkurs im Verhältnis zum Gewinn pro Aktie:
<code><pre>
Kurs
KGV = -------
Gewinn
</pre></code>
Zeigt, wie viele Jahre es dauern würde, bis der Börsen‐<br />
wert erwirtschaftet ist.</li>
<li><h3>Free Cashflow</h3>
Das Geld, dass ein Unternehmen nach Abzug aller<br />
Kosten zur Verfügung hat.<br />
<br />
Zeigt, ob Geld für Investitionen oder für Dividenden<br />
vorhanden ist.</li>
<li><h3>Free Cashflow Yield</h3>
Freier Cashflow im Verhältnis zum Eigenkapital.<br />
<br />
Je höher die Yield, desto solider das Unternehmen.</li>
<li><h3>Debt/Equity‐Ratio</h3>
Die Gesamtverschuldung im Verhältnis zu kurzfristigen<br />
Verbindlichkeiten.<br />
<br />
<em>Achtung bei kontinuierlichem Anstieg!</em></li>
<li><h3>Quick Ratio</h3>
Umlaufvermögen abzüglich Inventar im Verhältnis zu kurz‐<br />
fristigen Verbindlichkeiten.<br />
<br />
Erlaubt einen noch schärferen Blick auf die Verschuldungs‐<br />
situation.</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus Money 47/2021, S. 55</li>
<li><a href="https://de.wikipedia.org/wiki/Kurs-Gewinn-Verh%C3%A4ltnis" target="_blank" rel="noreferrer noopener">Wikipedia :: Kurs‐Gewinn‐Verhältnis</a></li>
</ul>
</html>
<html>
<ul>
<li><h3>Cashflow</h3>
<h4>Der Cashflow zeigt, wie viel in der Kasse ist</h4>
Der Cashflow stellt den Nettozufluss liquider Mittel in einem Unternehmen<br />
dar. Die Messgröße ermöglicht eine Beurteiung der finanziellen Gesund‐<br />
heit eines Unternehmens ‐ also inwiefern ein Konzern die erforderlichen<br />
Mittel für die Substanzerhaltung des in der Bilanz abgebildeten Vermö‐<br />
gens und für Investitionen aus dem laufenden Geschäft selbst erwirtschaf‐<br />
tenkann. Der Cashflow misst somit gut die Innenfinanzierungskraft des <br />
Unternehmens. Er lässt in viel stärkerem Maße eine korrekte Unterneh‐<br />
mensbeurteilung zu als die im Geschäftsbericht ausgewiesene Gewinn‐<br />
größe. Denn im bilanziellen Ergebnis sind eine Vielzahl von gestaltbaren <br />
Faktoren wie Abschreibung und Rückstellung enthalten, die sich nicht <br />
auf den realen Geldfluss auswirken. Gewinnbeeinflussungen durch bi‐<br />
lanztechnische Kniffe sind dagegen beim Cashflow nicht möglich, stille<br />
Reserven treten offen zutage. <br />
<br />
<b>Vorteil:</b> Bei Investitionsvorhaben werden durch den Kassenzufluss die <br />
Möglichkeiten der Selbst‐ und Abschreibungsfinanzierung sichtbar. <br />
Denn weder der Gewinn noch die Abschreibungssumme allein lassen<br />
aufgrund des großen Gestaltungsspielraumes eine Aussage darüber <br />
zu, wo die Finanzierung aus eigener Krapft erschöpft ist.<br />
<br />
Er zählt zu den wichtigsten Basiskennziffern in der Bilanzanalys und gibt<br />
an, welcher Teil der Einnahmen nach Abzug der Betriebsausgaben im Un‐<br />
ternehmen verbleibt. Er gilt unter Analysten als aussagekräftigerer Indikator<br />
für die Finanzkraft eines Unternehmens als etwa der Gewinn, der durch<br />
gestaltbare Faktoren wie Abschreibungen und Rückstellung beeeinflusst<br />
sein kann.<br />
</li>
<li><h3>Free Cashflow</h3>
<h4>Vom Free Cashflow haben Aktionäre was</h4>
Die Berechnung des sogenannten “Free Cashflow“ bringt noch exaktere Erkenntnisse<br />
über die Liquiditätslage eines Unternehens als der gesamte Nettozufluss. Denn ein<br />
großer Teil des Cashflows dient Unternehmen dazu, Schulden zu tilgen, Zinsen für<br />
Kredite zu zahlen, Rücklagen zu bilden und Investitionen zur Erhaltung des Betriebs‐<br />
vermögens zu tätigen. Erst der danach noch frei verfügbare Cashflow verdeutlicht,<br />
wie viel Geld übrig bleibt und für die Dividenden der Anteilseigner ausgezahlt werden<br />
kann. In guten Zeiten und entsprechend hohem Cashflow verbleibt nicht selten ein<br />
Teil als Liquiditätsreserve im Unternehmen. Übersteigen die Dividendenzahlungen<br />
dagegen die Summe der frei verfügbaren Mittel, geht dies zu Lasten der Substanz<br />
des Unternehmens. Betroffene Konzerne kommen nicht um eine Dividendenkürzung<br />
herum, wollen sie ihre künftige Existenz nicht aufs Spiel setzen. Banken dient der<br />
Free Cashflow als vorzüglicher Indikator für die Rückzahlungsfähigheit von Krediten.<br />
Er wird deshalb oft als Berechnungsgrundlage der sogenanten Finanzierungskapazität<br />
verwendet. Konzerne mit hohen Reserven aus dem Free Cashflow bekommen günsti-<br />
gere Kredite.<br />
</li>
<li><h3>Buchwert (<em>book value</em>)</h3>
Der Buchwert gibt die Substanz eines Unternehmens wieder. Er setzt sich im <br />
Wesentlichen aus Sachanlagen, Finanzanlagen und immateriellen Vermögens‐<br />
gegenständen zusammen. Besitzt eine Firma beispielsweise viele Immobilien<br />
oder hochwertige Produktionsmaschinen, fällt der Buchwert entsprechend üp-<br />
pig aus. Übersteigt er gar den Börsenwert, wird die Aktie des Konzerns von<br />
Analysten allgemein als chancenreich eingeschätzt. In diesem Fall liegt das<br />
Kurs‐Bucht‐Verhältnis (KBV) unter eins. <br />
<br /><b>Vorteil:</b> Abseits von Kennzahlen wie Cashflow oder Gewinn liefert der <br />
Buchwert einen Maßstab dafür, ob ein Konzern günstig oder teuer ist. <br />
<b>Nachteil:</b> Aus Scheu vor feindlichen Übernahmeversuchen<br />
setzen viel börsennotierte Konzerne ihren Buchwert in der Bilanz deutlich unter<br />
dem aktuellen Marktwert an, was die Aussagekraft der Kennzahl beinflusst.<br />
<br />
Einige Investoren schwören dennoch darauf. So achtet etwa Fondsmanager<br />
Michael Keppler bei allen Investments auf ein möglichst geringes KBV: “Ich<br />
investiere nur in Unternehmen, die einen hohen Ertrag bieten und gleichzeitig<br />
über viel Substanz verfügen.“ Seit Jahren übertrifft Keppler, der mehr als 20<br />
Fonds betreut, mit dieser Methode die Vergleichsindizes.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Das Wertpapier, 4/2009, S. 17</li>
</ul>
</html>
<html>
<ul>
<li>
Es passiert sehr selten, dass man den typischen erfahrenen und<br />
kühl kalkulierenden Notenbankern eines Landes beim Ausbruch re‐<br />
gelrechter Panik zuschauen kann ‐ und dann ausgerechnet bei der<br />
Bank of England.<br />
</li>
<li><h3>Was ist in London passiert?</h3>
Das ganze Desaster begann damit, dass in der vorvergangenen Woche<br />
die neue britische Premierministerin Liz Truss und ihr Finanzminister<br />
Kwasi Karteng ihren Wirtschaftsplan vorstellte. Kernpunkte: riesige<br />
Steuersenkungen ohne Gegenfinanzierung und eine umgerechnet 170<br />
Milliarden Euro teuere Deckelung der Energiepreise für Privathaushalte<br />
und Firmen.<br />
</li>
<li><h3>Was waren die Folgen?</h3>
Dieses Konzept führt zu eienr Explosion der Schulden. Die Zinsen<br />
britischer Anleihen gingen i gigantischen Schritten von teilweise<br />
mehr als 0,5 Prozentpunkten an einem einzigen Tag nach oben. Die<br />
Zinsen für die zehnjährigen britschen Staatsanleihen (Gilts) stie‐<br />
gen höher als die Italiens. Der Verfall der britsichen Währung nahm<br />
dramatische Formenan, ein Pfund kostetete zweitweise weniger als<br />
1,04 Dollar, noch 2021 hatte es phasenweise mehr als 1,40 US‐Dollar<br />
gekostet.<br />
</li>
<li><h3>Wie reagierte die Bank von England?</h3>
Wie ihr Spitzname “alte Dame von Threadneedle Street“ in London es<br />
wohl suggeriert: Eigentlich gar nicht, es wurde nur verlautbart, dass <br />
man beim nächsten regulären Treffen der Geldpolitiker im No‐<br />
vember zu reagieren gedenke. Noch am 27. September sagte ihr Chef‐<br />
volkswirt Huw Pill auf einem Barclays‐Forum, für eine Zentralbank<br />
sei eine Herangehensweise mit weniger häufigem Handeln der bessere<br />
Weg.<br />
</li>
<li><h3>Wie sah am Tag darauf die Kehrtwende aus?</h3>
Die Bank of England kündigte am Mittwoch vergangener Woche plötzlich<br />
an, Staatsanleihen mit langer Laufzeit zu kaufen, wenn es ihr notwen‐<br />
dig erscheint ‐ angeblich zeitlich stark begrenzt und als Reaktion auf<br />
die Dysfunktion des Marktes und die potenziellen Risiken für die Finanz‐<br />
stabilität. Eigentlich wollte die Notenbank in dieser Woche damit starten,<br />
den hohen Anleihenbestand zu verkaufen. Der neue Aktionsimus war gut für<br />
die Börsen ‐ sie drehten nach dieser Ankündigung, der DAX erholte sich<br />
deutlich.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus Money 41/2022 (05.10.2022), S.15</li>
</ul>
</html>
<html>
<ul>
<li><h3>“<em>at the money</em>“</h3>
</li>
<li><h3>“<em>in the money</em>“</h3>
</li>
<li><h3>“<em>out of the money</em>“</h3>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.macroption.com/in-at-out-of-the-money-options/" target="_blank" rel="noreferrer noopener">
Macrooption :: In the Money, At the Money, Out of the Money Options</a></li>
<li><a href="https://finanzderivate.info/optionen/in-the-money-at-the-money-und-out-of-the-money/" target="_blank" rel="noreferrer noopener">
Wissen zu Finanzderivaten :: In‐the‐money, at‐the‐money und out‐of‐the‐money</a></li>
<li><a href="https://www.deltavalue.de/in-the-money/" target="_blank" rel="noreferrer noopener">DeltaValue :: In‐the‐money</a></li>
</ul>
</html>
<html>
<ul>
<li>Die Amazon‐Aktie ist so günstig wie seit Jahren nicht mehr. Das liegt daran,<br />
dass der E‐Commerce‐Gigant gerade einen Aktiensplit im Verhältnis 20:1 durch‐<br />
geführt und die Aktie rein optisch verbilligt hat.<br />
</li>
<li><h3>Was ist ein Aktiensplit?</h3>
Hier werden schon existierende Aktien in eine höhere Anzahl von Aktien mit<br />
einem geringeren Nominalwert aufgeteilt. An den Besitzverhältnissen ändert<br />
sich dadurch nichts, ebenso wenig am reinen Unternehmenswert oder dem<br />
Eigenkapital. “Lediglich der Preis der einzelnen Aktien verringert sich, dafür<br />
wird der Aktionär mit einer entsprechenden Anzahl neuer Aktien 'entschädigt' “,<br />
erläutert die Société Générale. Die Altaktionäre haben keinen finanziellen Vor‐<br />
oder Nachteil durch diese Transaktion. Den Split muss im übrigen die Haupt‐<br />
versammlung beschließen.<br />
</li>
<li><h3>Warum führen Unternehmen einen Split durch?</h3>
Zu diesem Mittel greifen vor allem Konzerne, deren Aktienkurs stark gestieg‐<br />
en ist ‐ wie Amazon. So kann auch ein Anleger mit einem kleineren Depot das <br />
Papier wieder in einem vernünftigen Verhältnis zu seinem Gesamtportfolio er‐<br />
werben. Alphabet folgt Mitte Juli übrigens auch mit einem 20:1‐Split.<br />
</li>
<li><h3>Existiert auch das umgekehrte Verfahren?</h3>
Ja, durchaus, das ist oft ein Krisenphänomen und heißt dann im Fachjargon <br />
“Reverse‐Aktiensplit“. Hier sinkt die Anzahl der ausgegebenen Aktien, was <br />
den Börsenkurs der verbleibenden Aktien erhöht. Zwar ändert sich auch in <br />
diesem Fall nichts am Wert der AG und den Beteiligungsverhältnissen. Manch‐<br />
mal ist dieser Schritt aber Pflicht: “Denn wenn beispielsweise der Aktien‐<br />
kurs unter dem Nennwert der Aktie notiert, dürfen nach deutschem Aktien‐<br />
gesetz keine neuen Aktien ausgegeben werden“, so die Experten der fran‐<br />
zösischen Großbank. Der Reverse‐Aktiensplit werde auch durchgeführt, um <br />
eine Aktie optisch treuer zu machen. “Dies war häufig im Zeitraum nach <br />
der Finanzkrise 2008/2009 zu beobachten, als viele bekannte Aktientitel <br />
stark an Wert verloren hatten“ ‐ daher oben die Bezeichnung als Krisen‐<br />
phänomen.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus Money 25/2022, pg. 64</li>
</ul>
</html>
<html>
verwendete Befehle:<br />
<b>find /boot/grub/stage1</b><br />
--> File nicht vorhanden<br />
<b>find /etc/passwd</b><br />
--> File vorhanden, es wird die Partition, auf der das File sich befindet, angezeigt<br />
<b>find /boot/grub/menu.lst<i><TAB></i></b><br />
--> es wurden zwei Files angezeigt:<br />
* menu.lst und<br />
* menu.lst.old<br />
<b>cat /boot/grub/menu.lst</b><br />
--> das File war leer, was den abgebrochenen Bootvorgang erklärte<br />
<b>kernel /boot/vmlin<i><TAB></i></b><br />
--> es wurden sämtliche zur Verfügung stehenden Kernels angezeigt<br />
<b>configFile /boot/grub/menu.lst.old</b><br />
--> der Bootvorgang wurde fortgesetzt;<br />
danach habe ich das leere File menu.lst durch das File menu.lst.old ersetzt<br />
</html>
<html>
<li>
<b>Brief</b> :: "Brief-Kurs"<br />
Angebot im Markt<br />
</li>
<br />
<li>
<b>Geld</b> :: "Geld-Kurs"<br />
Nachfrage im Markt<br />
</li>
<br />
</html>
<html>
<ul>
<li><b>“Jamaika“</b>: Union + Grüne + FDP</li>
<li><b>“Ampel“</b>:SPD + FDP + Grüne</li>
<li><b>“Deutschland‐Koalition“</b>: Union + SPD + FDP</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus Money, 36/2021, Editorial</li>
<!--
<li></li>
<li></li>
-->
</ul>
</html>
<html>
<br />
Link:<br />
<a href="http://www.thegeekstuff.com/2013/04/c-macros-inline-functions/">http://www.thegeekstuff.com/2013/04/c-macros-inline-functions/</a><br />
<br />
</html>
<html>
In C programming, variadic function will contribute to the flexibility<br />
of the program that you are developing.<br />
<br />
To understand this flexibility, let us start with a basic example.<br />
<br />
If we like to add two numbers, we might write a code like this:<br />
<br />
<code>
int addNumbers( int nNumberOne, int nNumberTwo )<br />
{<br />
return nNumberOne + nNumberTwo;<br />
}.<br />
</code>
<br />
If we like to add three number, we might write a code like this:<br />
<br />
<code>
int addNumbers( int nNumberOne, int nNumberTwo, int nNumberThree )<br />
{<br />
return nNumberOne + nNumberTwo + nNumberThree;<br />
}<br />
</code>
As the number of digits that we need to add grows, we can keep adding<br />
more functions with appropriate number of arguments which represents<br />
the total number of numbers that we like to add.<br />
<br />
But, that might get little bit cumbersome and hard to maintain.<br />
<br />
Luckily in C programming, there is a easy way to do this using variadic function.<br />
<br />
We typically use variadic function when we don't know the total <br />
number of arguments that will be used for a function. Basically one single<br />
function could potentially have n number of arguments.<br />
<br />
The concept of this variadic function is already used in several C's in-built functions.<br />
<br />
For example, in printf when you want to print one number, we do <br />
something like this.<br />
<code>
printf(" the one number = %d", nOneNumber);<br />
</code>
<br />
When you want to print two numbers, we still use the same printf function <br />
as shown below:<br />
<br />
<code>
printf(" the first number = %d, the second number =%d ", nOneNumber, nSecondNumber);<br />
</code>
<br />
If you look into the stdio.h, you can see that this was implemented using <br />
variadic functions.<br />
<br />
This tutorial will explain the basics of how to use the concept of variadic <br />
functions inside your code.<br />
<h3>C Variadic Macros</h3>
In order to use variadic functions we need to understand these macros:
<ul>
<li>va_list</li>
<li>va_start</li>
<li>va_arg</li>
<li>va_end</li>
<li>va_copy</li>
</ul>
All these macros are in the stdarg.h which should be included in your<br />
code as shown below:<br />
<br />
<code>
#include <stdarg.h>. <br />
</code>
<br />
The word !dquo;variadic“ tells us that there is some kind of change <br />
or variation is involved here. The variation or change here is that we are <br />
dealing with unknown number of arguments for the function.<br />
<br />
Variadic function has two parts: <br />
<ol>
<li>mandatory arguments </li> and
<li>optional arguments.</li>
</ol>
Atleast one mandatory argument is required. The order is important <br />
in this case. So, you will have mandatory arguments first and then <br />
you will have optional arguments.<br />
<br />
Now, I would advise you to look at those two printf functions. And if <br />
you understand it the same way I do, it seems like the first part is <br />
mandatory ( “ the one number = %d“ ), the optional part <br />
comes second and it could be different ( nOneNumber ), depending on<br />
the situation you are in.<br />
<br />
Common practice is to have some number that will tell us how many <br />
arguments there are or we look for stopping sign in our optional list.<br />
<br />
<b>va_list</b> is used in situations in which we need to access optional <br />
parameters and it is an argument list. So, our list will contain some data <br />
that will be accessed after we declare our va_list and that is done like this:<br />
<br />
<code>va_list someArgumentPointer;.</code><br />
<br />
In this situation, we need to mention that our list will have appropriate data <br />
and that is the most interesting part of this technique. I will, later, explain <br />
how to implement that in function which doesn't know how many <br />
elements are being invoked into it or the function that is looking for stopping<br />
sign within our string.<br />
<br />
va_start will connect our argument list with someArgumentPointer, and we will need to say how many elements in our function we have. In order to use this we would write something like this:
<code>va_start( someArgumentPoiner, numberOfElements );</code>
This means that we have already declared our list and we have passed number of elements into our function.
va_arg is macro that will get our data which is currently connected to the argument list, and in order to achieve that task, we would need to know the type of our data. So, to do that we would write:
<code>va_arg( someArgumentPointer, someType );</code>
va_end is used in situations when we would like to stop using someArgumentPointer. One more situation in which we use this macro is when we need to reset our list position as well.
This macro will be used like this:
<code>va_end( someArgumentPointer );</code>
va_copy is used in situations for which we need to save our current location, something like book marker. In another words, if you are in the situation in which you are advancing through argument list, but later you would need to rewind your current position to some previous state.
That could be done like this:
<code>va_copy( va_list argumentDestination, va_list argumentSource );</code>
In order to state that we have variadic function we need to state three dots as well, however that will be shown afterwards.
For an introduction on generic C Macros, this might help: How to Use C Macros and C Inline Functions with C Code Examples
<h3>C Variadic Example Code</h3>
The following simple example program will have three calls to our variadic function addingNumbers.
<code><pre>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
int addingNumbers( int nHowMany, ... )
{
int nSum =0;
va_list intArgumentPointer;
va_start( intArgumentPointer, nHowMany );
for( int i = 0; i < nHowMany; i++ )
nSum += va_arg( intArgumentPointer, int );
va_end( intArgumentPointer );
return nSum;
}
int main( int argc,
char** argv)
{
system( "clear" );
printf( "\n\n Variadic functions: \n\n" );
printf( "\n 10 + 20 = %d ", addingNumbers( 2, 10, 20 ) );
printf( "\n 10 + 20 + 30 = %d ", addingNumbers( 3, 10, 20, 30 ) );
printf( "\n 10 + 20 + 30 + 40 = %d ", addingNumbers( 4, 10, 20, 30, 40 ) );
printf( "\n\n" );
return EXIT_SUCCESS;
}
</pre></code>
In the above code, in order to know how many numbers we will pass to variadic function, we have the first number nHowMany, and don't forget to add three dots. Those three dots will say that you are meddling with variadic function.
That could be achieved like this:
<code>int addingNumbers( int nHowMany, ... ).</code>
Then we have sum declared and initialized to zero. As we have said earlier, we need to declare our argument list with va_list and that task will be achieved like this:
<code>va_list intArgumentPointer;</code>
Then we need to connect our argument list and say how many elements we have in it.
<code>va_start( intArgumentPointer, nHowMany );</code>
Now, we use “for“ to advance through our argument list and add elements to the previous sum.
<code>va_arg( intArgumentPointer, int );</code>
Then, as we have mentioned earlier, we need to state that we are closing our intArgumentPointer.
Finally, call our variadic function with multiple arguments:
<code>
addingNumbers( 2, 10, 20 )
addingNumbers( 3, 10, 20, 30 )
addingNumbers( 4, 10, 20, 30, 40 )
</code>
If you are C++ programmer, you can use implement similar concept using C++ variadic templates, which is available since C++ 11. If you are new to templates, this might help: C++ Template Functions Explained with an Example Program
Also, this is a good reference: Introduction to C++11 and C++14 with Example Code Snippet
<h3>Additional Ideas and Exercises to Explore</h3>
You can expand the above and create a function that will use double as data type and calculate the sum.
After that, create a function that will calculate average value and sum of unknown number of numbers.
Then, you might create your: and, or, xor, nor etc ... functions. This group of functions could be useful in Calc, for example. Now, as you might figure out, it would be good to calculate how many arguments you are passing to variadic function from main function or you can pass the string to variadic function.
Then, if you have asked yourself, how do they create those programs that use switches from argument line, you could use argc to calculate, how many elements you have in your program and argv could be used to input those numbers that we need to add. So, next level could be to create the program that will work like ps command that you have in your terminal with various arguments.
A call from our main program could be:
<code>addingNumbers( number, atoi( argv[1] ) );</code>
All you need to do is to limit the number of inputs and some more juggling.
In the main function, that could be done like this:
<code>
if( argc < 2) { ... }
if( argc > 6) { ... }.
</code>
You could also create your own printf function, and all you need to do is to input some strings into variadic function and test if you have some letters like: d, f, c, etc.
For that task, you might need some call of the function like this:
<code>int ourPrint( char* cString, ... );</code>
Later, you would need one character, let's say that we are going to use “%“, as it is implemented in printf and scanf. If you don't like this character, you could write your own version with some other character. However, this practice would lead to some compatibility issues.
So, there would be part in which you are reading characters. If those characters are in the input string and they are meant to be presented onto the screen, that task could be achieved, for example like this:
<br />
<code>
while( *ptrInputStringCopy )<br />
{<br />
if( *ptrInputStringCopy != '%' )<br />
{<br />
putchar( *ptrInputStringCopy ); ptrInputStringCopy++; continue;<br />
}<br />
..<br />
</code>
After, you could test if the next character is: int, char, float or boolean. That might be achieved with the next line and few more:
<code>
char cType = * ptrInputStringCopy; ptrInputStringCopy++;
switch ( cType )
{
case 'd' : int intValue = va_arg( argumentList, int );
printf( " %d ", intValue );
++number_of_arguments;
break;
...
</code>
And yes, I have used printf in this moment, because it is easier. Now, one would like to figure out if the number is long int or long float( which comes from double, ... yeah now I get why they don't use 'i' for integer, but 'd'). In order to achieve that, you would need to have the test if the character is equal to 'l'.
Something like this:
<code> if( cType == 'l' ) { ... }</code>
Apart from printf, you can also analyze scanf, fprintf, fscanf to see how variadic is implemented. If you like math, please check the source code of matheval.h which is done very well, and will give you lot of ideas on how to use variadic functions along with other core concepts.
<br />
Link:<br />
<a href="http://www.thegeekstuff.com/2017/05/c-variadic-functions/">http://www.thegeekstuff.com/2017/05/c-variadic-functions/</a><br />
<br />
</html>
<html>
This tutorial explains how to create a file from a C program.
In these examples, we'll create new HTML files and write some content to it.
The content of the file will be different, but these three C example program should explain you how to use the c file functions like fopen, fprintf, etc., to create and manipulate files.
<h3>Example 1 :: Create a File</h3>
This is the first example, which creates a new file called index.html with some HTML content to it.
Create f1.c with the following example code.
<pre><code>
#include <stdio.h>
#include <stdlib.h>
int main( void )
{
FILE *ptrFile = fopen( "index.html", "w");
int i;
fprintf( ptrFile, "<HTML>\n ");
fprintf( ptrFile, "<HEAD> <TITLE> The Geek Stuff </TITLE> </HEAD>\n" );
fprintf( ptrFile, "<BODY BGCOLOR=\"#110022\" TEXT=\"#FFBBAA\"> \n");
fprintf( ptrFile, "<p>Example 1: This file was created from a C program</p>\n");
for( i = 0; i< 5; i++)
{
fprintf( ptrFile, "<p>%d. line</p>\n", i);
}
fprintf( ptrFile, "</BODY>\n");
fprintf( ptrFile, "</HTML>");
fclose( ptrFile );
return EXIT_SUCCESS;
}
</code></pre>
In the above, the fopen function takes two parameter. First, the name of the file, which in this case is index.html. Second, the file operation, which in this example, is „w“, which is 'write' to create new file.
This function will return a FILE pointer, which is stored in the variable ptrFile.
Using fprintf function, we can write content to the file that we just created. This function takes two parameter. First, the FILE pointer of the file where we should write the content. Second, the content that should be written. This is a string content. Please note that fprintf will append this content if the file already has some existing content.
Finally, after finish writing the content to the file, use fclose function to close the FILE pointer.
The following is the output of the above c program. First compile the f1.c, which will create a.out executable. Execute a.out, which will create the index.html file with some HTML content as shown below.
<pre><code>
# cc f1.c
# ./a.out
# cat index.html
<HTML>
<HEAD> <TITLE> The Geek Stuff </TITLE> </HEAD>
<BODY BGCOLOR="#110022" TEXT="#FFBBAA">
<p>Example 1: This file was created from a C program</p>
<p>0. line</p>
<p>1. line</p>
<p>2. line</p>
<p>3. line</p>
<p>4. line</p>
</BODY>
</code></pre>
For more details on all the individual functions, please refer to our earlier article on this topic: File Handling in C with Examples (fopen, fread, fwrite, fseek)
<h3>Example 2 :: Create a File</h3>
This is similar to the previous example, but here only the content of the program is different.
We are using rand function here to determine the total number of lines to be written.
We'll also use rand function to create a pattern of star characters by randomly figuring out how many spaces and starts should be used in a line.
Create f2.c program with the following example code.
<pre><code>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void printBlanks( int, FILE* );
void printStars ( int, int, FILE* );
int main( void )
{
FILE *ptrFile = fopen( "index.html", "w");
int iNumberOfLines, iNumberOfBlanks, iNumberOfStars;
int iCounter = 1;
int iColor = -1;
iNumberOfLines = iNumberOfBlanks = iNumberOfStars = 0;
fprintf( ptrFile, "<HTML>\n ");
fprintf( ptrFile, "<HEAD> lt;TITLE>Example 2</TITLE> </HEAD>\n" );
fprintf( ptrFile, "<BODY BGCOLOR=\"#FFFFFF\" > \n");
fprintf( ptrFile, "<p>Example 2: This file was created from a C program</p>\n");
srand( ( unsigned) time ( NULL ) );
iNumberOfLines = (rand() % 20) + 10;
do{
iNumberOfBlanks = ( rand() % 10 );
iNumberOfStars = ( rand() % 30 );
iColor = ( rand() % 4 );
printBlanks( iNumberOfBlanks, ptrFile );
printStars( iNumberOfStars, iColor, ptrFile );
iCounter++;
} while ( iCounter <= iNumberOfLines );
fprintf( ptrFile, "</BODY>\n");
fprintf( ptrFile, "</HTML>");
fclose( ptrFile );
return EXIT_SUCCESS;
}
void printBlanks( int iNumberOfBlanks,
FILE* ptrFile )
{
int i;
fprintf( ptrFile," <p> " );
for( i = 0; i < iNumberOfBlanks; i++ )
fprintf( ptrFile, " ");
}
void printStars( int iNumberOfStars,
int iColor,
FILE* ptrFile )
{
int i;
switch ( iColor )
{
case 0: fprintf( ptrFile,"<font color=\"FF0000\">"); break;
case 1: fprintf( ptrFile,"<font color=\"00FF00\">"); break;
case 2: fprintf( ptrFile,"<font color=\"0000FF\">"); break;
case 3: fprintf( ptrFile,"<font color=\"FFFF00\">"); break;
}
for( i = 0; i < iNumberOfStars; i++ )
fprintf( ptrFile, "*");
fprintf( ptrFile," </font></p>");
}
</code></pre>
The following is the partial output of the above program.
<pre><code>
# cc f2.c
# ./a.out
# cat index.html
<HTML>
<HEAD> <TITLE>Example 2</TITLE> </HEAD>
<BODY BGCOLOR="#FFFFFF" >
<p>Example 2: This file was created from a C program</p>
…
</code></pre>
In the above example, in each row we added few blank spaces in the front of the line. We also added few color characters. The color of the character is one of four basic ones: blue, green, yellow or red. This pattern is repeated few times. We are using nbsp tag to create the blank space.
<h3>Example 3 :: Create a File</h3>
This is also similar to previous example in terms of how to create a new file from C.
But, this will also take two existing files (original.txt and compared.txt), open them up and compare.
Then, this will highlight the differences in an output html file.
Create f3.c program with the following example code.
<pre><code>
#include <stdio.h>
#include <stdlib.h>
#define EOLN '\n'
int main( void )
{
FILE *ptrFile = fopen( "index.html" , "w" );
FILE *ptrFileOriginal = fopen( "original.txt" , "r" );
FILE *ptrFileCompared = fopen( "compared.txt" , "r" );
char cOriginal, cCompared;
char cColor = 'b';
fprintf( ptrFile, "<HTML>\n ");
fprintf( ptrFile, "<HEAD> <TITLE>Example 3: This file was created from a C program</TITLE> </HEAD>\n" );
fprintf( ptrFile, "<BODY TEXT =\"#FFFFFF\" BGCOLOR=\"#000000\" > \n");
fprintf( ptrFile, "<p> <center>COMPARING TWO SAME SIZE FILES</center></p>\n");
fprintf( ptrFile, "<p> \n");
while( (cOriginal = fgetc( ptrFileOriginal ) ) != EOF )
{
cCompared = fgetc( ptrFileCompared );
if( ( cOriginal == cCompared ) && ( cColor == 'r' ) )
{
fprintf( ptrFile, "</FONT>");
fprintf( ptrFile, "<FONT COLOR=\"00FF00\">");
cColor = 'g';
}
else if( ( cOriginal != cCompared ) && ( cColor == 'g' ) )
{
fprintf( ptrFile, "</FONT>");
fprintf( ptrFile, "<FONT COLOR=\"FF0000\">");
cColor = 'r';
}
if( cColor == 'b' )
{
if( cOriginal == cCompared)
{
cColor = 'g';
fprintf( ptrFile, "<FONT COLOR=\"#00FF00\">");
}
else
{
cColor = 'r';
fprintf( ptrFile, "<FONT COLOR=\"#FF0000\">");
}
fputc( cOriginal, ptrFile );
continue;
}
if( cOriginal == EOLN )
fprintf( ptrFile, " <BR> ");
else
fputc( cOriginal, ptrFile );
}
fprintf( ptrFile, "</FONT></p>" );
fprintf( ptrFile, "</BODY>\n");
fprintf( ptrFile, "</HTML>\n");
fclose( ptrFile );
fclose( ptrFileOriginal ); fclose( ptrFileCompared );
return EXIT_SUCCESS;
}
</code></pre>
For this, I used the following original.txt and compared.txt file as the input files. Make sure you create this sample files before you execute the c program.
<pre><code>
# cat original.txt
line 1
line 2
line 3
#
#
# cat compared.txt
line 4
line 5
line 6
</code></pre>
Now, compile and execute the f3.c program. The following shows a partial output of the above code.
<pre><code>
# cc f3.c
# ./a.out
# cat index.html
<HTML>
<HEAD> <TITLE>Example 3: This file was created from a C program</TITLE> </HEAD>
<BODY TEXT ="#FFFFFF" BGCOLOR="#000000" >
<p> <center>COMPARING TWO SAME SIZE FILES</center></p>
<p>
<FONT COLOR="#00FF00">line </FONT>
<FONT COLOR="FF0000">1</FONT>
<FONT COLOR="00FF00">
<BR> line </FONT>
<FONT COLOR="FF0000">2</FONT>
<FONT COLOR="00FF00">
<BR> line </FONT>
<FONT COLOR="FF0000">3</FONT>
<FONT COLOR="00FF00">
<BR> </FONT></p></BODY>
</HTML>
</code></pre>
<h3>Link:</h3>
<a href="www.thegeekstuff.com/2017/06/c-file-example-code/" target=_blank>The Geek Stuff :: C - File example code</a><br />
<br />
</html>
<html>
# Auch in Solaris <br />
<br />
In SCOUNIX, cb is a command which is used <br />
to beautify the c program written in sco. <br />
<br />
e.g.: <br /><code>
# cb filename.c <br />
</code> <br />
or <br />
<br /><code>
# cb filename.c > fname.c <br />
</code> <br />
The above command displays the program with <br />
indentation which may help to find if the curly <br />
brackets are properly closed or not. <br />
<br />
This tip generously supported <br />
by: sub_raghav@hotmail.com <br />
</html>
Type the text for 'New Tiddler'
<html>
<h3>What is a stack?</h3>
In our daily life, we may see several items in a stack. For example: stack of dishes, pancakes stacked on a plate, stones on a stick for Hanoi tower problem, stack of chairs, stack of books, etc.
In programming language, stack is a data structure that has few interesting properties. Its elements are added as you get them, and you empty the stack from last element that you have added into it.
Stack is also known as LIFO, which stands for „Last In First Out“.
So, the first added element gets out last and the last added member gets out first. The structure is good in some typical programming situations that could occur very often in software development or software related topic, as well as hardware implementations.
<h3>Stack Implementation Strategies</h3>
For a stack, there are a few possible implementations, the most usual classification is based on predicted size of the stack, we are using. The following are three most-common implementation strategy for a stack:
<ul>
<li>The first one, is called stack of limited size, and usually gets implemented with array and a counter that know how many elements you have added, also you would need to know the capacity, as well.</li>
<li>The second one is more interesting, and it is implemented with: struct and pointers. It is sometimes called stack of „unknown size“. Both the first and second option can be used in both C and C++ programming language.</li>
<li>The third possible solution is to create your own class or template class, with few methods and overloaded operators, friend methods etc ...</li>
</ul>
It is also possible to have stack of objects and pointers to objects too. But, the focus of our article will be on STL stack.
Refer to this: Introduction to C++11 and C++14 with Example Code Snippet
<h3>How to use STL Stack?</h3>
In order to use STL stack, first you need to add „#include stack“ at the beginning of your code.
This will enable you to use stack in your program. To be more precise, it is STL container, and it is implemented with some other STL data structure, which makes it an adapter.
After this, you would need to declare stack of some type, that could be done like this:
stack nameOfOurStack;
After you have declared stack you could apply few member functions.
If you need to check if your stack is empty, you could use empty member function that will return true or false, according to state of your stack. To use this, you could write it like this:
nameOfOurStack.empty();
When you need to figure out the size of stack, you could create counter, and if you add the elements you increment the counter or if you remove elements from stack you decrement your counter. This should be done with size, that is public member function right there. This is shown below:
nameOfOurStack.size();
Now obtained elements that have been added on the stack, could be used in your program, according to your needs.
To access the top of our stack, you would use top, which will copy element from top of our stack, however it will not remove them from the container as you might expect in the beginning.
nameOfOurStack.top();
And if you would like to remove the element from top of stack, you have pop.
nameOfOurStack.pop();
In faze of creating the stack you: get elements from user, read them from file or perhaps calculate them. To add one more element on top of the stack you code it like this:
nameOfOurStack.push(someElement);
In C++ 11 you should have emplace also. It will construct and add the element to stack. For example you could do something like this:
nameOfOurStack.emplace("Some string that will be added to stack of strings");
If you would like to swap two stacks, since C++ 11 you should have swap as well.
You might also need few relational operators that could be very useful, if you are trying to compare two stacks.
<h3>STL Stack Example Program #1</h3>
Our first example will illustrate how to create stack of few integers and how to perform few basic operations on it.
<code><pre>
#include <iostream>
#include <stack>
using namespace std;
int
main()
{
stack<int> nStack;
cout << "NOW YOU HAVE STACK !!!" << endl;
cout << "The size is="
<< nStack.size() << endl;
cout << "The stak ";
(nStack.empty()==true)?cout << " is " : cout << " it is not ";
cout << " empty " << endl;
cout << "\n\nNOW YOU ADD TWO INT-S TO IT!!!" << endl;
nStack.emplace(1);
nStack.push(2);
cout << "The size is=" << nStack.size() << endl;
cout << "The stack ";
(nStack.empty()==true)?cout << " is " : cout << " it is not ";
cout << " empty " << endl;
int nElement =nStack.top();
cout << "The size is=" << nStack.size() << endl;
cout << "The stack ";
(nStack.empty()==true)?cout << " is " : cout << " it is not ";
cout << " empty " << endl;
cout << "\n\nWE HAVE TAKEN TOP ELEMENT!!!" << endl;
nStack.pop();
cout << "The size is=" << nStack.size() << endl;
cout << "The stack ";
(nStack.empty()==true)?cout << " is " : cout << " it is not ";
cout << " empty " << endl;
nStack.pop();
return EXIT_SUCCESS;
}
</pre></code>
<h3>STL Stack Example Program #2</h3>
Our second example will explain how to create stack of strings.
<code><pre>
#include <iostream>
#include <stack>
#include <string>
using namespace std;
int
main()
{
stack<string> sStack;
for(;;)
{
char cPick;
cout << "Would you like to add new string y/n->";
cin>>cPick;
if(cPick=='n') break;
cout << "Next string plase->";
string sTemp;
cin>>sTemp;
sStack.emplace(sTemp);
cout << endl;
}
while(!sStack.empty())
{
//YES, AND NEGATION WILL TAKE SOME TIME!
string sTemp;
//FIRST WE TAKE COPY AND THEN WE TAKE FROM TOP OF THE STRING
sTemp=sStack.top(); sStack.pop();
cout << sTemp << endl;
}
return EXIT_SUCCESS;
}
</pre></code>
<h3>STL Stack Example Program #3</h3>
Third and final example will show you how to convert the decade number into its binary equivalent.
<code><pre>
#include <iostream>
#include <stack>
typedef unsigned long long int myType;
using namespace std;
int
main()
{
cout << "WE WILL CONVERT NUMBER INTO BINARY EQUIVALENT"<
//PREPARE SPACE FOR NUMBER WE INPUT
myType temp;
cout << "Please, input the number->";
cin>>temp;
//LET'S DECLARE STACK
stack <int> nBinaryNumber;
//FIND BINARY CIPHERS
while(temp)
{
int nCipher = temp%2;
nBinaryNumber.emplace(nCipher);
temp/=2;
}
//PRESENT THE STACK
while(!nBinaryNumber.empty())
{
(nBinaryNumber.top()==1)?cout << '1':cout << '0';
nBinaryNumber.pop();
}
return EXIT_SUCCESS;
}
</pre></code>
<h3>Additional Exercises</h3>
After you have read this article and adopted the ideas presented, it might be useful if you learn few more class templates from STL: queue, list, map, deck, vector, etc. This is a good reference: STL Tutorial: How to use C++ Vector with Example Program
For practice, you can also develop your own stack, with few overloaded methods and few unusual methods, that might be useful for problem that you are solving. For example, you might need to place elements not at the top but at certain position of stack.
The following are few additional exercises that you can sole using stack:
<ol>
<li>Get string input from user, and use stack to write it backwards.</li>
<li>Get number input from user, and use stack to write it backwards.</li>
<li>Broaden our example so that you could handle non whole numbers as well.</li>
<li>Create stack for Hanoi tower problem, and solve it with stack.</li>
<li>Simulate recursion for n!</li>
<li>Create calculator that will implement reverse polish notation.</li>
<li>Try to create your own class and add few methods that are not covered in STL stack.</li>
</ol>
<br />
Link:<br />
http://www.thegeekstuff.com/2016/09/cpp-stack-examples/<br />
<br />
</html>
<html>
<ul>
<li><b>Encapsulation / Abschottung</b> <br />
the ability to define a new type and a set of operations on that type, without<br />
revealing the representation of the type.</li>
<br />
<li><b>Inheritance / Vererbung</b><br />
the ability to create new types that inherit properties from existing types. </li>
<br />
<li><b>Polymorphism / Polymorphismus</b> <br />
the ability to use one name for two or more related but technically different<br />
purposes; „one interface, multiple methods.“ </li>
<br />
</ul>
</html>
<html>
<h2>How to Use C++ STL Queue with an Example Program</h2>
If you stand in a queue at a grocery store (or anywhere else), the first customer in the queue will be served, and then the next, and so on.
In programming terminology, especially in data structure, this concept is called FIFO (first in first out) queue.
In C++, Queue is an important part of a STL (Standard Template Library).
Apart from the typical FIFO queue, there are few other types of queue. For example, priority queue.
In a priority queue, apart from the FIFO characteristics, certain customers (or elements in a queue) might have a higher priority, and they might receive immediate service irrespective of their location in the queue.
In this tutorial, we'll discuss the following aspects of STL Queue:
<ol>
<li>Create a Queue</li>
<li>Check Queue Status</li>
<li>Access Next Element</li>
<li>Access Last Element</li>
<li>Add New Element to the Queue</li>
<li>Create and Insert Element to the Queue</li>
<li>Remove Element from the Queue</li>
<li>Swap the Content of an Element</li>
</ol>
If you are new to C++ STL concept, the following might help:
<ul>
<li>3 Example Programs to Understand C++ STL Stack Implementation</li>
<li>STL Tutorial: How to use C++ Vector with Example Program</li>
</ul>
The following are few important functions/statements required to create your queue program:
<ul>
<li><b>#include <queue></b>- In order to use STL queue, add this include. This will include some important files to the code we are writing.</li>
<li><b>queue <type> ourQueue;</b> ‐ Declare queue of some type</li>
<li><b>ourQueue.empty();</b>‐ Check if the queue is empty. If queue is empty the answer will be true, otherwise the answer is false.</li>
<li><b>ourQueue.size();</b>‐ Figure out the number of elements in your queue. Just like size, you also have sizeof() operation as well.</li>
<li><b>ourQueue.front()</b> and <b>ourQueue.back();</b> ‐ You can access the first element in the queue, or the last element in the queue using front and back function respectively.</li>
<li><b>ourQueue.push();</b>‐ When you are creating the queue, you can use push to add new elements to the queue.</li>
<li><b>ourQueue.pop();</b> ‐ If you would like to remove the element from the queue, use the pop function:</li>
<li>You also have emplace and swap. Emplace is used to construct and insert element into the queue. Swap is used when you need to swap the content. The syntax for these two functions are similar to the above functions.</li>
</ul>
<h2>STL Queue Basic Example Code</h2>
Our task is to create a queue and add some elements( 3, 6 and 7) to it. After that, we'll remove the elements from the queue.
In order to make it more simple I will use one ciphered numbers, and there will be few public member functions applied.
<code><pre>
#include <iostream>
#include <queue>
using namespace std;
int
main( void )
{
queue < int > ourQueue;
cout<<"The occupied place in the memory is = "
<<ourQueue.size()
<<endl;
ourQueue.emplace( 3 );
ourQueue.emplace( 6 );
ourQueue.emplace( 7 );
cout<<"The occupied place in the memory is = "
<<ourQueue.size()
<<endl
<<"And with the bits it is ="
<<ourQueue.size() * sizeof( int )
<<endl;
while( ! ourQueue.empty() )
{
int iTemp = ourQueue.front();
cout<<iTemp<<endl;
ourQueue.pop();
}
return EXIT_SUCCESS;
}
</pre></code>
In general, in the above code we did the following:
<ul>
<li>Create a queue</li>
<li>Calculate the size of the queue before any elements were added</li>
<li>Construct and insert few elements,</li>
<li>Calculate the size after the elements were added</li>
<li>Empty the content of the queue</li>
</ul>
The following are few suggestions to improve the above basic code:
1) First, probably you can add some meaningful comments in the above program to explain what it does.
2) Second, add few lines of code to understand how front and pop works.
Probably you can add the following line to the above sample code, after you have emplaced those elements into our queue.
int iTempFront = ourQueue.front();
cout<<iTempFront;
After that add one more time the same two lines of code. Now, use method pop in between those added lines of code, something like this:
int iTempFront = ourQueue.front();
cout<<iTempFront;
ourQueue.pop();
iTempFront = ourQueue.front();
cout<<iTempFront;
3) Third, add few lines of code to understand how back works. Replace the above few lines of code with the following.
int iTempFront = ourQueue.back();
cout<<iTempFront;
ourQueue.pop();
iTempFront = ourQueue.back();
cout<<iTempFront;
So, now you understand the back member function and you should be able to figure out what is difference between front and back, as well as why pop is used for.
4) Fourth, remove those three emplace member functions and replace that part of the code with this one:
<code><pre>
do
{
char cChoice;
cout<<" More elements (y)es / (n)o ->";
cin>>cChoice;
if( ( cChoice == 'N' ) || ( cChoice == 'n') ) { break;}
else if( ( cChoice == 'Y' ) || ( cChoice == 'y'))
{
int iNextOne;
cout<<"Next element->";
cin>>iNexOne;
ourQueue.push( iNexOne);
}
else
{
cout<<"Wrong choice!!!";
systm("clear");
}
}
while( 1 );
</pre></code>
<h3>Additional Thoughts on Queue</h3>
Now that you have some basic idea about queue, you should also understand the following two types of queues that you might encounter.
<ul>
<li><b>Limited Queue</b> ‐ Limited queue is implemented with simple array. This implementation is mostly not interesting and it is more useful in C.</li>
<li><b>Unlimited Queue</b> ‐ This uses struct(class) and pointers. While practically there is no limit to this, it is limited by the physical resources you have on your system.</li>
</ul>
When you start creating serious programs in C++, you could have queue of objects or you might have queue of something in your class.
In the world of C, deciding when to use queue over array is simple. If you don't know how many objects you will need to store, the array was not useful. Now, there are vectors and you could add elements at the end of it and even swap them.
Two most basic dynamic data structures are: stack and queue. They are similar. Stack will return last added element. On the other hand, queue will return first added element. So, if you add elements on one side and later remove them from your particular container, those two data structures could be good pick.
If you need to add elements at the beginning and at the end of structure deque might be considered. This could be reason why to pick deque over the vector. However, if you need to add elements in the middle of our data structure, you might be needing list. Bad side of list could be felt in situations when you need to access first, second, third or n-th element of the list. In order to improve original list you could deploy few tricks.
<h3>Additional Queue Exercises</h3>
<ol>
</li>Create the queue that will store active processes one your computer. It would be good idea to type ps aux into terminal and figure what you might need.</li>
</li>Create a queue for music playlist. Your task is to create part of the code that will store names of song, locations on the disk, and few additional information about the song.</li>
</li>Create two queues, one will have grater priority and the second one will have lower priority. The strategy of consuming elements from those queues it this: if queue with greater priority is not empty take element from that queue, and if the queue with higher priority is empty get elements from the queue with lower priority.</li>
</li>Same as above #3, but use the stack for lower priority data structure.</li>
</li>Your task is to crate the part of the program that will store messages to be encrypted.</li>
</li>Create the page, it will have sentences of one conversation. Those sentences will be kept as the stings and added from the file. After you have completed reading from the file, display these sentences on the screen. Try to limit the size of the queue, so that your program won't crash.</li>
</li>Create a program to manage printer queue.</li>
</ol>
<br />
Link:<br />
http://www.thegeekstuff.com/2017/01/cpp-stl-queue/<br />
<br />
</html>
<html>
Vector is an important part of a STL (Standard Template Library).
On a very high-level, STL library has lot of containers that are often used, and it has few methods that could be applied on those containers. Basically STL has several ready-to-use common classes that you can use in your C++ programming. We'll cover STL in detail probably in a separate article.
Before we discuss about Vector, let us start with an array.
Typically, you'll initialize an array as shown below. In this case, you reserve space for no more than 10 ints in the memory.
int array[10];
What if you need eleven int in your array?
Then you define dimension like DIM 10, that is a macro, and if you need to change that dimension you change the number.
In that case, you need to recompile the program, which is not practical in all situations.
You could hard code the array, leave the dimension out, and let C++ calculate the dimension of the array. Or you could use: calooc, free, malloc, realloc or sbrk.
In C++ those functions have been called obsolete, and you could use new and delete instead of the above functions for dynamic allocation.
<h3>C++ Vector Example Code</h3>
The following C++ code example shows how we can use Vector.
<code><pre>
#include <iostream>
#include <vector>
using namespace std;
int
main(void)
{
//Space for vector of int, called iVector
vector <int> iVektor;
//we will add the elements at the end of vector
do
{
//space for next element of the vector
cout << "Next Element->"; int iElement; cin >> iElement;
//to remove the element from the back use pop_back
iVektor.push_back(iElement);
cout << "Size of the vector is =" << iVektor.size() << endl
<< "Capacity of the vector=" << iVektor.capacity() << endl;
cout << "More elements yes(y)/no(n)->";
char cRespond; cin >> cRespond;
if((cRespond == 'y')||(cRespond=='Y')) continue;
break;
} while(true);
//display elements from begin to end
for(vector<int>::iterator i=iVektor.begin();
i != iVektor.end();
cout << *i++ << endl); cout << endl << endl;
//display elements from end to begin
for(vector<int>::reverse_iterator r=iVektor.rbegin();
r != iVektor.rend();
cout << *r++ << endl); cout << endl << endl;
cout << "You wish to see the element->";int iIndex; cin >> iIndex;
//first method to dispaly n-th element of a vector
cout << "At(" << iIndex << ")="
<< iVektor.at(iIndex) << endl
<< "or like this=";
//one more approach to display one of vector elements
vector<int>::iterator p=iVektor.begin()+iIndex;cout << *p << endl;
int iRespond; cin >> iRespond;
return EXIT_SUCCESS;
}
</pre></code>
In STL, somebody created class with several methods, you can just use them, and benefit from the accumulated work of several programmers who worked on STL.
Those classes are called with #include <vector> for example.
There are also other containers in C++ and they could be applied in appropriate situations.
Declare these classes as shown below:
template <typename T> class vector
Now, if you know how C++ template works, you could conclude that there are a number of elements that are of type user uses.
Some of the things you might be interested are implemented in methods: size, capacity, resize and so on. The methods are very easy to understand.
If some task is very often used they usually add that method in vector library.
One very important thing are the iterators, you use them like they are pointers, but you don't need to know about their implementation. In some cases it could be useful to know how vectors are implemented, because you could estimate the speed of the algorithm.
To get the beginning of the vector you could use begin, but for the end there is method end. If you wish to use it backward you have: rbegin and rend.
And if you would like to get the element at certain position you should have at method that could be used in this manner:
iVector.at[positon];
Vectors are array alike data structures, that are good from the point of speed, if we need to access the arbitrary elements, and if we need to add the elements at the end, but they are not very good if you need to add the elements at the beginning or in the middle.
This leaves space for other containers like: stack, queue, list, map and etc. But this is a place for new discussion, which container to use in the situation you are in. This introduction to STL vector should be a good jumpstart for you to research further and improve your skill in this area.
<h3>Additional STL Vector Exercises</h3>
Use Vectors to solve the following problems in C++:
<ol>
<li>Ask the user for the number of elements in the array, and import them from the keyboard. After you save them in the memory, copy them in similar array which will be sorted. Finally, display all the elements of the vectors, the sorted one and not sorted one.</li>
<li>Create a container for at least 100 ints. Then you will be provided with second vector of 10 elements. You need to calculate how many of elements of the second vector are contained in the first one. Also need to calculate percent of how many elements are in vector, and how many are not.</li>
<li>There are two vectors for which you don't know the size in advance. But, the sizes are same all the time. You need to show the message, are those two vectors equal.</li>
<li>In the vector of unknown size, and int type, you should count how many times one element is repeated.</li>
<li>Create the solution that will keep the int elements in vector and use binary search to find are those elements contained in that particular vector. Enable user to be able to input elements as long as he/she needs to look for the elements.</li>
<li>Unknown number of ints is stored in vector. You task is to show the one part, the beginning of the part of a vector, and display the elements till you reach the end of sub vector. Create solution that will be able to display the part of the vector backward.</li>
<li>Merge two sorted vectors into one.</li>
</ol>
<br />
Link:<br />
<a href="http://www.thegeekstuff.com/2014/02/cpp-stl-vector/"></a><br />
<br />
</html>
<html>
In C++, the most common type of inheritance is public.
The public type of inheritance is used in order to broaden the parent class with some functionalities or some data members.
This type of public inheritance is sometimes called the “ is “, as the parent class and the child class are of the same type and that could be seen with conversions, where the child class has more to it, than parent one.
The private inheritance is of different type, it is of “ has “ type.
This means that private inheritance is suitable for situations in which we need to prevent main program to accidentally access some of the methods inherited from the parent class.
The protected inheritance is less restrictive than private and it is useful when we need some of the implementations from grand parent class.
The following table will illustrate this difference:
<table border="1">
<tr><th></th><th>Public Members</th><th>Protected Members</th><th>Private Members</th></tr>
<tr><td>Public Inheritance</td><td>public</td><td>protected</td><td>private</td></tr>
<tr><td>Protected inheritance</td><td>protected</td><td>protected</td><td>private</td></tr>
<tr><td>Private inheritance</td><td>private </td><td>private</td><td>private</td></tr>
</table>
.
As we can see from the above table, private inheritance is the most restrictive and the protected is somehow in between the private and the public type.
For your reference, the following will help to understand the basics of inheritance:
<ol>
<li> <a href="http://www.thegeekstuff.com/2014/07/cpp-inheritance-abstract-class/">How to Use C++ Inheritance and Abstract Class with Code Examples</a></li>
<li> <a href="http://www.thegeekstuff.com/2013/08/cpp-inheritance/">How to Use C++ Single and Multiple Inheritance with an Example</a></li>
</ol>
Before we start with an example program, I want to point out that the first time I dealt with private inheritance was really long long time ago. I have accidentally omitted to add public in the front of the parent class.
This was confusing at that time, because I have not seen that in any books. Since I was in a rush, I didn't research further and just just added word public in the front of the parent class and moved-on.
At a later time, I realized how this worked when I had a chance to learn more about it from Lippman and Lajoje&aposs book C++ Primer (5th edition). I strongly recommend that you read that book if you are serious about programming in C++.
<h3>Private Inheritance Example Program</h3>
In order to understand how to use private inheritance, let us look at the following example program that uses two classes: the parent and the child classes.
<code><pre>
# cat p1.cpp
#include <iostream>
using namespace std;
class Parent{
public:
void parentMethod( void ){ cout << "Inside parent method" << endl;}
};
class Child : private Parent{
public:
void childMethod( void){
cout << "Inside child method" << endl;
parentMethod();
}
};
int main( void ){
Child C;
C.childMethod();
return 0;
}
</pre></code>
In the above example code:
<ul>
<li> We created one object of the Child type with name “C“</li>
<li> Then we applied childMethod(), which has some message and it will in-turn call the method parentMethod() that is placed in its body.</li>
<li> If you try to call method parentMethod() on the object “C“, you will get error message. From this we observe the most important property of private inheritance that it will disable the child object to accidental access some of the grand parent methods that would get inherited with public inheritance.</li>
</ul>
The following is the output of the above program:
<pre><code>
# g++ p1.cpp
# ./a.out
Inside child method
Inside parent method
</code></pre>
<h3>Protected Inheritance Example Code</h3>
The following example explains how the protected inheritance could be used in the program.
<pre><code>
# cat p2.cpp
#include <iostream>
using namespace std;
class GrandParent{
public:
void grandParentMethod( void ){ cout << "Method in the grand parent class" << endl; }
};
class Parent : protected GrandParent{
public:
void parentMethod( void ){ cout << "Method in the parent class" << endl; }
};
class Child: protected Parent{
public:
void
childMethod( void ){
cout << "Method in the child class" << endl;
parentMethod();
grandParentMethod();
}
};
int
main( void ){
Child C;
C.childMethod();
return 0;
}
</code></pre>
In the above example code:
<ul>
<li> We created three levels of inheritance with classes: the grand parent, the parent and child.</li>
<li> From this chain we have one method at the each of the classes.</li>
<li> The main function has one object of the Child type, afterwards we call the method childMethod(), which has two calls of parentMethod() and grandParentMethod().</li>
</ul>
The following is the output of the above program:
<pre><code>
# g++ p2.cpp
# ./a.out
Method in the child class
Method in the parent class
Method in the grand parent class
</code></pre>
From these two examples, we have learned how this type of inheritance is implemented.
Now, I need to say that in this case, we have used protected inheritance in the parent class and if we have used the private inheritance in the second layer of chain inheritance, we would've end up with an error message.
In order to make the most of this two types of inheritance, I will show you how you could use particular method from parent class if we overload it with some name method in the child class.
That task should be achieved in the following three ways:
<ul>
<li> Parent::parentMethod();</li>
<li> using Parent::Method();</li>
<li> Object.Parent::parentMethod().</li>
</ul>
In another words, if the child class hides some of the methods from the parent class, we will have already mentioned methodologies to access hidden methods.
<h3>Private vs Protected Inheritance</h3>
Beside having difference in the syntax, we have learned that private inheritance is more restrictive that protected inheritance, and that difference is important.
From this we will know should we break the chain of inheritance with the private inheritance or should we keep implementations with protected inheritance.
So, if you would like to use implementation in the parent class but not in the child class you would use private class, but if you would like to use implementation in the child class too, you have the protected inheritance.
Therefore, we could say that private and protected inheritance will keep implementations, but it will create the restrictions to the interface.
<h3>Using Containment vs Private and Protected Inheritance</h3>
Technically speaking, the containment is utilized if we have one class inside the other one. By the way, we could also have pointer of other class type or even reference of the other class type.
The containment is also “ has “ type of the relationship between two classes.
i.e, the class could have some relationships to other classes and that will be useful in some of the situations.
It is usually more likely that you will use containment, rather than the private or the protected inheritance.
Scenarios to Use Private or Protected Inheritance
Let's consider this scenario. The programmer is developing the parent class with array inside and the binary search method.
From this class we create child class that will not store elements of already mentioned array in the sorted manner.
So, we want to use the array in the main function for our child object, but we would not allow binary search to be used, because in order to use binary search array needs to be sorted.
This would be useful in situations when we develop the program with more programmers.
This types of inheritance could be useful with virtual functions, when we need to limit access to parent methods too.
One more situation in which we would need to use this types of inheritance is with multiple inheritance. For that we would need to have at least two parents and one of the methods should be inaccessible from outside of our class.
Based on this idea, I am sure you will find few situations on your own as well.
<h3>Final Thoughts</h3>
For many programmers, the containment is more likely the better choice. The private and protected inheritance are implemented just because we need to respect the consistence too. We could say that this type of inheritance has it's own place also.
If you would like to become complete C++ programmer, you are going to master this technique as well and use it when you need it.
However, one question comes to my my mind at this point: Why is the private inheritance default type of inheritance?
<br />
<h5>Link:</h5>
<a href="http://www.thegeekstuff.com/2017/07/cpp-inheritance-public-private-protected/">http://www.thegeekstuff.com/2017/07/cpp-inheritance-public-private-protected/</a>
</html>
<html>
<br />
Link:<br />
<a href="http://www.thegeekstuff.com/2016/02/c-plus-plus-11/">http://www.thegeekstuff.com/2016/02/c-plus-plus-11/</a><br />
<br />
</html>
<html>
Link:<br />
<a href="http://www.thegeekstuff.com/2014/02/cpp-template-functions/">http://www.thegeekstuff.com/2014/02/cpp-template-functions/</a><br />
<br />
</html>
<html>
<b>CDN</b>, <b>content delivery network</b> or <b>content distribution network</b><br />
is a system of servers containing copies of data, placed at various points in a network so as to maximize bandwidth for access to the data from clients throughout the network.
</html>
<html>
<ul>
<li>Prüfungstermine:</li>
jeweils im <b>Juni</b> und im <b>Dezember</b>.<br />
<br />
<li>Homepage: <a href="http://www.cfa-germany.de" target="_blank">CFA Deutschland</a></li>
<br />
</ul>
</html>
<html>
<ul>
<li>CML is CI/CD for Machine Learning Projects</li>
</ul>
<h3>Links:</h3>
<a href="https://cml.dev/" target=_blank>CML ‐ Homepage</a>
</html>
<html>
Der <b>Constant Maturity Swap</b> ist eine Form des Zinsswaps, bei dem <br />
die Zinszahlung eines Swappartners in regelmäßigen Abständen an<br />
einen (längerfristigen) Referenzzinssatz (z. B. den jeweils aktuellen <br />
10-Jahres-Swapsatz) angepasst wird. Die Zinszahlung des anderen<br />
Swappartners orientiert sich in der Regel an einem kurzfristigen Zins-<br />
satz (z. B. 3-Monats-Euribor).<br />
<br />
Wie bei einem normalen Zinsswap wird also ein kurzfristiger Zins<br />
gegen einen längerfristigen getauscht, wobei im Unterschied dazu <br />
der langfristige Zinssatz über die Laufzeit nicht konstant ist,
sondern<br
/>
regelmäßig angepasst wird.<br />
<br />
Da es sich aber um einen "unfairen" Tausch handeln würde, wird <br />
bei einer normalen Zinskurve der Constant Maturity Swap mit einem <br />
Aufschlag auf z. B. Euribor bzw. LIBOR oder als Abschlag auf den<br />
tourlich angepassten Kapitalmarktsatz quotiert.<br />
<br />
Link:<br />
https://de.wikipedia.org/wiki/Constant_Maturity_Swap<br />
<br />
</html>
<html>
<ul>
<li>Aufruf von Macros, wie z.B. <i>find_package</i> </li>
<li>Definieren von Variablen, mittels <i>set</i></li>
</ul>
</html>
<html>
<code><pre>
cmake_minimum_required(VERSION 2.6)
project(CMAKEDEMO)
#There are lots of scripts with cmake for finding external libraries.
#see /usr/local/share/cmake-2.6/Modules/Find*.cmake for more examples
find_package(GLUT)
find_package(OpenGL)
set(CMAKE_CXX_FLAGS "-g -Wall")
add_subdirectory(w01-cpp)
</pre></code>
<p />
<h3>Nähere Erläuterungen:</h3>
<table border="1">
<tr><th>Code</th><th>Bedeutung / Erklärung</th></tr>
<tr><td><b>cmake_minimum_required(VERSION 2.6)</b></td><td># Definition, welche Version CMake mindestens haben muss</td></tr>
<tr><td><b>project(CMAKEDEMO)</b></td><td># Das Projekt erhält den Namen "CMAKEDEMO"</td></tr>
<tr><td> </td><td></td></tr>
<tr><td><b>find_package(GLUT)</b></td><td># Suchen, Finden & Einbinden der Library resp. des Headerfiles</td></tr>
<tr><td><b>find_package(OpenGL)</b></td><td># s.o.</td></tr>
<tr><td> </td><td></td></tr>
<tr><td><b>set(CMAKE_CXX_FLAGS "-g -Wall")</b></td><td># Setzen der Variablen CMAKE_CXX_FLAGS für den Compiler</td></tr>
<tr><td><b>add_subdirectory(w01-cpp)</b></td><td># Der Code befindet sich in diesem Unterverzeichnis</td></tr>
</table>
</html>
<html>
<ul>
<li>plattformunabhängiges Programmierwerkzeug <br />
für die Entwicklung & Erstellung von Software; </li>
<br />
<li>zentrale(s) File(s): <b>CMakeLists.txt</b></li>
<br />
<li>Mit CMake kann aus Skriptfiles (CMakeLists.txt) Make-<br />
files und Projekte für viele IDEs und Compiler erzeugt werden;</li>
<br />
<li>Dabei überprüft CMake die Abhängigkeiten für C/C++, <br />
Fortran und Java automatisch und unterstützt parallele Builds;</li>
<br />
<li>Weitere Tools für Tests & Releases sind:<br />
<ol>
<li>CPack :: Erstellen von Installpaketen</li>
<li>CDash :: </li>
<li>CTest ::</li>
<li>DART</li>
</ol></li>
<br />
<li></li>
<br />
<li></li>
<br />
<li></li>
<br />
<li></li>
<br />
<li></li>
</ul>
</html>
<html>
<ul>
<li> Eine Möglichkeit:
<code><pre>
#one {
font-family:Arial,sans-serif;
font-size: 2em;
color:blue;
}
#two {
background-color: blue;
border-radius: 5px;
color: yellow;
}
<p id="one">Ein formatierter Absatz.</p>
<p id="two">Ein anderer formatierter Absatz.</p>
</pre></code>
</li>
<br />
<li>Alternativ:
<code><pre>
<style>
code {
font-family: Consolas,"courier new";
# color: crimson;
color: red;
background-color: #f1f1f1;
padding: 2px;
# font-size: 105%;
}
</style>
</pre></code>
</li>
</ul>
<h3>Link:</h3>
<ul>
<li><a href="http://www.css4you.de/trickkiste/tr00001.html" target=_blank>CSS4You :: Trickkiste</a></li>
</ul>
</html>
<html>
<ul>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.a-coding-project.de/ratgeber/css/farbe-und-hintergrundgestaltung" target=_blank>A Coding Project :: Farbe und Hintergrundgestaltung</a></li>
<li><a href="https://im-coder.com/css-tabelle-zelle-hintergrundfarbe-mit-text-in-tabellenzellen.html" target=_blank>I'm Coder :: Tabelle-Zelle Hintergrundfarbe Mit Text in Tabellenzellen</a></li>
</ul>
</html>
<html>
<img src="./pictures/css3-farben.png" height=3943 width=318 />
<meta Farbliste>
<h3>Links:</h3>
<ul>
<li><a href="https://www.webmasterpro.de/coding/article/css-referenz-farben.html/image/css3-farben.png" target=_blank>WebMasterPro :: CSS Referenz Farben</a></li>
</ul>
</html>
<html>
<ul>
<li>Der CSS-Kommentar wird mit <b>/*</b> eingeleitet und <b>*/</b> mit abgeschlossen.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.html-seminar.de/css-kommentar.htm"
target="_blank" rel="noreferrer noopener">
HTML‐Seminar :: CSS‐Kommentar einfügen ‐ CSS‐Bereiche auskommentieren</a>
</li>
</ul>
</html>
<html>
Es gibt aber einige Fallstricke beim Installieren und Konfigurieren,<br />
und an die Syntax muß man sich auch erst gewöhnen.<br />
<h2>1. CVS Client Konfiguration / Installation</h2>
<h4>1.1 WinCVS</h4>
<p>
WinCVS ist ein Grafisches Frontend für CVS unter Windows.
Wenn die Entwicklungsungebung CVS nicht unterstützt, ist WinCVS ein sehr nützliches Tool. Die einzige Wichtige einstellung ist die des CVSROOT. z.B:
</p><code>
CVSROOT=:pserver:user@cvs.example.org:/usr/local/cvsroot
</code><p>
<b>Hinweis:</b><br />
Leider kommt WinCVS mit der Port-Angabe im CVSROOT nicht zurecht. WinCVS interpretiert die Portnummer (zumindest bei mir) als Teil des Pfades zum Repository, was immer in einer Ablehnung der Verbindung beim cvs logon endet.
Das einzige was bei mir geholfen hat, ist, den Port im Einstellungsdialog einzugeben und NICHT über die CVSROOT Variable zu setzen.
</p>
<h4>1.2 CVS unter AIX</h4>
<p>
Da der CVS Standard Port 2401 unter AIX (leider) schon vergeben ist, muß man einen anderen Port verwenden (in meinem Fall 2402).
</p>
<p>
Mein Kollege hat dazu CVS für diesen Port als Defaultport kompiliert (auch ne Lösung ;-)).
Es sollte aber auch über die Environment-Variable CVS_CLIENT_PORT oder direkt mit der CVSROOT - variable gehen ( CVSROOT=:pserver:user@cvs.example.org:2402/usr/local/cvsroot ).
Hier ist wieder der Pfad hinter der Port Nummer zu beachten.
</p>
<p>
<b>TIP: </b></br />
Ein touch ~/.cvspass hilft, wenn cvs das File nicht selbst anlegen kann.
</p>
<h2>2. CVS Server einrichten</h2>
<h4>2.1 CVS Server unter AIX einrichten</h4>
Leider ist der CVS Standard Port (2401) unter AIX schon vergeben, also nehmen wir den nächsten verfügbaren. In meinem Fall war das Port 2402.
Also frisch ans Werk:
Zuerst muß in der Datei /etc/services die Zeile
cvspserver 2402/tcp
eingefügt werden.
Jetzt müssen wir nur noch dem inetd sagen was er tun soll.
Dazu ügen wir in die Datei /etc/inetd.conf folgende Zeile ein:
cvspserver stream tcp nowait root /usr/local/bin/cvs
cvs -f --allow-root=/usr/cvsroot pserver
Die beiden Zeilen oben müssen hintereinander in einer Zeile stehen
Unter --allow-root={pfad} sollte ein eingerichtetes Repository verfügbar sein (siehe Einrichten eines Repositories ).
Das war es eigendlich schon. Nun muß nur noch dem Client beigebracht werden, das er den Port 2402 verwenden soll.
<h4>2.2 CVS Server unter Linux/Debian einrichten</h4>
Unter Debian ist es eigendlich ganz einfach: mit
>apt-get install cvs
CVS installieren. Danach müssen die Fragen nur noch beantwortet werden und der CVS-Server sollte betriebsbereit sein.
Falls die configuration wiederholt werden soll, dann hilft einem ein
>dpkg-reconfigure cvs
bestimmt weiter.
<h2>3. CVS Benutzen</h2>
<h4>3.1 Einrichten eines Repositories</h4>
Das CVS-Repository ist das zentrale Verzeichnis, in dem alle Dateien und Unterverzeichnisse verwaltet werden. Ich nehme hier als Beispiel ein CVS Repository in /var/log/CVS an. Deswegen sollte als Vorbereitung die Umgebungsvariable CVSROOT auf dieses Verzeichnis gesetzt werden, z.B. in der bash mit:
>export CVSROOT=/var/log/CVS
Ein Repository kann als root angelegt werden, mit:
mkdir -p /var/log/CVS/CVSROOT
mkdir -p /var/log/CVS/Module
In /var/log/CVS/ speichert CVS seine Daten. CVS nennt dies ein Repository.
In /var/log/CVS/Module speichert CVS die Daten zum Projekt Module Doku. CVS nennt dies ein Modul.
Falls noch nicht geschehen sollte jetzt die CVS-Gruppe und der CVS-User angelegt werden:
>groupadd cvs
>useradd -g users -G cvs -m cvs_user
>cd /var/log/CVS
>chown -R cvs_user.cvs Module
groupadd und useradd brauche ich hier nicht zu beschreiben.
Wichtig ist nur, daß das Repository dem CVS-User (cvs_user) zugewiesen werden muß und er schreibrechte auf alle Modul-Unterverzeichnisse hat.
Wichtig!!! Nie die Dateien im Repository direkt ändern !!!
Wichtig!!! Verzeichnisse sind später nicht zu entfernen !!!
Zu guter letzt müssen wir cvs nur noch das Repository initialisieren lassen. Das tun wir mit:
>cvs -d /var/log/CVS init
cvs init ist "vorsichtig". D.h. es löscht nie Dateien im Repository, könnte also gefahrlos auch später aufgerufen werden.
Wir haben nun ein leeres Repository angelegt.
Um es mit Leben zu füllen müssen wir zuerst ein Modul in das Repository importieren
<h4>3.2 Importieren in das Repository</h4>
In das Repository kann von jedem Rechner in Netzwerk importiert werden. Vorausgesetzt wird lediglich, das CVS installiert und die Environment-Variable CVSROOT gesetzt ist.
Alle Dateien, die sich in dem Verzeichnis befinden, in dem wir momentan sind weden mit
>cvs import -m "initial Import" Module Original alpha
in das Repository aufgenommen.
Beim Import erwartet CVS diese Syntax:
>cvs import -m <Kommentar> <Modul-Name> <Vendorname> <Revision-tag>
Vendorname und Revision-Tag müssen angegeben werden, aber der Inhalt ist beliebig. CVS nimmt nun die Daten in seine Verwaltung auf.
Falls man den gerade importierten Versionsstand wieder (trotz einiger Änerungen) wieder restaurieren will, empfiehlt es sich, jetzt ein Tag zu setzen:
>cvs tag -F Original Module
Die Daten im jetztigen Zustand bekommen den Tag "Original".
Der Parameter -F bedeudet Force und überschreibt ein Tag falls es schon im Repository vorhanden sein sollte.... hmmm ...
OK. Wenn eine Datei im Repository bereits mit diesem Tag markiert ist, aber bereits eine (einige) neue Versionen dieser Datei committet wurden, dann wandert das Tag zu der neuesten Version der Datei.
Dieser Parameter eignet sich also auch um ein Tag zu einer neueren Version zu verschieben.
Dies ist aber mit Vorsicht zu geniesen, da so die konsistenz der 'alten' Version dann nicht mehr gewährleistet ist.
<h4>3.3 Auschecken (cvs checkout)</h4>
>cvs checkout -r Original Modul
CVS erzeugt im aktuellen Arbeitsverzeichnis das Unterverzeichnis Modul an und exportiert alle im Repository befindlichen Dateien und Unterverzeichnisse des Moduls Modul.
Der Parameter -r bedeudet das alle Dateien die mit dem Tag
Orginal markiert wurden exportiert werden.
Auschecken in ein anderes Verzeichnis, als durch den Modulnamen vorgegeben:
Mit dem Parameter -d kann man angeben, in welches Verzeichnis das Modul ausgecheckt werden soll.
z.B :
>cvs checkout -d neuModule Module
veranlasst cvs das Modul Module in das Verzeichnis neuModule auszuchecken.
<h4>3.4 Änderungen dem Repository hinzufügen (cvs commit)</h4>
>cvs commit Module
Durch diesen Befehl werden die geänderten Daten ins Repository übernommen, dazu wird der Editor aufgerufen und ein Kommentar kann zu den Änderungen eingegeben werden.
Welcher Editor verwendet wird, kann man über die Environment-Variable EDITOR festlegen.
z.B:
>cvs tag -F alpha1 Module
versieht die aktuelle Version mit einem neuen Versions-Tag.
<h4>3.5 Hinzufügen von Dateien</h4>
Hinzufügen einer Datei: (in diesem Fall der Datei tuWas )
>cd Module
>vi tuWas ... <esc> :wq! (Windows: einfach Notepad benutzen)
>cvs add tuWas
Datei wird fürs ügen NUR vorgemerkt! Mit einem
>cvs commit
wird die neue Datei ins Repository aufgenommen.
Jetzt ist ein guter Zeitpunkt ein neues Versions-Tag zu setzen. Das beschieht folgendermaßen:
>cd ..
>cvs tag -F "tuWas_hinzugefuegt" Module
Der neue Versions-Tag ist gesetzt. Verzeichnisse werden analog hinzugefügt. Jedoch geschieht dies nicht rekursiv!
<h4>3.6 Entfernen von Dateien</h4>
Im CVS-Kontext bedeutet das Entfernen einer Datei, daß die alte Version im Repository erhalten bleibt, aber beim checkout nicht mehr ausgeliefert wird.
>cd Module
>rm tuWas
entfernt die Datei tuWas aus dem Arbeitsverzeichnis.
>cvs remove tuWas
markiert die Datei tuWas zum löschen. Aber erst mit
>cvs commit
wird das "löschen" ausgeführt.
Die Datei wird bein nächsten checkout oder update nicht mehr berücksichtigt.
>cd ..
>cvs tag -F "tuWas entfernt" Module
Tagt (Markiert) alle Dateien des Moduls.
<h4>3.7 Entfernte Datei zurückholen</h4>
Um die Datei tuWas wieder ückzuholen müssen wir dem checkout Kommando sagen welche Version wir haben wollen.
>cvs checkout -r "tuWas_hinzugefuegt" Module
Dies hat aber einen "sticky" Tag zur Folge. "sticky" meint in diesem Fall, daß die durch -r {Version} mitgegebene Version bis auf weiteres diejenige bleibt, auf die sich die folgenden Updates beziehen.
>cvs update -A
holt die neueste Version und entfernt dabei "sticky" Tags
>cvs update -p -r "tuWas_hinzugefuegt" Module
holt die ältere Version, in der die Datei noch existiert, gibt diese aber einfach in die Konsole aus.
<h4>3.8 Datei umbenennen</h4>
Um eine Datei umzubenennen, genügen einige einfache Kommandos:
>mv foo bar
Die Datei foo in bar umbenennen.
>cvs remove foo
Die Datei foo im CVS-Repository als entfernt markieren.
>cvs add bar
Die neue Datei bar hinzufügen.
>cvs commit -m "Renamed foo to bar" foo bar
Die Änderungen ins repository übernehmen.
Dabei ändert sich die Versionsnummer. Wenn das nicht gewünscht wird, kann mit
>cvs commit -r 3.0
eine Versionsnummer vorgegeben werden.
Achtung: Die neue Versionsnummer muß höher sein als alle aktuell im Modul verwendeten.
<h4>3.9 alte Versionen benutzen</h4>
Um eine Datei in einer alter oder getaggten Version aus CVS herauszuholen benutzen wir den Update -Befehl zusammen mit der -r option
>cvs up - r 1.12 Makefile
Hiermit wird die Date Makefile aud die im Reposotory vorhandene Version 1.12 up- oder downgegradet.
Das ganze funktioniert natuerlich auch für getaggte Versionen
>cvs up - r "TESTVERSION" Makefile
hiermit wird das Makefile mit dem Tag TESTVERSION aus dem Repository geholt
Das ganze kann natürlich auch mit find kombiniert werden:
>find . -name Makefile -exec cvs update -r TESTVERSION '{}' \;
hiermit wird das Makefile mit dem Tag TESTVERSION aus dem Repository für dieses und alle Subdirecturies geholt
<h4>3.10 Unterschiede zwischen Versionen</h4>
Der -Befehl liefert die Unterschiede zwischen der Datei im lokalen Verzeichnis und der im Repository oder zwischen verschiedenen Versionen:
>cvs diff
Ohne weitere Parameter werden die unterschiede zwischen den Dateien im aktuellen Verzeichnis, und den Dateien im Repository ausgegeben.
Um direkt die Unterschiede zwischen zwei Versionsnummern angezeigen zu lassen, bekommt diff die Option -r (für Revision) mit auf den Weg:
>cvs diff -r 3.0 -r 3.12 Module
In diesem Beispiel werden die Unterschiede zwischen den Versionen 3.0 und 3.12 ausgegeben.
Was für Versionen funktioniert, geht natürlich auch für Datumsangaben:
>cvs diff -D 09/11/2000 -D 09/19/2000 Module
Das Beispiel zeigt Unterschiede zwischen Versionen vom 11.09.2000 und vom 19.09.2000 auf.
(Datum im Format mm/dd/yyyy)
Alle Unterschiede seit dem letzten checkout werden von
>cvs diff -u Module
angezeigt.
Führt man vor jedem commit ein:
>cvs diff -u Module >>Module.changelog
aus, erhält man mit der Zeit eine Changelog-Datei ohne diese selbst zu bearbeiten zu müssen.
<h4>3.11 Branches</h4>
Erzeugen eines Branches (Ast), der unabhängig vom Haupt-(Datei)-Baum bearbeitbar ist. Branches können eigenständig bleiben oder später zum Haupt-Baum hinzugefügt werden ("merge"):
Um einen neuen Branch einzufügen verwenden wir folgenden Befehl:
>cvs tag -b branch_tag foo.cpp
Dies erzeugt einen neuen Zweig (Branch) für die Datei foo.cpp mit dem Tag branch_tag im Repository, ausgehend von der Version, die sich momentan im Arbeitsverzeichnis befindet.
Achtung!! Es wurde nur der Zweig erzeugt. Man arbeitet aber nicht automatisch im neuen Branch!!!
Um mit dem neuen Branch arbeiten zu können müssen wir diesen zuerst in unser Arbeitsverzeichnis holen:
>cvs update -r branch_tag foo.cpp
so ... jetzt haben wir den Branch im Arbeitsverzeichnis, was wir mit einem
>cvs status foo.cpp
überprüfen können.
VARIANTE:
>cvs checkout -d ./test_branch -r branch_tag foo.cpp
Erzeugt ein Verzeichnis test_branch und legt die Dateien in diesem ab. Dadurch kann man mehrere Branches parallel bearbeiten.
Jetzt ist unser Arbeitsverzeichnis auf den neuen Branch eingestellt, und wir können mit einem ganz normalen
>cvs commit foo.cpp
Änderungen in den Branch übernehmen.
<h4>3.12 Die History</h4>
Auslesen der History:
>cvs history -e
gibt alles aus
>cvs history -m {Module}
gibt nur die History dieses Modules aus
>cvs history -c
Info über "commited files"
>cvs history -o
Info über "checked out files"
<h4>3.13 Exportieren</h4>
Um nur die "Nutzdaten" vom 24.12.2002 ohne die Verwaltungsdateien von CVS zu erhalten (in das lokale Verzeichnis ExportModul ):
>cvs export -d ExportModul -D 12/24/2002 Modul
<h4>3.14 update</h4>
Um die eigene Arbeitsversion einer Datei mit den Änderungen anderer Bearbeiter zu synchronisieren, führt man cvs update aus:
>cvs update Doku_CVS
<h4>3.15 Ignorieren von Dateien</h4>
Befinden sich bei einem CVS Update Dateien im lokalen Arbeitsverzeichnis, die nicht von CVS verwaltet werden, ergibt sich eine Meldung wie:
? Doku_CVS//Comment
Um solche Meldung zu verhindern, kann man sich in seinem Homeverzeichnis die Datei .cvsignore anlegen. Pro Zeile ein Dateiname, * als Joker.
cvs ignoriert von selbst bereits alle Dateien mit:
.bak .BAK .o .obj CVS RCS core
<h4>3.16 Kurze Kommandoübersicht</h4>
CVS Kommandos mit Syntax :
<table border="1">
<tr><td> cvs import [-m {Kommentar}] {Modulname} {Vendor-Tag} {Revision-Tag}</td></tr>
<tr><td> cvs checkout [-P] [-r {tag}] {Modulname}</td></tr>
<tr><td> cvs commit [-r {tag}] [{datei}] [{Modulname}]</td></tr>
<tr><td> cvs update [-p] [-r] [-A] [{tag}] [{Modulname}]</td></tr>
<tr><td> cvs tag [-b] [-F] {tag} {Modulname}</td></tr>
<tr><td> cvs rtag [-b] -r {tag} {Modulname}</td></tr>
<tr><td> cvs add {datei}</td></tr>
<tr><td> cvs remove [-f] [-l] [-R] {datei}</td></tr>
<tr><td> cvs -d {CVSROOT-path} init</td></tr>
<tr><td> cvs history [-m {Modulname}] [-e] [-o]</td></tr>
<tr><td> cvs export -d {Verzeichnisname} [-D {Datum}] [-r {tag}]{Modulname}</td></tr>
</table>
<h2>4. CVS-Root</h2>
<h4>4.1 Beispiele für die Variable CVSROOT</h4>
CVSROOT=:pserver:user@cvs.example.org:2402/usr/local/cvsroot
pserver = die Verbindung zum entfernter CVS-Server soll über TCP/IP aufgebaut werden.
user = dieser User wird zum login verwendet.
cvs.example.org Domain oder IP des Rechners am den sich CVS verbinden soll.
2402 Port an den sich CVS verbinden soll. (2401 ist default).
/usr/local/cvsroot Verzeichnis des Repositories (auf dem CVS-Server)
CVSROOT=/devel/CVSROOT
Es soll das Repository auf der lokalen Platte im Verzeichnis /devel/CVSROOT verwendet werden.
top
<h2>5. Tricks & Tips</h2>
<h4>5.1 Zweites Repository verwenden</h4>
Hat man die Variable $CVSROOT nicht gesetzt oder will sie nicht ändern, weil sie auf ein weiteres, benutztes Repository verweist, kann mit
>cvs -d 10.0.0.216:/var/CVS checkout alice
der Pfad nach -d übergeben werden. Die Pfadangabe muß absolut sein.
<h4>5.2 Lokale kopie an ein neues Repository anpassen</h4>
Wenn das Repository auf einen anderen Server verschoben wird, muß man normalerweise seine lokale Arbeitskopie neu auschecken, was aber nicht immer gewünscht ist.
Falls (aus welchen Gründen auch immer) das Repository auf einen anderen Server verschoben wurde, kann man in der lokalen Arbeitskopie keinen Update oder Commit mehr ausführen.
cvs ist so intelligent, das es den Inhalt von CVSROOT für jedes Verzeichnis speichert, und bei allen weiteren cvs-operationen als default verwendet.
Das ist prinzipiell wunderbar, denn nur so sind die 'kurzen' cvs Befehle erst möglich.
>cvs update anstatt >cvs -d /usr/local/cvsroot update
Falls aber der CVS-Server einen neuen Namen (usw..) bekommen hat, versucht cvs immer sich zum alten Server zu verbinden.
Folgendes script Ersetzt alle alten Einträge mit denen des neuen Servers so das ein komplett neuer checkout nicht mehr notwendig ist:
>cd /das/lokale/arbeitsverzeichnis/
for f in `find . -name "Root"|grep "/CVS/Root"`
do
cat $f|sed -e"s/alter.cvs.server/neuer.cvs.server/" > /tmp/tmpf; mv /tmp/tmpf $f
done
Hinweis: Das Verzeichnis /tmp sollte vorhanden sein.
<p>
Link: <br />
<a href="http://www.claus-ebert.de/howto/howto_cvs.html">http://www.claus-ebert.de/howto/howto_cvs.html</a>
</p>
</html>
<html>
<ul>
<li>ein einfaches symmetrisches Verschlüsselungsverfahren;</li>
<li>basiert auf einer monographischen und monoalphabetischen Substitution;</li>
<li>unsicher;</li>
<li>Bei der Verschlüsselung wird jeder Buchstabe des Klartexts auf einen<br />
Geheimtextbuchstaben abgebildet. Diese Abbildung ergibt sich, indem<br />
man die Zeichen eines geordneten Alphabets um eine bestimmte Anzahl<br />
zyklisch nach rechts verschiebt (rotiert); zyklisch bedeutet, dass man<br />
beim Verschieben über Z hinaus wieder bei A anfangend weiterzählt.<br />
Die Anzahl der verschobenen Zeichen bildet den Schlüssel, der für<br />
die gesamte Verschlüsselung unverändert bleibt</li>
</ul>
<br />
<b>Link:</b>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Caesar-Verschlüsselung" target=_blank>Wikipedia (pdf downloaded)</a></li>
<li>Krypto im Advent 2017 - Einsteiger, Aufgabe 3</li>
</ul>
</html>
<html>
<ul>
<li>China, chinesischer Einkaufsmanagerindex</li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li>ProSieben, Sendung “Galileo“, 2024-01-21
</li>
<li><a href="https://en.wikipedia.org/wiki/Moving_Day_(Quebec)"
target="_blank" rel="noreferrer noopener">
Wikipedia :: Moving Day (Quebec)</a>
</li>
<li><a href="https://www.stuttgarter-zeitung.de/inhalt.moving-day-in-montreal-die-halbe-stadt-muss-sofas-hieven.e0675a67-8c57-4148-9848-79a38ed1e2b8.html"
target="_blank" rel="noreferrer noopener">
Stuttgarter Zeitung :: Die halbe Stadt muss Sofas hieven</a>
</li>
</ul>
</html>
<html>
<ul>
<li>Der Vertrag ist […] für beide Teile unter Einhaltung einer Frist<br />
von <b>drei Monaten zum Monatsende</b> kündbar.</li>
<li>Die Kündigung hat für beide Teile schriftlich zu erfolgen.</li>
</ul>
</html>
<html>
<ul>
<li>“R2D2“ := Request to resource Demand to deliver</li>
<li>Link: https://r2d2.capgemini.com</li>
<li><b>Wichtig!</b><br />
Das Tool kann <u>nur</u> mit dem Chrome‐Browser geöffnet werden!</li>
<li>R2D2 ist das zentrale Tool zur Unterstützung der Mitarbeiterein‐<br />
satzplanung aller Einheiten der Capgemini Gruppe.</li>
<li>Es bietet eine übergeordnete Sicht auf die Verfügbarkeit von Mit‐<br />
arbeitern der Capgemini Gruppe weltweit.</li>
<li>Durch den Einsatz von R2D2 wird eine Verbesserung der Trans‐<br />
parenz, effektive Auslastung von Mitarbeitern und verbessertes<br />
Reporting über die Mitarbeitereinsatzplanung angestrebt. Zu‐<br />
sätzlich werden Rohdaten für die Geschäftsprognose generiert.</li>
<li></li>
<li></li>
<li></li>
</ul>
</html>
<html>
Verwendete Stichwörter:
<ul>
<li>XSLT</li>
<li>Banking</li>
<li>“Sybase ASE“</li>
<li>Mathmatic</li>
<li>Calculus</li>
</ul>
</html>
<html>
Most often when we try to execute a command at the shell we do<br>
some mistakes like missing out a char or misspelling it.<br>
Here is a easy way of correcting the mistake without having<br>
to type the entire command again!.<br>
<br>
In the below command "name" has been misspelled as "naem"<br>
<br>
<code>
$ find . -naem "*.txt" -print<br>
find: invalid predicate `-naem`<br>
</code>
<br>
The above command would be valid if we replace "em" (in naem)<br>
to "me"( to have name ). Use carrots to make this change<br>
<br>
<code>
$ ^em^me^<br>
find . -name "*.txt" -print<br>
</code>
<br>
This technique works well with bash and csh.<br>
<br>
This tip generously supported<br>
by: desikann@future.futsoft.com<br>
</html>
<html>
<ul>
<li><b>EPEL</b> :: Extra Package for Enterprise Linux
</ul>
</html>
<html>
<ul>
<li><h3>komplette Fehlermeldung:</h3>
<pre><code>Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve \
host name for http://mirrorlist.centos.org/?release=8-stream&arch=x86_64&repo=AppStream&infra=stock \
[Could not resolve host: mirrorlist.centos.org]", "rc": 1, "results": []}</code></pre>
</li>
<li><h3>Lösung:</h3>
<ul>
<li>Go to /etc/yum.repos.d/
<pre><code>cd /etc/yum.repos.d/</code></pre>
</li>
<li>Run
<pre><code>sudo sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
sudo yum update -y</code></pre>
</li>
</ul>
</li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://stackoverflow.com/questions/70963985/error-failed-to-download-metadata-for-repo-appstream-cannot-prepare-internal"
target="_blank" rel="noreferrer noopener">
StackOverflow :: Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist,<br />
  answered Apr 24, 2022 at 2:39<br />
  wsdzbm</a>
</li>
</ul>
</html>
<html>
Jaebeol (deutsch “reiche Sippe“; von koreanisch jae “Reichtum“, “Besitz“ und beol “Klan“, “Sippe“), in zahlreichen Medien zumeist auch Chaebol, ist der koreanische Begriff für ein großes Familienunternehmen, das meist aus verschiedenen Sparten besteht, also ein Mischkonzern (Konglomerat) ist.
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Jaebeol" target="_blank" rel="noreferrer noopener">Wikipedia</a></li>
</ul>
</html>
<html>
Champion := das aktuell in Produktion befindliche Modell<br />
Challenger := das Modell, das den Champion ersetzen soll<br />
Ordix News
</html>
<html>
If you want to change the suffix of <br />
multiple files, you can't do:<br />
<br /><code>
% mv *.abc *.def<br />
<br /></code>
However the following shell script <br />
can be used to do the required <br />
opperation:<br />
<br />
*** <br />
<br />
Change all *.abc file to *.def the <br />
following shell script would work:<br />
<br /><code>
#!/bin/sh<br />
for f in *.abc; do<br />
mv $f `basename $f .abc`.def<br />
done<br /></code>
<br />
How it works:<br />
<br />
<code> for f in *.abc; do</code><br />
<br />
Set up a look for all files ending <br />
in .abc, and each time around setup <br />
$f as the filename<br />
<br />
<code> mv $f `basename $f.abc`.def</code><br />
<br />
`basename $f .abc` takes the filename <br />
in $f and removes any trailing occurences <br />
of .abc, we then append .def to the result<br />
and the resulting command becomes <br />
"mv file.abc file.def"<br />
<br />
<code> done</code><br />
<br />
Ends the "for" loop above.<br />
<br />
Under "csh" or "tcsh" a similar thing could be done with:<br />
<br /><code>
foreach f in ( *.abc )<br />
mv $f `basename $f .abc`.def<br />
end<br /></code>
<br />
<br />
This tip generously supported by: <br />
pwain@liberate.com<br />
</html>
<html>
Return to the previous directory:<br />
<br />
To return to the last directory we were working in, type:<br /><br />
<code>
cd ~-<br />
</code>
<br />
This tip generously supported by: <br />
Prashant.Mhatre@nasd.com<br />
</html>
<html>
To change the IP address of a print queue in HP UX 10.20<br>
(and maybe others), go to */var/spool/lp/interface*. <br>
<br>
Edit the file with the same name as the print queue and<br>
change parameter PERIPH to the new IP address.<br>
<br>
For example, <br>
to change printer_1 from 127.0.0.2 to 127.0.10.10:<br>
<br>
edit /var/spool/lp/interface/printer_1<br>
and change the line PERIPH=127.0.0.2 to PERIPH=127.0.10.10.<br>
<br>
Disable and enable printer_1,and jobs sent to printer_1 will<br>
go to the new IP address.<br>
</html>
<html>
If you're an SA and need to change file ownership permissions <br />
on a regular basis, this script may help you. If you want to <br />
change the ownership of all the files owned by abc user to xyz <br />
user, this can be accomplished by chgowner abc xyz with this <br />
script. Of course you should have rootly powers(deity) to change <br />
other people's files ;).
<code><pre>
#!/bin/ksh
#chgowner - written by Rainer Raab on Solaris 2.5.1
if [ $# -eq 2 ]; then
OLDOWNER=$1
NEWOWNER=$2
else
echo "usage: `basename $0` [original file owner] [new file owner]"
exit 1
fi
PATH=/usr/bin:/usr/ucb:/usr/local/bin
FILES=`ls -Al|grep $OLDOWNER|awk '{print $9}'|grep -v "./"`
for i in $FILES; do
chown $NEWOWNER $i
done
</pre></code>
This tip generously supported by: <br />
rainer_raab@yahoo.com
</html>
<html>
To change permissions recursively for all files in a <br />
directory:
<code><pre>
find dirname -exec chmod xxx {} \; -print
</pre></code>
where dirname is the directory you want to change permissions.<br />
<br />
This tip generously supported by: <br />
avsrao_india@hotmail.com
</html>
<html>
Suppose we want to check whether the web server is running or<br />
not, but we don't have any browsers ( lynx, IE, Netscape ...),<br />
then there is a simple way of doing that. Just telnet to that<br />
machine on the http port ( port no 80 in general).
<code><pre>
% telnet <i><ip addr></i> <i><port no></i>
</pre></code>
And then, say "get /" (without quotes). If the webserver is running,<br />
it displays the HTML script of the homepage or basic info and closes the<br />
connection to the remote host.
<code><pre>
% telnet yahoo.com 80
Trying 204.71.200.245...
Connected to yahoo.com.
Escape character is '^]'.
get /
HTTP/1.0 302 RD
Location: http://www.yahoo.com/
Connection closed by foreign host.
</pre></code>
<br />
</html>
<html>
Many times we have a file systems which is too full.<br />
To quickly find out which are the file system we could use:<br />
<code><pre>
df -k | awk '{if ( $4 >= 90 ) print $4," " $7 }'
</pre></code>
Check the fields on your flavor, it may not be $4 or $7.<br />
Yours could be different.<br />
</html>
Pmap is a tool that prints
out a maaping of process
memory. It can be found at:
/usr/proc/bin/pmap
It is available in Solaris 2.4
ownwards.
Usage is:
/usr/proc/bin/pmap -x 3456
Where 3456 is the process id.
This prints outs the memory
usage associated with the
process id.
This tip generously supported
by: ashutosh.varshney@st.com
<html>
<b>Chef</b> is an IT infrastructure automation software, which can be </br>
used to manage all your servers and network equipments in your organization.</br>
<p>
Lt. Dt. Wikipedia ist Chef "ein Open-Source Konfigurationsmanagement-Tool</br>
für Cloud Computing".</br>
</br>
Lt. Engl. Wikipedia: </br>
<ul>
<li><i>Chef is both the name of a company and the name of a configuration </br>
management tool written in Ruby and Erlang. </li>
<li>It uses a pure-Ruby, domain-specific language (DSL) for writing system </br>
configuration "recipes". </li>
<li>Chef is used to streamline the task of configuring and maintaining a</br>
company's servers, and can integrate with cloud-based platforms such </br>
as Internap, Amazon EC2, Google Cloud Platform, OpenStack, SoftLayer, </br>
Microsoft Azure and Rackspace to automatically provision and configure </br>
new machines. </li>
<li>Chef contains solutions for both small and large scale systems, with</br>
features and pricing for the respective ranges.</i>
</ul></p>
<b>Andere Konfigurations-Tools:</b></br>
Ansible, CFEngine, Puppet, Spacewalk, Vagrant</br>
<p>
ChefDK stands for <b>Chef Development Kit</b>. ChefDK is available for </br>
almost all platforms including Debian Based Distros, Ubuntu, RedHat Based </br>
Distros like CentOS, Mac OS X, and Windows and Solaris.</p>
<p>
The current stable version of ChefDK is 0.11.2, For RHEL based system, it is </br>
available for both version 6 and version 7 (i.e CentOS 6 and CentOS 7). The </br>
packaged RPM version is only available for 64-bit version.</p>
<h3>Sources:</h3>
<ul>
<li>TheGeekStuff_HowTo-InstallAndSetupChefWorkstationOnLinux.pdf</li>
<li>TheGeekStuff_12ChefKnifeCookbookCommandExamples.pdf</li>
<li>TheGeekStuff_ChefCookbookDirectoryStructureExplainedWithExamples.pdf</li>
</ul>
</html>
Along the lines of:
D O -- N O T -- D O -- T H I S!
Reports from several admins have been made
that dangerous users who obtain root for the first
time enable full access to the entire system. They
are using the following command:
# chmod -R 777 /
If you feel you have any dangerous users, please
advice them of the dangers of executing such a
command.
<html>
The creation of many temporary files in Unix during <br />
compilations, occupies a lot of memory space. This<br />
can be got rid of by using a simple script.
<code><pre>
find $1 \( -name a.out -o -name '*.o' -o -name 'core' -o -name '*.ii' \
-o -name '*.ti' -o -name '*.class' -o -name '*.pur' \) -exec rm {} \;
</pre></code>
Save the above line in a file and run this file after <br />
changing permissions.<br />
<br />
For example, if the file containing the above code has <br />
the name 'clean', then:
<code><pre>
example% clean
</pre></code>
will remove all the files specified in the script in the <br />
directory and all other subdirectories within it. You <br />
can add or remove any number of files in the script, <br />
to suit your needs.<br />
<br />
This tip generously supported by: <br />
vmanand@hotmail.com
</html>
<html>
The following c-shell .logout script will clear your Netscape<br>
cache. No action will be taken if Netscape is current running.<br>
<br><code>
------------------- CUT HERE ------------------------------<br>
#!/bin/csh<br>
<br>
if !( `ps -eu $USER | grep netscape | grep -v grep | sed -e 's/^ *//' -e 's/ .*//'` ) then<br>
echo<br>
echo "Clearing Netscape cache..."<br>
\rm -rf ~/.netscape/cache/*<br>
endif<br>
<br>
echo<br>
echo "Exiting..."<br>
<br>
------------------- CUT HERE ------------------------------<br>
</code><br>
This tip generously supported <br>
by: rb237@phy.cam.ac.uk<br>
</html>
<html>
If you deal with DOS files and the "^M" character<br>
always appears at the end of the line, here are<br>
two ways to get rid of them.<br>
<br>
If you edit the DOS text file with the "vi"<br>
editor in UNIX, use the following from the<br>
"vi" command line:<br>
<br>
:%s/^V^M//g<br>
<br>
From a Unix shell use the command:<br>
<br>
% sed 's/^V^M//g' foo > foo.new<br>
<br>
NOTE: <br>
^V is control V and ^M is control M or Enter<br>
<br>
</html>
- The rich client offers extra functionality and is typically used during upgrades
<html>
<ul>
<li><b>CIEM</b> :=: Cloud Infrastructure Entitlement Management
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://geekflare.com/ciem-role-in-cloud-security/"
target="_blank" rel="noreferrer noopener">
Geekflare ::= CIEM: What is it and its Role in Cloud Security?
</a>
</li>
</ul>
</html>
<html>
By default, you can always connect to an instance using ssh. This is useful so you can manage and configure your instances beyond the basic configuration enabled by gcutil or the REST API. The easiest way to ssh into an instance is to use gcutil command from your local Linux / OS X based systems. The following steps are required
<ol>
<li>Install gcutil/google sdk</li>
<li>Authorize instance</li>
<li>Verify instance status</li>
<li>Create ssh keys</li>
<li>Connect using gcutil or ssh client</li>
</ol>
<h2>Step 1 ‐ Install gcutil</h2>
gcutil runs on UNIX-based operating systems such as Linux and Mac OS X. To use gcutil, you must have Python 2.6.x or 2.7.x installed on your computer. gcutil does not support Python 3.x. Python is installed by default on most Linux distributions and Mac OS X. Open the Terminal and type the following command or to grab gcutil tool visiting this url.<br />
<br />
Debian / Ubuntu / RHEL / CentOS Linux/OS X UNIX user type the following commands:<br />
<br />
Open a terminal and type:<br />
<b>## Download IT ##</b><br />
<code><b>$ wget https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz</b></code><br />
<code><b>$ tar -zxvf google-cloud-sdk.tar.gz</b></code><br />
<b>## INSTALL IT ##</b><br />
<code><b>$ bash google-cloud-sdk/install.sh</b></code><br />
<br />
Sample outputs:
<code><pre>
Welcome to the Google Cloud SDK!
The Google Cloud SDK is currently in developer preview. To help improve the
quality of this product, we collect anonymized data on how the SDK is used.
You may choose to opt out of this collection now (by choosing 'N' at the below
prompt), or at any time in the future by running the following command:
gcloud config set --scope=user disable_usage_reporting true
Do you want to help improve the Google Cloud SDK (Y/n)? n
This will install all the core command line tools necessary for working with
the Google Cloud Platform.
The following components will be installed:
-------------------------------------------------------------------------------------------
| BigQuery Command Line Tool | 2.0.18 | < 1 MB |
| BigQuery Command Line Tool (Platform Specific) | 2.0.18 | < 1 MB |
| Cloud DNS Admin Command Line Interface | 2015.04.29 | < 1 MB |
| Cloud SDK Core Command Line Tools | 1 | |
| Cloud SDK Core Libraries (Platform Specific) | 2014.10.20 | < 1 MB |
| Cloud SQL Admin Command Line Interface | 2015.04.09 | < 1 MB |
| Cloud Storage Command Line Tool | 4.12 | 2.5 MB |
| Cloud Storage Command Line Tool (Platform Specific) | 4.6 | < 1 MB |
| Compute Engine Command Line Interface | 2015.04.29 | < 1 MB |
| Compute Engine Command Line Tool (deprecated) | 1.16.5 | < 1 MB |
| Compute Engine Command Line Tool (deprecated) (Platform Specific) | 1.16.5 | < 1 MB |
| Default set of gcloud commands | 2015.04.29 | < 1 MB |
| Native extensions for gcloud commands (Mac OS X, x86_64) | 0.15.0 | 4.0 MB |
-------------------------------------------------------------------------------------------
|- Creating update staging area -|
|============================================================|
|- Installing: BigQuery Command Line Tool -|
|============================================================|
|- Installing: BigQuery Command Line Tool (Platform Spec... -|
|============================================================|
|- Installing: Cloud DNS Admin Command Line Interface -|
|============================================================|
|- Installing: Cloud SDK Core Command Line Tools -|
|============================================================|
|- Installing: Cloud SDK Core Libraries (Platform Specific) -|
|============================================================|
|- Installing: Cloud SQL Admin Command Line Interface -|
|============================================================|
|- Installing: Cloud Storage Command Line Tool -|
|============================================================|
|- Installing: Cloud Storage Command Line Tool (Platform... -|
|============================================================|
|- Installing: Compute Engine Command Line Interface -|
|============================================================|
|- Installing: Compute Engine Command Line Tool (depreca... -|
|============================================================|
|- Installing: Compute Engine Command Line Tool (depreca... -|
|============================================================|
|- Installing: Default set of gcloud commands -|
|============================================================|
|- Installing: Native extensions for gcloud commands (Ma... -|
|============================================================|
Creating backup and activating new installation...
Update done!
Modify profile to update your $PATH and enable bash completion? (Y/n)? y
The Google Cloud SDK installer will now prompt you to update an rc
file to bring the Google Cloud CLIs into your environment.
Enter path to an rc file to update, or leave blank to use
[/Users/veryv/.bash_profile]:
Backing up [/Users/veryv/.bash_profile] to [/Users/veryv/.bash_profile.backup].
[/Users/veryv/.bash_profile] has been updated.
Start a new shell for the changes to take effect.
</pre></code>
See <a href="https://www.cyberciti.biz/faq/centos-rhel-ubuntu-debian-fedora-linux-install-gcutil-tool/" target=_blank>how to install gcutil tool to manage Google Compute Engine</a> on Linux / Unix for more information.
<h2>Step 2 ‐ Authenticating to Google Compute Engine</h2>
The syntax is:<br />
<br />
<code><b>
gcloud auth login<br />
gcloud auth login --project=YOUR-PROJECT-ID-HERE<br />
</b></code>
<br />
If your project id is “apache-cluster“, enter:
<code><b>
gcloud auth --project=apache-cluster
</b></code>
Sample outputs:
<img src="./pictures/gce-gcutil-001.png" height=280 width=592 />
Fig.01: Authenticating to Google Compute Engine using gcutil command
Open a web browser, and go to the specified URL. Click the Grant Access link. The page will display an authorization code. Copy this code. Paste the authorization code into the waiting gcutil auth terminal and press enter. Type the following command to cache project-id:
gcloud config set project YOUR-PROJECT-ID-HERE
<h2>Step 3 ‐ Verify instance status</h2>
Type the following command:
$ gcloud compute instances list
Sample outputs:
NAME ZONE MACHINE_TYPE INTERNAL_IP EXTERNAL_IP STATUS
instance-1 asia-east1-c f1-micro 10.240.xx.yyy 104.155.xxx.zzz RUNNING
Note: instance-1 instance running in asia-east1-c zone.
<h2>Step 4 ‐ Create ssh keys</h2>
The syntax is:
<code><b>
gcloud compute ssh instance_name_here
gcloud compute ssh USER@instance_name_here
gcloud compute ssh USER@instance_name_here -- arg1 arg2
gcloud compute --project PROJECT_ID_HERE ssh instance_name_here
</b></code>
In this example, connect to db1 instance using ssh:
<code><pre>
$ gcloud compute ssh db1
WARNING: Consider passing '--zone=us-central1-a' to avoid the unnecessary zone lookup which requires extra API calls.
INFO: Zone for db1 detected as us-central1-a.
WARNING: You don't have an ssh key for Google Compute Engine. Creating one now...
Enter passphrase (empty for no passphrase): TYPE-YOUR-PASSPHRASE-HERE
Enter same passphrase again: TYPE-YOUR-PASSPHRASE-HERE
INFO: Updated project with new ssh key. It can take several minutes for the instance to pick up the key.
INFO: Waiting 300 seconds before attempting to connect.
</pre></code>
gcutil creates local files to store your public and private key, and copies your public key to the project. By default, gcutil stores ssh keys in the following files on your local system:
$HOME/.ssh/google_compute_engine ‐ Your private key
$HOME/.ssh/google_compute_engine.pub ‐ Your public key
<h2>Step 5 ‐ Connect using gcutil or ssh client</h2>
The syntax is:
<code><b>
gcloud compute ssh instance_name_here
gcloud compute ssh USER@instance_name_here --zone NOZE_NAME_HERE
</b></code>
OR
<code><b>
ssh -o UserKnownHostsFile=/dev/null -o CheckHostIP=no -o StrictHostKeyChecking=no -i $HOME/.ssh/google_compute_engine -A -p 22 $USER@TYPE-GOOGLE-COMPUTE-ENGINE-PUBLIC-IP-HERE
</b></code>
In this example, connect to the “instance-1“ instance using gcloud tool:
gcloud compute ssh instance-1
Sample outputs:
<code><pre>
For the following instances:
- [instance-1]
choose a zone:
[1] asia-east1-c
[2] asia-east1-a
[3] asia-east1-b
[4] europe-west1-d
[5] europe-west1-c
[6] europe-west1-b
[7] us-central1-c
[8] us-central1-b
[9] us-central1-a
[10] us-central1-f
Please enter your numeric choice: 1
Warning: Permanently added '104.155.xxx.zzz' (RSA) to the list of known hosts.
[vivek@instance-1 ~]$
</pre></code>
In this example, connect to the db1 (public ip 1.2.3.4) instance using ssh command:
ssh -o UserKnownHostsFile=/dev/null -o CheckHostIP=no -o StrictHostKeyChecking=no -i $HOME/.ssh/google_compute_engine -A -p 22 vivek@1.2.3.4
Sample sessions:
<img src="./pictures/ssh-gcutils-session.png" height=268 width=596 />
Fig.02: Connecting to an Instance Using ssh
To SSH into “db3“ in zone asia-east1-c, run:
gcloud compute ssh db3 --zone asia-east1-c
You can also run a command on the virtual machine. For example, to get a snapshot of the guest's process tree, run:
gcloud compute ssh db3 --zone asia-east1-c --command "ps -ejH"
If you are using the Google container virtual machine image, you can SSH into one of your containers with:
gcloud compute ssh db3 --zone asia-east1-c --container CONTAINER
<h2>How do I login as root user?</h2>
For security reasons, the standard Google do not provide the ability to ssh in directly as root. The instance creator and any users that were added using the authorized_ssh_keys flag or the metadata sshKeys value are automatically administrators to the account, with the ability to run sudo without requiring a password. Type the following command to switch to root user:
<code><b>
sudo -s
</b></code>
Sample session:<br />
<img src="./pictures/google-compute-sudo-s-command-root-access.png" height=107 width=597 /><br />
Fig.03: Root Access and Instance Administrators using the “sudo -s“ command on Google compute instance<br />
<br />
<h2>Optional: Update your gcloud tools</h2>
Type the following command:
gcloud components update
Sample outputs:
<code><pre>
The following components will be updated:
-----------------------------------------------------------------------
| BigQuery Command Line Tool | 2.0.18 | < 1 MB |
| Cloud DNS Admin Command Line Interface | 2015.04.29 | < 1 MB |
| Cloud SDK Core Libraries | 2015.04.29 | 1.8 MB |
| Cloud SDK Core Libraries (Platform Specific) | 2014.10.20 | < 1 MB |
| Cloud SQL Admin Command Line Interface | 2015.04.09 | < 1 MB |
| Cloud Storage Command Line Tool | 4.12 | 2.5 MB |
| Compute Engine Command Line Interface | 2015.04.29 | < 1 MB |
| Compute Engine Command Line Tool (deprecated) | 1.16.5 | < 1 MB |
-----------------------------------------------------------------------
The following components will be installed:
----------------------------------------------------------------------------------
| Default set of gcloud commands | 2015.04.29 | < 1 MB |
| Native extensions for gcloud commands (Mac OS X, x86_64) | 0.15.0 | 4.0 MB |
----------------------------------------------------------------------------------
Do you want to continue (Y/n)? y
Creating update staging area...
Uninstalling: BigQuery Command Line Tool ... Done
Uninstalling: Cloud DNS Admin Command Line Interface ... Done
Uninstalling: Cloud SDK Core Libraries ... Done
Uninstalling: Cloud SDK Core Libraries (Platform Specific) ... Done
Uninstalling: Cloud SQL Admin Command Line Interface ... Done
Uninstalling: Cloud Storage Command Line Tool ... Done
Uninstalling: Compute Engine Command Line Interface ... Done
Uninstalling: Compute Engine Command Line Tool (deprecated) ... Done
Installing: BigQuery Command Line Tool ... Done
Installing: Cloud DNS Admin Command Line Interface ... Done
Installing: Cloud SDK Core Libraries ... Done
Installing: Cloud SDK Core Libraries (Platform Specific) ... Done
Installing: Cloud SQL Admin Command Line Interface ... Done
Installing: Cloud Storage Command Line Tool ... Done
Installing: Compute Engine Command Line Interface ... Done
Installing: Compute Engine Command Line Tool (deprecated) ... Done
Installing: Default set of gcloud commands ... Done
Installing: Native extensions for gcloud commands (Mac OS X, x86_64) ... Done
Creating backup and activating new installation...
Done!
</pre></code>
<h2>Conclusion</h2>
You learned how to ssh into your Google cloud computer VM/server. See the following documents for more information:
$HOME/.bash_profile file example.
Google Compute Engine documentation.
Man pages: bash(1)
Posted by: Vivek Gite
The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.
<h3>Links:</h3>
<ul>
<li><a href="cyberciti.biz/faq/google-cloud-compute-engin-ssh-into-an-instance-from-linux-unix-appleosx/" target_=blank>Cyberciti :: Google Cloud Compute Engine </a></li>
</ul>
<br />
</html>
<html>
<b>NOTE:</b><br />
Depending on how the command is used, an<br />
admin with root can abuse their privileges.<br />
<br />
If there are similar files on a system and you wish<br />
to collect the contents of those files (possibly<br />
for security reasons) the following command<br />
will search a system for a filename and output<br />
the contents into a file to be viewed.<br />
<br />
<code>
# find / -name .rhosts -perm -004 -print > rhosts 2>e &<br />
</code>
<br />
Another use was brought up that one could<br />
learn what other commands users use. They<br />
may have thought of some tricks you may not have:<br />
<br />
<code>
# find / -name .bash_history -perm -004 -print >o 2>e & <br />
</code>
<br />
</html>
<html>
Ever wanted to comment out multiple lines of code while<br />
writing shell scripts in vi, but didn't want to pound your <br />
keyboard for half an hour doing it?<br />
<br />
(I#Escape j.j.j.j. = carpal tunnel)<br />
<br />
Here's the nerdy way to do it:<br />
<br /><code>
:.,+N-1 s/^/#/g<br />
</code><br />
Where N-1 is the number of lines<br />
minus one that you want to comment<br />
out, and s/^/#/g is the regular<br />
expression (the pattern between the<br />
first two slashes is what you want<br />
to replace, in this case the<br />
beginning of the line, and the<br />
pattern between the last two slashes<br />
is what you want to replace it with).<br />
<br />
For example, if you're a bad<br />
coder like me and want to comment<br />
out 500 lines of code, you would do:<br />
<br /><code>
:.,+499 s/^/#/g<br />
</code><br />
This tip generously supported <br />
by: maddox@xmission.com<br />
</html>
<html>
<ul>
<li>Puppt</li>
<li>Ansible</li>
<li>CFengine</li>
<li>Chef</li>
</ul>
</html>
<html>
s. Wikipedia "C0 and C1 control codes"
</html>
<html>
To convert Unix Man pages to text format, you can make<br />
use of one feature of 'man' itself. (check out man man).<br />
<br />
Set environment variable PAGER to 'cat'. <br />
Then run:<br />
<br />
'man command_name > command_name.txt'<br />
<br />
eg. in csh, to see man ls in a text file:<br />
setenv PAGER cat<br />
man ls > ls.txt<br />
<br />
<b>NOTE: </b>
Do not forget to unsetenv PAGER, else you will<br />
have to pipe every man command to 'more' or <br />
(my favourite) 'less'.<br />
<br />
This tip generously supported by: amar_san@yahoo.com
</html>
<html>
<ul>
<li><b>PCR</b><br />
:= Polymerase-Kettenreaktion (<i>polymerase chain reaction</i>)<br />
Testverfahren</li>
<br />
<li><b>Antikörpertest</b><br />
Testverfahren</li>
<li><h2>CovPass‐App & Corona‐Warn‐App</h2>
<ul>
<li>Mit der CovPass-App und der Corona‐Warn‐App lässt sich der
Impfnachweis im privaten Handy speichern und jederzeit vorzeigen.</li>
<li><h4>Was ist der digitale Impfnachweis und wofür brauche ich ihn?</h4>
Immer mehr Menschen werden gegen das Coronavirus geimpft, und für sie
gelten Erleichterungen. So können vollständig Geimpfte 14 Tage nach ihrer
letzten Einzelimpfung in vielen Fällen auf einen Test verzichten, der unseren
Alltag an vielen Orten sicherer macht ‐ zum Beispiel, um Läden oder
Restaurants betreten zu können, in Zoos und Museen oder für den Besuch
im Pflegeheim. Denn das Risiko, jemand anderen anzustecken, ist bei ihnen
deutlich geringer als bei Menschen mit negativem Schnelltest-Ergebnis.<br />
<br />
Nachweisen kann man seine Impfung mit dem üblichen gelben Impfpass.
Praktischer ist es, den Nachweis im privaten Handy gespeichert zu haben
und jederzeit vorzeigen zu können. Dafür wurde der digitale Impfnachweis
eingeführt.
<code><pre>
Der digitale Impfnachweis ermöglicht sicheres Reisen innerhalb der EU. Mehr Infos <a href="https://www.bundesregierung.de/breg-de/themen/coronavirus/covid-zertifikat-eu-1929924" target="_blank" rel="noreferrer noopener">hier</a>.
</pre></code></li>
<li><h4>Brauche ich den digitalen Impfnachweis unbedingt ‐ oder reicht auch der gelbe Impfpass?</h4>
Der gelbe Impfpass reicht als Nachweis vollkommen aus. Niemand wird zum
digitalen Impfnachweis verpflichtet. Doch für viele Menschen ist der digitale
Impfnachweis praktischer: den Impfnachweis im Handy vorzeigen ‐ fertig.</li>
<li><h4>Wie funktioniert der digitale Impfnachweis?</h4>
<ul>
<li>Auf Ihrem Handy muss eine entsprechende App installiert sein ‐
die CovPass‐App oder die Corona‐Warn‐App.</li>
<li>Wenn Sie geimpft werden, wird die Impfung wie üblich in Ihren gelben
“analogen“ Impfpass eingetragen.</li>
<li>Zusätzlich ‐ und dieses Angebot ist freiwillig und ergänzend ‐ wird für
Sie bei der Impfung zum Beispiel in der Arztpraxis ein sogenannter “2D‐Barcode“ erstellt.</li>
<li>Den Barcode können Sie mit Ihrem Smartphone abscannen. Sie können
ihn auch als Papierausdruck mitnehmen und später in Ruhe zuhause einscannen. Die Corona-Warn-App oder die CovPass-App speichert diese
Impfbescheinigung dann lokal auf Ihrem Smartphone.</li>
<li>Wenn Sie ‐ zum Beispiel im Restaurant ‐ eine Impfbescheinigung
benötigen, können Sie einfach die auf ihrem Smartphone gespeicherte
Impfbescheinigung vorzeigen.</li>
</ul>
<code><pre>
Hier nochmal zum Nachlesen: So funktioniert die <a href="https://digitaler-impfnachweis-app.de/" target="_blank" rel="noreferrer noopener">CovPass‐App</a>.
</pre></code></li>
<li><h4>Ich bin bereits geimpft, habe aber keinen 2D‐Barcode bekommen ‐ was mache ich?</h4>
Kein Problem, Sie können den 2D-Barcode für den digitalen
Impfnachweis auch nachträglich erhalten. Sie müssen lediglich Ihren gelben
Impfpass mit den eingetragenen Impfungen vorlegen. Der Code darf nur von
autorisierten Personen in Impfzentren, Arztpraxen, Krankenhäusern oder
Apotheken ausgestellt werden.
<ul>
<li>Die nachträgliche Ausstellung von digitalen Impfnachweisen in den
Impfzentren liegt bei den Bundesländern. Ab sofort beginnen einige
Bundesländer damit, QR-Codes postalisch an diejenigen zu verschicken,
die bereits vollständig geimpft sind. Genauere Informationen hierzu
finden bereits Geimpfte auf der Seite ihres Bundeslandes.</li>
<li>Wer in der Arztpraxis geimpft wurde, kann sich den Code dort
nachträglich ausstellen lassen.</li>
<li>Alternativ gibt es auch noch den Weg über die Apotheken. Um sich den
2D-Barcode dort nachträglich erstellen zu lassen, müssen Sie Ihr gelbes
Impfheft sowie Ihren Personalausweis oder Reisepass vorlegen. Unter
<a href="https://www.mein-apothekenmanager.de/" target="_blank" rel="noreferrer noopener">www.mein-apothekenmanager.de</a> werden die Apotheken in der
näheren Umgebung angezeigt, die den digitalen Impfausweis ausstellen.</li>
</ul>
Nachträglich ausstellen lassen muss man sich den digitalen Impfnachweis
nur, wenn man bereits vollständig geimpft ist. Wer erst einmal geimpft ist,
kann den Code bei der zweiten Impfung erhalten.</li>
<li><h4>CovPass-App oder Corona-Warn-App ‐ woher bekomme ich sie?</h4>
Ob Sie Ihren digitalen Impfnachweis auf der CovPass-App oder der Corona-
Warn-App speichern wollen, bleibt Ihnen überlassen. Beide Apps können Sie
kostenlos im App Store und im Google Play Store herunterladen.
<code><pre>Viele Menschen haben die Corona-Warn-App, die es seit vergangenem
Jahr gibt, bereits installiert. Für sie gilt: Seit Version 2.3 ist es möglich,
seinen Impfstatus digital mit der Corona-Warn-App nachzuweisen.
Hier finden Sie weitere Informationen zum <a href="https://www.bundesregierung.de/breg-de/aktuelles/corona-warn-app-version-2-3-1924920" target="_blank" rel="noreferrer noopener">Update 2.3 der Corona‐Warn‐App</a>.
</pre></code></li>
<li><h4>Wann geht es los?</h4>
Der kontrollierte Roll-Out der Version 2.3 für die Corona-Warn-App ist
gestartet. Allen Nutzerinnen und Nutzern der Corona-Warn-App steht die
neue Version zum Download bereit. Zum Download steht auch die CovPass-
App für alle Betriebssysteme zur Verfügung.
Impfzentren, Apotheken und Arztpraxen beginnen Schritt für Schritt, QR-
Codes auszugeben. Bis Ende Juni sollen alle, die mitmachen
wollen, angeschlossen sein.</li>
<li><h4>Weitere Fragen?</h4>
Beim Bundesgesundheitsministerium finden Sie weitere Antworten auf
Ihre Fragen zum digitalen Impfnachweis.</li>
</ul>
</li>
<li><h2>CovPass‐App :: Infos auf Smartphone nach Installation</h2>
<ol>
<li><b><u>Übertragen Sie das digitale COVID‐Zertifikat der EU auf das Smartphone</u></b><br />
Scannen Sie mit der CovPass‐App das digitale COVID‐Zertifikat der EU für <br />
eine Corona‐Impfung, ein negatives Corona‐Testergebnis oder eine Gene‐<br />
sung von der Corona‐Infektion.<br />
<br />
Halten Sie dafür die Kamera Ihres Smartphones über den QR‐Code. Das <br />
digitale COVID‐Zertifikat der EU wird sofort auf Ihr Smartphone übertragen.<br />
</li>
<br />
<li><b><u>Rufen Sie den QR‐Code in der CovPass‐App auf</u></b><br />
Mit dem QR‐Code können Sie eine Corona‐Impfung,<br />
ein negatives Corona‐Testergebnis oder eine Genesung von der Corona‐<br />
‐Infektion nachweisen.<br />
<br />
Nach dem Scannen wird der QR‐Code direkt in der CovPass‐App ange‐<br />
zeigt.<br />
<br />
Bitte beachten Sie, dass eine auseichende Wirksamkeit des Impf<br />
schutzes erst etwa 14 Tage nach der letzten Impfung eintritt. Der <br />
QR‐Code für de vollständigen Impfschutz ist deshalb erst nach<br />
Ablauf der 14 Tage gültig.<br /></li>
<br />
<li><b><u>Zeigen Sie den QR‐Code bei Bedarf vor</u></b><br /></li>
</ol></li>
<!--
<li></li>
-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.msn.com/de-de/nachrichten/coronavirus/corona-impfnachweis-so-klappt-der-qr-code-scan-mit-der-covpass-app/ar-AAM3aKZ" target="noreferrer noopener">Microsoft :: So klappt der QR‐Code‐Scan mit der CovPass‐App</a></li>
<li><a href="https://www.bundesregierung.de/breg-de/aktuelles/digitaler-impfnachweis-1924940" target="_blank" rel="noreferrer noopener">Bundesregierung :: Digitaler Impfnachweis</a></li>
<li><a href="https://www.vodafone.de/featured/apps/gesundheit-ernaehrung/covpass-digitaler-impfnachweis-des-rki-als-kostenlose-handy-app/#/" target="_blank" rel="noreferrer noopener">Vodafone :: CovPass ‐ Digitaler Impfnachweis des RKI als kostenlose Handy‐App</a></li>
<!--
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
-->
</ul>
</html>
<html>
Counting blank lines in a file which<br />
may include spaces and tabs:<br />
<br />
<code>
cat filename |awk ' /^['\ '|'\\t']*$/ { ++x } END { print "No. of Blank Lines = " x } '<br />
</code>
<br />
This tip generously supported by: <br />
rajibroy@engineer.com<br />
</html>
<html>
<ol>
<li> Einführung in die Programmiersprache C++ __________________________ 5</li>
<li> Datentypen und Speicherklassen __________________________________ 10</li>
<li> Operatoren und Ausdrücke _______________________________________ 14</li>
<li> Anweisungen __________________________________________________ 18</li>
<li> Felder und Zeiger _______________________________________________ 20</li>
<li> Funktionen ____________________________________________________ 22</li>
<li> Der Makropräprozessor __________________________________________ 29</li>
<li> Klassen _______________________________________________________ 32</li>
<li> Vererbung und Polymorphismus __________________________________ 39</li>
<li> Überladen von Operatoren ______________________________________ 47</li>
<li> Ein- und Ausgabefunktionen_____________________________________ 57</li>
<li> Neue Funktionen des ICO-C++-Standards __________________________ 70</li>
<li> Standardisierte Zeichenkettenverarbeitung ________________________ 75</li>
</ol>
</html>
<html>
<ul>
<li>Die Ausgabe löschen (clear window) : clrscr()</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.pythonpool.com/how-to-clear-python-shell/" target="_blank">Pythonpool :: How to clear Python Shell</a></li>
</ul>
</html>
<html>
<ul>
<li>Open-Source-Werkzeug;</li>
<li>Werkzeug für die statische Analyse von C- und C++-Quellcode;</li>
<li>Begriff <b>“statische Code-Analyse“ (SCA) ::</b>
<ul>
<li>umfasst eine Vielzahl von teilweise sehr unterschiedlichen <br />
Methoden zur Analyse von Programmen;</li>
<li><b>“Programmanalyse“</b> bezeichnet in diesem Zusammenhang <br />
eine automatisierte Analyse des Programmverhaltens zum <br />
Aufdecken von Qualitätsmängeln im Quellcode;</li>
<li>Dazu zählen insbesondere Eigenschaften wie die <em>Korrektheit</em><br />
und <em>Robustheit</em> des Programms;</li>
</ul></li>
<li></li>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li>Linux Magazin, 12/19, S. 80ff</li>
<!--li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li-->
</ul>
</html>
<html>
If you want to create an alias for a group of people with<br />
similar interests, on your workstation (Say a SUN<br />
workstation), then include the following line at the end<br />
of the file /etc/aliases and run the command /bin/newaliases<br />
<br />
unixtips: bhavin@foobar.com, atulk@foobar.com, virajpikle@mail.com<br />
<br />
Now, an e-mail sent to<br />
alias_name@workstation_name.foobar.com<br />
will be bounced to the addresses listed above in the<br />
/etc/aliases file.<br />
<br />
In other words, if my workstation name is "soorya",<br />
an e-mail sent to<br />
unixtips@soorya.foobar.com<br />
will be bounced to<br />
bhavin@foobar.com,<br />
atulk@foobar.com, and<br />
virajpikle@mail.com<br />
<br />
This tip generously supported <br />
by: bhavin@informix.com<br />
</html>
An ascii file can be easily encrypted and decrypted.
To encrypt simply pipe the STDOUT of
the file to "crypt" and redirect it to
a new file name. Enter a passowrd when
prompted with "Enter key".
$ cat foo | crypt > foo.e
Enter key:
To unencrypt simply pipe the STDOUT of
the encrypted file to "crpyt" and
redirect it to a new file name. Enter
a passowrd when prompted with
"Enter key".
$ cat foo.e | crypt > foo.new
Enter key:
<html>
<ul>
<li>CrypTool ist ein Open-Source-Projekt.</li><br />
<li>Hauptresultat ist die freie Lern-Software <b>CrypTool</b>, <br />
die die Konzepte der Kryptographie und der Krypto‐<br />
analyse erfahrbar macht.</li><br />
<li>Homepage: <a href="www.cryptool.org" target=_blank>CryptoTools :: Homepage</a></li><br />
<li><a href="https://www.cryptool.org/images/ctp/documents/CT-Book-de.pdf" target=_blank>CrypTools-Buch</a></li><br />
</ul>
</html>
<html>
Many Unix Admins use the C shell as their interactive shell.<br>
An often used feature of Csh is file completion - initiated<br>
with <b>set filec</b>. It allows the Csh user to type in partial<br>
file names, and then press escape to get them completed where<br>
possible. A little known side effect of this is that Control-D (^D) <br>
will now generate file listings in the middle of command lines.<br>
<br>
<b>Example 1:</b> Lists the current directory (where @ is a space)<br>
<b>host > @^D</b><br>
<br>
<b>Example 2:</b> Lists the /usr directory<br>
<b>host > ln -s /usr/^D </b><br>
<br>
<b>Example 3.</b>: Lists all m* files in the /usr directory<br>
<b>host > tar cvf /dev/nrtape /usr/m^D </b><br>
<br>
In each case, after the listing, you get a new command line and are<br>
placed at the last point of edit.<br>
<br>
Very handy if you know what you wanted to do but forgot what you<br>
wanted to do it with!<br>
<br>
This tip generously supported <br>
by: mikal.dunn@halliburton.com<br>
</html>
<html>
<ul>
<li>Das sind die Mehrfachangriffe nach einem erfolgreichen Hack.</li>
<li>Hier stehlen Hacker Daten und drohen damit, sie zu veröffentlichen,<br />
wenn keine Zahlung geleistet wird. Gleichzeitig wenden sie sich mit<br />
ihrem gestohlenen Wissen an die Kunden und die Lieferanten des<br />
Unternehmens und dringen dort in die Systeme ein.</li>
<br />
<li>Dieses Thema wird uns noch jahrelang beschäftigen, befürchten<br />
Insider, daher stehen folgende Aktien im Fokus der großen Investmenthäuser:<br />
<table style="float:left;width:25%;">
<tr><td>FEYE</td><td><b>FireEye Inc.</b><br />
WKN: A1W4G7<br />
ISIN: US31816Q1013 </td></tr>
<tr><td>PANW</td><td><b></b><br /><br /></td></tr>
<tr><td>CYBR</td><td><b></b><br /><br /></td></tr>
<tr><td>CRWD</td><td><b></b><br /><br /></td></tr>
<tr><td>FTNT</td><td><b></b><br /><br /></td></tr>
<tr><td>PFPT</td><td><b></b><br /><br /></td></tr>
<tr><td>OKTA</td><td><b></b><br /><br /></td></tr>
<tr><td>MIME</td><td><b></b><br /><br /></td></tr>
<tr><td>LDOS</td><td><b></b><br /><br /></td></tr>
</table>
<table style="float:left;width:25%;">
<tr><td>NET</td><td><b>Cloudflare Inc</b><br />
WKN: A2PQMN<br />
ISIN: US18915M1071</td></tr>
<tr><td>CVLT</td><td><b></b><br /><br /></td></tr>
<tr><td>HACK</td><td><b></b><br /><br /></td></tr>
<tr><td>CIBR</td><td><b></b><br /><br /></td></tr>
<tr><td>BUG</td><td><b></b><br /><br /></td></tr>
<tr><td>IHAK</td><td><b></b><br /><br /></td></tr>
<tr><td>WCBR</td><td><b></b><br /><br /></td></tr>
<tr><td>FITE</td><td><b></b><br /><br /></td></tr>
<tr><td>VCLO</td><td><b></b><br /><br /></td></tr>
</table>
<br style="clear:both;" />
</ul>
<h3>Links:</h3>
<ul>
<li>UMWA‐Börsenbrief, 26.08.2021</li>
<!--
<li></li>
-->
</ul>
</html>
<html>
DAP-Tabellen, die sich lediglich im letzten Buchstaben ("A")<br>
unterscheiden, gehören zusammen.<br>
<br>
Dh. die Prozesse CSA und CS schreiben in die <b>gleiche</b> <br>
Tabelle.<br>
<br>
Dabei verarbeitet der Prozess CSA z.B. die Trades mit den<br>
ungeraden Trade-Nr., während der Prozess CS diejenigen<br>
Trades mit den geraden Trade-Nr. verarbeitet.<br>
<br>
CS := Cashflows<br>
MV := Market values<br>
FX := Forex<br>
<br>
</html>
<html>
<ul>
<li>“<b>Density-Based Spatial Clustering of Applications with Noise</b>“,<br />
etwa: Dichtebasierte räumliche Clusteranalyse mit Rauschen</li><br />
<li>ist ein Data-Mining-Algorithmus zur Clusteranalyse</li><br />
<li>Er ist einer der meist zitierten Algorithmen in diesem Bereich</li><br />
<li>Der Algorithmus arbeitet dichtebasiert und ist in der Lage, <br />
mehrere Cluster zu erkennen. Rauschpunkte werden dabei <br />
ignoriert und separat zuröckgeliefert. </li><br />
<li>Python-Code:
<code><pre>from sklearn.<b>cluster</b> import <b>DBSCAN</b>
clf = DBSCAN() clf.fit(X)</pre></code></li>
</ul>
<h3>Links:</h3>
<a href="https://de.wikipedia.org/wiki/DBSCAN" target=_blank>Wikipedia :: DBSCAN</a> (als PDF vorhanden)<br />
</html>
<html>
<h2>Definition of Done</h2>
by Stephen Nimmo<br />
<br />
When a developer says they are done, what does that mean? I've worked on many different client projects and it's been slightly different every time. Developers are often left to take responsibility on ensuring a task is complete, however many times they are left with subjective, nuanced and changing job descriptions based on the whims of project managers or the business. A good Definition of Done not only brings value by ensuring completeness of work, but it also shields the developer from the random, tedious requests. Here's a few principles on creating your team's definition of done.
<ul>
<li> Write it down, communicate it out and revisit it every sprint. Do not assume the team members know and understand what it means to complete a task.</li>
<br />
<li> Use it during estimations and sprint planning as a baseline for what needs to be done for each task, but don't get too rigid with it. It's a guideline, not a mandate.</li>
<br />
<li> Don't try and get too enterprisy with it. While a similar pattern or template could be used across teams, make it unique for the technical team with the details needed to make the process easy and complete. Need to update the user docs? Put a link directly to the document in the checklist. Again, make the right thing to do the easiest thing to do.</li>
<br />
<li> Peer review the work and create an incentive for the team members who have the most reviews per month. It doesn't have to be big, but giving out a $25 gift card to Chili's or buying them a funny tech t-shirt can do a long way to encouraging the behavior.</li>
<br />
<li> Good task flow is a balance between executing on parallel work streams and not wasting people's time. Key checkpoints can save the developer time and effort.</li>
</ul>
Now that we have a good baseline on how to use a DOD, let's take a look at a basic example. This is the template I take to most projects as a starting point and adjust according to the particular companies details.
<ol>
<li><h4>Working Code</h4>This should go without saying, but delivering quality code satisfying the tasks or issues is the highest priority.</li>
<li><h4>Unit Tests</h4>Good unit tests covering the core functionality or bug fix goes a long way not only for the current effort, but for use throughout the life of the code base.</li>
<li><h4>Integration Tests</h4>Does the code changes have any effects on external interfaces or data integration? If so, a decent set of integration tests to cover the functionality goes a long way.</li>
<li><h4>Automated Regression Tests</h4>update or add new automated regression tests to cover the functionality. These should be plugged into the existing automated regression set and should serve as the baseline of how developers prove their code works and meets the requirements of the task.</li>
<li><h4>Checkpoint 1: Peer Review</h4>At this point, the developer has completed the code, written the tests and tested the change in the larger context by running the accepted regression suite. Prior to contact with the business, the changes should be reviewed and accepted by a peer or the team as a whole. This peer review should be handled in less than 10 minutes but goes a long way to ensure people's work is holding to team standards and expectations.
<li><h4>Checkpoint 2: Business Review</h4>After the peer review is complete, the business owner should be notified and provided with the documentation to justify why the task should be considered complete. Getting a signoff from a user prior to deployment to downstream systems (QA, UAT, etc) saves huge amounts of time related to feedback loops. This business review should be a final checkpoint, not the only checkpoint. The technical resource should be communicating with the user as much as needed throughout the development process, whether it be UI design, data validation requirements, or other questions.
<li><h4>Updating Technical Documentation</h4>take 15 minutes and update the docs. In the team's DOD, you could even have a list of the docs to be updated. ERD, process diagram, screen validation documentation, etc.
<li><h4>Updating User Documentation</h4>take 15 minutes and update the docs. In the team's DOD, you could even have a list of the docs to be updated. If the UI changed, update the screenshots and provide the new instructions.
<li><h4>Update Task</h4>Once all is completed, the final step is updating the task. Again, it doesn't take long (15 minutes) to write a good explanation of what was done, what was touched, what tests were written or changed, signoff info and getting the documentation updated. At this point, the task's actuals should be updated to show the time spent and document any anomalies. Use this time to also push anomalies to the project manager to be reviewed and possibly get them addressed, if they might become longer term issues.</li>
</ol>
Some developers and team members may look at this list and see nothing but busy work. While it can sometimes seem tedious and boring, following these processes actual protect the development team from volatile business expectations and gives a kind of social contract allowing the developers to properly cover all needed aspects of delivery. It's also a great tool to have in hand during sprint planning or general task estimations – a small change in code may take 2 hours, but updating the documentation, writing tests and updating the users to impact changes may double that time to 4 hours. Having the DOD helps everyone baseline their tasks and estimate their throughout more accurately.<br />
<br />
<h3>Link:</h3>
<a href="http://www.stephennimmo.com/definition-of-done/" target=_blank>Stephen Nimmo :: Definition of Done
</html>
<html>
<ul>
<li>ein offenes Versionskontrollsystem für ML-Projekte;<br />
Tool für Data Scientists und Engineers</li>
<br />
<li>Zur Versionierung sämtlicher Elemente eines Projekts: <br />
Angefangen beim Datensatz, über den Programmcode<br />
bis zum trainierten Modell</li>
<br />
<li>Damit ist der Weg von der reproduzierbaren Entwicklung<br />
zur Operationalisierung und dem Deployment des ML‐Mo‐<br />
dells, und damit der gesamte Entwicklungsprozess ab‐<br />
gedeckt.</li>
<br />
<li>Integriert sich in den Workflow von Git und dessen<br />
Branch-Modell</li>
<br />
<li> Initialisierung des Repositories: <code><b>dvc init</b></code> <br />
→ Initialisierung von DVC<br />
<br />
<li>dessen Konfiguration wird im Unterordner <code><b>.dvc</b></code> <br />
im Git-Repository versioniert.</li>
<br />
<li>To prepare your workspace, you'll take the following steps:
<ol>
<li>Create and activate a virtual environment.</li>
<li>Install DVC and its prerequisite Python libraries.</li>
<li>Fork and clone a GitHub repository with all the code.</li>
<li>Download a free dataset to use in the examples.</li></ol></li>
<br />
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.informatik-aktuell.de/betrieb/kuenstliche-intelligenz/data-science-in-der-praxis.html" target=_blank>Informatik aktuell :: Data Science in der Praxis</a></li>
<li><a href="https://www.informatik-aktuell.de/betrieb/kuenstliche-intelligenz/versionskontrolle-fuer-machine-learning-projekte.html" target="_blank" rel="noreferrer noopener">Informatik aktuell :: Versionskontrolle für Machine-Learning-Projekte</a> <em>(downloaded, PDF)</em></li>
<li><a href="https://dvc.org/" target=_blank>DVC :: Homepage</a></li>
<li>PDF-File: realpython.com-Data Version Control With Python and DVC.pdf</li>
</ul>
</html>
<html>
<ul>
</ul>
<h3>Links:</h3>
<ol>
<li>Ordix-News 01/2017, S. 6 :: Data Mining in der Praxis - Teil 1 :: Was ist Data Mining?</li>
<li>Ordix-News 01/2017, S. 33 :: Data Mining in der Praxis - Teil 2 :: Klassifikation</li>
<li>Ordix-News 02/2017, S. 6 :: Data Mining in der Praxis - Teil 3 :: Lineare Regression</li>
<li></li>
</ol>
</html>
<html>
<ul>
<li><h3>Daten entsprechen nicht den Erwartungen</h3>
In einem Datensatz sind einige Daten, die nicht den Erwartungen<br />
(z.B. “horsepower“ ist keine <i>Integer</i>‐Zahl) entsprechen;<br />
<br />
→ <b>Trick 17 im Data Science :</b><br />
Die Minimum- und Maximum-Werte der zu untersuchenden Datenreihe anzeigen<br />
<br />
(s. PDF-File data-science-blog.com-Lineare Regression in Python mit Scitkit-Learn.pdf)</li>
</ul>
</html>
<html>
<ul>
<li><h3>AKID- / ACID-Eigenschaften </h3>
<ul><li><b>Atomarität</b> bzw. <i>atomicity</i></li>
<li><b>Konsistenz</b> bzw. <i>consistency</i></li>
<li><b>Isolation</b> bzw. <i>isolation</i></li>
<li><b>Dauerhaftigkeit</b> bzw. <i>durability</i></li>
</ul></li><br />
<li></li><br />
</ul>
</html>
- Befehl: date
- Wenn dem date-Kommando ein Argument übergeben wird,
dass nicht mit einem +-Zeichen beginnt, wird die Systemzeit
diesem Argument entsprechend gesetzt. Das Argument muss
vollständig aus Ziffern bestehen.
- Die einzelnen Stellen der Zahl haben folgende Bedeutung:
MM Monat
DD Tag im Monat
hh Stunde
mm Minute
CC die ersten beiden Stellen der Jahreszahl (optional)
YY die letzten beiden Stellen der Jahreszahl (optional)
ss die Sekunden (optional)
Die Form, die das date-Kommando erwartet, ist genau MMDDhhmmCCYY.ss
Dabei dürfen die optionalen Angaben CC, YY, ss weggelassen
werden. date erkennt an dem Punkt zwischen Jahreszahl und
Sekunden, ob es sich um Jahr oder Sekunden handelt.
Nur der Superuser (root) darf die Systemzeit verändern.
Durch das Ändern der Systemzeit wird nicht die CMos-Uhr gestellt.
Nur die aktuelle Systemzeit ist betroffen. Um die CMos-Uhr zu stellen,
wird zunächst die Systemzeit gestellt und dann mit dem Befehl
hwclock --systohc
die Systemzeit in die CMos-Uhr eingetragen. Auch das kann nur der
Systemverwalter durchführen.
Die CMos-Uhr / Hardware-Clock anzeigen: hwclock -r / --show
- Beispiel: date 010116002014 # Datum & Uhrzeit setzen
# (die Uhrzeit ist zwischen Datum und Jahrhundert-Angabe)
<html>
<ul>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.linux-magazin.de/ausgaben/2002/11/versionen-spagat/" target=_blank>Linux‐Magazin :: Versionen‐Spagat</a></li>
</ul>
</html>
<html>
<h3>Tool wmbattery</h3>
<ul>
<li>display laptop battery info, dockable in WindowMaker</li>
<br />
<li>wmbattery displays the status of your laptop's battery in a small icon. This <br />
includes if it is plugged in, if the battery is charging, how many minutes of battery<br />
life remain, and battery status (high - green, low - yellow, or critical - red).</li>
<br />
<li>There's nothing in the program that makes it require WindowMaker, except<br />
maybe the look. It can be docked in WindowMaker or AfterStep's dock.</li>
<br />
<li>wmbattery supports multi-battery machines, and can estimate how long it<br />
will take the battery to finish charging or discharging. </li>
</ul>
<h3>Installation</h3>
<code><pre>
$ sudo apt install wmbattery
</pre></code>
<h3>Optionen</h3>
<code><pre>
mueller@Debian-Laptop:~$ wmbattery -h
Usage: wmbattery [options]
-d <display> selects target display
-h display this help
-g {+-}x{+-}y position of the window
-i display as icon
-b num number of battery to display
-w secs seconds between updates
-l percent low percentage
-c percent critical percentage
-e use own time estimates
-s granularity ignore fluctuations less than granularity% (implies -e)
-a file when critical send file to /dev/audio
-x command when critical execute this command
-n disable dial graphic
-v display version number
mueller@Debian-Laptop:~$
</pre></code>
<h3>Eintrag in ~/.bashrc</h3>
<code><pre>
wmbattery_PID=$(pgrep wmbattery)
if [ -z "$(echo "$wmbattery_PID")" ];then
wmbattery -i -c 40 -x "uxterm -e dialog --msgbox 'Running out of power ... %percent%' 6 30" &
fi
</pre></code>
</html>
<html>
<ul>
<li><h3>Packages required to enable kernel crash dump Debian Linux</h3>
<li><b>crash</b> : Linux kernel debugging utility</li>
<li><b>kdump‐tools</b> : Debian scripts and tools for automating kdump (Linux crash dumps)</li>
<li><b>kexec‐tools</b> : Tools to support fast kexec reboots</li>
<li><b>linux‐image‐<em>$(uname ‐r)</em>‐dbg</b> : Debug symbols for currently running Linux kernel image. For example, linux-image-5.10.0-11-amd64.</li>
<li><b>makedumpfile</b> : Program that can extract a subset of the memory available either via /dev/mem or /proc/vmcore for crashdumps. One can get memory images without extra unneeded information such as zero pages, userspace programs, and more.</li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.cyberciti.biz/faq/how-to-on-enable-kernel-crash-dump-on-debian-linux/" target="_blank" rel="noreferrer noopener">nixCraft :: How to enable kernel crash dump on Debian</a></li>
</ul>
</html>
<html>
<ul>
<li><pre><code>cat /etc/os-release</code></pre>
</li>
<li><pre><code>cat /etc/debian_version</code></pre>
</li>
<li><pre><code>lsb_release [ –a ]</code></pre>
</li>
<li><pre><code>cat /etc/issue</code></pre>
</li>
<li><pre><code>hostnamectl</code></pre>
</li>
<li><pre><code></code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.ionos.de/digitalguide/server/knowhow/debian-version-anzeigen/"
target="_blank" rel="noreferrer noopener">
IONOS :: Debian-Version anzeigen: Einfach und schnell </a>
<li><a href=" </li>https://www.veuhoff.net/linux-version-herausfinden-alle-befehle-um-die-installierte-debian-version-anzeigen-zu-lassen/"
target="_blank" rel="noreferrer noopener">
Veuhoff.net :: Linux Version herausfinden: Alle Befehle, die installierte Debian Version anzeigen zu lassen </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
In diesem Fall ist der Befehl auszuführen:
<code><pre>
sudo dpkg --configure -a
</pre></code>
</html>
<html>
<ul>
<li>Manchmal gehen Dinge schief und das System, dass Sie so sorgfältig installiert haben, ist nicht mehr bootfähig. Vielleicht ist die Konfiguration des Bootloaders misslungen, als Sie eine Änderung ausprobiert haben, oder ein neuer Kernel, den Sie installiert haben, startet nicht oder kosmische Strahlen haben Ihre Festplatte getroffen und ein bisschen in /sbin/init gewütet. Unabhängig von der Ursache müssen Sie irgendwie das System zum Laufen bekommen, um das Problem zu lösen, und der Rettungsmodus könnte dazu nützlich sein.<br />
<br />
Um in den Rettungsmodus zu gelangen, wählen Sie rescue aus dem Menü, geben rescue am boot:-Prompt ein oder starten mit dem Boot-Parameter rescue/enable=true. Sie sehen die ersten Bildschirmseiten des Installers mit einem Hinweis in der Ecke, dass dies der Rettungsmodus ist und keine komplette Neuinstallation. Keine Sorge, Ihr System wird nicht überschrieben werden! Der Rettungsmodus nutzt lediglich die Fähigkeiten des Installers zur Hardware-Erkennung, um sicherzustellen, dass Ihnen Ihre Festplatten, Netzwerkschnittstellen und so weiter zu Verfügung stehen, so dass Sie das System reparieren können.<br />
<br />
Statt des Partitionierungswerkzeuges sollte Ihnen jetzt eine Liste der Partitionen auf Ihrem System präsentiert werden und Sie werden aufgefordert, eine davon auszuwählen. Normalerweise sollten Sie die Partition wählen, die das root-Dateisystem enthält, welches Sie reparieren müssen. Sie können Partitionen auf RAID- und LVM-Geräten sowie solche, die direkt auf den Platten angelegt wurden, auswählen.<br />
<br />
Falls möglich präsentiert der Installer Ihnen jetzt eine Shell-Eingabeaufforderung in dem Dateisystem, das Sie ausgewählt haben, die Sie für nötige Reparaturen verwenden können.<br />
<br />
Falls der Installer keine nutzbare Shell im von Ihnen gewählten root-Dateisystem starten kann, weil vielleicht das Dateisystem beschädigt ist, wird eine Warnung angezeigt und Ihnen wird angeboten, eine Shell in der Umgebung des Installers zu öffnen. Sie werden hier vielleicht nicht so viele Werkzeuge zur Verfügung haben, aber oft wird es trotzdem reichen, das System zu reparieren. Das root-Dateisystem, das Sie ausgewählt haben, wird in das /target-Verzeichnis eingebunden.<br />
<br />
In jedem Fall wird der Rechner neu starten, sobald Sie die Shell schließen.<br />
<br />
Zum Schluss noch ein Hinweis: ein defektes System zu reparieren kann schwierig sein und dieses Handbuch versucht auch nicht, alles was schief laufen kann zu behandeln, oder zu beschreiben, wie Sie die Fehler beheben. Wenn Sie Probleme haben, ziehen Sie einen Experten zu Rate. <br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.debian.org/releases/stable//armel/ch08s06.de.html"
target="_blank" rel="noreferrer noopener">
Debian :: 8.6. Ein beschädigtes System reparieren</a>
</li>
<li><a href="https://wiki.debianforum.de/Grub_reparieren"
target="_blank" rel="noreferrer noopener">
debianforum.de :: Grub reparieren</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>Bluetooth aktivieren:
<pre><code>mueller@HPLaptop:~$ sudo rfkill list
0: hci0: Bluetooth
Soft blocked: yes
Hard blocked: no
mueller@HPLaptop:~$ sudo rfkill unblock bluetooth
mueller@HPLaptop:~$ sudo rfkill list
0: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
mueller@HPLaptop:~$ </code></pre>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.ubuntuusers.de/Bluetooth/Einrichtung/"
target="_blank" rel="noreferrer noopener">
Ubuntuusers-Wiki :: Bluetooth - Einrichtung</a>
</li>
<li><a href="https://wiki.ubuntuusers.de/Howto/Bluetooth-Ger%C3%A4t_per_Kommandozeile_koppeln/"
target="_blank" rel="noreferrer noopener">
Ubuntuusers-Wiki :: Bluetooth - Geräte per Kommandozeile koppeln</a>
</li>
</ul>
</html>
<html>
https://commandmasters.com/commands/bluetoothctl-linux/
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://www.baeldung.com/linux/bluetooth-via-terminal"
target="_blank" rel="noreferrer noopener">
Baeldung :: Connect to a Bluetooth Device via the Terminal</a>
</li>
</ul>
</html>
<html>
<ul>
<li>The 3 ways are:
<ol>
<li>nmcli</li>
<li>nmtui</li>
<li>wpa_supplicant</li>
</ol>
</li>
<li><h3>Discovering networks using Iwconfig</h3>
</li>
<li><h3>Connecting to wifi from the command line using <u>nmcli</u></h3>
</li>
<li><h3>Connecting to wifi from the console using <u>nmtui</u></h3>
</li>
<li><h3>Connect to wifi using <u>wpa_supplicant</u></h3>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://linuxhint.com/3-ways-to-connect-to-wifi-from-the-command-line-on-debian/" target="_blank"
rel="noopener noreferrer">LinuxHint :: 3 ways to connect to WiFi</a></li>
</ul>
</html>
<html>
<ul>
<li>So ermittelt man die Paket-Zugehörigkeit einer Datei:<br />
<b><code>dpkg -S <i>Dateinamen (am besten mit Pfadangabe)</i></code></b><br />
<br />
Als Rückkabe erhält man den Namen des Pakets:
<code><pre>mueller@Debian-Laptop:~$ dpkg -S /etc/hdparm.conf
hdparm: /etc/hdparm.conf
mueller@Debian-Laptop:~$ </pre></code></li>
<br />
<li>Um noch weiter zu forschen, kann man Informationen <br />
zum Paket ausgeben lassen. Dazu folgenden Befehl <br />
eingeben (mit Paketnamen):
<br />
<b><code>apt-cache show <i>Paketname</i></b></code><br />
<br />
<details><summary>Ausgabe des Befehls:</summary>
<code><pre>
Package: hdparm
Version: 9.58+ds-1
Installed-Size: 255
Maintainer: Alexandre Mestiashvili <mestia@debian.org>
Architecture: amd64
Depends: libc6 (>= 2.14), lsb-base
Recommends: powermgmt-base
Suggests: apmd
Description-de: Festplattenparameter für hohe Leistung einstellen
Abfragen/Setzen der Geräteparameter für Linux-SATA/IDE-Laufwerke.
Bietet eine Kommandozeilen-Schnittstelle zu diversen Kernel-Schnittstellen,
die vom Linux-Subsystem “libata“ (für SATA/PATA/SAS) und dem älteren
IDE-Treibersubsystem unterstützt werden. Viele neuere (2008 und später)
USB-Laufwerksgehäuse unterstützen jetzt auch “SATA“ (SCSI-ATA Command
Translation) und können damit auch mit hdparm arbeiten.
Description-md5: 10cd5d89570f5496e89b163ae03a66e5
Homepage: http://sourceforge.net/projects/hdparm/
Tag: admin::benchmarking, admin::hardware, hardware::storage,
implemented-in::c, interface::commandline, role::program,
use::configuring
Section: admin
Priority: standard
Filename: pool/main/h/hdparm/hdparm_9.58+ds-1_amd64.deb
Size: 116184
MD5sum: 1ab238c4e4b5422887ac3cd7c37ba067
SHA256: 92735df6bce6bb174777ca51d947e382ceda5fa7d95cc8c9294a113d9b8a4b3e
Package: hdparm
Version: 9.51+ds-1+deb9u1
Installed-Size: 238
Maintainer: Alexandre Mestiashvili <alex@biotec.tu-dresden.de>
Architecture: amd64
Replaces: apmd (<= 3.0.2-1.15)
Depends: libc6 (>= 2.14), lsb-base
Recommends: powermgmt-base
Suggests: apmd
Description-de: Festplattenparameter für hohe Leistung einstellen
Abfragen/Setzen der Geräteparameter für Linux-SATA/IDE-Laufwerke.
Bietet eine Kommandozeilen-Schnittstelle zu diversen Kernel-Schnittstellen,
die vom Linux-Subsystem “libata“ (für SATA/PATA/SAS) und dem älteren
IDE-Treibersubsystem unterstützt werden. Viele neuere (2008 und später)
USB-Laufwerksgehäuse unterstützen jetzt auch “SATA“ (SCSI-ATA Command
Translation) und können damit auch mit hdparm arbeiten.
Description-md5: 10cd5d89570f5496e89b163ae03a66e5
Homepage: http://sourceforge.net/projects/hdparm/
Tag: admin::benchmarking, admin::hardware, hardware::storage,
implemented-in::c, interface::commandline, role::program,
use::configuring
Section: admin
Priority: standard
Filename: pool/main/h/hdparm/hdparm_9.51+ds-1+deb9u1_amd64.deb
Size: 111618
MD5sum: 59f9689ef34cb5bd5adcdb845c2dd85d
SHA256: 1628b312ce5202e9d31dc1045bb39c67c92b611323b9bd744d1ad4967aec7298
</pre></code>
</details></li>
<br />
<li>Anschließend erfahren Sie mehr zum Paket. Falls man <br />
wissen möchte, warum das Paket installiert wurde, <br />
testet man noch dessen Abhängigkeiten.
<br />
<b><code>apt-cache rdepends <i>Paketname</i></b></code></li>
</ul>
<h3>Links:</h3>
<a href="https://www.tippscout.de/debian-ubuntu-datei-zugehoerigkeit-paket_tipp_5985.html" target=_blank>TippScout :: Ubuntu: Zu welchem Paket gehört die Datei</a>
</html>
<html>
<h3>Einträge in source.list‐File hinzufügen:</h3>
<code><pre>
sudo apt edit-sources
sudo apt update
</pre></code>
<h3>Einträge in source.list‐File entfernen:</h3>
<code><pre>
sudo rm /etc/apt/sources.list.d/*
sudo apt update
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://book.dpmb.org/debian-paketmanagement.chunked/ch03s03.html" target=_blank>Debian Paketmanagement (Online‐Buch)</a></li>
</ul>
</html>
<html>
<a href="https://www.tippscout.de/linux-version-32-oder-64-bit_tipp_6033.html" target=_blank>TippScout :: So ermitteln Sie, ob Ihr Linux mit 32 oder 64 Bit arbeitet</a>
</html>
<html>
<h3>Mein Vorgehen:</h3>
<ul>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://askubuntu.com/questions/1426981/unable-to-upgrade-usrmerge-due-to-both-lib-x86-64-linux-gnu-libc-so-6-and-usr"
target="_blank" rel="noreferrer noopener">
Ask Ubuntu ::
</li>
</ul>
</html>
<html>
<ul>
<li>Fehlermeldung erschien bei Aufruf vom Befehl
<code><pre>
sudo systemctl enable cron.service
</pre></code>
</li>
<li>If the service is masked it is symlinked to /dev/null.<br />
This can be verified by:
<code><pre>
ls -l /etc/systemd/system/systemd-resolved.service
</pre></code>
To remove the mask simply run:
<code><pre>
sudo systemctl unmask systemd-resolved
</pre></code>
/lib/systemd/system/systemd-resolved.service is a text file and cannot be executed by bash. The service binary is located /lib/systemd/systemd-resolved
</ul>
</html>
<html>
Diese Meldung ist <b>kein</b> Fehler, sondern “lediglich“ eine Info.<br />
<br />
Folgende Lösungen werden vorgeschlagen/empfohlen:
<ol>
<li><pre><code>apt‐get update ‐‐allow‐releaseinfo‐change</code></pre>
</li>
<li>am Beispiel des Chrome-Treibers:<pre><code>
sudo apt-get --allow-releaseinfo-change update
sudo apt-get install -y unzip xvfb libxi6 libgconf-2-4 gnupg2
sudo curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add
sudo echo "deb https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
sudo apt-get -y update
sudo apt-get -y install google-chrome-stable
wget -N https://chromedriver.storage.googleapis.com/89.0.4389.23/chromedriver_linux64.zip -P ~/
unzip ~/chromedriver_linux64.zip -d ~/
rm ~/chromedriver_linux64.zip
sudo mv -f ~/chromedriver /usr/local/bin/chromedriver
sudo chown root:root /usr/local/bin/chromedriver
sudo chmod 0755 /usr/local/bin/chromedriver
</code></pre>
</li>
<li>This is my command in the dockerfile:<pre><code>
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get --allow-releaseinfo-change update \
&& apt-get install -y google-chrome-unstable --no-install-recommends && rm -rf /var/lib/apt/lists/*
</code></pre>
</li>
</ol>
<ul>
<li><h3>Fehlermeldung trat in einer VM auf:</h3>
Following loosely Debian instructions, create a <code><b>/etc/apt/apt.conf.d/no-firmware.conf</b></code> file, with the following content:
<pre><code>APT::Get::Update::SourceListWarnings::NonFreeFirmware "false";</code></pre>
But for the general audiences that get such warning and<br />
would like to get rid of it, disabling non-free-firmware may<br />
work for VM but may not be good for our laptops (e.g., for<br />
firmware-iwlwifi).<br />
<br />
Per release notes,<br />
<pre><code> <b>To ensure installed non-free firmware packages receive proper upgrades</b>, changes to the APT configuration are required.</code></pre>
For most people, it'll be something like this:
<pre><code>
deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://exerror.com/repository-http-deb-debian-org-debian-buster-updates-inrelease-changed-its-suite-value-from-stable-updates-to-oldstable-updates/"
target="_blank" rel="noreferrer noopener">
ExceptionErrror :: Repository “http://deb.debian.org/debian buster-updates InRelease“ changed its “Suite“ value from “stable-updates“ to “oldstable-updates“</a>
</li>
<li><a href="https://unix.stackexchange.com/questions/742796/how-to-remove-apt-warning-in-debian-12"
target="_blank" rel="noreferrer noopener">
Unix & Linux Stackexchange :: How to remove apt warning in Debian 12</a>
</li>
</ul>
</html>
<html>
<ul>
<li>Die Fehlermeldung ist eher eine Warnung. Der Grund ist ein "Hinzufügen"<br />
einer weiteren <em>archive area</em>, mit dem Namen "non-free-firm-\<br />
ware".<br />
</li>
<li>Dadurch muss das Repository im File <code>/etc/apt/sources.list</code> ange–<br />
passt werden:
<pre><code># sudo sed -i 's/non-free$/non-free non-free-firmware/' /etc/apt/sources.list</code></pre>
</li>
<!--
<li>
</li>
-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.kali.org/blog/non-free-firmware-transition/"
target="_blank" rel="noreferrer noopener">
Kali-Blog :: The great non-free-firmware transition</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li><h3>Understanding the Error</h3>
<ul>
<li>When confronted with the message
<pre><code>The following packages have been kept back</code></pre>
our first task is to comprehend the underlying<br />
issue.
</li>
<li>Essentially, this notification indicates that <b>some<br />
packages on our system couldn’t get an up–<br />
grade, even though newer versions are avai–<br />
lable.</b>
</li>
<li>The reasons for this can be manifold, including<br />
dependency issues, conflicts, or other intrica–<br />
cies within the package management system.
</li>
</ul>
</li>
<li><h3>Exploring Common Causes</h3>
<ul>
<li><h4>Unresolved Dependency Issues</h4>
</li>
<li><h4>Pin Preferences</h4>
<ul>
<li>maintaining e.g. a server with an old package ver–<br />
sion to maintain functionality;
</li>
<li>pinning preferences prevent automatic upgrades<br />
of the package to newer versions;
</li>
</ul>
</li>
<li><h4> Incomplete Upgrades</h4>
</li>
<li><h4>Phased Updates</h4>
</li>
</ul>
</li>
<li><h3>Resolving the Problem</h3>
<ul>
<li><h4>Update the Package Lists</h4>
<ul>
<li><pre><code>$ sudo apt update
$ sudo apt upgrade</code>
</li>
</ul>
</li>
<li><h4>Remove Obsolete Packages</h4>
<ul>
<li><pre><code>$ sudo apt autoremove</code></pre>
</li>
</ul>
</li>
<li><h4>Install the Held Back Packages</h4>
<ul>
<li><pre><code>$ sudo apt dist-upgrade</code></pre>
</li>
</ul>
</li>
<li><h4>Adjust Pin Preferences</h4>
<ul>
<li><em>weiterforschen</em>
</li>
</ul>
</li>
<li><h4>Install Full Update</h4>
<ul>
<li>Falls alles bisher nicht funktioniert hat;
</li>
<li><pre><code>$ sudo apt update
$ sudo apt full-upgrade</code></pre>
</li>
</ul>
<li>
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.baeldung.com/linux/apt-packages-kept-back"
target="_blank" rel="noreferrer noopener">
Baeldung :: Resolving the Error “The following packages have been kept back“</a>
</li>
<li><a href="https://superuser.com/questions/1107334/apt-says-packages-have-been-kept-back-what-to-do"
target="_blank" rel="noreferrer noopener">
SuperUser StackExchange :: apt says packages have been kept back, what to do?</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<meta Volume was not properly unmounted. Some data may be corrupt. Please run fsck. />
<ul>
<li>tritt beim Mounten des Datenträgers /dev/sdb1 (un–<br />
ter /media/mueller/MUELLER, FS vfat) auf;
</li>
<li>Bei der Fehlermeldung den Befehl
<pre><code>sudo fsck.vfat -w -y /dev/sdX</code></pre>
absetzen;
<li>
</li>z.B.
<pre><code>sudo fsck.vfat -w -y /dev/sdb1</code></pre>
</li>
<li>vllt. auch den Datenträger <b><u>vor</u></b> dem Shutdown un–<br />
mounten;
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://askubuntu.com/questions/855798/i-failed-to-safely-eject-my-usb-drive-and-data-became-invisible-how-do-i-get-it"
target="_blank" rel="noreferrer noopener">
Ask Ubuntu :: I failed to safely eject my USB drive and data became invisible… how do I get it back? [duplicate] </a>
</li>
</ul>
</html>
<html>
<ul>
<li>Fehlermeldung:
<pre><code>i8042: PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp</code></pre>
</li>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://unix.stackexchange.com/questions/757355/laptop-keyboard-and-touchpad-not-working"
target="_blank" rel="noreferrer noopener">
Unix & Linux StackExchange :: Laptop keyboard and touchpad not working</a>
</li>
<li><a href="https://bugzilla.kernel.org/show_bug.cgi?id=217873"
target="_blank" rel="noreferrer noopener">
Kernel.org - Bugzilla :: Bug 217873 - Summary: Lenovo Ideapad Slim 3 AMD 7520U - Keyboard & Trackpad not working with multip… </a>
</li>
<li><a href="https://wiki.gentoo.org/wiki/Synaptics"
target="_blank" rel="noreferrer noopener">
Gentoo Linux Wiki :: Synaptics - Abschnitt "Troubleshooting - Touchpad is not recognized"</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li><pre><code>cd /usr/src/linux-headers-6.1.0-23-amd64/scripts</code></pre>
</li>
<li><pre><code>vim Makefile.modfinal</code></pre>
</li>
<li>Corresponding code is at line 63:
<pre><code>ifdef CONFIG_DEBUG_INFO_BTF_MODULES
+$(if $(newer-prereqs),$(call cmd,btf_ko))
endif</code></pre>
So try to remove these 3 lines. <em>(Ich habe sie auskommentiert)</em>
</li>
<li>Danach gemäss README-File aus dem Verzeichnis /usr/local/bin/rtw88 den Befehl
<pre><code>make install </code></pre>
aufgerufen
</li>
<li>Gemäss README-File wurde die Datei blacklist.conf angelegt:
<pre><code>root@HPLaptop:~# ls -altr /etc/modprobe.d/
insgesamt 28
-rw-r--r-- 1 root root 154 16. Mai 2023 intel-microcode-blacklist.conf
-rw-r--r-- 1 root root 127 12. Jul 2023 dkms.conf
-rw-r--r-- 1 root root 581 13. Aug 17:17 blacklist-rtw88.conf</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://github.com/aircrack-ng/rtl8188eus/issues/263"
target="_blank" rel="noreferrer noopener">
aircrack-ng :: make → /bin/sh: 1: ./tools/bpf/resolve_btfids/resolve_btfids: not found </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<h3>Fehlermeldung</h3>
<ul>
<li> beim Hinzufügen eines PPA-Repositories zum <br />
System erscheint folgende Meldung:
<pre><code>Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 362, in <module>
sys.exit(0 if addaptrepo.main() else 1)
^^^^^^^^^^^^^^^^^
File "/usr/bin/add-apt-repository", line 345, in main
shortcut = handler(source, **shortcut_params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/softwareproperties/shortcuts.py", line 40, in shortcut_handler
return handler(shortcut, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 86, in __init__
if self.lpppa.publish_debug_symbols:
^^^^^^^^^^
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 126, in lpppa
self._lpppa = self.lpteam.getPPAByName(name=self.ppaname)
^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 113, in lpteam
self._lpteam = self.lp.people(self.teamname)
^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'people'
</code></pre>
</li>
</ul>
<h3>Lösung:</h3>
<ul>
<li><pre><code>sudo apt install python3-launchpadlib</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.linuxquestions.org/questions/debian-26/debian-bullseye-sid-add-apt-repository-not-working-python-problem-4175720821/"
target="_blank" rel="noreferrer noopener">
LinuxQuestions :: [SOLVED] Debian Bullseye - Sid: add-apt-repository not working python problem </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<h3>How to find out if my Ubuntu/Debian Linux server needs a reboot</h3>
You must reboot your Linux box when your install a new kernel<br />
or update critical libraries such as libc. Both Debian and Ubuntu<br />
Linux can tell you if the system needs a reboot when you login<br />
to your box as root user.
<h3>Find out if my Ubuntu/Debian Linux server needs a reboot</h3>
To know if your Debian or Ubuntu cloud VM/VPS needs a restart<br />
use the following commands. Directly login as follows:
<code><pre>
$ ssh root@server1.cyberciti.biz
</pre></code>
OR
<code><pre>
$ ssh vivek@server1.cyberciti.biz
$ sudo -i
</pre></code>
Sample outputs:<br />
<img src="./pictures/How-do-I-know-if-my-ubuntu-server-needs-a-restart.png" height=516 width=599 /><br />
<br />
If the file /var/run/reboot-required exists, you get the above message.<br />
You can check it yourself by typing the cat command:
<code><pre>
$ cat /var/run/reboot-required
</pre></code>
Sample outputs:
<code><pre>
*** System restart required ***
</pre></code>
One can put some sort of code in shell startup file such as ~/.bashrc:
<code><pre>
[ -f /var/run/reboot-required ] && cat /var/run/reboot-required
</pre></code>
OR use if command in your script or startup file:
<code><pre>
if [ -f /var/run/reboot-required ]
then
echo "[*** Hello $USER, you must reboot your machine ***]"
fi
</pre></code>
You must reboot the Linux server/desktop using reboot command:
<code><pre>
$ sudo reboot
</pre></code>
OR
<code><pre>
$ sudo shutdown -r now
</pre></code>
This method seems to only work on Ubuntu Linux.
<h3>How to use needrestart-session command to checks which <br />
daemons need to be restarted after library upgrades</h3>
The needrestart-session command check for processes need to be <br />
restarted in user sessions. You can grab it from upstream or install<br />
it using apt-get command/apt command:
<code><pre>
$ sudo apt-get install needrestart
</pre></code>
Sample outputs:
<code><pre>
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-78 linux-headers-4.4.0-78-generic linux-image-4.4.0-78-generic
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
libmodule-find-perl libmodule-scandeps-perl libproc-processtable-perl libsort-naturally-perl libterm-readkey-perl
Suggested packages:
needrestart-session | libnotify-bin
The following NEW packages will be installed:
libmodule-find-perl libmodule-scandeps-perl libproc-processtable-perl libsort-naturally-perl libterm-readkey-perl needrestart
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 140 kB of archives.
After this operation, 539 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.service.networklayer.com/ubuntu xenial/universe amd64 libmodule-find-perl all 0.13-1 [10.2 kB]
Get:2 http://mirrors.service.networklayer.com/ubuntu xenial/universe amd64 libmodule-scandeps-perl all 1.20-1 [29.8 kB]
Get:3 http://mirrors.service.networklayer.com/ubuntu xenial/universe amd64 libproc-processtable-perl amd64 0.53-1build1 [33.1 kB]
Get:4 http://mirrors.service.networklayer.com/ubuntu xenial/universe amd64 libsort-naturally-perl all 1.03-1 [13.7 kB]
Get:5 http://mirrors.service.networklayer.com/ubuntu xenial/universe amd64 libterm-readkey-perl amd64 2.33-1build1 [27.2 kB]
Get:6 http://mirrors.service.networklayer.com/ubuntu xenial/universe amd64 needrestart all 2.6-1 [25.6 kB]
Fetched 140 kB in 0s (5,243 kB/s)
Selecting previously unselected package libmodule-find-perl.
(Reading database ... 117527 files and directories currently installed.)
Preparing to unpack .../libmodule-find-perl_0.13-1_all.deb ...
Unpacking libmodule-find-perl (0.13-1) ...
Selecting previously unselected package libmodule-scandeps-perl.
Preparing to unpack .../libmodule-scandeps-perl_1.20-1_all.deb ...
Unpacking libmodule-scandeps-perl (1.20-1) ...
Selecting previously unselected package libproc-processtable-perl.
Preparing to unpack .../libproc-processtable-perl_0.53-1build1_amd64.deb ...
Unpacking libproc-processtable-perl (0.53-1build1) ...
Selecting previously unselected package libsort-naturally-perl.
Preparing to unpack .../libsort-naturally-perl_1.03-1_all.deb ...
Unpacking libsort-naturally-perl (1.03-1) ...
Selecting previously unselected package libterm-readkey-perl.
Preparing to unpack .../libterm-readkey-perl_2.33-1build1_amd64.deb ...
Unpacking libterm-readkey-perl (2.33-1build1) ...
Selecting previously unselected package needrestart.
Preparing to unpack .../needrestart_2.6-1_all.deb ...
Unpacking needrestart (2.6-1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libmodule-find-perl (0.13-1) ...
Setting up libmodule-scandeps-perl (1.20-1) ...
Setting up libproc-processtable-perl (0.53-1build1) ...
Setting up libsort-naturally-perl (1.03-1) ...
Setting up libterm-readkey-perl (2.33-1build1) ...
Setting up needrestart (2.6-1) ...
</pre></code>
You can run it as follows:
<code><pre>
$ sudo needrestart
</pre></code>
Sample outputs:
<code><pre>
Scanning processes...
Scanning linux images...
Running kernel seems to be up-to-date.
No services need to be restarted.
No containers need to be restarted.
</pre></code>
If restart needed you will be greeted as follows:
<code><pre>
Check which processes need to be restarted after library upgrades.
</pre></code>
Once you are notified it will proceed to restart needed services and containers <br />
as follows on screen:
<code><pre>
Scanning processes...
Scanning candidates...
Scanning linux images...
Running kernel seems to be up-to-date.
Restarting services using systemd...
SET needrestart/ui-query_conts LXC nginx, LXC mariadb, LXC memcached, LXC apache
</pre></code>
<h3>How to use checkrestart command to check which processes need to be<br />
restarted after an upgrade</h3>
You must install debian-goodies package:
<code><pre>
$ sudo apt-get install debian-goodies
</pre></code>
Sample outputs:
<code><pre>
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
dctrl-tools
Suggested packages:
debtags xdg-utils zenity
The following NEW packages will be installed:
dctrl-tools debian-goodies
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 120 kB of archives.
After this operation, 495 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.linode.com/ubuntu xenial/main amd64 dctrl-tools amd64 2.24-2 [59.1 kB]
Get:2 http://mirrors.linode.com/ubuntu xenial/main amd64 debian-goodies all 0.64 [61.3 kB]
Fetched 120 kB in 0s (8,002 kB/s)
Selecting previously unselected package dctrl-tools.
(Reading database ... 37626 files and directories currently installed.)
Preparing to unpack .../dctrl-tools_2.24-2_amd64.deb ...
Unpacking dctrl-tools (2.24-2) ...
Selecting previously unselected package debian-goodies.
Preparing to unpack .../debian-goodies_0.64_all.deb ...
Unpacking debian-goodies (0.64) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up dctrl-tools (2.24-2) ...
Setting up debian-goodies (0.64) ...
</pre></code>
Once installed run checkrestart command to check which processes need to be <br />
restarted after an upgrade:
<code><pre>
$ sudo checkrestart
</pre></code>
Sample outputs:
<code><pre>
Found 27 processes using old versions of upgraded files
(19 distinct programs)
(15 distinct packages)
</pre></code>
Of these, 14 seem to contain systemd service definitions or init scripts which <br />
can be used to restart them.<br />
<br />
The following packages seem to have definitions that could be used to restart<br />
their services:
<code><pre>
varnish:
3490 /usr/sbin/varnishd
3704 /usr/sbin/varnishd
vnstat:
3631 /usr/sbin/vnstatd
denyhosts:
17426 /usr/sbin/denyhosts
openssh-server:
3630 /usr/sbin/sshd
irqbalance:
3675 /usr/sbin/irqbalance
dbus:
3460 /usr/bin/dbus-daemon
lighttpd:
3670 /usr/sbin/lighttpd
nginx-core:
3683 /usr/sbin/nginx
3686 /usr/sbin/nginx
3685 /usr/sbin/nginx
udev:
2139 /lib/systemd/systemd-udevd
cron:
3465 /usr/sbin/cron
accountsservice:
3531 /usr/lib/accountsservice/accounts-daemon
php7.0-fpm:
9565 /usr/sbin/php-fpm7.0
12663 /usr/sbin/php-fpm7.0
3692 /usr/sbin/php-fpm7.0
9441 /usr/sbin/php-fpm7.0
rsyslog:
3467 /usr/sbin/rsyslogd
memcached:
3636 /usr/bin/memcached
</pre></code>
These are the systemd services:
<code><pre>
systemctl restart accounts-daemon.service
</pre></code>
These are the initd scripts:
<code><pre>
service varnish restart
service varnishncsa restart
service varnishlog restart
service vnstat restart
service denyhosts restart
service ssh restart
service irqbalance restart
service dbus restart
service lighttpd restart
service nginx restart
service udev restart
service cron restart
service php7.0-fpm restart
service rsyslog restart
service memcached restart
</pre></code>
These processes (1) do not seem to have an associated init script to restart <br />
them:
<code><pre>
util-linux:
3650 /sbin/agetty
3648 /sbin/agetty
</pre></code>
<h3>Check for kernel and libc</h3>
You can manually check for installed/updated package log:
<code><pre>
$ grep installed /var/log/dpkg.log
$ grep upgrade /var/log/dpkg.log
$ tail -f /var/log/apt/history.log
</pre></code>
OR
<code><pre>
$ grep libc /var/log/dpkg.log
</pre></code>
Sample outputs:
<code><pre>
2017-06-20 01:11:15 status unpacked libc-bin:amd64 2.23-0ubuntu9
2017-06-20 01:11:15 status unpacked libc-bin:amd64 2.23-0ubuntu9
2017-06-20 01:11:15 status unpacked libc-bin:amd64 2.23-0ubuntu9
2017-06-20 01:11:15 status unpacked libc-bin:amd64 2.23-0ubuntu9
2017-06-20 01:11:15 status unpacked libc-bin:amd64 2.23-0ubuntu9
2017-06-20 01:11:15 status unpacked libc-bin:amd64 2.23-0ubuntu9
2017-06-20 01:11:15 status half-configured libc-bin:amd64 2.23-0ubuntu9
2017-06-20 01:11:15 status installed libc-bin:amd64 2.23-0ubuntu9
</pre></code>
Or use the following grep command to find out if libc/linux-image (kernel) <br />
was installed recently:
<code><pre>
$ grep -B1 libc /var/log/apt/history.log
$ grep -B1 linux-image /var/log/apt/history.log
</pre></code>
Sample outputs:
<code><pre>
Start-Date: 2016-09-09 18:50:28
Commandline: apt install linux-image-4.4.0-36-generic
Install: os-prober:amd64 (1.70ubuntu3, automatic), linux-image-4.4.0-36-generic:amd64 (4.4.0-36.55), \
grub-common:amd64 (2.02~beta2-36ubuntu3.2, automatic), grub2-common:amd64 (2.02~beta2-36ubuntu3.2, automatic), \
grub-pc:amd64 (2.02~beta2-36ubuntu3.2, automatic), grub-pc-bin:amd64 (2.02~beta2-36ubuntu3.2, automatic), \
grub-gfxpayload-lists:amd64 (0.7, automatic), libfreetype6:amd64 (2.6.1-0.1ubuntu2, automatic)
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://www.cyberciti.biz/faq/how-to-find-out-if-my-ubuntudebian-linux-server-needs-a-reboot/" target=_blank>nixCraft :: Debian - Linux server needs reboot</a></li>
</ul>
</html>
<html>
<ul>
<li>file: 2 - Why Not Store Everything in One Table? - lang_uz.srt
lässt sich wg. des Fragezeichens nicht extrahieren
</li>
<li>Habe das Tool
<a href="https://www.files2zip.com/"
target="_blank" rel="noreferrer noopener">
Files2zip.com</a>
verwendet;
</li>
</ul>
</html>
<html>
<ul>
<li>Um alle installierten Pakete mit apt aufzulisten, die mit apt installiert wurden:
<code><pre>
apt list ‐‐installed
</pre></code>
Es werden auch die Pakete aufgelistet, die als Abhängigkeiten installiert wurden.
</li>
<br />
<li>Prüfen, ob ein bestimmtes Paket in Ubuntu installiert ist:
<code><pre>
apt ‐qq list program_name ‐‐installed
</pre></code>
Bei der obigen Methode werden auch die Anwendungen aufgelistet,<br />
die mit .deb‐Dateien installiert sind.<br />
<br />
(<b>‐qq</b> steht für Quiet‐Modus.)
</li>
<br />
<li>Die installierten Snap‐Pakete installieren:
<code><pre>snap list</pre></code>
Snap list zeigt auch mit einem grünen Häkchen an, welche Anwendungen<br />
von einem verifizierten Herausgeber sind.</li>
<br />
<li>Die installierten Flatpack‐Pakete installieren:
<code><pre>flatpak list</pre></code></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://mystaridea.com/de/wie-man-installierte-pakete-unter-ubuntu-und-debian-basierten-linux-distributionen-auflistet/"
target="_blank" rel="noreferrer noopener">My Star Idea :: Wie man installierte Paket unter Ubuntu und Debian basierten Linux‐Distributionen auflistet</a></li>
</ul>
</html>
<html>
<ul>
<li>beim Aufrufen z.B. der URL (Ctrl+Shift+U) kommen <br />
folgende Fehlermeldungen:
<pre><code>QObject::startTimer: Timers cannot have negative intervals
qt.network.ssl: QSslSocket: cannot resolve EVP_PKEY_base_id
qt.network.ssl: QSslSocket: cannot resolve SSL_get_peer_certificate
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_get_peer_certificate
XPCOMGlueLoad error for file /usr/lib/firefox-esr/libmozgtk.so:
/lib/x86_64-linux-gnu/libgobject-2.0.so.0: undefined symbol: g_uri_ref
Couldn't load XPCOM.</code></pre>
</li>
</ul>
</html>
<html>
<ul>
<li>Beim Kernel-Update aktualisiert Debian auch den Grub-Bootloader <br />
sowie die Bootloader-Konfiguration in der (U)EFI-Firmware.<br />
<br />
Dort trägt Debian standardmäßig Grub als Bootloader und sich selbst<br />
als Standardbetriegssystem ein, wodurch ein anderer EFI-Loader de-<br />
aktiviert wird.<br />
<br />
Diese Standardvorgabe kann man mit dem Befehl
<code><pre>
sudo dpkg-reconfigure grub-efi-amd64
</pre></code>
anpassen, idealerweise vor dem nächsten Kernel-Update.<br />
<br />
Dazu lasse man im folgenden Dialog alle Einstellungebn bis auf die<br />
letzte unverändert: Die Frage, ob Debian das NVRAM aktualisieren<br />
soll, um direkt zu starten, muss man dazu verneinen.<br />
<br />
Danach aktualisiert Debian zwar noch die Grub-Konfiguration, beläs‐<br />
st aber den andern Bootloader als Standard-Bootloader für den Rech‐<br />
nerstart.
</ul>
<h3>Links:</h3>
<ul>
<li>c't 17/2023, S.162
</li>
</ul>
</html>
<html>
<ul>
<li><b><code>dpkg ‐‐get-selections</code></b></li>
<br />bzw.<br />
<li><b><code>dpkg ‐‐get-selections | grep <<i>gesuchtes Paket</i>></code></b></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.tippscout.de/linux-ubuntu-liste-pakete_tipp_5455.html" target=_blank>TippScout :: Ubuntu ‐ Liste der installierten Pakete anzeigen</a></li>
<li><a href="https://gitbook.dpmb.org/werkzeuge/paketoperationen/liste-der-installierten-pakete-anzeigen-und-deuten.html" target=_blank>Git-Book :: Liste der installierten Pakete anzeigen & deuten</a></li>
</ul>
</html>
<html>
<ul>
<li>MOK (Machine Owner Key) is about securing the boot process by only allowing approved OS components and drivers to run. MOK must be implemented by the "BIOS" - or some startup code inside the computer, anyway.
</li>
<li>The main idea is that only code which is signed is allowed to run while loading the operating system (OS). Once that is booted, the OS can take over responsibility from the BIOS for securing the system.
</li>
<li>The MOK system uses public key cryptography, which means that you can create a key pair, then sign, with your private/secret key, all components that are allowed to run. This includes the GRUB boot loader itself. The BIOS then uses your public key (you need to install it) to check signatures before running the code.
</li>
<li><a href="https://www.rodsbooks.com/efi-bootloaders/secureboot.html"
target="_blank" rel="noreferrer noopener">Here are some docs on Secure Boot and MOK</a>
</li>
<li>The beauty of MOK, in my personal opinion, is that you can create the keys yourself and sign those components that you trust. In the past, the EFI BIOS had only Microsoft's public key installed and they were hesitant to sign Linux boot loaders :-) That's why you needed SHIM in the past (a go-between between EFI BIOS and GRUB).
</li>
<li>All Secure Boot methods hope to secure the system from hackers and viruses by guaranteeing a cleanly booted system which is not tampered by malware. If startup code or drivers have been tampered with, it is detected so that you can act accordingly. There are not many options to defend your machine if the attacker has physical access to your computer ("evil maid attack") - even if for example your disk with all the important data is encrypted an attacker can modify the boot code to read your password while you enter it, then transmit or store it for them to read later. Secure Boot works against such a modification.
</li>
<li>Kyle Rankin has done a lot of work on securing the boot process for the Librem range of Laptops, and <a href="https://puri.sm/posts/the-librem-key-makes-tamper-detection-easy/" target="_blank" rel="noreferrer noopener">here is a good article on his work</a>. I believe it is well worth reading even if it is not directly applicable to your system - the idea is just the same.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://unix.stackexchange.com/questions/535434/what-exactly-is-mok-in-linux-for"
target="_blank" rel="noreferrer noopener">
UNIX StackExchange :: What exactly is MOK in Linux for?</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<p>
MOK (Machine Owner Key) is about securing the boot process by only<br />
allowing approved OS components and drivers to run. MOK must be im–<br />
plemented by the "BIOS" - or some startup code inside the computer,<br />
anyway.<br />
</p>
<p>
The main idea is that only code which is signed is allowed to run while<br />
loading the operating system (OS). Once that is booted, the OS can<br />
take over responsibility from the BIOS for securing the system.<br />
</p>
<p>
The MOK system uses public key cryptography, which means that you<br />
can create a key pair, then sign, with your private/secret key, all com–<br />
ponents that are allowed to run. This includes the GRUB boot loader<br />
itself. The BIOS then uses your public key (you need to install it) to<br />
check signatures before running the code.<br />
</p>
<p>
<a href="https://www.rodsbooks.com/efi-bootloaders/secureboot.html"
target="_blank" rel="noreferrer noopener">Here are some docs on Secure Boot and MOK</a>
</p>
<p>
The beauty of MOK, in my personal opinion, is that you can create the<br />
keys yourself and sign those components that you trust. In the past, <br />
the EFI BIOS had only Microsoft's public key installed and they were <br />
hesitant to sign Linux boot loaders :-) That's why you needed SHIM<br />
in the past (a go-between between EFI BIOS and GRUB).
</p>
<p>
All Secure Boot methods hope to secure the system from hackers<br />
and viruses by guaranteeing a cleanly booted system which is not<br />
tampered by malware. If startup code or drivers have been tampered<br />
with, it is detected so that you can act accordingly. There are not<br />
many options to defend your machine if the attacker has physical<br />
access to your computer ("evil maid attack") - even if for example<br />
your disk with all the important data is encrypted an attacker can<br />
modify the boot code to read your password while you enter it, then<br />
transmit or store it for them to read later. Secure Boot works against<br />
such a modification.
</p>
<p>
Kyle Rankin has done a lot of work on securing the boot process for<br />
the <a href="https://en.wikipedia.org/wiki/Librem" target="_blank" rel="noreferrer noopener">Librem range of Laptops</a>, and <a href="https://puri.sm/posts/the-librem-key-makes-tamper-detection-easy/" target="_blank" rel="noreferrer noopener">here is a good article on his work</a>.<br />
I believe it is well worth reading even if it is not directly applicable<br />
to your system - the idea is just the same.<br />
</p>
<h3>Links:</h3>
<ul>
<li><a href="https://unix.stackexchange.com/questions/535434/what-exactly-is-mok-in-linux-for"
target="_blank" rel="noreferrer noopener">
Stackexchange UNIX :: What exactly is MOK in Linux?</a>
</li>
<li><a href="https://wiki.debian.org/SecureBoot"
target="_blank" rel="noreferrer noopener">
Debian Wiki :: Secure Boot</a>
</li>
<li><a href="https://www.dannyvanheumen.nl/post/secure-boot-linux-shim-mokmanager/"
target="_blank" rel="noreferrer noopener">
Danny van Heumen :: Secure Boot Linux Shim (Mokmanager)</a>
</li>
</ul>
</html>
<html>
<ul>
<li>folgende Pakete müssen vorhanden sein:
<ul>
<li>exfat‐fuse</li>
<li>exfat‐utils</li>
</ul></li>
<br />
<li>Befehl, um die aktuell vorhanden Block‐Devices anzuzeigen:<br />
<code><pre>
lsblock ‐‐fs
</pre></code></li>
<li>Befehl zum Mounten:
<code><pre>
mount <em>DEVICE</em> <em>MOUNTPOINT</em> ‐o uid=1000 ‐o gid=1000
</pre></code>
</li>
</ul>
</html>
<html>
<ol>
<li><h4>dpkg</h4></li>
<li><h4>APT</h4>
Starting with Debian Jessie, some frequently used apt‐get and apt‐cache commands<br />
have an equivalent via the new apt binary. This means some popular commands like<br />
<code><b>apt‐get update, apt‐get install, apt‐get remove, apt‐cache search,</b></code><br />
or <code><b>apt‐cache show </b></code>now can also be called simply via apt, say <code><b>apt update, apt<br />
install, apt remove, apt search,</b></code> or <code><b>apt show</b></code>.<br />
<br />
The following is an overview of the old and new commands:
<table>
<tr><td> apt-get update </td><td> ⇒ apt update</td></tr>
<tr><td> apt-get upgrade </td><td> ⇒ apt upgrade [<em>Package‐Name</em>]</td></tr>
<tr><td> apt-get dist-upgrade </td><td> ⇒ apt full-upgrade</td></tr>
<tr><td> apt-get install package </td><td> ⇒ apt install package</td></tr>
<tr><td> apt-get remove package </td><td> ⇒ apt remove package</td></tr>
<tr><td> apt-get autoremove </td><td> ⇒ apt autoremove</td></tr>
<tr><td> apt-cache search <em>string</em> </td><td> ⇒ apt search <em>string</em></td></tr>
<tr><td> apt-cache policy package </td><td> ⇒ apt policy package</td></tr>
<tr><td> apt-cache show package </td><td> ⇒ apt show package</td></tr>
<tr><td> apt-cache showpkg package </td><td> ⇒ apt show -a package</td></tr>
</table>
</li>
<li><h4>aptitude</h4></li>
<li><h4>synaptic</h4></li>
<li><h4>tasksel</h4></li>
<li><h4>Other package management tools</h4>
<ul>
<li><code><b>dpkg-deb</b></code> :: This program manipulates Debian archive (.deb) files.</li>
<br />
<li><code><b>dselect</b></code></li>
</ul>
</li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://www.debian.org/doc/manuals/debian-faq/pkgtools.en.html"
target="_blank" rel="noreferrer noopener">
Debian :: Package‐Tools</a>
</li>
<li><a href="https://de.wikipedia.org/wiki/Debian_Package_Manager#Auf_dpkg_aufbauende_Software"
target="_blank" rel="noreferrer noopener">
Wikipedia :: Debian Package Manager - dselect</a>
</li>
<li><a href="https://blog.packagecloud.io/apt-cheat-sheet/"
target="_blank" rel="noreferrer noopener">
Packagecloud :: APT Cheat Sheet</a>
</li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://www.cyberciti.biz/tips/linux-debian-package-management-cheat-sheet.html" target=_blank>Cyberciti / NixCraft :: Ubuntu/Debian Linux apt-get package management cheat sheet</a></li>
<li><a href="https://www.lirobit.de/apt-get-uebersichtstabelle/" target=_blank>lirobit :: apt-get Übersichtstabelle</a></li>
</ul>
</html>
<html>
<pre><code>sudo apt-get -uy --reinstall install <em>PKG</em></code></pre>
z.B.
<pre><code>sudo apt-get -uy --reinstall install vagrant</code></pre>
</html>
<html>
Falls
<code><pre>
sudo apt remove …
</pre></code>
zu keinem Erfolg führt (das Paket ist zwar da, aber der o.g.<br />
apt‐Befehl sagt, dass es nicht vorhanden ist, der Befehl<br />
<code><pre>
sudo apt show -a …
</pre></code>
aber bestätigt, dass es existiert), dann folgenden Befehl ab‐<br />
geben:
<code><pre>
sudo apt purge $(dpkg -l | awk '/<em>pkgName</em>/ { print $2 }')
</pre></code>
<br />
Mit “<b>purge</b>“ werden zusätzlich zu den von “<b>remove</b>“<br />
gelöschten Files auch sämtliche Konfigurationsfile<br />
gelöscht.<br />
<br />
<h3>Links:</h3>
<ul>
<li><a href="https://debianforum.de/forum/viewtopic.php?t=176968" target="_blank" rel="noreferrer noopener">Debian‐Forum :: Bestimmte Version eines Pakets löschen?</li>
</ul>
</html>
<html>
<ul>
<li><h3>What is Xpad</h3>
<ul>
<li>Pads are basically sticky notes on your desktop in which you can write memos. Each Xpad session consists of one or more open pads. Pads are saved automatically. Each pad consists of three areas:
Top – Title bar / window decorations (optional)
Middle - Text area
Bottom - Toolbar (optional)
Each of these areas offer various options and preferences. Discover below some of them – and enjoy!
</li>
</ul>
</li>
<li><h3>Generic options</h3>
<ul>
<li>You have two types of options. The general options, impacting all your pads, and the options specific to each pad.
Preferences
In the preferences you can manage your pads behavior such as appearances, what Xpad should do when you start your computer, enable/disable the tray icon.
Open preferences: [Right-click in the text area] - [Pad] - [Edit] - [Preferences]
Open preferences: [Right-click on the Tray icon] - [Preferences]
Tray icon
The tray icon is an icon representing Xpad and offering different menus and options. It can be enabled/disabled in the preferences.
[Preferences] – [Enable tray icon]
Note that this might not work on all computers. Sometimes it is necessary to wait for the taskbar / panel to be loaded. There are two options which can help.
[Preferences] – [Wait for systray]
[Preferences] – [Delay startup]
A nice feature is that the behaviour of the left-click on the tray icon can be changed: do nothing, show/hide all pads, show the list of pads, and create new pad.
[Preferences] – [Tray left mouse click behaviour]
Toolbar
The toolbar offers buttons to quickly execute a command, such as Copy/Paste, New Pad, Delete Pad, etc. The toolbar can be disabled and/or autohide.
Add/remove buttons: [Right-click toolbar]
Enable/disable toolbar: [Right-click text area] - [Pad] - [View] - [Toolbar]
Automatically hide the toolbar: [Right-click text area] - [Pad] - [View] – [Hide Toolbar]
Scrollbar
The scrollbar can be enabled/disabled by the following way. When disabled, the size of the text area will grow when needed.
[Right-click text area] - [Pad] - [View] - [Scrollbar]
Window decorations
By default the window decorations, such as the title bar, minimize, maximize and close buttons, are hidden. This top bar is hidden to make makes the pad look more like an actual sticky note. See below how to move the pad without window decorations.
[Right-click text area] - [Pad] - [View] – [Window decorations]
Hide from taskbar or workspace switcher
If you have a lot of sticky notes, your taskbar might get filled with all these notes. In the preferences you can hide these notes from the taskbar, with a possible
side effect that the notes will not be visible anymore in the task switcher (alt-tab). Also you can hide all the notes in the workspace switcher with the same
possible side effect. Which ever option works best, depends on your preference and the desktop environment you use which is part of your Linux distribution (Mint,
Arch, Fedora, Ubuntu, Debian, etc).
Show/hide pads
There are a couple of different ways to show and hide all pads in the same time.
[Right-click text area] - [Pad] - [Notes] – [Show All] / [Close All]
[Right-click tray icon] – [Show All] / [Close All]
[Left-click tray icon], this toggles the show/hide feature, if set in the preferences.
</li>
</ul>
</li>
<li><h3>Per pad options</h3>
<ul>
<li>Color and font
Each pad can have its own color and font, or just follow the generic preference.
[Right-click in the text area] - [Pad] - [Properties]
Styling
A pad can contain different stylings: Bold, Italic, Underline and Strikethrough.
[Select text] - [Right click on it] - new options appear, specific for this piece of text.
Moving
There are multiple ways to move a pad around the desktop.
[Hold left-click on title bar]
[Hold left-click on toolbar]
[CTRL + left-click text area]
Resize
Each pad can be resized to the prefered size.
[Right-click and hold resizer] – the resizer is on the bottom right.
</li>
</ul>
</li>
<li><h3>Shortcuts</h3>
<ul>
<li>F1: Help
</li>
<li>CTRL-Q: Quit
</li>
<li>CTRL-W: Close current pad
</li>
<li>CTRL-A: Select All
</li>
<li>CTRL-Z: Undo
</li>
<li>CTRL-Y: Redo
</li>
<li>CTRL-N: New Pad
</li>
<li>CTRL-B: Bold
</li>
<li>CTRL-I: Italic
</li>
<li>CTRL-U: Underline
</li>
<li>SHIFT-DEL: Delete pad
</li>
</ul>
</li>
<li>Please send ideas or bug reports to https://bugs.launchpad.net/xpad/+filebug
</li>
</ul>
</html>
<html>
<ul>
<li>Fehlermeldung bei "update"-Befehl:
<pre><code>~$ sudo apt update
Get:1 http://repo.mysql.com/apt/debian bullseye InRelease [22.7 kB]
Hit:2 http://security.ubuntu.com/ubuntu noble-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu noble InRelease
Hit:4 http://archive.ubuntu.com/ubuntu noble-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu noble-backports InRelease
Err:1 http://repo.mysql.com/apt/debian bullseye InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B7B3B788A8D3785C
Reading package lists... Done
W: GPG error: http://repo.mysql.com/apt/debian bullseye InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B7B3B788A8D3785C
E: The repository 'http://repo.mysql.com/apt/debian bullseye InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.</code></pre>
Um das Repository <b>http://repo.mysql.com/apt/debian bullseye InRelease</b> zu<br />
entfernen, kann man wie folgt vorgehen:
<ol>
<li><pre><code>sudo add-apt-repository --list</code></pre>
z.B.
<pre><code>~$ sudo add-apt-repository --list
Types: deb
URIs: http://archive.ubuntu.com/ubuntu
Suites: noble noble-updates noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
Types: deb
URIs: http://security.ubuntu.com/ubuntu
Suites: noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
deb http://repo.mysql.com/apt/debian/ bullseye mysql-apt-config mysql-tools </code></pre>
</li>
<li><pre><code>sudo add-apt-repository --remove <em>REPOSITORY</em></code></pre>
z.B.
<pre><code>~$ sudo add-apt-repository --remove deb http://repo.mysql.com/apt/debian/ bullseye mysql-apt-config mysql-tools
Repository: 'deb http://repo.mysql.com/apt/debian/ bullseye mysql-apt-config mysql-tools'
Description:
Archive for codename: bullseye components: mysql-apt-config,mysql-tools
More info: http://repo.mysql.com/apt/debian/
Removing repository.
Press [ENTER] to continue or Ctrl-c to cancel.</code></pre>
</li>
<li>Paketliste aktualisieren:
<pre><code>sudo apt update</code></pre>
</li>
</ol>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://itslinuxfoss.com/remove-repository-debian-12/"
target="_blank" rel="noreferrer noopener">
It's Linux FOSS :: How to Remove a Repository on Debian 12 </a>
</li>
<li><a href="https://linuxsimply.com/linux-basics/package-management/repository-configuration/apt-remove-repositories/"
target="_blank" rel="noreferrer noopener">
Linux Simply :: How to Remove APT Repository in Linux [4 Easy Methods]</a>
</li>
<li><a href="https://askubuntu.com/questions/1233064/remove-apt-repository"
target="_blank" rel="noreferrer noopener">
Ask Ubuntu :: Remove apt repository?</a>
</li>
</ul>
</html>
<html>
<ul>
<li><pre><code>usb-devices ::
[ … ]
T: Bus=01 Lev=03 Prnt=08 Port=01 Cnt=01 Dev#= 9 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=1395 ProdID=0025 Rev=01.00
S: Manufacturer=Sennheiser Communications
S: Product=Sennheiser USB headset
C: #Ifs= 4 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=snd-usb-audio
I: If#= 1 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
I: If#= 2 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
I: If#= 3 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid
E: Ad=87(I) Atr=03(Int.) MxPS= 4 Ivl=2ms
[ … ]
</code></pre>
</li>
</ul>
</html>
<html>
<ul>
<li><code><pre>
speaker-test -Dsysdefault:Intel -c1 -tsine -l1 -f440
</pre></code>
</li>
<li><code><pre>
paplay /usr/share/sounds/sound-icons/beginning-of-line
</pre></code>
</li>
<li>
Für zusätzliche WAV‐Files folgendes Paket installieren:
<code><pre>
sound‐icons ‐ Sounds for speech enabled applications
</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="http://www.linux-commands-examples.com/speaker-test" target="_blank">Linux Commands Examples :: speaker‐test</a></li>
<li><a href="https://unix.stackexchange.com/questions/1974/how-do-i-make-my-pc-speaker-beep" target="_blank">Unix StackExchange :: How do I make my pc speaker beep</a></li>
<li><a href="http://troubleshooters.com/linux/sound/sound_troubleshooting.htm" target="_blank">Troubleshooters :: Sound</a></li>
</ul>
</html>
<html>
locale
locale -a
sudo apt install language-pack-de
reboot
sudo localectl LANG=de_DE.UTF-8
weitere Befehle (sind noch auszutesten):
loadkeys
dumpkeys
Was bedeutet die Fehlermeldung:
Dateideskriptor, der auf die Konsole verweist, konnte nicht gefunden werden
</html>
<html>
<ul>
<li>automatische Installation von aktuellen Sicherheitsupdates,<br />
um den Rechner auf den laufenden/aktuellen Stand zu hal–<br />
ten, zu haben;
</li>
<li><h3>Befehl:</h3>
<code><pre>unattended‐upgrades</pre></code>
</li>
<li><h3>Konfigurationsfile:</h3>
<code><pre>/etc/apt/apt.conf.d/50unattended‐upgrades</pre></code>
enthält Anweisungen, was aktualisiert werden soll;
</li>
<li><h3>LogFile:</h3>
<code><pre>/var/log/unattended‐upgrades/unattended‐upgrades.log</pre></code>
</li>
<li><h3>Step 1: Update Debian System Packages</h3>
</li>
<li><h3>Step 2: Install Unattended Upgrades Package</h3>
</li>
<li><h3>Step 3: Install Additional Packages for Unattended Upgrades</h3>
</li>
<li><h3>Step 4: Verify Unattended Upgrades Installation</h3>
</li>
<li><h3>Step 5: Understanding Unattended Upgrades Systemd Commands</h3>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://pimylifeup.com/unattended-upgrades-debian-ubuntu/"
target="_blanks" rel="noreferrer noopener">
PimpMyLife Up :: Using Unattended-Upgrades on Debian and Ubuntu</a>
</li>
<li><a href="https://www.linuxcapable.com/how-to-configure-unattended-upgrades-on-debian-linux/"
target="_blanks" rel="noreferrer noopener">
Linux Capable :: How to Configure Unattended Upgrades on Debian 12, 11 or 10</a>
</li>
<!--
<li><a href=""
target="_blanks" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>der Befehl “<code><b>apt</b></code>“ von Ubuntu (bereits 2014) eingeführt;</li>
<br />
<li>APT ist ein gewaltiges Projekt, dessen ursprünglicher Entwurf eine <br />
grafische Schnittstelle vorsah. Es basiert auf einer Bibliothek, die die <br />
Kernanwendung enthält und apt‐get war das erste Frontend ‐ befehls‐<br />
zeilenbasiert ‐ das innerhalb des Projekts entwickelt wurde</li>
<br />
<li>“<code><b>apt</b></code>“ löste “<code><b>apt‐get / apt‐cache</b></code>“ ab, resp. erweiterte es;<br />
apt ist ein zweites Kommandozeilen‐basiertes Frontend von APT, das<br />
einige Designfehler von apt‐get überwindet. </li>
<br />
<li>der Befehl “<code><b>apt</b></code>“ ist <b>_nicht_</b> zu verwechslen mit <b>APT</b>, <br />
dem “Advanced Packaging Tool“;</li>
<br />
<li>→ APT ist das Packaging Tool, um das Packaging‐System<br />
von Debian zu verwalten;</li>
<br />
<li>→ <code><b>apt‐get</b></code> ist ein Command Line‐Tool, um mit APT <br />
arbeiten zu können [<code><b>aptitude</b></code> ist ein weiteres]</li>
<br />
<li>“<code><b>apt‐get</b></code>“ & “<code><b>apt‐cache</b></code>“ haben so viele Features / Optionen, <br />
von denen die meisten im normalen täglichen Betrieb vom <br />
User nicht benötigt werden;</li>
<br />
<li>→ <code><b>apt</b></code> wurde eingeführt, um die am häufigsten benutzten<br />
Features von <code><b>apt‐get</b></code> & <code><b>apt‐cache</b></code> in einem Befehl zu-<br />
sammenzufassen;</li>
<br />
<li>→ <b>in Kürze:</b><br />
<code><b>apt</b></code> :=: most common used command options <br />
from <code><b>apt‐get</b></code> & <code><b>apt‐cache</b></code></li>
<br />
<li><b>Main aim of <code><b>apt</b></code>:</b><br />
to provide an efficient way of handling package<br />
in a way “pleasent for end users“</li>
<br />
<li>it enables a few options by default that is actually <br />
helpful for the end users<br />
<br />
→ z.B.
<ul>
<li>showing a progress bar;</li>
<li>showing the no. of package that can be up-<br />
graded when updating the repo database</li>
</ul></li>
<br />
<li><em><b>!Wichtig!</b></em><br />
apt is <u>not</u> backward compatible with apt‐get;<br />
(Ein einfaches Ersetzen von apt-get durch apt funktioniert nicht);</li>
<br />
<li>apt-get ist <b>nicht</b> deprecated / abgeschafft, da es mehr<br />
Funktionaltitäten als apt zu bieten hat;</li>
<br />
<li><b>Conclusion</b><br />
<ol>
<li>apt ist eine Teilmenge von apt‐get‐ und apt‐cache‐Befehlen,<br />
es stellt notwendige Befehle für das Package‐Management;</li>
<br />
<li>als normaler End‐User ist apt ausreichend, für weitere Funktio‐<br />
nalitäten ist apt‐get bzw. apt‐cache zu verwenden;</li>
</ol></li>
<!--br />
<li></li-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://itsfoss.com/apt-vs-apt-get-difference/" target=_blank rel="noreferrer noopener">ItsFOSS :: Difference Between apt and apt-get Explained</a></li>
<li><a href="https://debian-handbook.info/browse/de-DE/stable/sect.apt-get.html" target=_blank rel="noreferrer noopener">Debian‐Handbook :: Section apt‐get</li>
</ul>
</html>
<html>
Bei der Eingabe von <code><b>sudo apt update</b></code> wurde <br />
folgende Meldung (als letzte Zeile) ausgegeben:<br />
<code><pre>
N: Repository 'http://deb.debian.org/debian bullseye InRelease' changed its 'Version' value from '11.6' to '11.7'
</pre></code>
Grund war, das einige Tage vorher ein Versions‐<br />
wechsel bei der Debian-Verson 11, “<em>Bullseye</em>“ <br />
stattgefunden hatte.<br />
<br />
Um diese Zeile “verschwinden“ zu lassen, ein‐<br />
fach folgenden Befehl eingeben:<br />
<code><pre>
sudo apt update --allow-releaseinfo-change
</pre></code>
dann ist wieder alles sauber :-).
<h3>Links:</h3>
<ul>
<li><a href="https://vitux.com/fixed-n-repository-http-security-debian-org-buster-updates-inrelease-changed-its-version-value-from-to-10/"
target="_blank" rel="noreferrer noopener">
VITUX :: [Fixed] N: Repository 'http://security.debian.org buster/updates InRelease' changed its 'Version' value from “ to '10'</a>
</li>
</ul>
</html>
<html>
<ul>
<li>The Easiest way might be to get the PID of what's listening on port 25:
<pre><code># sudo lsof -i :25
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
master 5664 root 12u IPv4 13732 TCP *:smtp (LISTEN)</code></pre>
</li>
<li>Then find out what that process is:
<pre><code># ps p 5664
PID TTY STAT TIME COMMAND
5664 ? Ss 0:12 /usr/lib/postfix/master</code></pre>
⇒ in this case Postfix is used;
</li>
<li>Postfix config is under /etc/postfix , "sudo" might be necessary
</li>
<li>For sendmail, it looks like this:
<pre><code># lsof -i :25
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
sendmail 3445 root 4u IPv4 12922 TCP localhost.localdomain:smtp (LISTEN)</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://serverfault.com/questions/825059/how-to-determine-which-mail-program-is-running-on-my-server"
target="_blank" rel="noreferrer noopener">
Serverfault :: How to determine which mail program is running on my server</a>
</li>
<li><a href="https://stackoverflow.com/questions/11988454/how-to-check-if-smtp-is-working-from-commandline-linux"
target="_blank" rel="noreferrer noopener">
Stackoverflow :: How to check if SMTP is working from commandline (Linux) [closed]</a>
</li>
<li><a href="https://serverfault.com/questions/100730/identifying-which-mta-is-running"
target="_blank" rel="noreferrer noopener">
Serverfault :: Identifying which MTA is running </a>
</li>
<li><a href="https://unix.stackexchange.com/questions/157880/how-can-i-see-settings-of-the-email-server"
target="_blank" rel="noreferrer noopener">
Unix/Linux Stackexchange :: How can I see settings of the email server?</a>
</li>
</ul>
</html>
<html>
https://wiki.debian.org/Backports
</html>
<html>
<ul>
<li>Tool <b>youtubedl-gui</b>
</li>
</ul>
</html>
<html>
<ul>
<li>das Problem besteht im NICHT-Laden des Modules<br />
rtw88_8822ce … angeblich soll ein Reset der<br />
Karte helfen, aber wie mache ich das ohne den Lap-<br />
top öffnen zu müssen ...
</li>
</ul>
<hr />
<ul>
<li><pre><code>sudo hwinfo --short</code></pre>
⇒ Ausgabe:<br />
u.a. eine Zeile unter <code>network</code>:
<pre><code>network:
Realtek RTL8822CE 802.11ac PCIe Wireless Network Adapter
eno1 Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller</code></pre>
<hr />
<b>Alternativ:</b>
<pre><code>lspci | grep -i real</code></pre>
⇒ Ausgabe:
<pre><code>02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822CE 802.11ac PCIe Wireless Network Adapter</code></pre>
</li>
<li>Überprüfen, ob der Realtek RTL8822CE-Treiber installiert ist:
<pre><code>sudo apt search rtl8822</code></pre>
⇒ Ausgabe:
<pre><code>Sortierung… Fertig
Volltextsuche… Fertig
firmware-realtek/stable,now 20230210-5 all [installiert]
Binary firmware for Realtek wired/wifi/BT adapters</code></pre>
</li>
<li>Überprüfen, ob der Treiber geladen wurde:
<pre><code>sudo lsmod | grep -i rtl88</code></pre>
⇒ Ausgabe: <br />
<em>leere Ausgabe</em>
</li>
<li><pre><code>sudo modinfo rtw88_8822ce</code></pre>
⇒ Ausgabe:
<pre><code>filename: /lib/modules/6.1.0-32-amd64/kernel/drivers/net/wireless/realtek/rtw88/rtw88_8822ce.ko
license: Dual BSD/GPL
description: Realtek 802.11ac wireless 8822ce driver
author: Realtek Corporation
alias: pci:v000010ECd0000C82Fsv*sd*bc*sc*i*
alias: pci:v000010ECd0000C822sv*sd*bc*sc*i*
depends: rtw88_pci,rtw88_8822c
retpoline: Y
intree: Y
name: rtw88_8822ce
vermagic: 6.1.0-32-amd64 SMP preempt mod_unload modversions
sig_id: PKCS#7
signer: Debian Secure Boot CA
sig_key: 32:A0:28:7F:84:1A:03:6F:A3:93:C1:E0:65:C4:3A:E6:B2:42:26:43
sig_hashalgo: sha256
signature: 5F:C8:53:9C:18:2F:F0:5C:8A:B8:05:68:9B:8C:E9:68:25:FD:BA:06:
42:BC:F6:04:5F:9F:56:7C:9F:AC:5E:C2:3B:E5:FB:C0:C6:FB:2F:1F:
B6:6C:1B:38:F7:80:AF:6A:1B:BC:76:5E:CC:49:A6:8D:4F:FB:CD:4D:
97:A3:4F:B9:D0:D2:7C:A3:A2:73:EB:E0:C2:C9:55:73:55:9D:26:C7:
84:29:EA:DA:5F:66:AA:A1:1E:AB:15:23:1F:42:94:47:6A:DE:57:E2:
EA:92:48:01:86:95:BF:4C:19:B7:AC:EB:E6:66:1B:FE:C3:20:4A:73:
DD:CE:BD:B4:3D:DB:A5:1B:4A:87:06:B8:D9:46:29:8E:BB:EE:70:2A:
DC:A9:FE:2A:D4:8A:5F:3F:CA:3B:70:6E:3F:8F:B6:7A:D6:51:9A:4F:
EC:A1:62:C9:25:92:9F:AB:7C:B3:BB:0E:44:F7:6B:1F:7B:E1:4D:77:
97:7D:1A:61:2A:F8:5A:DE:DA:68:13:28:4E:CA:07:C4:E6:5D:C8:02:
63:E7:B8:D0:7E:8F:E4:BC:23:3D:5A:D3:22:09:80:B8:63:69:B7:E0:
EE:0E:A0:63:FE:C0:4B:16:49:7D:38:2F:54:FC:3A:BB:05:CF:94:64:
F2:56:21:BB:CA:66:0E:B0:FE:26:3B:C2:B4:DF:31:DF</code></pre>
</li>
<li><pre><code></code></pre>
</li>
<li><pre><code></code></pre>
</li>
<li><pre><code></code></pre>
</li>
<li><pre><code></code></pre>
</li>
<li><pre><code>sudo nmcli c[onnection]</code></pre>
</li>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://idroot.us/install-realtek-wifi-drivers-debian-12/"
target="_blank" rel="noreferrer noopener">
idoort :: How To Install Realtek Wifi Drivers on Debian 12 </a>
</li>
</ul>
</html>
<html>
Die folgenden Zeilen gehen auf das Paket <code><b>needrestart</b></code> zurück:
<code><pre>
…
Prüfe Prozesse...
Prüfe Linux-Kernel...
Der laufende Kernel ist aktuell.
Fehler beim Ermitteln von verfügbaren Prozessor Mikrocode-Upgrades.
Es müssen keine Dienste neugestartet werden.
Es müssen keine Container neu gestartet werden.
Es gibt keine Nutzer-Sitzungen mit veralteten Prozessen.
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://packages.debian.org/search?searchon=names&exact=1&suite=all§ion=all&keywords=needrestart" target=_blank>Debian :: Package “needrestart“</a></li>
<li><a href="https://debianforum.de/forum/viewtopic.php?t=171459#p1190404" target=_blank>debianforum.de :: Buster: Fehler beim Ermitteln von verfügbaren Prozessor Mikrocode-Upgrades</a></li>
</ul>
</html>
<html>
<ul>
<li>Befehl: <pre><code>lscpi -k</code></pre>
</li>
<li>⇒ Ausgabe:
<pre><code>03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822CE 802.11ac PCIe Wireless Network Adapter
DeviceName: WLAN
Subsystem: Hewlett-Packard Company RTL8822CE 802.11ac PCIe Wireless Network Adapter
Kernel driver in use: rtw_8822ce
Kernel modules: rtw88_8822ce
</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.archlinux.org/title/Wireless_network_configuration"
target="_blank" rel="noreferrer noopener">
ArchLinux - Wiki :: Network configuration/Wireless</a>
</li>
</ul>
</html>
<html>
The following logs are related to apt upgrades:
<code><pre>
/var/log/apt/history.log
/var/log/apt/term.log
/var/log/dpkg.log
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://askubuntu.com/questions/222587/how-to-check-apt-get-upgrade-status-after-losing-ssh-connection"
target="_blank" rel="noreferrer noopener">
Ask Ubuntu :: How to check "apt-get upgrade" status after losing ssh connection?</a>
</li>
</ul>
</html>
<html>
<code><pre>
W: GPG-Fehler: https://packages.cloud.google.com/apt kubernetes-xenial InRelease: Die folgenden Signaturen konnten nicht überprüft werden, weil ihr öffentlicher Schlüssel nicht verfügbar ist: NO_PUBKEY B53DC80D13EDEF05
E: Das Depot “https://apt.kubernetes.io kubernetes-xenial InRelease“ ist nicht signiert.
</pre></code>
→ der Key resp. das Key-file (apt.gpg) ist nicht mehr im Verzeichnis /etc/apt/trusted.gpg.d vorhanden<br />
→ im Verzeichnis <code><b>/etc/apt/sources.list.d</b></code> befindet sich eine Datei <code><b>kubernetes.list</b></code><br />
→ in diesem File befindet sich folgender Eintrag:
<code><pre>
deb https://apt.kubernetes.io/ kubernetes-xenial main
</pre></code>
</html>
<html>
<ul>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://askubuntu.com/questions/91543/apt-get-update-fails-to-fetch-files-temporary-failure-resolving-error"
target="_blank" rel="noreferrer noopener">
Ask Ubuntu :: apt-get update fails to fetch files, “Temporary failure resolving …” error</a>
</li>
</ul>
</html>
<html>
<ul>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://askubuntu.com/questions/1181852/why-are-upgradable-packages-not-upgraded"
target="_blank" rel="noreferrer noopener">
ask Ubuntu :: Why are upgradable packages not upgraded?</a>
</li>
<li><a href="https://superuser.com/questions/1107334/apt-says-packages-have-been-kept-back-what-to-do"
target="_blank" rel="noreferrer noopener">
SuperUser :: apt says packages have been kept back, what to do?</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>Syntax:
<code><pre>
apt-cache [Optionen] befehl
apt-cache [Optionen] show paket1 [paket2 ...]
</pre></code>
</li>
<li>
apt-cache ermöglicht die Abfrage und Anzeige verfügbarer Informationen über
installierte und installierbare Pakete. Es arbeitet ausschließlich mit den
Daten, die über den “update“-Befehl in den lokalen Zwischenspeicher geladen
wurden, z.B. durch apt-get. Die angezeigten Informationen können daher
veraltet sein, wenn der letzte Aktualisierungsvorgang schon länger her ist,
aber dafür funktioniert es unabhängig von der Verfügbarkeit der konfigurierten
Paketquellen (z.B. kann es auch offline arbeiten).
</li>
<br />
<li>Meist verwendete Befehle:
<ul>
<li> showsrc - Aufzeichnungen zu Quellen ausgeben</li>
<li> search - die Paketliste mittels regulärem Ausdruck durchsuchen</li>
<li> depends - rohe Abhängigkeitsinformationen eines Pakets ausgeben</li>
<li> rdepends - umgekehrte Abhängigkeitsinformationen eines Pakets ausgeben</li>
<li> show - einen lesbaren Datensatz für das Paket ausgeben</li>
<li> pkgnames - die Namen aller Pakete im System auflisten</li>
<li> policy - Policy-Einstellungen ausgeben</li>
</ul>
<br />
<li>Lesen Sie apt-cache(8) bezüglich weiterer Informationen über die verfügbaren Befehle.
Konfigurationsoptionen und Syntax sind in apt.conf(5) detailliert beschrieben.
Informationen dazu, wie Quellen konfiguriert werden, finden Sie in sources.list(5).
</li>
<br />
<li>
Paket- und Versionsauswahlen können über apt_preferences(5) festgelegt werden.
Details zu Sicherheitsbelangen sind in apt-secure(8) zu finden.
</li>
</ul>
</html>
<html>
<style>
marked {
font-family: Consolas; "courier new";
font-size: 95%;
color: red;
background-color: #f1f1f1;
padding; 2px;
}
</style>
<ul>
<li>ab <b>Ubuntu 22.04</b> funktioniert die Methode mit apt‐key <b>NICHT</b> mehr. <br />
<em>{Was ist mit Debian? → AFAIK mit Debian 11, “Bullseye“ ebenfalls deprecated}</em>
</li>
</ul>
<h3>Befehlsoptionen:</h3>
Für <em><b>Key</b></em> reicht die Angabe der letzten beiden Tupels, mit Entfernen des Blanks:<br />
<br />
<marked><b>54A6 47F9 048D 5688 D7DA 2ABE 6A03 0B21 BA07 F4FB</marked></b><br />
⇒ <marked><b>BA07F4FB</b></marked><br />
<ul>
<li><b>DEPRECATED</b> Schlüssel hinzufügen;
<code><pre>sudo apt‐key <b>add</b></pre></code>
</li>
<li>Vertrauenswürdige Schlüssel mit Fingerabdrücken auflisten:
<code><pre>sudo apt‐key <b>list</b></pre></code>
</li>
<li>Einen Schlüssel aus der Liste der vertrauenswürdigen Schlüssel entfernen / löschen:
<code><pre>sudo apt‐key <b>del <em>Key</em></b></pre></code>
</li>
<li>Den Schlüssel <em>Key</em> auf der Standardausgabe ausgeben:
<code><pre>sudo apt‐key <b>export <em>Key</em></b></pre></code>
</li>
<li>Alle vertrauenswürdigen Schlüssel auf der Standardausgabe ausgeben:
<code><pre>sudo apt‐key <b>exportall</b></pre></code>
</li>
<!--
<li></li>
<li></li>
-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.ubuntuusers.de/apt/Schl%C3%BCsselverwaltung/"
target="_blank" rel="noreferrer noopener">
Ubuntu‐Users :: Wiki ‐ Schlüsselverwaltung</a>
</li>
<li><a href="https://debianforum.de/forum/viewtopic.php?t=150943"
target="_blank" rel="noreferrer noopener">
Debian Forum :: apt-Fehlermeldung</a>
</li>
<li><a href="https://wiki.ubuntuusers.de/Paketverwaltung/Problembehebung/#Ungueltige-Signatur-von-Paketquellen"
target="_blank" rel="noreferrer noopener">
Ubuntu-Users :: Wiki ‐ Ungültige Signatur von Paketquellen</a>
</li>
<li><a href="https://itsfoss.com/apt-key-deprecated/"
target="_blank" rel="noreferrer noopener">
IT'FOSS :: apt‐key deprecated</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>Verwendung: <code><pre>apt‐listchanges [Optionen] {‐‐apt | Dateiname.deb …}</pre></code></li>
<br />
<li>zeigt neue Changelog‐Einträge von Debian‐Paketarchiven.</li>
<br />
<li><p>apt‐listchanges ist ein Werkzeug, das zeigt, was in einer neuen Version eines Debian‐Pakets verglichen mit der
derzeit auf dem System installierten Version geändert wurde.
</p>
<p>
Es tut dies, indem es die relevanten Einträge aus den beiden Dateien NEWS.Debian und changelog[.Debian]
extrahiert. Sie sind normalerweise in den Debian‐Paketarchiven in /usr/share/doc/Paket zu finden.
</p>
<p>
Please note that in the default installation if apt-listchanges is run during upgrades as an APT plugin, it
displays NEWS.Debian entries only. This can be changed with the ‐‐which option.
</p>
<p>
If changelog entries are displayed and the package does not contain changelog[.Debian] file, apt‐listchanges calls
apt‐get changelog command to download the changelog from network. This behavior can be disabled with the
‐‐no‐network option.
</p>
<p>
Mit einer angegebenen Zusammenstellung von Dateinamen als Argument (oder von APT mittels ‐‐apt gelesen) wird
apt‐listchanges die Dateien (unter der Annahme, dass es sich um Debian‐Paketarchive handelt) nach den maßgeblichen
Changelog‐Einträgen durchsuchen und sie alle in einer nach Quellpaketen gruppierten Zusammenstellung anzeigen. Die
Gruppen werden nach der maximalen Dringlichkeit und dann nach dem Paketnamen sortiert. Änderungen innerhalb jeder
Paketgruppe werden in der Reihenfolge ihres Erscheinens in den Changelog‐Dateien angezeigt, d.h. beginnend mit dem
Neusten bis zum Ältesten. Die Option ‐‐reverse kann zum Ändern dieser Reihenfolge benutzt werden.
</li>
</ul>
</html>
<html>
<ul>
<li>Syntax:
<code><pre>
apt‐mark [Optionen] {auto|manual} paket1 [paket2 ...]
</pre></code>
</li><br />
<li><code><b>apt‐mark</b></code> ist ein einfaches Befehlszeilenprogramm, um Pakete zu markieren,<br />
ob sie aktualisiert (“unhold“ werden sollen oder nicht (“hold“).. Es kann auch <br />
verwendet werden, um den von dpkg(1) gesetzten Auswahlstatus von Paketen<br />
zu verändern oder alle Pakete aufzulisten, die eine bestimmte Markierung<br />
haben oder nicht haben.
</li><br />
<li>
Meist verwendete Befehle:
<table>
<tr><td> <b>auto</b> </td><td> das angegebene Paket als “Automatisch installiert“ markieren</td></tr>
<tr><td> <b>manual</b> </td><td> das angegebene Paket als “Manuell installiert“ markieren</td></tr>
<tr><td> <b>minimize-manual</b> </td><td> Mark all dependencies of meta packages as automatically installed.</td></tr>
<tr><td> <b>hold</b> </td><td> ein Paket als zurückgehalten markieren</td></tr>
<tr><td> <b>unhold</b> </td><td> ein Paket als nicht mehr zurückgehalten markieren</td></tr>
<tr><td> <b>showauto</b> </td><td> eine Liste aller automatisch installierten Pakete anzeigen</td></tr>
<tr><td> <b>showmanual</b> </td><td> eine Liste aller manuell installierten Pakete anzeigen</td></tr>
<tr><td> <b>showhold</b> </td><td> eine Liste aller zurückgehaltenen Pakete anzeigen</td></tr>
</table>
</li><br />
<li>Beispiel:
<code><pre>apt-mark hold kubelet kubeadm kubectl</pre></code>
Die Pakete sollen nicht aktualisiert werden
</li><br />
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.andysblog.de/debian-pakete-beim-upgrade-zurueckhalten" target=_blank>Andys Blog :: Debian‐Pakete beim Upgrade zurückhalten</a></li>
</ul>
</html>
<html>
<ul>
<li><h3>Aufgabe:</h3>
APT transport zum Download über das HTTP Secure‐Protokoll (HTTPS)
</li>
<h3>Links:</h3>
<ul>
<li><a href="https://manpages.ubuntu.com/manpages/bionic/man1/apt-transport-https.1.html" target="_blank" rel="noreferrer noopener">Ubuntu ‐ Manpages</a></li>
<li><a href="https://packages.debian.org/buster/apt-transport-https" target="_blank" rel="noreferrer noopener">Debian ‐ Manpages</a></li>
</ul>
</html>
<html>
<meta DISASSOC_DUE_TO_INACTIVITY/>
<ul>
<li>durchgeführt am 2024-07-15:
</li>
<li>Fehlermeldung aus dmesg:
<pre><code>deauthenticated from 30:b1:b5:3b:77:bf (Reason: 4=DISASSOC_DUE_TO_INACTIVITY)</code></pre>
</li>
<li>https://stackoverflow.com/questions/34645072/hostapd-repeating-deauthenticated-due-to-local-deauth-request<br />
<code>Answering the question I put a bounty on... for me it turned out to be a <br />
lack of entropy, cat /proc/sys/kernel/random/entropy_avail gave 156 <br />
while it should be >2000. Installing haveged (apt-get install haveged) <br />
solved the issue for me, entropy always >2k, and link has been up and <br />
running for a full day now.</code>
</li>
<li>Abschnitt "Description" aus "sudo apt info haveged:<br />
<code>Description: Linux-Entropiequelle, realisiert mit dem Algorithmus HAVEGE<br />
haveged ist ein Userspace-Daemon zur Bereitstellung von Entropie. Er hängt<br />
nicht von den Standardmechanismen zur »Ernte« von Zufälligkeit zur Füllung<br />
des System-Entropiepools ab. Das ist wichtig für Systeme mit hohen<br />
Entropieanforderungen oder beschränkter Benutzerinteraktion (z.B.<br />
Server ohne Anzeigegeräte [headless]).<br />
<br />
haveged verwendet HAVEGE (Hardware Volatile Entropy Gathering und Expansion)<br />
zur Wartung eines 1M großen Pools von zufälligen Bytes, um /dev/random zu<br />
füllen, wenn die Versorgung mit zufälligen Bits in /dev/random unter die<br />
untere Schranke des Geräts fällt.<br />
<br />
Weitere Informationen über HAVEGE finden Sie unter<br />
http://www.irisa.fr/caps/projects/hipsor/</code>
</li>
<li>Meldung aus dmesg:<br />
<code>[Mo Jul 15 11:02:59 2024] audit: type=1400 audit(1721034180.725:33): apparmor="STATUS" operation="profile_load" \<br />
  profile="unconfined" name="/usr/sbin/haveged" pid=281698 comm="apparmor_parser</code>
</li>
<li>2024-07-16:<br />
bis jetzt überhaupt keine Verbesserung, die Meldung "DISASSOC_DUE_TO_INACTIVITY"<br />
kommt immer noch<br />
</li>
<li>2024-07-21:<br />
auf der Seite <a href="https://openwrt.org/faq/deauthenticated_due_to_inactivity"
target="_blank" rel="noreferrer noopener">https://openwrt.org/faq/deauthenticated_due_to_inactivity</a><br />
folgende Lösungsmöglichkeit gefunden:
<table border="1">
<tr>
<td><pre><code>Root cause:
Solution:
•/etc/config/wireless
• → @ config wifi-iface
• → add option disassoc_low_ack '0'</code></pre>
</td>
</tr>
</table>
⇒ unter Debian gibt es kein Verzeichnis /etc/config
</li>
</ul>
</html>
<html>
<ul>
<li>try to add following into your kernel params
<pre><code>rtw88_pci.disable_aspm=true rtw88_core.lps_deep_mode=0</code></pre>
see <a href="https://bbs.archlinux.org/viewtopic.php?id=266359"
target="_blank" rel="noreferrer noopener">
https://bbs.archlinux.org/viewtopic.php?id=266359</a>
</li>
<li><b>2024-07-17</b><br />
<ul>
<li>Kernel-Parameter anzeigen lassen:
<pre><code>cat /proc/cmdline</code></pre>
</li>
<li>Kernel-Parameter wurden angepasst, aber die Meldung<br />
</li>bleibt … <br />
<ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://github.com/sebanc/brunch/issues/855"
target="_blank" rel="noreferrer noopener">
Sebanc ::. [Wi-Fi] rtw88: timed out to flush queue #855 [GitHub]</a>
</li>
</ul>
</html>
<html>
<ul>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
</ul>
</html>
<html>
<meta usb />
<ul>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
</ul>
</html>
<html>
<ul>
<li>This is a bug in Debian tracked here #790955 "localectl list-keymaps : <br />
Couldn't find any console keymaps" [Stand: 03/2024]
</li>
<li>Found a possible fix at <a href="www.claudiokuenzler.com"
target="_blank" rel="noreferrer noopener">
www.claudiokuenzler.com</a>
</li>
<li>In short:
<ul>
<li>Download the latest keymaps from <a href="https://mirrors.edge.kernel.org/pub/linux/utils/kbd"
target="_blank" rel="noreferrer noopener">
kbd upstream project</a> <br />
(<code>https://mirrors.edge.kernel.org/pub/linux/utils/kbd</code>)
</li>
<br />
<li>Extract the .tar file (e.g, <code>tar xzf kbd-x.y.z.tar.gz</code>)
</li>
<br />
<li>Copy the Keymaps folder (or it's content) to <code>/usr/share/keymaps/</code> <br />
(<code><em>cp -Rp kbd-x.y.z/data/keymaps/* /usr/share/keymaps/</em></code>)
</li>
<br />
<li>run again to verify <code>localectl list-keymaps</code>
</li>
<br />
<li>[leider wurde nicht das Gewünschte angezeigt<br />
⇒ habe dann den Befehl
<pre><code>sudo loadkeys de-latin1-nodeadkeys</code></pre>
eingegeben, und siehe da … alles wie gewünscht! ]
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://unix.stackexchange.com/questions/669736/localectl-failed-to-read-list-of-keymaps-no-such-file-or-directory"
target="_blank" rel="noreferrer noopener">
Unix - Stackexchange :: localectl: Failed to read list of keymaps: No such file or directory</a>
</li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://webmanagement.berlin/janual/os/linux/debian/snap-pakete-unter-debian-verwalten" target="_blank" rel="noreferrer noopener">
Webmanagement Berlin :: Snap‐Pakete unter Debian verwalten</a></li>
<li><a href="https://www.how2shout.com/linux/how-to-install-snap-snap-store-on-debian-11-bullseye-linux/" target="_blank" rel="noreferrer noopener">
Linux Shout :: How to install Snap & Snap‐store on Debian 11 Bullseye Linux </a></li>
</ul>
</html>
<html>
<ul>
<li>Kommando-Zeilenprogramm</li>
<li>wichtiges Tool zur Interaktion mit <b>systemd</b></li>
<li>i.d.R. werden root-Rechte benötigt, aber <br />
für Diagnose-Aufrufe können auch normale<br />
User ihn (eingeschränkt) aufrufen</li>
<li><h3>Reboot system:</h3>
<code><pre>
sudo systemctl reboot
</pre></code>
</li>
<li><h3>To get into default mode:</h3>
<code><pre>
sudo systemctl default
</pre></code>
</li>
<li><h3>To start the service:</h3>
<code><pre>
sudo systemctl start <em>SERVICE‐NAME</em>
</pre></code>
</li>
<li><h3>To stop the service:</h3>
<code><pre>
sudo systemctl stop <em>SERVICE‐NAME</em>
</pre></code>
</li>
<li><h3>To enable on boot the service:</h3>
<code><pre>
sudo systemctl enable <em>SERVICE‐NAME</em>
</pre></code>
</li>
<li><h3>To disable on boot the service:</h3>
<code><pre>
sudo systemctl disable <em>SERVICE‐NAME</em>
</pre></code>
</li>
<li><h3>To restart on the services:</h3>
<code><pre>
sudo systemctl restart <em>SERVICE‐NAME</em>
</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.linuxcapable.com/how-to-enable-configure-unattended-upgrades-on-debian-11/" target="_blank" rel="noreferrer noopener">
LinuxCapable :: How to enable & configure unattended‐upgrades on Debian 11</a></li>
</ul>
</html>
<html>
<meta dmesg Meldung />
<ul>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://stackoverflow.com/questions/42954020/marking-loadable-kernel-module-as-in-tree"
target="_blank" rel="noreferrer noopener">
StackOverflow :: Marking loadable kernel module as in-tree</a>
</li>
<li><a href="https://hatchjs.com/loading-out-of-tree-module-taints-kernel/"
target="_blank" rel="noreferrer noopener">
HatchJs.com :: How to Avoid Tainting Your Kernel When Loading Out-of-Tree Modules</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li><h3>… und zwar mit einem anderen User als <em>root</em>:</h3>
<code><pre>
sudo mount ‐t vfat ‐o utf8,umask=007,uid=1000,gid=1000 /dev/sdc /media/mueller/INT-256GB
sudo mount ‐t vfat ‐o utf8,umask=007,uid=1000,gid=1000 /dev/sdc /media/mueller/INT-256GB
</pre></code></li>
<li><h3>Eintrag in File /etc/fstab:</h3>
<code><pre>
/dev/sdc /media/mueller/INT-256GB vfat utf8,umask=007,uid=1000,gid=1000 0 0
/dev/sdc /media/mueller/INT-256GB vfat utf8,umask=007,uid=1000,gid=1000 0 0
</pre></code></li>
</ul>
</html>
<html>
For thos who are not familiar with <br />
awk, but still want a quick and easy <br />
way of removing blank lines from a <br />
flat ascii file, remember that the <br />
use of 'cat' in conjuction with <br />
'grep' is just as effective.<br />
<br /><code>
cat file1 | grep -v '^$' >file2<br />
mv -f file2 file1<br />
</code>
<br />
This tip generously supported by: <br />
dave_tomkins@tands.co.uk<br />
</html>
<html>
<p>
They describe the interactions and relationships among data <br />
structures. Understanding these relationships, how they're <br />
structured, what they emphasize and what they try to ignore<br />
is the point of design patterns.
</p>
<p>It's the code isn't the point; the ideas,
relationships, and ab‐<br />
stractions are the point.
</p>
<ul>
<li><h4>Singleton Pattern</h4></li>
<li><h4>Factory Pattern</h4></li>
<!--li></li>
<li></li>
<li></li>
<li></li-->
</ul>
<h3>Links:</h3>
<ul>
<li>PDF-File "[Better developers] Design patterns_2020-09-21.pdf"</li>
<!--li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li-->
</ul>
</html>
<html>
<table>
<tr><td>A ‐ Augsburg</td><td>O - Oldenburg</td></tr>
<tr><td>Ä ‐ Umlaut-A</td><td>Ö - Umlaut-O</td></tr>
<tr><td>B ‐ Berlin</td><td> P - Potsdam</td></tr>
<tr><td>C ‐ Cottbus</td><td>Q - Quickborn</td></tr>
<tr><td>Ch ‐ Chemnitz</td><td>R- Regensburg</td></tr>
<tr><td>D ‐ Düsseldorf</td><td>S - Stuttgart</td></tr>
<tr><td>E ‐ Essen</td><td>ß - Eszett</td></tr>
<tr><td>F ‐ Frankfurt</td><td>Sch - Schwerin</td></tr>
<tr><td>G ‐ Görlitz</td><td>T - Tübingen</td></tr>
<tr><td>H ‐ Hannover</td><td>U - Unna</td></tr>
<tr><td>I ‐ Iserlohn</td><td>Ü - Umlaut-U</td></tr>
<tr><td>J ‐ Jena</td><td>V - Vogtland</td></tr>
<tr><td>K ‐ Köln</td><td>W - Wuppertal</td></tr>
<tr><td>L ‐ Leipzig</td><td>X - Xanten</td></tr>
<tr><td>M ‐ München</td><td>Y - Ypsilon</td></tr>
<tr><td>N ‐ Nürnberg</td><td>Z - Zwickau</td></tr>
</table>
</html>
<html>
<table>
<tr><td><b>Bundeskanzler/-in:</b></td><td> Olaf Scholz</td></tr>
<tr><td><b>Wirtschaftsminister/-in:</b></td><td> Robert Habeck</td></tr>
<tr><td><b>Finanzminister/-in:</b></td><td> Christian Lindner</td></tr>
<tr><td><b>Innenminister/-in:</b></td><td> Nancy Faeser</td></tr>
<tr><td><b>Auswärtiges Amt: </b></td><td> Annalena Baerbock</td></tr>
<tr><td><b>Justizminister/-in:</b> </td><td>Marco Buschmann</td></tr>
<tr><td><b>Arbeitsminister/-in:</b></td><td> Hubert Heil</td></tr>
<tr><td><b>Verteidigungsminister/-in: </b> </td><td>(1) Christine Lambrech <em>(bis 19.01.2023)</em><br />
(2) Boris Pistorius <em>(ab 19.01.2023)</em></td></tr>
<tr><td><b>Landwirtschaftsminister/-in:</b></td><td> Cem Özdemir</td></tr>
<tr><td><b>Familienminister/-in:</b></td><td>(1) Anne Spiegel <em>(bis 25.04.2022)</em><br />
(2) Lisa Paus <em>(ab 25.04.2022)</em></td></tr>
<tr><td><b>Gesundheitsminister/-in:</b></td><td>Karl Lauterbach</td></tr>
<tr><td><b>Verkehrsminister/-in:</b></td><td>Volker Wissing</td></tr>
<tr><td><b>Umweltschutzminister/-in:</b></td><td>Steffi Lemke</td></tr>
<tr><td><b>Bildungsminister/-in:</b></td><td>Bettina Stark‐Watzinger</td></tr>
<tr><td><b>Entwicklungsminister/-in:</b></td><td>Svenja Schulze</td></tr>
<tr><td><b>Wohnungsbauminister/-in:</b></td><td>Klara Geywitz</td></tr>
<tr><td><b>Bundesminister/-in für<br /> besondere Aufgaben:</b></td><td>Wolfgang Schmidt</td></tr>
</table>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Kabinett_Scholz"
target="_blank" rel="noreferrer noopener">
Wikipedia :: Bundesregierung ‐ Kabinett Scholz</a>
</li>
</ul>
</html>
<html>
<table>
<tr><th>Deutsche Bezeichnungen</th><th>Lateinisch‐deutsche<br />Bezeichnungen</th><th>Beispiele</th></tr>
<tr><td>Namenwort, Nennwort </td><td>Nomen</td><td> </td></tr>
<tr><td>Hauptwort, Dingwort, Namenwort, <br />
Nennwort, Gegenstandswort (im weiten Sinn) </td><td>Substantiv(um), Nomen </td><td>Baum, Kindheit, Haus </td></tr>
<tr><td>Eigenschaftswort, Beiwort, Wiewort </td><td>Adjektiv(um), selten: Qualitativ </td><td>groß, schneller, grün</td></tr>
<tr><td>Geschlechtswort, Begleiter </td><td>Artikel </td><td>der, ein</td></tr>
<tr><td>Fürwort
<ul>
<li>persönliches</li>
<li>rückbezügliches</li>
<li>unbestimmtes Fürwort</li>
</ul>
</td><td>
Pronomen
<ul>
<li>Personalpronomen</li>
<li>Reflexivpronomen</li>
<li>Indefinitpronomen</li>
</ul>
</td><td>
<ul>
<li>ich</li>
<li>sich</li>
<li>jemand</li>
</ul>
</td></tr>
<tr><td>Zahlwort </td><td>Numerale </td><td>drei, dritter</td></tr>
<tr><td>Zeitwort, <br />
Tätigkeitswort, <br /> Tu(n)wort (in der Grundschule) </td><td>Verb(um) </td><td>gehen, fragen, liegen </td></tr>
<tr><td>Bindewort, Fügewort </td><td>Konjunktion / Subjunktion / Junktion </td><td>weil, und </td></tr>
<tr><td>Verhältniswort, Vorwort, Lagewort </td><td>Präposition, Adposition </td><td>auf, in, mit, von </td></tr>
<tr><td>Umstandswort, Nebenwort </td><td>Adverb(ium) </td><td>gestern, hier</td></tr>
<tr><td>Ausrufewort, Empfindungswort </td><td>Interjektion </td><td>aua, pfui</td></tr>
</table>
<h3>Link:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Grammatikbegriffe_im_Deutschen#Wortarten" target="_blank" rel="noreferrer noopener">Wikipedia :: Grammatikbegriffe in der Deutschen Sprache</a></li>
<li><a href="https://de.wikipedia.org/wiki/Wortart#%C3%9Cberblick_2" target="_blank" rel="noreferrer noopener">Wikipedia :: Wortarten ‐ Überblick</a></li>
</ul>
</html>
<html>
<ul>
<li>auf dem vagrant-Server "ctrlnode" im Verzeichnis<br />
<pre><code>/home/mueller/heiseKurs</code></pre>
angelegt;
</li>
<li>auf dem Server muss als Voraussetzung ein<br />
Virtualisierer (Docker, KVM, Virtualbox o.a.) <br />
installiert sein;
</li>
<li>ich habe mich für Docker (à la Linux-Techi [2])<br />
entschieden;
</li>
</ul>
<h3>1. Enable Official Docker Repository</h3>
<ul>
<li>Enable docker official repository:
<pre><code>sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo</code></pre>
<pre><code>sudo dnf repolist</code></pre>
</li>
</ul>
<h3>2. Install Docker CE (Community Edition)</h3>
<ul>
<li><pre><code>sudo dnf install docker-ce docker-ce-cli containerd.io -y</code></pre>
</li>
</ul>
<h3>3. Configuration of Docker</h3>
<ul>
<li><pre><code>sudo systemctl start docker</code></pre>
</li>
<li>[<em>lt. Anleitung soll noch ein weiterer systemctl<br />
Befehl eingegeben werden, aber welcher?</em>]
</li>
<li><pre><code>sudo usermod -aG docker $USER</code></pre>
</li>
<li><pre><code>newgrp docker</code></pre>
</li>
</ul>
<h3>4. Download & Installation <em>kubectl</em></h3>
<ul>
<li>Download <code><b>kubectl</b></code>:
<pre><code>curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"</code></pre>
</li>
<li><code><b>kubectl</b></code> "bereitstellen":
<pre><code>sudo cp kubectl /usr/local/bin/ && sudo chmod +x /usr/local/bin/kubectl</code></pre>
</li>
<li><code><b>kubectl</b></code>–Version ermitteln:
<pre><code>kubectl version --client</code></pre>
</li>
</ul>
<h3>5. Download & Installation von <em>Minikube</em></h3>
<ul>
<li>Download <code><b>kubectl</b></code>:
<pre><code>curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64</code></pre>
</li>
<li><code><b>Minkube</b></code> "bereitstellen":
<pre><code>sudo install minikube-linux-amd64 /usr/local/bin/minikube</code></pre>
</li>
</ul>
<h3>6. Minikube mit dem Visualisierer "Docker" starten</h3>
<ul>
<li><pre><code>minikube start --driver=docker
😄 minikube v1.35.0 on Almalinux 9.5 (vbox/amd64)
✨ Using the docker driver based on user configuration
📌 Using Docker driver with root privileges
👍 Starting "minikube" primary control-plane node in "minikube" cluster
🚜 Pulling base image v0.0.46 ...
💾 Downloading Kubernetes v1.32.0 preload ...
> gcr.io/k8s-minikube/kicbase...: 500.31 MiB / 500.31 MiB 100.00% 21.04 M
> preloaded-images-k8s-v18-v1...: 333.57 MiB / 333.57 MiB 100.00% 12.31 M
🔥 Creating docker container (CPUs=2, Memory=2200MB) ...
🐳 Preparing Kubernetes v1.32.0 on Docker 27.4.1 ...
▪ Generating certificates and keys ...
▪ Booting up control plane ...
▪ Configuring RBAC rules ...
🔗 Configuring bridge CNI (Container Networking Interface) ...
🔎 Verifying Kubernetes components...
▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟 Enabled addons: storage-provisioner, default-storageclass
🏄 Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default</code></pre>
[<em>das kann ein bischen dauern … </em>]
</li>
<br />
<li>den Status & die IP-Adresse von Minikube ausgeben:
<pre><code>minikube status
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured</code></pre>
<pre><code>minikube ip
192.168.49.2</code></pre>
</li>
</ul>
<h3>7. Minikube stoppen</h3>
<ul>
<li><pre><code>minikube stop
✋ Stopping node "minikube" ...
🛑 Powering off "minikube" via SSH ...
🛑 1 node stopped.</code></pre>
</li>
</ul>
<h3>Fehlermeldung "The connection to the server localhost:8080 was refused - did you specify the right host or port?"</h3>
<ul>
<li>wenn Minikube gestoppt worden ist (s. vorheriger<br />
Schritt), dann das File
<pre><code>~/.kube/config</code></pre>
löschen;
</li>
<li>dann Minikube wieder starten:
<pre><code>minikube start</code></pre>
</li>
</ul>
<h3>8. Infos zum Kubernetes-Cluster ausgeben</h3>
<ul>
<li><pre><code>kubectl cluster-info</code></pre>
</li>
<li><pre><code>$ kubectl get nodes</code></pre>
</li>
</ul>
<h3>9. ab hier weitermachen</h3>
[2] Step 5) Test and Verify Kubernetes Cluster
<h3>Links:</h3>
<ul>
<li>[1] <a href="https://idroot.us/install-minikube-almalinux-9/"
target="_blank" rel="noreferrer noopener">
idroot :: How To Install Minikube on AlmaLinux 9 </a>
</li>
<li>[2] <a href="https://www.linuxtechi.com/install-minikube-on-rhel-rockylinux-almalinux/"
target="_blank" rel="noreferrer noopener">
Linux-Techi :: How to Install MiniKube on RHEL 8/Rocky Linux 8/AlmaLinux 8</a>
</li>
<li>[3] <a href="https://stackoverflow.com/questions/55934322/kubectl-cannot-detect-localhost8080-with-minikube-locally"
target="_blank" rel="noreferrer noopener">
StackOverflow :: kubectl cannot detect localhost:8080 with minikube locally
</li>
</ul>
</html>
<html>
<ul>
<li>Previously named OpenTF
</li>
<li>OpenTofu is a fork of Terraform
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://opentofu.org"
target="_blank" rel="noreferrer noopener">
OpenTofu :: Homepage
</li>
</ul>
</html>
<html>
<ul>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.talos.dev/v1.8/talos-guides/install/local-platforms/virtualbox/"
target="_blank" rel="noreferrer noopener">
Talos Linux :: VirtualBox - Creating Talos Kubernetes cluster using VurtualBox VMs. </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://tools.uniget.dev/"
target="_blank" rel="noreferrer noopener">
Tool “uniget“ – Homepage</a>
</li>
<li><a href="https://docs.uniget.dev/"
target="_blank" rel="noreferrer noopener">
Tool “uniget“ – Docs</a>
</li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li>
<a href="https://www.weiss-system.de/was-ist-jsonnet/"
target="_blank" rel="noreferrer noopener">
Weiss Systemtechnik :: Was ist Jsonnet?</a>
</li>
<li>
<a href="https://learnxinyminutes.com/docs/jsonnet/"
target="_blank" rel="noreferrer noopener">
Learn X in Y minutes :: Where X=jsonnet</a>
</li>
<!--
<li>
<a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://medium.com/@munza/local-kubernetes-with-kind-helm-dashboard-41152e4b3b3d" target="_blank" rel="noreferrer noopener">Medium.com :: Local kubernetes with kind, helm & dashboard</a></li>
<li><a href="https://itnext.io/starting-local-kubernetes-using-kind-and-docker-c6089acfc1c0?gi=b882c078f97f" target="_blank" rel="noreferrer noopener">ITnext :: Starting local Kubernetes using Kind and Docker</a></li>
<li><a href="https://community.datastax.com/questions/5369/how-do-i-setup-kind-on-ubuntu-to-run-the-kubernete.html" target="_blank" rel="noreferrer noopener">Datastax.com :: How do I setup kind on Ubuntu to run Kubernetes</a></li>
<li><a href="https://www.baeldung.com/ops/kubernetes-kind" target="_blank" rel="noreferrer noopener">Baeldung :: Kubernetes on Kind</a></li>
<li><a href="https://hellokube.dev/posts/3-ways-to-run-kubernetes-on-docker/" target="_blank" rel="noreferrer noopener">Hello Kube.Dev :: 3 ways to run Kubernetes on Docker</a></li>
<li><a href="https://iximiuz.com/en/posts/kubernetes-kind-load-docker-image/" target="_blank" rel="noreferrer noopener">IXimiuz :: Kubernetes - Kind - Load Docker image</a></li>
</ul>
</html>
<html>
The following alias will list just<br />
the directories in a directory and<br />
not other ordinary files. It will<br />
list a directory as a directory even<br />
if the directory is a symbolic link.<br />
<pre><code>alias dir='ls -Lla|grep ^d'</code></pre>
Without the capital "L" in this alias<br />
the alias will not list directories<br />
that are symbolic links.<br />
<br />
This tip generously supported by: <br />
eric_furman@hotmail.com
</html>
<html>
<h3>Überblick</h3>
<ul>
<li>Beispiel-Applikation mit Node.js und Express</li>
<li>Visual Studio Code und Docker</li>
<li>Basis-Images auf dem Docker Hub</li>
<li>Dockerfile</li>
<li>Eigene Images auf dem Docker Hub</li>
<li>Hostsystem aufräumen</li>
</ul>
<h3>Voraussetzungen</h3>
<ul>
<li>Docker (Desktop)</li>
<li>Visual Studio Code - Editor</li>
<li>Optional:
- Git
- Node.js</li>
</ul>
<h3>Beispiel-Applikation</h3>
<ul>
<li>Mit Node.js und Express
- https://expressjs.com
(minimalistischer Web-Framework für Node.js)</li>
<br />
<li>Workspace anlegen:
<code><pre>
$ mkdir hello
$ cd hello</pre></code></li>
<li>Beispiel-Applikation anlegen
<code><pre>$ npx express-generator # um die Applikation zu erstellen</pre></code></li>
</ul>
<h3>Kein Node.js installiert?</h3>
<ul>
<li>npx setzt Node.js auf dem Rechner voraus.</li>
<li>Docker kann helfen</li>
<br />
<li>Grobe Idee:
Beispiel-Applikation mit Docker anlegen:
<code><pre>$ docker run node npx express-generator</pre></code>
wobei<br />
"node" : ist das Image, das wir aufrufen wollen</li>
</ul>
<h3>Offizielles Node.js-Image</h3>
<ul>
<li>Docker Hub
<ul>
<li>https://hub.docker.com/_/node</li>
</ul>
</li>
<br />
<li>Image-Varianten
<ul>
<li>node:<version></li>
<li>node:<version>-slim # enthält keine Entwicklertools</li>
<li>node:<version>-alpine # nochmal schlanker</li>
</ul>
</li>
<br />
<li>Versionen:
- current
- lts # Long Term Support
- oder exakte Versionen 12, 12.18, 12.8.4</li>
<br />
<li>node:lts-alpine # die im Video verwendete Node-Version</li>
</ul>
<h3>Container starten</h3>
<ul>
<li>Zugriff auf das aktuelle Host-Verzeichnis</li>
<br />
<li>Die Option -v / --volume mountet ein Host-Verzeichnis:
<code><pre>$ docker run -v "$(pwd):/hello" node:lts-alpine ls /hello</pre></code></li>
<li>Die Option -w / --workdir setzt das aktuelle Verzeichnis:
<code><pre>$ docker run -v "$(pwd):/hello" -w /hello node:lts-alpine ls</pre></code></li>
</ul>
<h3>Beispiel-Applikation</h3>
<ul>
<li> <ul>
<li>Mit (installiertem) Node.js:
<code><pre>$ npx express-generator</pre></code></li>
<li>Mit Docker:
<code><pre>docker run -v "$(pwd):/hello" -w /hello node:lts-alpine npx express-generator</pre></code></li>
</ul>
</li>
<li> ⇒ die Sourcen werden auf meinem Rechner installiert</li>
<li> in das Verzeichnis "hello" wechseln<br />
und Aufruf Visual Studio Code:
<code><pre>$ code .</pre></code>
⇒ im File ./bin/www ist der Port zu finden, <br />
unter dem die Applikation lauscht (hier: 3000)
<br />
in Git-Repo ablegen (neues Repo anlegen)<br />
<br />
Docker-Extensions installiert haben
<br />
<h4>Aufbau eines Dockerfiles:</h4>
<code><pre>
FROM node:lts-alpine # Angabe des Basis-Image
WORKDIR /app # hier werden die Quell-Codes hinkopiert
COPY . . # copy source code nach /app
RUN npm install # dependencies auflösen: Ausführen des Befehls "npm install"
EXPOSE 3000 # port bereitstellen
CMD npm start # Definieren des Container-Start-Kommandos, hier: "npm start"</pre></code>
⇒ Image bauen:
<code><pre>$ docker build -t hello . # "-t" :: Angabe des tags, des Namens für das Image;
# da das Dockerfile im aktuellen Verzeichnis liegt,
# brauche ich nur "." als Parameter angeben;</pre></code>
<code><pre>$ docker images # Auflisten der aktuell verfügbaren Images, die auf dem
# aktuellen Rechner liegen;</pre></code>
<code><pre>$ docker run --rm -d -p 3000:3000/tcp hello:latest # Image starten
# "-d" :: als Daemon, im Hintergrund starten
# "-p" :: Angabe des Ports</pre></code>
⇒ Konstruktion beendet</li>
</ul>
<h3>Tipps / Tricks / Weitere Arbeiten am Dockerfile</h3>
<ul>
<li>jede Zeile im Dockerfile repräsentiert einen Layer
<br />
⇒ Optimierung:
zweite Copy-Anweisung hinzufügen:
<code><pre>
FROM node:lts-alpine
WORKDIR /app
COPY package.json . # Nur wenn sich an der Datei "package.json" sich etwas ändert,
RUN npm install # wird der npm-Befehl ausgeführt.
COPY . .
EXPOSE 3000
CMD npm start</pre></code>
Dadurch werden die Befehle (Zeile 3 & 4) gecached und nur<br />
bei Bedarf wieder ausgeführt.</li>
<br />
<li> Ein Dockerfile durch Visual Studio Code erzeugen lassen<br />
Shift+Ctrl+p ::
weitere Dockerfile-Befehle:
<ul>
<li>ENV<li>
<li>andere COPY-Anweisung: <br />
[ "file-1", "file-2", ..., "file-n", "./"] # der letzte Eintrag ist das Ziel<br />
# dieser Befehl erspart es, für jedes<br />
# File einen eigenen Layer zu erzeugen</li>
<li>andere CMD-Schreibweise:<br />
["npm", "start"] # es wird - im Gegensatz zur ursprgl. Version - _keine_<br />
# Shell aufgerufen (/bin/sh o.a.), die dann erst das<br />
# Programm aufruft, sondern es wird sofort das npm-Binary<br />
# aufgerufen</li>
</ul>
</li>
</ul>
<h3>File .dockerignore</h3>
<ul>
<li>alles, was nicht mit im Image-File zu sein hat resp. zu sein braucht</li>
<br />
<li>wird automatisch angelegt</li>
</ul>
<h3>Debugging</h3>
<h3>Eigenes Image verteilen</h3>
<ul>
<li> Docker Hub
- https://hub.docker.com</li>
<br />
<li> Image-Tag erstellen:
<code><pre>$ docker tag hello dockerid/hello # dockerid : der eigene User-Name,
# z.B. docker tag hello stefanscherer2020/hello</pre></code></li>
<br />
<li> Image hochladen:
<code><pre>$ docker push dockerid/hello # die Images werden _immer_(?) als "public"
# hochgeladen</pre></code></li>
</ul>
<h3>Hostsystem aufräumen</h3>
<ul>
<li>Nicht mehr benötigte Images löschen
<code><pre>$ docker image prune</pre></code>
<li>Ganzes Hostsystem aufräumen
<code><pre>$ docker system prune</pre></code>
<li>alternativ über das Docker-Dashboard (auf den Wal klicken?)<br />
<br />
<li>"Dangling"
Das sind all diejenigen Images, die beim Bauen erstellt und
benötigt werden.
</ul>
<h3>Zusammenfassung</h3>
<ul>
<li>Dockerfile</li>
<li>Eigene Images erstellen</li>
<li>Zusammenspiel Visual Studio Code und Docker</li>
<li>Docker Desktop-Dashboard</li>
<li>Hostsysem aufräumen</li>
<li>Dokumentation der Visual Studio Code Docker Extension
- https://code.visualstudio.com/docs/containers/overview</li>
<li>Codebeispiele aller Folgen
- https://github.com/thenativeweb/techlounge-docker</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.heise.de/developer/artikel/Einfuehrung-in-Docker-Folge-4-Images-bauen-4918201.html" target=_blank>Heise ‐ Developer :: Einführung in Docker ‐ Folge 4</a> (<em>Video, 42:33 min</em>)</li>
<li><a href="https://www.modius-techblog.de/devops/eigenes-docker-images-mit-dockerfile-erstellen/" target=_blank>Modius-Techblog :: Eigenes Docker-Image erstellen</li>
<li><a href="https://www.marcooderkerk.de/wie-baue-ich-ein-docker-image/" target=_blank>Marco Oderkerk :: Bau von Docker‐Images</a></li>
</ul>
</html>
<html>
<ul>
<li><h3>Alternativen zu Docker:</h3>
<ul>
<li>rkt (“Rocket“, Fa. CoreOS)</li>
<li>CRI-0</li>
<li>podman (“Pod‐Manager“)</li>
</ul></li>
</ul>
<h3>aus: iX 12/2021, S. 60ff : Abschied auf Raten ‐ Docker‐Alternativen Podman und CRI‐O</h3>
<ul>
<li>Podman ist als designierte Nachfolger von Docker Engine anerkannt.</li>
<li>Technisch bemerkenswert ist der Verzicht auf den root‐Benutzer und<br />
einen zentralen Daemon.</li>
<li>CRI‐O stellt die Weichen für die Docker‐Ablösung aus Kubernetes‐<br />
Sicht.</li>
</ul>
<h3>Links:</h3>
<ul>
<li>https://www.heise.de/tests/Container-Docker-Alternativen-Podman-und-CRI-O-im-Vergleich-6267216.html</li>
<li>https://learn.redhat.com/t5/Containers-DevOps-OpenShift/podman-vs-CRI-O-vs-RunC/td-p/9639</li>
<li>https://joerismissaert.dev/podman-101-managing-and-running-containers/</li>
<li>https://www.ionos.de/digitalguide/server/tools/podman-tutorial/</li>
<li>https://www.ionos.de/digitalguide/server/knowhow/was-ist-cri-o/</li>
<li>https://developers.redhat.com/blog/2019/01/29/podman-kubernetes-yaml</li>
<li>https://podman.io/</li>
<li>https://towardsdatascience.com/its-time-to-say-goodbye-to-docker-5cfec8eff833?gi=95eb50517882</li>
</ul>
</html>
<html>
<ul>
<li>Damit Docker funktioniert, muss zuerst einmal der Docker-<br />
Daemon laufen:
<b><code><pre>$ sudo /usr/sbin/service docker start
Starting Docker: docker.</pre></code></b>
</li>
<li><details><summary>Ausgabe des (ersten) Befehls <code><b>docker run hello-word</code></b>: … </summary><br />
<code><pre>mueller@geecko:~$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
719385e32844: Pull complete
Digest: sha256:88ec0acaa3ec199d3b7eaf73588f4518c25f9d34f58ce9a0df68429c5af48e8d
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
mueller@geecko:~$
</pre></code>
</details>
</li>
<li><h3>Docker‐Manpages</h3>
die Manpages von Docker folgen folgendem Aufbau (z.B.):
<b><code><pre>man docker‐ps</pre></code></b>
</li>
<li><h3>Docker‐Version ermitteln</h3>
<b><code><pre>docker ‐‐version </pre></code></b></li>
<li><h3>Informationen zur installierten Docker‐Version anzeigen</h3>
<b><code><pre>docker info</pre></code></b></li>
<li><h3>Container temporär anhalten</h3>
<b><code><pre>docker [un]pause</pre></code></b></li>
<li><h3>Befehl im Container ausführen</h3>
<b><code><pre>docker exec <em>ContainerName Befehl</em></pre></code></b></li>
<li><h3>Image erstellen</h3>
<b><code><pre>docker build ‐t <em>ImageName</em></pre></code></b>
The '‐t' option allows to define the name of your image.</li>
<li><h3>Nicht verwendete Images löschen</h3>
<b><code><pre>docker image prune</pre></code></b></li>
<li><h3>Image herunterladen</h3>
<b><code><pre>docker pull <em>ImageName</em> </pre></code></b></li>
<li><h3>Die auf den Rechner heruntergeladenen Images auflisten</h3>
<b><code><pre>docker images </pre></code></b>
bzw. <b><code><pre>docker image ls [‐a]</pre></code></b></li>
<li><h3>Die auf den Rechner heruntergeladenen Images auflisten (nur deren Image IDs)</h3>
<b><code><pre>docker image ls ‐q</pre></code></b></li>
<li><h3>Ein Docker‐Image ausführen / starten</h3>
<b><code><pre>docker run ‐‐name <em><selbstgewählter Name></em> ‐it ‐v <em><VolumeName></em> ‐d <em>ImageName</em> </pre></code></b>
<b>Optionen:</b><br />
‐i :: Image interaktiv starten<br />
‐t :: ein pseudo‐TTY allokieren / bereitstellen<br />
‐d :: Prozeß als Daemon starten / laufen lassen <em>(in the detached mode)</em><br />
‐v :: Volume mitgeben</li>
<li><h3>Anzeigen (der / aller) Container‐Prozeße</h3>
<b><code><pre>docker ps [‐a]</pre></code></b></li>
<li><h3>Container auflisten</h3>
<b><code><pre>docker container ls <em>[ Options ]</em></pre></code></b>
<table>
<tr><th>Options:</th><th></th></tr>
<tr><td> -a, --all </td><td>Show all containers (default shows just running)</td></tr>
<tr><td> -f, --filter filter</td><td>Filter output based on conditions provided</td></tr>
<tr><td> --format string</td><td>Pretty-print containers using a Go template</td></tr>
<tr><td> -n, --last int </td><td>Show n last created containers (includes all states) (default -1)</td></tr>
<tr><td> -l, --latest </td><td>Show the latest created container (includes all states)</td></tr>
<tr><td> --no-trunc </td><td>Don't truncate output</td></tr>
<tr><td> -q, --quiet </td><td>Only display container IDs</td></tr>
<tr><td> -s, --size </td><td>Display total file sizes</td></tr>
</table>
</li>
<li><h3>Container löschen / entfernen</h3>
<b><code><pre>docker rm <em>Container‐ID</em> </pre></code></b>
bzw. <b><code><pre>docker rm $(docker ps ‐a ‐q)</pre></code></b></li>
<li><h3>Image löschen / entfernen</h3>
<b><code><pre>docker rmi <em>Image‐ID</em> </pre></code></b></li>
<li><h3>Container re-starten</h3>
<b><code><pre>docker restart <em>Container‐ID</em> </pre></code></b></li>
<li><h3>Container starten</h3>
<b><code><pre>docker start <em>Container‐ID</em> </pre></code></b></li>
<li><h3>(alle) Container stoppen</h3>
<b><code><pre>docker stop <em>Container‐ID</em> </pre></code></b>
bzw. <b><code><pre>docker stop $(docker ps ‐a ‐q) </pre></code></b></li>
<li><h3>Volume (für Container) anlegen</h3>
<b><code><pre>docker volume create <em><VolumeName></em> </pre></code></b></li>
<li><h3>Nicht verwendete Volumes löschen</h3>
<b><code><pre>docker volume prune</b>  <em><u>!Bei diesem Befehl ist Vorsicht geboten!</u></em></pre></code>
</li>
<!--
<li><h3></h3>
<b><code><pre> </pre></code></b></li>
<li><h3></h3>
<b><code><pre> </pre></code></b></li>
<li><h3></h3>
<b><code><pre> </pre></code></b></li>
-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://geekflare.com/de/docker-commands/" target="_blank" rel="noreferrer noopener">
Geek-Flare :: 26 Docker-Befehle mit Beispielen</a>
</li>
<li>c't Wissen :: Docker, 2019, S.15
</li>
<li><a href="https://docs.docker.com/engine/reference/commandline/docker/"
target="_blank" rel="noreferrer noopener">
Docker :: Child commands
</li>
<li><a href="https://dev.to/luckierdodge/how-to-install-and-use-docker-in-wsl2-217l"
target="_blank" rel="noreferrer noopener">
DEV.to :: How to Install and Use Docker in WSL2</a>
</ul>
</html>
<html>
<h3>So what is the container orchestration definition?</h3>
<p>
When the number of containers increases substantially, container orchestration comes<br />
into play, especially in the CI/CD pipeline. Container orchestration is an automated tech‐<br />
nique of managing, scheduling, networking, and monitoring containers. It is almost im‐<br />
possible to manage containers without the involvement of container orchestration when<br />
scalability is required. Container orchestration mainly concentrates on the life cycle of<br />
containers and the dynamics of the environment.
</p>
<p>
The following are some of the key features of a standard container orchestration platform:
<ul>
<li><b>Health checks:</b><br />
The developers set up the health check for any service in the container to ensure<br />
the orchestration is properly deploying and managing hyper-scale applications.</li>
<li><b>Resource allocation:</b><br />
In container orchestration platforms, resource allocation can be done automatically<br />
based on the application, container type, and micro-service.</li>
<li><b>Updates and upgrades:</b><br />
Containers are upgraded and update resources automatically with zero downtime.</li>
<li><b>Service discovery:</b><br />
This is the concept of how the micro‐services or applications locate each other on<br />
the network. It helps the users reduce the configuration effort needed in setting up<br />
the process.</li>
</ul>
</p>
<h3>Links:</h3>
<ul>
<li><a href="https://www.katalon.com/resources-center/blog/container-orchestration/" target="_blank" rel="noreferrer noopener">Katalon :: Container Orchestration ‐ Definition, Benefits & How It Works</a></li>
</ul>
</html>
<html>
<ul>
<li>Damit Daten, die während des Containerbetriebs anfallen, erhalten<br />
bleiben, sollten sie in ein <b>Volume</b> ausgelagert werden;</li>
<br />
<li>Mit dem Befehl
<code><pre>docker volume create <em>VolumeName</em></pre></code>
wird ein Volume mit dem Namen “VolumeName“ angelegt;</li>
<br />
<li>Beim Aufruf des Containers das Volume mit angeben:
<code><pre>docker run … ‐v <em>VolumeName</em> …</pre></code></li>
<br />
<li>Die Inhalte des Volumes speichert Docker im Unter‐<br />
verzeichnis <code><b>/var/lib/docker</b></code>;
</li>
</ul>
<h3>Quellen / Links:</h3>
<ul>
<li>c't Wissen :: Docker</li>
</ul>
</html>
<html>
<ul>
<li><br />
<img src="./pictures/docker-container-lifecycle-diagram-2.webp" height=338 width=600 />
</li>
<li><b>den zuletzt erstellten Container anzeigen:</b>
<pre><code>docker ps -aql</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://linuxhandbook.com/essential-docker-commands/" target="_blank" rel="noreferrer noopener">
LinuxHandbook :: Essential Docker Commands</a></li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://dasnetzundich.de/2020/10/06/docker-compose-erklaert/" target="_blank" rel="noreferrer noopener">
Das Netz und ich :: Docker‐Compose erklärt</a></li>
</ul>
</html>
<html>
<ul>
<li><h3>Verwendetes Tool: watchtower</h3>
Man sollte die Container auch immer auf dem neusten Stand halten.<br />
Das dient auch zur Server- und Datensicherheit bei. Um sicherzu‐<br />
gehen, dass man keine Updates verpasst, sollte man alle paar Tage<br />
die Container überprüfen.<br />
<br />
Zu diesem Zweck kann man <b><em>Watchtower</em></b> verwenden. Nach der In‐<br />
stallation werden alle Container in regelmäßigen Abständen auf Up‐<br />
dates kontrolliert.</li>
<li><h3>Vorgehensweise</h3>
Zuerst sollte man sich mit dem eigenen Server verbinden und zum<br />
Root‐User bzw. zu dem User unter dem Docker Service läuft, wech‐<br />
seln. Einfach halber hier mit dem Root-User.<br />
<br />
Danach begibt man sich auf die Github Seite und liest sich die READ‐<br />
ME durch.<br />
<br />
Auf dem Server erstellt man in einem eindeutigen Verzeichnis, wo<br />
man die Datei auch wieder findet, eine <b><em>Docker-compose.yml</em></b> ‐ Datei,<br />
(sofern noch nicht vorhanden) und fügt folgendes ein:
<code><pre>
version: '2.2'
services:
watchtower:
image: container/watchtower
container_name: watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /root/.docker/config.json:/config.json
command: <containerid> <containerid2> ‐‐schedule '0 0 0 * * *' ‐‐cleanup ‐‐debug
<em># dabei bedeuten:
# * Defaultmässig werden alle gerade laufenden Container aktualisert;
# hier werden die Container <containerid> <containerid2> “überwacht“ & ggfs. aktualisiert;
# * “ ‐‐schedule '0 0 0 * * *'“ :: der Befehl wird jede Nacht um 0 Uhr ausgeführt
# alternativ :
# “‐‐interval 30“ :: der Befehl wird alle 30 Min. ausgeführt;
# * “‐‐cleanup“ :: die alten Images werden zum Abschluß gelöscht;
# * “‐‐debug“ :: Erstellen der Logausgabe;</em>
environment:
- TZ='Europe/Berlin'
#- REPO_USER='githubuser'
#- REPO_PASS='password'
#- WATCHTOWER_NOTIFICATIONS=email
#- WATCHTOWER_NOTIFICATION_EMAIL_FROM=server@Domain.tld
#- WATCHTOWER_NOTIFICATION_EMAIL_TO=mail@domain.tld
#- WATCHTOWER_NOTIFICATION_EMAIL_SERVER=mail.domain.tld
#- WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER=mail@domain.tld
#- WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD=Secret
restart: always
</pre></code></li>
<li><h3>Container starten</h3>
Hat man den Block nun für sich angepasst, speichert man die <b><em>docker-compose.yml</em></b>‐Datei ab und führt diese aus:
<code><pre>
docker-compose up -d
</pre></code>
Der Container sollte nun starten. Sobald die ersten Updates durchgelaufen sind, schaut man in die Log Datei des Watchtower Containers:
<code><pre>
sudo docker logs <watchtowerid>
</pre></code>
Die Ausgabe sollte ungefähr so aussehen:
<code><pre>
[...]
time="2018-09-16T14:57:50Z" level=info msg="Found new crazymax/firefox-syncserver:latest image (sha256:ca246670c21f134a6f3fbb360da0158f0e78a24f07e8aa6ed645f2b2e5465e4c)"
time="2018-09-16T14:57:51Z" level=info msg="Stopping /firefox-syncserver (2e6fd27c9978f16852444e9ece1015c5b5c68ce74e922dea8a9f53760d0cb8b4) with SIGTERM"
time="2018-09-16T14:58:05Z" level=info msg="Creating /firefox-syncserver"
time="2018-09-21T19:42:55Z" level=info msg="Unable to update container /aria2c, err='Error response from daemon: Get https://registry-1.docker.io/v2/abcminiuser/docker-aria2-with-webui/manifests/latest-ng: Get https://auth.docker.io/token?scope=repository%3Aabcminiuser%2Fdocker-aria2-with-webui%3Apull&service=registry.docker.io: net/http: TLS handshake timeout'. Proceeding to next."
time="2018-09-22T18:00:10Z" level=info msg="Waiting for running update to be finished..."
time="2018-09-22T18:07:55Z" level=info msg="First run: 2018-09-22 18:12:55 +0000 UTC"
time="2018-09-27T19:18:00Z" level=info msg="Found new crazymax/firefox-syncserver:latest image (sha256:7ee3b2546928be7c60372923530ce448afba447a7458acea077e6a08d667cf7d)"
time="2018-09-27T19:18:04Z" level=info msg="Stopping /firefox-syncserver (f3893fe0d3ee933d0dd40ebbfc4e201fd19d4f8c80310300770b7e06d02d6869) with SIGTERM"
time="2018-09-27T19:18:18Z" level=info msg="Creating /firefox-syncserver"
[...]
</pre></code></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://dasnetzundich.de/2020/10/06/docker-container-automatisch-aktualisieren/" target="_blank"
rel="noreferrer noopener">Das Netz und Ich :: Docker‐Container automatisch aktualisieren</a></li>
</ul>
</html>
<html>
<ul>
<li>für das Bauen von Docker‐Images ist ein Dockerfile,<br />
das den Namen “<em>Dockerfile</em>“ tragen muss, notwendig.<br />
<br />
Alternativ kann dem “docker build“‐Befehl mittels der<br />
Option <b>‐f</b> (bzw. <b>‐‐file <em>Pfad zum Dockerfile</em></b>) das Dok‐<br />
kerfile explizit mitgegeben werden. </li>
<br />
</ul>
<table>
<tr><th>Syntaxelement</th><th>Beschreibung</th></tr>
<tr><td>FROM Abbildname<br />
FROM Abbildname : Versionstag</td><td>Festlegung des Sourceimages, auf dessen das neue<br />
Image gebaut werden soll.</td></tr>
<tr><td>MAINTAINER Name</td><td>Angabe des Erstellers des Images Name und Email<br />
für eventuelle Anfragen</td></tr>
<tr><td>RUN Kommando<br />
RUN “Executable“,“Parameter1“,“Parameter2“
</td><td>Das RUN Kommando führt das angegeben Komman‐<br />
do in einem neuen Layer am Anfang des Images auf<br />
und schreibt das Ergebnis raus. Zur Beschleunigung<br />
der Auslieferung und der Installation des Images<br />
sollten immer mehrere RUN Kommandos zusammen‐<br />
gefasst werden, um die Anzahl der Layer gering zu<br />
halten<br />
<br />
RUN führt das Kommando in der Shell aus<br />
RUN [“Executable“,““,““] führt das Executable aus</td></tr>
<tr><td>
CMD Kommando Attribute<br />
CMD [“Executable“,“Parameter1“,“Parameter2“]<br />
CMD [“Parameter1“,“Parameter2“]
</td><td>Stellt Standardwerte für die Ausführung des Con‐<br />
tainers bereit. Pro Dockerfile darf es nur einen CMD<br />
geben.<br />
<br />
CMD führt das Kommando in der Shell aus<br />
CMD [“Executable“,““,““] führt das übergebene<br />
                Executable aus<br />
CMD [““,““] übergibt die Parameter an den <br />
        Entrypoint</td></tr>
<tr><td>ENTRYPOINT [“Executable“,“Parameter1“,“Parameter2“]<br />
ENTRYPOINT Kommando Attribute1 Attribute2 …
</td><td>Die ENTRYPOINT-Anweisung fügt einen Einstiegs‐<br />
befehl hinzu , dessen Argumente nicht überschrieben<br />
werden, wenn sie über den Befehl “docker run“ über‐<br />
geben werden. Das ist anders als das Verhalten von<br />
CMD. Dadurch können Argumente an den Einstiegs‐<br />
punkt übergeben werden</td></tr>
<tr><td>EXPOSE Port1 Port2 …
</td><td>Gibt an auf welchen Ports der Container hören soll.</td></tr>
<tr><td>ENV Schlüssel Wert
</td><td>Setzen von Umgebungsvaiablen über Schüssel‐Wert‐<br />
Kombinationen</td></tr>
<tr><td>COPY Quelle Ziel<br />
COPY [“Quelle“, … “Ziel“]
</td><td>Kopiert Dateien von der Quelle an das Ziel. Es können<br />
sowohl lokale als auch Remotedateien genutzt werden.<br />
Im Ziel erhalten diese Dateien immer die Berechtigung<br />
0755 und als Eigentümer die UserID und GruppenID 0<br />
(root)</td></tr>
<tr><td>ADD Quelle Ziel<br />
ADD [“Quelle“, … “Ziel“]
</td><td>Wie COPY werden die Dateien kopiert . Handelt es sich<br />
bei der Quelldatei um ein Archiv (tar, zip,…) wird es<br />
automatisch am Ziel entpackt.</td></tr>
<tr><td>VOLUME [“/Pfad/Pfad“]
</td><td>Erzeugt einen Mount Point</td></tr>
<tr><td>USER user<br />
USER user : group
</td><td>Setzt den aktuell zu nutzenden User auf den angegebenen<br />
Wert und führt alle folgenden Befehle unter dessen Berechti‐<br />
gung aus.</td></tr>
<tr><td>WORKDIR /Pfad/zum/Arbeitsverzeichnis
</td><td>Setzt das Arbeitsverzeichnis für RUN, CMD, ENTRYPOINT,<br />
COPY und ADD Befehle. Relative Pfade sind relativ zum Pfad <br />
des vorherigen Arbeitsverzeichnis definiert .</td></tr>
<tr><td>ARG Name<br />
ARG Name=Standardwert
</td><td>Definiert eine Variable, die Benutzer zur Build-Zeit über‐<br />
geben kann. Der Build mit dem Befehl “docker build“<br />
kann die Variablen über den Parameter ‐‐build‐arg = erhalten</td></tr>
<tr><td>ONBUILD Befehle
</td><td>Trigger wird ausgeführt, wenn das zu erstellende<br />
Image als Basisimage genutzt wird. Es wird direkt<br />
beim Build nach dem FROM Kommando ausgeführt.</td></tr>
</table>
<h3>Links:</h3>
<ul>
<li><a href="https://www.marcooderkerk.de/dockerfile-syntax/" target="_blank" rel="noreferrer noopener">
Marco Oderkerk :: Dockerfile ‐ Syntax</a></li>
</ul>
</html>
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/create?fromImage=python&tag=3.11-rc-slim": dial unix /var/run/docker.sock: connect: permission denied
<html>
Usage: docker [OPTIONS] COMMAND<br />
<br />
A self-sufficient runtime for containers<br />
<h3>Options:</h3>
<table>
<tr><td>‐‐config string</td><td>Location of client config files (default "/home/mueller/.docker")</td></tr>
<tr><td>‐c, ‐‐context string</td><td>Name of the context to use to connect to the daemon<br />
(overrides DOCKER_HOST env var and default context set with "docker context use")</td></tr>
<tr><td>‐D, ‐‐debug </td><td>Enable debug mode</td></tr>
<tr><td>‐H, ‐‐host list </td><td>Daemon socket(s) to connect to</td></tr>
<tr><td>‐l, ‐‐log-level string </td><td>Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info")</td></tr>
<tr><td>‐‐tls</td><td>Use TLS; implied by ‐‐tlsverify</td></tr>
<tr><td>‐‐tlscacert string</td><td>Trust certs signed only by this CA (default "/home/mueller/.docker/ca.pem")</td></tr>
<tr><td>‐‐tlscert string</td><td>Path to TLS certificate file (default "/home/mueller/.docker/cert.pem")</td></tr>
<tr><td>‐‐tlskey string</td><td>Path to TLS key file (default "/home/mueller/.docker/key.pem")</td></tr>
<tr><td>‐‐tlsverify</td><td>Use TLS and verify the remote</td></tr>
<tr><td>‐v, ‐‐version</td><td>Print version information and quit</td></tr>
</table>
<h3>Management Commands:</h3>
<table>
<tr><td>app* </td><td>Docker App (Docker Inc., v0.9.1-beta3)</td></tr>
<tr><td>builder </td><td>Manage builds</td></tr>
<tr><td>buildx* </td><td>Build with BuildKit (Docker Inc., v0.5.1-docker)</td></tr>
<tr><td>config </td><td>Manage Docker configs</td></tr>
<tr><td>container </td><td>Manage containers</td></tr>
<tr><td>context </td><td>Manage contexts</td></tr>
<tr><td>image </td><td>Manage images</td></tr>
<tr><td>manifest </td><td>Manage Docker image manifests and manifest lists</td></tr>
<tr><td>network </td><td>Manage networks</td></tr>
<tr><td>node </td><td>Manage Swarm nodes</td></tr>
<tr><td>stack </td><td>Manage Docker stacks</td></tr>
<tr><td>swarm </td><td>Manage Swarm</td></tr>
<tr><td>system </td><td>Manage Docker</td></tr>
<tr><td>trust </td><td>Manage trust on Docker images</td></tr>
<tr><td>volume </td><td>Manage volumes</td></tr>
</table>
<h3>Commands:</h3>
<table>
<tr><td> attach </td><td>Attach local standard input, output, and error streams to a running container</td></tr>
<tr><td> build </td><td>Build an image from a Dockerfile</td></tr>
<tr><td> commit </td><td>Create a new image from a container's changes</td></tr>
<tr><td> cp </td><td>Copy files/folders between a container and the local filesystem</td></tr>
<tr><td> create </td><td>Create a new container</td></tr>
<tr><td> diff </td><td>Inspect changes to files or directories on a container's filesystem</td></tr>
<tr><td> events </td><td>Get real time events from the server</td></tr>
<tr><td> exec </td><td>Run a command in a running container</td></tr>
<tr><td> export </td><td>Export a container's filesystem as a tar archive</td></tr>
<tr><td> history </td><td>Show the history of an image</td></tr>
<tr><td> images </td><td>List images</td></tr>
<tr><td> import </td><td>Import the contents from a tarball to create a filesystem image</td></tr>
<tr><td> info </td><td>Display system-wide information</td></tr>
<tr><td> inspect </td><td>Return low-level information on Docker objects</td></tr>
<tr><td> kill </td><td>Kill one or more running containers</td></tr>
<tr><td> load </td><td>Load an image from a tar archive or STDIN</td></tr>
<tr><td> login </td><td>Log in to a Docker registry</td></tr>
<tr><td> logout </td><td>Log out from a Docker registry</td></tr>
<tr><td> logs </td><td>Fetch the logs of a container</td></tr>
<tr><td> pause </td><td>Pause all processes within one or more containers</td></tr>
<tr><td> port </td><td>List port mappings or a specific mapping for the container</td></tr>
<tr><td> ps </td><td>List containers</td></tr>
<tr><td> pull </td><td>Pull an image or a repository from a registry</td></tr>
<tr><td> push </td><td>Push an image or a repository to a registry</td></tr>
<tr><td> rename </td><td>Rename a container</td></tr>
<tr><td> restart </td><td>Restart one or more containers</td></tr>
<tr><td> rm </td><td>Remove one or more containers</td></tr>
<tr><td> rmi </td><td>Remove one or more images</td></tr>
<tr><td> run </td><td>Run a command in a new container</td></tr>
<tr><td> save </td><td>Save one or more images to a tar archive (streamed to STDOUT by default)</td></tr>
<tr><td> search </td><td>Search the Docker Hub for images</td></tr>
<tr><td> start </td><td>Start one or more stopped containers</td></tr>
<tr><td> stats </td><td>Display a live stream of container(s) resource usage statistics</td></tr>
<tr><td> stop </td><td>Stop one or more running containers</td></tr>
<tr><td> tag </td><td>Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE</td></tr>
<tr><td> top </td><td>Display the running processes of a container</td></tr>
<tr><td> unpause </td><td>Unpause all processes within one or more containers</td></tr>
<tr><td> update </td><td>Update configuration of one or more containers</td></tr>
<tr><td> version </td><td>Show the Docker version information</td></tr>
<tr><td> wait </td><td>Block until one or more containers stop, then print their exit codes</td></tr>
</table>
Run 'docker COMMAND ‐‐help' for more information on a command.<br />
<br />
To get more help with docker, check out our guides at <a href="https://docs.docker.com/go/guides/" target="_blank" rel="noreferrer noopener">Docker ‐ Docs :: Guides</a>
<br />
</html>
<html>
<ul>
<li>
<ul>
<li>It is a tool used to create, deploy and run applications by using containers.</li>
<li>Containers allows developers to package up an application with all the parts it needs.</li>
<li>Containers are isolated from one another and bundle their own software, libraries and
configuration file.</li></ul></li>
<br />
<li>Es werden zwei Versionen angeboten:
<ul>
<li><b>Community</b> <em>(Open‐Source‐Software)</em></li>
<li><b>Enterprise</b> <em>(Produktiveinsatz im Unternehmen)</em><br />
zusätzliche Features:
<ul>
<li>Support von Docker Inc.</li>
<li>“Docker Trusted Registry“</li>
<li>“Universal Control Plane (UCP)“</li>
</ul></li>
</ul></li>
<br />
<li>Docker ist ein Werkzeug für Administratoren und Anwendungsentwickler, <br />
um Server-Software (Applikationen, nicht das OS!) zusammen mit allen<br />
Abhängigkeiten zu einem Container-Abbild (<em>Image</em>) zu verpacken und<br />
auszuliefern. Der Nutzer startet aus diesem Abbild mit Docker einen so‐<br />
genannten Container. Der Server‐Prozess darin läuft isoliert vom Betriebs‐<br />
system, teilt sich mit diesem (aber) nur den Kernel.
<code><pre>
Docker |-------| |-----------|
ruft auf :: | Image | ---> | Container |
Befehl |-------| |-----------|
</pre></code></li>
<br />
<li>Docker arbeitet auf <b>einem</b> Server, Kubernetes “dirigiert“ die Docker‐<br />
Containern auf mehreren Servern.</li>
<br />
<li><b>Docker‐Grundregel:</b><br />
Ein Container, ein Service</li>
<br />
<li>Eine containerisierte Anwendung kann man schnell auf einem Testsystem<br />
starten, ausprobieren und später auf einem Server einsetzen ‐ der Con‐<br />
tainer verhält sich überall gleich, weil das Abbild alle benötigten Abhängig‐<br />
keiten wie Bibliotheken enthält. Stoppt man den Container, bleiben keine<br />
Reste zurück.</li>
<br />
<li>Eingesetzt wird Containerisierung zum Beispiel für den Betrieb von Web‐,<br />
Mail-, oder Datenbankservern. Docker selbst ist Open‐Source‐Software.<br />
Sie wird von der Firma Docker Inc. entwickelt, die auch eine Enterprise‐<br />
Version mit Support vertreibt. Außerdem betreibt sie mit dem Docker Hub<br />
eine Datenbank für Docker-Images. </li>
<br />
<li>Docker läuft unter Linux, macOS und Windows.</li>
<li></li>
<li></li>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.heise.de/thema/docker" target=_blank>Heise Online :: Docker</a></li>
<li><a href="medium.com/swlh/introduction-to-docker-96aad5eabb30" target="_blank" rel="noreferrer noopener">medium.com :: Introduction to Docker</a> (<em>PDF vorhanden</em>)</li>
<li><a href="https://www.ionos.de/digitalguide/server/konfiguration/docker-tutorial-installation-und-erste-schritte/"
target="_blank" rel="noreferrer noopener">Ionos :: Docker ‐ Tutorial</a></li>
<!--li></li>
<li></li>
<li></li-->
</ul>
</html>
<html>
How to setup an ssh server within a docker container using Alpine Linux. <br />
<br />
Create a new Dockerfile:<br />
<br />
<code><b>
FROM alpine:latest<br />
LABEL maintainer="Vivek Gite webmater@cyberciti.biz"<br />
RUN apk add --update --no-cache openssh <br />
RUN echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config<br />
RUN adduser -h /home/vivek -s /bin/sh -D vivek<br />
RUN echo -n 'vivek:some_password_here' | chpasswd<br />
ENTRYPOINT ["/entrypoint.sh"]<br />
EXPOSE 22<br />
COPY entrypoint.sh /<br />
<br />
</b></code>
Create a new shell script named entrypoint.sh as follows:<br />
<br />
<code><b>
#!/bin/sh<br />
ssh-keygen -A<br />
exec /usr/sbin/sshd -D -e "$@"<br />
</b></code>
<br />
Set up executable permissions using the chmod command:
<code><pre>
chmod +x -v entrypoint.sh
</pre></code>
Then build it as follows:
<code><pre>
docker build -t alpine-sshd .
</pre></code>
→ Output:<br />
<br />
<code><b>
Sending build context to Docker daemon 30.21kB<br />
Step 1/9 : FROM alpine:latest<br />
latest: Pulling from library/alpine<br />
a0d0a0d46f8b: Pull complete <br />
Digest: sha256:e1c082e3d3c45cccac829840a25941e679c25d438cc8412c2fa221cf1a824e6a<br />
Status: Downloaded newer image for alpine:latest<br />
---> 14119a10abf4<br />
Step 2/9 : LABEL maintainer="Vivek Gite webmater@cyberciti.biz"<br />
---> Running in 3bd5df80a039<br />
Removing intermediate container 3bd5df80a039<br />
---> ad5cae21b2b8<br />
Step 3/9 : RUN apk add --update --no-cache openssh<br />
---> Running in 2af9aebbe183<br />
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz<br />
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz<br />
(1/10) Installing openssh-keygen (8.6_p1-r3)<br />
(2/10) Installing ncurses-terminfo-base (6.2_p20210612-r0)<br />
(3/10) Installing ncurses-libs (6.2_p20210612-r0)<br />
(4/10) Installing libedit (20210216.3.1-r0)<br />
(5/10) Installing openssh-client-common (8.6_p1-r3)<br />
(6/10) Installing openssh-client-default (8.6_p1-r3)<br />
(7/10) Installing openssh-sftp-server (8.6_p1-r3)<br />
(8/10) Installing openssh-server-common (8.6_p1-r3)<br />
(9/10) Installing openssh-server (8.6_p1-r3)<br />
(10/10) Installing openssh (8.6_p1-r3)<br />
Executing busybox-1.33.1-r3.trigger<br />
OK: 12 MiB in 24 packages<br />
Removing intermediate container 2af9aebbe183<br />
---> 810ed83e5a93<br />
Step 4/9 : RUN echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config<br />
---> Running in c5288a3af1a0<br />
Removing intermediate container c5288a3af1a0<br />
---> e2f05f1da7cd<br />
Step 5/9 : RUN adduser -h /home/vivek -s /bin/sh -D vivek<br />
---> Running in 8ae29c917926<br />
Removing intermediate container 8ae29c917926<br />
---> e258460dfa67<br />
Step 6/9 : RUN echo -n 'vivek:vivek' | chpasswd<br />
---> Running in 1df5fef24dcf<br />
chpasswd: password for 'vivek' changed<br />
Removing intermediate container 1df5fef24dcf<br />
---> 1c903eaa551f<br />
Step 7/9 : ENTRYPOINT ["/entrypoint.sh"]<br />
---> Running in 86af67a76db7<br />
Removing intermediate container 86af67a76db7<br />
---> 185a32d0bc09<br />
Step 8/9 : EXPOSE 22<br />
---> Running in 203f6f8bcaa2<br />
Removing intermediate container 203f6f8bcaa2<br />
---> 9f3f5a20d44c<br />
Step 9/9 : COPY entrypoint.sh /<br />
---> c1a0fe4e6375<br />
Successfully built c1a0fe4e6375<br />
Successfully tagged alpine-sshd:latest<br />
</b></code>
Run it:
<code><pre>
docker run --name sshd_app -d -p 22:22 alpine-sshd:latest
</pre></code>
→ Output:
<code><pre>
03a3661d04d6aa266690c3c44ab3aaa23ea2258ebe18d5efd07f8553710c9da2
</pre></code>
Verify it:
<code><pre>
docker ps
</pre></code>
→ Output:
<code><pre>
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
03a3661d04d6 alpine-sshd:latest "/entrypoint.sh" 16 seconds ago Up 15 seconds 0.0.0.0:22->22/tcp, :::22->22/tcp sshd_app
</pre></code>
Now you can ssh into it:
<code><pre>
ssh vivek@docker-sever-ip-here
</pre></code>
Please note that the above is a primary container for demo purposes, <br />
and I have not set up a volume for persistence data. See docker volumes<br />
for more info.
<h3>Summing up</h3>
See the following man pages using the man command:
<code><pre>
man docker
man docker-run
man docker-build
man docker-volume
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://www.cyberciti.biz/faq/how-to-install-openssh-server-on-alpine-linux-including-docker/" target="_blank"
rel="noreferrer noopener">nixCraft :: How to install OpenSSH server on Alpine Linux (including Docker)</a></li>
</ul>
</html>
<html>
Das Docker-Installationspaket, das im offiziellen Debian-Repository verfügbar ist, ist möglicherweise nicht die neueste Version. Um sicherzustellen, dass wir die neueste Version erhalten, installieren wir Docker vom offiziellen Docker-Repository. Dazu fügen wir eine neue Paketquelle hinzu, fügen den GPG-Schlüssel von Docker hinzu, um sicherzustellen, dass die Downloads gültig sind, und installieren dann das Paket.<br />
<br />
Aktualisieren Sie zunächst Ihre vorhandene Paketliste:
<code><pre>
sudo apt update
</pre></code>
Installieren Sie als nächstes einige vorausgesetzte Pakete, mit denen “apt“ Pakete über HTTPS verwenden kann:
<code><pre>
sudo apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common
</pre></code>
Fügen Sie dann den GPG-Schlüssel für das offizielle Docker-Repository zu Ihrem System hinzu:
<code><pre>
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
</pre></code>
Fügen Sie das Docker-Repository zu APT-Quellen hinzu:
<code><pre>
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
</pre></code>
Aktualisieren Sie als nächstes die Paketdatenbank mit den Docker-Paketen aus dem neu hinzugefügten Repository:
<code><pre>
sudo apt update
</pre></code>
Stellen Sie sicher, dass Sie vom Docker-Repo anstelle des Standard-Debian-Repos installieren:
<code><pre>
apt-cache policy docker-ce
</pre></code>
Die Ausgabe sieht folgendermaßen aus, obwohl die Versionsnummer für Docker möglicherweise anders ist:<br />
<br />
Ausgabe von <code><b>apt-cache policy docker-ce</b></code>:
<code><pre>
docker-ce:
Installed: (none)
Candidate:
Version table:
500
500 https://download.docker.com/linux/debian buster/stable amd64 Packages
</pre></code>
Beachten Sie, dass “docker-ce“ nicht installiert ist, der Kandidat für die Installation jedoch aus dem Docker-Repository für Debian 10 stammt (+ buster +).<br />
<br />
Zum Schluss installieren Sie Docker:
<code><pre>
sudo apt install docker-ce
</pre></code>
Docker ist jetzt installiert, der Daemon wurde gestartet und der Prozess kann beim Booten gestartet werden. Überprüfen Sie, ob es ausgeführt wird:
<code><pre>
sudo systemctl status docker
</pre></code>
Die Ausgabe ähnelt der folgenden und zeigt, dass der Dienst aktiv ist und ausgeführt wird:
<code><pre>
Output> docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: (running) since Mon 2019-07-08 15:11:19 UTC; 58s ago
Docs: https://docs.docker.com
Main PID: 5709 (dockerd)
Tasks: 8
Memory: 31.6M
CGroup: /system.slice/docker.service
5709 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
</pre></code>
Wenn Sie Docker installieren, erhalten Sie nicht nur den Docker-Dienst (Daemon), sondern auch das Befehlszeilenprogramm “docker“ oder den Docker-Client. Wir werden später in diesem Tutorial untersuchen, wie der Befehl “docker“ verwendet wird.
<h3>Links:</h3>
<ul>
<li><a href="https://www.codeflow.site/de/article/how-to-install-and-use-docker-on-debian-10" target=_blank>Codeflow : Installation Docker auf Debian 10</a></li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://www.howtoforge.de/anleitung/so-installierst-du-docker-unter-debian-11/" target="_blank" rel="noreferrer noopener">HowToForge :: Installation von Docker unter Debian 11</a></li>
</ul>
</html>
<html>
<ul>
<li>OVA, “Open Virtualization Architecture“:<br />
<ul>
<li>Austauschformat für virtualisierte Umgebungen / Maschinen<br />
</li>
</ul>
</li>
<br />
<li>OVF, “Open Virtualization Format“:<br />
<ul>
<li>offener Standard, um Virtual Appliances oder allgemeiner SW,<br />
die in virtuellen Maschinen läuft, zu verpacken und zu verteilen;<br />
</li>
<br />
<li>Der OVF‐Standard ist NICHT auf bestimmte Hyperversionen<br />
oder Prozessor‐Architekturen beschränkt;<br />
</li>
</ul>
</li>
<br />
<li>OVF Package:<br />
<ul>
<li>die Einheit, die in der Verpackung & Verteilung stattfindet;</li>
<li>kann ein oder mehrere virtuelle Systeme enthalten</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><a href="https://github.com/v2tec/watchtower" target=_blank>WatchTower (automatisch Image-Updates installieren)</a></li>
<br />
<li><a href="https://github.com/portainer/portainer" target=_blank>Portainer (Web-GUI für Docker)</a></li>
</ul>
(Stand: 2019)
</html>
<html>
<ul>
<li><h3>How to view Docker logs</h3>
You can use the <code><b>docker logs</b></code> command to fetch whatever is going on with the service inside a running container.
The syntax is simple:
<code><pre>
docker logs container_name_or_ID
</pre></code>
You probably already know that you can use the docker ps command to view the running containers' name and ID.
Let's take a real-world example. I have deployed Nextcloud with Docker. The container is named nextcloud, unsurprisingly.
Now, to view the logs of the container named nextcloud, use:
<code><pre>
docker logs nextcloud
</pre></code>
Here's a truncated version of the output of the above command:
<code><pre>
172.18.0.2 - - [23/Jul/2021:19:36:09 +0000] "HEAD /.env HTTP/1.1" 302 1571 "-" "python-requests/2.26.0"
172.18.0.2 - - [23/Jul/2021:19:49:52 +0000] "HEAD /c99.php HTTP/1.1" 302 1565 "-" "python-requests/2.26.0"
172.18.0.2 - - [24/Jul/2021:16:25:23 +0000] "HEAD /backup.tar HTTP/1.1" 302 1571 "-" "python-requests/2.26.0"
172.18.0.2 - - [24/Jul/2021:16:25:24 +0000] "HEAD /backup.zip HTTP/1.1" 302 1569 "-" "python-requests/2.26.0"
172.18.0.2 - - [25/Jul/2021:20:36:01 +0000] "GET / HTTP/1.1" 302 1590 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko; compatible; BW/1.1; bit.ly/2W6Px8S) Chrome/84.0.4147.105 Safari/537.36"
172.18.0.2 - - [25/Jul/2021:20:36:07 +0000] "GET /custom_apps/richdocumentscode/proxy.php?req=/hosting/capabilities HTTP/1.1" 200 721 "-" "Nextcloud Server Crawler"
172.18.0.2 - - [25/Jul/2021:20:36:04 +0000] "GET /login HTTP/1.1" 200 7501 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko; compatible; BW/1.1; bit.ly/2W6Px8S) Chrome/84.0.4147.105 Safari/537.36"
</pre></code>
Too much of logs? The good thing is that there are various options that make viewing docker logs a lot easier, just like logs in Linux.
</li>
<li><h3>Tail Docker logs to view only certain number of lines</h3>
Docker logs command has --tail attribute that can be used in a fashion similar to the tail command.
Which means, you can use it to display only a certain number of lines of Docker logs from the end.
For example, to view the last 50 lines of a container, you can use:
<code><pre>
docker logs --tail 50 container_name_or_ID
docker logs -n=50 container_name_or_ID
</pre></code>
</li>
<li><h3>Viewing Docker logs in real-time on a live container</h3>
You can totally view the container logs in real time. To “follow“ the logs, use the --follow or the -f attribute.
<code><pre>
docker logs -f container_name_or_ID
</pre></code>
When you run docker logs with follow option, you'll notice that the new log lines will be reported from the container as time progresses.
To exit, you can simply use the Ctrl+C key combination and drop back to the terminal prompt.
Most of the options in the docker logs sub-command can be combined to produce a desired result.
For example, docker logs -f will flood the screen with all the logs from the beginning. You wouldn't want that. What you can do is to combine both tail and follow options like this:
<code><pre>
docker logs -f --tail 20 container_name_or_ID
</pre></code>
The above command will show the last 20 lines of the logs and then follow the logs in real time.
When updating your app containers with scaling, the above command can be very helpful before you remove an older container.
</li>
<li><h3>View timestamp in Docker logs</h3>
If you also want to see the timestamp of the log entries, you can use the -t option.
<code><pre>
docker logs -t container_name_or_ID
</pre></code>
This can easily be combined with other options like --follow and --tail.
The command below will show the last 10 lines of the log file of a given container with timestamps attached to each of them
<code><pre>
docker logs -n=10 -t container_name_or_ID
</pre></code>
</li>
<li><h3>Viewing Docker logs in a specified time period</h3>
When you are investigating an issue, time can be a critical factor, in which case the --since and --until flags could prove very helpful.
For example, if you are investigating an issue that occurred in the past 24 hours, the following command will show the logged contents of whatever happened only during that time:
<code><pre>
docker logs --since 1440m -t container_name_or_ID
</pre></code>
1440m in the above command denotes 24∗60 minutes. Adding the -t or the --timestamps flag ensures the reported lines get labeled with a timestamp for you to comprehend incidents or errors even more easily. I'd suggest adding it when inquiring any container.
Similarly, if you require the log details after the first 24 hours of initiating deployment, the equivalent command would be:
<code><pre>
docker logs --until 1440m -t nextcloud
</pre></code>
Other than specifying time in minutes, the above two flags can also be used with a specific timestamp that -t generates. The format is like 2021-07-28T06:20:00.
<code><pre>
docker logs --since 2021-07-28 -t container_name_or_ID
</pre></code>
The above command will show the logs from 28th July 2021.
For a complete overview of docker logs, you can also check its man page with man docker-logs.
</li>
<li><h3>Accessing Docker logs from within the container</h3>
In some interesting use-cases, you may want to go for a hybrid approach, where you access the application specific logs from within the containers.
To do that, you enter the Docker container:
<code><pre>
docker exec -it container_name_or_ID sh
</pre></code>
And then you can use the regular Linux tools to get application related logs. One approach would be to get the process ID of the desired service using the ps command:
<code><pre>
ps aux
</pre></code>
Get the details on this process:
<code><pre>
cat /proc/PID_of_process/fd/1
</pre></code>
</li>
<li><h3>Docker system service logs</h3>
If you wish to see the logs of the Docker service itself on the host, you can use <a href="https://linuxhandbook.com/journalctl-command/" target="_blank" rel="noreferrer noopener">journalctl</a> if you are on Ubuntu 16.04 or later:
<code><pre>
sudo journalctl -u docker
</pre></code>
</li>
<li><h3>Where are Docker logs stored?</h3>
You should find the docker logs in the /var/lib/docker/containers directory on the host system. This directory contains the log files related to all containers in their individual directories. You can identify the directories with the container ID.
I used the docker ps to find that 70f19fde9076 is the container ID of the Nextcloud container.
If I look into the directory where docker logs are stored:
<code><pre>
avimanyu@localhost:~$ sudo ls -lh /var/lib/docker/containers
total 16K
drwx------ 4 root root 4.0K Jul 27 18:48 0efe12b28562c42619e533ad5f524d56740a7a3739d9e082c758bac95ae2a46f
drwx------ 4 root root 4.0K Jul 27 18:57 12c55f365f93ecb7f91e40bc130ddc2409216a61bbb244cd045a22b4513416d3
drwx------ 4 root root 4.0K Jul 27 18:58 70f19fde907672b9a6e5ff3b7db0c9ecbcb68d419712cb04d03d77694cd2ca4e
drwx------ 4 root root 4.0K Jul 27 18:57 a436399ef16a3efc0a909b9c3f725938e595e0b8fd34644b13f28b2c9bcb4ed7
</pre></code>
There are currently four containers running, and you can see that the third one matches the one we need to look into (it begins with 70f19fde9076).
If you check the contents of this directory, you can see that our log file sits right there!
<code><pre>
avimanyu@localhost:~$ sudo ls -lh /var/lib/docker/containers/70f19fde907672b9a6e5ff3b7db0c9ecbcb68d419712cb04d03d77694cd2ca4e
total 192K
-rw-r----- 1 root root 150K Jul 27 18:58 70f19fde907672b9a6e5ff3b7db0c9ecbcb68d419712cb04d03d77694cd2ca4e-json.log
drwx------ 2 root root 4.0K Jul 19 17:10 checkpoints
-rw------- 1 root root 5.5K Jul 27 18:58 config.v2.json
-rw-r--r-- 1 root root 1.5K Jul 27 18:58 hostconfig.json
-rw-r--r-- 1 root root 13 Jul 27 18:58 hostname
-rw-r--r-- 1 root root 198 Jul 27 18:58 hosts
drwx------ 3 root root 4.0K Jul 19 17:10 mounts
-rw-r--r-- 1 root root 79 Jul 27 18:58 resolv.conf
-rw-r--r-- 1 root root 71 Jul 27 18:58 resolv.conf.hash
</pre></code>
Therefore, the corresponding log file is 70f19fde907672b9a6e5ff3b7db0c9ecbcb68d419712cb04d03d77694cd2ca4e-json.log which is the same file that you were reading when I ran the docker logs command in the beginning.
Let me quickly verify that:
<code><pre>
avimanyu@localhost:~$ sudo cat /var/lib/docker/containers/70f19fde907672b9a6e5ff3b7db0c9ecbcb68d419712cb04d03d77694cd2ca4e/70f19fde907672b9a6e5ff3b7db0c9ecbcb68d419712cb04d03d77694cd2ca4e-json.log
{"log":"172.18.0.2 - - [23/Jul/2021:19:36:09 +0000] \"HEAD /.env HTTP/1.1\" 302 1571 \"-\" \"python-requests/2.26.0\"\n","stream":"stdout","time":"2021-07-23T19:36:09.837857567Z"}
{"log":"172.18.0.2 - - [23/Jul/2021:19:49:52 +0000] \"HEAD /c99.php HTTP/1.1\" 302 1565 \"-\" \"python-requests/2.26.0\"\n","stream":"stdout","time":"2021-07-23T19:49:52.996108799Z"}
{"log":"172.18.0.2 - - [24/Jul/2021:16:25:23 +0000] \"HEAD /backup.tar HTTP/1.1\" 302 1571 \"-\" \"python-requests/2.26.0\"\n","stream":"stdout","time":"2021-07-24T16:25:23.445225166Z"}
{"log":"172.18.0.2 - - [24/Jul/2021:16:25:24 +0000] \"HEAD /backup.zip HTTP/1.1\" 302 1569 \"-\" \"python-requests/2.26.0\"\n","stream":"stdout","time":"2021-07-24T16:25:24.772881041Z"}
{"log":"172.18.0.2 - - [25/Jul/2021:20:36:01 +0000] \"GET / HTTP/1.1\" 302 1590 \"-\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko; compatible; BW/1.1; bit.ly/2W6Px8S) Chrome/84.0.4147.105 Safari/537.36\"\n","stream":"stdout","time":"2021-07-25T20:36:03.678967877Z"}
{"log":"172.18.0.2 - - [25/Jul/2021:20:36:07 +0000] \"GET /custom_apps/richdocumentscode/proxy.php?req=/hosting/capabilities HTTP/1.1\" 200 721 \"-\" \"Nextcloud Server Crawler\"\n","stream":"stdout","time":"2021-07-25T20:36:07.404618408Z"}
{"log":"172.18.0.2 - - [25/Jul/2021:20:36:04 +0000] \"GET /login HTTP/1.1\" 200 7501 \"-\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko; compatible; BW/1.1; bit.ly/2W6Px8S) Chrome/84.0.4147.105 Safari/537.36\"\n","stream":"stdout","time":"2021-07-25T20:36:07.619020402Z"}
</pre></code>
The log contents are the same, but since I'm reading the log file directly from the host, this has a lot of jargon compared to the docker logs command used earlier.
</li>
<li><h3>Enabling Log Rotation for Docker (JSON)</h3>
By default, for JSON file based logging, log rotation on Docker is disabled.
This may pose a problem with the disk space if the log files grows bigger in size. Our <a href="https://linuxhandbook.com/deploy-ghost-docker/" target="_blank" rel="noreferrer noopener">Docker based Ghost instance</a> saw its log files going up to 20 GB in size. You would want to avoid such situation by enabling log rotation.
To enable log rotation for Docker, edit the <code><b>/etc/docker/daemon.json</b></code> file:
<code><pre>
sudo nano /etc/docker/daemon.json
</pre></code>
Append the following lines and save the file:
<code><pre>
{
"log-driver": "json-file",
"log-opts": {
"max-size": "10m",
"max-file": "3"
}
}
</pre></code>
Restart Docker daemon:
<code><pre>
sudo systemctl restart docker
</pre></code>
The above setup is of course relevant to a generic Docker installation, which has JSON logging set as default. So do note that every other logging mechanism (listed below) has its own way of implementing rotation.
</li>
<li><h3>A quick word about logging drivers</h3>
<a href="https://docs.docker.com/config/containers/logging/json-file/" target="_blank" rel="noreferrer noopener">JSON File</a> is the default logging driver on Docker.<br />
<br />
Apart from JSON, there are many other logging mechanisms to choose from as well:<br />
<br />
<ul>
<li><a href="https://docs.docker.com/config/containers/logging/local/" target="_blank"
rel="noreferrer noopener">Local file</a></li>
<li><a href="https://docs.docker.com/config/containers/logging/logentries/" target="_blank"
rel="noreferrer noopener">Logentries</a></li>
<li><a href="https://docs.docker.com/config/containers/logging/gelf/" target="_blank"
rel="noreferrer noopener">Graylog Extended Format(GELF)</a></li>
<li><a href="https://docs.docker.com/config/containers/logging/syslog/" target="_blank"
rel="noreferrer noopener">Syslog</a></li>
<li><a href="https://docs.docker.com/config/containers/logging/awslogs/" target="_blank"
rel="noreferrer noopener">Amazon Cloudwatch Logs(AWS)</a></li>
<li><a href="https://docs.docker.com/config/containers/logging/etwlogs/" target="_blank"
rel="noreferrer noopener">Event Tracing in Windows(ETW)</a></li>
<li><a href="https://docs.docker.com/config/containers/logging/fluentd/" target="_blank"
rel="noreferrer noopener">Fluentd</a></li>
<li><a href="https://docs.docker.com/config/containers/logging/gcplogs/" target="_blank"
rel="noreferrer noopener">Google Cloud Project Logs(GCP)</a></li>
<li><a href="https://docs.docker.com/config/containers/logging/journald/" target="_blank"
rel="noreferrer noopener">Journald</a></li>
<li><a href="https://docs.docker.com/config/containers/logging/splunk/" target="_blank"
rel="noreferrer noopener">Splunk</a></li>
<li><a href="https://www.elastic.co/guide/en/logstash/current/docker-config.html" target="_blank"
rel="noreferrer noopener">Logstash</a></li>
</ul>
<br />
For large-scale deployments, GELF, AWS, GCP and Fluentd are recommended as they implement a centralized approach. But for small scale, JSON does the job just fine, while Local, Syslog and Journald are also quite suitable. Syslog and Logstash are particularly very helpful if complex log analysis becomes a requirement. ETW is Windows specific, whereas Splunk is focused on remote logging.</li>
<br />
<li>Starting from <a href="https://docs.docker.com/engine/release-notes/" target="_blank" rel="noreferrer noopener">Docker Engine 20.10</a>, a new feature called <code><b>“dual-logging“</b></code> has been introduced that ensures executing the docker logs command as well as performing log rotation irrespective of the logging driver in effect.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://linuxhandbook.com/docker-logging/" target="_blank" rel="noreferrer noopener">
LinuxHandbook :: Complete Beginner's Guide to Docker Logging</a></li>
</ul>
</html>
<html>
<ul>
<li>Doxygen ist ein freies Software-Dokumentationswerkzeug unter der GNU General Public License. </li>
<li>Es ist ein Dokumentationssystem für C++, C, Java, Objective-C, Python, IDL sowie PHP, C# und D.<br />
Die Software erstellt Dokumentationen aus kommentierten Quelltexten in HTML oder Latex.</li>
</ul>
<h3>Unterstützte Ausgabeformate</h3>
<ul>
<li>Als Ausgabeformat unterstützt Doxygen:
<ul>
<li>HTML</li>
<li>CHM</li>
<li>LaTeX</li>
<li>XML</li>
<li>RTF</li>
<li>PostScript</li>
<li>PDF</li>
<li>Manpages und </li>
<li>Markdow</li>
</ul> </li>
<li>Auch lassen sich entsprechende Steuerdaten für die Erstellung von Hilfedateien für das Hilfes‐<br />
ystem von Qt erstellen. Ab Version 1.8.8 wird auch PlantUML unterstützt, um UML-Diagramme<br />
zu erstellen.</li>
</ul>
<h3>Beispiel</h3>
Die Dokumentierung einer Funktion kann wie folgt in den Quelltext eingebettet werden (hier in der <br />
Programmiersprache C):
<code><pre>
/**
* <b>\brief</b> Exemplarische Funktion
*
* Diese Funktion gibt den übergebenen Parameter
* auf der Konsole aus.
*
* <b>\param</b> parameter Auszugebender Parameter
* <b>\return</b> Status-Code
*
*/
int funktion(int parameter)
{
printf("Parameter: %d", parameter);
return 0;
}
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://www.doxygen.nl/index.html" target=_blank>Doxygen :: Homepage</a></li>
<li><a href="https://de.wikipedia.org/wiki/Doxygen" target=_blank>Wikipedia :: Doxygen</a></li>
<li><a href="https://www.heise.de/download/product/doxygen-8201" target=_blank>Heise :: Doxygen - Download</a></li>
<!-- li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li -->
</ul>
</html>
<html>
<ul>
<li>zwei Kontrahenten, die voneinander nichts wussten:
<ul>
<li><b>Frank Whittle (UK)</b><br />
<ul>
<li>1907 ‐ 1996</li>
<li>englischer Pilot, Erfinder und Geschäftsmann</li>
</ul></li>
<li><b>Hans Joachim Pabst von Ohain (D)</b><br />
<ul>
<li>1911 ‐ 1998</li>
<li>deutscher Physiker und Erfinder</li>
<li>der Familienname ist “Pabst von Ohain“</li>
<li>wurde von Ernst Heinkel (Flugzeugkonstrukteur & ‐unternehmer) engagiert;<br />
engster Mitarbeiter war Max Hahn</li>
</ul></li>
</ul></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Frank_Whittle" target="_blank" rel="noreferrer noopener">Wikipedia :: Frank Whittle</a></li>
<li><a href="https://de.wikipedia.org/wiki/Hans_Joachim_Pabst_von_Ohain" target="_blank" rel="noreferrer noopener">Wikipedia :: Hans Joachim Pabst von Ohain</a></li>
</ul>
</html>
<html>
Ever have the need to dump the contents of a partition<br />
into a single file on a remote machine. The local<br />
machine does need to be trusted by the remote machine<br />
for this to work.<br />
<br />
Use the following command:<br />
<br />
<code>
# dump 0fb - 126 [filesystem] | rsh [remote machine] '(cd [destination dir];dd of=[destination file] os=126b)' <br />
</code><br /> z.B.<br /><code>
# dump 0fb - 126 /dev/root | rsh foo '(cd /usr2/tmp;dd of=root.dump os=126b)' <br />
</code>
</html>
<html>
<ul>
<li><h3>Week 1 :: </h3></li>
<li><h3>Week 2 :: </h3></li>
<li><h3>Week 3 :: </h3>
<ul>
<li>EAR := Effective annual rate</li>
<li>APR := Annual percentage rate</li>
<li></li>
</ul>
</li>
<li><h3>Week 4 :: </h3></li>
<li><h3>Week 5 :: </h3></li>
<li><h3>Week 6 :: </h3></li>
</ul>
</html>
<html>
<h1>EMIR := European Market Infrastructure Regulation</h1><br>
<br>
<b>European Market Infrastructure Regulation</b> (Akronym EMIR) ist eine
EU-Initiative <br>
zur Regulierung des außerbörslichen Handels mit Derivat-Produkten.
Kern der <br>
Regulierung ist die Verpflichtung der Marktteilnehmer zum Clearing ihrer
außerbörslichen <br>
Standard-Derivatgeschäfte über eine Central Counterparty sowie die
Meldung dieser <br>
OTC-Geschäfte an ein Transaktionsregister. Mit der EU-Verordnung Nr.
648/2012 <br>
über OTC-Derivate, zentrale Gegenparteien und Transaktionsregister
erlangte EMIR <br>
unmittelbare Rechtswirkung für die EU-Mitgliedsländer. Mit der
Umsetzung von EMIR <br>
ist die EU-Behörde ESMA betraut.<br>
<br>
<b>Geschichte</b><br>
<br>
Am 15. September 2008 meldete Lehman Brothers Insolvenz an und
verschärfte damit die globale Finanzkrise.<br>
<br>
Die Staats- und Regierungschefs der
führenden Industrienationen beschlossen im September 2009 im Rahmen des
G-20-Gipfels von Pittsburgh, den
außerbörslichen Derivatehandel("OTC-Derivatehandel")
transparenter und sicherer zu machen. Dazu sollten spätestens per Ende
2012 standardisierte OTC-Derivat-Geschäfte über zentrale
Gegenparteien ("Central Counterparty&qout;) abgewickelt werden.
Für OTC-Derivat-Geschäfte, die nicht durch das zentrale Clearing
laufen, sollen dann höhere Kapitalanforderungen zur Kreditsicherung
gelten. Alle OTC-Derivat-Geschäfte sollen an Transaktionsregister
("Trade Repository&qout;) gemeldet werden. Mit der
Überwachung der Umsetzung wurde das Financial Stability Board (FSB)
betraut.[1]<br>
<br>
Im Juli 2012 erließen Europäisches Parlament und
Europäischer Rat die Verordnung (EU) Nr. 648/2012
über OTC-Derivate, zentrale Gegenparteien und Transaktionsregister
(EMIR), mit deren Umsetzung ESMA beauftragt ist.[2]<br>
<br>
<b>Inhalt der Verordnung</b><br>
<br>
Wesentlicher Inhalt von EMIR sind drei Dinge:<br>
<br>
Clearingpflicht: Standardisierte
OTC-Derivat-Geschäfte müssen über eine Central Counterparty
(CCP) abgewickelt werden.<br>
Risikomanagement: Auch für OTC-Derivat-Geschäfte, die aufgrund
ihrer Struktur nicht für das zentrale Clearing geeignet sind, haben
die <br>
Vertragsparteien besondere Anforderungen an das Risikomanagement zu
beachten.<br>
Meldepflicht:
OTC-Derivat-Geschäfte sind an ein Transaktionsregister ("Trade
Repository") zu melden.<br>
<br>
Als clearing- und meldepflichtige Derivatgeschäfte (Optionen,
Terminkontrakte, Swaps, Zinsausgleichsvereinbarungen und alle anderen <br>
Derivatkontrakte) im Sinne von EMIR gelten folgende Finanzinstrumente
gemäß MiFID-Definition:[3]<br>
<br>
Derivatgeschäfte in Bezug auf Wertpapiere, Währungen, Zinssätze
oder &dasherträge, oder andere Derivat-Instrumente, finanzielle Indizes
oder <br>
Messgrößen, die effektiv geliefert oder bar abgerechnet werden
können,<br>
Derivatgesch&aouml;fte in Bezug auf Waren, die bar abgerechnet werden
müssen oder auf Wunsch einer der Parteien bar abgerechnet werden
können,<br>
Derivatgeschäfte in Bezug auf Waren, die effektiv geliefert werden
können, vorausgesetzt, sie werden an einem geregelten Markt und/oder
über ein <br>
MTF gehandelt,<br>
Sonstige Derivatgeschäfte in Bezug auf Waren, die effektiv geliefert
werden können, nicht kommerziellen Zwecken dienen, und die Merkmale <br>
anderer derivativer Finanzinstrumente aufweisen,<br>
Derivatgeschäfte für den Transfer von Kreditrisiken,<br>
Finanzielle Differenzgeschäfte,<br>
Derivatgeschäfte in Bezug auf Klimavariablen, Frachtsätze,
Emissionsberechtigungen, Inflationsraten und andere offizielle
Wirtschaftsstatistiken, die <br>
bar abgerechnet werden müssen oder auf Wunsch einer der Parteien bar
abgerechnet werden können.<br>
<br>
Die Clearingpflicht gilt für Handelsteilnehmer aus dem Finanzbereich
("financial counterparties"), die in der Europäischen Union
der Finanzaufsicht unterliegen. Damit sind insbesondere
Wertpapierhändler, Kreditinstitute, Versicherungsunternehmen (Sach und
Leben), <br>
Rückversicherungsunternehmen, Investmentfonds
gemäß OGAW-Richtlinie, Pensionsfonds sowie alternative
Investmentfonds gemäß AIFM-Richtlinie eingeschlossen.[4]
Handelsteilnehmer aus dem Nicht-Finanzbereich ("non-financial
counterparties&auot;) sollen ebenfalls den EMIR-Regeln unterliegen, soweit
dies "zweckmäßig" ist.[5] Praktisch gesehen soll die
Clearingpflicht für diejenigen Handelsteilnehmer aus dem
Nicht-Finanzbereich gelten, die in einem größeren Umfang Derivate
einsetzen, die nicht nur der Absicherung der wirtschaftlichen Risiken ihrer
Geschäftstätigkeit dienen. Von der Clearingpflicht ausgenommen
werden kann hingegen die Absicherung von Risiken in direktem Zusammenhang mit
den kommerziellen Aktivitäten oder der Finanzierung durch das Treasury
eines Unternehmens.<br>
<br>
<b>Umsetzung</b>
EMIR trat zwanzig Tage nach Veröffentlichung im EU-Amtsblatt in Kraft,
also am 16. August 2012.[2] Am 27. September 2012 veröffentlichte die
ESMA den finalen Entwurf für regulatorische (RTS) und technische
(ITS) Standards als Durchführungsbestimmung von EMIR.[6] Die
Auswirkungen der EMIR-VO auf den deutschen Finanzplatz lassen sich noch nicht
endgültig absehen. Abgesehen von technischen Umsetzungsproblemen
zeichnet sich aber eine den deutschen Finanzplatz durchaus im Wettbewerb
stärkende Wirkung ab.[7]<br>
<br>
<b>Weblinks</b>
Volltext der EMIR-Richtlinie Nr. 648/2012 auf EUR-Lex (englisch /
deutsch)<br>
Dokumente zum Bereich Post-Trading (EMIR) auf der Website der ESMA<br>
Finanzderivate: EMIR auf der Website der EU-Kommission
für den
Europäischer Binnenmarkt<br>
<br>
Quelle: Wikipedia<br>
</html>
<html>
<ul>
<li>EPE :: ?</li>
<li>CVA :: Credit Value Adjustment</li>
<li>DVA :: Debt Value Adjustment ?</li>
<li>FVA :: ?</li>
<li>MVA :: Market Value Adjustment ?</li>
</ul>
</html>
<html>
To echo all lines in a file upto the first blank <br />
line use the following:<br />
<code><pre>
awk '$0 ~ /^$/ {exit;} {print $0;}' <file_name>
</pre></code>
The awk script can be used for printing lines upto the<br />
first occurence of any pattern.<br />
<br />
Just substitute ^$ with the pattern.<br />
<br />
I wrote this script to parse http server headers.<br />
<br />
This tip generously supported <br />
by: anand@anandraman.net<br />
</html>
<html>
<h3>Stepping through the execution of a Java program</h3>
When a thread is suspended, the step controls can be used to step through the execution of the program line-by-line. If a breakpoint is encountered while performing a step operation, the execution will suspend at the breakpoint and the step operation is ended.
<h3>Step over</h3>
Select a stack frame in the Debug View. The current line of execution in that stack frame is highlighted in the editor in the Debug Perspective.
Click the Step Over button [ Step Over ] in the view toolbar, or press the F6 key. The currently-selected line is executed and suspends on the next executable line.
<h3>Step into</h3>
Select a stack frame in the Debug View. The current line of execution in the selected frame is highlighted in the editor in the Debug Perspective.
Click the Step Into button [ Step Into ] in the view toolbar, or press the F5 key. The next expression on the currently-selected line to be executed is invoked, and execution suspends at the next executable line in the method that is invoked.
<h3>Step into Selection</h3>
Select a stack frame in the Debug View. The current line of execution in the selected frame is highlighted in the editor in the Debug Perspective.
In the Java Editor, within the current line of execution, place the cursor on the name of a method that you would like to step into.
Click the Step into Selection action in the Run menu or Java editor context menu, or press the Ctrl-F5 key. Execution resumes until the selected method is invoked.
<h3>Step with filters</h3>
Toggle the Use Step Filters button [ Use Step Filters ] in the Debug view toolbar, or use Shift+F5. When the action is toggled on, each of the step actions (over, into, return) will apply the set of step filters which are defined in the Opens the Step Filtering preference page Java > Debug > Step Filtering preference page. When a step action is invoked, stepping will continue until an unfiltered location is reached or a breakpoint is encountered.
<h3>Step Return</h3>
Select a stack frame in the Debug View. The current line of execution in the selected frame is highlighted in the editor in the Debug Perspective.
Click the Step Return button [ Step Return ] in the view toolbar or press the F7 key. Execution resumes until the next return statement in the current method is executed, and execution suspends on the next executable line.
<h3>Run to line</h3>
When a thread is suspended, it is possible to resume execution until a specified line is executed. This is a convenient way to suspend execution at a line without setting a breakpoint.
Place your cursor on the line at which you want the program to run.
Select the Run to Line command [ Run To Line ] from the pop-up menu or use Ctrl+R. Program execution is resumed and suspends just before the specified line is to be executed.
It is possible that the line will never be hit and that the program will not suspend.
Breakpoints and exceptions can cause the thread to suspend before reaching the specified line.
<h3>Link:</h3>
<a href="https://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-stepping.htm" target=_blank>Eclipse :: Help</a>
</html>
<html>
Auf dieser Seite stehen nützliche Informationen, die den täglichen <br />
Umgang mit Eclipse erleichtern. Sofern nicht anders angegeben,<br />
beziehen sich die einzelnen Tipps auf die Version 3.3.1.1 (Build: <br />
M20071023-1652), oder sie sind zumindest mit dieser Version<br />
kompatibel. Die meisten allgemeinen Tipps funktionieren aber<br />
auch schon mit früheren Versionen.
<h2><a name="toc">Inhaltsverzeichnis</a></h2>
<ul>
<li><A HREF="#first"> <b>Tipp 1:</b> Quickfix (Strg+1)</A></li>
<li><A HREF="#second"> <b>Tipp 2:</b> Content Assist (Strg+Leertaste)</A></li>
<li><A HREF="#third"> <b>Tipp 3:</b> Template Erweiterungen</A></li>
<li><A HREF="#fourth"> <b>Tipp 4:</b> Content Assist funktioniert nicht</A></li>
<li><A HREF="#fifth"> <b>Tipp 5:</b> Eclipse akzeptiert die Eingabe von } nicht mehr</A></li>
<li><A HREF="#sixth"> <b>Tipp 6:</b> Einbinden des Quellcodes von Eclipse in den eigenen Workspace</A></li>
<li><A HREF="#seventh"> <b>Tipp 7:</b> Verstecken von Binary Plug-Ins im eigenen Workspace</A></li>
<li><A HREF="#eigthth"> <b>Tipp 8:</b> Codenavigation mit Strg+Linksklick</A></li>
<li><A HREF="#nineth"> <b>Tipp 9:</b> Codenavigation mit der Type Hierarchy</A></li>
<li><A HREF="#tenth"> <b>Tipp 10:</b> Codenavigation mit der Call Hierarchy</A></li>
</ul>
<h3><A NAME="first">Tipp 1: Quickfix (Strg+1)</A></h3>
Ein Fehler in einem Java Programm lässt sich "automatisch" <br />
von Eclipse beheben. Dazu springt der Benutzer mit dem <br />
Cursor in die fehlerhafte Zeile und drückt Strg+1 (oder wählt <br />
“Edit/Quick Fix“ aus dem Menü). Eclipse schlägt daraufhin<br />
eine Reihe von Möglichkeiten vor und nachdem der Program‐<br />
mierer sich für eine Variante entschiden hat, führt Eclipse sie <br />
aus:
<img src="./pictures/QuickFix_01.jpg" height=533 width=732 />
<br />
<a href="#toc">Zurück</a>
<h3><A NAME="second">Tipp 2: Content Assist (Strg+Leertaste)</A></h3>
Jede Menge Tipparbeit spart der Programmierer, wenn er nicht den gesamten Variablen-, bzw. Klassennamen eintippen muss, sondern nur die ersten paar Buchstaben eintippt und dann via Content Assist (Strg+Leertaste, oder Edit/Content Assist/Default) den Rest vervollständigen lässt:
<img src="./pictures/ContentAssist.jpg" height=535 width=486 />
<br />
<a href="#toc">Zurück</a>
<h3><A NAME="third">Tipp 3: Template Erweiterungen</A></h3>
Hinter der Tastenkombination Strg+Leertaste verbirgt sich nicht nur die Content Assist Funktion von Eclipse. Mit derselben Tastenkombination können auch beliebig definierte Templates (Schablonen) erweitert werden. So führt die Eingabe von "sysout" gefolgt von Strg+Leertaste zum Beispiel dazu, dass Eclipse automatisch "System.out.println();" schreibt, was dem Benutzer wieder jede Menge Tipparbeit erspart. Eigene Templates können unter "Window/Preferences" und dann "Java/Editor/Templates" erstellt werden.
<br />
<a href="#toc">Zurück</a>
<h3><A NAME="fourth">Tipp 4: Content Assist funktioniert nicht</A></h3>
Normalerweise erledigt Eclipse beim Programmieren einen Großteil der Arbeit, indem es die halb eingegebenen Bezeichnernamen vervollständigt. Aber ab und an kommt es vor, dass das Tastaturkürzel (Strg+Leertaste) seinen Dienst versagt, obwohl der Menüpunkt "Edit/Content Assist/Default" noch funktioniert. Nun kann natürlich das Tastaturkürzel auf ein beliebiges anderes umstellen, indem die Einstellungen in Eclipse verändert werden: Dazu wählt man im Menü "Window/Preferences..." dann "General/Keys". Dort kann man im Filter "Content Assist" eingeben und dann die Belegung für den Content Assist neu definieren (das funktioniert natürlich auch für alle anderen Tastaturbindungen innerhalb von Eclipse). Trotzdem ist das keine gute Lösung, vor allem wenn man schon einige Zeit mit Eclipse entwickelt hat. Die Ursache dafü, dass Content Assist nicht funktioniert hat (zumindest in meinem Fall), war ein neu installiertes Programm: Mit der Logitech Quick-Cam unter Windows XP wird die Tastenkombination "Strg+Leertaste" umdefiniert. Bei mir half es, das Programm zu deaktivieren.
<br />
<a href="#toc">Zurück</a>
<h3><A NAME="fifth">Tipp 5: Eclipse akzeptiert die Eingabe von } nicht mehr</A></h3>
Als Javaprogrammierer ist es besonders ärgerlich, wenn man die geschlossene geschweifte Klammer ("}") nicht mehr eingeben kann. Zwar ist das in Eclipse eigentlich gar nicht nötig, weil Eclipse durch Autovervollständigungen immer die richtigen Klammern setzt, aber doch ist es hin und wieder nötig, selbst eine } zu setzen. Merkwürdig ist dann, wenn es auf einmal nicht mehr funktioniert. Alle anderen Eingaben funktionieren einwandfrei und auch die } kann in anderen Programmen gesetzt werden. Was ist also los? Im deutschen Tastaturlayout ist die } auf Alt Gr+0. Bei meiner damaligen Eclipse Version (ich kenne die Versionsnummer nicht mehr) war unter den Tastaturbelegungen die Kombination "Strg+Alt+0" vergeben. Strg+Alt ist vom ASCII-Code her identisch mit Alt Gr, so dass bei jedem Druck auf } der an "Strg+Alt+0" gebundene Befehl ausgeführt wurde. Nachdem ich die Tastaturbindung entfernt hatte ("Window/Preferences...", "General/Keys"), funktionierte auch die Eingabe der } wieder.
<br />
<a href="#toc">Zurück</a>
<h3><A NAME="sixth">Tipp 6: Einbinden des Quellcodes von Eclipse in den eigenen Workspace</A></h3>
Bei der Entwicklung von Plug-Ins für Eclipse ist es ungemein hilfreich, in den bereits existierenden Plug-Ins nachzusehen, wie etwas programmiert worden ist. Daher gibt es die Möglichkeit, alle Eclipse Plug-Ins in den eigenen Workspace zu importieren. Daraufhin können dann alle Plug-Ins normal durchsucht werden und der Entwickler kann Funktionen kopieren (im Eclipse Umfeld wird diese Vorgehensweise oft als "Monkey See/Monkey Do" umschrieben). Importieren wir also alle "Binary Projects" in den Workspace:
<img src="./pictures/ImportBinary1.jpg" height=1070 width=729 />
Nun arbeitet Eclipse eine Weile und importiert alle Plug-Ins und Features. Wenn Eclipse fertig ist, können die Quellen von allen Eclipse Plug-Ins betrachtet werden. Zum Beispiel findet sich unter "org.eclipse.jdt.core/References Libraries/org.eclipse.jdt.core/xxx.jar" der gesamte Quellcode des jdt.core Pakets:
<img src="./pictures/ImportBinary2.jpg" height=338 width=593 />
<br />
<a href="#toc">Zurück</a>
<h3><A NAME="seventh">Tipp 7: Verstecken von Binary Plug-Ins im eigenen Workspace</A></h3>
Es ist ja schön, den gesamten Eclipse Code zur Verfüung zu haben, während man an eigenen Plug-Ins bastelt, aber die große Zahl von Eclipse Plug-Ins kann die Übersicht im Workspace ganz schön verderben. Daher können die Binary Plug-Ins bequem ausgeblendet werden, indem man im Kontextmenü des Package Explorers einen Filter für Binary Plug-Ins und Feature Projects aktiviert:<br />
<img src="./pictures/FilterBinary.jpg" height=774 width=409 /><br />
Und damit sind dann die störenden Eclipse Plug-Ins ausgeblendet. Mit einem einfachen Klick auf den aktivierten Filter im Kontextmenü können sie wieder eingeblendet werden.
<br />
<a href="#toc">Zurück</a>
<h3><A NAME="eigthth">Tipp 8: Codenavigation mit Strg+Linksklick</A></h3>
Im Java Editor kann an jede beliebige Methodendefinition gesprungen werden, indem der entsprechende Methodenaufruf bei gedrückter Strg-Taste mit der linken Maustaste angeklickt wird. So führt Strg+Linksklick auf den Aufruf "saveCurrentCard" im folgenden Codeschnipsel zu der Definition von saveCurrentCard, die sich in einer ganz anderen Klasse befindet. Natürlich lassen sich nicht nur Methodenaufrufe auf diese Art zurück zur Definition verfolgen, sondern auch Klassenaufrufe, Variablennutzungen, etc.
<img src="./pictures/StrgKlickNavigation.jpg" height=334 width=581 />
<br />
<a href="#toc">Zurück</a>
<h3><A NAME="nineth">Tipp 9: Codenavigation mit der Type Hierarchy</A></h3>
Als Java Programmierer möchte man sich oft einen Überblick über die aktuelle Klassenhierarchie verschaffen. Dazu gibt es in Eclipse die (Type-)Hierachy View, in der Vererbungshierarchien angezeigt werden können. Um die Hierarchie einer bestimmten Klasse zu erfragen, drückt man "F4" im offenen Editor (oder man klickt mit der rechten Maustaste an eine beliebige Stelle in einer Klasse deren Hierarchie dargestellt werden soll und wählt "Open Type Hierachy"). Alternativ kann man auch "Strg+T" drücken, oder "Quick Type Hierarchy" aus dem Kontextmenü aufrufen, woraufhin die gleiche Information in einem Extra-Dialog geöffnet wird.
<br />
<a href="#toc">Zurück</a>
<h3><A NAME="tenth">Tipp 10: Codenavigation mit der Call Hierarchy</A></h3>
Eines der nützlichsten Features von Eclipse, wenn es darum geht, Code zu verstehen, ist meines Erachtens die "Call Hierarchy", mit deren Hilfe der Programmierer schnell feststellen kann, welche Methoden eine ausgewählte Methode aufrufen, bzw. welche Methoden von einer bestimmten Methode aufgerufen werden. Zur Ermittlung der Methodenaufrufe wird ausschließlich statische Analyse benutzt, weshalb die Resultate etwas "unscharf" sein können, aber als Hilfe beim Codeverstehen ist die Call Hierachy sehr effektiv. Um sie für eine Methode im Editor zu öffnen, bewegt man den Cursor auf die Methodendeklaration und drückt "Strg+Alt+H" (oder Alternativ auch "Alt Gr+H") oder wählt nach einem Rechtsklick den Punkt "Open Call Hierarchy":
<img src="./pictures/CallHierarchy.jpg" height=217 width=614 />
<br />
<a href="#toc">Zurück</a>
<h3>Link:</h3>
<a href="https://wiki.fernuni-hagen.de/eclipse/index.php/Tipps_und_Tricks" target=_blank>FernUni Hagen :: Eclipse-Wiki - Tipps und Tricks</a><br />
<br />
<br />
</html>
<html>
Forget where you put your files?<br />
<br />
Rather than specifying an absolute pathname,<br />
use command substitution instead.<br />
<br />
Instead of:<br />
<br />
<code>
% vi /usr/local/bin/foo<br />
</code>
<br />
Try:<br />
<br />
<code>
% vi `which foo`<br />
</code>
<br />
NOTE: files must be in your path for "which" to find them.<br />
<br />
This tip generously supported by: thockin@ais.net
</html>
<html>
Ever failed to open a very large file for editing in vi. <br />
Just try this tip:<br />
<br />
Suppose you want to make changes in top 500 <br />
lines of a 100 line file abc.txt.<br />
<br />
<code>
tail +500 abc.txt > tail.txt<br />
head -500 abc.txt > head.txt<br />
</code>
<br />
Edit file head.txt by opening in a vi editor.<br />
<br />
Now append file tail.txt to head.txt by:<br />
<br />
<code>
cat tail.txt >> head.txt<br />
mv head.txt > abc.txt<br />
rm head.txt tail.txt<br />
</code>
<br />
This tip generously supported <br />
by: akash@cadence.com<br />
</html>
<html>
im Verzeichnis <ul>
<li><b>/usr/share/applications</b> [global] </li>
bzw.
<li><b><HomeDir vom User>/.local/share/applications</b> [lokal] </li>
</ul>
eine separate Datei mit Endung "desktop" erstellen.<br>
<br>
<u>Beispiel:</u><br>
<b>/usr/share/applications # less gsharp.desktop</b>
<pre><code>[Desktop Entry]
X-SuSE-translate=true
Version=1.0
Name=gsharp
Comment=Write C# in an interactive shell, and inject your code into running Mono processes
GenericName=Interactive C# Shell
Exec=/usr/bin/gsharp
#Icon=gnome-terminal
StartupNotify=true
Terminal=false
Type=Application
Categories=Debugger;Development;</code></pre>
<br>
Falls es zu Problemen beim Aufruf aus dem Startmenue kommt<br />
(die Applikation lässt sich nicht starten o. das Icon ist nicht<br />
richtig), dann im *.desktop-File die absoluten Pfade für die Ein–<br />
träge "Exec" (hier das Aufruf-Programm/Skript) und "Icon"<br />
(hier das png-File) eintragen.<br />
</html>
<html>
Here is a simple script which helps in eliminating <br />
multiple spaces when one wants to extract a <br />
particular column in a set of records from a file.<br />
<br />
Here is an example to prove the same:
<code><pre>
ps -u $LOGNAME | tr -s " " : | cut -d: -f<column #>
</pre></code>
The above script line can be used to extract a <br />
column from the output of a ps command for<br />
a particular user ($LOGNAME).<br />
<br />
This tip generously supported <br />
by: arunkv@lucent.com<br />
</html>
* MILF :=: Mother I'd like to f*ck
* Cameltoe :=: Sichtbarer Schritt bei Frauen
* Yeet :=: emotionaler Ausruf
* ASMR :=: Autonomous Sensory Meridian Response
* Gosu :=: Experte (Gamer-Szene)
* Glitch :=: Störung
* RPG :=: Role Playing Game
* Boon/Noob :=: Anfänger im Spiel
* Yallah :=: Beeil dich!
* O.G. :=: Original Gangsta
* FAQ :=: Frequently Asked Questions
* Hood :=: Nachbarschaft
* tbh :=: to be honest
https://www.netzwelt.de/quiz/90_13-abkuerzungen-quiz-bedeuten-milf-idk-co.html
<html>
There are three types of conditional sentences.
<table>
<tr><th>type</th><th>condition</th></tr>
<tr><td>I </t><td>condition possible to fulfill</td></tr>
<tr><td>II </t><td>condition in theory possible to fulfill</td></tr>
<tr><td>III </t><td>condition not possible to fulfill (too late)</td></tr>
</table>
<table>
<tr align="center"><th></th><th><em>if‐sentence</em></th><th><em>conclusion (Hauptsatz)</em></th></tr>
<tr><td><b><em>The Zero Conditional:</em></b></td><td>Present Simple</td><td>Present simple</td></tr>
<tr><td><b><em>The First Conditional:</em></b></td><td>Present Simple</td><td>“will“ + infinitive</td></tr>
<tr><td><b><em>The First Conditional:</em></b></td><td>Past Simple</td><td>“would“ + infinitive</td></tr>
<tr><td><b><em>The Third Conditional:</em></b></td><td>Past Perfect</td><td>“would“ + “have“ + past participle</td></tr>
</table>
<p>
(Notice we can put 'if' at the beginning, or in the middle. It doesn't matter at all.)
</p>
<h3>Links:</h3>
<ul>
<li><a href="https://www.perfect-english-grammar.com/conditionals.html" target="_blank" rel="noreferrer noopener">
Perfect english grammar :: Conditionals
<li><a href="https://www.englisch-hilfen.de/en/grammar/if.htm" target="_blank" rel="noreferrer noopener">englisch‐hilfen.de :: Conditional sentences, if‐clauses type I, II, III</a></li>
</ul>
</html>
<html>
<code>
linux-188m:/etc # cat SuSE-release<br />
<br />
</code>
Inhalt des Files (Bsp.):<br />
<pre>
openSUSE 12.1 (i586)
VERSION = 12.1
CODENAME = Asparagus
</pre>
<br />
</html>
<html>
<h3>Mittags Obst - abends Gemüse und Milchprodukte</h3>
<ul>
<li>Diejenigen, die abends Gemüse konsumierten, hatten ins–<br />
gesamt eine niedrigeres Erkrankungs- und Sterberisiko in<br />
Bezug auf Krebs, Diabetes und Herzkreislauferkrankungen.</li>
<br />
<li>Was tägliche Zwischenmahlzeiten anbelangt, zeigte sich<br />
ebenfalls, dass in der Gruppe der Menschen, die Früchte<br />
nach dem Frühstück konsumierten, ebenfalls ein niedri–<br />
geres Erkrankungs- und Sterberisiko bezüglich Krebs, <br />
Diabetes und Herzkreislauferkrankungen vorlag. Dassel–<br />
be gilt auch für diejenigen, die Milchprodukte als Snack <br />
nach dem Abendessen zu sich nahmen.</li>
<br />
<li>Zusammenfassend folgerten die Wissenschaftler, dass es sich am besten auf den Körper auswirkt, wenn mehr Obst zum Mittagessen und mehr Gemüse und Milchprodukte am Abend gegessen würden.</li>
<br />
<li>Eine erhöhte Aufnahme von raffiniertem Getreide, Käse, Zucker und gepökeltem Fleisch zum Mittagessen sowie eine höhere Aufnahme von kartoffel- und stärkehaltigen Lebensmitteln nach den Hauptmahlzeiten führe dagegen zu einer höheren kardiovaskulären Erkrankungsrate und somit zu einer höheren Sterblichkeit.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.focus.de/gesundheit/ernaehrung/essen-gegen-krebs-und-diabetes-obst-morgens-milch-abends-studie-zeigt-wie-der-perfekte-ernaehrungsplan-aussieht_id_13459693.html " target="_blank" rel="noreferrer noopener">
Focus Online :: Obst morgens & Milch abends</a></li>
<li><a href="https://www.focus.de/gesundheit/ernaehrung/ernaehrung-gegen-krebs-und-diabetes-obst-morgens-milch-abends-studie-zeigt-wie-der-perfekte-ernaehrungsplan-aussieht_id_13445448.html" target="_blank"
rel="noreferrer noopener">Focus Online :: Obst morgens & Milch abends ‐ Ernährungsplan</a></li>
<!--
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
-->
</ul<
</html>
<html>
<h3>Die richtigen Bakterien fördern :: 3 Nahrungsmittel, die Ihren Darm vergiften ‐ und 6, die ihn gesund halten</h3>
Wer sich langfristig falsch ernährt, wird anfälliger für Darm-Krankheiten. Denn<br />
das falsche Essen kann die schlechten Bakterien im Darm vermehren und die<br />
guten eindämmen ‐ und andersrum. Wir zeigen, wie Sie Ihren Darm gesund<br />
essen.<br />
<br />
Um die Darmschleimhaut gesund zu essen, rät Thomas Frieling von der Helios<br />
Klinik Krefeld, zu mediterraner, überwiegend vegetarischer und ballaststoffrei–<br />
cher Kost.<br />
<br />
<b>Außerdem sollten Sie folgende Nahrungsbestandteile besser meiden: </b><br />
<ol>
<li><b>Zucker:</b><br />
Auch Bakterien lieben Zucker ‐ und gerade die, die den einfachen Zucker<br />
aufspalten, vermehren sich mit diesen Leckereien sehr schnell. Das ver–<br />
drängt aber die Spezialisten für komplizierteren Zucker.</li>
<br />
<li><b>Gepökeltes, Geräuchertes und stark verarbeitete Wurstwaren:</b><br />
Diese Lebensmittel sind auf der Liste der krebserregenden Stoffe gelan–<br />
det, weshalb generell gilt, nicht mehr als 500 Gramm rotes Fleisch pro<br />
Woche zu essen.</li>
<br />
<li><b>Schlechte Fette:</b><br />
Seien Sie zurückhaltend mit Margarine, Mayonnaise und Schmalz, denn<br />
sie können den Darm belasten.</li>
</ol>
<b>Was gut für Ihren Darm ist:</b><br />
<br />
Die besten Freunde einer intakten Darmschleimhaut sind hingegen Ballast–<br />
stoffe. Sie sind zum Beispiel in <b>Hülsenfrüchten</b> wie <u>Erbsen</u>, <u>Bohnen</u>, <u>Lin–<br />
sen</u> und <u>Kichererbsen</u> enthalten, aber auch in <b>Gemüsesorten</b> wie <u>Spinat</u>, <br />
<u>Wirsing</u>, <u>Möhren</u>. <br />
<br />
Gut für den Darm sind zudem: <br />
<ul>
<li><b>Bananen:</b><br />
Sie enthalten viel Inulin. Dieser Ballaststoff wirkt sich günstig auf das Wachstum von entzündungshemmenden Darmbakterien aus.
</li>
<br />
<li><b>Fisch:</b><br />
Er punktet mit vielen ungesättigten Fettsäuren. Diese stärken die Schleimproduktion, das Zellwachstum und sorgen so dafür, dass die Schutzfunktion verbessert wird.
</li>
<br />
<li><b>Obstbrei:</b><br />
Hier geht es um die Quellstoffe: Bakterien des Darms bauen Quellstoffe zu kurzkettigen Fettsäuren ab. Diese wiederum ernähren die Schleimhaut. Quellstoffe finden sich beispielsweise im geriebenen Apfel- oder Möhrenbrei.
</li>
<br />
<li><b>Pellkartoffeln:</b><br />
Während des Abkühlens entsteht resistente Stärke, die zu Buttersäure abgebaut wird. Als kurzkettige Fettsäure liefert diese den Darmzellen Energie und regt so das Wachstum der Darmschleimhaut an.
</li>
<br />
<li><b>Graubrot:</b><br />
Es liefert wichtige Ballaststoffe und wertvolle Kohlenhydrate.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.focus.de/gesundheit/ratgeber/die-richtigen-bakterien-foerdern-3-nahrungsmittel-die-ihren-darm-vergiften-und-6-die-ihn-gesund-halten_id_11135495.html"
target="_blank" rel="noreferrer noopener">
Focus Online</a>
</li>
</ul>
</html>
<html>
Wenn Excel‐Anwender ratlos sind, wissen die Wirtschaftsprüfer von<br />
KPMG weiter. Sie haben die folgenden Lösungsvorschläge zusam‐<br />
mengestellt.<br />
<ol>
<li><h3>1. Excel‐Tabelle als erweiterte Metadatei kopieren und einfügen:</h3>
Diese Funktion hilft, unterschiedliche Buchstaben‐ und Zahlengrößen zu<br />
vermeiden. Wichtig ist, dass sie zuvor die richtige Tabellengröße ein‐<br />
stellen.<br />
<br />
<ul>
<li>Excel‐Tabelle kopieren;</li>
<li>Shift‐Taste drücken und auf “Bearbeiten“ gehen;</li>
<li>Bild kopieren/auswählen;</li>
<li>nach Word oder Powerpoint wechseln;</li>
<li>über “Bearbeiten“‐Menüpunkt den Inhalt einfügen.
</ul>
</li>
<li><h3>2. Daten mit der rechten Maustaste ziehen:</h3>
Wenn Sie Verknüpfungen oder Hyperlinks einfach erstellen wollen, gehen Sie<br />
wie folgt vor:<br />
<br />
<ul>
<li>Datenbereich auswählen;</li>
<li>mit der rechten Maustaste ziehen;</li>
<li>von den möglichen Optionen auswählen.</li>
</ul>
</li>
<li><h3>3. Importierte Zahlen als Text formatieren:</h3>
Dieser Tipp hilft bei der Arbeit mit Zellen, die Zahlen sind.<br />
<br />
<ul>
<li>Die Zahl “1“ in eine leere Zeile schreiben;</li>
<li>Zelle kopieren;</li>
<li>Zellen markieren, in denen sich die als Text formatierte Zahlen be‐<br />
finden und auf “Bearbeiten“ ‐ “Inhalte einfügen“ klicken;</li>
<li>“Alles“ wählen, multiplizieren und auf OK klicken.</li>
</ul>
</li>
<li><h3>4. Formel nach unten ziehen:</h3>
Manchmal ist Excel einfach zu schnell, wenn der Benutzer die Auswahl “Formel<br />
nach unten ziehen Markierung“ zu weit nach unten vornimmt. Stattdessen:<br />
<br />
<ul>
<li>Auf die erste Zeile klicken und kopieren;</li>
<li>In die nächste Zeile gehen, markieren und “Shift“ drücken;</li>
<li>Mit dem Pfeil bis zur gewünschten Zelle gehen und “Shift“ loslassen;</li>
<li>“Enter“ klicken.</li>
</ul>
</li>
<li><h3>5. Hyperlinks in Excel‐Tabellen anwählen, ohne sie auszuführen: </h3>
Wenn Sie eine Zelle mit einem Hyperlink anwählen wollen, ohne diesen bei<br />
einem Mausklick auszuführen, empfiehlt sich folgender Trick:<br />
<br />
<ul>
<li>Zelle mit der Maus anklicken und die linke Maustaste dabei etwas länger<br />
gedrückt halten.</li>
</ul>
</li>
<li><h3>6. Zellbezüge in Formeln ändern: </h3>
Wenn Sie die Zellbezüge von “absolut“ auf “relativ“ ändern wollen, empfiehlt<br />
sich folgendes Vorgehen:<br />
<br />
<ul>
<li>Bezug in der Bearbeitungsleiste markieren;</li>
<li>Taste “F4“ so oft drücken, bis der Bezug passt.</li>
</ul>
</li>
<li><h3>7. Ärgerliche grüne Dreieicke in Excel:</h3>
Sie stört das kleine grüne Dreieck in der oberen linken Ecke der Zelle? Dann<br />
machen Sie Folgendes:<br />
<br />
<ul>
<li>Klicken auf “Extras ‐ Optionen ‐ Fehlerprüfung“;</li>
<li>Haken bei “Nicht gesperrte Zellen enthalten Formeln“ entfernen.</li>
</ul>
</li>
<li><h3>8. E‐Mail‐Adresse nicht in einen Hyperlink verwandeln:</h3>
Normalerweise wandelt Excel eine eingegebene E‐Mail‐Adresse schnurstracks in<br />
einen Hyperlink um. So verhindern Sie das:<br />
<br />
<ul>
<li>nach der Eingabesbestätigung mit “Enter“ sofort auf den “Rückgängig“‐But‐<br />
ton drücken oder “STRG+Z“.</li>
</ul>
</li>
<li><h3>9. Suchrichtung im Excel‐Tabellenblatt umkehren:</h3>
Normalerweise suchen Sie über “STRG+F“ von oben nach unten, was manchmal<br />
lästig sein kann. Gehen Sie daher wie folgt vor, um die Suchrichtung jeder‐<br />
zeit umzukehren:<br />
<br />
<ul>
<li>Suchbegriff eingeben;</li>
<li>Tastenkombination “STRG+Umschalt“ drücken (und halten);</li>
<li>auf “Weitersuchen“ klicken.</li>
</ul>
</li>
<li><h3>10. Erstellen eines Datenblatt‐Diagramms:</h3>
Um die Entwicklung der Zahlenreihe schnell zu überblicken, machen Sie dies:<br />
<br />
<ul>
<li>Datenbereich markieren;</li>
<li>“F11“ drücken.</li>
</ul>
</li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://www.cio.de/a/10-tipps-fuer-schnelleres-arbeiten-mit-excel,2224312"
target="_blank" rel="noreferrer noopener">
CIO :: 10 Tipps für schnelleres Arbeiten mit Excel</li>
</ul>
</html>
<html>
<ol>
<li><b>Wählen Sie die erste Zelle des Bereichs aus, den Sie ausfüllen möchten.</b></li>
<br />
<li><b>Geben Sie den Wert ein, mit dem die Nummerierung beginnen soll.</b></li>
<br />
<li><b>Geben Sie in der nächsten Zelle einen Wert ein, um ein Muster festzulegen.</b></li>
<br />
Tipp : Geben Sie beispielsweise für die Zahlenreihe 1, 2, 3, 4, 5... die Werte 1 und 2 in die ersten beiden Zellen ein. Wenn die Reihe 2, 4, 6, 8... erzeugt werden soll, geben Sie 2 und 4 ein. <br />
<br />
<li><b>Wählen Sie die Zellen aus, die die Anfangswerte enthalten.</b></li>
<br />
Hinweis : In Excel 2013 und höher wird die Schaltfläche <i>Schnellanalyse</i> standardmäßig angezeigt, wenn Sie mehrere Zellen markiert haben, die Daten enthalten. Für die hier beschriebene Vorgehensweise können Sie diese Schaltfläche ignorieren. <br />
<br />
<li><b>Ziehen Sie das Ausfüllkästchen über den Zellbereich, den Sie ausfüllen möchten.</b></li>
<br />
Hinweis : Während Sie das Ausfüllkästchen über die einzelnen Zellen ziehen, wird von Excel eine Vorschau des jeweiligen Werts angezeigt. Wenn Sie ein anderes Muster verwenden möchten, ziehen Sie das Ausfüllkästchen, während Sie die rechte Maustaste gedrückt halten. Wählen Sie dann das gewünschte Muster aus. <br />
<br />
Zum Ausfüllen in ansteigender Reihenfolge ziehen Sie nach unten oder nach rechts. Zum Ausfüllen in absteigender Reihenfolge ziehen Sie nach oben oder nach links.
</ol>
<br />
Link:<br />
https://support.office.com/de-de/article/Automatische-Zeilennummerierung-76ce49e3-d8d2-459b-bd85-ee1d3973e6e6#<br />
</html>
<html>
<ul>
Drop-down lists in Excel are helpful if you want to be sure that users select an item from a list, instead of typing their own values.
<h3>Create a Drop-down List</h3>
To create a drop-down list in Excel, execute the following steps.
<ol>
<li>On the second sheet, type the items you want to appear in the drop-down list.
<br />
<img src="./pictures/Excel_DropDownList_items.png" width=604 height=195 />
<br />
Note: if you don't want users to access the items on Sheet2, you can hide Sheet2. To achieve this, right click on the sheet tab of Sheet2 and click on Hide.
</li>
<li>On the first sheet, select cell B1.
<br />
<img src="./pictures/Excel_DropDownList_select-cell.png" width=604 height=81 />
<br />
</li>
<li>On the Data tab, in the Data Tools group, click Data Validation.
<br />
<img src="./pictures/Excel_DropDownList_click-data-validation.png" width=439 height=94 />
<br />
The 'Data Validation' dialog box appears.
</li>
<li>In the Allow box, click List.</li>
<li>Click in the Source box and select the range A1:A3 on Sheet2.
<br />
<img src="./pictures/Excel_DropDownList_validation-criteria.png" width=394 height=319 />
<br />
</li>
<li>Click OK.
Result:
<br />
<img src="./pictures/Excel_DropDownList_drop-down-list.png" width=604 height=101 />
<br />
Note: to copy/paste a drop-down list, select the cell with the drop-down list and press CTRL + c, select another cell and press CTRL + v.
</li>
<li>You can also type the items directly into the Source box, instead of using a range reference.
<br />
<img src="./pictures/Excel_DropDownList_simple-drop-down-list.png" width=394 height=319 />
<br />
Note: this makes your drop-down list case sensitive. For example, if a user types yes, an error alert will be displayed.
</li>
</ol>
<h3>Allow Other Entries</h3>
You can also create a drop-down list in Excel that allows other entries.
1. First, if you type a value that is not in the list, Excel shows an error alert.
<br />
<img src="./pictures/Excel_DropDownList_error-alert.png" width=604 height=201 />
<br />
To allow other entries, execute the following steps.
2. On the Data tab, in the Data Tools group, click Data Validation.
<br />
<img src="./pictures/Excel_DropDownList_click-data-validation.png" width=439 height=94 />
<br />
The 'Data Validation' dialog box appears.
3. On the Error Alert tab, uncheck 'Show error alert after invalid data is entered'.
<br />
<img src="./pictures/Excel_DropDownList_allow-other-entries.png" width=394 height=319 />
<br />
4. Click OK.
5. You can now enter a value that is not in the list.
<br />
<img src="./pictures/Excel_DropDownList_manual-input.png" width=604 height=81 />
<br />
<h3>Add/Remove Items</h3>
You can add or remove items from a drop-down list in Excel without opening the 'Data Validation' dialog box and changing the range reference. This saves time.
1. To add an item to a drop-down list, go to the items and select an item.
<br />
<img src="./pictures/Excel_DropDownList_select-item.png" width=604 height=175 />
<br />
2. Right click, and then click Insert.
<br />
<img src="./pictures/Excel_DropDownList_click-insert.png" width=136 height=300 />
<br />
3. Select "Shift cells down" and click OK.
<br />
<img src="./pictures/Excel_DropDownList_shift-cells-down.png" width=173 height=178 />
<br />
Result:
<br />
<img src="./pictures/Excel_DropDownList_new-range-reference.png" width=604 height=195 />
<br />
Note: Excel automatically changed the range reference from Sheet2!$A$1:$A$3 to Sheet2!$A$1:$A$4. You can check this by opening the 'Data Validation' dialog box.
4. Type a new item.
<br />
<img src="./pictures/Excel_DropDownList_type-new-item.png" width=604 height=195 />
<br />
Result:
<br />
<img src="./pictures/Excel_DropDownList_updated-drop-down-list.png" width=604 height=121 />
<br />
5. To remove an item from a drop-down list, at step 2, click Delete, select "Shift cells up" and click OK.
<h3>Dynamic Drop-down List</h3>
You can also use a formula that updates your drop-down list automatically when you add an item to the end of the list.
1. On the first sheet, select cell B1.
<br />
<img src="./pictures/Excel_DropDownList_select-cell.png" width=604 height=81 />
<br />
2. On the Data tab, in the Data Tools group, click Data Validation.
<br />
<img src="./pictures/Excel_DropDownList_click-data-validation.png" width=439 height=94 />
<br />
The 'Data Validation' dialog box appears.
3. In the Allow box, click List.
4. Click in the Source box and enter the formula: =OFFSET(Sheet2!$A$1,0,0,COUNTA(Sheet2!$A:$A),1)
<br />
<img src="./pictures/Excel_DropDownList_offset-function.png" width=394 height=319 />
<br />
<b>Explanation: </b><br />
The OFFSET function takes 5 arguments:
<ol>
<li>Reference: Sheet2!$A$1, rows to offset: 0, columns to offset: 0, height: </li>
<li>COUNTA(Sheet2!$A:$A) and width: 1. </li>
<li>COUNTA(Sheet2!$A:$A) counts the number of values in column A on Sheet2 that are not empty. </li>
<li>When you add an item to the list on Sheet2, COUNTA(Sheet2!$A:$A) increases. </li>
<li>As a result, the range returned by the OFFSET function expands and the drop-down list will be updated.</li>
</ol>
5. Click OK.
6. On the second sheet, simply add a new item to the end of the list.
<br />
<img src="./pictures/Excel_DropDownList_add-new-item.png" width=604 height=215 />
<br />
Result:
<br />
<img src="./pictures/Excel_DropDownList_dynamic-drop-down-list.png" width=604 height=141 />
<br />
<h3>Remove a Drop-down List</h3>
To remove a drop-down list in Excel, execute the following steps.
1. Select the cell with the drop-down list.
<br />
<img src="./pictures/Excel_DropDownList_select-cell-with-drop-down-list.png" width=604 height=81 />
<br />
2. On the Data tab, in the Data Tools group, click Data Validation.
<br />
<img src="./pictures/Excel_DropDownList_click-data-validation.png" width=439 height=94 />
<br />
The 'Data Validation' dialog box appears.
3. Click Clear All.
<br />
<img src="./pictures/Excel_DropDownList_click-clear-all.png" width=394 height=319 />
<br />
Note: to remove all other drop-down lists with the same settings, check "Apply these changes to all other cells with the same settings" before you click on Clear All.
4. Click OK.
<h3>Dependent Drop-down Lists</h3>
Want to learn even more about drop-down lists in Excel? Learn how to create dependent drop-down lists.
1. For example, if the user selects Pizza from a first drop-down list.
<br />
<img src="./pictures/Excel_DropDownList_first-drop-down-list.png" width=604 height=101 />
<br />
2. A second drop-down list contains the Pizza items.
<br />
<img src="./pictures/Excel_DropDownList_second-drop-down-list.png" width=604 height=101 />
<br />
3. But if the user selects Chinese from the first drop-down list, the second drop-down list contains the Chinese dishes.
<br />
<img src="./pictures/Excel_DropDownList_dependent-drop-down-lists.png" width=604 height=101 />
<br />
<li><h3>Links:</h3>
<ul>
<li><a href="https://praxistipps.chip.de/excel-drop-down-erstellen_2129" target=_blank>Chip - Praxistipp :: Excel - Dropdown erstellen</a></li>
<li><a href="https://www.excel-easy.com/examples/drop-down-list.html" target=_blank>Excel Easy :: DropDown list</a></li>
</ul></li>
</ul>
</html>
<html>
Um einen festen Bereich (hier: eine einzelne Zelle) festzulegen,<br />
muss vor den Koordinaten jeweils ein Dollarzeichen stehen:
<pre><code>
=$B$3
</code></pre>
</html>
<html>
Es gibt (anscheinend) mind. zwei verschiedene Arten, <br />
wie Excel dividiert:
<ul>
<li><h3>mit Hilfe der Funktion “<b>QUOTIENT</b>“</h3>
→ hier handelt es sich um eine ganzzahlige Division. D.h. <br />
der Rest wird ignoriert / abgeschnitten (so was wie die <i>FLOOR</i>‐Funktion)
<code><pre>=QUOTIENT(49,17;7)
→ Ergebnis; 7</pre></code></li>
<li><h3>mit Hilfe des Slash-Zeichens “<b>/</b>“</h3>
→ hier wird eine Division mit Nachkommastellen durchgeführt;<br />
<code><pre>=49,17/7
→ Ergebnis; 7,0242857<span style="text-decoration: overline;">142857</span></pre></code></li>
<br />
<li><h3>Links:</h3>
<a href="https://www.giga.de/downloads/microsoft-excel-2016/tipps/excel-dividieren-von-zahlen-in-zellen-so-gehts/" target=_blank>Giga :: MS Excel 2016 - Tipps</a></li>
</ul>
</html>
<html>
<ul>
<li>Division :: s. entsprechenden Tiddler</li>
<li>Quadrieren / Exponentieren :: <code><b>x^2</b></code></li>
<li>Addition: <code><b>=SUM(G2:G8)</b></code></li>
<li>Multiplikation: <code><b>=B2*C2</b></code></li>
</ul>
</html>
<html>
<h3>Enter data by using shortcut keys</h3>
<table border="1">
<tr>
<td><b>To</b></td><td><b>Press</b></td></tr>
<tr>
<td>Complete a cell entry</td><td> ENTER
</td></tr><tr>
<td>Cancel a cell entry</td><td> ESC
</td></tr><tr>
<td>Repeat the last action</td><td> F4 or CTRL + Y
</td></tr><tr>
<td>Start a new line in the same cell</td><td> ALT + ENTER
</td></tr><tr>
<td>Delete the character to the left of the insertion point,<br>
or delete the selection</td><td> BACKSPACE</td></tr><tr>
<td>Delete the character to the right of<br>
the insertion point, or delete the<br>
selection</td><td>
DELETE</td></tr><tr>
<td>Delete text to the end of the line</td><td> CTRL + DELETE</tr><tr>
<td>Move one character up, down, left,<br>
or right</td><td>
Arrow keys<br></td></tr><tr>
<td>Move to the beginning of the line</td><td> HOME</td></tr><tr>
<td>Edit a cell comment</td><td> SHIFT + F2</td></tr><tr>
<td>Create names from row and<br>
column labels</td><td>
CTRL + SHIFT + F3</td></tr><tr>
<td>Fill down</td><td> CTRL + D</td></tr><tr>
<td>Fill to the right</td><td> CTRL + R</td></tr><tr>
<td>Fill the selected cell range with the<br>
current entry</td><td>
CTRL + ENTER</td></tr><tr>
<td>Complete a cell entry and move<br>
down in the selection</td><td>
ENTER</td></tr><tr>
<td>Complete a cell entry and move up<br>
in the selection</td><td>
SHIFT + ENTER</td></tr><tr>
<td>Complete a cell entry and move to<br>
the right in the selection</td><td>
TAB</td></tr><tr>
<td>Complete a cell entry and move to<br>
the left in the selection</td><td>
SHIFT + TAB</td></tr>
</table>
<h3>Work in cells or the formula bar by using shortcut keys</h3>
<table border="1">
<tr><td><b>To</b></td><td><b>Press</b></td></tr>
<tr><td>Start a formula</td><td>= (EQUAL SIGN)</td></tr>
<tr><td>Cancel an entry in the cell or<br>
formula bar</td><td>ESC</td></tr>
<tr><td>Edit the active cell</td><td>F2</td></tr>
<tr><td>Edit the active cell and then clear<br>
it, or delete the preceding<br>
character in the active cell as you<br>
edit the cell contents</td><td>
BACKSPACE</td></tr>
<tr><td>Paste a name into a formula</td><td>F3</td></tr>
<tr><td>Define a name</td><td>CTRL + F3</td></tr>
<tr><td>Calculate all sheets in all open<br>
workbooks</td><td>F9</td></tr><br>
<tr><td>Calculate the active worksheet</td><td>SHIFT + F9</td></tr>
<tr><td>Insert the AutoSum formula</td><td>ALT + = (EQUAL SIGN)</td></tr>
<tr><td>Enter the date </td><td>CTRL + ; (SEMICOLON)</td></tr>
<tr><td>Enter the time</td><td> CTRL + SHIFT + : (COLON)</td></tr>
<tr><td>Insert a hyperlink</td><td>CTRL + K</td></tr>
<tr><td>Complete a cell entry</td><td> ENTER</td></tr>
<tr><td>Copy the value from the cell<br>
above the active cell into the cell<br>
or the formula bar</td><td>CTRL + SHIFT + " (QUOTATION MARK)</td></tr>
<tr><td>Alternate between displaying cell<br>
values and displaying cell<br>
formulas</td><td> CTRL + ` (SINGLELEFT QUOTATION MARK)</td></tr>
<tr><td>Copy a formula from the cell<br>
above the active cell into the cell<br>
or the formula bar</td><td> CTRL + ' (APOSTROPHE)</td></tr>
<tr><td>Enter a formula as an array<br>
formula</td><td> CTRL + SHIFT + ENTER</td></tr>
<tr><td>Display the Formula Palette after<br>
you type a valid function name in<br>
a formula</td><td> CTRL + A</td></tr>
<tr><td>Insert the argument names and<br>
parentheses for a function, after<br>
you type a valid function name in<br>
a formula </td><td> CTRL + SHIFT + A</td></tr>
<tr><td>Display the AutoComplete list</td><td>ALT + DOWN ARROW</td>
</tr>
</table>
<h3>Format data by using shortcut keys</h3>
<table border="1">
<tr><td><b>To</b></td><td><b>Press</b></td></tr>
<tr><td>Display the Style command<br>
(Format menu)</td><td> ALT + ' (APOSTROPHE)</td></tr>
<tr><td> Display the Cells command<br>
(Format menu)</td><td>CTRL + 1</td></tr>
<tr><td>Apply the General number format </td><td>CTRL + SHIFT + ~</td></tr>
<tr><td>Apply the Currency format with<br>
two decimal places (negative<br>
numbers appear in parentheses)</td><td>CTRL + SHIFT + $</td></tr>
<tr><td>Apply the Percentage format with<br>
no decimal places</td><td>CTRL + SHIFT + %</td></tr>
<tr><td>Apply the Exponential number<br>
format with two decimal places</td><td>CTRL + SHIFT + ^</td></tr>
<tr><td>Apply the Date format with the<br>
day, month, and year</td><td>CTRL + SHIFT + #</td></tr>
<tr><td>Apply the Time format with the<br>
hour and minute, and indicate<br>
A.M. or P.M.</td><td>CTRL + SHIFT + @</td></tr>
<tr><td>Apply the Number format with<br>
two decimal places, 1000<br>
separator, and - for negative values</td><td>CTRL + SHIFT + !</td></tr>
<tr><td>Apply the outline border </td><td>CTRL + SHIFT + &</td></tr>
<tr><td>Remove all borders </td><td>CTRL + SHIFT + _</td></tr>
<tr><td>Apply or remove bold formatting </td><td>CTRL + B</td></tr>
<tr><td>Apply or remove italic formatting</td><td> CTRL + I</td></tr>
<tr><td>Apply or remove an underline </td><td>CTRL + U</td></tr>
<tr><td>Apply or remove strikethrough formatting </td><td>CTRL + 5</td></tr>
<tr><td>Hide rows </td><td>CTRL + 9</td></tr>
<tr><td>Unhide rows </td><td>CTRL + SHIFT + (</td></tr>
<tr><td>Hide columns </td><td>CTRL + 0 (ZERO)</td></tr>
<tr><td>Unhide columns </td><td> CTRL + SHIFT + )</td></tr>
</table>
<h3>Edit data by using shortcut keys</h3>
<table border="1">
<tr><td><b>To</b></td><td><b>Press</b></td></tr>
<tr><td>Edit the active cell </td><td>F2</td></tr>
<tr><td>Cancel an entry in the cell or<br>
formula bar</td><td>ESC</td></tr>
<tr><td>Edit the active cell and then clear<br>
it, or delete the preceding<br>
character in the active cell as you<br>
edit the cell contents</td><td>BACKSPACE</td></tr>
<tr><td>Paste a name into a formula </td><td>F3</td></tr>
<tr><td>Complete a cell entry </td><td>ENTER</td></tr>
<tr><td>Enter a formula as an array<br>
formula</td><td>CTRL + SHIFT+ ENTER</td></tr>
<tr><td>Display the Formula Palette after<br>
you type a valid function name in<br>
a formula</td><td>CTRL + A</td></tr>
<tr><td>Insert the argument names and<br>
parentheses for a function, after<br>
you type a valid function name in<br>
a formula</td><td>CTRL + SHIFT + A</td></tr>
</table>
<h3>Insert, delete, and copy a selection by using shortcut keys</h3>
<table border="1">
<tr><td><b>To</b></td><td><b>Press</b></td></tr>
<tr><td>Copy the selection</td><td> CTRL + C</td></tr>
<tr><td>Paste the selection</td><td> CTRL + V</td></tr>
<tr><td>Cut the selection </td><td>CTRL + X</td></tr>
<tr><td>Clear the contents of the selection </td><td>DELETE</td></tr>
<tr><td>Insert blank cells</td><td> CTRL + SHIFT + PLUS SIGN</td></tr>
<tr><td>Delete the selection</td><td> CTRL + - </td></tr>
<tr><td>Undo the last action</td><td> CTRL + Z</td></tr>
</table>
<h3>Move within a selection by using shortcut keys</h3>
<table border="1">
<tr>
<tr><td><b>To </td><td>Press</b></td></tr>
<tr><td>Move from top to bottom within<br>
the selection (down), or in the<br>
direction that is selected on the<br>
Edit tab (Tools menu, Options<br>
command)</td><td>
ENTER</td></tr>
<tr><td>Move from bottom to top within<br>
the selection (up), or opposite to<br>
the direction that is selected on the<br>
Edit tab (Tools menu, Options<br>
command)</td><td>
SHIFT + ENTER</td></tr>
<tr><td>Move from left to right within the<br>
selection, or move down one cell<br>
if only one column is selected</td><td>
TAB</td></tr>
<tr><td>Move from right to left within the<br>
selection, or move up one cell if<br>
only one column is selected</td><td>
SHIFT + TAB</td></tr>
<tr><td>Move clockwise to the next corner<br>
of the selection</td><td>
CTRL + PERIOD</td></tr>
<tr><td>Move to the right between<br>
nonadjacent selections</td><td>
CTRL + ALT + RIGHT ARROW</td></tr>
<tr><td>Move to the left between<br>
nonadjacent selections</td><td>
CTRL + ALT+ LEFT ARROW</td></tr>
</table>
<h3>Select cells, columns, rows, or objects in<br>
worksheets and workbooks by using shortcut keys</h3>
<table border="1">
<tr>
<b>To Press</b><br>
Select the current region around<br>
the active cell (the current region<br>
is an area enclosed by blank rows<br>
and blank columns)<br>
CTRL + SHIFT + *<br>
(ASTERISK)<br>
Extend the selection by one cell SHIFT + arrow key<br>
Extend the selection to the last<br>
nonblank cell in the same column<br>
or row as the active cell<br>
CTRL + SHIFT<br>
+ arrow key<br>
Extend the selection to the<br>
beginning of the row<br>
SHIFT + HOME<br>
Extend the selection to the<br>
beginning of the worksheet<br>
CTRL + SHIFT<br>
+ HOME<br>
Extend the selection to the last cell<br>
used on the worksheet (lower-right<br>
corner)<br>
CTRL + SHIFT<br>
+ END<br>
Select the entire column CTRL +<br>
SPACEBAR<br>
Select the entire row SHIFT<br>
+ SPACEBAR<br>
Select the entire worksheet CTRL + A<br>
If multiple cells are selected,<br>
select only the active cell<br>
SHIFT<br>
+ BACKSPACE<br>
Extend the selection down one<br>
screen<br>
SHIFT<br>
+ PAGE DOWN<br>
Extend the selection up one screen SHIFT + PAGE UP<br>
With an object selected, select all<br>
objects on a sheet<br>
CTRL + SHIFT<br>
+ SPACEBAR<br>
Alternate between hiding objects,<br>
displaying objects, and displaying<br>
placeholders for objects<br>
CTRL + 6<br>
Show or hide the Standard toolbar CTRL + 7<br>
<b>In End mode, to Press</b><br>
Turn End mode on or off END<br>
Extend the selection to the last<br>
nonblank cell in the same column<br>
or row as the active cell<br>
END, SHIFT<br>
+ arrow key<br>
Extend the selection to the last cell<br>
used on the worksheet (lower-right<br>
corner)<br>
END, SHIFT<br>
+ HOME<br>
Extend the selection to the last cell<br>
in the current row; this keystroke<br>
is unavailable if you selected the<br>
Transition navigation keys check<br>
box on the Transition tab (Tools<br>
menu, Options command)<br>
END, SHIFT<br>
+ ENTER<br>
<b>With SCROLL LOCK on, to Press</b><br>
Turn SCROLL LOCK on or off SCROLL LOCK<br>
Scroll the screen up or down one<br>
row<br>
UP ARROW or<br>
DOWN ARROW<br>
Scroll the screen left or right one<br>
column<br>
LEFT ARROW or<br>
RIGHT ARROW<br>
Extend the selection to the cell in<br>
the upper-left corner of the<br>
window<br>
SHIFT + HOME<br>
Extend the selection to the cell in<br>
the lower-right corner of the<br>
window<br>
SHIFT + END<br>
Tip When you use the scrolling keys (such as PAGE UP<br>
and PAGE DOWN) with SCROLL LOCK turned off, your<br>
selection moves the distance you scroll. If you want to<br>
keep the same selection as you scroll, turn on SCROLL<br>
LOCK first.<br>
</table>
<h3>Select cells with special characteristics by using<br>
shortcut keys</h3>
<table border="1">
<tr>
<b>To Press</b><br>
Select the current region around<br>
the active cell (the current region<br>
is an area enclosed by blank rows<br>
and blank columns)<br>
CTRL + SHIFT + *<br>
(ASTERISK)<br>
Select the current array, which is<br>
the array that the active cell<br>
belongs to<br>
CTRL + /<br>
Select all cells with comments CTRL + SHIFT<br>
+ O (the letter O)<br>
Select cells whose contents are<br>
different from the comparison cell<br>
in each row (for each row, the<br>
comparison cell is in the same<br>
column as the active cell)<br>
CTRL + \<br>
Select cells whose contents are<br>
different from the comparison cell<br>
in each column (for each column,<br>
the comparison cell is in the same<br>
row as the active cell)<br>
CTRL + SHIFT + |<br>
Select only cells that are directly<br>
referred to by formulas in the<br>
selection<br>
CTRL + [<br>
Select all cells that are directly or<br>
indirectly referred to by formulas<br>
in the selection<br>
CTRL + SHIFT + {<br>
Select only cells with formulas<br>
that refer directly to the active cell<br>
CTRL + ]<br>
Select all cells with formulas that<br>
refer directly or indirectly to the<br>
active cell<br>
CTRL + SHIFT + }<br>
Select only visible cells in the<br>
current selection<br>
ALT<br>
+ SEMICOLON<br>
</table>
<h3>Select chart items by using shortcut keys</h3>
<table border="1">
<tr>
<b>To Press</b><br>
Select the previous group of items DOWN ARROW<br>
Select the next group of items UP ARROW<br>
Select the next item within the<br>
group<br>
RIGHT ARROW<br>
Select the previous item within the<br>
group<br>
LEFT ARROW<br>
</table>
<h3>Move and scroll on a worksheet or workbook by<br>
using shortcut keys</h3>
<table border="1">
<tr>
<b>To Press</b><br>
Move one cell in a given direction Arrow key<br>
Move to the edge of the current<br>
data region<br>
CTRL + arrow key<br>
Move between unlocked cells on a<br>
protected worksheet<br>
TAB<br>
Move to the beginning of the row HOME<br>
Move to the beginning of the<br>
worksheet<br>
CTRL + HOME<br>
Move to the last cell on the<br>
worksheet, which is the cell at the<br>
intersection of the right-most used<br>
column and the bottom-most used<br>
row (in the lower-right corner);<br>
cell opposite the Home cell, which<br>
is typically A1<br>
CTRL + END<br>
Move down one screen PAGE DOWN<br>
Move up one screen PAGE UP<br>
Move one screen to the right ALT + PAGE DOWN<br>
Move one screen to the left ALT + PAGE UP<br>
Move to the next sheet in the<br>
workbook CTRL + PAGE DOWN<br>
Move to the previous sheet in the<br>
workbook CTRL + PAGE UP<br>
Move to the next workbook or<br>
window CTRL + F6 or<br>
CTRL + TAB<br>
Move to the previous workbook or<br>
window CTRL + SHIFT + F6 <br> or CTRL + SHIFT + TAB<br>
Move to the next pane F6<br>
Move to the previous pane SHIFT + F6<br>
Scroll to display the active cell CTRL + BACKSPACE<br>
<b>In End mode, to Press</b><br>
Turn End mode on or off END<br>
Move by one block of data within<br>
a row or column<br>
END, arrow key<br>
Move to the last cell on the<br>
worksheet, which is the cell at the<br>
intersection of the right-most used<br>
column and the bottom-most used<br>
row (in the lower-right corner);<br>
cell opposite the Home cell, which<br>
is typically A1<br>
END, HOME<br>
Move to the last cell to the right in<br>
the current row that is not blank;<br>
unavailable if you have selected<br>
the Transition navigation keys<br>
check box on the Transition tab<br>
(Tools menu, Options command)<br>
END, ENTER<br>
<b>With SCROLL LOCK turned<br>
on, to<br>
Press</b><br>
Turn SCROLL LOCK on or off SCROLL LOCK<br>
Move to the cell in the upper-left<br>
corner of the window<br>
HOME<br>
Move to the cell in the lower-right<br>
corner of the window<br>
END<br>
Scroll one row up or down UP ARROW or<br>
DOWN ARROW<br>
Scroll one column left or right LEFT ARROW or<br>
RIGHT ARROW<br>
Tip When you use the scrolling keys (such as PAGE UP<br>
and PAGE DOWN) with SCROLL LOCK turned off, your<br>
selection moves the distance you scroll. If you want to<br>
preserve your selection while you scroll through the<br>
worksheet, turn on SCROLL LOCK first.<br>
</table>
<h3>Print and preview a document by using shortcut keys</h3>
<table border="1">
<tr>
<b>To Press</b><br>
Display the Print command (File<br>
menu)<br>
CTRL + P<br>
</table>
<h3>Work in print preview</h3>
<table border="1">
<tr>
<b>To Press</b><br>
Move around the page when<br>
zoomed in<br>
Arrow keys<br>
Move by one page when zoomed out PAGE UP or PAGE DOWN<br>
Move to the first page when<br>
zoomed out<br>
CTRL + UP ARROW <br>or CTRL + LEFT ARROW<br>
Move to the last page when<br>
zoomed out<br>
CTRL + DOWN ARROW <br>or CTRL + RIGHT ARROW<br>
</table>
<h3>Work in a data form by using shortcut keys</h3>
<table border="1">
<tr>
<b>To Press</b><br>
Select a field or a command button ALT + key, where<br>
key is the underlined<br>
letter in the field or<br>
command name<br>
Move to the same field in the next<br>
record<br>
DOWN ARROW<br>
Move to the same field in the<br>
previous record<br>
UP ARROW<br>
Move to the next field you can edit<br>
in the record<br>
TAB<br>
Move to the previous field you can<br>
edit in the record<br>
SHIFT + TAB<br>
Move to the first field in the next<br>
record<br>
ENTER<br>
Move to the first field in the<br>
previous record<br>
SHIFT + ENTER<br>
Move to the same field 10 records<br>
forward<br>
PAGE DOWN<br>
Move to the same field 10 records<br>
back<br>
PAGE UP<br>
Move to the new record CTRL<br>
+ PAGE DOWN<br>
Move to the first record CTRL + PAGE UP<br>
Move to the beginning or end of a<br>
field<br>
HOME or END<br>
Move one character left or right<br>
within a field<br>
LEFT ARROW or<br>
RIGHT ARROW<br>
Extend a selection to the<br>
beginning of a field<br>
SHIFT + HOME<br>
Extend a selection to the end of a<br>
field<br>
SHIFT + END<br>
Select the character to the left SHIFT + LEFT<br>
ARROW<br>
Select the character to the right SHIFT + RIGHT<br>
ARROW<br>
</table>
<h3>Work with the AutoFilter feature by using shortcut keys</h3>
<table border="1">
<tr>
<b>To Press</b><br>
Display the AutoFilter list for the<br>
current column<br>
Select the cell that<br>
contains the column<br>
label, and then press<br>
ALT<br>
+ DOWN ARROW<br>
Close the AutoFilter list for the<br>
current column<br>
ALT + UP ARROW<br>
Select the next item in the<br>
AutoFilter list<br>
DOWN ARROW<br>
Select the previous item in the<br>
AutoFilter list<br>
UP ARROW<br>
Select the first item (All) in the<br>
AutoFilter list<br>
HOME<br>
Select the last item in the<br>
AutoFilter list<br>
END<br>
Filter the list by using the selected<br>
item in the AutoFilter list<br>
ENTER<br>
</table>
<h3>Work with the Pivot Table Wizard by using shortcut keys</h3>
<table border="1">
<tr>
<b>In Step 3 of the PivotTable<br>
Wizard, to<br>
Press</b><br>
Select the next or previous field<br>
button in the list<br>
UP ARROW or<br>
DOWN ARROW<br>
Select the field button to the right<br>
or left in a multicolumn field<br>
button list<br>
LEFT ARROW or<br>
RIGHT ARROW<br>
Move the selected field into the<br>
Page area<br>
ALT + P<br>
Move the selected field into the<br>
Row area<br>
ALT + R<br>
Move the selected field into the<br>
Column area<br>
ALT + C<br>
Move the selected field into the<br>
Data area<br>
ALT + D<br>
Display the PivotTable Field<br>
dialog box<br>
ALT + L<br>
</table>
<h3>Work with page fields in a Pivot Table by using shortcut keys</h3>
<table border="1">
<tr>
<b>To Press</b><br>
Select the previous item in the list UP ARROW<br>
Select the next item in the list DOWN ARROW<br>
Select the first visible item in the<br>
list<br>
HOME<br>
Select the last visible item in the<br>
list<br>
END<br>
Display the selected item ENTER<br>
</table>
<h3>Group and ungroup Pivot Table items by using shortcut keys</h3>
<table border="1">
<tr>
<b>To Press</b><br>
Group selected PivotTable items ALT + SHIFT<br>
+ RIGHT ARROW<br>
Ungroup selected PivotTable<br>
items<br>
ALT + SHIFT<br>
+ LEFT ARROW<br>
</table>
<h3>Keys for menus</h3><br>
<table border="1">
<tr>
<b>To Press</b><br>
Show a shortcut menu SHIFT + F10<br>
Make the menu bar active F10 or ALT<br>
Show the program icon menu (on<br>
the program title bar)<br>
ALT + SPACEBAR<br>
Select the next or previous<br>
command on the menu or<br>
submenu<br>
DOWN ARROW or<br>
UP ARROW (with<br>
the menu or<br>
submenu displayed)<br>
Select the menu to the left or right,<br>
or, with a submenu visible, switch<br>
between the main menu and the<br>
submenu<br>
LEFT ARROW or<br>
RIGHT ARROW<br>
Select the first or last command on<br>
the menu or submenu<br>
HOME or END<br>
Close the visible menu and<br>
submenu at the same time<br>
ALT<br>
Close the visible menu, or, with a<br>
submenu visible, close the<br>
submenu only<br>
ESC<br>
Tip You can select any menu command on the menu bar<br>
or on a visible toolbar with the keyboard. Press ALT to<br>
select the menu bar. (To then select a toolbar, press CTRL<br>
+ TAB; repeat until the toolbar you want is selected.)<br>
Press the letter that is underlined in the menu name that<br>
contains the command you want. In the menu that appears,<br>
press the letter underlined in the command name that you<br>
want.<br>
</table>
<h3>Keys for toolbars</h3><br>
<table border="1">
<tr>
<b>On a toolbar, to Press</b><br>
Make the menu bar active F10 or ALT<br>
Select the next or previous toolbar CTRL + TAB or<br>
CTRL + SHIFT +<br>
TAB<br>
Select the next or previous button<br>
or menu on the toolbar<br>
TAB or SHIFT +<br>
TAB (when a toolbar<br>
is active)<br>
Open the selected menu ENTER<br>
Perform the action assigned to the<br>
selected button<br>
ENTER<br>
Enter text in the selected text box ENTER<br>
Select an option from a drop-down<br>
list box or from a drop-down<br>
menu on a button<br>
Arrow keys to move<br>
through options in<br>
the list or menu;<br>
ENTER to select the<br>
option you want<br>
(when a drop-down<br>
list box is selected)<br>
</table>
<h3>Keys for windows and dialog boxes</h3>
<b>In a window:</b><br>
<table border="1">
<tr>
<td>
<b>To</b>
</td>
<td>
<b>Press</b>
</td>
</tr>
<tr> <td>Switch to the next program</td><td>ALT + TAB</td></tr>
<tr> <td>Switch to the previous program </td><td>ALT + SHIFT+ TAB</td></tr>
<tr> <td>Show the Windows Start menu</td><td> CTRL + ESC</td></tr>
<tr> <td>Close the active workbook window</td><td> CTRL + W</td></tr>
<tr> <td>Restore the active workbook window</td><td> CTRL + F5</td></tr>
<tr> <td>Switch to the next workbook window</td><td> CTRL + F6</td></tr>
<tr> <td>Switch to the previous workbook window</td><td> CTRL + SHIFT+ F6</td></tr>
<tr> <td>Carry out the Move command<br>
(workbook icon menu, menu bar)</td><td> CTRL + F7</td></tr>
<tr> <td>Carry out the Size command<br>
(workbook icon menu, menu bar)</td><td> CTRL + F8</td></tr>
<tr> <td>Minimize the workbook window to an icon</td><td> CTRL + F9</td></tr>
<tr> <td>Maximize or restore the workbook window</td><td> CTRL + F10</td></tr>
<tr> <td>Select a folder in the Open or Save<br>
As dialog box (File menu)</td><td>
ALT + 0 to select the<br>
folder list; arrow<br>
keys to select a<br>
folder</td></tr>
<tr> <td>Choose a toolbar button in the<br>
Open or Save As dialog box (File<br>
menu)</td><td>ALT + number<br>
(1 is the leftmost<br>
button, 2 is the next,<br>
and so on)</td></tr>
<tr> <td>Update the files visible in the<br>
Open or Save As dialog box (File<br>
menu) </td><td>F5</td></tr>
</table>
<b>In a dialog box, to Press</b><br>
Switch to the next tab in a dialog<br>
box<br>
CTRL + TAB or<br>
CTRL + PAGE<br>
DOWN<br>
Switch to the previous tab in a<br>
dialog box<br>
CTRL + SHIFT +<br>
TAB or CTRL +<br>
PAGE UP<br>
Move to the next option or option<br>
group<br>
TAB<br>
Move to the previous option or<br>
option group<br>
SHIFT + TAB<br>
Move between options in the<br>
active drop-down list box or<br>
between some options in a group<br>
of options<br>
Arrow keys<br>
Perform the action assigned to the<br>
active button (the button with the<br>
dotted outline), or select or clear<br>
the active check box<br>
SPACEBAR<br>
Move to an option in a drop-down<br>
list box<br>
Letter key for the<br>
first letter in the<br>
option name you<br>
want (when a dropdown<br>
list box is<br>
selected)<br>
Select an option, or select or clear<br>
a check box<br>
ALT + letter, where<br>
letter is the key for<br>
the underlined letter<br>
in the option name<br>
Open the selected drop-down list<br>
box<br>
ALT + DOWN<br>
ARROW<br>
Close the selected drop-down list<br>
box<br>
ESC<br>
Perform the action assigned to the<br>
default command button in the<br>
dialog box (the button with the<br>
bold outline - often the OK<br>
button)<br>
ENTER<br>
Cancel the command and close the<br>
dialog box<br>
ESC<br>
<b>In a text box, to Press</b><br>
Move to the beginning of the entry HOME<br>
Move to the end of the entry END<br>
Move one character to the left or<br>
right<br>
LEFT ARROW or<br>
RIGHT ARROW<br>
Move one word to the left or right CTRL + LEFT<br>
ARROW or CTRL +<br>
RIGHT ARROW<br>
Select from the insertion point to<br>
the beginning of the entry<br>
SHIFT + HOME<br>
Select from the insertion point to<br>
the end of the entry<br>
SHIFT + END<br>
Select or unselect one character to<br>
the left<br>
SHIFT + LEFT<br>
ARROW<br>
Select or unselect one character to<br>
the right<br>
SHIFT + RIGHT<br>
ARROW<br>
Select or unselect one word to the<br>
left<br>
CTRL + SHIFT +<br>
LEFT ARROW<br>
Select or unselect one word to the<br>
right<br>
CTRL + SHIFT +<br>
RIGHT ARROW<br>
<h3>Keys for using the Office Assistant</h3>
<table border="1">
<tr>
<td>
<b>Press</b>
</td>
<td>
<b>To</b>
</td>
</tr>
<tr><td>ALT + F6</td><td>Make the Office Assistant the active balloon</td>
</tr><tr><td>ALT + topic number <br />
(where 1 is the first topic, 2 is the second, and so on;<br />
repeat until the balloon is active)</td><td>Select a Help topic from the topics displayed by the Office Assistant</td>
</tr><tr><td>ALT + DOWN ARROW</td><td>See more help topics</td>
</tr><tr><td>ALT + UP ARROW</td><td>See previous help topics</td>
</tr><tr><td>ESC</td><td>Close an Office Assistant message</td>
</tr><tr><td>F1</td><td>Get Help from the Office Assistant</td>
</tr><tr><td>ALT + N</td><td>Display the next tip</td>
</tr><tr><td>ALT + B</td><td>Display the previous tip</td>
</tr><tr><td>ESC</td><td>Close tips</td>
</tr><tr><td>SPACEBAR</td><td>Show or hide the Office Assistant in a wizard TAB to select the Office Assistant button</td>
</tr>
</table>
<h3>Function Keys</h3>
<table border="1">
<tr>
<td>
<b>To</b>
</td>
<td>
<b>Press</b>
</td>
</tr>
<tr><td>Display Help or the Office Assistant</td><td>F1</td>
</tr><tr><td>What's This?</td><td>SHIFT + F1</td>
</tr><tr><td>Insert a chart sheet</td><td>ALT + F1</td>
</tr><tr><td>Insert a new worksheet</td><td>ALT + SHIFT + F1</td>
</tr><tr><td>Edit the active cell</td><td>F2</td>
</tr><tr><td>Edit a cell comment</td><td>SHIFT + F2</td>
</tr><tr><td>Save As command</td><td>ALT + F2</td>
</tr><tr><td>Save command</td><td>ALT + SHIFT + F2</td>
</tr><tr><td>Paste a name into a formula</td><td>F3</td>
</tr><tr><td>Paste a function into a formula</td><td>SHIFT + F3</td>
</tr><tr><td>Define a name</td><td>CTRL + F3</td>
</tr><tr><td>Create names by using row and column labels</td><td>CTRL + ALT + F3</td>
</tr><tr><td>Repeat the last action</td><td>F4</td>
</tr><tr><td>Repeat the last Find (Find Next)</td><td>SHIFT + F4</td>
</tr><tr><td>Close the window</td><td>CTRL + F4</td>
</tr><tr><td>Exit</td><td>ALT + F4</td>
</tr><tr><td>Go To</td><td>F5</td>
</tr><tr><td>Display the Find dialog box</td><td>SHIFT + F5</td>
</tr><tr><td>Restore the window size</td><td>CTRL + F5</td>
</tr><tr><td>Move to the next pane</td><td>F6</td>
</tr><tr><td>Move to the previous pane</td><td>SHIFT + F6</td>
</tr><tr><td>Move to the next workbook window</td><td>CTRL + F6</td>
</tr><tr><td>Move to the previous workbook window</td><td>CTRL + SHIFT + F6</td>
</tr><tr><td>Spelling command</td><td>F7</td>
</tr><tr><td>Move the window</td><td>CTRL + F7</td>
</tr><tr><td>Extend a selectionF8</td><td>F8</td>
</tr><tr><td>Add to the selection</td><td>SHIFT + F8</td>
</tr><tr><td>Resize the window</td><td>CTRL + F8</td>
</tr><tr><td>Display the Macro dialog box</td><td>ALT + F8</td>
</tr><tr><td>Calculate all sheets in all open workbooks</td><td>F9</td>
</tr><tr><td>Calculate the active worksheet</td><td>SHIFT + F9</td>
</tr><tr><td>Minimize the workbook</td><td>CTRL + F9</td>
</tr><tr><td>Make the menu bar active</td><td>F10 </td>
</tr><tr><td>Display a shortcut menu</td><td>SHIFT + F10</td>
</tr><tr><td>Maximize or restore the workbook window</td><td>CTRL + F10</td>
</tr><tr><td>Create a chart</td><td>F11</td>
</tr><tr><td>Insert a new worksheet</td><td>SHIFT + F11</td>
</tr><tr><td>Insert a Microsoft Excel 4.0 macro sheet</td><td>CTRL + F11</td>
</tr><tr><td>Display Visual Basic Editor</td><td>ALT + F11</td>
</tr><tr><td>Save As command</td><td>F12</td>
</tr><tr><td>Save command</td><td>SHIFT + F12</td>
</tr><tr><td>Open command</td><td>CTRL + F12</td>
</tr><tr><td>Print command</td><td>CTRL + SHIFT + F12</td>
</table>
<h3>Other Shortcuts</h3>
<table border="1">
<tr>
<td>
<b>To</b>
</td>
<td>
<b>Press</b>
</td>
</tr>
<tr><td>Renaming the title of the current tab</td><td>Vers. 2007 :: ALT + O + H + R<br /> Vers. 2010 :: ALT + R + O + U</td>
</table>
</html>
<html>
<ul>
<li>bei allen Tasten muss die <u><b><code>Alt</code></b></u>‐Taste gedrückt bleiben.</li>
<br />
<li>Präfix: <code><b>R + T +</b></code> Taste</li>
<br />
<li><table>
<tr><th>Tasten</th><th>Aktion</th></tr>
<tr><td align="center">E</td><td>Edit Note</td></tr>
<tr><td align="center">P</td><td>Previous note</td></tr>
<tr><td align="center">T</td><td>Next note</td></tr>
<tr><td align="center">O</td><td>Show / Hide (single) note</td></tr>
<tr><td align="center">S</td><td>Show all notes</td></tr>
<tr><td align="center">C</td><td>Convert to Comments</td></tr>
</table>
</li>
</html>
<html>
Es muss nicht immer der Schutz einer Tabelle sein, warum Sortieren<br />
und Filtern verhindert wird:<br />
<br />
<img src=./pictures/Excel_SortierenUndFilternFktNicht_01.png Width=532 Height=120 /><br />
<br />
Ein Blick in die Titelzeile liefert den Hinweis, dass mehrere Tabellen<br />
ausgewählt wurden:<br />
<br />
<img src=./pictures/Excel_SortierenUndFilternFktNicht_02.png /><br />
<br />
Deshalb sind alle Befehle der Registerkarte “Daten“ inaktiv. <br />
<br />
So etwas passiert häufig, wenn man statt mit [Strg]+[Bild ↓] auf das <br />
nächste Blatt mit der Tastenkombination [Shift]+[Strg]+[Bild ↓] beide<br />
Tabellenblätter auswählt. <br />
<br />
Oder wenn man beim Wechseln auf ein anderes Tabellenblatt fälschlicher-<br />
weise die [Shift]-Taste gedrückt hält. <br />
<br />
Leider sieht man an den Farben der Registerkarten nicht gut, dass <br />
mehrere Tabellenblätter ausgewählt wurden. Die Titelzeile jedoch <br />
verrät es …
<h3>Link:</h3>
<a href="http://www.excel-nervt.de/sortieren-und-filtern-geht-nicht/" target=_blank>Excel-Nervt ...</a>
</html>
<html>
Manchmal ist es hilfreich, statt eines Kommas als Dezimalzeichen<br />
einen Punkt zu nehmen.<br />
<br />
Dazu sind folgende Schritte notwendig:
<ol>
<li>den Menüpunkt “File“ in der Headerzeile auswählen</li>
<li>Runterscrollen, und dann den Menüpunkt “Options“ anklicken</li>
<li>es erscheint ein neues Fenster, betitelt “Excel Options“</li>
<li>in diesem Fenster den Menüeintrag “Advanced“ auswählen</li>
<li>in dem jetzt erscheinenden Fenster den Eintrag “Use System separators“<br />
ausfindig machen (ein Scrollen des Fensters sollte nicht notwendig sein)</li>
<li>hier den Haken entfernen …</li>
<li>… und die beiden Einträge “Decimal separator“ und <br />
“Thousands separator“ wunschgemäß anpassen</li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://www.officetooltips.com/excel_2016/tips/change_the_decimal_point_to_a_comma_or_vice_versa.html" target=_blank>Office-Tooltips :: Change the decimal point to a comma ... or vice versa</a></li>
</ul>
</html>
<html>
<ul>
<li><code><pre>=WENN(A2=C2;"ok";"nok")</pre></code></li>
<br />
<li><code><pre>=WENN(Sheet1!A2=Sheet2!A2;"ok";"nok")</pre></code></li>
</ul>
</html>
<html>
<code><pre>=WENN(SVERWEIS(D1;Tabelle1!A:C;3;0)=0;"";SVERWEIS(D1;Tabelle1!A:C;3;0))</pre></code>
<br />
Anmerkung: “<b>SVERWEIS</b>“ heisst auf Englisch “<b>VLOOKUP</b>“
<code><pre>=sverweis(a1;tabelle2!A:B;2;0)</pre></code>
<h3>Links:</h3>
<a href="https://www.heise.de/tipps-tricks/Excel-SVERWEIS-einfach-erklaert-3971576.html" target=_blank>Heise :: Excel-Tricks - SVERWEIS</a>
</html>
<html>
<h2>So wird es gemacht</h2>
<p>
Das Verknüpfen von Zellen, die sich in verschiedenen Tabellenblättern <br />
derselben Excel-Datei befinden, funktioniert prinzipiell genauso wie das <br />
Verknüpfen innerhalb eines Tabellenblattes: <br />
<br />
Aktivieren Sie die Zelle, in welche die Verknüpfung eingefügt werden soll, <br />
wechseln Sie über den Tabellenreiter in das andere Tabellenblatt, das die<br />
zu verknüpfende Zelle enthält, und klicken Sie dann auf diese Zelle. <br />
Drücken Sie daraufhin die [Enter]-Taste. <br />
<br />
Excel springt nun wieder in das Tabellenblatt, auf dem Sie die Verknüpfung <br />
eingefügt haben.
<p>
<b>Tipp</b><br />
<br />
Sie können die Zellreferenz während der Eingabe überprüfen, indem Sie die Formelleiste überwachen. Darin wird die vollständige Zellreferenz angegeben, die in diesem Fall((Bild3)) lauten muss. Dabei stellt der Eintrag, welcher mit dem Ausrufezeichen beendet wird (“Januar!“), die Referenz zum Tabellenblatt dar.
<p>
<b>Tipp</b><br />
<br />
Anstatt die folgenden Zellbezüge für die restlichen Eiscreme-Sorten in der Januar-Spalte manuell einzugeben, können Sie auch die <b>AutoAusfüllen-Funktion</b> benutzen. Dazu positionieren Sie den Mauszeiger auf der unteren rechten Ecke der Zelle B4, worauf dieser in Form eines dünnen schwarzen Kreuzes erscheint . Nun ziehen Sie mit gedrückter linker Maustaste den Zeiger bis auf Zelle B7. Die Zellbezüge werden ausgefüllt und somit werden die Werte für die anderen Eiscreme-Sorten, sowie der Gesamtwert, angezeigt. Um dabei nicht das vorgegebene Format zu zerstören, klicken Sie nach dem Ausfüllen auf den SmartTag, der unterhalb des ausgefüllten Bereiches angezeigt wird. Wählen Sie aus der Liste die Option Ohne Formatierung ausfüllen.
<p>
Um in den beiden noch fehlenden Spalten die Daten für Februar und März anzuzeigen, gehen Sie auf gleiche Weise vor. D. h.: geben Sie in Zelle C4 die Referenz zum Februar-Arbeitsblatt als durch Klicken ein und nutzen Sie die AutoAusfüllen-Funktion für den Rest der Spalte. Für März erstellen Sie in Zelle D4 die Referenz <b>“=März!B4“</b> und füllen den Rest mittels AutoAusfüllen-Funktion aus.
</p>
<h2>Schritt für Schritt</h2>
<ol>
<li>Klicken Sie im Tabellenblatt Berlin in die Zelle B4 und geben Sie ein Gleichheitszeichen (“=“) ein.</li>
<br />
<li>Klicken Sie nun auf den Reiter des Januar-Arbeitsblattes und dort in Zelle B4.</li>
<br />
<li>Überprüfen Sie den Zellbezug in der Formelleiste im oberen Bereich des Arbeitsblattes. Dort muss angezeigt werden.</li>
<br />
<li>Drücken Sie die [Enter]-Taste, um den Zellbezug herzustellen.</li>
<br />
<li>Wählen Sie erneut die Zelle B4 auf dem Berlin-Arbeitsblatt aus und platzieren Sie den Cursor an der unteren rechten Ecke der Zelle, so dass er als schwarzes Kreuz angezeigt wird.</li>
<br />
<li>Ziehen Sie den Mauszeiger mit gedrückter Maustaste bis auf Zelle B7.</li>
<br />
<li>Lassen Sie die Maustaste los – die Zellen B4 bis B7 zeigen jetzt die Daten für Berlin im Januar an.</li>
<br />
<li>Damit die in der Zieltabelle definierten Formate erhalten bleiben, klicken Sie auf den SmartTag rechts unterhalb des üllten Bereiches und wählen Sie die Option Ohne Formatierung ausfüllen.</li>
</ol>
<p>
Link:<br />
<a href="http://www.excel-helfer.de/excel-zellbezuege-aus-einem-anderen-tabellenblatt.html"> http://www.excel-helfer.de/excel-zellbezuege-aus-einem-anderen-tabellenblatt.html </a>
</p>
</html>
<html>
Nutzt man in Excel beispielsweise Berechnungen, die auf der<br />
JETZT()-Funktion basieren, will man oftmals das Dokument<br />
aktualisieren.<br />
<br />
Dazu kann man ganz umständlich in die entsprechende Zelle<br />
klicken, diese bearbeiten und dann bestätigen. <br />
<br />
Oder kurz: Zelle anwählen, [F2] drücken, [Enter] drücken.<br />
<br />
Alternativ kann man zum Aktualisieren auch nur [F9] drücken.<br />
<br />
Man kann sich auch einen Button erstellen, der bei Knopfdruck<br />
das Dokument aktualisiert. Dazu im Entwicklertools-Tab das<br />
Steuerelement ins Dokument einfügen. (Entwicklertools-Tab <br />
aktivieren), anschließend folgendes VB-Skript als Makro einfügen:<br />
<code><pre>
1 Sub AktualisiereZellen()
2 ActiveSheet.Calculate
3 End Sub
</pre></code>
Schließlich dem Knopf per Rechtsklick das Makro zuordnen.<br />
<br />
Link:<br />
http://www.informatik-pc.de/blog/excel-zellen-per-knopf-aktualisieren/<br />
</html>
Do you want to execute a shell script from your netscape
navigator ?
Go to EDIT>PREFERENCE>Applications
Edit or create an application
Choose the suffix (sh, csh)
Put "sh <%s" or "csh<%s" as application handler.
You can use the xtrem -e option
to get a interactive window shell into
your navigator.
*Asian Options
"Durchschnitts-Option"
*Lookback Option
"Look Back Strike / No Regrets"
- eine Option, bei der der K\u00e4ufer den Preis aus allen Preisen
_w\u00e4hlt_, die es f\u00fcr diese Option jemals gegeben hat
- Variante einer Option, die dem K\u00e4ufer das retroaktive Recht zum
(Ver-)Kauf des Basiswerts (/underlying/) zu dessen (h\u00f6chsten/niedrigsten)
Kurs bzw. Preis innerhalb der Optionslaufzeit einr\u00e4umt
<html>
In many case if there is a corrupted tar file,<br />
the following command can be used in an attempt<br />
to extract the file:<br />
<br />
<code>
% cat [tar-filename] | tar -xvf -<br />
</code>
<br />
<b>NOTE:</b> Where "-" is the STDOUT<br />
</html>
<html>
You can use 'cut' to extract the last field of a line if you know<br />
how many fields there are, eg:<br />
<br /><code>
field=`cut -d: -f8 file`<br />
</code><br />
But if you don't know the maximum number of fields or the number<br />
of fields per line are not consistent, awk can come to the rescue.<br />
awk has the inbuilt variable NF for the number of fields. By using<br />
this variable we can use it to extract the last field by using:<br />
<br /><code>
field=`awk -F: '{print $NF}'`<br />
</code><br />
or you can use calculations to retrieve any field relative to the last field.<br />
For example to retrieve the second last field, use:<br />
<br /><code>
field=`awk -F: '{print $(NF-1)}'`<br />
</code><br />
<br />
This tip generously supported <br />
by: peters@ginini.com.au<br />
</html>
FDI := Foreign Direct Investment,
englisch für Auslandsdirektinvestition
FDI := Fast Deal Input (Murex)
<html>
Die <b>«Funds From Operations»</b> (FFO) beurteilen die <br />
operative Geschäftsentwicklung und setzen sich <br />
zusammen aus dem Ergebnis vor Abschreibungen<br />
und Steuern und den Gewinnen aus Verkäufen und<br />
Entwicklungsprojekten. So wird angezeigt, wie viel <br />
Cashflow im operativen Geschäft erwirtschaftet wird.<br />
<h3>Links:</h3>
<ul>
<li>UMWA‐Börsenbrief, 02.09.2022</li>
</ul>
</html>
<html>
<h3>a. FIX Protocol Introduction (5-32)</h3>
<ul>
<li>FIX := "Financial Information eXchange"</li>
<li>wird von FIX Protocol Ltd. (FPL) verwaltet</li>
<li>electronic message format</li>
<li>messaging standard, industrie-gesteuert</li>
<li>Austausch von verschiedenen Wertpapier-Transaktionen zwischen Finanzinstituten</li>
<br />
<li><b>Protokoll-Spezifikation:</b>
<ul>
<li>offen</li>
<li>einfach</li>
<li>elektronisch</li>
<li>Plattform-unabhängig</li>
</ul></li>
<br />
<li>nicht mit dem Swift-Protokoll zu verwechseln, <br />
das für Finanz-Transaktionen verwendet wird<br /></li>
<br />
<li>aktuelle Version: 5.0 (2007)</li>
<br />
<li>die aktuell am häufigsten eingesetzten Versionen: 4.1 - 4.4 (2007)</li>
<br />
- Industry players & usage:<br />
<ol type="a">
<li> Exchange/Börsen</li>
<li> Buys-side firms</li>
<li> Sell-side firms</li>
</ol>
<br />
- Industry players: FIX Usage:<br />
<ul>
<li>institutional investors:</li>
<ul>
<li>mutual fund,</li>
<li>hedge fund,</li>
<li>asset management</li>
</ul>
<li>liquidation sources:</li>
<ul>
<li>exchange,</li>
<li>ECN (electronic communication network),</li>
<li>other sources</li>
</ul>
</ul>
<br />
<li><b>unterstützte Produkt-Klassen:</b><br />
Equities, Fixed Income, Derivatives (Options, Futures, Interest Rates, Swaps
usw.), FX, etc.</li>
<br />
<li>bei FIX werden FIX-Nachrichtenketten (message strings) an die
(Empfänger-) FIX-Engine geschickt</li>
<br />
<li>dh. es kommunizieren zwei FIX-Enginges direkt miteinander,<br />
wobei verschlüsselte/nicht-verschlüsselte FIX-Nachrichten über TCP/IP
ausgetauscht werden</li>
<br />
*die Haupt-Vertreiber sind: *<br />
NYFIX-Appia,<br />
Orc Software<br />
<br />
<li><h3>Um das Protokoll kennenzulernen:</h3>
<ol>
<li>Download der Spezifikationen von der Homepage <a href="www.fixprotocol.org" target=_blank>www.fixprotocol.org</a></li>
<li>Download Khaders Präsentation, zusammen mit den<br />
youTube-Videos (PDF-File: fix_1day_allsections.pdf)</li>
<li>Sich vertraut machen mit der FIX Engine - FIX Engine manual:<br />
Starten, stoppen, Verbingung aufbauen, usw.</li>
<li>Falls keine FIX Engine vohanden ist, dann Download von QuickFIX<br />
oder QuickFXI/J (beides ist OpenSource)</li>
<li>die FPL-Homepage nach weiteren Ressourcen und Produkt-Abschnitte
durchsuchen</li>
</ol>
<li> Die meisten FIX Engines unterstützen:<br />
Sockets, file based interface, JMS, TIBCO, MQ, usw.</li>
<br />
<li>Online catalog of FIX tags: FIXimate von FPL<br />
(<a href="http://www.fixprotocol.org/FIXimate3.0" target=_blank>fixprotocol.org :: FIXimate3.0</a>) (Stand: 02/2010)<br />
- Download als zip-File möglich ⇒ done</li>
<br />
- Nachrichten kategorisieren:<br />
<br />
{{{ }}} (a) *Admin messages*<br />
{{{ }}} - die FIX session betreffend<br />
<br />
{{{ }}} (b) *Application messages*<br />
{{{ }}} - den
Geschäftsdatenaustausch betreffend<br />
<br />
{{{ }}} = I. Pre-Trade Messages<br />
{{{ }}}II. Trade Messages<br />
{{{ }}}III. Post-Trade Messages<br />
<br />
<br />
- unterstützte Produkt-Klassen:<br />
<br />
Equities, Fixed Income, Derivatives (Options, Futures, Interest Rates, Swaps
usw.), FX, etc.<br />
<br />
- bei FIX werden FIX-Nachrichtenketten (message strings) an die
(Empfänger-) FIX-Engine geschickt<br />
<br />
- dh. es kommunizieren zwei FIX-Enginges direkt miteinander, wobei
verschlüsselte/nicht-verschlüsselte FIX-Nachrichten über
TCP/IP ausgetauscht werden<br />
<br />
*die Haupt-Vertreiber sind: *<br />
NYFIX-Appia,<br />
Orc Software<br />
<br />
*Um das Protokoll kennenzulernen:*<br />
{{{ }}}a) Download der Spezifikationen von der Homepage
www.fixprotocol.org<br />
<br />
{{{ }}}b) Download Khaders
Präsentation, zusammen mit den
youTube-Videos (PDF-File: fix_1day_allsections.pdf)<br />
<br />
{{{ }}}c) Sich vertraut machen mit der FIX Engine - FIX Engine manual:
Starten, stoppen, Verbingung aufbauen, usw.<br />
<br />
{{{ }}}d) Falls keine FIX Engine vohanden ist, dann Download von QuickFIX
oder QuickFXI/J (beides ist OpenSource)<br />
<br />
{{{ }}}e) die FPL-Homepage nach weiteren Ressourcen und Produkt-Abschnitte
durchsuchen<br />
<br />
- Die meisten FIX Engines
unterstützen:<br />
Sockets, file based interface, JMS, TIBCO, MQ, usw.<br />
<br />
- Online catalog of FIX tags: FIXimate von FPL<br />
(www.fixprotocol.org/FIXimate3.0) (Stand: 02/2010)<br />
- Download als zip-File möglich <br />
- done<br />
<br />
- Nachrichten kategorisieren:<br />
<br />
{{{ }}} (a) *Admin messages*<br />
{{{ }}} - die FIX session betreffend<br />
<br />
{{{ }}} (b) *Application messages*<br />
{{{ }}} - den
Geschäftsdatenaustausch betreffend<br />
<br />
{{{ }}} = I. Pre-Trade Messages<br />
{{{ }}}II. Trade Messages<br />
{{{ }}}III. Post-Trade Messages<br />
<br />
<br />
{{{ }}} (c) *Security*<br />
{{{ }}} - Authentication, Data Security<br />
<br />
- (a) Admin Messages<br />
<br />
{{{ }}} Logon,<br />
{{{ }}} Logout,<br />
{{{ }}} Heartbeat,<br />
{{{ }}} Test Request,<br />
{{{ }}} Resend Request,<br />
{{{ }}} Reject (Session Level)<br />
{{{ }}} Sequence Reset / Gap Fill<br />
<br />
- (b) Application Message<br />
<br />
{{{ }}} (1) Pre-Trade Messages<br />
<br />
{{{ }}} (2) Trade Messages<br />
{{{ }}} - * New Order (Single)<br />
{{{ }}} * Execution Report<br />
{{{ }}} * Order Cancel Request<br />
{{{ }}} * Order Cancel/Replace Request<br />
{{{ }}} * Order Status Request<br />
{{{ }}} * SecurityList<br />
{{{ }}} (- s.a. Message Summary - HTML)<br />
<br />
- (c) Post-Trade Messages<br />
<br />
- Fix Message Format<br />
<br />
enthält 3 Teile: Header Body Trailer/Footer<br />
<br />
Message is a collection of fields (Ansammlung von Feldern)<br />
<br />
jedes Feld ist ein tag-value-Paar:<br />
{{{ }}} tag = value <br />
{{{ }}}55 = IBM<br />
<br />
alle Felder sind durch Trennzeichen voneinander getrennt<br />
- das Trennzeichen ist ein nicht-gedrucktes<br />
ASCII-Zeichen: "SOH" (#001),<br />
in Texten wird "^" verwendet<br />
<br />
<br />
{{{ }}} (c) *Security*<br />
{{{ }}} - Authentication, Data Security<br />
<br />
- (a) Admin Messages<br />
<br />
{{{ }}} Logon,<br />
{{{ }}} Logout,<br />
{{{ }}} Heartbeat,<br />
{{{ }}} Test Request,<br />
{{{ }}} Resend Request,<br />
{{{ }}} Reject (Session Level)<br />
{{{ }}} Sequence Reset / Gap Fill<br />
<br />
- (b) Application Message<br />
<br />
{{{ }}} (1) Pre-Trade Messages<br />
<br />
{{{ }}} (2) Trade Messages<br />
{{{ }}} - * New Order (Single)<br />
{{{ }}} * Execution Report<br />
{{{ }}} * Order Cancel Request<br />
{{{ }}} * Order Cancel/Replace Request<br />
{{{ }}} * Order Status Request<br />
{{{ }}} * SecurityList<br />
{{{ }}} (- s.a. Message Summary - HTML)<br />
<br />
- (c) Post-Trade Messages<br />
<br />
- Fix Message Format<br />
<br />
enthält 3 Teile: Header Body Trailer/Footer<br />
<br />
Message is a collection of fields (Ansammlung von Feldern)<br />
<br />
jedes Feld ist ein tag-value-Paar:<br />
{{{ }}} tag = value <br />
{{{ }}}55 = IBM<br />
<br />
alle Felder sind durch Trennzeichen voneinander getrennt<br />
- das Trennzeichen ist ein nicht-gedrucktes<br />
ASCII-Zeichen: "SOH" (#001), steht für "Start Of Heading"<br />
in Texten wird "^" <sl>(caret)</sl> verwendet<br />
<br />
<br />
<br />
<br />
Aufbau in FIXImate:<br />
<br />
einzelne Components (z.B. Header) ergeben die jeweiligen Messages -
"Message Summary"<br />
<br />
Communication Model<br />
<br />
session based, zwischen zwei Parteien<br />
<br />
- (a) Initiator / Client - startet die Kommunikation<br />
<br />
- (b) Acceptor / Server - nimmt den Verbindungswunsch entgegen und
überprüft den Client request mittels der Login-Nachricht<br />
<br />
FIX Session<br />
<br />
jede Session hält eine bi-direktionale Verbindung zwischen den zwei
Parteien aufrecht<br />
- die Verwaltung erfolgt über die Sequence Number<br />
<br />
jede neue Session beginnt mit der Sequence Number 1<br />
<br />
verlorengegangene Nachrichten werden erneut gesendet<br />
<br />
Typischer Session-Ablauf<br />
<br />
(a) Client : startet mit LOGON message<br />
<br />
(b) Austausch der Nachrichten / Informationen<br />
<br />
(c) Beendigung der Session mit der LOGOUT Message<br />
<br />
Beispiel: NewOrderSingle (s.oben)<br />
<br />
Andere Application Messages<br />
<br />
<li> 1) OrderCancelReqeust:</li><br />
<br />
{{{ }}}Anforderung der
vollständigen o. teilweisen Streichung der
(aktuellen) Restmenge einer existierenden Order<br />
<br />
<li> 2) OrderCancelReplaceRequest:</li><br />
<br />
{{{ }}}zum Ändern einer aktuellen Order<br />
<br />
<li> 3) OrderStatusRequest:</li><br />
<br />
{{{ }}}Abfrage des aktuellen Statusses einer Order<br />
<br />
<li> 4) ExecutionReport:>/li<<br />
<br />
{{{ }}}wird vom Empfänger verwendet, für verschiedene Dinge
benötigt, wie z.B. zur Bestätigung des Erhalts o. der Änderung
einer Order<br />
{{{ }}}Statusinformationen zu Ordern<br />
<br />
Administrative Nachrichten<br />
<br />
{{{ }}}- LOGON - Session starten<br />
<br />
{{{ }}}- Heartbeat - im Falle des Idles Überprüfung der
Verbindung / Session<br />
<br />
{{{ }}}- TestRequest<br />
<br />
{{{ }}}- ResendRequest<br />
<br />
{{{ }}}- LOGOUT<br />
<br />
{{{ }}}- XML_non_FIX usw.<br />
<br />
<b>b. FIX Protocol & Equity Trading (33-47)</b><br />
<br />
1. Electronic Trading Overview<br />
<br />
2. Types of FIX Messages<br />
<br />
3. Trading Scenarios<br />
<br />
Trade Life Cycle:<br />
<br />
- Pre-Trade: Trade preparation<br />
{{{ }}}|<br />
{{{ }}}|- Trade<br />
{{{ }}}|<br />
{{{ }}}|- Post-Trade: Settlement, Allocations, etc.<br />
<br />
Message "Execution Report"<br />
<br />
- auch einfach "Execution" genannt<br />
<br />
- benutzt:<br />
{{{ }}}- ExecType ∈ {NEW, CANCEL, STATUS, CORRECT}<br />
<br />
<br />
{{{ }}}- ExecTransType ∈ {0..9,A..E}<br />
<br />
{{{ }}}- OrdStatus ∈ {0..9,A..E}<br />
<br />
Message "OrderCancelReplace"<br />
<br />
- auch "OrderModification"<br />
<br />
- nur modifizierbare Eigenschaften wie OrderQty, OrderPrice
können geändert werden<br />
<br />
- durch Erhöhung der Qty kann eine ausgefüllte Order
re-initialisiert (reinstated) werden, anstatt eine neue Order zu schicken<br />
<br />
-
Schlüsselfelder sind:<br />
<ol>
<li>(1) OrderID</li>
<li>(2) ClOrdID</li>
<li>(3) OrderType</li>
<li>(4) FK (FillOrKill) vs. IOC (ImmediateOrCancel)</li>
<li>(5) TradeBust</li>
</ol>
<br />
<b>c. Technical Implementation (48-56)</b><br />
<br />
<b>d. Production Issues & Troubleshooting (57-70)</b><br />
<br />
<br />
<h3>Quelle:</h3>
<a href="KhadersBlog_fix_1day_allsections.pdf" target=_blank>Khaders Blog :: PDF</a><br />
</html>
<html>
<h3>Beispiel: </h3>
<code><pre>9=0235^35=D^34=10^43=N</pre></code>
<ul>
<li>Das <b>Zirkumflex/Caret</b> kann nur im DATA-Feld verwendet werden</li>
<br />
<li>vordefinierte Tags, jedes stellt ein bestimmtes Feld dar, <br />
jedes Tag hat eine vorgegebene Nummer</li>
<br />
<li><b>Start-Tag:</b><br />
<ul>
<li>Alle Nachrichten beginnen mit "8=FIX.x.y";</li>
<li>zeigt die FIX-Version der übertragenen Nachricht an (hilfreich bei<br />
Verwendung mehrerer verschiedener Versionen)</li>
</ul>
<br />
<li><b>Ende-Tag:</b><br />
<ul>
<li>Alle Nachrichten enden mit "10=nnnSOH";</li>
<li>"nnn" : Checksum der Daten</li>
</ul>
</ul>
<h3>Beispiel-Message:</h3>
<code><pre>8=FIX.4.1^9=0235^35=D^34=10^43=N^49=VENDOR^50=CUSTOMER^56=BROKER^52=19980930-09:25:58^1=XQCCFUND^11=10^21=1^55=EK^48=277461109^22=1^54=1^38=10000^40=2^44=76.750000^59=0^10=165</pre></code>
wobei:<br />
<table>
<tr><th>Feld</th><th>Bedeutung</th></tr>
<tr><td>8=FIX.4.1</td><td>#BeginString</td></tr>
<tr><td>^9=0235</td><td>#BodyLength</td></tr>
<tr><td>^35=D</td><td>#MsgTyp</td></tr>
<tr><td>^34=10</td><td>#MsgSeqNum</td></tr>
<tr><td>^43=N</td><td>#PossDupFlag</td></tr>
<tr><td>^49=VENDOR</td><td>#SenderCompID</td></tr>
<tr><td>^50=CUSTOMER</td><td>#SenderSubID</td></tr>
<tr><td>^56=BROKER</td><td>#TargetCompID</td></tr>
<tr><td>^52=19980930-09:25:58</td><td>#SendingTime</td></tr>
<tr><td>^1=XQCCFUND</td><td>#Account</td></tr>
<tr><td>^11=10</td><td>#ClOrdID</td></tr>
<tr><td>^21=1</td><td>#HandlingInstruction,{1...3}</td></tr>
<tr><td>^55=EK</td><td>#Symbol</td></tr>
<tr><td>^48=277461109</td><td>#SecurityID</td></tr>
<tr><td>^22=1</td><td>#SecurityIDSource,{1...9,A...M}</td></tr>
<tr><td>^54=1</td><td>#Side,{1...9,A...G}</td></tr>
<tr><td>^38=10000</td><td>#OrdrQty</td></tr>
<tr><td>^40=2</td><td>#OrdrType,{1...9,A...Q}</td></tr>
<tr><td>^44=76.750000</td><td>#Price</td></tr>
<tr><td>^59=0</td><td>#TimeInForce,{0...9}</td></tr>
<tr><td>^10=165</td><td>#Footer/Checksum</td></tr>
</table>
<h3>Beispiel</h3>
<code><pre>
8=FIX.4.4^9=1242^35=AE^34=1^43=Y^49=EBS-TRADE^52=20180528-12:52:02.275^56=NLB2LN-TRADE1^122=20180528-11:30:24.132^15=GBP^31=0.0000521^32=100000000.00^55=GBP/USD^60=20180528-11:30:24.019^75=20180528^120=USD^150=F^167=FXSWAP^442=3^460=4^570=N^571=FE80-0047-0000-61-100000^1003=FE80-0047-0000-61^1040=LDC04101CFL86Y48^1071=0.0000521^1300=QR^1301=FXQDM^1430=R^5899=20180530^552=2^54=B^37=MY6Z-Y0O4-F048^198=LDC04101CFL86Y48^453=5^448=NLBF^447=D^452=1^802=1^523=NLBF^803=1000^448=MR0^447=D^452=12^448=NEX_EBS^447=D^452=16^448=NLB2^447=D^452=1001^448=EBSD^447=G^452=73^1=NLBF^578=Manual^1057=Y^54=B^453=4^448=ZHSB^A447=D^452=90^802=1^523=EEEEEEEE^803=16^448=MP6I5ZYZBEU3UXPYFY54^447=N^452=90^448=ZHSB^447=D^452=1^448=ZHSB^447=D^452=35^1=ZHSB^1057=N^555=2^600=GBP/USD^604=1^605=EZ24HGCZCPN2^606=4^1788=A^624=1^587=2^588=20180529^637=1.3316179^1073=0.0000521^5190=1.33167^1074=133161790.00^1418=100000000.00^600=GBP/USD^604=1^605=EZ215F4WD595^606=4^1788=B^624=2^587=3^588=20180530^637=1.3316700^1073=0.0000000^5190=1.33167^1074=133167000.00^1418=100000000.00^768=1^769=20180528-11:30:24.019000^770=1^1907=2^1903=FE80-0047-0000-61-A^1905=2GI1GKI3V4^1904=0^1906=0^2411=A^1903=FE80-0047-0000-61-B^1905=2GI1GKI3V4^1904=0^1906=0^2411=B^2668=2^2669=0^2670=4^2669=1^2670=7^10=006^
</pre></code>
<h4>⇒ Trade Capture Report</h4>
<table border="1">
<tr><th>Tag</th><th>Field</th><th>Value</th><th>Description</th></tr>
<tr><td>8 </td><td>BeginString FIX.4.4 </td></tr>
<tr><td>9 </td><td>BodyLength 1242 </td></tr>
<tr><td>35 </td><td>MsgType AE TRADE CAPTURE REPORT</td></tr>
<tr><td>34 </td><td>MsgSeqNum 1 </td></tr>
<tr><td>43 </td><td>PossDupFlag Y </td></tr>
<tr><td>49 </td><td>SenderCompID EBS-TRADE </td></tr>
<tr><td>52 </td><td>SendingTime 20180528-12:52:02.275 </td></tr>
<tr><td>56 </td><td>TargetCompID NLB2LN-TRADE-1 </td></tr>
<tr><td>122</td><td>OrigSendingTime 20180528-11:30:24.132 </td></tr>
<tr><td>15 </td><td>Currency GBP </td></tr>
<tr><td>31 LastPx 0.0000521 </td></tr>
<tr><td>32 LastQty 100000000.00 </td></tr>
<tr><td>55 Symbol GBP/USD </td></tr>
<tr><td>60 TransactTime 20180528-11:30:24.019 </td></tr>
<tr><td>75 TradeDate 20180528 </td></tr>
<tr><td>120 SettlCurrency USD </td></tr>
<tr><td>150 ExecType F TRADE</td></tr>
<tr><td>167 SecurityType FXSWAP Unknown Enum Value </td></tr>
<tr><td>442 MultiLegReportingType 3 MULTI LEG SECURITY</td></tr>
<tr><td>460 Product 4 CURRENCY</td></tr>
<tr><td>570 PreviouslyReported N </td></tr>
<tr><td>571 TradeReportID FE80-0047-0000-61-100000 </td></tr>
<tr><td>1003 FE80-0047-0000-61 Unknown Tag </td></tr>
<tr><td>1040 LDC04101CFL86Y48 Unknown Tag</td></tr>
<tr><td>1071 0.0000521 Unknown Tag </td></tr>
<tr><td>1300 QR Unknown Tag </td></tr>
<tr><td>1301 FXQDM Unknown Tag </td></tr>
<tr><td>1430 R Unknown Tag </td></tr>
<tr><td>5899 20180530 Unknown Tag </td></tr>
<tr><td>552 NoSides 2 BOTH SIDES</td></tr>
<tr><td>54 Side B AS DEFINED</td></tr>
<tr><td>37 OrderID MY6Z-Y0O4-F048 </td></tr>
<tr><td>198 SecondaryOrderID LDC04101CFL86Y48 </td></tr>
<tr><td>453 NoPartyIDs 5 </td></tr>
<tr><td>448 PartyID NLBF </td></tr>
<tr><td>447 PartyIDSource D PROPRIETARY CUSTOM CODE</td></tr>
<tr><td>452 PartyRole 1 EXECUTING FIRM</td></tr>
<tr><td>802 NoPartySubIDs 1 </td></tr>
<tr><td>523 PartySubID NLBF </td></tr>
<tr><td>803 PartySubIDType 1000 </td></tr>
<tr><td>448 PartyID MR0 </td></tr>
<tr><td>447 PartyIDSource D PROPRIETARY CUSTOM CODE</td></tr>
<tr><td>452 PartyRole 12 EXECUTING TRADER</td></tr>
<tr><td>448 PartyID NEX_EBS </td></tr>
<tr><td>447 PartyIDSource D PROPRIETARY CUSTOM CODE</td></tr>
<tr><td>452 PartyRole 16 EXECUTING SYSTEM</td></tr>
<tr><td>448 PartyID NLB2 </td></tr>
<tr><td>447 PartyIDSource D PROPRIETARY CUSTOM CODE</td></tr>
<tr><td>452 PartyRole 1001 Unknown Enum Value </td></tr>
<tr><td>448 PartyID EBSD </td></tr>
<tr><td>447 PartyIDSource G MIC</td></tr>
<tr><td>452 PartyRole 73 Unknown Enum Value </td></tr>
<tr><td>1 Account NLBF </td></tr>
<tr><td>578 TradeInputSource Manual </td></tr>
<tr><td>1057 Y Unknown Tag </td></tr>
<tr><td>54 Side B AS DEFINED</td></tr>
<tr><td>453 NoPartyIDs 4 </td></tr>
<tr><td>448 PartyID ZHSB </td></tr>
<tr><td>447 PartyIDSource D PROPRIETARY CUSTOM CODE</td></tr>
<tr><td>452 PartyRole 90 Unknown Enum Value </td></tr>
<tr><td>802 NoPartySubIDs 1 </td></tr>
<tr><td>523 PartySubID EEEEEEEE </td></tr>
<tr><td>803 PartySubIDType 16 </td></tr>
<tr><td>448 PartyID MP6I5ZYZBEU3UXPYFY54 </td></tr>
<tr><td>447 PartyIDSource N Unknown Enum Value </td></tr>
<tr><td>452 PartyRole 90 Unknown Enum Value </td></tr>
<tr><td>448 PartyID ZHSB </td></tr>
<tr><td>447 PartyIDSource D PROPRIETARY CUSTOM CODE</td></tr>
<tr><td>452 PartyRole 1 EXECUTING FIRM</td></tr>
<tr><td>448 PartyID ZHSB </td></tr>
<tr><td>447 PartyIDSource D PROPRIETARY CUSTOM CODE</td></tr>
<tr><td>452 PartyRole 35 LIQUIDITY PROVIDER</td></tr>
<tr><td>1 Account ZHSB </td></tr>
<tr><td>1057 N Unknown Tag </td></tr>
<tr><td>555 NoLegs 2 </td></tr>
<tr><td>600 LegSymbol GBP/USD </td></tr>
<tr><td>604 NoLegSecurityAltID 1 </td></tr>
<tr><td>605 LegSecurityAltID EZ24HGCZCPN2 </td></tr>
<tr><td>606 LegSecurityAltIDSource 4 </td></tr>
<tr><td>1788 A Unknown Tag </td></tr>
<tr><td>624 LegSide 1 </td></tr>
<tr><td>587 LegSettlType 2 </td></tr>
<tr><td>588 LegSettlDate 20180529 </td></tr>
<tr><td>637 LegLastPx 1.3316179 </td></tr>
<tr><td>1073 -0.0000521 Unknown Tag </td></tr>
<tr><td>5190 1.33167 Unknown Tag </td></tr>
<tr><td>1074 133161790.00 Unknown Tag </td></tr>
<tr><td>1418 100000000.00 Unknown Tag</td></tr>
<tr><td>600 LegSymbol GBP/USD </td></tr>
<tr><td>604 NoLegSecurityAltID 1 </td></tr>
<tr><td>605 LegSecurityAltID EZ215F4WD595</td></tr>
<tr><td>606 LegSecurityAltIDSource 4 </td></tr>
<tr><td>1788 B Unknown Tag </td></tr>
<tr><td>624 LegSide 2 </td></tr>
<tr><td>587 LegSettlType 3 </td></tr>
<tr><td>588 LegSettlDate 20180530 </td></tr>
<tr><td>637 LegLastPx 1.3316700 </td></tr>
<tr><td>1073 0.0000000 Unknown Tag </td></tr>
<tr><td>5190 1.33167 Unknown Tag </td></tr>
<tr><td>1074 133167000.00 Unknown Tag </td></tr>
<tr><td>1418 100000000.00 Unknown Tag </td></tr>
<tr><td>768 NoTrdRegTimestamps 1 </td></tr>
<tr><td>769 TrdRegTimestamp 20180528-11:30:24.019000 </td></tr>
<tr><td>770 TrdRegTimestampType 1 EXECUTION TIME</td></tr>
<tr><td>1907 2 Unknown Tag </td></tr>
<tr><td>1903 FE80-0047-0000-61-A Unknown Tag </td></tr>
<tr><td>1905 2GI1GKI3V4 Unknown Tag </td></tr>
<tr><td>1904 0 Unknown Tag </td></tr>
<tr><td>1906 0 Unknown Tag </td></tr>
<tr><td>2411 A Unknown Tag </td></tr>
<tr><td>1903 FE80-0047-0000-61-B Unknown Tag </td></tr>
<tr><td>1905 2GI1GKI3V4 Unknown Tag </td></tr>
<tr><td>1904 0 Unknown Tag </td></tr>
<tr><td>1906 0 Unknown Tag </td></tr>
<tr><td>2411 B Unknown Tag </td></tr>
<tr><td>2668 2 Unknown Tag </td></tr>
<tr><td>2669 0 Unknown Tag </td></tr>
<tr><td>2670 4 Unknown Tag </td></tr>
<tr><td>2669 1 Unknown Tag </td></tr>
<tr><td>2670 7 Unknown Tag </td></tr>
<tr><td>10 CheckSum 006 </td></tr>
</table>
</html>
<html>
<ul>
<li><h3>14.02.2022 - Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li>Viele Parameter, die den Markt belasten:
<ul>
<li>Teil 1 ‐ Russland, der mögliche Krieg und das Swift‐System</li>
<li><details><summary>Teil 2 ‐ Beginnt nun ein Bärenmarkt?</summary><br />
<ul>
<li>Advanced Micro Devices (AMD)</li>
<li>Power Shares QQQ ETF (QQQ)</li>
</ul><br /></details>
</li>
</ul>
</li>
<li><details><summary>Beachtenswerte Earnings</summary><br>
<ul>
<li>3M (MMM)</li>
<li>“Stablecoins“<br />
Die größten Stablecoins nach Marktkapitalisierung sind:
<ul>
<li>Tether (USDT-USD)</li>
<li>USD Coin</li>
<li>Binance USD (BNB-USD)</li>
<li>TerraUSD (UST-USD)</li>
<li>Dai (DAI-USD).</li>
</ul>
Die Anhörung könnte auch Auswirkungen auf Bitcoin (BTC-USD) und Ethereum (ETH-USD) haben.</li>
<li>Intel (INTC)</li>
<li>Einzelhandelssektor:
<ul>
<li>Walmart (WMT)</li>
<li>Cal‐Maine Foods (CALM)</li>
<li>Kraft Heinz (KHC)</li>
<li>B&G Foods (BGS)</li>
<li>Jakks Pacific (JAKK)</li>
</ul><br /> </li>
</ul></details>
</li>
<li>Tagestipp: Exxon Mobil Corp. (<b>XOM</b>)</li>
<li><details><summary>Empfehlungen</summary><br />
für mich aktuell mögliche Kandidaten:
<table>
<tr><td><b>BB</b>, Blackberry ?</td></tr>
<tr><td><b>T</b>, AT&T</td></tr>
</table>
</details></li>
</ul>
</li>
</ul>
</html>
<html>
<b>Mx3 ::</b>
Login mit BO-Session<br />
--> Trade Query aufrufen<br />
--> Dann Strg+u eingegeben<br />
<br />
<b>MxG2000 :: </b>
Login mit FO-Gruppe<br />
--> Trade Query aufrufen<br />
--> in dem dann erscheinenden Fenster sind für<br />
sämtliche FO-Desks das aktuelle Datum<br />
angegeben<br />
<br />
<h3>weitere Alternative:</h3>
GUI<br>
--> Configuration<br>
--> Settings<br>
--> Processing settings<br>
--> General information<br>
--> Global<br>
--> Current date<br>
</html>
<html>
<html>
<ul>
<li>scheint auch als “Basel 4“ bezeichnet zu werden</li>
<li>
The <b>Fundamental Review of the Trading Book (FRTB)</b><br />
is a set of market risk capital rules designed to replace a <br />
series of patches introduced after the financial crisis. It<br />
seeks to better-capture tail risk, to redraw the boundary<br />
between banking and trading books, and to raise the bar<br />
for internal models.<br />
<br />
Regulierung des Marktrisikos, die so genannte Fundamental<br />
Review of the Trading Book (FRTB)
<h3>Key Areas of FRTB Focus:</h3>
<h4>1. 1. The Trading Book and Banking Book Boundary</h4>
<h4>1. 2. Treatment of Credit</h4>
<ul>
<li>Securitization Exposure</li>
<li>Non-Securitization exposures</li>
incremental default charge (IDR)
<li>Credit Valuation Adjustments (CVA) charges</li>
</ul>
<h4>1. 3. Approach to Risk Management</h4>
<ul>
<li>Stressed Calibration</li>
<li>Move from 'VaR' to 'Expected Shortfall'</li>
</ul>
<h4>1. 4. A Comprehensive incorporation of the Risk of Market Illiquidity</h4>
<ul>
<li>Incremental Risk Charge (IRC) </li>
<li> Comprehensive Risk Measure (CRM)</li>
</ul>
<h4>1. 5. Treatment of Hedging and Diversification</h4>
<ul>
<li>Internal Models based approach</li>
<li>Revised Standardized approach</li>
</ul>
<h4>1. 6. Relationship between internal models-based and standardized approaches</h4>
<h4>1. 7. Revised Models based approach</h4>
<h4>1. 8. Revised Standardized approach</h4>
<h3>Links:</h3>
<a href="https://www.risk.net/topics/fundamental-review-of-the-trading-book-frtb" target=_blank>Risk.net :: Fundamental Review of the Trading Book</a><br />
<a href="https://www.finextra.com/blogposting/13536/what-does-frtb-or-fundamental-review-of-trading-book-really-mean" target=_blank>FinExtra - Blog :: What does FRTB or Fundamental Review of trading book really mean?</a><br />
<a href="file:///G:/TiddlyWiki//docu/EY_FundamentalReviewOfTheTradingBook_ey-fundamental-review-of-the-trading-book.pdf" target=_blank>Ernst & Young :: Fundamental Review of the Trading Book</a><br />
<a href="https://www.quantifisolutions.com/frtb" target=_blank>Quantifisolutions :: FRTB</a><br />
<br /></li>
</ul>
</html>
<html>
To add to the earlier tip on automated transfer using<br />
FTP, you can define a macro by name 'init' which will<br />
automate the whole transfer.<br />
<h3>Defining the macro</h3>
In the .netrc file after the definition for the machine<br />
name,add the following definition.
<code><pre>
macdef init
bin
hash
cd <directory>
!cd <directory>
put/get <filename>
bye
</pre></code>
The line begining with macdef starts the definition of a<br />
macro.All the sub sequent lines upto a blank line (or<br />
end of file) are part of the macro.<br />
<br />
Now if you type
<code><pre>ftp <machine name></pre></code> at the prompt,<br />
the whole ftp will happen automatically.<br />
<br />
These macros can also be defined in any other name in<br />
which case,you will have to type the macro name at the<br />
ftp prompt for its statements to get executed.<br />
<br />
This tip generously supported <br />
by: subha@hitechclub.com<br />
<br />
</html>
When transferring the files through FTP, if
you don't want to answer yes/no for
transferring each file.
Then there are 2 ways to do that:
1) ftp -i <machine>
or
2) Set the prompt mode to 'off ' in ftp prompt.
ftp> prompt
Interactive mode off.
This tip generously supported
by: M.Nithyanandham@blr.spcnl.co.in
<html>
Um in den Diskussionsforen / Newsgroups mathematische Ausdrücke<br />
resp. Formeln anzugeben, gibt es folgende Möglichkeiten:
<ul>
<li>um Inline-Formeln mit MathJax zu setzen :: “\(LaTeX-Code\)“</li>
<li> für abgesetzte (displaystyle) Formeln :: <br />
<ul>
<li>“<blockquote>$$LaTeX'ish code$$</blockquote>“ bei Verwendung eines Quelltext-Editors</li>
<li>“$$LaTeX'ish code$$“</li>
</ul></li>
</ul>
</html>
<html>
<h3>Aufruf Eclipse Oxygen.1 (Sept. 2017) </h3>
<b><code>
<ol>
<li>source $HOME/jigsaw/uebung/env_linux.sh</li>
<li>$ECLIPSE_HOME/eclipse</li>
</ol>
</code></b>
</html>
<html>
<ul>
<li>in der mail‐Box eMail mit folgender Fehlermeldung “gefunden“:
<code><pre>Invalid MIT-MAGIC-COOKIE-1 keyUnable to init server: Verbindung ist gescheitert: Verbindungsaufbau abgelehnt
(zenity:1909): Gtk-WARNING **: 09:20:01.839: cannot open display: :0.0</pre></code>
Aufruf von ./todlist.sh über cron‐Eintrag
</li>
</ul>
</html>
<html>
<h2>Increased stack size for MxML worker Launcher</h2><br>
<br>
the error log indicated a deep recursion in some formulas for certain kind of<br>
trades (many periods?) on some templates (e.g. using sub templates), so I would<br>
guess the Java stack size which is 320kB by default on Intel Solaris is too<br>
small for this level of recursion. I have doubled it to 640k, which seems to be<br>
sufficient for the given confirmations, still it may be not sufficient for more<br>
complex combination of trade/formula/templates. Increasing it affects all<br>
threads (of mxml exchange), so I would consider increasing it even more only if<br>
really necessary (currently, ~5500 threads eating 1.8GB of stack space memory,<br>
increasing it by 600MB for mxml exchange now).<br>
<br>
The change I have done is this one, printed bold:<br>
<br>
~/scripts/launchmxj_start.sh<br>
[...]<br>
<br>
printf "\n starting mxml exchange\n"<br>
./launchmxj.app -mxml <b>-jopt:-Xss640k</b> -jopt:-Xms256M -jopt:-Xmx1024M -jopt:-verbose:gc \ <br>
-jopt:-XX:+PrintGCTimeStamps -jopt:-XX:+PrintGCDetails<br>
sleep 10<br>
<br>
[...]<br>
</html>
<html>
<p>
1. Über GUI:<br>
‐‐> Configuration<br>
‐‐> Settings<br>
‐‐> Processing settings<br>
‐‐> General information<br>
‐‐> Global<br>
‐‐> Current date<br>
</p>
<p>
2. Über SQL:<br>
‐‐> z.B. sql advantage aufrufen<br>
‐‐> Datenbank-Server auswählen<br>
‐‐> ??
</p>
</html>
<html>
<ul>
<li><h3>29.09.2022 ‐ Donnerstag (Börsenbrief)</h3>
<ul>
<li>So Rot der Montag, so Grün der Mittwoch … aber warum?</li>
<li>Auswirkungen des Hurrikans „Ian“ über Florida</li>
<li>Vorstellung einzelner Sektoren: Energy Select Sector SPDR ETF (<b>XLE</b>)</li>
</ul>
</li>
</ul>
</html>
<html>
<code><pre>
#!/bin/sh
#
# This script can be used to warn the users
# that the file system is getting full.
#
# Script needs adjusted for your needs.
# Below is set to monitor all the file systems
# mounted and report to RECEIVER.
#
# Usage: as a cron entry for best use.
#
RECEIVER=nachiappan.ramanathan@aig.com
for fs in `df -k|awk '{print $1}'|sed -n "3,14 p"`
do
x=`df -kl | grep $fs | awk '{ print $5 }'`
y=50%
if [ $x -gt $y ]
then
message="File System `df -k |grep $fs |awk '{print $6\", \"$5}'` Full!!!"
echo $subject
echo $message | mailx -s "`hostname` - File System Full Warning !!!" $RECEIVER
fi
done
</pre></code>
<br />
This tip generously supported by:<br />
Nachiappan.Ramanathan@aig.com<br />
</html>
<html>
<ul>
<li><b>Introduction to C++ for Financial Engineers</b><br />
Daniel Duffy<br />
74 Euro<br />
978-1118856468</li>
<br />
<li><b>Financial Instrument Pricing Using C++</b><br />
Daniel Duffy<br />
74 Euro<br />
978-1118856468<br />
2. Auflage!!!!</li>
</li>
<br />
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="Financial Modeling Prep API Documentation" target=_blank>Documentation</a></li>
<li><a href="https://financialmodelingprep.com/how-to/how-to-call-the-financial-modeling-prep-api-with-python" target=_blank>Financial Modeling Prep :: How to call the financial modeling prep api with Python</a></li>
<li><a href="https://rapidapi.com/theskateba74/api/financial-modeling-prep/details" target="_blank" rel="noreferrer noopener">
RapidAPI :: Financial Modeling Prep ‐ Details</a></li>
</ul>
</html>
<html>
<ul>
<li><h3>07.04.2022 ‐ Donnerstag (Börsenbrief)</h3>
Zur Erinnerung: <br />
Wenn die US-Notenbank als bisher größter Käufer von Staatsanleihen ihre Bilanz reduziert,<br />
erhöht sich das Angebot auf dem Markt und die Kurse sinken, aber die Renditen steigen<br />
(diese beiden Faktoren stehen in einem umgekehrten Verhältnis). Diese Faktoren sind un‐<br />
günstig für den breiten Aktienmarkt.<br />
<br />
<ul>
<li><details><summary>Führt eine inverse Zinskurve zwangsläufig in eine Rezession?</summary><br />
<b>Definition einer Rezession:</b><br />
Eine Volkswirtschaft befindet sich dann in einer Rezession, wenn in mindestens zwei aufeinander<br />
folgenden Quartalen das Wirtschaftswachstum negativ ist.<br />
<br />
Die Rezession kann man als wirtschaftlichen Abschwung bezeichnen, und sie kann auch die Vor‐<br />
stufe zu einer sogenannten Depression sein. Dabei handelt es sich dann um einen deutlichen und<br />
starken Einbruch der wirtschaftlichen Entwicklung. <br />
<br />
<img src="./pictures/Renditedifferenz.jpg" height=440 width=1163 /><br />
<br />
Diese Grafik zeigt die Renditedifferenz zwischen den 10-jährigen US-Staatsanleihen und den 2-jährigen. Wenn die kurzfristige Rendite höher ist als die langfristige Rendite, bewertet der Markt das kurzfristige Risiko höher, als das langfristige Risiko. Dies kann auf kurzfristige Turbulenzen am Aktienmarkt hindeuten.<br />
<br />
Wie Ihr anhand der rot markierten Felder erkennen könnt, passiert das in Wirtschaftszyklen immer wieder ‐ allerdings geht unser Fokus auf die grauen Schattierungen nach diesen Bereichen. Das sind die Zeitröume der Rezessionen, die im langjährigen Durchschnitt etwa 3 Quartale andauerten, bevor im 4 Quartal eine Stabilisierung erfolgte. Jede Rezession unterliegt natürlich eigenen Einflüssen und damit auch einem anderen zeitlichen Verlauf. <br />
<br />
Institutionelle Anleger halten in der Regel keine Barmittel. Stattdessen halten sie Wertpapiere mit dem geringsten Risiko, gleichzeitig hoher Liquiditöt und Rendite, also Staatsanleihen. Wenn die Inflation hoch ist, verlieren sie dennoch Geld, denn während die nominale Rendite derzeit positiv ist, ist der reale Zinssatz negativ.<br />
<br />
Diese Theorie ist als Fisher-Effekt bekannt, den der gleichnamige Wirtschaftswissenschaftler 1930 in seinem Werk "Theory of Interest" erläuterte. Vereinfacht ausgedrückt: Wenn ein großer Investor derzeit 10-jührige US-Treasuries mit einer aktuellen Rendite von 2,5% hält und die Inflationsrate bei 7,9% liegt, ergibt sich ein Realzins von -5,4% für diesen Barbestand. Trotz der positiven Rendite von 2,5%, verliert es aufgrund der Inflation an Wert (Kaufkraft).<br />
<br />
</details>
</li>
<li><details><summary>Die eigene Identität als Schlüssel zur Cloud</summary><br />
Zero‐Trust<br />
<img src="./pictures/Crowdstrike-ZeroTrust.png" height=480 width=1024 /><br />
<br />
</details>
</li>
</ul>
</li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://www.geld-magazin.de/finanzen/sparen-anlegen/sparen-anlegen-einzelansicht/article/abgeltungssteuer-zurueckholen-nicht-schwierig-und-sehr-sinnvoll.html" target="_blank"
rel="noreferrer noopener">Geld‐Magazin :: Abgeltungssteuer zurückholen</a></li>
<li><a href="https://www.vlh.de/kaufen-investieren/abgeltungssteuer/erstattung-der-abgeltungssteuer-mit-bank-nachweis.html" target="_blank" rel="noreferrer noopener">
VLH :: Erstattung der Abgeltungssteuer</li>
</ul>
</html>
<html>
<h3>Blackout‐Periode</h3>
Den Mitarbeitern der Federal Reserve, einschließlich der Mitarbeiter der<br />
Chicago Fed, ist es untersagt, sich eine Woche vor dem Samstag vor<br />
einer Sitzung des Offenmarktausschusses (FOMC) und am Donnerstag<br />
nach dieser Sitzung öffentlich zu äußern.<br />
</html>
<html>
<ul>
<li>“CoCo“ := “contingent convertible“</li>
<br />
<li>Instrument zur Stärkung des Eigenkapitals;</li>
<li>die Idee dahinter ist, Fremdkapital automatisch in Eigenkapital zu wandeln,<br />
wenn bspw. die Eigenkapitalquote unter ein bestimmtes Niveau fällt.</li>
<li>Damit wird die Kapitalbasis gestärkt und im besseren Fall Bank‐<br />
pleiten bzw. Staatsinterventionen vermieden.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Coco-Anleihe" target="_blank" rel="noreferrer noopener">Wikipedia</a></li>
<li>Neue Zürcher Zeitung, Nr. 86, 15.04.2010</li>
</ul>
</html>
<html>
<ul>
<li>Wertpapierrechnung (AKV)<br />
<em>(auf das Lagerland achten; an Shell und NL denken)</em>
</li>
<li>GS stückelos
</li>
<li>
</li>
</ul>
</html>
<html>
<a href="https://www.aktien-depot.de/faq/kann-man-depotgebuehren-von-der-steuer-absetzen/"
target="_blank" rel="noreferrer noopener">Aktien‐Depot :: Depotgebühren von der Steuer absetzen</a>
</html>
<html>
<h3>Fortune–Global–500–Liste :: Diese Konzerne erzielen die fettesten Umsätze</h3>
<ol>
<li>Walmart (USA.)
</li>
<li>Saudi Aramco (Saudi Arabien)
</li>
<li>State Grid (China)
</li>
<li>Amazon.com (USA)
</li>
<li>China National Petroleum (China)
</li>
<li>Sinopec (China)
</li>
<li>Exxon Mobil (USA)
</li>
<li>Apple (USA)
</li>
<li>Shell (Großbritannien)
</li>
<li>UnitedHealth Group (USA)
</li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://www.n-tv.de/wirtschaft/Diese-Konzerne-erzielen-die-fettesten-Umsaetze-article24300380.html"
target="_blank" rel="noreferrer noopener">
ntv : Fortune–Global–500–Liste — Diese Konzerne erzielen die fettesten Umsätze</a>
</ul>
</html>
<html>
<ul>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Discounted_Cash-Flow" target=_blank>Wikipedia :: Discounted Cash‐Flow</a></li>
<li><a href="https://medium.com/swlh/intrinsic-valuation-of-stocks-using-python-5d902a34b1a0" target=_blank>medium.com :: Intrinsic valuation of stocks using Python</a> (als PDF vorliegend)</li>
<li><a href="https://financialmodelingprep.com/" target=_blank>FMP :: Discounted Cash Flow Model</a></li>
<!-- li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li -->
</ul>
</html>
<html>
<p>
<img src="./pictures/Dividendenkoenige_2021.webp" height=216 width=629 />
</p>
</html>
<html>
<ul>
<li>EBITDA := <b>E</b>arnings <b>B</b>efore <b>I</b>nterest, <b>T</b>axes, <b>D</b>epreciation and <b>A</b>mortization</li>
<br />
<li>Gewinn vor Abzug von Zinsen, Steuern, von Abschreibungen für Sachanlagen<br />
sowie von Abschreibungen für immaterielle Vermögensgegenstände.</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Ulrich Müller Börsenbrief 23.07.2021</li>
</ul>
</html>
<html>
<a href="https://markets.businessinsider.com/earnings-calendar?op=1" target="_blank" rel="noreferrer noopener">Earnings Calendar US</a>
</html>
<html>
<ul>
<li><b><em>Ehen werden im Himmel geschlossen, aber auf Erden geschieden.</em></b></li>
<li>Das deutsche Güterrecht kennt insgesamt drei verschiedene Güterstände, <br />
die im Rahmen einer ehelichen Gemeinschaft gewählt werden können:
<ol>
<li>Zugewinngemeinschaft</li>
<li>Gütergemeinschaft</li>
<li>Gütertrennung</li>
</ol>
</li>
<li>Der Gterstand hat dabei wesentlichen Einfluss auf die Vermögensverhältnisse der<br />
Eheleute. Diese können insbesondere bei der Auflösung des Güterstandes im Zuge<br />
einer Scheidung von Belang sein, wenn es um die Vermögensteilung geht.</li>
<li>Den Wahlgüterstand der Gütertrennung können Ehegatten dabei nur über einen<br />
Ehevertrag vereinbaren. </li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.scheidung.org/guetertrennung-ehe/" target="_blank" rel="noreferrer noopener">Scheidung.org :: Gütertrennung</a></li>
<li><a href="https://rechtsberater.de/familienrecht-ratgeber/ehevertrag/guetertrennung/" target="_blank" rel="noreferrer noopener">Rechtsberater :: Ehevertrag ‐ Gütertrennung</a></li>
<!--
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
-->
</ul>
</html>
<html>
<ul>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://financetrain.com/equity-swap-example/" target="_blank" rel="noreferrer noopener">Finance Train :: Equity Swap - Example</a></li>
<li><a href="https://www.wallstreetmojo.com/equity-swaps/" target="_blank" rel="noreferrer noopener">Wallstreetmojo.com :: Equity Swap</a></li>
</ul>
</html>
<html>
<ul>
<li><p>Eine Eventualforderung ist eine Erwartung zukünftiger Erträge, die <br />
nicht direkt von einem Unternehmen abhängt. Die Einhaltung oder <br />
Nichteinhaltung hängt von Dritten ab, daher unterliegt sie der Un‐<br />
gewissheit.<br />
</p>
<p>
Wenn in wirtschaftlichen Angelegenheiten von Eventualforderungen ge‐<br />
sprochen wird, bezieht sich dies auf die Erwartung von Ereignissen, die<br />
eintreten können. Das heißt, sie sind in Ungewissheit eingerahmt.<br />
</p>
<p>
Das heißt, es gibt Vermögenswerte, die noch nicht erfolgreich oder ma‐<br />
terialisiert sind, die ein Unternehmen jedoch besitzt und in seinen Ab‐<br />
schluss integriert.
</p>
<p>
Die Existenz dieser Art von Vermögenswerten hängt normalerweise mit<br />
Ereignissen oder Ereignissen in der Vergangenheit zusammen. Daher<br />
sprechen wir von stabilen Erwartungen für einen Zeitraum bis zum Ein‐<br />
treten oder Nichteintreten des erwarteten Ereignisses.<br />
</p>
<p>
In diesem Sinne sind diese wirtschaftlichen Situationen mit Bereichen wie<br />
der Versicherungsvermittlung oder dem Bereich der Entschädigung für<br />
mehrere Faktoren verbunden.<br />
</p>
<p>
Ebenso werden Ansprüche an Dritte, die fein abgegolten sind und dem<br />
Unternehmen zugute kommen, als Eventualforderungen ausgewiesen.<br />
</p>
<h4>Bilanzierung einer Eventualforderung</h4>
<p>
Formal sieht die Rechnungslegung nicht vor, dass Eventualforderungen in<br />
den Rechnungsbüchern enthalten sind. Dies bedeutet, dass ein nicht sehr<br />
getreues Bild des Unternehmens entstehen würde, da die Erwartung zu‐<br />
künftiger Erträge nicht erfüllt werden könnte.<br />
</p>
<p>
Es wäre zum Zeitpunkt der Erfüllung der Eventualtatsache, wenn es richtig<br />
wäre, die Eintragung vorzunehmen, da sie letztendlich als reales Ereignis<br />
betrachtet wird. Mit anderen Worten, es ist ein bestätigter und überprüfbarer<br />
Gewinn.<br />
</p>
<p>
Diese Notiz berücksichtigt die Verbuchung der Vergütung als Einkommen und<br />
wird in diesem Zeitraum Teil des Vermögenswerts in der Bilanz des Unternehmens.<br />
</p>
<p>
Jeder Zeitpunkt vor dieser Bestätigung kann als Hinweis oder Anmerkung in<br />
die Rechnungslegungsinformationen aufgenommen werden, ohne dass sich<br />
dies auf die Zahlen oder die Rechnungslegung auswirkt.<br />
</p>
<h4>Beispiel für Eventualforderungen</h4>
<p>
Beispiele für Eventualforderungen gibt es in der täglichen Wirtschaft viele. Am<br />
häufigsten werden mit Aussichten auf Einziehungen eines bestimmten Geld‐<br />
betrags vorbehaltlich einer gerichtlichen Entscheidung identifiziert.<br />
</p>
<p>
Ein Beweis dafür sind die Entschädigungen, die beim Gewinnen eines Rechts<br />
streits oder bei der Eintreibung von Versicherungen für verschiedene Eventuali‐<br />
täten erhalten werden.<br />
</p>
<p>
Interessanterweise würde diese Tatsache für die andere Partei alternativ als <br />
Eventualverbindlichkeit betrachtet.<br />
</p>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.definebusinessterms.com/de/eventualforderung/" target="_blank" rel="noreferrer noopener">Businessterms :: Eventualforderung</a></li>
<li><a href="https://spiegato.com/de/was-ist-eine-eventualforderung" target="_blank" rel="noreferrer noopener">Spiegato :: Was ist eine Eventualforderung?
</a></li>
<li><a href="https://knoow.net/de/wirtschaftverwaltung/rechnungslegungbesteuerung/eventualforderung/ target="_blank" rel="noreferrer noopener">Knoow :: Rechnungslegungbesteuerung - Eventualforderung</a></li>
<li><a href="https://www.bezahlen.de/lexikon/eventualforderung_3609.html target="_blank" rel="noreferrer noopener">Bezahlen.de :: Eventualforderung</a></li>
</ul>
</html>
<html>
<h3>Beige Book</h3>
<ul>
<li>wird von der Federal Reserve (FED) veröffentlicht;</li>
<li>wird acht Mal pro Jahr veröffentlicht;</li>
<li>Jede Federal Reserve Bank sammelt Informationen über die<br />
aktuelle Wirtschaftslage in ihrem Distrikt durch Berichte von<br />
Bank‐ und Zweigstellenleitern sowie Interviews mit wichtigen<br />
Geschäftskontakten, Wirtschaftswissenschaftlern, Marktex‐<br />
perten und anderen Quellen.</li>
<li>Das Beige Book fasst diese Informationen nach Distrikt und<br />
Sektor zusammen. Eine Gesamtzusammenfassung der zwölf<br />
Distriktberichte wird im Turnus von einer bestimmten Federal<br />
Reserve Bank erstellt.</li>
</html>
<html>
<ul>
<li>Wenn du dein Geld verwaltest, ist es wichtig, den Blick über den Tellerrand zu wagen. Schließlich bedeutet die Verbesserung der persönlichen Finanzen oft, dass man kurzfristig Opfer bringt, die sich in der Zukunft auszahlen.
In diesem Sinne ist es hilfreich, an vergangene finanzielle Entscheidungen zurückzudenken, die du getroffen hast, um zu sehen, ob sie dich auf den richtigen Weg gebracht haben oder ob sie es dir erschwert haben, dein Geld weise einzusetzen. Für mich gab es drei große Entscheidungen, die ich vor über zehn Jahren getroffen habe, die sich positiv ausgewirkt haben und mir geholfen haben. Hier sind sie:
</li>
<li><h3>1. Niemals Kreditkartenschulden zu haben</h3>
Obwohl ich Kreditkarten für jeden möglichen Kauf benutze, habe ich mir schon vor langer Zeit vorgenommen, niemals einen Saldo zu haben. Und daran habe ich mich gehalten.
Das Ergebnis ist, dass ich in den letzten zehn Jahren keinen einzigen US-Dollar an Zinsen zahlen musste. Während ich Tausende von Dollar an Kreditkartenprämien verdiente, konnte ich es vermeiden, meine Käufe durch Zinsen teurer zu machen. Das hat es mir ermöglicht, mein Geld für andere Ziele frei zu halten, anstatt es den Gläubigern zu geben.
</li>
<li><h3>2. Meine Ersparnisse zu automatisieren</h3>
Sobald ich meine Sparziele für den Ruhestand, eine Hausanzahlung, ein Auto und andere große Käufe festgelegt hatte, richtete ich automatische Einzahlungen auf jedes einzelne Sparkonto ein. Dadurch verschwindet ein Teil des Geldes von meinem Girokonto, sobald es eingezahlt wird.
Mit diesem System habe ich mir einen gesunden Pensionsfonds aufgebaut, der es mir ermöglichen sollte, pünktlich und mit viel Geld in Rente zu gehen. Ich war in der Lage, eine 20 %ige Anzahlung zu leisten, als ich mein Haus gekauft habe. Und ich war in der Lage, mein letztes Auto zu bezahlen, ohne einen Autokredit aufzunehmen.
Die Automatisierung meiner Ersparnisse hat es mir auch ermöglicht, Geld auf meinem Girokonto auszugeben, ohne ein schlechtes Gewissen zu haben oder mit einem super-strikten Budget zu leben. Ich weiß bereits, dass ich spare, was ich brauche. Wenn ich also Geld ausgebe, dann ist es Bargeld, das da ist, um ausgegeben zu werden.
</li>
<li><h3>3. Einen Notfallfonds zu haben</h3>
Schließlich habe ich es zu einer finanziellen Priorität gemacht, immer einen Notfallfonds mit sechs Monaten an Lebenshaltungskosten darin zu haben. Das hat mir eine enorme Sicherheit gegeben, vor allem da ich als freiberuflicher Autor arbeite und mein Einkommen schwanken kann.
Ich habe meinen Notfallfonds auch schon oft genutzt, um wichtige Ausgaben zu decken. In diesem Zusammenhang hat mich mein Notfallfonds in einer Vielzahl von Situationen gerettet, von der Lebensrettung meines Hundes bis hin zur Reparatur unseres Ofens, als dieser während eines Kälteeinbruchs kaputt ging. Weil ich das Geld bereit hatte, konnte ich das Geld ausgeben, das ich brauchte, als eine Krise aufkam ‐ und ich musste mein Gelübde nicht brechen, mich von Kreditkartenschulden fernzuhalten.
</li>
<br />
<li>Nicht jede Entscheidung, die wir treffen, wird sich auszahlen, aber diese drei Schritte können sich in der Zukunft auszahlen. Wenn du auch nur eine dieser finanziellen Entscheidungen jetzt in Angriff nimmst, kannst du deine Ziele erreichen und sicherstellen, dass die Schulden dich nicht vom Weg abbringen.</li>
<h3>Links:</h3>
<ul>
<!--
<li><a href="https://www.focus.de/finanzen/boerse/boerse-3-finanzielle-entscheidungen-die-ich-vor-einem-jahrzehnt-getroffen-habe-und-die-sich-wirklich-ausgezahlt-haben_id_13196360.html" target="_blank" rel="noreferrer noopener">The Motley Fool Deutschland</a></li>
-->
<li><a href="https://www.focus.de/finanzen/boerse/boerse-3-finanzielle-entscheidungen-die-ich-vor-einem-jahrzehnt-getroffen-habe-und-die-sich-wirklich-ausgezahlt-haben_id_13196360.html" target="_blank" rel="noreferrer noopener">Focus Online</a></li>
</ul>
</html>
<html>
<ul>
<li>
<p>
Im Ruhestand ist das Geld womöglich knapper als noch im Berufsleben. Deshalb sollten Rentner schon vor dem Ende des Arbeitslebens damit anfangen, sich an die neuen finanziellen Gegebenheiten zu gewöhnen. Mit drei einfachen Tipps.
</p>
<p>
<b>Wichtige Punkte</b><br />
<ul>
<li>Ein kluger Umgang mit Geld ist für Rentner mit einem festen Einkommen noch wichtiger.</li>
<li>Gute Gewohnheiten können Ihnen helfen, Ihren Pensionsfonds zu erhalten.</li>
<li>Kluge Entscheidungen beim Investieren sind ebenfalls wichtig.</li>
</ul>
</p>
<p>
Der Ruhestand ist für die meisten Menschen eine Zeit der Freiheit, da sie nicht mehr stundenlang arbeiten und ihren Lebensunterhalt verdienen müssen.
</p>
<p>
Aber auch wenn Sie frei sind, Ihren Hobbys zu frönen und zu entscheiden, was Sie mit Ihren Tagen anfangen wollen, müssen Sie Ihre finanziellen Entscheidungen klug treffen und sicherstellen, dass Sie sich gute Gewohnheiten aneignen.
</p>
<p>
Um Ihre finanzielle Sicherheit in späteren Jahren zu gewährleisten, sollten Sie sich drei Gewohnheiten angewöhnen, bevor Sie aus dem Berufsleben ausscheiden.
</p>
</li>
<li><h3>1. Im Rahmen eines Budgets leben</h3>
Eine sorgfältige Haushaltsführung ist für Rentnerinnen und Rentner wichtig, um sicherzustellen, dass sie die wichtigsten Ausgaben decken können. In diesem Zusammenhang ist es besonders wichtig, dass die meisten Seniorinnen und Senioren ein festes Einkommen haben und hohe Kosten für medizinische Leistungen tragen müssen.
Mit einem Budget können Rentner ihr Geld für die wichtigsten Dinge ausgeben und gleichzeitig sicherstellen, dass sie sich nicht verschulden oder zu viel Geld von ihrem Rentenkonto abheben.
Die Budgetierung ermöglicht es Senioren auch, ihr Geld gezielter auszugeben, damit sie ihre neu gewonnene Freiheit besser genießen können. Für manche Rentnerinnen und Rentner ist es zum Beispiel wichtig, das Geld zu haben, um zu reisen oder die Enkelkinder zu verwöhnen. Mithilfe eines Budgets können sie feststellen, welche Ersparnisse sie vornehmen können, um Geld für diese Zwecke freizusetzen.
Wenn Sie sich schon vor dem Ruhestand daran gewöhnen, mit einem Budget zu leben, ist die Wahrscheinlichkeit geringer, dass Sie im Ruhestand Geld ohne Plan ausgeben. Außerdem können Sie zusätzliche Ersparnisse für den Ruhestand einplanen, um Ihr Investitionskonto aufzustocken, bevor Sie aus dem Berufsleben ausscheiden.
</li>
<li><h3>2. Leben Sie im Rahmen Ihrer Möglichkeiten</h3>
Rentnerinnen und Rentner erhalten in der Regel einen bestimmten Betrag von der Sozialversicherung und müssen den Rest aus Ersparnissen bestreiten.
Um ihren Pensionsfonds zu erhalten, müssen Senioren sicherstellen, dass sie eine sichere Entnahmerate beibehalten und nicht zu schnell zu viel von ihren Investitionskonten abheben. Eine Möglichkeit, dies zu tun, ist die Vier-Prozent-Regel. Diese besagt, dass im ersten Jahr nur vier Prozent des Guthabens auf dem Rentenkonto entnommen und in den Folgejahren an die Inflation angepasst werden.
Rentnerinnen und Rentner müssen sicherstellen, dass sie nicht mehr ausgeben, als sie sich leisten können, und gleichzeitig eine sichere Entnahmerate beibehalten. Das bedeutet, dass sie im Rahmen der Möglichkeiten leben müssen.
Es ist viel einfacher, sich daran zu gewöhnen, weniger auszugeben, als Sie einnehmen, wenn Sie damit anfangen, bevor Sie tatsächlich in den Ruhestand gehen. Das ist besonders wichtig, wenn Sie im Ruhestand weniger Einkommen haben als während Ihrer Arbeitszeit und Sie Ihren Lebensstil entsprechend anpassen müssen.
</li>
<li><h3>3. Ihr Investitions-Portfolio jährlich neu ausbalancieren</h3>
Schließlich sollten sich Senioren angewöhnen, ihr Investitions-Portfolio regelmäßig zu überprüfen, um sicherzustellen, dass sie eine angemessene Mischung von Vermögenswerten haben.
Mit der Zeit könnte Ihr Portfolio zu stark in eine bestimmte Art von Vermögenswerten oder in eine bestimmte Branche investiert sein. Wenn das passiert, könnten Sie entweder zu viel oder zu wenig Risiko eingehen. Das ist für jeden Anleger gefährlich, vor allem aber für Menschen, die sich im Ruhestand befinden oder kurz davor sind, da sie keine Zeit haben, sich von Verlusten zu erholen oder darauf zu warten, dass sich der Markt im Falle eines Crashs erholt.
Bei der Neugewichtung Ihres Portfolios geht es darum, Ihre Investitionen so umzuschichten, dass Sie die für Ihr Alter und Ihre Risikotoleranz geeignete Vermögensaufteilung haben. Sie sollten sich angewöhnen, dies mindestens einmal pro Jahr vor dem Ruhestand zu tun, um sicherzugehen, dass das Geld auch reicht.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.fool.de/2021/11/03/3-finanzielle-gewohnheiten-die-man-sich-vor-dem-ruhestand-aneignen-sollte/" target="_blank" rel="noreferrer noopener">The Motley Fool Deutschland</a></li>
<li><a href="https://www.focus.de/finanzen/boerse/boerse-3-finanzielle-gewohnheiten-die-man-sich-vor-dem-ruhestand-aneignen-sollte_id_24387178.html" target="_blank" rel="noreferrer noopener">Focus Online</a></li>
</ul>
</html>
<html>
<h3>Die Griechen - Finanzkennzahlen im Überblick</h3>
<table border="1">
<tr>
<td>α<br><br>"Alpha"</td>
<td></td>
</tr>
<tr>
<td>β<br><br>"Beta"</td>
<td>auch: Marktänderungssensitivität</td>
</tr>
<tr>
<td>γ<br><br>"Gamma"</td>
<td>"Deltaänderungssensitivität" (von mir so genannt!!)<br>
<br>
- Das Gamma einer Option gibt an, wie stark sich deren Delta (in linearer<br>
Näherung) ändert,wenn sich der Kurs des Basiswerts um eine Einheit ändert und<br>
alle anderen Grössen sich nicht verändern.<br>
<br>
- Mathematisch ist das Gamma die zweite Ableitung des Optionspreises nach dem<br> Preis des Basiswertes.<br>
<br>
- Für den Inhaber der Option (also sowohl für Long Call als auch für Long Put)<br> gilt immer, dass Gamma > 0 ist.<br>
<br>
- Die Kennzahl findet auch bei Absicherungsstrategien in Form des Gamma-Hedging<br> Berücksichtigung.<br>
<br>
- Das Delta eines Optionsscheins ist keine statische Kennzahl. Vielmehr bewirken<br>
Preisbewegungen des Basiswertes Veränderungen im Delta. Das Mass dieser<br>
Änderungen des Deltas wird durch die Kennzahl Gamma gemessen. Je höher das<br>
Gamma, desto höher die Änderungen des Deltas bei einer Kursänderung des<br>
Basiswertes. </td>
<tr>
</tr>
<td>δ<br><br>"Delta"</td>
<td>auch: Kursänderungssensitivität<br>
<br>
- Diese Kennzahl gibt an, welchen Einfluss der Preis des Basiswertes auf den<br>
Wert der Option hat.<br>
<br>
- Das Delta ist mathematisch die erste Ableitung des Optionspreises nach dem<br>
Preis des Basiswertes. So bedeutet ein Delta von 0,5, dass eine Veränderung des<br>
Basiswertes um 1 Euro (in linearer Näherung) eine Veränderung des Optionspreises<br>
von 50 Cent hervorruft.<br>
<br>
- Das Delta ist insbesondere im Zusammenhang mit dem sog. Delta-Hedging wichtig.<br>
<br>
- Optionsscheine reagieren nicht in einem konstanten Verhältnis auf Bewegungen<br>
des Basiswertes. Die Preissensitivität eines Optionsscheins erklärt die<br>
Kennziffer Delta. Sie beziffert die Veränderung des Optionsscheinpreises im<br>
Verhältnis zur Veränderung des Basiswertpreises um eine Einheit. Das Delta eines<br>
Optionsscheins kann beim Call Werte zwischen 0 und 1 annehmen, beim Put Werte<br>
zwischen 0 und - 1.<br>
<br>
- Optionsscheine, die "weit aus dem Geld" sind, werden von Veränderungen des<br>
Basispreises verhältnismässig gering berührt und haben daher Preissensitivitäten<br>
nahe bei 0.<br>
<br>
- Der Wert eines Optionsscheines dagegen, der "tief im Geld" ist, besteht fast<br>
vollständig aus Innerem Wert. Ein solcher Optionsschein bewegt sich quasi "im<br>
Gleichschritt" mit dem Preis des Basiswertes und hat eine Preissensitivität nahe<br>
bei 1 (Call) bzw. - 1 (Put).<br>
<br>
- Das Delta ist eine der wichtigsten Kennziffern für den Optionsscheinanleger,<br>
denn nur ein ausreichend hoher Wert stellt sicher, dass sich der Wert des<br>
Optionsscheins im Einklang mit der erwarteten Bewegung des Basiswertes zu<br>
Gunsten des Anlegers entwickelt.<br>
</td>
<tr>
</tr>
<td>ω<br><br>"Omega"</td>
<td> auch: relative Kursänderungssensitivität<br>
<br>
- Man erhält durch Multiplikation des Deltas mit dem aktuellen Hebel eine neue<br>
Hebelgrösse, die sich in den Kurstabellen meist unter der Bezeichnung Omega oder<br>
"Hebel effektiv" findet.<br>
<br>
- Eine Option mit einem aktuellen Hebel von 10 und einem Delta von 50% hat also<br>
"nur" ein Omega von 5, der Schein steigt also etwa um 5%, wenn die Basis um 1%<br>
steigt.<br>
<br>
- Auch hier ist jedoch wieder zu beachten, dass sowohl das Delta und das Omega<br>
und die meisten anderen Kennzahlen sich ständig ändern. Trotzdem bietet das<br>
Omega ein relativ gutes Bild von den Chancen der entsprechenden Option.<br>
</td>
<tr>
</tr>
<td>ρ<br><br>"Rho"</td>
<td>auch: Zinsänderungssensitivität<br>
<br>
- Das Rho einer Option gibt an, wie stark sich der Wert der Option ändert, wenn<br>
sich der risikofreie Zinssatz am Markt um einen Prozentpunkt ändert. Für<br>
Call-Optionen ist Rho positiv, für Put-Optionen negativ.<br>
<br>
- Da Optionsscheine Termingeschäfte darstellen, spielt der aktuelle Zinssatz für<br>
deren Bewertung eine Rolle. Die Reagibilität von Optionsscheinpreisen auf<br>
Veränderungen der Zinsen werden durch die Kennzahl Rho gemessen.<br>
</td>
<tr>
</tr>
<td>σ<br><br>"Sigma"</td>
<td> - beschreibt die Volatilität eines Kurses, also seine Schwankung im<br>
statistischen Mittel.<br>
<br>
- es steht zugleich für die Einheit "Standardabweichung", so dass mit einer<br>
Schwankungsbreite von 1 Sigma eine Wahrscheinlichkeit (in einer<br>
Normalverteilung) von ca. 66% beschrieben wird, mit der der Kurs innerhalb von 1<br>
Sigma entfernt vom Mittelwert liegen wird.<br></td>
</tr>
<tr>
<td>θ<br><br>"Theta"</td>
<td>auch: Laufzeitänderungssensitivität<br>
<br>
- Der Wertverlust, den Optionsscheine mit Ablauf der Restlaufzeit erleiden, wird<br>
durch die Kennzahl Theta ausgedrückt. <br>
- Sie zeigt an, um welchen Betrag der theoretische Wert des Optionsscheins<br>
sinkt, wenn die Restlaufzeit des Optionsscheins um eine Einheit, z.B. einen Tag<br>
(Tagestheta) oder eine Woche (Wochentheta) zurückgeht. <br> </td>
</tr>
<tr>
<td>Vega<br>(alternativ: <br>λ)</td>
<td>auch: Volatilitätsänderungssensitivität<br>
<br>
- Das Vega (manchmal auch Lambda, da <b>Vega kein Buchstabe des griechischen<br>
Alphabets ist</b>) einer Option gibt an, wie stark sich der Wert der Option ändert,<br>
wenn sich die Volatilität des Basiswerts um einen Prozentpunkt ändert und alle<br>
anderen Grössen konstant bleiben.<br>
<br>
- Implizite Volatilität ist keine Konstante, sondern sie variiert je nach<br>
Änderung der Erwartungen der Marktteilnehmer. Die Kennzahl Vega gibt an, um<br>
welchen Betrag sich der Preis des Optionsscheins verändert, wenn die Volatilität<br>
des Basiswerts um eine Einheit steigt bzw. fällt. Ein hohes Vega bedeutet somit,<br>
da&szuml; der Optionsscheinkurs verhältnismässig stark auf Veränderungen in der<br>
Volatilität des Basiswerts reagiert. Der Wert von Calls als auch Puts steigt,<br>
sofern die impliziten Volatilitäten am Optionsmarkt steigt.<br>
</td>
</tr>
</table>
<br>
<a href="http://www.claus-ebert.de/doc/wertpapiere/optionsscheine/optionsscheine.html" target=_blank>Claus Ebert :: Optionsscheine</a><br />
<br />
s.a.<br />
Ariava_DynamischeKennzahlen-DeltaOmega_etAl..pdf<br />
<a href="http://www.pnlexplained.com/PEP_Greeks_Explained.html" target=_blank>PnL Explained Professional Association :: Greeks Explained</a><br />
<br>
</html>
<html>
<h2>Punkt für Punkt :: So sparst Du bei der Grunderwerbsteuer</h2>
<p>
Du willst ein Haus oder eine Wohnung kaufen? Oder ein Baugrundstück? Dann hast Du bestimmt schon festgestellt, dass die Kaufnebenkosten nicht zu unterschätzen sind. Einen großen Teil macht die Grunderwerbsteuer aus: Je nach Bundesland beträgt sie 3,5 bis 6,5 Prozent des Kaufpreises.
</p>
<p>
Mit diesen fünf Tipps kannst Du sparen:
</p>
<p>
<h3>Tipp 1 :: Grunderwerbsteuer komplett vermeiden</h3>
</p>
<p>
In bestimmten Konstellationen musst Du überhaupt keine Grunderwerbsteuer zahlen. Steuerfrei bleibt der Kauf unter nahen Angehörigen, die in gerader Linie miteinander verwandt sind: also Verkäufe zwischen Eheleuten, Eltern und Kindern sowie Großeltern und Enkeln.
</p>
<p>
Erwirbst Du die Immobilie als Teil des Zugewinnausgleichs von Deinem Ex-Partner oder Deinen Schwiegereltern, wird ebenfalls keine Grunderwerbsteuer fällig.
</p>
<p>
<h3>Tipp 2 :: In einem anderen Bundesland investieren</h3>
</p>
<p>
Die Steuersätze sind unterschiedlich: Bist Du beim Ort flexibel, kannst Du Dich vielleicht für eine Immobilie in einem Bundesland entscheiden, in dem ein niedriger Steuersatz gilt.
</p>
<p>
Ein Beispiel: Auf ein Grundstück für 200.000 Euro müsstest Du im thüringischen Meiningen derzeit 13.000 Euro Grunderwerbsteuer zahlen. Wenige Kilometer weiter im bayerischen Mellrichstadt sind gerade mal 7.000 Euro fällig, also nur etwas mehr als die Hälfte.
</p>
<p>
<h3>Tipp 3 :: Verträge für Grundstück und Haus trennen</h3>
</p>
<p>
Wenn Du neu bauen willst, solltest Du erst das Grundstück kaufen und später mit dem Hausbau beginnen. Dann musst Du nur für den Grundstückskauf die Grunderwerbsteuer tragen. Kostet das Grundstück 100.000 Euro und das Haus darauf 250.000 Euro, sparst Du rund 70 Prozent der Steuer!
</p>
<p>
<b>Wichtig:</b><br />
Beide Verträge müssen zeitlich und inhaltlich getrennt sein. Dazwischen sollte mindestens ein halbes Jahr liegen. Und Du solltest das Grundstück nicht von der Firma kaufen, die Dir das Haus baut.
</p>
<p>
<h3>Tipp 4 :: Inventar extra ausweisen</h3>
</p>
<p>
Ist das gekaufte Haus schon eingerichtet? Lass Möbel im Kaufvertrag extra ausweisen. Denn Du musst nur Grunderwerbsteuer auf untrennbar mit dem Gebäude verbundene Gegenstände zahlen. Dazu zählen Brennöfen, Gewächshäuser, Mauern, Zäune, Hof-, Weg- und Platzbefestigungen. Als (bewegliches) Inventar gelten dagegen neben Möbel auch Einbauküche, Markise, Sauna und Gartenhaus.
</p>
<p>
Rund 15 Prozent vom ursprünglichen Kaufpreis für die Einrichtung akzeptiert das Finanzamt erfahrungsgemäßziemlich klaglos. Ist die Summe größßer, solltest Du sie gut belegen können.
</p>
<p>
<h3>Tipp 5 :: Steuer mit Verkäufer teilen</h3>
</p>
<p>
Im notariellen Kaufvertrag ist oft geregelt, dass der Käufer die Grunderwerbsteuer übernehmen muss. Aber nicht immer. Gibt es im Vertrag keine entsprechende Formulierung, müssen sich Käufer und Verkäufer die Steuer hälftig teilen.
</p>
<p>
Worauf Du beim Hauskauf sonst noch achten musst, erfährst Du <a href="https://www.finanztip.de/baufinanzierung/hauskauf-checkliste/" target="_blank" rel=noreferrer noopener">hier</a>.
</p>
<h3>Links:</h3>
<ul>
<li><a href="https://www.finanztip.de/blog/nl_2021kw41/#pfp1" target="_blank" rel="noreferrer noopener">Finanztip‐Newsletter 15. Oktober 2021 / KW 41</a></li>
</ul>
</html>
<html>
<p>
<b>Achtung:</b><br />
Solltest Du die schulischen Trades eingehen, achte bitte darauf, <br />
eine Klumpenbildung in den einzelnen Sektoren in Deinem Depot<br />
zu vermeiden.
</p>
<p>
Du kannst das überprüfen, indem Du die TWS öffnest, dann mit<br />
der rechten Maustaste auf → Finanzinstrumente klickst, und dann<br />
→sortieren →nach Branche einstellst.
</p>
<h3>Links:</h3>
<ul>
<li>UMWA‐Börsenbrief, 30.06.2022</li>
</ul>
</html>
<html>
<ul>
<li><h3>Aktien, die in dem Bereich als “Indikatorwert“ gelten: </h3>
<ul>
<li>Öl: Exxon, XOM</li>
<li>Kraftwerkskohle: BTU</li>
<li>US-Gas: EQT</li>
<li>Euro-Gas: Royal Dutch Shell, SHEL</li>
<li>Aluminium: Alcoa, AA</li>
<li>Kupfer: FCX</li>
<li>Nickel: VALE</li>
<li>Zink: TECK</li>
<li>Weizen: MOS</li>
<li>Sojabohnen: CF</li>
<li>Schweine: JBS</li>
</ul>
</li>
</ul>
<h3>Quelle:</h3>
<ul>
<li>UMWA‐Börsenbrief, 07.03.2022</li>
</ul>
</html>
<html>
<p>
Am Anfang will jeder dabei sein ‐ es gibt ja so viel Geld im Markt! Die Aktien steigen, die Staatsausgaben sind gigantisch, die Geldmenge wird jeden Monat größer. Die Auswirkungen sind anfangs einfach großartig. Ab und zu redet jemand über höhere Haushaltsdefizite, aber das Gefühl von allgemeinem Wohlstand überdeckt dies Geschwätz ‐ denn noch sieht man stabile Preise. Jeder profitiert und kaum jemand verliert. Das ist der Beginn, der sich dann aber zunehmend verschlechtert.
</p>
<p>
Die Regierung kann immer mehr Geld in den Markt pumpen, um die späteren Auswirkungen abzuwehren, aber die späteren Auswirkungen warten geduldig.
</p>
<p>
In einer klassischen Inflation kommt es dann zu Unruhen in der Bevölkerung, Geldknappheit, fallenden Aktienmärkten, steigenden Steuern, noch größeren Staatsdefiziten und einer immer noch rasanten Geldmengenausweitung, die nun von steigenden Preisen und der Unwirksamkeit aller herkömmlichen Mittel begleitet wird.
</p>
<p>
Alle zahlen und niemand profitiert. Das ist der gesamte Zyklus einer jeden Inflation.
</p>
<p>
Läuft die Inflation völlig aus dem Ruder (Hyperinflation), wurden in der Vergangenheit radikale Lösungen für einen Neustart gefunden: Die alte Währung bleibt nur noch mit einem prozentualen Anteil erhalten, oftmals wird neues Geld gedruckt, es kommt zu Schuldenschnitten.
</p>
<p>
<b>Verlierer dieser Methode:</b> Arbeiter und Angestellte, die mit ihrem Lohn auskommen müssen. Hier verdient man Geld und zahlt damit seinen Lebensunterhalt, verdient sich also sprichwörtlich seine Brötchen.
</p>
<p>
<b>Gewinner dieser Methode:</b> Aktionäre und Besitzer von Anlagevermögen und Immobilien. Als Aktionär hat man immer Anteile am Produktionsvermögen. Dir gehört ein Teil der Bäckerei. Du bekommst regelmäßig Brötchen …
</p>
<p>
<b>Gegenspieler der Inflation:</b> die Renditen der Staatsanleihen → normalerweise steigen die Renditen, wenn die Inflation zunimmt
</p>
<h3>Links:</h3>
<ul>
<li>UMWA :: 14.10.2021 ‐ Börsenbrief</li>
<li>UMWA :: 15.10.2021 ‐ Börsenbrief + Empfehlungen + Dividendentitel + Tagestipp</li>
</ul>
</html>
https://www.tagesschau.de/wirtschaft/finanzen/jackson-hole-notenbanker-treffen-vorbericht-100.html
https://en.wikipedia.org/wiki/Jackson_Hole_Economic_Symposium
<html>
<ul>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.financescout24.de/wissen/ratgeber/kapitalerhoehung" target=_blank>FinanceScout 24</a></li>
<li><a href="https://www.anuber.de/kapitalerhoehung-aktien.html" target=_blank>ANuber Internet Finanzmagazin</a></li>
<li><a href="https://www.experto.de/praxistipps/boersenwissen-kompakt-kapitalerhoehung-alles-was-der-aktionaer-dazu-wissen-muss.html" target=_blank>Experto :: Börsenwissen ‐ Was der Aktionär dazu wissen muss</a></li>
<li><a href="https://prudentwater.com/en/auswirkungen-der-kapitalerhohung-auf-den-aktienkurs/" target=_blank>PrudentWater :: Auswirkungen einer Kapitalerhöhung auf den Aktienkurs</a></li>
<!--li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li-->
</ul>
</html>
<html>
<ul>
<li>“NFT“ := Non‐Fungible Token</li>
<lI>Fungibilität (lateinisch fungibilis, “vertretbar“; auch: Vertret‐<br />
barkeit) ist die Eigenschaft von Gütern, nach Maßeinheit, Zahl<br />
oder Gewicht bestimmbar und deshalb innerhalb derselben<br />
Gattung durch andere Stücke gleicher Art, Menge und Güte <br />
austauschbar zu sein. </li>
<li>Ein Token entspricht einer virtuellen Besitzurkunde ‐ und<br />
stellt damit einen digitalen Vermögenswert dar.</li>
<li>“<em>Non‐fungible</em>“ bedeutet, dass dieser nicht austauschbar<br />
ist. Das wäre zum Beispiel beim Bitcoin der Fall: So wie<br />
zehn Euro immer zehn Euro bleiben, ist ein Bitcoin immer<br />
ein Bitcoin. NFTs hingegen sind einzigartig ‐ wie es im<br />
echten Leben beispielsweise auch ein Bild von Picasso<br />
wäre. </li>
<li>Als NFTs können daher unter anderem Videos, Fotos,<br />
GIFs, Memes, virtuelle Kunstwerke oder InGame‐Items<br />
gehandelt werden.</li>
<li><h3>Funktionsweise</h3>
NFTs werden auf der Ethereum-Blockchain gespeichert ‐<br />
folglich werden sie auch mit der Kryptowährung Ethereum<br />
bezahlt.</li>
<li>Auf der Blockchain lassen sich zudem die Besitzverhält‐<br />
nisse eines NFTs klar nachverfolgen. Das schützt vor Ko‐<br />
pien oder Verfälschungen.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.focus.de/finanzen/gespeichert-auf-ethereum-blockchain-was-du-ueber-einen-nft-wissen-solltest_id_24464412.html" target="_blank" rel="noreferrer noopener">Focus Online :: NFT</a></li>
</ul>
</html>
<html>
<ul>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://ratgeber.immowelt.de/a/nebenkostenabrechnung-pruefen-tipps-fuer-mieter.html" target="_blank"
rel="noreferrer noopener">ImmoWelt :: Nebenkostenabrechung prüfen</a></li>
<li><a href="https://www.mietrecht.org/nebenkosten/nebenkostenabrechnung-pruefen-checkliste/" target="_blank"
rel="noreferrer noopener">Mietrecht :: Checkliste ‐ Nebenkostenabrechnung prüfen</a></li>
<li><a href="https://www.ndr.de/ratgeber/verbraucher/Nebenkostenabrechnung-pruefen-Tipps-fuer-Mieter,nebenkosten101.html" target="_blank" rel="noreferrer noopener">NDR ‐ Ratgeber :: Nebenkostenabrechnung prüfen</a></li>
<li><a href="https://www.nebenkostenabrechnung.com/nebenkostenabrechnung-erstellen-anleitung/"
target="_blank" rel="noreferrer noopener">
Nebenkostenabrechnung.com :: Anleitung Erstellung einer Nebenkostenabrechnung
</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
Geben Sie den Text für 'Neuer Tiddler' ein
<html>
<ul>
<li>auch: Holländische Auktion</li>
<li>engl.: dutch auction</li>
<li>wg. GrandCity Properties, Kapitalmaßnahme, 2021-02-03 </li>
<li>ist eine <b><em>Rückwärtsauktion</em></b>, dh. eine Auktion mit fallenden Preisen;</li>
<li>Hier stellt der Verkäufer ein Angebot zum Verkauf und gibt einen<br />
Startpreis vor. Im Verlauf der Auktion werden schrittweise niedrigere<br />
Preise vorgegeben, d. h. der Verkaufspreis für den Artikel sinkt mit<br />
zunehmender Laufzeit. Der erste Kaufinteressent, der zustimmt, erhält<br />
den Zuschlag zum momentanen Preis. Je länger die Kaufinteressenten<br />
abwarten, desto niedriger ist also der Preis. </li>
<li>Vorzug: liegt in der Geschwindigkeit der Abwicklung<br />
→ Im Gegensatz zu einer gewöhnlichen Auktion wird das Auktions<br />
gut schneller verkauft, da die Entscheidung schon bei der ersten Zu<br />
stimmung eines Interessenten feststeht. Die Interessenten können<br />
nicht aufeinander reagieren, Bietergefechte sind ausgeschlossen.<br />
Somit können große Mengen von Auktionsgütern in kurzer Zeit verkauft<br />
werden. </li>
<li>Bei niederländischen Auktionen stehen die Kaufinteressenten<br />
unter hohem Entscheidungsdruck. Wenn ein Interessent taktiert<br />
und auf einen günstigeren Preis wartet, ist die Wahrscheinlichkeit<br />
hoch, dass das Los an einen Konkurrenten verkauft wird, der<br />
schneller zugreift.</li>
<!--
<li></li>
-->
</ul>
<h3>Links:</h3>
<ul>
</li><a href="https://de.wikipedia.org/wiki/Niederl%C3%A4ndische_Auktion" target="_blank" rel="noreferrer noopener">
Wikipedia :: Niederländische Auktion</a></li>
</ul>
</html>
<html>
Das “Pan-Europäische Rentenprodukt“ (“Pan-European Pension Product“) soll ab dem kommenden Jahr der privaten Altersvorsorge in der Europäischen Union einen neuen Schub bringen. Die zuständigen EU-Gremien haben einen Rechtsrahmen geschaffen, damit Versicherer, Fondsgesellschaften und Banken Personen, die für die Altersvorsorge sparen wollen, ein “einfaches, transparentes und kostengünstiges“ Angebot grenzüberschreitend EU-weit anbieten können:
<ul>
<li>“Einfach“ heißt, es muss ein Standardangebot vorgelegt werden, welches Sparerinnen und Sparer ohne besondere Vorkenntnisse in finanziellen Fragen und ohne Beratung online abschließen können.</li>
<li>“Transparent“ heißt, über alle Wahlmöglichkeiten in der Ansparphase und in der Auszahlungsphase wie über alle anfallenden Kosten muss umfassend informiert werden.</li>
<li>“Kostengünstig“ heißt, dass zumindest für das Standardprodukt ein Kostendeckel für Vertrieb und Verwaltung von 1% der angesparten Summe gilt.</li>
</ul>
Außerdem müssen die Anbieter garantieren, dass sie dasselbe PEPP in mindestens zwei anderen EU-Staaten ebenfalls anbieten, falls eine Sparerin oder ein Sparer den Wohnsitz in ein anderes EU-Land verlegt. Ansonsten soll eine kostengünstige Möglichkeit zum Wechsel des Anbieters bestehen. Nicht geregelt ist allerdings die steuerliche Behandlung von PEPP. Die zuständigen EU-Gremien haben den Mitgliedsstaaten empfohlen, beim PEPP dieselben Steuerregeln wie bei Privatrenten anzuwenden.
<h3>Links:</h3>
<ul>
<li>BdV-Newsletter, Oktober 2021</li>
</ul>
</html>
<html>
<ul>
<li></li>
<li></li>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://member.ulrichmueller.de/products/support-mitgliedschaft/categories/2182361/posts/2151530853" target="_blank">UMWA :: Support - ProScreener</a></li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://wendl-koehler.de/rechtliches/erstattung-auslaendischer-quellensteuer/" target="_blank" rel="noreferrer noopener">Wendl‐Köhler :: Erstattung ausländischer Quellensteuer</a></li>
<li><b>DSW‐Info:</b>
<ul>
<li><a href="https://www.dsw-info.de/anlegerschutz/quellensteuer/erstattung-us-amerikanischer-quellensteuer/" target="_blank" rel="noreferrer noopener">USA</a></li>
<li><a href="https://www.dsw-info.de/anlegerschutz/quellensteuer/laenderspezifische-erstattungsantraege-auf-dividenden/erstattung-franzoesischer-quellensteuer/" target="_blank"
rel="noreferrer noopener">Frankreich</a></li>
<li><a href="" target="_blank" rel="noreferrer noopener">Schweiz</a></li>
</ul></li>
<li><a href="https://www.gevestor.de/finanzwissen/finanzplanung/steuern/quellensteuer-deutschland-651336.html" target="_blank" rel="noreferrer noopener">
Gevestor :: Quellensteuer Deutschland</a></li>
<li><a href="https://www.test.de/Auslandsaktien-Die-Quellensteuer-nicht-verschenken-4717112-4717118/" target="_blank" rel="noreferrer noopener">
Stiftung Warentest :: Auslandsaktien ‐ Die Quellensteuer nicht verschenken</a></li>
<li><a href="https://www.superinvestors.international/de/artikel/erstattung_auslaendischer_quellensteuer.php" target="_blank" rel="noreferrer noopener">
Superinvestors :: Erstattung ausländischer Quellensteuer</a></li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Return_on_equity" target=_blank>Wikipedia.org :: Return on equity</a></li>
<li><a href="https://en.wikipedia.org/wiki/DuPont_analysis" target=_blank>Wikipedia.org :: DuPont analysis</a></li>
<!-- li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li -->
</ul>
</html>
<html>
<p>
Der <b>RSI</b> setzt die durchschnittlichen Auf- und Abwärtsbewe‐<br />
gungen der vergangenen 14 Tage in Relation zueinander und<br />
kann (theoretisch) Werte von 0 bis 100 annehmen. Ab einem<br />
RSI von 70 gilt eine Aktie als überkauft, der Indikator signalisiert<br />
damit, dass eine Aktie bald erstmal konsolidiert ‐ durch Gewinn‐<br />
mitnahmen beispielsweise, die sich dann anbieten.
</p>
<h3>Links:</h3>
<ul>
<li><a href="https://www.focus.de/finanzen/boerse/analysten-werden-zunehmend-skeptisch-der-sell-des-jahres-der-megatrend-wasserstoff-steht-vor-einem-empfindlichen-ruecksetzer_id_12885238.html" target="_blank" rel="noreferrer noopener">Focus Online :: Megatrend Wasserstoff</li>
</ul>
</html>
<html>
<ul>
<li>auch: Abrufkredit;</li>
<li>eine Art von Kombination aus Dispokredit und Ratenkredit;</li>
<li>Voraussetzung für den Erhalt eines Rahmenkredits:
<ul>
<li>ein sicheres Einkommen</li>
<li>eine vergleichsweise hohe Bonität vorweisen</li>
</ul></li>
</ul>
</html>
<html>
<ul>
<li>Personen, die nach Erreichen der Regelaltersgrenze eine<br />
gesetztliche Altersrente beziehen und weiter sozailversich–<br />
erungspflichtig beschäftigt sind, haben die Möglichkeit, <br />
ihre Rente noch zu erhöhen. Darauf weist die Deutsche<br />
Rentenversicherung (DRV) Oldenburg–Bremen hin.
</li>
<li>Sie seien zwar als Arbeitnehmer von den Beiträgen zur<br />
Rentenversicherung befreit, der Arbeitgebetr müsse aber<br />
weiter Beiträge zahlen, ohne dass dies Einfluss auf die<br />
Höhe der gezahlten Rente habe.<br />
</li>
<li>Dem Arbeitgeber kann jedoch mitgeteilt werden, dass auf<br />
die Versicherungsfreiheit verzichtet wird und weiter auch<br />
eigene Rentenversicherungbeiträge gezahlt werden sol–<br />
len, so die DRV.
</li>
</ul>
<h3>Quelle:</h3>
<ul>
<li>NWZ, Oster-Ausgabe, 30.03.2024, <br />
Abschnitt “Tipps“<br />
</li>
</ul>
</html>
<html>
<ul>
<li>Für die internationale Finanzwelt ist das SWIFT‐Netzwerk eine tragende Säule.<br />
Insbesondere wenn Länder aus diesem System ausgeschlossen werden, sind<br />
gravierende wirtschaftliche Nachteile die Folge.</li>
<li><h3>Was ist SWIFT überhaupt?</h3>
SWIFT steht als Abkürzung für “Society of Worldwide Interbank Financial Tele‐<br />
communication“, was auf Deutsch so viel bedeutet wie “Verband weltweiter Te‐<br />
lekommunikation zwischen Banken im Finanzsektor“. Folglich ist SWIFT ein<br />
Zusammenschluss von internationalen Geldinstituten, der 1973 als Genossen‐<br />
schaft in Belgien gegründet wurde. SWIFT als Verband zielt darauf ab, den<br />
Nachrichtenaustausch zwischen Banken über das SWIFT‐Telekommunikations‐<br />
netz zu ermöglichen und zu standardisieren. Somit werden keine Transaktionen<br />
über SWIFT durchgeführt. Das System hinter SWIFT stellt jedoch die technische<br />
Infrastruktur sowie das dazugehörige Nachrichtenformat zur Übermittlung wich‐<br />
tiger Informationen bezüglich einer Zahlung zur Verfügung. Man kann sich also<br />
die SWIFT‐Technik als eine Art WhatsApp für internationale Geldinstitute vor‐<br />
stellen, worüber Zahlungsinformationen ausgetauscht werden. Dabei wird der<br />
Fokus auf extrem hohe Sicherheit und Verfügbarkeit gerichtet, sodass SWIFT<br />
weltweit etabliert ist und zum Standard der Finanzmarktinfrastruktur für eine<br />
Vielzahl internationaler Kreditinstitute wurde.<br />
<br />
Als Genossenschaft nach belgischem Recht setzt sich SWIFT aus mehreren<br />
Gremien zusammen. Diese sind:<br />
<br />
<ul>
<li>Vorstand</li>
<li>Board of Directors (Aufsichtsrat)</li>
<li>Aufsichtsorgane</li>
</ul>
<br />
Im Vorstand von SWIFT befinden sich acht Vorstandmitglieder, die für das<br />
Tagesgeschäft verantwortlich sind. Der Vorstand wird durch das Board of<br />
Directors, also den Aufsichtsrat, bestimmt. Das Board of Directors steuert<br />
und beaufsichtigt demnach die Geschäftsführung. Dieser Aufsichtsrat be‐<br />
steht aus 25 Mitgliedern, die überwiegend Vertreter internationaler Groß‐<br />
banken sind. So sind jeweils zwei Vertreter aus den USA, Frankreich,<br />
Großbritannien, Deutschland und Belgien dort vertreten. Weiterhin gibt es<br />
noch je einen Vertreter aus Ländern wie Kanada, Australien, China, Russ‐<br />
land und weiteren. Die Zentralbanken der G10‐Länder üben dabei eben‐<br />
falls eine Aufsichtsfunktion aus und bilden somit die Aufsichtsorgane.</li>
<li><h3>Was ist ein SWIFT‐Code?</h3>
Die grundlegende Technik des SWIFT‐Systems ermöglicht den standar‐<br />
disierten Nachrichtenverkehr zwischen Banken. Über die SWIFT‐Nach‐<br />
richten werden Informationen weitergeleitet, die für die Abwicklung einer<br />
Transaktion notwendig sind. Außerdem wird dadurch die Kommunikation<br />
unter den Kreditinstituten sicher gewährleistet. So können beispielsweise<br />
Abwicklungsinformationen zu Wertpapiertransaktionen oder Überweisun‐<br />
gen ausgetauscht werden. Dabei spielt der SWIFT‐Code eine große Rol‐<br />
le. Bei diesem Code handelt es sich um ein einheitliches Format für den<br />
BIC‐Code (Business Identifier Code). Einen BIC‐Code finden Sie zum<br />
Beispiel auf einer Überweisung, die Sie über Ihrer Hausbank tätigen. Die‐<br />
ser dient dazu, jede global aktive Bank zu identifizieren. Dementsprechend<br />
hat jede Bank einen eigenen BIC‐Code, der auf dem SWIFT‐Nachrichten‐<br />
system basiert.<br />
<br />
Der SWIFT‐Code kann auch als SWIFT‐Adresse angesehen werden. So<br />
wie Ihre Privatadresse aus Name, Straße und Ort besteht, ist auch das<br />
Format der SWIFT‐Adresse genau festgelegt. Diese wird als BIC‐Code<br />
angegeben und besteht aus acht bis elf Zeichen, die Auskunft darüber<br />
geben, um welche Bank es sich handelt und wo die Bank ihren Sitz hat. <br />
Der BIC‐Code besteht aus Ziffern und Buchstaben, die jeweils eine klar<br />
definierte Bedeutung haben. Für die Deutsche Bank lautet der BIC‐Code:<br />
<br />
  DEUTDEFFXXX<br />
<br />
Die ersten vier Buchstaben (DEUT) stehen für die Bezeichnung der Bank,<br />
also Deutsche Bank. Die nachfolgenden zwei Buchstaben (DE) geben<br />
den Sitz der Bank an. In diesem Fall Deutschland. Zum Schluss folgen<br />
zwei bis sechs Buchstaben oder Ziffern (FFXXX), die exakt den Ort der<br />
Bank angeben. Am Beispiel der Deutschen Bank trifft das auf Frankfurt<br />
am Main zu. Die drei X am Ende können als Füllzeichen betrachtet wer‐<br />
den.</li>
<h3>Was bewirkt ein Ausschluss aus dem SWIFT‐System?</h3>
Momentan erschüttert der Ukraine‐Krieg die Welt. Russlands Angriff auf<br />
die Ukraine ist durch den Bruch des Völkerrechts zur Grundlage vielsei‐<br />
tiger wirtschaftlicher Sanktionen geworden. So wurden im März 2022<br />
russische Banken aus dem SWIFT‐System ausgeschlossen. Das SWIFT‐<br />
Gremium, dem auch SWIFT‐Teilnehmer aus den verschiedenen Mitglieds‐<br />
ländern angehören, bestimmt dabei über den Beitritt und Ausschluss von<br />
weiteren Ländern. Dies ist ein wichtiger Prozess, denn die Konsequenzen<br />
wirken sich auf den internationalen Zahlungsverkehr aus. Die Banken, <br />
die von SWIFT ausgeschlossen sind, erhalten nicht mehr die Informatio‐<br />
nen, die sie benötigen, um internationale Zahlungen durchzuführen.<br />
Gleichzeitig ist für die russische Zentralbank damit der Zugriff auf einen<br />
großen Teil ihrer Devisenreserven (Reserven eines Wirtschaftssystems<br />
an international anerkannten Fremdwährungen) gesperrt, die sich zum<br />
Teil auf Konten anderer Zentralbanken weltweit befinden. Das Vermö‐<br />
gen der russischen Zentralbank ist demnach nahezu komplett eingefro‐<br />
ren. Insgesamt ist Russland dadurch vom internationalen Handel aus‐<br />
geschlossen.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.heise.de/tipps-tricks/Was-ist-SWIFT-6533026.html" target="_blank" rel="noreferrer noopener">Heise :: Was ist SWIFT?</a></li>
</ul>
</html>
<html>
<ul>
<li>Dabei kombiniert man relativ sichere Anlagen mit höheren<br />
Renditechancen und liquidem Tagesgeld.</li>
<br />
<li><b>Anlagesumme:</b> z.B. 100 000 Euro<br />
<b>Ziel:</b> möglichst lange jeden Monat die gesetzliche Rente<br />
    um 500 Euro aufstocken</li>
<br />
<li><u>Die Aufteilung könnte so aussehen:</u><br />
<ul>
<li>6000 Euro gehen pro Jahr auf ein Tagesgeldkonto, <br />
von dem man monatlich die 500 Euro bezieht (z.B.<br />
BlueOrange Bank; 0,25 Prozent Zins).</li>
<li>Für 60 000 Euro kauft man breit streuende ETFs<br />
entsprechend dem MSCI World Index (z. B. iShares<br />
Core MSCI World UCITS; ISIN: IE00B4L5Y983, <br />
WKN: A0RPWH). <br />
Seit 1975 warf der Index im Schnitt neun Prozent<br />
Rendite ab, was ihn zum Stabilitätsanker im Aus‐<br />
zahlplan macht. </li>
<li>34000 Euro gehen in internationale, gemanagte<br />
Dividendenfonds (z.B. JPMorgan Global Dividend A<br />
mit 159 Prozent Performance in den letzten zehn<br />
Jahren; ISIN: LU0329201957, WKN: A0M6Z1). Sie<br />
liefern mit regelmäßigen Dividendenausschüttungen<br />
zusätzlichen Cashflow ‐ so bleibt das Rentenkonto<br />
länger gefüllt.</li>
<li>Im Folgejahr zweigt man erneut 6000 Euro aufs<br />
Tagesgeldkonto ab.</li>
</ul></li>
<br />
<li>Der Auszahlplan sollte über zehn, besser 15 Jahre laufen,<br />
damit ETFs und Fonds mögliche Verlustphasen aufholen<br />
können.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="focus.de/finanzen/altersvorsorge/vorsorgen-die-rentenluecke-schliessen_id_24367408.html" target="_blank"
rel="noreferrer noopener">Focus Online :: Vorsorgen ‐ Die Rentenlücke schließen</a></li>
<li><a href="https://www.finanztip.de/indexfonds-etf/" target="_blank" rel="noreferrer noopener">Finanztip :: ETF‐Indexfonds</a></li>
<li><a href="https://www.finanzen.net/etf/ishares-core-msci-world-etf-ie00b4l5y983/fse" target="_blank" rel="noreferrer noopener">iShares Core MSCI World ETF</a></li>
<li><a href="https://www.finanzen.net/fonds/jpmorgan-investment-funds-global-dividend-fund-a-lu0329201957" target="_blank" rel="noreferrer noopener">JPMorgan Global Dividend A Fund</a></li>
</ul>
</html>
<html>
<ul>
<li>In den '70ern hatten wir eine “Stagflation“, eine angstmachende<br />
Kombination aus <b>stagnierender Wirtschaft und Inflation</b>.
</li>
<br />
<hr />
<br />
Ein Schreckgespenst aus den 70er-Jahren kehrt zurück: hohe<br />
Inflatonsraten bei gleichzeitig schwachem oder sogar gar kei‐<br />
nem Wirtschaftswachstum, kurz Stagflation genannt. Was ist<br />
dran?
<li><h3>Was versteht man unter “Stagflation“?</h3>
Der Begriff setzt sich aus den zwei Wörtern “Stagnation“, also<br />
einem stagnierenden Wirtschaftswachstum, und “Inflation“, also<br />
steigenden Preisen, zusammen. Normalerweise kommt es zu<br />
Geldentwertung, wenn die Konjunktur brummt. Typischerweise<br />
ist dann der Arbeitsmarkt angespannt, die Löhne steigen und<br />
verteuern Dienstleistungen und Produkte. Angebotsschocks<br />
können aber dazu führen, dass das Wirtschaftswaachstum<br />
lahmt oder ganz ausfällt und die Inflation troztdem anzieht.<br />
</li>
<li><h3>Wann gab es zuletzt Stagflation?</h3>
Diese toxische Kombination trat zuletzt in den 70ern auf. Damals<br />
verdoppelte sich der Ölpreis innerhalb von nur zwei Jahren. Die In‐<br />
flationsraten schossen zeitweise in den prozentual zweistelligen<br />
Bereich. Gleichzeitig würgten die hohen Energiekosten die Kon‐<br />
junktur ab. In so einer Konstellation stecken die Notenbanken in<br />
einer Zwickmühle. Eigentlich müssten sie aufgrund der steigen‐<br />
den Preise die Zinsen erhöhen. Wegen des ausbleibenden Wirt‐<br />
schaftswachstums sind ihnen aber die Hände gebunden.<br />
</li>
<li><h3>Wie großt ist derzeit die Gefahr einer Stagflation?</h3>
In den USA sind die Verbraucherpreise in den vergangenen Monaten<br />
um mehr als fünf Prozent gestiegen. In Europa belief sich die Inflations‐<br />
rate zuletzt immerhin auf drei Prozent. Offen ist, ob es sich dabei um<br />
coronabedingte Nachholeffekte handelt oder ob die Preise auch län‐<br />
gerfristig zulegen. Gegen Stagflation spricht, dass die weltweite Kon‐<br />
junktur noch brummt. Wie lange das Wachstum anhält, ist dagegen<br />
ungewiss, gerade wegen gestörter Lieferketten. In der Autobranche<br />
könnte der Halbleitermangel für einen weltweiten Umsatzausfall von<br />
über 200 Milliarden Dollar sorgen. Auch bei anderen Vorprodukten<br />
und Rohstoffen liegt das Angebot unter der Nachfrage, was die Pro‐<br />
duktion beeinträchtigt. Der Wirtschaftsexperte Mohamed El‐Erian<br />
rechnet mindestens noch ein bis zwei Jahre lang mit gestörten Lie‐<br />
ferketten und hält daher eine Stagflation ähnlich wie in den 70‐Ja‐<br />
hren durchaus für möglich.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>UMWA :: 15.10.2021 ‐ Börsenbrief + Empfehlungen + Dividendentitel + Tagestipp</li>
<li>Focus‐Money 40/2021 (29.09.2021), S. 63</li>
</ul>
</html>
<html>
<h2>28.000 € Steuern sparen beim ETF – Finanztip 3×10-Strategie</h2>
<ul>
<li>Ein Ziel Deines Aktien-ETF-Sparplans ist wahrscheinlich die Altersvorsorge. Denn mit der Rente kommt der beste Teil des jahrzehntelangen Sparens: Du verkaufst Deine ETF-Anteile nach und nach und kannst Dich über die Rendite der letzten Jahrzehnte freuen. Dabei kannst Du mit einem Trick noch deutlich mehr rausholen – wenn es gut läuft, mehrere zehntausend Euro.
</li>
<li>Das liegt an den Steuerregeln für Dein Depot. Wenn Du ETF-Anteile verkaufst, gilt das Prinzip “First in, first out“ (FIFO). Die Anteile, die zuerst ins Depot gekommen sind, werden auch zuerst wieder verkauft.
</li>
<li>Das Problem: Mit den alten Anteilen hast Du höchstwahrscheinlich die größten Gewinne gemacht, weil Du sie am längsten hältst. Und je höher die Gewinne sind, desto mehr Steuern musst Du beim Verkauf der Anteile bezahlen.
</li>
<h3>Alle 10 Jahre ETF wechseln und profitieren</h3>
<li>Um das zu verhindern, greifst Du zur Finanztip 3×10-Strategie. Damit Du selbst entscheiden kannst, welche ETF-Anteile Du zuerst verkaufst, steckst Du Dein Geld nicht nur in einen Aktien-ETF, sondern besparst alle zehn Jahre einen neuen – mindestens drei Mal. Denn 30 Jahre sind ein typischer Zeitraum für das langfristige Investieren in einen ETF.
</li>
<li>Der neue ETF kann auf den gleichen Index setzen wie der alte – Du kannst also z. B. drei verschiedene Aktien-ETFs auf den MSCI World besparen. In der Entnahmephase kannst Du dann den Spieß umdrehen und den jüngsten ETF zuerst verkaufen – den, der die wenigste Rendite gemacht hat und deswegen die niedrigsten Steuern verursacht.
</li>
<h3>Plan für die Ansparphase</h3>
<li>Gehen wir die 3×10-Strategie mal Schritt für Schritt an einem Beispiel durch. Statt Dein Geld immer in den gleichen ETF zu stecken, teilst Du das Investment im Lauf der Zeit auf drei verschiedene ETFs auf:
<ul>
<li>ETF 1: Du investierst mit 37 einmalig 36.000 €. Das entspricht 300 €/Monat über zehn Jahre (von 28 bis 37)
</li>
<li>ETF 2: Du investierst mit 47 einmalig 48.000 €. Das entspricht 400 €/Monat über zehn Jahre (von 38 bis 47)
</li>
<li>ETF 3: Du investierst mit 57 einmalig 60.000 €. Das entspricht 500 €/Monat über zehn Jahre (von 48 bis 57)
</li>
</ul>
<li>Rechnen wir alle drei ETFs zusammen, hast Du bei angenommenen 7% Rendite p. a. im Alter von 67 knapp 578.000 € brutto im Depot. Das Geld teilt sich aber ganz unterschiedlich auf: ETF 1 ist 274.000 € wert, ETF 2 186.000 €, ETF 3 “nur“ 118.000 €:
</li>
<h3>Plan für die Entnahmephase</h3>
<li>Jetzt nehmen wir an, dass Du im Alter in drei Schritten Geld aus Deinem ETF-Depot holen willst. 180.000 € mit 67, 300.000 € mit 77 und 420.000 € mit 87 – jeweils netto, also nach Steuern. Du entnimmst immer mehr, weil Du Inflation und steigenden Pflegebedarf einkalkulieren musst. Die Anteile, die Du (noch) nicht verkaufst, steigen in unserem Beispiel weiterhin mit 7% p. a.
</li>
<h3>Verkauf der Anteile: Ohne 3x10-Strategie</h3>
<li>Wenn Du Dein Leben lang nur einen einzigen ETF bespart hast, kommt jetzt das Problem: Sobald Du im Depot auf “verkaufen“ klickst, verkaufst Du die ältesten Anteile zuerst – die aus der Zeit, als Du 37 warst. Die Anteile haben über die Jahre viel mehr Gewinne angesammelt als die neueren, und diese Gewinne werden jetzt mit 18% versteuert (30% sind durch die Teilfreistellung steuerfrei, beim Rest werden Abgeltungsteuer (25%) und Soli fällig).
</li>
<li>Damit Du auf Deine Wunsch-Entnahme von 180.000 € kommst, musst Du wegen der höheren Steuern mehr Geld aus dem ETF holen, als Du es bei neueren Anteilen müsstest. Diese Wahl hast Du aber nicht, und so bleibt auch weniger Geld im ETF zurück, das sich in den 20 Jahren bis zur letzten Entnahme weiter vermehren kann. Nach der letzten Entnahme mit 87 bleiben Dir dann Anteile mit einem Nettowert von knapp 165.000 € im Depot übrig, die Du vererben (oder verkaufen) könntest.
</li>
<h3>Verkauf der Anteile: Mit 3x10-Strategie</h3>
<li>Nutzt Du dagegen die Finanztip 3×10-Strategie, kannst Du das Problem umgehen: In Deinem Depot liegt dann nicht nur eine einzige ETF-Position, sondern ETF 1 (verwendet von 37 bis 47), ETF 2 (verwendet von 47 bis 57) und ETF 3 (verwendet von 57 bis 67). Jeder der drei ETFs hat eine eigene Kennnummer und kann von Dir separat verkauft werden.
</li>
<li>Für Deine erste Wunsch-Entnahme von 180.000 € entnimmst Du zuerst die kompletten 118.000 € aus ETF 3 – also dem jüngsten Deiner drei ETFs mit den niedrigsten Gewinnen und Steuern – plus 62.000 € aus dem ETF 2, dem zweitjüngsten. Mit 77 verbrauchst Du den Rest von ETF 2 und kratzt ETF 1 an. Mit 87 entnimmst Du nochmal Geld aus ETF 1. Am Ende bleiben damit nicht 165.000 € netto übrig, sondern 193.000 € – mit der Finanztip 3×10-Strategie hast Du am Ende also 28.000 € mehr.
</li>
<h3>So setzt Du 3x10 am einfachsten um</h3>
<ol>
<li>Wenn Du bereits einen ETF besparst: Schau nach, wann Du die ersten Anteile gekauft hast. Wenn Du Deinen ETF z. B. seit fünf Jahren besparst, kannst Du noch fünf Jahre mit diesem ETF weitermachen, bevor Du dann zu ETF 2 wechselst, und nach zehn weiteren Jahren zu ETF 3. Du sparst schon seit z. B. zwölf Jahren an? Dann setz jetzt direkt auf einen neuen ETF und wechsle in acht Jahren erneut.
</li>
<li>Wenn Du noch keinen ETF besparst: Sobald Du damit anfängst, laufen die ersten zehn Jahre von ETF 1 – danach wechselst Du zu ETF 2 und so weiter.
</li>
<li>So findest Du alle zehn Jahre einen neuen ETF: Wenn Du z. B. den MSCI World besparst, kannst Du mit dem “Xtrackers MSCI World UCITS ETF“ (WKN A1XB5U) anfangen, dann zum “Amundi MSCI World UCITS ETF“ (WKN A2H59Q) wechseln, und schließlich zum “Invesco MSCI World UCITS ETF“ (WKN A0RGCS). Die drei ETFs sind zwar jeweils eigenständige, aber extrem ähnliche Fonds, denn sie bilden alle denselben Aktienindex nach. Weitere passende ETFs findest Du im ETF-Finder von Finanztip.
</li>
<li>Schreib Dir auf, in welchem Zeitraum Du welchen ETF besparst. Wenn Du länger als 30 Jahre einzahlst, kannst Du sogar noch mehr rausholen und statt der 3×10-Strategie eine 4×10- oder eine 8×5-Strategie nutzen, also vier oder sogar acht verschiedene Tranchen bilden. Dann wird die Buchführung besonders wichtig.
</li>
<li>Du hast bereits viel Geld in einem einzigen ETF angespart? Auch dann kannst Du die Finanztip 3×10-Strategie nutzen. Wie das geht, erfährst Du im regulären Finanztip Newsletter am Freitag.
</li>
<li>Dir klingt die Strategie zu kompliziert? Dann bespar weiter einen einzigen ETF, denn auch so hast Du langfristig gute Chancen auf eine ordentliche Rendite. Mit der Finanztip 3×10-Strategie kannst Du mit vergleichsweise wenig Aufwand aber noch mehr rausholen.
</li>
<li>Einen Fallstrick gibt es noch: Unsere Strategie beruht auf den heute geltenden Steuerregeln. Die können sich in Zukunft ändern. Aber Du sicherst Dir zumindest eine gute Chance, später eine erhebliche Steuerersparnis einstreichen zu können.
</li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://www.finanztip.de/blog/nl_2023kw34snl/"
target="_blank" rel="noreferrer noopener">
Finanztip :: So holst Du 28.000 € mehr aus Deinem ETF heraus </a>
</li>
<li><a href="https://www.finanztip.de/indexfonds-etf/etf-verkaufen/"
target="_blank" rel="noreferrer noopener">
Finanztip :: ETF verkaufen – So machst Du Dein Investment wieder zu Geld</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://www.finanztip.de/tagesgeld/"
target="_blank" rel="noreferrer noopener">
Finanztip :: Geld parken und Zinsen kassieren</a>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>16.09.2022 - Freitag (Update+Dividenden+ 2 Tagestipps)</h3>
<ul>
<li>Allgemeines zu steigenden Zinsen, Wirtschaft und Politik</li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Top Dividendentitel: Nuveen Preferred & Income Securities Fund (<b>JPI</b>)</li>
<li>Tagestipp heute:
<ul>
<li>Delta Airlines (<b>DAL</b>) </li>
<li>United Health Group (<b>UNH</b>)</li>
</ul>
</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>01.10.2021 ‐ Freitag (Börsenbrief + Empfehlungen + Dividendentitel + Tagestipp)</h3>
<ul>
<li>Was kommt da auf uns zu?<br />
<img src="./pictures/UMWA-Boersenbrief_Oel-Unternehmen.png" height=100 widht=100 /></li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividendentitel ‐ <details><summary>Atmos Energy Corp. <b>(ATO)</b></summary>
<br />
Kurs am 01.10.2021: 88,30 US‐$<br />
<br />
WKN :: 868746<br />
ISIN :: US0495601058<br />
<table>
<tr><th></th><th>21/22e</th><th>20/21e</th><th>19/20</th><th>18/19</th></tr>
<tr><td>Dividende je Aktie (in EUR)</td><td>2,28</td><td>2,12</td><td>1,96</td><td>1,79</td></tr>
<tr><td>Dividendenrendite (in %)</td><td>2,99</td><td>2,79</td><td>2,41</td><td>1,87</td></tr>
</table></details></li>
<li>Tagestipp heute: Jabil Circuit (JBL)</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>02.09.2021 - Donnerstag (Börsenbrief)</h3>
<ul>
<li>Investieren in Zeiten von starken Kursbewegungen
<br />
Drei Punkte solltest Du in so einem Fall beherzigen:
<ul>
<li>Punkt 1: Nicht in Panik verkaufen</li>
<li>Punkt 2: Verändere Dein Denken über das Portfolio‐Einkommen</li>
<li>Punkt 3: Kaufen, wenn andere verkaufen</li>
</ul></li>
<br />
<li>“Sektoren“ und die darin enthaltenen Werte.<br />
Heute: <br />
<ul>
<li>Communication :: <br />
“Communication Services Select Sector SPDR ETF“ (XLC)</li>
<li>Consumer Staples :: <br />
“Benchmark Consumer Staples Select Sector SPDR ETF“ (XLP) </li>
<li>Consumer Discretionary (zyklische Konsumgüter) :: <br />
“Consumer Discretionary Select Sector SPDR ETF“ (XLY)</li>
</ul></li>
</ul>
</html>
<html>
<ul>
<li><h3>02.09.2022 ‐ Freitag (Update + Dividenden + 2 Tagestipps)</h3>
<ul>
<li>Allgemeines</li>
<li><details><summary>Wie berechnen Investoren ihre Geldanlagen?</summary><br />
Am Aktienmarkt wird die Ertragsrendite herangezogen, die Kennzahl dafür ist das<br />
Kurs‐Gewinn‐Verhältnis (KGV). Daraus wird die Gewinnrendite des Index ermittelt<br />
und die durchschnittliche Dividendenrendite hinzu addiert. <br />
<br />
Vergleicht man nun die Rendite des S&P 500 gegen die Rendite der Anleihen,<br />
ergibt sich eine Differenz, die man als Risikoprämie bezeichnet.<br />
<br />
Steigen die Aktienkurse bei niedrigen Anleihezinsen ‐ wie es die Fed in der <br />
Vergangenheit mit ihrer Niedrigzinspolitik ermöglicht hat, wird diese Differenz<br />
größer und macht die Investments in Aktien attraktiver.<br />
<br />
Bei sinkenden Kursen sinkt diese Risikoprämie allerdings. Im Durchschnitt<br />
der letzten Jahre betrug sie 3,65 %. Diese Zahl wird allgemein zur Berech‐<br />
nung herangezogen.<br />
<br />
</li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividendentitel ‐ Heute: Vonovia (D: <b>VNA</b>)(US: <b>VONOY</b> (als OTCPK)</li>
<li>Tagestipps:
<ul>
<li>Kroger Co. (<b>KR</b>)</li>
<li>Dollar Tree (<b>DLTR</b>)</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>02.12.2021 - Donnerstag (Börsenbrief)</h3>
<ul>
<li>Dünnes Eis ‐ aber auch Land in Sicht</li>
</ul></li>
</ul>
</html>
<html>
<ul>
<li><h3>03.01.2022 ‐ Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li>Wie sieht Deine mentale Einstellung zum Jahresbeginn aus?</li>
<li>Die Suche nach <b>DEN</b> Top-Werten für 2022 hat begonnen:
<ol>
<li>Alphabet (GOOGL)</li>
<li>Amazon (AMZN)</li>
<li>Apple (AAPL)</li>
<li>Bank of America (BAC)</li>
<li>Berkshire Hathaway (NYSE:BRK.A)</li>
<li>       ‐ “ ‐       (NYSE:BRK.B)</li>
<li>CVS Health (CVS)</li>
<li>Global Payments (GPN)</li>
<li>Meta Platforms (FB)</li>
<li>Microsoft (MSFT)</li>
<li>Nu Holdings (NU)</li>
<li>NVIDIA (NVDA)</li>
</ol></li>
<li>Beachtenswerte Earnings </li>
<li>Tagestipp: Kein Tagestipp ‐ Begründung im Text.</li>
<li>Empfehlungen</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>03.03.2022 ‐ Donnerstag (Börsenbrief)</h3>
<ul>
<li>Stabile Aktien in unruhigen Zeiten</li>
<li>Der „Gewinn pro Aktie“ ist eine relative Kennzahl …</li>
<li>Wie umgeht man Sanktionen? </li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>03.09.2021 - Freitag (Börsenbrief+ Empfehlungen+Dividendentitel+Tagestipp)</h3>
<ul>
<li>Warum handele ich eigentlich mit Aktien und Optionen?</li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividendentitel <b>Digital Realty Trust Inc.</b> (DLR)<br />
WKN: A0DLFT<br />
ISIN: US2538681030<br />
aktueller Kurs: 166 €</li>
<li>Tagestipp heute: Union Pacific Corp. (UNP)</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>03.10.2022 ‐ Montag (Börsenbrief)</h3>
<ul>
<li><details><summary>Allgemeines zu Woche</summary><br />
In den Vereinigten Staaten beginnt das Haushaltsjahr jeweils am 01.10. <br / >
eines Jahres. Der dann vorgelegte Staatshaushalt bedarf vorab einer<br / >
Stimmenmehrheit im Repräsentantenhaus. Wird der Haushaltsplan ab‐<br / >
gelehnt, können keine Gelder mehr für die Staatsbediensteten freigege‐<br / >
ben werden, Museen und Nationalparks werden geschlossen, etc. Auch<br / >
der aktuelle Haushaltsplan ist umstritten, aber es wurde mit geringer<br / >
Mehrheit ein Gesetz zur kurzfristigen Finanzierung der aktuellen Aus‐<br / >
gaben verabschiedet, mit dem die Biden‐Regierung eine Frist bis zum<br / >
16.12.2022 erhält.<br / >
</li>
<li>Beachtenswerte Termine in dieser Woche</li>
<li>Tagestipps heute:
<ul>
<li>Apache Corp. (<b>APA</b>)</li>
<li>Devon Energy (<b>DVN</b>)</li>
</ul>
</li>
<li>Empfehlungen</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>03.11.2022 ‐ Donnerstag (Börsenbrief)</h3>
<ul>
<li>Die Fed hat geliefert</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>03.12.2021 ‐ Freitag (Börsenbrief + Empfehlungen + Dividendentitel + Tagestipp)</h3>
<ul>
<li><details><summary>Allgemeines</summary><br />
• Vor dem Handel immer die Hausaufgaben machen: <br />
<ul>
<li><a href="https://money.cnn.com/data/fear-and-greed/" target="_blank" rel="noreferrer noopener">F&G-Index*</a> anschauen,</li>
<li><a href="https://www.barchart.com/stocks/quotes/$VIX" target="_blank" rel="noreferrer noopener">VIX*</a> (<em>CBOE Volatility Index</em>) prüfen</li>
<li> und dem Chartverlauf vom VIX* folgen.</li>
</ul>
<br />
Ob sich der negative Trend nun wieder umdreht? <br />
<br />
Dann könnte auch ein Blick auf den VIX* helfen ‐ wenn hier die Dynamik nachlässt,<br />
könnte das auch ein Zeichen für einen Trendwechsel sein. <br />
<br />
Der F&G-Index* ist da eher langsam. Hier kann man den Weg von “Angst“ über “Beruhigung“<br />
wieder zur “Gier“ in kleineren Schritten verfolgen.<br />
<br />
</details></li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividendentitel ‐ <b>Arbor Realty Trust (ABR)</b></li>
<li>Tagestipp heute: <b>Procter &: Gamble (PG)</b></li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>04.02.2022 ‐ Freitag (Börsenbrief + Dividendentitel + Tagestipp)</h3>
<ul>
<li>Allgemeines</li>
<li>Was passiert mit dem Hypothekenmarkt, wenn die Zinsen steigen?</li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividendentitel ‐ 3M Company (<b>MMM</b>)</li>
<li><details><summary>Buchempfehlungen:</summary>
<br />
[…] angesichts der Kriegsgefahr im Osten möchten wir euch einen Titel<br />
außerhalb des Optionshandels empfehlen: <br />
<br />
Tim Marshall schrieb <b>“Die Macht der Geographie“</b>. Der Spiegel-Bestseller <br />
(ISBN 978‐3‐423‐34917‐8) für EUR 12,90 zeigt auf, warum Staaten geo‐<br />
politische Vorteile, zu enormen wirtschaftlichen Wachstum nutzen können ‐<br />
oder geopolitischen Zwängen unterliegen, die immer wieder zu Konflikten<br />
führen. Hier bekommt man einen Blick darauf, warum:
<ul>
<li>die USA eine Weltmacht geworden sind ‐ und bleiben werden,</li>
<li>warum Russland das Ukraine/Krim-Problem nicht lösen kann und wird,</li>
<li>warum China seine globale Einflussnahme sogar zum Überleben benötigt.</li>
</ul>
All das hat auch einen Einfluss auf die Aktienmärkte und könnte zu einem<br />
übergeordneten Blick auf Dein Handeln führen. <br />
<br />
</details></li>
<li>Tagestipp heute: PacWest Bancorp. (<b>PACW</b>)</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>04.10.2021 ‐ Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li>Positive Ausblicke auf das 4. Quartal?</li>
<li>Beachtenswerte Earnings</li>
<li>Tagestipp: Workday Inc. (WDAY)</li>
<li>Empfehlungen</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>04.11.2022 ‐ Freitag (Update + Dividenden)</h3>
<ul>
<li>Nachlese zur Zinsentscheidung der Federal Reserve</li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividendentitel ‐
  <details><summary>Heute: Liberty All Star Equity Fund (<b>USA</b>)</summary><br />
<ul>
<li>a closed‐ended equity mutual fund</li>
<li>nicht als Option tradbar;</li>
<li>WKN 985244 </li>
</ul>
<br />
</li>
<li>Tagestipp heute: Keine Tagestipps! Begründung anbei</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>05.08.2022 ‐ Freitag (Update + Dividenden + 2 Tagestipps)</h3>
<ul>
<li>Das Kaufverhalten hat sich verändert ‐ mit Auswirkungen auf den Stellenmarkt
<li>Wer Chartbilder bearbeitet, ist klar im Vorteil
<li>Bewertung heute endender Empfehlungen
<li>Top Dividendentitel: Xcel (<b>XEL</b>)
<li>Tagestipp heute:
<ul type="a">
<li><a href="https://innoviz.tech " target="_blank" rel="noreferrer noopener">Innoviz Technologies Ltd.</a> (<b>INVZ</b>) </li>
<li><a href="https://investors.sysco.com/" target="_blank" rel="noreferrer noopener">Sysco Corp.</a> (<b>SYY</b>) </li>
</ul>
</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>05.09.2022 - Montag (Börsenbrief)</h3>
<ul>
<li>Allgemeines zum Markt</li>
<li>Beachtenswerte Termine in dieser Woche</li>
<li>2 Tagestipps heute</li>
<li>Empfehlungen</li>
</ul>
</li>
</ul
</html>
<html>
<ul>
<li><h3>06.01.2022 ‐ Donnerstag (Börsenbrief)</h3>
<ul>
<li>Wie der Januar, so das Jahr?</li>
<li>Analyse zu AT&T (<b>T</b>)</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>06.10.2022 ‐ Donnerstag (Börsenbrief)</h3>
<ul>
<li>Kommt ein goldener Herbst?</li>
<li>Zu schnell, zu steil war der Kursverlauf zum Wochenanfang …</li>
<li>Die Gewinner bei steigenden Ölpreisen ‐ die besten Aktien für einen Einstieg </li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>06.12.2021 - Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li>Wer hat uns den Kursrückgang der letzten Woche eingebrockt?</li>
<li>Wie verhalte ich mich in dieser Woche?</li>
<li>Beachtenswerte Earnings </li>
<li>Tagestipp: Walmart (WMT)</li>
<li><details><summary>Empfehlungen</summary><br />
<img src="./pictures/UMWA-Boersenbrief_Empfehlungen_2021-12-06.png" height=545 width=467 /></li> <!-- height=1098 width=934 -->
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>07.01.2022 ‐ Freitag (Börsenbrief + Dividendentitel + Tagestipp)</h3>
<ul>
<li>Allgemeines </li>
<li><details><summary>Serie: Die besten Dividendentitel ‐ 3 Monatszahler</summary>
<ol type="a">
<li>Realty Income (<b>O.S</b>)</li>
<li>STAG Industrial (<b>STAG</b>)</li>
<li>Gladstone Commercial (<b>GOOD</b>)</li>
</ol>
<br />
</details></li>
<li>Tagestipp heute: Meta Platforms [<em>vormals: Facebook</em>] (<b>FB</b>)</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>07.02.2022 ‐ Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li>Paypal (<b>PYPL</b>), das Finanzsystem und die digitale Zukunft</li>
<li>Etwas Spannung gefällig?</li>
<li>Beachtenswerte Earnings</li>
<li><h4>Tagestipp: Identiv, Inc. (<b>INVE</b>)</h4>
<img src="./pictures/UMWA_Boersenbrief_Tagestipp_INVE_2022-02-07.png" height=69 width=552 /><br />
<ul>
<li>Homepage: https://www.identiv.com/investors/</li>
<li>Cybersicherheit</li>
</ul></li>
<li>Empfehlungen</li>
</ul>
</li>
</ul>
</html>
<html>
Ausnahmsweise der Montagsbörsenbrief am Dienstag,<br />
da gestern in USA Feiertag war.<br />
<ul>
<li><h3>07.09.2021 - Dienstag (Börsenbrief+Tagestipp+Empfehlungen)</h3>
<ul>
<li>Was bewegt den US-Markt derzeit?</li>
<li>Hurricane und Ölpreis</li>
<li>Beachtenswerte Earnings </li>
<li>Tagestipp: Sprouts Farmers Market, Inc. (SFM)<br />
<img src="./pictures/UMWA-Boersenbrief_Tagestipp_SFM_2021-09-07.png" height=46 width=545 /><br />
Die geringe Miete ist der geringen Schwankungsbreite (IV 27,2) geschuldet<br />
und somit auch ein Anzeichen für eine weniger störungsanfällige Aktie. </li> <!-- height=92 width=1090 -->
<li>Empfehlungen</li>
</ul></li>
</ul>
</html>
<html>
<ul>
<li><h3>07.10.2021 - Donnerstag (Börsenbrief)</h3>
<ul>
<li>Die Wirkung beunruhigender Nachrichten</li>
<li>Allgemeines zum Energiehunger der Welt</li>
</ul></li>
</ul>
</html>
<html>
<ul>
<li><h3>07.10.2022 ‐ Freitag (Update + Dividenden + Tagestipp)</h3>
<ul>
<li>Allgemeines</li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Top Dividendentitel: FedEx Corp. (<b>FDX</b>)</li>
<li>Tagestipp heute: <br />
<ul>
<li>Alliance Resources (<b>ARLP</b>)</li>
<li>Phillips 66 (<b>PSX</b>)</li>
</ul>
</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>08.02.2021 ‐ Montag (Update+Tagestipp+Empfehlungen)</h3>
<ul>
<li>Super Bowl, Sportwetten und eine Übersicht der beteiligten Companies</li>
<li>Beachtenswerte Earnings mit Wissensquiz, Kommentar zu UBER und LYFT </li>
<li>Tagestipp: Netflix (NFLX)</li>
<li>Empfehlungen</li>
</ul><br /></li>
</ul>
</html>
<html>
<ul>
<li><h3>08.10.2021 - Freitag (Börsenbrief + Empfehlungen + Dividendentitel + Tagestipp)</h3>
<ul>
<li>Allgemeines </li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividendentitel ‐ Colgate‐Palmolive Co. (CL)</li>
<li>Tagestipp heute: 3D Systems Corp. (DDD)</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>09.09.2021 - Donnerstag (Börsenbrief)</h3>
<ul>
<li>Derzeit ist es ruhig in China ‐ aber der Bitcoin erhält Aufmerksamkeit<br />
⇒ El Salavador :: Einführung als offizielles Zahlungsmittel</li>
<br />
<li>Die großen Banken schauen in die Kristallkugel und prognostizieren …</li>
<br />
<li>“Sektoren“ und die darin enthaltenen Werte. <br />
Heute:
<ul>
<li>Energy :: <br />
“Energy Select Sector SPDR ETF“ (XLE)</li>
<li>Financial :: <br />
“Financial Select Sector SPDR ETF“ (XLF)</li>
<li>Healthcare :: <br />
“Health Care Select Sector SPDR ETF“ (XLV)</li>
</ul></li>
</ul></li>
</ul>
</html>
<html>
<ul>
<li><h3>09.09.2022 ‐ Freitag (Update + Dividenden + 2 Tagestipps)</h3>
<ul>
<li>Finanzpolitik hier ‐ und dort:</li>
<li>Wir sollten China unbedingt im Auge behalten!</li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Top Dividendentitel:
<ul>
<li>Apollo Commercial Real Estate Finance (<b>ARI</b>)</li>
</ul>
<li>Tagestipps:
<ul>
<li>Cameco Corp. (<b>CCJ</b>)</li>
<li>Nutrien Ltd. (<b>NTR</b>)</li>
</ul>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>09.12.2021 - Donnerstag (Börsenbrief)</h3>
<ul>
<li>Erst Rally ‐ dann Bremse, wie geht es weiter?</li>
<li>Die Zukunft unserer Investments hängt von den Beschäftigungszahlen ab</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>10.01.2022 ‐ Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li>Wird die Fed auf die Zahlen vom Arbeitsmarkt reagieren?</li>
<li>Beachtenswerte Earnings </li>
<li>Tagestipp: Pfizer Inc. (<b>PFE</b>)</li>
<li>Empfehlungen</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>10.02.2022 ‐ Donnerstag (Börsenbrief)</h3>
<ul>
<li>Der spannendste Tag in dieser Woche</li>
<li>Das gefällt uns:</li>
<li><details><summary>Hinweise zur Staatsverschuldung der USA</summary>
<p>
Nach dem Beitrag zur Staatsverschuldung der USA im Börsenbrief vom 04.02.<br />
tauchten noch einige Fragen auf, daher werden wir uns dem Thema immer wie‐<br />
der einmal widmen.
</p>
<p>
Eine Frage lautet: Was unterscheidet beispielsweise Länder mit einer Währung, <br />
die von verschiedenen Mitgliedstaaten unterschiedlich gestützt wird (wie Europa)<br />
von den Vereinigten Staaten?
</p>
<p>
Vereinfacht gesagt: Die europäische Staatsverschuldung ist ein Problem der <br />
Währungsunion, bei dem bereits hoch verschuldete (südliche) Staaten in die<br />
Gemeinschaft aufgenommen wurden, obwohl sie die damaligen Aufnahme‐<br />
kriterien nicht erfüllten. So wurden schwache Währungen in die Gemeinschaft<br />
integriert, um dem europäischen Gedanken eine bessere Grundlage zu geben ‐<br />
aber die bisherige Möglichkeit eines schwachen Landes, durch Abwertung der<br />
eigenen Währung oder mittels Erklärung einer Zahlungsunfähigkeit eine Schul‐<br />
denschnitt herbeizuführen, wurde damit eliminiert.
</p>
<p>
Hier trägt die Gemeinschaft der europäischen Staaten die Verschuldung solida‐<br />
risch, allerdings werden den Hochschuldenländern gewisse Regeln zum Wieder‐<br />
erlangen der Wirtschaftlichkeit vorgegeben. Einigen belasteten Staaten gelang<br />
der neue Einstieg in die Wirtschaftlichkeit sogar mit massivem Wachstum des BIP<br />
(Portugal, Spanien).
</p>
<p>
Die Corona-Pandemie hat diese Regeln allerdings erheblich aufgeweicht.
</p>
<p>
Wie ist es aber in den hoch verschuldeten USA ‐ spielt die Staatsverschuldung<br />
überhaupt eine Rolle, wenn sie in der eigenen Landeswährung angegeben ist?
</p>
<p>
Wenn die Schulden auf die eigene Währung lauten, druckt die Regierung fast<br />
immer die Differenz, hält die Zinssätze unter der vorherrschenden Inflationsrate<br />
und nutzt Kapitalverkehrskontrollen oder andere Beschränkungen, um die Markt‐<br />
teilnehmer zur Abwertung von Vermögenswerten zu bewegen. Anleihegläubiger<br />
und Bargeld Sparer verlieren dadurch einen großen Teil ihrer Kaufkraft, obwohl<br />
sie ‐ technisch gesehen ‐ ihr Geld zurückbekommen. Es handelt sich um <br />
einen "sanften" Zahlungsausfall, der über Inflation und finanzielle Repression erfolgt.
</p>
<p>
Steuerliche Vorsicht ist wichtig, wenn die Verschuldung niedrig ist, denn sie hilft,<br />
zu hohe Schulden rechtzeitig zu verhindern, also bevor es dazu kommt. Dabei<br />
geht es nicht nur um die Höhe, sondern auch um die Art der Ausgaben und Steuern:
<ul>
<li>Wird das Geld für die Verteidigung und langfristige Produktivitätssteigerungen<br />
ausgegeben? </li>
<li>Ist die Steuerregelung geeignet, um Arbeitgeber dazu zu bewegen, ins Land<br />
zu kommen und einheimische Arbeitskräfte einzustellen? </li>
<li>Ist der derzeitige Sozialvertrag des Landes relativ ausgewogen, oder ist er <br />
durch ein hohes Maß an Vetternwirtschaft aus dem Gleichgewicht geraten? </li>
<li>Sobald die Staatsverschuldung etwa 100 % des BIP übersteigt, wird die Band‐<br />
breite umsichtiger Maßnahmen immer geringer.</li>
</ul>
<p>
Vom Standpunkt des Anlegers ist es immer eine Herausforderung, die Politik zu <br />
steuern. Anleger sind eher gewillt übermäßig optimistisch zu sein, wenn ihre be‐<br />
vorzugte politische Partei an der Macht ist und übermäßig pessimistisch, wenn<br />
der vermeintliche “Gegner“ regiert. Sie neigen dazu, ihre eigenen politischen Prä‐<br />
ferenzen in ihre Ansichten über Wirtschaftswachstum und Inflation einfließen zu<br />
lassen, selbst wenn ihre Ansichten nicht unbedingt durch Beweise gestützt werden.
</p>
<p>
Wenn wir uns nun die fiskalische Situation der meisten Industrieländer anschauen,<br />
scheinen sie sich in einer nicht wiederherstellbaren fiskalischen Lage zu befinden,<br />
unabhängig davon, welche Partei gerade regiert. Einige fiskalische Entscheidungen<br />
sind natürlich besser als andere (z. B. Ausgaben für die inländische Infrastruktur<br />
oder Steuersenkungen für Arbeitnehmer, anstelle eines Krieges).
</p>
<p>
Im Moment suchen Notenbanker eher eine Möglichkeit der "Schadensbegrenzung" <br />
und nach der "Wahl des geringsten übels", als eine tragfähige fiskalische Ausgangs‐<br />
position zu etablieren. In den USA wird die Situation sukzessive schlimmer, durch<br />
einen steigenden Schuldenstand im Verhältnis zum BIP, einem höheren strukturel‐<br />
len Haushaltsdefizit und einem höheren strukturellen Handelsdefizit. Natürlich spie‐<br />
len aber auch nicht-finanzielle Faktoren, wie die Ausstattung mit natürlichen Ressour‐<br />
cen und die Politik zur Erleichterung der Geschäftstätigkeit, eine wichtige Rolle.
</p>
<p>
Anleger die Barmittel und Anleihen übergewichten, so kann man allgemein konstatieren,<br />
werden ihr Kapital wahrscheinlich während des gesamten Jahrzehnts der 2020er Jahre<br />
dauerhaft entwerten. Trotzdem wird es natürlich auch einige Jahre geben, in denen das<br />
Halten dieser Vermögenswerte Schutz vor Preisrückgängen, bei volatilen Aktienmärkten<br />
bieten kann.
</p>
<p>
Als Investoren wissen wir: Bargeld und Anleihen sind in diesem Sinn eine sehr teure Form<br />
der Vermögensverwahrung und der Volatilitätsreduzierung und sonst wenig.</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>10.09.2021 - Freitag (Börsenbrief + Empfehlungen + Dividendentitel + Tagestipp)</h3>
<ul>
<li>Zinsen und Arbeitslosigkeit</li>
<li>Finanzministerin Yellen weist auf eine drohende Pleite der (US‐)Bundesregierung hin</li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividendentitel ‐ LOW's (<b>LOW</b>) und PPG Ind. (<b>PPG</b>)</li>
<li>Tagestipp heute: Aercap Holdings (<b>AER</b>)<br />
<img src="./pictures/UMWA-Boersenbrief_Tagestipp_AER_2021-09-10.png" height=70 width=558 /></li> <!-- height=140 width=1116 -->
</ul></li>
</ul>
</html>
<html>
<ul>
<li><h3>10.10.2022 ‐ Montag (Börsenbrief)</h3>
<ul>
<li>Viele Argumente nähren die Panik im Markt ‐ wir nähern uns dem “sell off“</li>
<li>Beachtenswerte Termine in dieser Woche</li>
<li>Tagestipps heute:
<ul>
<li>British Petrol (<b>BP</b>)</li>
<li>Exxon Mobile (<b>XOM</b>)</li>
</ul> </li>
<li>Empfehlungen</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>10.11.2022 ‐ Donnerstag (Börsenbrief)</h3>
<ul>
<li>Die Krypto-Börse FTX bricht zusammen</li>
<li>Nun gilt es abzuwarten … </li>
<li>Inflation und Arbeitsplätze ‐ wichtig für die Einschätzung des Marktes.</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>10.12.2021 - Freitag (Börsenbrief + Empfehlungen + Dividendentitel + Tagestipp)</h3>
<ul>
<li>Blick auf die Inflation und auf den Konfliktherd Ukraine </li>
<li>Ein Beispiel für Stolpersteine im US-Konjunkturpaket</li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividendentitel ‐ Bristol-Myers Squibb (BMY)</li>
<li>Tagestipp heute: Celsius Holding (CELH)</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>11.02.2022 ‐ Freitag (Börsenbrief + Dividendentitel + Tagestipp)</h3>
<ul>
<li>Der gestrige Handelstag ‐ und was dazu führte</li>
<li>Weg von Gier ‐ hin zu …Anstand (?)</li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividendentitel ‐ 3M Co. (<b>MMM</b>)</li>
<li>Tagestipp heute: Coca-Cola Comp. (<b>KO</b>)</li>
<li>In eigener Sache: Eine wichtige Anmerkung zu den Tagestipps</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>11.08.2022 ‐ Donnerstag (Börsenbrief)</h3>
<ul>
<li>Welche Unternehmen sind am stärksten von dem Inflationsbekämpfungsgesetz betroffen?</li>
<li>Keine Energiewende ohne Kupfer</li>
<li>Insgesamt steht die Weltwirtschaft vor einem neuen Rekordhoch</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>11.10.2021 ‐ Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3></li>
<ul>
<li>Einheitliche Steuergesetzgebung für Tech‐Werte?</li>
<li>Weniger neue Jobs als erwartet ‐ und nun?</li>
<li>Vorsicht bei möglichen Short‐Squeezes</li>
<li>Beachtenswerte Earnings </li>
<li>Empfehlungen</li>
<li><details><summary>Tagestipp: Macy's Inc. (M)</summary>
<br />
<ul>
<li>WKN: A0MS7Y</li>
<li>ISIN: US55616P1049</li>
</ul>
<img src="./pictures/UMWA-Boersenbrief_Tagestipp_M_2021-10-11.png" height=56 width=549 /></li> <!-- height=102 width=1098 -->
</ul>
</ul>
</html>
<html>
<ul>
<li><h3>11.11.2021 - Donnerstag (Börsenbrief)</h3>
<ul>
<li>Nach dem Klimagipfel in Glasgow ‐ wo lauern die Fallstricke?</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>11.11.2022 - Freitag (Update+Dividenden+ Tagestipps)</h3>
<ul>
<li>Allgemeines</li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividendentitel <br />
  ‐ heute: Icahn Enterprises L.P. (<b>IEP</b>)</li>
<li>Tagestipps:
<ul>
<li>Fortinet Inc. (<b>FTNT</b>)</li>
<li>Celsius Holdings Inc. (<b>CELH</b>)</li>
</ul>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>12.11.2021 ‐ Freitag (Börsenbrief + Empfehlungen + Dividendentitel + Tagestipp)</h3>
<ul>
<li>Allgemeines zur Energiewende, China, Inflation … und Elon Musk</li>
<li>Bewertung heute endender Empfehlungen</li>
<li><details><summary>Serie: Die besten Dividendentitel ‐ Realty Income (<b>O</b>)</summary>
<br />
<ul>
<li>Homepage :: <a href="https://www.realtyincome.com/Home/default.aspx" target="_blank" rel="noreferrer noopener">https://www.realtyincome.com/Home/default.aspx</a></li>
<li>wird zu den <b>Einzelhandels‐REITs</b> gezählt, was so nicht<br />
ganz korrekt ist</li>
<li>WKN :: 899744<br />
ISIN :: US7561091049</li>
<li>monatlicher Dividendenzahler</li>
<br /></details></li>
<li>Tagestipp heute: BioNTech SE (BNTX)</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>13.01.2022 - Donnerstag (Börsenbrief)</h3>
<ul>
<li>Eine klare Aussicht fehlt ‐ oder doch nicht?</li>
<li>REITs sind Value‐Werte, die Du kennen solltest</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>13.06.2022 - Montag (Börsenbrief + Tagestipp)</h3>
<ul>
<li>Die US‐Regierung stärkt die private Altersvorsorge </li>
<li>Eine positive Nachricht im Bereich der Solaraktien</li>
<li>Beachtenswerte Termine </li>
<li>Tagestipp: Cardinal Health (<b>CAH</b>)</li>
<li>Empfehlungen</li>
</ul></li>
</ul>
</html>
<html>
<ul>
<li><h3>13.09.2021 - Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li>Aktuelles auch China</li>
<li>Zunehmender Druck auf die Neinsager zur Klimapolitik</li>
<li>Beachtenswerte Earnings</li>
<li>Tagestipp: United Steel Corp. (<b>X</b>)<br />
<img src="./pictures/UMWA-Boersenbrief_Tagestipp_X_2021-09-13.png" height=70 width=548</li>
<li>Empfehlungen:<br />
<img src="./pictures/UMWA-Boersenbrief_Empfehlungen_2021-09-13.png" height=519 width=615</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>13.10.2022 - Donnerstag (Börsenbrief)</h3>
<ul>
<li>Wäre “<em>buy and hold</em>“ die bessere Strategie?</li>
<li>Die Politik macht Anlegern einen Strich durch die Rechnung</li>
<li>Wie geht es den Kleinunternehmen in den USA?</li>
<li>Zahlen, Daten, Fakten und ein Ausblick</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>13.12.2021 - Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li><details><summary>Eine Woche mit langfristigen Auswirkungen liegt vor uns</summary><br />
Ein wichtiger „Gegenspieler“ unserer Aktien in unsicheren Zeiten sind die 10‐jährigen <br />
Staatsanleihen der USA, der „Treasuries&blquo;. Daher schaute die Finanzwelt auch auf die<br />
Versteigerung der 10‐jährigen Anleihen am Mittwoch. <br />
<br />
Hier kann man, ähnlich wie bei dem F&G-Index, erkennen, wie die institutionellen In‐<br />
vestoren die Situation einschätzen. Fließt das Kapital aus den Aktien in die Anleihen,<br />
steigt der Kurs der Anleihen. Da Anleihen in der Regel zu einem festen Preis zurück‐<br />
gezahlt werden, sinken bei einem steigenden Kurs logischerweise die Renditen.<br />
<br />
Somit kann man gut erkennen, ob Anleihe‐Investoren mit eher weniger Rendite, da‐<br />
für aber mit der sicheren Rückzahlung ihres Investments rechnen wollen.<br />
[…]<br />
Für uns Investoren reicht oft ein Blick auf die Kennzahl von 1,5% für die 10‐jährigen<br />
Anleihen um zu sehen, ob der Aktienmarkt „unter Spannung“ steht. Steigt die Zahl<br />
darüber, solltest Du vorsichtig handeln, denn dann wird die Stabilität einer Staatsan‐<br />
leihe der Unruhe des Aktienmarktes vorgezogen. Das ist allerdings nur eine sehr<br />
grobe Sicht auf den Anleihenmarkt. Hier reichen schon 10tel Punkte um den Markt<br />
zu bewegen.<br />
<br />
</li>
<li>Wie Du Dich positionieren kannst, wenn …</li>
<li>Interessante Randnotizen</li>
<li>Beachtenswerte Earnings </li>
<li>Tagestipp: Signet Jewelers (SIG)</li>
<li>Empfehlungen</li>
</ul></li>
</ul>
</html>
<html>
<ul>
<li><h3>14.10.2021 - Donnerstag (Börsenbrief)</h3>
<ul>
<li>Gestern stieg die Inflation in Deutschland auf 4,1 Prozent</li>
<li>Jetzt wieder in China investieren?</li>
<li>Kostentreiber: Energie</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>14.10.2022 ‐ Freitag (Update + Dividenden + Tagestipp)</h3>
<ul>
<li>Allgemeines</li>
<li>Bewertung heute endender Empfehlungen</li>
<li><details><summary>Serie: Die besten Dividendentitel ‐ Heute: Antero Midstream (<b>AM</b>)</summary><br />
AM ist ein Hochdividendenwert, der durch die aktuelle politische Lage<br />
eine einzigartig günstige Position im Energiesektor eingenommen hat.<br />
Das Unternehmen ist der primäre Midstream‐Betreiber für Antero Re‐<br />
sources, den drittgrößten Erdgasproduzenten in den USA und zweit‐<br />
größten Hersteller von Flüssigerdgas (LNG, “Liquified Natural Gas“).<br />
<br />
[ … ] Wir können also bei Antero Midstream Corp. nicht nur eine<br />
steigende Dividende, sondern auch einen steigenden Aktienkurs<br />
erwarten. Darauf vertrauen auch große Investoren, daher werden<br />
die Anteile von AM zu 54 % von institutionellen Investoren gehal‐<br />
ten. Weitere 30 % liegen in den Depots von Beteiligungsgesell‐<br />
schaften ‐ und nur 13 % der Aktien sind im freien Handel. Die<br />
aktuelle Dividende beträgt USD 0,90, wird vierteljährlich ausge‐<br />
schüttet und entspricht derzeit 9,1 %. Antero Midstream stieg<br />
gestern um 2,13 % auf USD 10,09.<br />
<br />
</details>
</li>
<li>Tagestipps heute:
<ul>
<li>Bloom Energy (<b>BE</b>)<br />
<img src="./pictures/UMWA_Tagestipps_BE-BloomEnergie_20221014.png" height=75 width=746 /><br /> <!-- height=99 width=995 -->
</li>
<li>Crocs Inc. (<b>CROX</b>)<br />
<img src="./pictures/UMWA_Tagestipps_CROX-CrocsINC_20221014.png" height=80 width=754 /><br /> <!-- height=106 width=1005 -->
</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>15.08.2022 ‐ Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li>375 % Steigerung in den nächsten 8 Jahren erwartet ‐ hier investieren?</li>
<li>Auswirkungen des Klimagesetzes auf die Automobilbranche</li>
<li>Beachtenswerte Termine in dieser Woche</li>
<li>Tagestipps:
<ul>
<li>Southwest Airlines (<b>LUV</b>)</li>
<li>KKR & Co. Financial Assets (<b>KKR</b>)</li>
</ul></li>
<li>Empfehlungen</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>15.10.2021 - Freitag (Börsenbrief + Empfehlungen + Dividendentitel + Tagestipp)</h3>
<ul>
<li>Lieferketten, Medien und “stille Post“ in der Wall Street</li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividenden Titel ‐ Walgreens Boots Alliance (WBA)</li>
<li>Tagestipp heute: Medtronic PLC (MDT)</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>16.09.2021 - Donnerstag (Börsenbrief)</h3>
<ul>
<li>Blasenbildung durch Investments von Kleinanlegern</li>
<br />
<li>“Sektoren“ und die darin enthaltenen Werte. <br />
Heute:
<ul>
<li>Industrial :: <br />
“Industrial Select Sector SPDR ETF“ (XLI)</li>
<li>Materials :: <br />
“Materials Select Sector SPDR ETF“ (XLB)</li>
<li>REITs :: <br />
“Real Estate Select Sector SPDR ETF“ (XLRE)</li>
</ul>
</ul>
</html>
<html>
<ul>
<li><h3>16.12.2021 ‐ Donnerstag (Börsenbrief)</h3>
<ul>
<li>Ein Wendepunkt in der Zinspolitik</li>
<li>Ein genauerer Blick auf die Reaktionen zur Zinspolitik in den USA</li>
<li><details><summary><em><b>Consumer Staples Select</b></em> (<b>XLP</em>) ‐ ein Sektor mit Perspektive für Dich?</b></summary><br />
Hier findet man die großen Namen der Tabakindustrie mit ihren guten Dividenden:<br />
<ul>
<li>Altria (MO)</li>
<li>British‐American Tobacco (BTI)</li>
<li>Philip Morris Int. (PM)</li>
</ul>
<br />
Dazu gehören auch:<br />
<ul>
<li>der Süßwarenhersteller Mondelez Int. (MDLZ)</li>
<li>die Estee Lauder Cos. Inc. (EL)</li>
<li>die Colgate‐Palmolive Corp. (CL)</li>
<li>Procter & Gamble (PG)</li>
<li>PepsiCo (PEP)</li>
<li>Coca‐Cola (KO)</li>
<li>Walmart (WMT)</li>
<li>CostCo (COST)</li>
</ul>
</details></li>
</ul></li>
</ul>
</html>
<html>
<ul>
<li><h3>17.02.2022 - Donnerstag (Börsenbrief)</h3>
<ul>
<li>“Don't fight the Fed“ ist ein gängiges Schlagwort an der Börse.</li>
<li><details><summary>Und was ist gerade in China los?</summary><br />
EV‐Fahrzeug‐Produzenten:<br />
<ul>
<li>NIO (<b>NIO</b>)</li>
<li>XPeng (<b>XPEV</b>)</li>
<li>Li Auto (<b>LI</b>)</li>
</ul>
<br />
EV := Energy Vehicle<br />
<br />
NDRC := “National Development and Reform Commission“<br />
<h3>Internationale Bergbauunternehmen:</h3>
<ul>
<li>BHP Billiton (<b>BHP</b>)</li>
<li>Vale (<b>VALE</b>)</li>
<li>Rio Tinto (<b>RIO</b>)</li>
<li>Glencore International (<b>GLCNF</b>)</li>
<li>Alcoa (<b>AA</b>)</li>
<li>Sibanye Stillwater Ltd (<b>SBSW</b>)</li>
</ul>
<img src="./pictures/UMWA-Boersenbrief_DieGroesstenBergbauunternehmen.png" height=552 width=728 />
</details></li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>17.09.2021 - Freitag (Börsenbrief + Empfehlungen + Dividendentitel + Tagestipp)</h3>
<ul>
<li>Stabilität voraus im Westen ‐ aber im Osten droht Ungemach</li>
<li>J.P.Morgan hat eine neue Studie für seine Investoren veröffentlicht</li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividenden Titel ‐ Johnson & Johnson (JNJ)</li>
<li>Tagestipp heute: Johnson & Johnson (JNJ)</li>
</ul></li>
</ul>
</html>
<html>
<ul>
<li><h3>17.10.2022 ‐ Montag (Börsenbrief + Tagestipps + Empfehlungen)</h3>
<ul>
<li>“An der Börse wird die Zukunft gehandelt“</li>
<li>Beachtenswerte Termine in dieser Woche</li>
<li>Tagestipps:
<ul>
<li>British Petrol (<b>BP</b>)</li>
<li>General Electric. Co. (<b>GE</b>)</li>
</ul>
</li>
<li>Empfehlungen</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>17.12.2021 - Freitag (Börsenbrief + Empfehlungen + Dividendentitel + Tagestipp)</h3>
<ul>
<li>Das Dezember‐Phänomen </li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividendentitel ‐ Raytheon Technologies (RTX)</li>
<li>Tagestipp heute: Ford Motor Company (F)</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>18.02.2022 ‐ Freitag (Börsenbrief + Dividendentitel + Tagestipp)</h3>
<ul>
<li><details><summary>Allgemeines zur Wirtschaftslage und der Fed</summary><br />
<ul>
<li>University of Michigan</li>
<li>Index of Consumer Sentiment</li>
</ul>
<br /></details></li>
<li>Bewertung heute endender Empfehlungen</li>
<li><details><summary>Serie: Die besten Dividendentitel ‐ ETF auf Gold (<b>SGOL</b>)</summary><br />
<ul>
<li>Aberdeen Standard Physical Gold Shares ETF (SGOL)</li>
<li>Barrick Gold (GOLD)</li>
<li>Sibanye Stillwater Limited (SBSW)</li>
<li>SPDR Gold Trust ETF (GLD)</li>
<li>iShares Gold Trust ETF (IAU)</li>
</ul>
<br /></details></li>
<li><details><summary>Tagestipp heute: Altria Group Inc. (<b>MO</b>)</summary><br />
<br />
<img src="./pictures/UMWA-Boersenbrief_Tagestipp_MO_2022-02-18.png" height=107 width=853 ></li> <!-- height=142 width=1138 -->
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>18.08.2022 - Donnerstag (Börsenbrief)</h3>
<ul>
<li>Ein Überblick zu den vielen Faktoren, die den Markt begleiten</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>18.10.2021 ‐ Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li>Neue Earnings ‐ neues Glück?</li>
<li>Beachtenswerte Earnings </li>
<li>Tagestipp: General Electric Co. (GE)</li>
<li>Empfehlungen</li>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>20.01.2022 ‐ Donnerstag (Börsenbrief)</h3>
<ul>
<li>Warum will Microsoft in den Gaming‐Sektor einsteigen?</li>
<li>„5G“‐Einführung lässt Airlines Alarm schlagen</li>
<li>Ein spekulativer Blick auf die USA vor den Mid‐Terms im November und die möglichen Auswirkungen auf die erneuerbaren Energien</li>
<li>Studien von Goldman Sachs zur Energiewende ‐ aus US‐Sicht</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>20.07.2023 ‐ Donnerstag (Börsenbrief)</h3>
<ul>
<li>In der nästen Woche (KW 30) findet an der Nasdaq 100 (NQ)<br />
eine neue Gewichtung statt, es werden die (über‐)gro&slig;en Werte<br />
untergewichtet und die verbleibenden 93 Werte angepasst.
</li>
<br />
<li>Ein Sektor mit zunehmendem R\u00FCckenwind: <br />
<b>REITs</b>, Real Estate Investment Trusts
</li>
<br />
<li>In 2022 galt: <br />
  Die Inflation ist anhaltend hoch<br />
⇒ Die Zinssätze werden weiter steigen<br />
⇒ REITs haben lange Mietverträge und sind mit steigenden Zinskosten konfrontiert<br />
⇒ Die Kapitalisierungssätze steigen<br />
⇒ Die REIT-NAVs brechen ein<br />
⇒ REITs haben Schwierigkeiten, ihre Schulden zu refinanzieren<br />
⇒ Das führt zu einem noch schlimmeren Immobiliencrash<br />
⇒ ... und so weiter.
</li>
<br />
<li>Wie wir glauben, erleben wir nun den Anfang der Erholung<br />
und bald eine andere, positivere Kettenreaktion, denn 2023<br />
stellt sich anders dar: <br />
<br />
  Die Inflation kehrt auf ein außrgewöhnlich niedriges Niveau zurück<br />
⇒ Die Zinssätze werden gesenkt, um die Wirtschaft anzukurbeln<br />
⇒ Mehrjährige REIT-Mietverträge laufen allmählich aus und führen zu erheblichen Mietpreissteigerungen, da sie infolge der hohen Inflation weit unter den Marktpreis gefallen sind<br />
⇒ Die Kapitalisierungssätze sinken, da die Anleger auf der Jagd nach Rendite sind und an dem raschen Mietwachstum in einer sich abschwächenden Wirtschaft partizipieren möchten<br />
⇒ Die REIT-NIWs steigen auf neue Allzeithochs<br />
⇒ REITs refinanzieren die jüngsten Emissionen zu wesentlich niedrigeren Zinssätzen, was einen lediglich vorübergehenden Engpass 2022 beweist<br />
⇒ Dies führt zu einer Erholung auf neue Allzeithochs.
</li>
<br />
<li>Wenn Dich das Thema interessiert, schau Dir im UMWA-Börsenbrief die bereits vorgestellten REITs an: <br />
<ul>
<li>20.01.2023 Medical Properties Trust (MPW) – 11,6 % Dividende</li>
<li>03.03.2023 National Retail Properties (NNN) – 2,55 % Dividende</li>
<li>21.04.2023 Stag Industrials (STAG) – Monatszahler 4,0 % Dividende</li>
<li>09.06.2023 Whitestone REIT (WSR) – Monatszahler 4,8 % Dividende</li>
</ul>
<br />
Bei anderen Immobilien-REITs ist bereits eine hohe Erwartungshaltung im Markt:<br />
<br />
Alexandria Real Estate (ARE) könnte um mehr als 50 % steigen, wenn es zu seinem geschätzten Nettoinventarwert (NIV), bzw. Net Asset Value (NAV) zurückkehrt.<br />
<br />
BSR REIT (BSRTF) könnte sogar um 70 % steigen, wenn er zu seinem NAV zurückkehrt.<br />
<br />
(“Könnte“ heißt natürlich nicht: “wird“)<br />
</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>20.09.2021 - Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li>9 Einstiegschancen in Bergbauunternehmen?</li>
<li>“Schluss mit lustig“ in Macao</li>
<li>Beachtenswerte Earnings</li>
<li>Tagestipp: <b>Zscaler (ZS)</b><br />
<img src="./pictures/UMWA-Boersenbrief_Tagestipp_ZS_2021-09-20.png" height=92 width=779 /> <!-- height=69 width=584 -->
<br />
Zscaler, Inc. ist ein weltweit tätiges Unternehmen für Cloud-Sicherheit. Das Unternehmen<br />
bietet die Lösung Zscaler Internet Access an, die Benutzern, Servern, Betriebstechnologie,<br />
dem Internet der Dinge (IoT) und Geräten sicheren Zugang zu extern verwalteten Anwen‐<br />
dungen, einschließlich Software‐as‐a‐Service (SaaS)‐Anwendungen und Internet-Zielen,<br />
bietet. Außerdem die Lösung Zscaler Private Access, die den Zugang zu intern verwalteten<br />
Anwendungen ermöglicht, die entweder intern in Rechenzentren gehostet werden oder in<br />
privaten oder öffentlichen Clouds.</li>
<li>Empfehlungen:<br />
<img src="./pictures/UMWA_Empfehlungen_2021-09-20.png" height=663 width=613 /></li>
</ul></li>
</ul>
</html>
<html>
<ul>
<li><h3>21.10.2022 ‐ Freitag (Update + Dividenden + Tagestipps)</h3>
<ul>
<li>Wann erreichen wir endlich einen Boden?</li>
<li>Die Suche nach den Überlebenskünstlern</li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividendentitel ‐ <br />
Heute: <details><summary>PIMCO Dynamic Income Fund (<b>PDI</b>)</summary>
<ul>
<li>WKN : A1T7JA</li>
<li>ISIN : US72201Y1010</li>
<li>Symbol : 1KT</li>
</ul>
ein diversifizierter Schuldenfonds mit Schwerpunkt auf Non‐Agency‐Hypotheken<br />
<br />
<b>Für diesen Fonds gilt:</b> Niedrigere Anleihekurse führen zu höheren Renditen<br />
und höheren Erträgen für Anleiheinvestoren, hohe Anleihekurse reduzieren<br />
die Erträge.<br />
<br />
Derzeit gilt PIMCO als der beste Rentenfondsmanager auf dem heutigen Markt.<br />
<br />
</details></li>
<li>Tagestipps:
<ul>
<li>Teck Resources Ltd. (<b>TECK</b>)</li>
<li>Occidental Petroleum Corp. (<b>OXY</b>)</li>
</ul></li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>20.12.2021 ‐ Montag (Börsenbrief + Empfehlungen)</h3>
<ul>
<li>Die Fed, das Virus, die Beschäftigungszahlen</li>
<li>Beachtenswerte Earnings </li>
<li><details><summary>Die ersten Voraussagen für das Neue Jahr werden veröffentlicht</summary>
<br />
[…]<br />
Chronert und sein Team untersuchten die von der Citi mit “Buy“ bewerteten<br />
Aktien auf ein hohes, für 2022 erwartetes Dividendenwachstum pro Aktie:<br />
<img src="./pictures/UMWA-Boersenbrief_Empfehlungen_Dividenden_2021-12-20.png" height=341 width=448 /><br /> <!-- height=682 width=896 -->
Wer nur die reinen Zahlen sieht, könnte meinen, hier werden nur durchschnittliche<br />
Dividendenzahler empfohlen. Allen genannten Titel werden aber mit einem über‐<br />
durchschnittlichen EPS‐Wachstum (durchschnittlich über 100%) bewertet.<br />
<br /></details></li>
<li>Kein Tagestipp angesichts der Unruhe am Markt</li>
<li>Empfehlungen</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>21.10.2021 - Donnerstag (Börsenbrief)</h3>
<ul>
<li>Wissenswertes für unser Handeln</li>
<li>Apropos China: Weitet sich die Immobilienkrise zu einer globalen Krise aus?</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>22.02.2022 ‐ Dienstag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li>Der Markt braucht Dein Geld</li>
<li>Beachtenswerte Earnings </li>
<li>Tagestipp: Advanced Micro Devices (<b>AMD</b>)</li>
<li>Empfehlungen</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>22.08.2022 - Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li>Was föhrte am Freitag zum großen Verkauf im Markt?</li>
<li>Dein Konto bei IB wird wachsen, wenn Du in USD investiert bist</li>
<li>Die langfristigen Aussichten bleiben intakt</li>
<li>Beachtenswerte Termine</li>
<li>Tagestipp:
<ul>
<li>Plug Power (<b>PLUG</b>)</li>
<li>Novartis AG Basel (<b>NVS</b>)</li>
</ul></li>
<li>Empfehlungen</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>22.10.2021 ‐ Freitag (Börsenbrief + Empfehlungen + Dividendentitel + Tagestipp)</h3>
<ul>
<li>Allgemeines, Trump, Tesla und EVs </li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividendentitel ‐ (Schon wieder) Walgreens Boots All. (WBA)</li>
<li>Tagestipp heute: Tesla Motors Inc. (TSLA)</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>22.11.2021 - Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li>Allgemeines und Liste potentieller Gewinner bei steigenden Zinsen</li>
<li>Beachtenswerte Earnings </li>
<li>Tagestipp: Marvell Technology (MRVL)</li>
<li>Empfehlungen:<br />
<img src="./pictures/UMWA-Boersenbrief_Empfehlungen_2021-11-22.png" height=396 width=616 /></li>
</ul></li>
</ul>
</html>
<html>
<ul>
<li><h3>23.12.2021 ‐ Donnerstag (Börsenbrief)</h3>
<ul>
<li>Die aktuelle Lage ist kompliziert. Der Markt sucht noch seine Richtung</li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividendentitel ‐ Liberty All-Star Equity Fund (<b>USA</b>)</li>
<li>Tagestipp heute: Marvell Technology Group Ltd. (MRVL)</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>23.09.2021 - Donnerstag (Börsenbrief)</h3>
<ul>
<li>Die September-Unruhe im Markt bleibt, schlägt aber keine hohen Wellen mehr</li>
<li>Cannabis verlässt eine Grauzone</li>
<li>“Sektoren“ und die darin enthaltenen Werte.<br />
Heute:
<ul>
<li>Technology :: <br />
Technology Select Sector SPDR ETF (XLK)
<li>Utilities ::<br />
<details><summary>Utilities Select Sector SPDR ETF (XLU)</summary>
<ul>
<li>Sempra Energy (SRE) </li>
<li>UGI Corp. (UGI)</li>
<li>Entergy Corp. (ETR) </li>
<li>Essential Utilities Inc. (WTRG) </li>
<li>FirstEnergy Corp. (FE)</li>
<li>NiSource Inc. (NI)</li>
</ul></details>
</li>
</ul></li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>23.09.2022 ‐ Freitag (Update + Dividenden + Tagestipp)</h3>
<ul>
<li>Ein orientierungsloser Markt ist Bärenfutter</li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividendentitel ‐‐ Heute: Comcast Corp. (<b>CMCSA</b>)</li>
<li>Tagestipp heute: Eli Lilly & Co. (<b>LLY</b>) </li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>24.02.2022 ‐ Donnerstag (Börsenbrief)</h3>
<ul>
<li><details><summary>Wohin fließt derzeit das Geld?</summary><br />
<ul>
<li>(<b>SHEL</b>)</li>
<li>(<b>LNG</b>)</li>
<li>(<b>XOM</b>) </li>
</ul><br /></li>
<li><details><summary>Wissenswertes zu “Sektor‐Rotation“?</summary><br />
<ul>
<li>S&P 500 (<b>SPY</b>)</li>
<li>Russel 3000 (<b>IWM</b>)</li>
<li>Russel 2000 (<b>IWV</b>)</li>
<li>Informations‐Technology Select (<b>XLK</b>)</li>
<li>Consumer Discretionary (<b>XLY</b>)</li>
<li>Industrials (<b>XLI</b>)</li>
</ul>
<img src="./pictures/UMWA-Boersenbrief_S-P-500-Sektorperformance_2022-02-24.png" height=386 width=604 /></li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>24.07.2023 - Montag (Börsenbrief + Tagestipps + Empfehlungen)</h3>
<ul>
<lI>Am Mittwoch Notenbank-Sitzung FED (Leitzins)<br />
→ weitere Zinserhöhung der Federal Reserve, nach der kommenden<br />
  Anhebung der Zinsen unwahrscheinlich;
</li>
<li>Am Donnerstag Notenbank-Sitzung ECB (Leitzins)
</li>
</ul>
<hr />
<ul>
<li><u>Ist nun auch das Ende einer Bankenkrise in Sicht?</u><br />
<ul>
<li>Zusammenbruch der Silicon Valley Bank (SVB): <br />
wg. schlechtem Management und der Ausrichtung auf kreditintensive Startups;
</li>
<li>Paul Volcker, US-Notenbankchef von 1979 bis 1987,<br />
bewältigte die damalige Inflation mit beständig steigenden<br />
Zinsen, die in der Spitze über 20 % lagen;
</li>
</ul>
</li>
<li><u>Beachtenswerte Termine in dieser Woche</u><br />
</li>
<li><u>Tagestipps: </u><br />
<ul>
<li>Upstart Holdings (UPST):<br />
eine Online-basierte Kreditplattform, die mit einer speziellen KI-Software<br />
die hohe Nachfrage von Krediten für Konsumenten mit dem Angebot von<br />
Banken synchronisiert.<br />
<table>
<tr>
<th>Wert/Kürzel</th><th>Aktion</th><th>Verfallsdatum</th><th>Mögl. Prämie</th>
</tr>
<tr>
<td>UPST</td><td>Sell 42P</td><td>04.08.2023</td><td>$0,77</td>
</tr>
<tr>
<td>Earnings: 08.08.2023</td><td>Aktueller Kurs: $54,17</td><td>IV:120% Delta:−0,098</td><td>Grade: “D“</td>
</tr>
</table>
</li>
<li>Celsius Holdings (CELH)
</li>
</ul>
</li>
<li><u>Empfehlungen</u><br />
<table>
<tr>
<td>DIS</td>
</tr>
<tr>
<td>NKE</td>
</td>
</table>
</li>
</ul>
</li>
</ul>
<!--<table>
<tr>
<th><b>Wert/Kürzel</b></th><th><b>Aktion</b></th><th><b>Verfallsdatum</b></th><th><b>Mögl. Prämie</b></th>
</tr>
<tr>
<td></td><td></td><td></td><td></td>
</tr>
<tr>
<td><b>Earnings:</b> </td><td><b>Aktueller Kurs:</b> </td><td><b>IV:</b> <b>Delta:</b></td><td><b>Grade:</b> </td>
</tr>
</table>
-->
</html>
<html>
<ul>
<li><h3>24.09.2021 ‐ Freitag (Börsenbrief + Empfehlungen + Dividendentitel + Tagestipp)</h3>
<ul>
<li>Allgemeines zum Wochenende</li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividenden Titel ‐ <details><summary>Aberdeen Global Premier Properties (AWP)</summary>
<ul>
<li>nur direkt an der NYSE handelbar, keine Optionen!</li>
<li>wird auch angezeigt als “Alpine Global Premier Properties Fund“</li>
<li>ist ein CEF (<em>Closed-End-Fund</em>), der in Immobilien‐REITs auf der ganzen Welt investiert.</li>
</ul>
</li>
<li>Tagestipp heute: Prologis (PLD)</li>
</ul></li>
</ul>
</html>
<html>
<ul>
<li><h3>24.10.2022 ‐ Montag (Börsenbrief + Tagestipps + Empfehlungen)</h3>
<ul>
<li>Allgemeines zu Woche</li>
<li>Wo spielt in der nächsten Zeit die Musik?</li>
<li>Beachtenswerte Termine in dieser Woche</li>
<li>Tagestipps:
<ul>
<li>Freeport McMoRan (<b>FCX</b>)</li>
<li>Canadian Resources Ltd. (<b>CNQ</b>)</li>
</ul></li>
<li>Empfehlungen</li>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>25.02.2022 ‐ Freitag (Börsenbrief + Dividendentitel + Tagestipp)</h3>
<ul>
<li>Handlungsempfehlungen für Investoren</li>
<li>Kennst Du den SKEW‐Index?</li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividendentitel ‐ Bristol-Myers Squibb Co. (<b>BMY</b>)</li>
<li>Tagestipp heute: Qualcomm Inc. (<b>QCOM</b>)</li>
</ul>
</li
</ul>
</html>
<html>
<ul>
<li><h3>25.03.2022 ‐ Freitag (Update + Dividenden + Tagestipp)</h3>
<ul>
<li><details><summary>Ist die Weltwirtschaft wirklich so schlecht?</summary><br />
<ul>
<li><b>Langlebige Güter:</b><br />
Vereinfacht gesagt, handelt es sich dabei um alles, was nicht für den<br />
kurzfristigen Verbrauch bestimmt ist ‐ vom Flugzeug, über Fahrzeuge,<br />
bis hin zum Kühlschrank. Das Kriterium für diese Kennzahl ist die Halt‐<br />
barkeit der Produkte über einen Zeitraum von mindestens 3 Jahren. </li>
</ul>
<br />
</details></li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividendentitel ‐ heute: <br />
<ul>
<li>Flower Foods (<b>FLO</b>, konservativ) </li>
<li>MPLX Limited Partnership (<b>MPLX</b>, spekulativ)</li>
</ul>
<br />
<li>Tagestipp heute: Bilibili Corp. (<b>BILI</b>)</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>25.08.2022 ‐ Donnerstag (Börsenbrief)</h3>
<ul>
<li>Die Finanzwelt blickt nach Wyoming (Jackson Hole)</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>25.10.2021 - Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li>Allgemeines aus Asien und den USA</li>
<li>Beachtenswerte Earnings<br />
Erwähnte ETFs:
<ul>
<li>Roundhill Ball Metaverse ETF (<b><em>META</em></b>)</li>
<li>ProShares Bitcoin Strategy ETF (<b><em>BITO</em></b>)<br />
<ul>
<li>seit dem 19.10.2021 handelbar</li>
</ul>
<b>Links:</b><br />
<a href="https://www.proshares.com/funds/bito.html" target="_blank" rel="noreferrer noopener">ProShares :: Homepage ETF</a><br />
<a href="https://www.onvista.de/news/bitcoin-etf-trojanisches-pferd-oder-kurs-booster-489958613" target="_blank" rel="noreferrer noopener">
Onvista :: Bitcoin ETF: Trojanisches Pferd oder Kurs-Booster? </a><br />
<br />
</li>
</ul> </li>
<li>Tagestipp: Procter & Gamble (PG)</li>
<li>Empfehlungen</li>
</ul></li>
</ul>
</html>
<html>
<ul>
<li><h3>25.11.2021 - Donnerstag (Börsenbrief)</h3>
<ul>
<li>Airlines im Fokus</li>
<li>Weihnachten ‐ und das Jahresende ‐ kommen schon wieder viel zu schnell …</li>
<li><details><summary>Den Gewinn/Verlust im eigenen Konto erkennen</summary><br />
So gehst Du vor: Du startest die TWS und öffnest die in der Zeile ganz oben:<br />
<br />
“Konto“ <br />
⇒ Verwaltung <br />
⇒ Startseite der Kontoverwaltung<br />
<br />
In Deinem Browser öffnet sich nun die Verknüpfung zu Deinem Konto bei IB. <br />
<br />
Im IB-Konto unter “Performance und Berichte“ <br />
⇒ Kontoauszüge <br />
⇒ Übersicht realisiert <br />
⇒ Zeitraum: Jahresbeginn bis heute <br />
⇒ Übersicht zur realisierten und unrealisierten Performance.<br />
<br />
In diesem Bereich findest Du alle Aktien, die Du in Deinem Depot in dem<br />
Zeitraum gehandelt hast.<br />
<br />
In der Zeile neben jedem Kürzel siehst Du im linken Bereich, ob Du sie<br />
im Gewinn oder Verlust abgegeben hast.<br />
<br />
Wurde eine Aktie noch nicht wieder ausgebucht, findest Du im rechten<br />
Bereich den aktuellen Wert ‐ im Plus oder Minus.<br />
<br />
Die Zeile “Gesamt Aktien“ zeigt Dir nun auf der linken Seite eine Gesamt‐<br />
summe der realisierten Gewinne, auf die Du Steuern bezahlen musst. <br />
<br />
Du hast bis zum Jahresende Zeit, Aktien aus der rechten Hälfte im Verlust<br />
zu verkaufen, wenn Du Deine Steuerlast senken möchtest. <br />
<br />
In dem darunter aufgeführten Bereich “Aktien‐ und Indexoptionen“ werden<br />
alle Trades des angeforderten Zeitraums aufgeführt. <br />
<br />
In der Summenzeile dazu findest Du in der linken Hälfte in der Spalte “S/T<br />
Gewinn“ Deinen Gewinn des Zeitraums, rechts daneben die Summe aus<br />
den im Verlust zurückgekauften Trades, und um diesen Teil reduziert sich<br />
natürlich Dein Gesamtgewinn in der Spalte daneben.<br />
<br />
Im rechten Block (unrealisierte Gewinne) werden Deine offenen Trades<br />
bei jedem Öffnen aktualisiert, und hier siehst Du in der linken Spalte den<br />
Umsatz der Trades, die Du gehandelt hast. Daneben steht die Summe, <br />
die Du maximal hättest erwirtschaften können ‐ aber die nächsten Fel‐<br />
der in der Spalte zeigen, welche Trades noch mit welchen Summen “of‐<br />
fen“ sind. In der Spalte ganz rechts siehst Du die aktuell realisierten Ge‐<br />
winne. <br />
<br />
Nochmal: In der Regel müssen wir 25% unserer Gewinne versteuern, aber<br />
Du hast jetzt noch bis zum Jahresende Zeit, Dein Depot darauf auszurichten. <br />
<br /></li>
<li>Wenn man den Überblick verloren hat, hilft ein gutes Trading Journal</li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividendentitel ‐ Heute: Ares Capital (ARCC)</li>
<li>Unser Tagestipp: Marathon Patent Group, Inc. (MARA)</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>26.01.2023 ‐ Donnerstag (Börsenbrief)</h3>
<ul>
<li>Wohin wird sich die Wirtschaft der USA in diesem Jahr bewegen?<br />
<br />
5 Parameter:
<ol>
<li>die Hypothekenzinsen</li>
<li>die Inflationsrate</li>
<li>die Arbeitslosenquote</li>
<li>die Zinsbelastung</li>
<li>der Dollar</li>
</ol>
</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>26.08.2022 ‐ Freitag (Update + Dividenden + 2 Tagestipps)</h3>
<ul>
<li>Der Markt wartet auf die Rede von Jerome Powell</li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividendentitel ‐ Heute: <details><summary>Cummins Inc. (<b>CMI</b>)</summary><br />
Cummins ist der führende Anbieter von motorbezogenen Produkten mit einer weltweiten Präsenz. <br />
<br />
Das Unternehmen hat Niederlassungen in 190 Ländern, 500 eigene und unabhängige Vertriebspartner und 10.000 Händler. <br />
<br />
Der Konzern ist in einer zyklischen Branche tätig und hatte daher während der großen Rezession zu kämpfen.<br />
<br />
</details>
</li>
<li>Tagestipp heute: Nio (<b>NIO</b>) und Visa (<b>V</b>)</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>26.09.2022 ‐ Montag (Börsenbrief)</h3>
<ul>
<li>Ein brutaler Freitag liegt hinter uns ‐ und nun?</li>
<li>Beachtenswerte Termine in dieser Woche</li>
<li>Tagestipps heute: Smucker (J.M.) Co. (<b>SJM</b>)</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>27.01.2022 ‐ Donnerstag (Börsenbrief)</h3>
<ul>
<li>Ein spannender Abend mit dem Statement der Federal Reserve</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>27.08.2021 ‐ Freitag (Börsenbrief + Empfehlungen + Dividendentitel + Tagestipp)</h3>
<ul>
<li>Heute verkündet die Fed ihr weiteres Vorgehen</li>
<li>Höher, schneller, weiter ‐ Die Sportwetten-Saison beginnt</li>
<li>Bewertung heute endender Empfehlungen</li>
<li><details><summary>Serie: Die besten Dividendentitel ‐ Oasis Midstream Partners LP (OMP)</summary>
<table>
<tr><td><a href="https://www.oasismidstream.com/" target="_blank" rel="noreferrer noopener">Homepage OMP</a></td><td><a href="https://www.onvista.de/aktien/OASIS-MIDSTREAM-PARTNERS-LP-Aktie-US67420T2069" target="_blank" rel="noreferrer noopener">OnVista :: OMP</a></td></tr>
</table>
Heute stellen wir euch eine “Cash Cow“ mit einem enormen Durchhalte-Potential vor: <br />
<br />
Oasis Midstream Partners (OMP) hat nicht nur den Covid-Crash 2020 überstanden, sondern konnte dank seiner grundsoliden Earnings und starken Fundamentaldaten, seine außerordentlich hohe Dividende beibehalten.<br />
<br />
Oasis Midstream Partners LP bietet Erdöl-, Erdgas- und wasserbezogene Midstream-Dienstleistungen in Nordamerika an. <br />
<br />
Die Covid-Krise 2020 erschütterte den Öl- und Gassektor und führte zu einem Konkurs, den die Muttergesellschaft Oasis Petroleum (OAS) inmitten der Turbulenzen anmelden musste. Glücklicherweise konnte die solide Finanzleistung der separat notierten OMP den Konkurs abwenden und sogar ihre Ausschüttungen aufrechterhalten! Glücklicherweise hat sich weiterhin die solide Finanzleistung auch im zweiten Quartal 2021 fortgesetzt, wobei der freie Cashflow nun USD 70,2 Mio. für das erste Halbjahr erreicht hat, was mehr als doppelt so hoch ist wie das Ergebnis von USD 32,6 Mio. im ersten Halbjahr 2020. Dieser zusätzliche freie Cashflow hat die Ausschüttungsquote auf starke 152,42 % erhöht, was dem Unternehmen einen überschüssigen freien Cashflow zur Verfügung stellt, um seine Bilanz kurzfristig zu stärken, aber auch, um die Ausschüttungen in Zukunft zu erhöhen. Das bedeutet letztendlich, dass die Anleger für die aktuellen Ausschüttungen zahlen können und das Wachstum kostenlos erhalten.<br />
<br />
Auf Grund einer abgezinsten Cashflow-Bewertungen scheint der innere Wert des Unternehmens etwa 70 % über dem aktuellen Anteilspreis zu liegen, wenn die Ausschüttungen wie erwartet weiter steigen.<br />
<br />
Der Verschuldungsgrad ist überschaubar im Verhältnis zum EBITDA von 2,88 und der beständig erwirtschaftete Cashflow wird weiter zur Reduzierung der Schulden beitragen.<br />
<br />
Wir wissen, je teurer eine Aktie, desto geringer ist die prozentuale Dividende. Mitte Juni standen alle Öl-Aktien im strahlenden Sonnenlicht, denn es wurde überall vom Wiedererstarken der Wirtschaft geredet. Die Freude wurde aber durch die die aufkommenden Probleme in den Lieferketten, der Ankündigung der OPEC, ihre Förderquoten zu erhöhen, schnell gekippt, und die Kurse der Ölwerte rauschten in der gesamten Branche nach unten. OMP verlor in dieser Zeit etwa 30% im Aktienwert ‐ daher entspricht die jährliche Dividende von USD 2,24, derzeit etwa 10%!<br />
<br />
Gemäß der sich derzeit vermehrenden Nachrichten, wird sich das solide amerikanische Wirtschaftswachstum erkennbar fortsetzen, auch wenn die Covid-Zahlen immer wieder dazwischen funken. Daher sehen wir in OMP auch eine gute Gelegenheit für einen Einstieg.<br />
<br />
<h3>Fundamentale und technische Kennzahlen zu OASIS MIDSTREAM PARTNERS LP</h3>
<table>
<tr><th>Fundamental</th><th>2022e</th><th>2021e</th><th>2020e</th><th>2019e</th></tr>
<tr><td>Ergebnis je Aktie (in EUR)</td><td>2,30</td><td>2,54</td><td>0,47</td><td>2,90</td></tr>
<tr><td>Dividende je Aktie (in EUR)</td><td>1,95</td><td>1,90</td><td>1,84</td><td>1,73</td></tr>
<tr><td>Dividendenrendite (in %)</td><td>11,19</td><td>10,90</td><td>18,41</td><td>12,24</td></tr>
<tr><td>KGV</td><td>7,55</td><td>6,86</td><td>20,94</td><td>4,86</td></tr>
<tr><td>KCV</td><td>-</td><td>6,20</td><td>4,50</td><td>4,26</td></tr>
<tr><td>PEG</td><td>-7,45</td><td>-0,74</td><td>0,04</td><td>-0,05</td></tr>
</table>
</details></li>
<li>Tagestipp heute: ROKU (ROKU)</li>
</ul><br />
</li>
</ul>
</html>
<html>
<ul>
<li><h3>27.09.2021 ‐ Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li>Die Renditen der Treasuries steigen wieder</li>
<li>Niedrigzinsen für Verbraucher: Sparst Du oder konsumierst Du?</li>
<li>Beachtenswerte Earnings </li>
<li>Tagestipp: Facebook (FB)</li>
<li>Empfehlungen</li>
</ul></li>
</ul>
</html>
<html>
<ul>
<li><h3>28.02.2022 ‐ Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li>Dies ist ein Bärenmarkt</li>
<li>Beachtenswerte Earnings</li>
<li>Tagestipp: Wells Fargo & Co. (<b>WFC</b>)</li>
<li>Empfehlungen</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>28.03.2022 - Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li><details><summary>Was steckt hinter “MANGO“?</summary><br />
<ul>
<li>bezieht sich auf den Halbleitermarkt;</li>
<li>ist ein Akronym, das von der Bank of America erfunden wurde;</li>
<li>es steht für folgende Unternehmen aus dem Halbleitersektor:
<ul>
<li>[<b>M</b>] Marvell Technology (<b>MRVL</b>)</li>
<li>[<b>A</b>] Advanced Micro Devices (<b>AMD</b>)</li>
<li>[<b>A</b>] Analog Devices (<b>ADI</b>)</li>
<li>[<b>A</b>] Broadcom (<b>AVGO</b>)</li>
<li>[<b>N</b>] Nvidia (NASDAQ: <b>NVDA</b>)</li>
<li>[<b>G</b>] GlobalFoundries (<b>GFS</b>)</li>
<li>[<b>O</b>] On Semi (<b>ON</b>).</li>
</ul>
</li>
</ul>
<br />
</details>
</li>
<li>Kein Börsenbrief ohne Erwähnung von China</li>
<li>Beachtenswerte Earnings </li>
<li>Tagestipp: Netflix (<b>NFLX</b>)</li>
<li>Empfehlungen</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>28.10.2021 - Donnerstag (Börsenbrief)</h3>
<ul>
<li>Tagesthema: Investieren in Wasserstoff<br />
<br />
erwähnte Unternehmen:
<ul>
<li>Linde (LIN)</li>
<li>INEOS [Europas größter Wasserstoffproduzent]</li>
<li>Air Products And Chemicals (APD)</li>
<li><b>Elektrolyseure:</b>
<ul>
<li>McPhy Energy</li>
<li>Nel ASA</li>
<li>ITM Power</li>
</ul>
</li>
<li><b>Brennstoffzellen‐Unternehmen:</b>
<ul>
<li>Ballard Power Systems (BLDP)</li>
<li>Bloom Energy (BE)</li>
<li>FuelCell Energy (FCEL)</li>
<li>Plug Power (PLUG)</li>
</ul>
</li>
</ul>
</li>
<li>FCEV := Brennstoffzellen‐Elektroauto</li>
<li><img src="./pictures/UMWA-Boersenbrief_Wasserstoff-Petrofac.png" height=750 width=900 /></li>
<li><h3>Wasserstoff‐Anwendung</h3>
<img src="./pictures/UMWA-Boersenbrief_Wasserstoff-Anwendung.png" height=535 width=944 />
</li>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>29.08.2022 - Montag (Börsenbrief)</h3>
<ul>
<li>Nach unten</li>
<li>Nach oben </li>
<li>Beachtenswerte Termine in dieser Woche</li>
<li>Tagestipp heute: Kein Tagestipp, Begründung im Text</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>30.09.2021 - Donnerstag (Börsenbrief)</h3>
<ul>
<li>Inflationssorgen und ein Konjunkturgesetz mit Krypto-Klausel</li>
<li>Ist eine Entspannung im Handelskrieg USA ‐ China möglich?</li>
<li>Kann man bald wieder in chinesische Aktien investieren?</li>
</ul></li>
</ul>
</html>
<html>
<ul>
<li><h3>29.10.2021 - Freitag (Börsenbrief + Empfehlungen + Dividendentitel + Tagestipp)</h3>
<ul>
<li><details><summary>Viel Allgemeines</summary><br />
<ul>
<li>Liste der 10 S&P-Aktien, die am meisten von steigenden nominalen <br />
  10-Jahres-Renditen profitieren (1972 bis September 2021):
<ul>
<li>Marathon Petroleum (MPC), BofA-Rating: kaufen</li>
<li>Qorvo (QRVO), kaufen</li>
<li>NXP Semiconductors (NXPI), kaufen</li>
<li>Live Nation (LYV), keine Empfehlung</li>
<li>Las Vegas Sands (LVS), neutral</li>
<li>General Motors (GM), kaufen</li>
<li>LyondellBasell (LYB), neutral</li>
<li>United Rentals (URI), kaufen</li>
<li>Equinix (EQIX), kaufen</li>
<li>F5 Networks (FFIV), kaufen</li>
</ul>
</li>
<br />
<li>10 Aktien, die am meisten von den steigenden 10-jährigen Renditen<br />
  betroffen sind:
<ul>
<li>American Water Works (AWK), underperform</li>
<li>Dollar General (DG), underperform</li>
<li><u>Digital Realty Trust (DLR)</u>, kaufen</li>
<li>Take-Two Interactive (TTWO), keine Empfehlung</li>
<li><u>Realty Income (O)</u>, kaufen</li>
<li>ResMed (RMD), underperform</li>
<li>MarketAxess Holdings (MKTX), keine Empfehlung</li>
<li>Veritas (VTR), neutral</li>
<li>Chipotle Mexican Grill (CMG), keine Empfehlung</li>
<li>Lennar (LEN), keine Empfehlung</li>
</ul>
</li></ul>
<br />
</details></li>
<li>Bewertung heute endender Empfehlungen</li>
<li><details><summary>Serie: Die besten Dividendentitel ‐ Enbridge (<b>ENB</b>)</summary><br />
Midstream/Pipeline‐Unternehmen<br />
<br />
WKN: 885427<br />
ISN: CA29250N1050<br />
<br />
Div%: 6,33%</details>
</li>
<li>Tagestipp heute: Snap Inc. (SNAP)</li>
</ul></li>
</ul>
</html>
<html>
<ul>
<li><h3>29.11.2021 ‐ Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li>Ein bemerkenswertes “Thanksgiving“</li>
<li>Wie positionieren sich die aktiven Fondsmanager zum Monatswechsel?</li>
<li>Beachtenswerte Earnings </li>
<li>Tagestipp: Netflix (NFLX)</li>
<li>Empfehlungen</li>
</ul></li>
</ul>
</html>
<html>
<ul>
<li><h3>30.08.2021 - Montag (Börsenbrief+Tagestipp+Empfehlungen)</h3>
<ul>
<li>Was bewegt die Märkte in dieser Woche?</li>
<li>Beachtenswerte Earnings </li>
<li>Tagestipp: United States Steel Company (X)<br />
<img src="./pictures/UMWA-Boersenbrief_Tagestipp_X_2021-08-30.png" height=66 width=548 /></li>
<li>Empfehlungen:<br />
<img src="./pictures/Boersenbrief_Empfehlungen_30.08.2021.png" height=458 width=617 />
</li>
</ul></li>
</ul>
</html>
<html>
<ul>
<li><h3>30.12.2021 - Donnerstag (Börsenbrief)</h3>
<ul>
<li>Verschiedenes zum Jahresschluss</li>
<li>Eine positive Bilanz unserer Tagestipps</li>
<li>Bewertung morgen endender Empfehlungen</li>
<li>Ausgewählte Titel der Citibank für das Jahr 2022</li>
<li>Drei der besten Dividendentitel für das neue Jahr</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>31.01.2022 ‐ Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li>Was ist eigentlich „Short selling“?</li>
<li>Welche Optionen sehen wir im Ukraine‐Konflikt?</li>
<li>Beachtenswerte Earnings und ein Wochenüberblick</li>
<li>Tagestipp: Wells Fargo & Co. (<b>WFC</b>)</li>
<li>Empfehlungen</li>
</ul>
</li>
</ul>
</html>
<html>
<body>
<br />
Dieser Börsenbrief enthält eine Menge Infos zum Thema P/C.<br />
<br />
<ul>
<li><h3>31.05.2021 - Montag (Update+Tagestipp)</h4>
<ul>
<li>Tipps zum täglichen Handelsbeginn</li>
<li>Beachtenswerte Earnings, Informationen zur Woche und eine Warnung</li>
<li>Wir werden die “grünen Aktien“ wieder steigen sehen!</li>
<li>Tagestipp: VALE S.A. (<b>VALE</b>)<br />
WKN : A0RN7M<br />
ISIN : US91912E1055<br />
<img src="./pictures/UMWA-Boersenbrief_Tagestipp_VALE_2021-05-31.png" height=76 width=827 /></li> <!-- height=51 width=551 -->
</ul></li>
</ul>
</body>
</html>
<html>
<ul>
<li><h3>31.10.2022 ‐ Montag (Börsenbrief + Tagestipps + Empfehlungen)</h3>
<ul>
<li>Ein Blick zurück ‐ und ein Blick nach vorne</li>
<li>Beachtenswerte Termine in dieser Woche</li>
<li>Tagestipps:<ul><li>ZIM Integrated Shipping (<b>ZIM</b>)</li><li>The Blackstone Group (<b>BX</b>)</li></ul></li>
<li>Empfehlungen</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>04.03.2022 ‐ Freitag (Börsenbrief + Dividendentitel + Tagestipp)</h3>
<ul>
<li>Jetzt noch in Öl einsteigen?</li>
<li>Wenn Dich die Angst übermannt</li>
<li>Das “SWIFT“‐System des Ostens heißt “CIPS“</li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividendentitel ‐ Cohen&Steers Qual. Inc. Fund (<b>ROI</b>)</li>
<li>Tagestipp heute: Petroleo Brasileiro S.A. (<b>PBR</b>)</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>07.03.2022 ‐ Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li>Fehlende Rohstoffe hier ‐ steigende Kurse dort</li>
<li>Beachtenswerte Earnings </li>
<li>Tagestipp: Alcoa Inc. (<b>AA</b>)</li>
<li>Empfehlungen</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>10.03.2022 ‐ Donnerstag (Börsenbrief)</h3>
<ul>
<li>Verlierer ‐ aber auch Gewinner in einer toxischen Gemengelage</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>11.03.2022 ‐ Freitag (Börsenbrief + Dividendentitel + Tagestipp)</h3>
<ul>
<li>Das Wechselbad der Gefühle</li>
<li>Bewertung heute endender Empfehlungen</li>
<li>Serie: Die besten Dividendentitel ‐ Stanley Black & Decker (<b>SWK</b>)</li>
<li>Tagestipp heute: Macy's Inc. (<b>M</b>)</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>14.03.2022 ‐ Montag (Börsenbrief + Tagestipp + Empfehlungen)</h3>
<ul>
<li>Rezession voraus?</li>
<li>Übergroße Kursrückgänge der Tech‐Aktien (Beispiel DOCU)</li>
<li>Aktientipps aus öffentlichen Foren</li>
<li>Beachtenswerte Earnings </li>
<li>Empfehlungen</li>
<li>Tagestipp: Boston Scientific (<b>BSX</b>)</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li>Stammtisch‐Webseite :: <a href="https://www.ulrichmueller.de/stammtische" target="_blank" rel="noreferrer noopener">www.ulrichmueller.de/stammtische</a></li>
<br />
<li>Für weitere Interessenten :: <a href="https://www.ulrichmueller.de/stammtisch-bewerbung" target="_blank" rel="noreferrer noopener">www.ulrichmueller.de/stammtisch‐bewerbung</a></li>
</ul>
</html>
<html>
<ul>
<li>Bei einer VIE-Struktur gründet ein chinesisches Unternehmen eine Offshore‐Gesellschaft, <br />
um seine Aktien an einer ausländischen Börse notieren zu lassen. Die Offshore‐Gesellschaft<br />
schließt dann Verträge und Vereinbarungen mit dem chinesischen Unternehmen ab, die aus‐<br />
ländischen Investoren ein wirtschaftliches Engagement in chinesischen Unternehmen ermög‐<br />
lichen.</li>
<li>Das Ergebnis dieser Vereinbarung ist jedoch, dass nicht-chinesische Investoren Anteile an<br />
einer Offshore-Gesellschaft und nicht an der chinesischen Betreibergesellschaft selbst kaufen<br />
und besitzen.</li>
<li>Alibaba und andere große chinesische Unternehmen nutzen VIE-Strukturen, um Kapital<br />
von ausländischen Investoren zu erhalten. VIE-Strukturen werden schon seit Jahrzehnten,<br />
mit passiver Akzeptanz der chinesischen und US‐amerikanischen Aufsichtsbehörden, ver‐<br />
wendet. Erst als China große Unternehmen wie Alibaba wegen anti monopolistischen Ver‐<br />
haltens ins Visier nahm, geriet diese Struktur ins Kreuzfeuer der Kritik. Kurzfristig bestand die<br />
große Angst, China würde diese Konstrukte verbieten.</li>
<li>Allerdings weiß auch China, ausläische Investoren würden damit Verluste in Milliarden‐<br />
höhe erleiden ‐ da es praktisch eine Enteignung wäre. Nach einer jahrzehntelangen<br />
Duldung der VIEs (oder auch „ADR“s) wäre dies de facto ein Bruch mit der Weltwirtschaft.</li>
</ul>
<h3>Links:</h3>
<ul>
<li>UMWA :: 14.10.2021 - Donnerstag (Börsenbrief)</li>
</ul>
</html>
<html>
<ul>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.allianz.de/recht-und-eigentum/rechtsschutzversicherung/mietrecht/vermieterrechtsschutz/"
target="_blank" rel="noreferrer noopener">
Allianz :: Vermieterrechtsschutz: Der beste Schutz für vermietete Immobilien
</a>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>Was ist ein <em>Zinsstrukturkurve</em>?</h3>
Die Zinsstrukturkurve stellt die Beziehung zwischen der Laufzeit und der Verzinsung<br />
einer Anleihe grafisch dar. Konkret zeigt sie täglich die durchschnittlichen Renditen<br />
für Anleihen eines Emittenten mit Laufzeiten von bis zu 30 Jahren. Anleger schauen<br />
vor allem auf die Zinsstrukturkurven von Staatsanleihen aus den USA und der Euro‐<br />
Zone. Zudem ist häufig von einem “kurzen“ und einem “langen“ Ende die Rede. Da‐<br />
mit gemeint sind die Renditen von Anleihen mit (sehr) kurzen bzw. (sehr) langen Rest‐<br />
laufzeiten.</li>
<li><h3>Wie sieht die Zinsstrukturkurve normalerweise aus?</h3>
Ökonomen und Investoren leiten aus dem Verlauf der Zinsstrukturkurve gern ab,<br />
wie es um die Konjunktur eines Landes bestellt ist. Als “normal“ gilt dabei eine Kurve,<br />
die ansteigt ‐ die Renditen am “langen“ Ende sind also höher als die am “kurzen“ Ende.<br />
Der Wirtschaft, so die Erfahrung, geht es dann gut. Ein steiler Anstieg der Kurve deutet<br />
sogar auf einen größeren Aufschwung hin. Aktuell [Dez. 2021] haben wir sowohl in den<br />
USA als auch in Europa eine “normale“ Zinsstrukturkurve.</li>
<li><h3>Was ist dann eine <em>inverse Zinsstrukturkurve</em>?</h3>
Das Gegenteil dazu bildet die <u><em>inverse Zinsstrukturkurve</em></u>, sprich eine <b><em>fallende Kurve</em></b>. <br />
An den Kaptalmärkten löst ein solcher negativer Verlauf schnell Rezessionsängste<br />
aus, da sich in der Vergangenheit dann die wirtschaftliche Situation oft stark einge‐<br />
trübt hat. In Stein gemeißelt ist das allerdings nicht.</li>
<li><h3>Wie kann eine Notenbank die Kurve steuern?</h3>
Währungshüter nehmen am “kurzen“ Ende hauptsächlich über die Höhe des Leitzinses<br />
Einfluss auf die Anleihenrenditen. Aber auch am “langen“ Ende können sie die Zinsstruk‐<br />
turkurve steuern. Kaufen sie massenhaft Anleihen vom Markt (<em><u>Quantitative Easing</u></em>), sin‐<br />
ken die langfristigen Renditen und die Kurve flacht ab. Fahren sie das Kaufprogramm zu‐<br />
rück (<em><u>Tapering</u></em>) oder verkaufen sie sogar Anleihen im großen Stil, steigen die Anleihen‐<br />
renditen am “langen“ Ende ‐ die Kurve wird also steiler.</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus Money, 51/2021 (15.12.2021), S. 54</li>
</ul>
</html>
<html>
<ul>
<li>Verschuldungsgrad :=: “debt to capital“</li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</html>
<html>
Beispiel:<br />
<code>/usr/bin/find / -type d ( -fstype nfs -o -fstype nfs4 -o -fstype NFS -o
-fstype proc -o -fstype afs -o -fstype smbfs -o -fstype autofs -o -fstype
iso9660 -o -fstype ncpfs -o -fstype coda -o -fstype devpts -o -fstype ftpfs -o
-fstype devfs -o -fstype mfs -o -fstype sysfs -o -fstype shfs -o -fstype cifs
-o -fstype 9P -o -fstype unknown -o -regex
\(^/mnt$\)\|\(^/cdrom$\)\|\(^/tmp$\)\|\(^/usr/tmp$\)\|\(^/var/tmp$\)\|\(^/var/
spool$\)\|\(^/proc$\)\|\(^/media$\)\|\(^/sys$\) ) -prune -o -print0
</code><br />
Optionen:<br />
-o :<br />
-regex :<br />
-prune :<br />
-print0 :<br />
</html>
''* mtime''
modification of the file has been made,
includes a write to the file
if the contents of the file has been modified
saving back to the disk
Befehl/Option :: ls -la
Änderungen im File / Textänderungen & anschliessendes Abspeichern
''* ctime''
change of the inode level
changes whenever you modify the file
also when you change the permissions (!)
Befehl / Option :: ls -lc
Änderungen auf Inode-Level, z.B. Änderungen von Permissions oder Owner
''* atime''
last access time of the file
Befehl / Option :: ls -lu
''Beispiel:''
Das File "950_linuxBINDDNSConfigureSPF.pdf" wurde umbenannt. Es
wurde als File "950.pdf" downgeloaded, und zwar am 01.Feb. 2010, umbe-
nannt dann am 16.Nov.2010, um 11:11 Uhr:
jam@linux:~/Documents/SystemAdministration/nixCraft> ls -latr 950_*
-rw-r--r-- 1 jam users 157350 1. Feb 2010 950_LinuxBINDDNSConfigureSPF.pdf
jam@linux:~/Documents/SystemAdministration/nixCraft> ls -lu !!$
ls -lu 950_*
-rw-r--r-- 1 jam users 157350 16. Nov 11:11 950_LinuxBINDDNSConfigureSPF.pdf
jam@linux:~/Documents/SystemAdministration/nixCraft> ls -lc 950_*
-rw-r--r-- 1 jam users 157350 16. Nov 11:11 950_LinuxBINDDNSConfigureSPF.pdf
Danach wurden die Rechte von 644 auf 755 geändert. Dies geschah am 16.Nov um
11:16 Uhr.
ls -latr 950_LinuxBINDDNSConfigureSPF.pdf => -rwxr-xr-x 1 jam users 157350 1. Feb 2010 950_LinuxBINDDNSConfigureSPF.pdf
ls -lu 950_LinuxBINDDNSConfigureSPF.pdf => -rwxr-xr-x 1 jam users 157350 16. Nov 11:11 950_LinuxBINDDNSConfigureSPF.pdf
ls -lc 950_LinuxBINDDNSConfigureSPF.pdf => -rwxr-xr-x 1 jam users 157350 16. Nov 11:16 950_LinuxBINDDNSConfigureSPF.pdf
<html>
Have You Ever found a need to find a file for a particular <br />
pattern and then edit the same ??<br />
<br />
Here is an easiest way....<br />
<br />
At the UNIX prompt, just type:<br />
<br /><code>
vi `find . -name "*" -exec grep -l "pattern" {} \; -print`<br />
</code><br />
Where "pattern" is the string to be searched.<br />
</html>
<html>
Hot Tip for Space Cops: (aren't we all?)<br />
<br />
If your users keep using up all the space in your home directory,<br />
here is a way to apprehend the top offenders.<br />
<br />
<code>
cd /home<br />
du -ks * | sort -nr | pg<br />
</code>
<br />
(Note: The "k" option may not be necessary in non-posix systems.)<br />
This string will show you all the directory sizes in order,<br />
largest first. Now if you are going to do a little cleanup yourself,<br />
in one of those directories run:<br />
<br />
<code>
ls -ls | sort -nr | pg<br />
</code>
<br />
This will list files by size largest first. That way when you do your compress,<br />
move, or remove, you may actually reclaim a significant amount of space.<br />
<br />
This tip generously supported by: uspncjpf@ibmmail.com<br />
</html>
<html>
How to find a string somewhere on the system. Many times we are<br />
called to search for a string, but we have no idea where it may<br />
be lurking. Judicious use of the find and grep commands will<br />
make you a hero with your co-workers.<br />
<br /><code>
# find . -type f -exec grep "string or options" /dev/null {} \;<br />
</code><br />
Normally using only:<br />
<br /><code>
# find . -type f -exec grep "string/options" {} \;<br />
</code><br />
Produces the target string, but you will have no clue as to where<br />
it is located, making this almost as frustrating as using windoze!<br />
Remember when grep'ing against multiple files the filename will be<br />
listed before the match.<br />
<br /><code>
$ grep there *<br />
foo:I found the target here<br />
bar:You are there<br />
</code><br />
In our find command we use /dev/null as a file to search against, since<br />
we know the search will always fail if the string is found in "{}" there<br />
filename is printed. To borrow from a famous quote:<br />
"Pretty tricky sis!"<br />
<br />
This tip generously supported <br />
by: james_b_horwath@glic.com<br />
</html>
<html>
To find out the control characters in a file, we<br />
can use following two methods:<br />
<br /><code>
% cat -vet filename<br />
</code><br />
or edit the file using vi:<br />
<br /><code>
:set list<br />
</code><br />
This tip generously supported by: <br />
tb.unnikrishnan@citicorp.com<br />
</html>
<html>
To find and remove core files conditionally: <br />
<br /><code>
# find ~ -name core -exec file {} \; -exec rm -i {} \; <br />
</code><br />
"file" will show which executable the core<br />
file is for and the -i option to rm will allow <br />
you to choose weather to delete it or not.<br />
<br />
#### EXAMPLE ##############<br />
<br /><code>
# find ~ -name core -exec file {} \; -exec rm -i {} \;<br />
<br />
/my/home/core: ELF 32-bit LSB core file of 'netscape-commun' (signal 3), Intel 8<br />
rm: remove `/my/home/core'? y<br />
</code><br />
This tip generously supported <br />
by: sparkman@webmd.net<br />
</html>
If you want to know the
MAC or eathernet address of
your lan card on an HP-UX
machine, then type:
lanscan
This will give you the mac
addresses of all the lan
cards installed on the
machine.
<html>
Want to get information on PCI devices on your<br />
Linux or FreeBSD machine?<br />
<br />
On <b>Linux</b> use:
<br /><code>
/sbin/lspci </code>(-v is verbose)<br />
<br />
On <b>FreeBSD</b> use:
<br /><code>
pciconf -l<br />
</code><br />
</html>
<html>
Did you ever fill up a filesystem and want to know<br />
what large files are consuming the space. This will<br />
sort the largest files, top to bottom.<br />
<br /><code>
find /var -mount -ls -xdev | /usr/bin/sort -nr +6 | more
</code><br />
</html>
<html>
<table border="1">
<tr><th>Befehl</th><th>Tastenkombination</th></tr>
<tr><td>Öffne Werkzeugkasten<br /> (öffnet sich mit zuletzt aktiviertem Werkzeug) </td><td>Strg + Umschalt + I</td></tr>
<tr><td>Öffne Web-Konsole1 </td><td>Strg + Umschalt + K</td></tr>
<tr><td>Schalte Inspektor ein oder aus </td><td>Strg + Umschalt + C</td></tr>
<tr><td>Öffne Debugger </td><td>Strg + Umschalt + S</td></tr>
<tr><td>Öffne Stilbearbeitung </td><td>Umschalt + F5</td></tr>
<tr><td>Öffne Laufzeitanalyse </td><td>Umschalt + F5</td></tr>
<tr><td>Öffne Netzwerkanalyse </td><td>Strg + Umschalt + Q</td></tr>
<tr><td>Entwickler-Symbolleiste (an- und ausschalten) </td><td>Umschalt + F2</td></tr>
<tr><td>Bildschirmgrößen testen (an- und ausschalten) </td><td>Strg + Umschalt + M</td></tr>
<tr><td>Öffne Browser-Konsole2 </td><td>Strg + Umschalt + J</td></tr>
<tr><td>Öffne Browser-Werkzeugkasten (neu in Firefox 39) </td><td>Strg + Alt + Umschalt + I</td></tr>
<tr><td>Öffne JavaScript-Umgebung </td><td>Umschalt + F4</td></tr>
<tr><td>Öffne Entwickler-Umgebung (WebIDE) </td><td>Umschalt + F8</td></tr>
<tr><td>Öffne Speicher-Inspektor3 </td><td>Umschalt + F9</td></tr>
</table>
<br />
Link:<br />
https://developer.mozilla.org/de/docs/Tools/Keyboard_shortcuts<br />
</html>
<html>
<h3>Firefox vollständig zurücksetzen: Ab Firefox-Version 39</h3>
<ul>
<li>Öffnen Sie in Firefox einen neuen Tab mit der Tastenkombination [Strg] + [T] und geben Sie in die Adresszeile “about:support“ ein (ohne Anführungszeichen oder Leerzeichen).</li>
<li>Hier können Sie auf der rechten Seite zunächst versuchen, Firefox ohne Addons neu zu starten. Oft behebt das gängige Probleme.</li>
<li>Bei Adware und tieferen Änderungen in den Einstellungen sollten Sie aber den Browser komplett zurücksetzen: Dazu klicken Sie auf “Firefox bereinigen“ (siehe Bild).</li>
<li>Die nachfolgende Abfrage bestätigen Sie mit einem erneuten Klick auf “Firefox bereinigen“. <br />
<img src="./pictures/praxistipps_firefox-zuruecksetzen-bild-screenshot.jpg" height=432 width=768 /></li>
<h3>Links:</h3>
<ul>
<li><a href="https://praxistipps.chip.de/firefox-einstellungen-zuruecksetzen-so-gehts_13039" target=_blank>Chip :: Praxistipps - Firefox-Einstellungen zurücksetzen</a></li>
</h3>
</html>
<html>
So löschen Sie den Cache-Speicher in Firefox:
<ol>
<li>Klicken Sie auf die Schaltfläche <i>Menü öffnen</i><br />
rechts oben im Firefox-Fenster.</li>
<li>Klicken Sie auf <i>Einstellungen</i>.</li>
<li>Öffnen Sie <i>Datenschutz und Sicherheit</i>.</li>
<li>In der Sektion <i>Zwischengespeicherte Webinhalte</i><br />
klicken Sie auf die Schaltfläche “<b><em>Jetzt leeren</em></b>“.</li>
</ol>
Damit wird der Firefox Cache gelöscht. <br />
<br />
Übrigens können Sie genauso einfach alle die <br />
gespeicherten Firefox-Daten löschen.<br />
<br />
<b>Tipp:</b><br />
Statt sich mit Mausklicks zu den Sicherheits-Einstellungen <br />
zu hangeln, können Sie auch in die Adressleiste
<code><pre><b>about:preferences#privacy</b></pre></code>
eingeben.<br />
<h3>Alternative:</h3>
<ol>
<li>Auf das “Bücherregal‐Symbol“ oben rechts klicken;</li>
<li>Auf “Chronik“ klicken;</li>
<li>Auf “Neuste Chronik löschen“ klicken;</li>
<li>Den Zeitraum der Löschung festlegen</li>
<li>Auswählen der zu löschenden Daten*<br />
(<em>*Falls nur Cookies gelöscht werden sollen, den Haken nur bei “Cookies“ aktiv haben, <br />
ansonsten läuft man Gefahr, Daten zu löschen, welche man nicht wollte ….</em>)
</li>
<li>Bestätigung durch “Jetzt löschen“</li>
</ol>
<h3>Link:</h3>
</ul>
<li><a href="https://www.tippscout.de/firefox-cache-leeren_tipp_4111.html" target=_blank>Tippscout.de :: Firefox Cache leeren</a></li>
<li><a href="https://browser.tips/anleitung/cookies-in-firefox-loeschen" target=_blank>browser.tips :: Cookies in Firefox löschen</a></li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://www.ghacks.net/2022/12/24/configure-firefox-to-reject-cookie-banners-automatically/"
target="_blank" rel="noreferrer noopener">
ghacks.net :: Configure Firefox to reject cookie banners automatically</a>
</li>
</html>
<html>
<ul>
<li>In Firefox, you can delete temporary browsing data using the "Forget" button. First, right-click on the toolbar and select "Customize Toolbar".
<img src="./pictures/FireFox_right-click-and-select-customize-toolbar.webp"
height= width= /><!-- -->
</li>
<li>Now, from the list, drag and drop the "Forget" button to the toolbar. If you click on it, you will be asked to clear 5 min, 2 hrs, and 24 hrs of browsing data, pick any one of them and click on "Forget!".
<img src="./pictures/FireFox_click-on-forget-button.webp"
height= width= /><!-- -->
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
</ul>
</html>
<html>
<ul>
<li>
<pre>Indem du schilderst, wie du Firefox beendest.
Firefox ohne Chronik=privater Modus merkt sich keine Sitzungen.
Chronik beim Beenden löschen lassen hat den gleichen Effekt.
Werden mehrere Fenster einzeln geschlossen, merkt sich Firefox nur die Sitzungen des letzten Fensters.
Firefox merkt sich den Zustand aller Fenster und Tabs nur bei Menü > "Datei" > "Beenden".
Möglich wäre zudem ein Profildefekt, Firefox merkt sich Sitzungen hier:
sessionCheckpoints.json
und im Ordner \sessionstore-backups\
Ansonsten müsstest du auf einen Sitzungsmanager als Erweiterung zurückgreifen.
</pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.camp-firefox.de/forum/thema/134823-wiederherstellung-der-offenen-tabs-funktioniert-nicht/"
target="_blank" rel="noreferrer noopener">
camp-firefox.de :: Wiederherstellung der offenen Tabs funktioniert nicht</a>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>Löschen einzelner Formularfeldeinträge</h3>
Wenn Sie einen Ihrer früheren Formularfeldeinträge aus Firefox löschen möchten:
<ol>
<li>Klicken Sie in das Formularfeld und drücken Sie die Taste <span class="key">↓</span>, um alle gespeicherten Einträge anzuzeigen. Sie können auch die ersten Buchstaben des zu löschenden Eintrages in das Formularfeld eintippen, um die Anzahl der Einträge in der Auswahlliste zu beschränken.
<li>Drücken Sie die Taste <span class="key">↓</span> oder benutzen Sie Ihre Maus, um den Eintrag zu markieren, der gelöscht werden soll.
<li>Drücken Sie Entf, dadurch wird dieser Eintrag gelöscht.
</ol>
<br />
Wiederholen Sie diesen Vorgang für jeden Eintrag, den Sie aus bestimmten Formularfeldern löschen wollen.
</li>
<li><h3>Löschen aller Formularfeldeinträge aus Firefox</h3>
Wenn Sie alle Formularfeldeinträge aus Firefox löschen möchten:
<ol>
<li>Klicken Sie in Ihrer Symbolleiste auf die Bibliotheksschaltfläche Symbol library de (wenn Sie die Schaltfläche dort nicht sehen, klicken Sie zuerst auf die Menüschaltfläche “<em>≡</em>“ und dann auf Bibliothek).
<li>Klicken Sie auf “Chronik“ und wählen Sie die Option “Neueste Chronik löschen …“.
<li>Bestimmen Sie im sich öffnenden Dialog die zu löschende Zeitspanne, indem Sie auf den Pfeil des Auswahlmenüs (links neben “löschen“) klicken und die Option Alles wählen. Ein Warnhinweis wird eingeblendet.
<li>Legen Sie die zu löschenden Daten fest, indem Sie ein Häkchen neben Eingegebene Suchbegriffe & Formulardaten setzen. Stellen Sie sicher, dass kein Häkchen neben einer anderen Datengruppe gesetzt ist, deren Inhalte Sie behalten möchten.
<li>Klicken Sie auf OK. Der Dialog schließt sich und alle Formularfeldeinträge werden gelöscht.
</ol>
</li>
<li><h3>Speichern von Formularfeldeinträgen verhindern</h3>
Wenn Sie nicht möchten, dass Firefox Ihre Formularfeldeinträge speichert, können Sie die Formular-Autovervollständigung mit diesen Schritten deaktivieren:
<ol>
<li>Klicken Sie auf die Menüschaltfläche “<em>≡</em>“ und wählen Sie Einstellungen.
<li>Wählen Sie den Abschnitt Datenschutz & Sicherheit und gehen Sie dort zum Bereich Chronik.
<li>Wählen Sie im Auswahlmenü neben Firefox wird eine Chronik die Option nach benutzerdefinierten Einstellungen anlegen.
<li>Stellen Sie sicher, dass das Häkchen neben Eingegebene Suchbegriffe und Formulardaten speichern entfernt ist.
<li>Schließen Sie die Einstellungen (den Tab about:preferences). Alle von Ihnen vorgenommenen Änderungen werden dabei automatisch gespeichert.
</ol>
<br />
Die Deaktivierung der Formular-Autovervollständigung verhindert auch die Speicherung von Einträgen in der Suchleiste von Firefox in der Navigations-Symbolleiste.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://support.mozilla.org/de/kb/Formular-Autovervollstaendigung" target="_blank">Firefox :: Hilfe ‐ Formular‐Autovervollständigung</a></li>
</ul>
</html>
<html>
<ol>
<li>In Firefox oben rechts auf das Drei-Strich-Menü<br />
(“<em>Hamburger–Menü</em>“) klicken;
</li>
<li>Den Eintrag “Einstellungen“ auswählen;
</li>
<li>Unter “Allgemein“ die Option “<em>Vorherige Fenster<br />
und Tabs öffnen</em>“ anklicken;<br />
<br />
Die Änderungen werden sofort gespeichert. So–<br />
bald Firefox neu gestartet wird, werden automa–<br />
tisch auch alle vorherigen Tabs geöffnet.
</li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://www.heise.de/tipps-tricks/Firefox-Letzte-Sitzung-wiederherstellen-so-geht-s-5995548.html"
target="_blank" rel="noreferrer noopener">
Heise.de :: Firefox: Letzte Sitzung wiederherstellen – so geht's</a>
</li>
</ul>
</html>
<html>
<ul>
<li>Firefox →Chronik →neuste Chronik löschen →Haken bei aktive Logins →jetzt löschen</li>
<br />
<li>bzw.<br />
Firefox →History →Clear Recent History … →(neues Fenster) Clear All History →Zeitraum einstellen →Ok</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.stern.de/noch-fragen/mein-browser-speichert-immer-alle-logins-und-das-will-ich-gar-nicht-kann-mir-jemand-sagen-wie-ich-bei-firefox-einen-login-loeschen-kann-1000465812.html" target=_blank>Stern.de :: Browser speicher immer alle Logins</a></li>
</ul>
</html>
<html>
So blendet man die Menüleiste in Firefox ein oder aus:
<ol>
<li>Startet Firefox starten.</li>
<li>Man seht nun einen Tab und daneben viel leeren Platz für weitere Tabs.</li>
<li>Mit der rechten Maustaste in diesen Freiraum klicken.</li>
<li>Es öffnet sich ein Menü, in dem man auf “Menüleiste“ klicken kann.</li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://www.giga.de/downloads/mozilla-firefox/tipps/die-firefox-menueleiste-einblenden-so-geht-s/"
target="_blank" rel="noreferrer noopener">
Giga :: Die Firefox-Menueleiste einblenden</a>
</li>
</ul>
</html>
<html>
<ul>
<li>In Firefox, you can set a custom secure DNS if you'd like.
</li>
<li>For this, first go into the Firefox settings:<br />
<img src="./pictures/Firefox_set-a-custom-dns-in-firefox.webp"
height=450 width=610 /><!-- height=899 width=1220 -->
</li>
<li>Then, in settings, select the Privacy & Security tab <br />
and scroll down to the “Enable DNS over HTTPS using:” <br />
section.
</li>
<li>Here, enable the "Increased Protection" option and<br />
select a provider from the list.
</li>
<li>Select "Custom" to enter a provider of your choice.
</li>
<!--
<li>
</li>
-->
</ul>
<h3>Links:</h3>
<ul>
<li>It's FOSS Newsletter:<br />
<em>FOSS Weekly #24.34: Deepin 23, Archcraft Experience, Linux in Schools and More</em> <br />
22.08.2024;
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer">
</a>
</li>
-->
</ul>
</html>
<html>
<h3>Allgemeine Tastenkombinationen:</h3>
<table border="1">
<tr><th>Funktion</th><th>Tastenkombination</th></tr>
<tr><td>Lesezeichen/Bookmark hinzufügen</td><td><center>[Strg][D]</center></td></tr>
<tr><td>Lesezeichen anzeigen & schließen <br />(Öffnet links eine Sidebar)</td><td><center> [Strg][B]</center></td></tr>
<tr><td>DOM-Inspektor</td><td><center> [Strg][Umschalten][I]</center></td></tr>
<tr><td>Downloads anzeigen</td><td><center> [Strg][J]</center></td></tr>
<tr><td>Vollbildansicht</td><td><center>[F11]</center></td></tr>
<tr><td>Hilfe</td><td><center>[F1]</center></td></tr>
<tr><td>Chronik/History anzeigen & schließen <br />(Öffnet links eine Sidebar)</td><td><center>[Strg][H]</center></td></tr>
<tr><td>gesamte Chronik löschen <br />(Öffnet neues Fenster)</td><td><center>[Strg][Shift] [Del] <br /> bzw. <br /> [Strg][Shift] [Entf]</center></td></tr>
<tr><td>Seitenquelltext anzeigen</td><td><center>[Strg][U]</center></td></tr>
<tr><td>Seite drucken</td><td><center>[Strg][P]</center></td></tr>
<tr><td>Seite neu laden (Refresh)</td><td><center>[F5]</center></td></tr>
<tr><td>Seite neu laden + Cache leeren</td><td><center>[Strg][F5]</center></td></tr>
<tr><td>Seite speichen</td><td><center>[Strg][S]</center></td></tr>
<tr><td>Datei öffnen</td><td><center>[Strg][O]</center></td></tr>
</table>
<h3>Tastenkombinationen für die Seitennavigation:</h3>
<table border="1">
<tr><th>Funktion</th><th>Tastenkombination</th></tr>
<tr><td>Seite zurück</td><td><center>[Alt][Pfeil links]</center></td></tr>
<tr><td>Seite vorwärts</td><td><center>[Alt][Pfeil rechts]</center></td></tr>
<tr><td>Nächster Frame</td><td><center>[F6]</center></td></tr>
<tr><td>Vorheriger </td><td><center>[Umschalten][F6]</center></td></tr>
<tr><td>Homepage / Startseite</td><td><center>[Alt][Pos1]</center></td></tr>
<tr><td>Zur Adressleiste </td><td><center>[Strg][L]</center></td></tr>
<tr><td>Zur Suchleiste springen</td><td><center>[Strg][K]</center></td></tr>
<tr><td>Tab schließen</td><td><center>[Strg][W]</center></td></tr>
<tr><td>Neuer Tab</td><td><center>[Strg][T]</center></td></tr>
<tr><td>Nächsten Tab<br />aktivieren</td><td><center>[Strg][Tab]<br /> bzw. [Strg][Bild ↑]</center></td></tr>
<tr><td>Vorherigen Tab<br />aktivieren</td><td><center>[Strg][Umschalten][L]<br />[Strg][Bild ↓]</center></td></tr>
<tr><td>Tab auswählen</td><td><center>[Strg][1-9], z.B. [Strg][4] für den vierten Tab</center></td></tr>
<tr><td>zum letzten Tab<br />springen</td><td><center>Alt‐9</center></td></tr>
<tr><td>Firefox schließen</td><td><center>[Alt][F4]</center></td></tr>
<tr><td>Neues Fenster</td><td><center>[Strg][N]</center></td></tr>
</table>
<h3>Tastenkombinationen für die Textbearbeitung:</h3>
<table border="1">
<tr><th>Funktion</th><th>Tastenkombination</th></tr>
<tr><td>Text kopieren</td><td><center>[Strg][C]</center></td></tr>
<tr><td>Text in Zwischenablage ausschneiden</td><td><center>[Strg][X]</center></td></tr>
<tr><td>Text aus Zwischenablage einfügen</td><td><center>[Strg][V]</center></td></tr>
<tr><td>Zeichengröße </td><td><center>[Strg][-]</center></td></tr>
<tr><td>Zeichengröße vergrößern</td><td><center>[Strg][+]</center></td></tr>
<tr><td>Standard-Zeichengröße einstellen</td><td><center>[Strg][0] ⇒[0] ist dabei die Ziffer Null</center></td></tr>
<tr><td>Befehl rückgängig machen</td><td><center>[Strg][Z]</center></td></tr>
</table>
<h3>Tastenkombinationen für die Suche:</h3>
<table border="1">
<tr><th>Funktion</th><th>Tastenkombination</th></tr>
<tr><td>Auf der Seite suchen</td><td><center>[Strg][F]</center></td></tr>
<tr><td>Suche </td><td><center>[F3]</center></td></tr>
<tr><td>Sofortsuche</td><td><center>[']</br >
Apostroph per [Umschalten][#]</center></td></tr>
<tr><td>Sofortsuche nur in Links</td><td><center>[/]<br />
Schrägstrich per [Umschalten][7]</center></td></tr>
<tr><td>Vorhergehendes finden</td><td><center>[Umschalten][F3]</center></td></tr>
</table>
<h3>Maus-Abkürzugen / Maus-Tastenkombinationen:</h3>
<table border="1">
<tr><th>Funktion</th><th>Maus-/Tastenkombination</th></tr>
<tr><td>Seite zurückblättern</td><td><center>[Umschalten] + Mausrad nach unten</center></td></tr>
<tr><td>Seite vorwärts blättern</td><td><center>[Umschalten] + Mausrad nach oben</center></td></tr>
<tr><td>Link im Tab öffnen (Tab im Hintergrund)</td><td><center>[Strg] + Klick auf Link<br />
oder Klick mit mittlerer Maustaste</center></td></tr>
<tr><td>Link im Tab öffnen (Tab im Vordergrund)</td><td><center>[Strg][Umschalten] + Klick auf Link</center></td></tr>
<tr><td>Link im neuen Fenster öffnen</td><td><center>[Umschalten] + Klick auf Link</center></td></tr>
<tr><td>Tab schließen</td><td><center>Klick mit mittlerer Maustaste auf Tab</center></td></tr>
<tr><td>Neuen Tab öffnen</td><td><center>Doppelklick auf Tableiste</center></td></tr>
<tr><td>Zeichengröß verkleinern</td><td><center>[Strg] + Mausrad nach oben</center></td></tr>
<tr><td>Zeichengröße vergrößern </td><td><center>[Strg] + Mausrad nach unten</center></td></tr>
<tr><td>Screenshot erstellen</td><td><center>[Strg] + [Shift] + s</center></td></tr>
</table>
<br />
<h3>Link:</h3>
<ul>
<li><a href="https://www.tipps-tricks-kniffe.de/firefox-die-besten-tastenkombinationen-shortcuts-und-tastenkurzel/" target=_blank rel="noreferrer noopener">
Tipps‐Tricks‐Kniffe :: Die besten Firefox‐Tastenkombinationen</a></li>
<li><a href="https://support.mozilla.org/de/kb/Tastaturkuerzel?redirectslug=Keyboard+shortcuts" target=_blank rel="noreferrer noopener">
Mozilla.org‐Support :: Tastenkombinationen</a></li>
</ul>
</html>
<html>
Als erstes startet man den Firefox und gibt dann oben in die Adreßleiste
<code><pre>
about:config
</pre></code>
ein und drückt dann auf die Taste Enter, und bestätigt nun noch die Warnmeldung:<br />
<br />
config-warnung - Image<br />
<br />
Dann oben links unter Suchen folgenden Eintrag machen:
<code><pre>
browser.tabs.insertRelatedAfterCurrent
</pre></code>
(Dazu am besten den Namen des Eintrages kopieren und oben in die Leiste wieder einfügen)<br />
<br />
Auf der rechten Seite steht dann unter Wert der Standard Eintrag auf true.
<code><pre>
true
</pre></code>
Nun macht man einen Doppelklick mit der linken Maustaste auf diesen Wert, und ändert ihn dadurch auf false.<br />
<br />
So sieht das dann aus:
<code><pre>
false
</pre></code>
<br />
<b>Neuen Tab am Ende</b>
<br />
Danach die Seite <code><b>about:config</b></code> einfach wieder schließen.<br />
<br />
Die änderung wird sofort und ohne Neustart vom Firefox übernommen.<br />
<br />
Ab sofort werden neue Tabs am Ende der Tableiste erstellt.<br />
</html>
<html>
In <b>about:config</b> den Wert wie folgt setzen:
<code><pre>
browser.translations.enable: false
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://www.camp-firefox.de/forum/thema/136847-%C3%BCbersetzung-komplett-deaktivieren/"
target="_blank" rel="noreferrer noopener">
Camp–Firefox :: Übersetzung komplett deaktivieren?</a>
</li>
</ul>
</html>
<html>
<ul>
<li>in das Verzeichnis <code><b>/usr/bin/firefox</b></code> wechseln
</li>
<li>die Versionsnummer ist im File <code><b>platform.ini</b></code><br />
in der Zeile <b>Milestone</b> zu finden.
</li>
</ul>
</html>
<html>
This tutorial explains how to manage PaloAlto users from CLI.
You'll learn about user and role related functionalities including how to create a new user, assign a role to an user, make regular user as an admin user, list all existing users, delete an user, etc.,
<h4>1. Enter PaloAlto CLI Configuration Mode</h4>
First, login to PaloAlto from CLI as shown below using ssh.
<code><pre>
$ ssh admin@192.168.101.200
admin@PA-FW>
</pre></code>
To manage users, go to configure mode as shown below.
<code><pre>
admin@PA-VM> configure
Entering configuration mode
[edit]
admin@PA-VM#
</pre></code>
Note: After you are in the configuration mode, the prompt will change from > to # as shown above.
<h4>2. Create New User</h4>
The following will create a new user called 'ramesh'. You will be prompted to enter a password for this new user.
<code><pre>
# set mgt-config users ramesh password
Enter password :
Confirm password :
</pre></code>
If you want this user to be a admin, make sure to assign appropriate role as explained in the examples below.
Also, only after the user is assigned to the role, you'll see it in the list of users in the UI
On a related note, if you are running an older version of the firewall follow this instruction to upgrade: <a href="https://www.thegeekstuff.com/2020/06/paloalto-panos-upgrade/" target=_blank>5 Steps to Upgrade PaloAlto PAN-OS Firewall Software from CLI or Console</a>
<h4>3. Create New User with a Password Hash</h4>
If you are automating user creation process, you may not want to enter the password interactively.
In that case, specify the password as hash in the command line using phash (password hash) option as shown below:
<code><pre>
set mgt-config users john phash $$12345$da$78jdufadkjJBOMdkais89Bo
</pre></code>
<h4>4. Edit an Existing user to Assign a ReadOnly Role</h4>
Once user is created, assign a role as shown below.
In this example, we are assigning ramesh to superreader role, which will have read-only access to everything.
<code><pre>
set mgt-config users ramesh permissions role-based superreader yes
</pre></code>
Note: If the user is already assigned to another role, the above command will overwrite the previous role assignment and assign the new role to the user.
<h4>5. Edit an existing user ‐ Add public key</h4>
You can also assign a public key to a user from CLI as shown below using public-key option.
Just for simplicity, only partial public-key is shown below.
<code><pre>
set mgt-config users john public-key jMkVBQUFBREFRQUJBQ.....QtMQ==
</pre></code>
<h4>6. Assign Admin Role (SuperUser) to a User</h4>
The following command will make the user as admin. For this, assign the superuser role to an existing user as shown below.
<code><pre>
set mgt-config users ramesh permissions role-based superuser yes
</pre></code>
<h4>7. Assign User to a Password Profile</h4>
If you already have a password profile, you can assign that to a user using the password-profile option as shown below.
<code><pre>
set mgt-config users ramesh password-profile TheGeekStuffProfile
</pre></code>
<h4>8. View Existing Users</h4>
Use the following mgt-config users command to view all existing user.
<code><pre>
# show mgt-config users
users {
admin {
phash $$$12345abcdefghilkWhjuyjjdkj/;
permissions {
role-based {
superuser yes;
}
}
public-key jRMESABCEPRAM.....QaCD==;
}
ramesh {
phash $$$4a1234556mbcdefjJBOMdkais89Bo;
permissions {
role-based {
superuser yes;
}
}
}
}
</pre></code>
<h4>9. Delete an existing User</h4>
To remove an existing user, use the following command. The following will remove user ramesh.
<code><pre>
delete mgt-config users ramesh
</pre></code>
<h4>10. Remove User from a Role</h4>
If you don't want to delete an user, but like to remove the user from a role, use the following command and do not pass any role name.
<code><pre>
set mgt-config users ramesh permissions role-based
</pre></code>
Once you remove a role from an existing user, from the PaloAlto management console, from the browser, you'll not see the user in the list of users.
But from CLI, show mgt-config users will still show this user who don't have a role, as the user is not removed.
<h3>Links:</h3>
<ul>
<li><a href="https://www.thegeekstuff.com/2020/09/paloalto-user-management/" target=_blank>TheGeekStuff :: 10 Examples to Manage PaloAlto Firewall Users from PAN-OS CLI</a></li>
</ul>
</html>
<html>
<ul>
<li>'vorgekommen' in <a href="https://www.krypto-im-advent.de/" target=_blank>Kryptho im Advent 2018</a></li><br />
<li>Verschlüsselungsverfahren, bei dem durch Trans‐<br />
position mittels einer (quadratischen) Schablone<br />
der Klartext einer Nachricht zu einem Geheimtext<br />
verwürfelt wird.</li><br />
<li>Quadratische Schablone,<br />z.B. 6 x 6, also 36 Felder</li><br />
<li>von diesen 36 Feldern werden jetzt 9 Felder ausge‐<br />
schnitten resp. ausgestanzt;<br />
→ der Text wird in die Löcher geschrieben (buch‐<br />
stabenweise)<br />
→ wenn alle Löcher ausgefüllt resp. belegt sind,<br />
dann wird die Schablone um 90° (im Uhrzeiger‐ <br />
sinn) gedreht<br />
→ dies wird solange wiederholt, bis sämtliche Fel‐<br />
der belegt sind</li><br />
<li></li><br />
</ul>
<h3>Links:</h3>
<a href="https://de.wikipedia.org/wiki/Flei%C3%9Fnersche_Schablone" target=_blank>Wikipedia :: Fleissnersche Schablone</a<br />
<a href="https://www.mysterytwisterc3.org/de/" target=_blank>Mystery Twister C3 :: The Crypto Challenge Contest</a>
</html>
<html>
Fold long line files to finite width output device files.<br />
<br />
Command: <code>fold</code><br />
Ex:<code><pre>
fold -b < long_line_file >folded_file
</pre></code>
Now the folded_file will contain output with newlines<br />
inserted after maximum bytes specified. This will be<br />
useful when editing special files. You can do the reverse<br />
using "expand" command.<br />
<br />
This tip generously supported <br />
by: srinu.sasubilli@wipro.com<br />
</html>
<html>
<ul>
<li>a complete lifecycle management tool for physical and virtual servers</li>
<li>Open Source Camp, 14.06.2018, Berlin </li>
<li><a href="https://www.theforeman.org/" target=_blank>Homepage</a></li>
</html>
<html>
<ul>
<li>Container-Technologie als Alternative zu klassischen Virtuellen Ma‐<br />
schinen (VMs) eingesetzt;
</li>
<li>Container müssen ähnlich wie VMs aus unterschiedlichen Gründen<br />
migriert werden, z.B. für den Umzug auf andere Hardware oder <br />
Standorte.
</li>
<li>Methode “<b><em>cold migration</em></b>“:
<ol>
<li>Anhalten des Containers
</li>
<li>alle relevanten Konfigurationen und Daten auf den neuen Host<br />
verschieben
</li>
<li>Container am Zielhost starten
</li>
</ol>
</li>
<li>Methode “<b><em>warm migration</em></b>“:
<ul>
<li>Versuch, ein vollständiges Abbild des Containers zu erzeugen;
</li>
<li>dieses Abbild um-/erfasst u.a. auch den Zustand des Speichers;
</li>
<li>VT:<br />
es können z.B. angefangene Verbindungen zu einem Web-Server<br />
fortgesetzt werden;
</li>
<li>Das Erfassen eines “warmen“ Abbildes wird auch “Checkpoint“<br />
genannt.
</li>
<li>Da ein solcher Checkpoint auch den Speicher eines Containers<br />
umfasst, bietet es sich an, diesen auf mögliche Schadsoftware zu<br />
untersuchen.<br />
⇒ Durch eine auf diese Art durchgeführte forensische Analyse wird<br />
  sichergestellt, dass mögliche Einbrecher die Untersuchung nicht<br />
  bemerken.
</li>
<li>Die Analyse des Speichers erlaubt es, besonders raffinierte<br />
Schadsoftware zu erkennen.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.th-wildau.de/files/Beschaeftigte/Stephan_Rein/Themen-Bachelorarbeit/Speicher-Analyse-Checkpoints.pdf"
target="_blank" rel="noreferrer noopener">
Prof. Dr. Stephan Rein (TH Wildau) :: Forensische Speicher-Analyse mittels Container-Checkpoints</a>
</li>
</ul>
</html>
<html>
For some reason many admins forget the field order of the<br>
crontab file and alway reference the man pages over-and-over.<br>
Make your life easy. Just put the field definitions in<br>
your crontab file and comment (#) the lines out so the<br>
crontab file ignores it.
<pre><code>#minute (0-59),
# | hour (0-23),
# | | day of the month (1-31),
# | | | month of the year (1-12),
# | | | | day of the week (0-6 with 0=Sunday).
# | | | | | commands
0 2 * * 0,4 /etc/cron.d/logchecker</code></pre>
Ich denke, dass ist besser:
<pre><code># m h dom moy dow command
# (0-59)(0-23) (1-31) (1-12) (0-6, 0 :=: Sunday) <em>CMD</em></code></pre>
<h3>Speicherort</h3>
Die entsprechenden Crontab-Dateien befinden sich<br />
im Ordner:
<pre><code>/var/spool/cron/crontabs</code></pre>
Für jeden Nutzer existiert dort eine Datei mit dem<br />
entsprechenden Nutzernamen, in welchem die <br />
Cronjobs hinterlegt sind.<br />
<br />
Das Verzeichnis selbst kann nur von <em>root</em> ge–<br />
lesen werden:<br />
<pre><code>drwx-wx--T 2 root crontab 4096 4. Feb 11:51 crontabs</code></pre>
<h3>Crontab auf Syntax überprüfen</h3>
<ul>
<li>Mit dem Befehl:
<pre><code>sudo crontab -n /var/spool/cron/crontabs/<em>USR-NAME</em></code></pre>
</li>
</ul>
<h3>Der crontab-Editor</h3>
<ul>
<li>Der Editor, den crontab verwendet wird, kann<br />
mit dem Befehl
<pre><code>select-editor</code></pre>
geändert werden;
</li>
</ul>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://crontab.guru/examples.html"
target="_blank" rel="noreferrer noopener">
Crontab‐Guru :: Beispiele</a>
</li>
<li><a href="https://tecadmin.net/crontab-in-linux-with-20-examples-of-cron-schedule/"
target="_blank" rel="noreferrer noopener">
TecAdmin :: Crontab in Linux with 20 examples</a>
</li>
</ul>
</html>
<html>
Formula Debugger aufrufen:</br>
===========================</br>
Help --> Monitor --> Formular Debugger</br>
</html>
<html>
<ul>
<li>von Martin Fowler geprägter Begriff, 2011</li>
<br />
<li>Es besagt, daß sich in spezialisierten Systemland-<br />
schaften auch spezialisierte Datenbanksysteme<br />
verbreiten, die auf spezifische Anwendungsfälle <br />
zugeschnitten sind.</li>
<br />
<li>Die Zeiten, in denen Unternehmen mit einem hohen<br />
Datenaufkommen durchgängig ein relationales Daten-<br />
banksystem als Universallösung nutzen könnten, <br />
wäre damit vorbei.</li>
</ul>
</html>
<html>
<p>
FpML (<b>Financial products Markup Language</b>) is an XML message<br />
standard for the OTC Derivatives industry.<br />
</p>
<p>
All categories of privately negotiated derivatives will eventually be <br />
included within the standard. The standard is managed by ISDA on<br />
behalf of a community of investment banks that make a market in<br />
OTC derivatives.
</p>
<p>
The FpML standard was first published by JP Morgan and Pricewater-<br />
houseCoopers on 9 June 1999 in a paper titled "Introducing FpML: A <br />
New Standard for E-commerce". As a result, the FpML standards <br />
committee was founded.
</p>
<p>
As of June 2015 FpML 5.7 is the latest [Recommendation] version. The<br />
core scope includes the products of the following:<br />
<ul>
<li>Foreign Exchange (FX) Swaps and Options,</li>
<li>Interest Rate Swaps,</li>
<li>Inflation Swaps, </li>
<li>Asset Swaps, </li>
<li>Swaptions, </li>
<li>Credit Default Swaps, </li>
<li>Credit Default Swap Indices, </li>
<li>Credit Default Swap Baskets,</li>
<li>Tranches on Credit Default Swap Indices, </li>
<li>Equity Options,</li>
<li>Equity Swaps,</li>
<li>Total Return Swaps,</li>
</ul>
and many others.<br />
<br />
Im Sept. 2016 wurde die Version 5.9 angekündigt;<br />
<br />
The work on version 5.10 is expected to start in October (2016),<br />
and will focus on reporting, clearing and electronic execution.<br />
<br />
The core processes include trading, valuation, confirmation, novations,<br />
increases, amendments, terminations, allocations, position reporting,<br />
cash flow matching, a formal definition of party roles, as well as trade<br />
notification between asset managers and custodians.<br />
</p>
<p>
FpML is distinct from similar financial standards such as SWIFT and<br />
FIX in scope because it provides no network or specification of a<br />
transport mechanism.
</p>
<h3>Links:</h3>
Wikipedia :: <a href="https://en.wikipedia.org/wiki/FpML" target="_blank">https://en.wikipedia.org/wiki/FpML</a><br />
Spec :: <a href="http://www.fpml.org/spec/coding-scheme/" target="_blank">http://www.fpml.org/spec/coding-scheme/</a><br />
<a href="http://www.stephennimmo.com/getting-started-with-fpml-understanding-the-schemas/" target=_blank>Stephen Nimmo :: Getting started with FpML understanding the schemas</a><br />
<a href="https://www.tracefinancial.com/fpml" target=_blank>TraceFinancial :: FpML - Transformer</a><br />
<a href="https://derivsource.com/2010/05/24/implementing-fpml-opportunities-and-pitfalls/" target=_blank>DerivSource :: Implementing FpML – Opportunities and Pitfalls</a><br />
Toolkit ::
<ul>
<li>SourceCode: <a href="https://sourceforge.net/projects/fpml-toolkit/" target="_blank">https://sourceforge.net/projects/fpml-toolkit/</a></li>
<li>Online-Version: <a href="http://www.handcoded.com/Default.aspx" target="_blank">http://www.handcoded.com/Default.aspx</a></li>
</ul>
</html>
<html>
Das FpML-Schema ist:
<ul>
<li>ist robust</li>
<li>“is huge and can be overwhelming to get started“</li>
</ul>
“Here's a quick list of things that helped<br />
me understand the organization better:“
<ul>
<li><b>There are 4 sets of schemas</b>
<ul><li>confirmation</li><li>recordkeeping</li><li>reporting</li> and<li>transparency</li></ul></li>
<li><b>Think of the structures in two separate ways:</b>
<ul><li>First, there are nouns <br />
(Product Model Framework: http://www.fpml.org/documents/FpML5-products-framework.pdf).
<br /> A trade. A confirmation. </li><li>Second, think about how these nouns are passed around <br />
(Messaging Model Framework: http://www.fpml.org/documents/FpML5-messaging-framework.pdf).</li></ul></li>
<li><b>What are the values supposed to be??</b></li>
</ul>
<h3>Link:</h3>
<a href="http://www.stephennimmo.com/getting-started-with-fpml-understanding-the-schemas/" target=_blank>Stephen Nimmo :: Getting started with FpML understanding the schemas</a>
</html>
<html>
<ul>
<li>franz. Arbeitsgesetz</li>
<br />
<li>regelt auf knapp 4.000 Seiten von Toilettenpausen bis zur Größe<br />
der Bürofenster so ziemlich alles.<br />
</li>
<br />
<li>Folglich ist der Arbeitsmarkt des Landes entsprechend starr und<br />
international nicht konkurrenzfähig.</li>
<h3>Links:</h3>
<ul>
<li>Focus (Zeitschrift ?)</li>
</ul>
</ul>
</html>
<html>
We recently had a problem where a file system had <br />
100% inode usage. Unfortunately there isn't an easy<br />
way to search for directories with a lot of files in them<br />
(1 file = 1 inode). And if the files are small, you can't<br />
rely on du to help you out.<br />
<br />
Here is a find command that will print all the directories<br />
in the current filesystem, with the number of files (inodes)<br />
in that directory.<br />
<br /><code>
find . -xdev -type d -exec /bin/echo -n {} \; -exec sh -c "ls {} | wc -l" \;<br />
</code><br />
<br />
This tip generously supported <br />
by: rickb@cmhcsys.com<br />
</html>
<html>
<ul>
<li>eine Klasse von Machine Learning‐Systemen;</li>
<li>von Ian Goodfellow & Kollegen 2014 entwickelt;</li>
<br />
<li>zwei Neuronale Netze treten gegeneinander an;</li>
<li>GANs learn to create synthetic data similar to some known input data.</li>
<br />
<li>a form of generative model for unsupervised learning</li>
<li>useful for semi-supervised learning, fully supervised learning, and reinforcement learning;</li>
<br />
<li><h4>GAN architecture</h4>
<img src="./pictures/GAN_Architecture.png" height=257 widht=703 /></li>
</ul>
<h2>Links:</h2>
<ul>
<li><a href="https://skymind.ai/wiki/generative-adversarial-network-gan" target=_blank>SkyMind :: GAN</a></li>
<li><a href="https://www.analyticsvidhya.com/blog/2017/06/introductory-generative-adversarial-networks-gans/" target=_blank>Analytics Vidhya :: Introduction GAN</a></li>
<li><a href="https://en.wikipedia.org/wiki/Generative_adversarial_network" target=_blank>Wikipedia :: GAN</a></li>
<li><a href="http://blog.aylien.com/introduction-generative-adversarial-networks-code-tensorflow/" target=_blank>Aylien‐Blog :: Introduction GAN & Tensorflow</a></li>
<li><a href="https://www.oreilly.com/learning/generative-adversarial-networks-for-beginners" target=_blank>O'Reilly :: GAN for beginners</a></li>
<!-- <li><a href="" target=_blank></a></li> -->
</ul>
</html>
<html>
<ul>
<li><h3>Ausschneiden:</h3>
Werkzeuge → Auswahlwerkzeuge → Rechteckige Auswahl (Strg + R)<br />
<br />
Bearbeiten → Kopieren [oder: Ausschneiden]</li>
<li><h3>Bild in anderes Format exportieren:</h3>
Datei → Exportieren</li>
<li><h3>GIMP als CLI aufrufen:</h3>
GIMP ships with a second binary called <b><em>gimp‐console</em></b>. This binary is a<br />
console‐only version and behaves as if gimp was called with the <br />
<b><em>‐‐no‐interface</em></b> command-line option.</li>
<li><h3>GIMP im Batch‐Modus aufrufen:</h3>
<b>‐b, ‐‐batch <command></b><br />
    Execute <command> non-interactively. This option may appear multiple times. The <command> is passed to<br />
    the batch interpreter. When <command> is ‐ the commands are read from standard input.
</li>
<li><h3>Gerade Linie zeichnen:</h3>
<ul>
<li>Position mit Maus markieren (LMT)
</li>
<li>Shift-Taste drücken
</li>
<li>Cursor zur gewünschten Stelle ziehen
</li>
<li>LMT drücken
</li>
</ul>
</li>
<li><h3>Rahmen zeichnen</h3>
<ul>
<li>“Werkzeuge“ <br />
→ “Auswahlwerkzeuge“<br />
→ “Rechteckige Auswahl“<br />
</li>
<li>gewünschten Rahmen zeichnen<br />
</li>
<li>“Bearbeiten“<br />
→ “Auswahl nachziehen“<br />
</li>
</ul>
</li>
<li><h4>Bild heranzoomen</h4>
<ul>
<li>Will man das Bild nur größer sehen, statt es tatsächlich<br />
zu vergrößern, so benutze man die Lupe.
</li>
<li>Alternativ klicke man im Werkzeugkasten auf das Lupen-<br />
Symbol. So kann man ideal Details bearbeiten.
</li>
</ul>
</li>
<!--
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
-->
</ul>
</li>
<li><h3>Text in Bild einfügen</h3>
<ul>
<li>Öffnen Sie in GIMP das Bild, zu dem Sie Text hinzufügen wollen. Das gelingt entweder über "Datei" und "Öffnen" oder durch Drücken der Tastenkombination [Strg] + [O].
</li>
<li>Durch Klicken auf das A-Symbol oder drücken der [T]-Taste öffnen Sie das "Textwerkzeug". Klicken Sie an die Stelle im Bild, an der Sie Text einfügen möchten, und geben Sie Ihren Wunschtext ein.
</li>
<li>Wenn Sie Ihren Text im Anschluss verschieben möchten, wählen Sie das Navigations-Symbol oder drücken [M] auf Ihrer Tastatur, um das "Verschieben-Werkzeug" aufzurufen. Klicken Sie auf Ihren Text. Anschließend können Sie ihn mit der Maus an die passende Stelle bewegen.
</li>
<li>
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>[1] <a href="https://www.digitipps.ch/gimp/linien-und-rahmen-zeichnen-mit-gimp/"
target="_blank" rel="noreferrer noopener">
Digitipps :: Linien und Rahmen zeichnen mit GIMP</a>
</li>
<li>[2] <a href="https://www.computerbild.de/artikel/cb-Tipps-Software-GIMP-Bild-vergroessern-leichtgemacht-31484751.html"
target="_blank" rel="noreferrer noopener">
ComputerBild :: GIMP: Bild vergrößern leichtgemacht</a>
</li>
<li>[3] <a href="https://www.heise.de/tipps-tricks/GIMP-Text-einfuegen-so-geht-s-4402839.html"
target="_blank" rel="noreferrer noopener">
Heise Online :: GIMP: Text einfügen - so geht's </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<li><h3>Bild vergrößern</h3>
<ul>
<li><h4>Bild größer skalieren</h4>
<ol>
<li>Das Bild in GIMP öffnen.
</li>
<li>Man klicke nun im Menü auf “Bild“ und danach<br />
auf “Bild skalieren“.
</li>
<li>In dem sich nun öffnenden Fenster kann man<br />
die Skalierung des Bildes genau festlegen.
</li>
<li>Um die Größeneinheit des Fotos zu ändern, <br />
klicke man auf den Button “px“. Damit lässt <br />
sich die Größenangabe in Zentimetern oder<br />
Zoll umwandeln.
</li>
<li>Man klicke anschließend auf “Skalieren“ und<br />
man speichere das fertige Bild danach ab.
</li>
</ol>
</li>
</html>
<html>
<ul>
<li><b>Befehle: git reflog & git reset</b><br />
Wenn etwas irrtümlicherweise gelöscht oder verschoben <br />
wurde, oder etwas ausprobiert wurde, was dann schief<br />
lief, z.B. ein Merge. Dann kann man mit “git reset“ zu <br />
dem Zeitpunkt zurückgehen, an dem alles noch funktioniert hat.
<code><pre>
<b>git reflog</b>
# you will see a list of every thing you've done in git,
# across all branches!
# each one has an index HEAD@{index}
# find the one before you broke everything
<b>git reset HEAD@{index}</b>
# magic time machine</pre></code></li><br />
<br />
<li><b>Befehl: git commit ‐‐amend</b><br />
This usually happens to me if I commit, then run tests/linters... and FML (“Fuck my life“), I didn't put a space after the equals sign. You could also make the change as a new commit and then do rebase -i in order to squash them both together, but this is about a million times faster.<code><pre>
# make your change
git add . # or add individual files
<b>git commit ‐‐amend</b>
# follow prompts to change or keep the commit message
# now your last commit contains that change!
</pre></code></li><br />
<li><b>Befehl: git commit ‐‐amend</b><br />
Diese Befehlsfolge dient (auch) dazu, die Nachricht,<br />
den Eintrag für den letzten Commit zu ändern:
<code><pre>
<b>git commit --amend</b>
# follow prompts to change the commit message
</pre></code></li><br />
<li><b>Befehle: git branch & git reset HEAD & git checkout</b><br />
Oh shit, I accidentally committed something to master that should have been on a brand new branch!<br />
Note: this doesn't work if you've already pushed to origin, and if you tried other things first, you might need to git reset HEAD@{number} instead of HEAD~. Infinite sadness. Also, many many many people suggested an awesome way to make this shorter that I didn't know myself. Thank you all!
<code><pre>
# create a new branch from the current state of master
<b>git branch some-new-branch-name</b>
# remove the commit from the master branch
<b>git reset HEAD~ --hard</b>
<b>git checkout some-new-branch-name</b>
# your commit lives in this branch now :)</pre></code></li><br />
<li><b>git diff ‐‐staged</b><br />
Man ruft einen “diff“ auf, aber es geschieht nichts …<br />
<br />
Git führt <u>keinen</u> diff auf Files aus, die mittels <code><b>“git add“</b></code><br />
dem Staging-Bereich hinzugefügt worden sind, die aber<br />
die dieses Flag <code><b>“staged“</b></code> nicht haben. (Geht das?)<br />
<br />
Also muss die obige Option "‐‐staged" verwendet werden;<br />
<br />
File under <b><i>???</i></b> <<i>Japanisches Zeichen, Katagana, “tzu“</i>>
(yes, this is a feature, not a bug, but it's baffling and non-obvious the first time it happens to you!)</li>
</ul>
<h3>Links:</h3>
<a href="https://ohshitgit.com/" target=_blank>Oh shit, git!</a>
</html>
<html>
<ul>
<li>Defaultmässig wird ein leeres Verzeichnis von Git ignoriert.<br />
Denn Git kann leere Verzeichnisse nicht pushen. Es kann nur Files<br />
verwalten.</li>
<li>Soll ein leeres Verzeichnis dennoch unter die Verwaltung von Git<br />
gestellt werden, so muss in das entsprechende Verzeichnis das<br />
File <code><pre>.gitkeep</pre></code> angelegt sein.</li>
<li>Das File kann eigentlich heissen wie es will. Es hat sich aber<br />
als Standard eingebürgert, dieses File so zu nennen.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.freecodecamp.org/news/what-is-gitkeep/" target="_blank" rel="noreferrer noopener">FreeCodeCamp :: What is gitkeep?</a></li>
<li><a href="https://www.delftstack.com/de/howto/git/gitkeep-and-gitignore/" target="_blank" rel="noreferrer noopener">Delf Stack :: gitkeep and gitignore</a></li>
<li><a href="https://bitpage.de/leere-ordner-in-git-behalten-mit-gitkeep-datei/" target="_blank" rel="noreferrer noopener">BitPage.de :: Leere Ordner in Git behalten</a></li>
</ul>
</html>
<html>
The Git Log tool allows you to view information about <br />
previous commits that have occurred in a project. <br />
<br />
The simplest version of the log command shows the <br />
commits that lead up to the state of the currently <br />
checked out branch. <br />
<br />
These commits are shown in reverse chronological <br />
order (the most recent commits first).
<h3><A NAME="TOC";>Themenliste:</A></h3>
<ol>
<li><A HREF="#first">Display All Commits </A></li>
<li><A HREF="#second">View n Most Recent Commits</A></li>
<li><A HREF="#third">Filter Commits By Author or Committer</A></li>
<li><A HREF="#fourth">Filter Commits by X Days Ago</A></li>
<li><A HREF="#fifth">Filter Commits by Date Range </A></li>
<li><A HREF="#sixth">View All Diff of Changes for Each Commit </A></li>
<li><A HREF="#seventh">View Summary of Changes for Each Commit </A></li>
<li><A HREF="#eightth">View Just One Line Per Commit </A></li>
<li><A HREF="#nineth">View Commit History in ASCII Graph </A></li>
<li><A HREF="#tenth">Format the Git Log Output </A></li>
</ol>
<h3>1. <A NAME="first";> Display All Commits </A></h3>
You can force the log tool display all commits (regardless <br />
of the branch checked out) by using the ‐‐all option.
<code><pre>
$ git log ‐‐all
commit c36d2103222cfd9ad62f755fee16b3f256f1cb21
Author: Bob Smith <BSmith@example.com>
Date: Tue Mar 25 22:09:26 2014 -0300
Ut sit.
commit 97eda7d2dab729eda23eefdc14336a5644e3c748
Author: John Doe <JDoe@example.com>
Date: Mon Mar 24 10:14:08 2014 -0300
Mollis interdum ullamcorper sociosqu, habitasse arcu magna risus congue dictum arcu, odio.
.
.
.
</pre></code>
<A HREF="#TOC">Zurück</A>
<h3>2. <A NAME="second";>View n Most Recent Commits</A></h3>
The real power of the Git Log tool, however, is in its <br />
diversity. There are many options that not only allow <br />
you to filter commits to almost any granularity you <br />
desire, but to also tailor the format of the output to <br />
you personal needs. <br />
<br />
The most trivial way to filter commits is to limit output <br />
to the 'n' most recently committed ones. This can be<br />
accomplished using the ‐<n> option. Replace <n> with <br />
the number of commits you would like to see. i.e. to see <br />
the 3 most recent commits:
<code><pre>
$ git log -3
commit c36d2103222cfd9ad62f755fee16b3f256f1cb21
Author: Bob Smith <BSmith@example.com>
Date: Tue Mar 25 22:09:26 2014 -0300
Ut sit.
commit 97eda7d2dab729eda23eefdc14336a5644e3c748
Author: John Doe <JDoe@example.com>
Date: Mon Mar 24 10:14:08 2014 -0300
Mollis interdum ullamcorper sociosqu, habitasse arcu magna risus congue dictum arcu, odio.
commit 3ca28cfa2b8ea0d765e808cc565e056a94aceaf5
Author: Bobby Jones <BJones@example.com>
Date: Mon Mar 24 01:52:04 2014 -0300
Fermentum magnis facilisis torquent platea sapien hac, aliquet torquent ad netus risus.
</pre></code>
<A HREF="#TOC">Zurück</A>
<h3>3. <A NAME="third";>Filter Commits By Author or Committer</A></h3>
Another common way to filter commits is by the person <br />
who wrote or committed the changes. This can be done <br />
using the ‐‐author and ‐‐committer options. <br />
The syntax is:
<code><pre>
git log --author=<name>
git log --committer=<name>
</pre></code>
The author option will limit results to commits in which <br />
the changes were written by <name>. The ‐‐committer option, <br />
on the other hand, will limit results to commits that were <br />
committed by that individual. Many times, the author and <br />
committer will be the same person (you would generally <br />
expect this to be the case) but, in the case where a deve‐ <br />
loper submits a patch of their work for approval, the deve‐ <br />
loper may not actually commit the code.
<code><pre>
$ git log --author=Bob
commit c36d2103222cfd9ad62f755fee16b3f256f1cb21
Author: Bob Smith <BSmith@example.com>
Date: Tue Mar 25 22:09:26 2014 -0300
Ut sit.
commit 3ca28cfa2b8ea0d765e808cc565e056a94aceaf5
Author: Bobby Jones <BJones@example.com>
Date: Mon Mar 24 01:52:04 2014 -0300
Fermentum magnis facilisis torquent platea sapien hac, aliquet torquent ad netus risus.
commit cfc101ad280f5b005c8d49c91e849c6c40a1d275
Author: Bob Smith <BSmith@example.com>
Date: Thu Mar 20 10:31:22 2014 -0300
Natoque, turpis per vestibulum neque nibh ullamcorper.
.
.
.
</pre></code>
<b>Note:</b> <br />
Notice how this option matches any commit in which the <br />
<name> we specify is a substring match of the commit's <br />
author (We've found both Bob Smith's and Bobby Jones' <br />
commits).<br />
<A HREF="#TOC">Zurück</A>
<h3>4. <A NAME="fourth";>Filter Commits by X Days Ago</A></h3>
Many times you'll want to limit the commits to those within a <br />
given date range. This can be accomplished using the <b><code>‐‐before</code></b> <br />
and <b><code>‐‐after</code></b> options:
<code><pre>
git log ‐‐before <date>
git log ‐‐after <date>
</pre></code>
The date can be specified as a string with the format: “yyyy-mm-dd“.<br />
Git will also accept Ruby expressions as arguments here, <br />
so you can do things like the following to see commits that<br />
occurred in the last 2 days
<code><pre>
$ git log --after 2.days.ago
commit c36d2103222cfd9ad62f755fee16b3f256f1cb21
Author: Bob Smith <BSmith@example.com>
Date: Tue Mar 25 22:09:26 2014 -0300
Ut sit.
commit 97eda7d2dab729eda23eefdc14336a5644e3c748
Author: John Doe <JDoe@example.com>
Date: Mon Mar 24 10:14:08 2014 -0300
Mollis interdum ullamcorper sociosqu, habitasse arcu magna risus congue dictum arcu, odio.
commit 3ca28cfa2b8ea0d765e808cc565e056a94aceaf5
Author: Bobby Jones <BJones@example.com>
Date: Mon Mar 24 01:52:04 2014 -0300
Fermentum magnis facilisis torquent platea sapien hac, aliquet torquent ad netus risus.
</pre></code>
<A HREF="#TOC">Zurück</A>
<h3>5. <A NAME="fifth";>Filter Commits by Date Range</A></h3>
To specify a date range, use both options:
<code><pre>
git log --after <date-1> --before <date-2>
</pre></code>
To see the commits that occurred on Feb 2nd, 2014:
<code><pre>
$ git log --after "2014-02-01" --before "2014-02-02"
commit 69e1684ae9605544707fc36a7bf37da93dc7b015
Author: Bob Smith <BSmith@example.com>
Date: Sun Feb 2 01:26:00 2014 -0400
Praesent tempus varius vel feugiat mi tempor felis parturient.
</pre></code>
<A HREF="#TOC">Zurück</A>
<h3>6. <A NAME="sixth";>View All Diff of Changes for Each Commit</A></h3>
Options to Modifying format of the output: <br />
To view the entire diff of changes for each commit found, use the <code><b>‐p</b></code> option (think 'p' for patch):
<code><pre>
$ git log -p
commit c36d2103222cfd9ad62f755fee16b3f256f1cb21
Author: Bob Smith <BSmith@example.com>
Date: Tue Mar 25 22:09:26 2014 -0300
Ut sit.
diff --git a/foo.txt b/foo.txt
index 5554f5b..2773ba4 100644
--- a/foo.txt
+++ b/foo.txt
@@ -436,3 +436,4 @@ Fermentum mollis.
Lacus fermentum nonummy purus amet aliquam taciti fusce facilisis magna.
Viverra facilisi curae augue.
Purus ve nunc mi consectetuer cras.
+Ad, maecenas egestas viverra blandit odio.
commit 97eda7d2dab729eda23eefdc14336a5644e3c748
Author: John Doe <JDoe@example.com>
Date: Mon Mar 24 10:14:08 2014 -0300
Mollis interdum ullamcorper sociosqu, habitasse arcu magna risus congue dictum arcu, odio.
diff --git a/foo.txt b/foo.txt
index 9cdef98..5554f5b 100644
--- a/foo.txt
+++ b/foo.txt
@@ -435,3 +435,4 @@ Lacinia et enim suspendisse conubia lacus.
Fermentum mollis.
Lacus fermentum nonummy purus amet aliquam taciti fusce facilisis magna.
Viverra facilisi curae augue.
+Purus ve nunc mi consectetuer cras.
.
.
.
</pre></code>
<A HREF="#TOC">Zurück</A>
<h3>7. <A NAME="seventh";>View Summary of Changes for Each Commit</A></h3>
To view a summary of the changes made in each commit (# of lines added, removed, etc), use the ‐‐stat option:
<code><pre>
$ git log --stat
commit c36d2103222cfd9ad62f755fee16b3f256f1cb21
Author: Bob Smith <BSmith@example.com>
Date: Tue Mar 25 22:09:26 2014 -0300
Ut sit.
foo.txt | 1 +
1 file changed, 1 insertion(+)
commit 97eda7d2dab729eda23eefdc14336a5644e3c748
Author: John Doe <JDoe@example.com>
Date: Mon Mar 24 10:14:08 2014 -0300
Mollis interdum ullamcorper sociosqu, habitasse arcu magna risus congue dictum arcu, odio.
foo.txt | 1 +
1 file changed, 1 insertion(+)
</pre></code>
<A HREF="#TOC">Zurück</A>
<h3>8. <A NAME="eightth";>View Just One Line Per Commit</A></h3>
To just get the bare minimum information in a single line per commit, use the ‐‐oneline option. Each commit will be shown as simply the commit hash followed by the commit message, on a single line:
<code><pre>
$ git log --oneline
c36d210 Ut sit.
97eda7d Mollis interdum ullamcorper sociosqu, habitasse arcu magna risus congue dictum arcu, odio.
3ca28cf Fermentum magnis facilisis torquent platea sapien hac, aliquet torquent ad netus risus.
3a96c1e Proin aenean vestibulum sociosqu vitae platea, odio, nisi habitasse at, in lorem odio varius.
1f0548c Nulla odio feugiat, id, volutpat litora, adipiscing.
cfc101a Natoque, turpis per vestibulum neque nibh ullamcorper.
.
.
.
</pre></code>
<A HREF="#TOC">Zurück</A>
<h3>9. <A NAME="nineth";>View Commit History in ASCII Graph</A></h3>
The Git Log tool can also display the commit history in an ascii art graphical representation with the ‐‐graph option. This option works well when combined with the ‐‐oneline option mentioned above.
<code><pre>
$ git log --graph
* commit c36d2103222cfd9ad62f755fee16b3f256f1cb21
| Author: Bob Smith <BSmith@example.com>
| Date: Tue Mar 25 22:09:26 2014 -0300
|
| Ut sit.
|
* commit 97eda7d2dab729eda23eefdc14336a5644e3c748
| Author: John Doe <JDoe@example.com>
| Date: Mon Mar 24 10:14:08 2014 -0300
|
| Mollis interdum ullamcorper sociosqu, habitasse arcu magna risus congue dictum arcu, odio.
|
* commit 3ca28cfa2b8ea0d765e808cc565e056a94aceaf5
| Author: Bobby Jones <BJones@example.com>
| Date: Mon Mar 24 01:52:04 2014 -0300
|
| Fermentum magnis facilisis torquent platea sapien hac, aliquet torquent ad netus risus.
.
.
.
</pre></code>
<A HREF="#TOC">Zurück</A>
<h3>10. <A NAME="tenth";>Format the Git Log Output</A></h3>
To take complete control over the format of the output, use the ‐‐pretty option. This can be extremely useful if you are using the output of the log tool for further reporting. The syntax of this option is:
<code><pre>
git log --pretty=format:"<options>"
</pre></code>
The <options> are specified in a similar way as formatted strings are in many languages. For example:
<code><pre>
$ git log --pretty=format:"Commit Hash: %H, Author: %aN, Date: %aD"
Commit Hash: c36d2103222cfd9ad62f755fee16b3f256f1cb21, Author: Bob Smith, Date: Tue, 25 Mar 2014 22:09:26 -0300
Commit Hash: 97eda7d2dab729eda23eefdc14336a5644e3c748, Author: John Doe, Date: Mon, 24 Mar 2014 10:14:08 -0300
Commit Hash: 3ca28cfa2b8ea0d765e808cc565e056a94aceaf5, Author: Bobby Jones, Date: Mon, 24 Mar 2014 01:52:04 -0300
Commit Hash: 3a96c1ed29e85f1a119ad39033511413aad616d1, Author: John Doe, Date: Sun, 23 Mar 2014 06:05:49 -0300
Commit Hash: 1f0548cc700988903380b8ca40fd1fecfa50347a, Author: John Doe, Date: Fri, 21 Mar 2014 17:53:49 -0300
.
.
.
</pre></code>
<A HREF="#TOC">Zurück</A><br />
<br />
For a full list of the available formatting options available, see the man page for the Git Log tool, or visit the online documentation here.
<code><pre>
git help log
</pre></code>
The final thing to note is that you can combine these options in almost anyway you see fit. This allows you to not only customize the queries you perform, but also how the results are displayed.<br />
<h3>Link:</h3>
<ul>
<li><a href="https://www.thegeekstuff.com/2014/04/git-log/" target=_blank>The Geek Stuff :: Git-Log-Befehle</a></li>
</ul>
</html>
<html>
One of the most powerful feature of git is its ability to<br />
create and manage branches in the most efficient way.<br />
<br />
<div id="tw-hreftoc">This tutorial explains the following git branch command examples:
<ol>
<li> <a href="#tw-href1">Create a New git Branch</a></li>
<li> <a href="#tw-href2">Delete a Git branch</a></li>
<li> <a href="#tw-href3">Delete remote-tracking branches</a></li>
<li> <a href="#tw-href4">Switch to a New git Branch to Work</a></li>
<li> <a href="#tw-href5">Create a New Branch and Switch Immediately</a></li>
<li> <a href="#tw-href6">Working on a Git Branch (Making Changes)</a></li>
<li> <a href="#tw-href7">View all Local git Branches</a></li>
<li> <a href="#tw-href8">View Remote git Branches</a></li>
<li> <a href="#tw-href9">View Merged and Not-Merged Local Git Branch</a></li>
<li> <a href="#tw-href10">Rename a Git Branch</a></li>
<li> <a href="#tw-href11">Force Rename a Git Branch</a></li>
<li> <a href="#tw-href12">Display Git Branch in Color</a></li>
<li> <a href="#tw-href13">Display Full or Partial SHA1 Git Commit Values</a></li>
<li> <a href="#tw-href14">Create a Branch at a Specific Location</a></li>
<li> <a href="#tw-href15">Display Specific Git Branch Details</a></li>
</ol>
<h3><div id="tw-href1"/>1. Create a New git Branch</h3>
In this example, we have the following three commits on this project so far.
<code><pre>
$ git log --oneline --decorate
37351a0 (HEAD, master) Fixed the bug for title display
df27a49 Added question number
b58503b (origin/master) initial commit
</pre></code>
As you see from the above output, we don't have any branches so far. The first line shows that the default HEAD and master are on the latest commit.
Now, let us see create a new branch using the git branch command as shown below.
In this example, we are creating a new git branch called “dev“
<code><pre>
git branch dev
</pre></code>
After creating the branch, as you see from the following output, the new “dev“ branch is pointing to the same commit as where the HEAD is. i.e the 1st line in the following output.
<code><pre>
$ git log --oneline --decorate
37351a0 (HEAD, master, dev) Fixed the bug for title display
df27a49 Added question number
b58503b (origin/master) initial commit
</pre></code>
If you are new to git, this will give you a jump-start on Linux environment: <a href="https://www.thegeekstuff.com/2011/08/git-install-configure/" target=_blank>Introduction to GIT on Linux Install, Create Project, Commit Files</a><br />
<br />
<a href="#tw-hreftoc">back to TOC</a>
<h3><div id="tw-href2"/>2. Delete a Git branch</h3>
If you've created a git branch by mistake, you can delete it using -d option shown below.
The following example will delete the dev git branch that we just created.
<code><pre>
$ git branch -d dev
Deleted branch dev (was 37351a0).
</pre></code>
In the output, it will also display the commit location where this branch was pointing to before it was deleted.
After the branch is deleted, as you see from the following output, we don't see it anymore.
<code><pre>
$ git log --oneline --decorate
37351a0 (HEAD, master) Fixed the bug for title display
df27a49 Added question number
b58503b (origin/master) initial commit
</pre></code>
You can also delete multiple branches using one git branch -d command as shown below.
<code><pre>
$ git branch -d dev stage prod
Deleted branch dev (was 37351a0).
Deleted branch stage (was df27a49).
Deleted branch prod (was b58503b).
</pre></code>
Please note that -d option will also delete the reflog that are associated with the branch that is deleted.<br />
<br />
Note: You can also use -D option (upper-case D) to delete a branch without worrying about the merged status of the branch. This means that it will delete the given branch even if it doesn't have all the commit from the master branch.<br />
<br />
If you are new to Git, this will help you to get started for Win environment: <a href="https://www.thegeekstuff.com/2012/02/git-for-windows/" target=_blank>How to Install GIT for Windows and Create / Clone Remote Repositories</a>.<br />
<br />
<a href="#tw-hreftoc">back to TOC</a>
<h3><div id="tw-href3"/>3. Delete remote-tracking branches</h3>
When you've checked-out a branch from a remote git repository, you can delete that remote tracking branches using -r option along with -d option.
For example, the following will delete the dev, stage and prod remote-tracking branches.
<code><pre>
git branch -d -r origin/dev origin/stage origin/prod
</pre></code>
Please keep in mind that you'll typically do this when these branches doesn't exist anymore in the remote repository. If these exists in the remote repository, they'll be pulled again during the next fetch.<br />
<br />
<a href="#tw-hreftoc">back to TOC</a>
<h3><div id="tw-href4"/>4. Switch to a New git Branch to Work</h3>
By default when you create a new branch, you'll still be only on whatever branch you were previously working on.
So, after creating a new branch, if you want to switch to it, use the git checkout command as shown below.
<code><pre>
$ git branch dev
$ git checkout dev
Switched to branch 'dev'
</pre></code>
Now if you do git status, you can see what you are currently working on the new dev branch that was just created.
<code><pre>
$ git status
# On branch dev
nothing to commit (working directory clean)
</pre></code>
<br />
<a href="#tw-hreftoc">back to TOC</a>
<h3><div id="tw-href5"/>5. Create a New Branch and Switch Immediately</h3>
Instead of creating a branch and then doing a checkout to switch to it using two commands, you can also combine them into single command.<br />
<br />
When you use -b option in the git checkout, then it will create the specified branch and switch to it immediately.<br />
<br />
As you see below, we just created a branch called 'qa' and checked it out immediately.
<code><pre>
$ git checkout -b qa
Switched to a new branch 'qa'
</pre></code>
The git status show that we are currently working on the newly created qa branch.
<code><pre>
$ git status
# On branch qa
nothing to commit (working directory clean)
</pre></code>
The above git checkout -b qa command is equivalent to the following two commands.
<code><pre>
git branch qa
git checkout qa
</pre></code>
Now we have both qa and dev branch pointing to the latest commit as shown below.
<code><pre>
$ git log --oneline --decorate
37351a0 (HEAD, qa, master, dev) Fixed the bug for title display
df27a49 Added question number
b58503b (origin/master) initial commit
</pre></code>
Git log command is used to view the commit logs as explained in details here: <a href="https://www.thegeekstuff.com/2014/04/git-log/" target=_blank>10 Essential Git Log Command Examples on Linux to View Commits</a>.<br />
<br />
<a href="#tw-hreftoc">back to TOC</a>
<h3><div id="tw-href6"/>6. Working on a Git Branch (Making Changes)</h3>
So far, we have two git branches created: dev and qa.<br />
<br />
Let us go-ahead and work on qa branch. Modify a file and commit it to qa branch.<br />
<br />
In this example, we modified the contact.html file, and committing it to the qa branch
<code><pre>
$ git checkout qa
$ vi contact.html
$ git add contact.html
$ git commit -m "Changed the contact info"
[qa fea5edd] Changed the contact info
1 files changed, 1 insertions(+), 1 deletions(-)
</pre></code>
When we did the commit, as shown in 1st line of the above output,<br />
it also shows which branch it is committing to along with the commit<br />
value.<br />
<br />
As we see from the git log, we have a new commit, and only qa<br />
branch is pointing there. dev branch is still in the previous commit.<br />
Our HEAD is pointing to qa branch, as that is where were are<br />
currently working.
<code><pre>
$ git log --oneline --decorate
fea5edd (HEAD, qa) Changed the contact info
37351a0 (master, dev) Fixed the bug for title display
df27a49 Added question number
b58503b (origin/master) initial commit
</pre></code>
<br />
<a href="#tw-hreftoc">back to TOC</a>
<h3><div id="tw-href7"/>7. View all Local git Branches</h3>
The following command will display all available local git branches.
<code><pre>
$ git branch
dev
master
* qa
</pre></code>
As we see from the above output, we currently have three branches. <br />
A star * in front of the branch name indicates that is our current wor‐<br />
king branch.<br />
<br />
When we use -v option along with git branch, it will display few additional<br />
information about the branch.
<code><pre>
$ git branch -v
dev 37351a0 Fixed the bug for title display
master 37351a0 Fixed the bug for title display
* qa fea5edd Changed the contact info
</pre></code>
In the above output, we also see the sha1 commit value, and the commit <br />
subject line of the corresponding git branches.<br />
<br />
<a href="#tw-hreftoc">back to TOC</a>
<h3><div id="tw-href8"/>8. View Remote git Branches</h3>
Use the -r option to display all remote-tracking git branches. The following displays the remote tracking git branches only.
<code><pre>
$ git branch -r
origin/master
</pre></code>
When we use -a option, it will display both local and remote-tracking git branches as shown below.
<code><pre>
$ git branch -a
dev
master
* qa
remotes/origin/master
</pre></code>
As you see from the above output, to differentiate between the local and remote, it will have “remotes“ keyword in front of the remote git branch.<br />
<br />
<a href="#tw-hreftoc">back to TOC</a>
<h3><div id="tw-href9"/>9. View Merged and Not-Merged Local Git Branch</h3>
Use the --merged option which will display all the branches that are already merged.
<code><pre>
$ git branch --merged
dev
master
* qa
</pre></code>
Use the --no-merged option which will display all the branches that are not merged yet.
<code><pre>
git branch --no-merged
</pre></code>
<br />
<a href="#tw-hreftoc">back to TOC</a>
<h3><div id="tw-href10"/>10. Rename a Git Branch</h3>
Use the git branch -m option to rename a branch.<br />
<br />
The following example will rename the dev branch to “development“<br />
<code><pre>
git branch -m dev development
</pre></code>
As you see from the following, the git branch is renamed properly.
<code><pre>
$ git branch
development
master
* qa
</pre></code>
Please keep in mind that if the “dev“ branch has a reflog, it will also be renamed. But, a new reflog will be created to indicate that the branch is renamed.<br />
<br />
<a href="#tw-hreftoc">back to TOC</a>
<h3><div id="tw-href11"/>11. Force Rename a Git Branch</h3>
In the following example, we've created two new branches: 1) hotfix and 2) bug-1099
<code><pre>
git branch hotfix
git branch bug-1099
</code></pre>
The following displays all of our current local branches.
<code><pre>
$ git branch
bug-1099
development
hotfix
master
* qa
</code></pre>
When I tried to rename a branch to a branch name that already exists, we'll get the following error message.
<code><pre>
$ git branch -m bug-1099 hotfix
fatal: A branch named 'hotfix' already exists.
</code></pre>
The rename didn't happen as we still see both “bug-1099“ and “hotfix“ branch.
<code><pre>
$ git log --oneline --decorate
fea5edd (HEAD, qa, hotfix, bug-1099) Changed the contact info
37351a0 (master, development) Fixed the bug for title display
df27a49 Added question number
b58503b (origin/master) initial commit
</code></pre>
To forcefully rename a branch, use -M (upper-case M) option as shown below.
<code><pre>
git branch -M bug-1099 hotfix
</code></pre>
Now, we don't see bug-1099 anymore, as it is renamed to the existing hotfix branch.
<code><pre>
$ git branch
development
hotfix
master
* qa
</code></pre>
The following is the git log output of the same.
<code><pre>
$ git log --oneline --decorate
fea5edd (HEAD, qa, hotfix) Changed the contact info
37351a0 (master, development) Fixed the bug for title display
df27a49 Added question number
b58503b (origin/master) initial commit
</code></pre>
<br />
<a href="#tw-hreftoc">back to TOC</a>
<h3><div id="tw-href12"/>12. Display Git Branch in Color</h3>
When you view the branches using color option in the git branch command, it will be shown in appropriate color to distinguish between current branch, local branch and remote branches. They'll all be in different colors as shown below.
<code><pre>
git branch -a --color
</code></pre>
<img src="./pictures/git-branch-color.png" width=215 height=109 title="Git Branch Color" /><br />
<br />
If you don't want to display the color, you can turn it off using --color=never option.
<code><pre>
git branch -a --color=never
</code></pre>
The possible values for ‐‐color parameters are: always, never, auto. The default is always.<br />
<br />
You can also specify --no-color option as shown below. Even if you have set the git configuration files to show the color always, this will turn it off. Both of the following commands are exactly the same.
<code><pre>
git branch -a --no-color
git branch -a --color=never
</code></pre>
<br />
<a href="#tw-hreftoc">back to TOC</a>
<h3><div id="tw-href13"/>13. Display Full or Partial SHA1 Git Commit Values</h3>
By default, when you use git branch -v option, it will display the first 7 character of the sha1 commit value for the branch as shown below.
<code><pre>
$ git branch -v
development 37351a0 Fixed the bug for title display
hotfix fea5edd Changed the contact info
master 37351a0 Fixed the bug for title display
* qa fea5edd Changed the contact info
</code></pre>
You can change this behavior and specify how many characters do you want to see for the sha1 value. The minimum you can go is 4. If you specify a value less than 2, it will still display 4 characters minimum as shown below.
<code><pre>
$ git branch -v --abbrev=2
development 3735 Fixed the bug for title display
hotfix fea5 Changed the contact info
master 3735 Fixed the bug for title display
* qa fea5 Changed the contact info
</code></pre>
If you want to display the full SHA1 value, then use --no-abbrev as shown below.
<code><pre>
$ git branch -v --no-abbrev
development 37351a077c826de7af6638b592c8efcad8cbc94e Fixed the bug for title display
hotfix fea5edd0b76c61744839f179f953778d8a7a6def Changed the contact info
master 37351a077c826de7af6638b592c8efcad8cbc94e Fixed the bug for title display
* qa fea5edd0b76c61744839f179f953778d8a7a6def Changed the contact info
</code></pre>
<br />
<a href="#tw-hreftoc">back to TOC</a>
<h3><div id="tw-href14"/>14. Create a Branch at a Specific Location</h3>
By default when you create a new branch, it will<br />
create the new branch at where the current HEAD<br />
is pointing.<br />
<br />
But, you can change this behavior and create branch<br />
at a different location.<br />
<br />
In this example, currently the HEAD, qa and hotfix<br />
branch is pointing to the latest commit. i.e fea5edd.
<code><pre>
$ git log --oneline --decorate
fea5edd (HEAD, qa, hotfix) Changed the contact info
37351a0 (master, issue1099, development) Fixed the bug for title display
df27a49 Added question number
b58503b (origin/master) initial commit
</code></pre>
The following example will create a new branch issue2000 pointing to a different commit than the latest commit. i.e Here we are specifying that this should create this new branch at the specified commit sha1 number df27a49.
<code><pre>
git branch issue2000 df27a49
</code></pre>
As you see below, the new branch is created at the specified location, instead of the default HEAD location.
<code><pre>
$ git log --oneline --decorate
fea5edd (HEAD, qa, hotfix) Changed the contact info
37351a0 (master, issue1099, development) Fixed the bug for title display
df27a49 (issue2000) Added question number
b58503b (origin/master) initial commit
</code></pre>
<br />
<a href="#tw-hreftoc">back to TOC</a>
<h3><div id="tw-href15"/>15. Display Specific Git Branch Details</h3>
You can also use --contains option and display only specific branch.<br />
<br />
In the following example, we have several local branches.
<code><pre>
$ git branch -v
development 37351a0 Fixed the bug for title display
* hotfix fea5edd Changed the contact info
issue1099 37351a0 Fixed the bug for title display
issue2000 df27a49 Added question number
master 37351a0 Fixed the bug for title display
qa fea5edd Changed the contact info
</code></pre>
Here we are using the --contains option and searching for only the specified branch name (i.e qa). But, here this is also displaying hotfix branch, because hotfix's tip commit is a descendant of qa branch.
<code><pre>
$ git branch -v --contains qa
* hotfix fea5edd Changed the contact info
qa fea5edd Changed the contact info
</code></pre>
When you specify invalid branch name, or if you specify a partial branch name, you'll get the following malformed object error message.
<pre><code>
$ git branch -v --contains dev
error: malformed object name dev
</code></pre>
<br />
<a href="#tw-hreftoc">back to TOC</a><br />
<h3>Link:</h3>
<ul>
<li><a href="https://www.thegeekstuff.com/2017/06/git-branch/" target=_blank>The Geek Stuff :: Git ‐ Branch examples</a></li>
</ul>
</html>
<html>
<table border="1">
<tr><th>Kommando </th><th><b>Funktion</b></th></tr>
<tr><td><center><b>git init</b></center></td><td>Leeres Repository anlegen oder initialisieren</td></tr>
<tr><td><center><b>git add</b></center></td><td>Dateien zur <i>Staging Area</i> hinzufügen<br />
(Basis für ein Commit)<br />
Dabei werden Files im Verzeichnis .git/objects angelegt;<br />
→ der Verzeichnisname ist der Präfix für den SHA1‐Wert<br />
→ der Rest des SHA1‐Strings ist in dem Verzeichnis des<br />
SHA1‐Präfixes als Filenamen zu finden</td></tr>
<tr><td><center><b>git commit</b></center></td><td>Versionen aus der <i>Staging Area</i> ins Projektarchiv über‐<br />
nehmen;<br />
am besten in der Form git commit ‐m <Msg> eingeben<br />
→ es werden zwei weitere Objekte in das Verzeichnis<br />
.git/objects angelegt</td></tr>
<tr><td><center><b>git status</b></center></td><td>Status der Dateien im Arbeitsverzeichnis abfragen</td></tr>
<tr><td><center><b>git log</b></center></td><td>Die History anzeigen</td></tr>
</table>
<ul>
<li>das Paket “git“ und weitere am 25.08.2018 installiert;</li>
<br />
<li><h3>Initialisierung Repository "FU_Kurs-01618_OOP":</h3>
<code><pre><i>mueller@Debian-Laptop:~/programming/java/FU_Kurs-01618_OOP$</i> <b>git init FU_Kurs-01618_OOP</b>
Initialisierte leeres Git-Repository in /home/mueller/programming/java/FU_Kurs-01618_OOP/FU_Kurs-01618_OOP/.git/
</pre></code>
⇒ “falscher“ Ort, hätte eine Ebene höher sein müssen;<br />
es wurde ein Unterverzeichnis mit dem angegebenen Namen erstellt;<br />
<br />
<b>Aufruf-Optionen:</b>
<table>
<tr><td><code><b>git init</b></code> </td><td> ohne Parameter;<br />
im aktuellen Verzeichnis wird das Repository (Unterverzeichnis <code>.git</code>) erstellt;</td></tr>
<tr><td><code><b>git init <i>Repo-Name</i></b></code> </td> <td> mit Angabe des Repository-Namen;<br />
es wird ein Unterverzeichnis mit dem Namen <i>Repo-Namen</i> angelegt;<br />
in diesem Unterverzeichnis gibt es das Repository; </td></tr>
</table>
</li>
<li><h3>Ein “gestagedes“ File aus der Cache-Area löschen:</h3>
zuerst in das entsprechende Projektverzeichnis wechseln, z.B<br />
<code><pre>cd FU_Kurs-01618_OOP</pre></code>, dann
<code><pre><b>git rm --cached versuch.java </b></pre></code>
Damit ist die Datei aus der Staging Area entfernt, aber die Arbeitsversion existiert noch;</li>
<li><h3>Ein komplettes (lokales) Repostory löschen:</h3>
Löschen des (hidden) Verzeichnis <code><b>.git</b></code></li>
</ul>
</html>
<html>
<h2>git cherry-pick - Kirschenpflücken</h2>
Experimente oder neue Funktionalitäten bearbeitet man normalerweise auf <br />
einem eigenen Branch, einem sogenannten <b>Feature Branch</b>. Ist die Arbeit <br />
dort abgeschlossen, so kann ein einzelner Commit herausgepickt und in einen </br />
anderen Zweig, z. B. den Master Branch, übertragen werden. Der Befehl dafür <br />
lautet dann <code><pre>git cherry-pick <Hashwert></pre></code>, wobei der jeweilige Hashwert <br />
des Commit, der in den aktuellen Branch überführt werden soll, mit angegeben<br />
werden muss. Nach solchen Aktionen kann ein Feature Branch normalerweise<br />
verworfen werden.
<h3>Link:</h3>
<a href="https://www.ordix.de/48-ordix-news/ordix-news-titelthema/403-git-kommandos-fuer-fortgeschrittene-hinterm-horizont-geht-s-weiter.html" target="_blank">Ordix-News :: Git-Kommandos für Fortgeschrittene</a>
</html>
<html>
<h2>git rebase - Geschichte neu schreiben</h2>
Um die Änderungen aus einem Branch in einen anderen zu übernehmen,<br />
gibt es neben dem Befehl <b><code>merge</code></b> eine zweite Variante, das sogenannte <b><code>rebase</code></b>.<br />
<br />
Das Kommando <b><code>rebase</code></b> ist sehr mächtig und man könnte alleine damit <br />
einige Seiten dieser Zeitschrift füllen. Dennoch soll der Sachverhalt an <br />
einem Beispiel kurz dargestellt werden.<br />
<br />
Ein Feature Branch wurde vom Master abgezweigt und auf diesem wurden <br />
einige Commits erzeugt. Anschließend sollen die Änderungen, die inzwischen<br />
auf dem Master durgeführt wurden, nachgezogen werden. Dies erfolgt mithilfe<br />
des Befehls <b><code>git rebase master</code></b>. Dieser nimmt die eigenen Änderungen<br />
vom Branch herunter, pflegt dann die neuen Punkte aus dem Master Branch<br />
ein und packt die eigenen Änderungen wieder obenauf.<br />
<br />
Eventuelle Konflikte können in einem interaktiven Modus behoben werden.<br />
Nach dem Beheben von Konflikten kann der Befehl <b><code>rebase</code></b> mit <br />
<b><code>git rebase --continue </code></b>fortgeführt werden.
<h3>Link:</h3>
<a href="https://www.ordix.de/48-ordix-news/ordix-news-titelthema/403-git-kommandos-fuer-fortgeschrittene-hinterm-horizont-geht-s-weiter.html" target="_blank">Ordix-News :: Git-Kommandos für Fortgeschrittene</a>
</html>
<html>
<h2>git reset - Für immer gelöscht</h2>
Mit dem Befehl <code>git reset</code> lässt man einen Branch, ähnlich wie<br />
bei <code>git revert</code>, auf einen älteren Stand zurückfallen. Allerdings<br />
mit dem Unterschied, dass hier alle übergebenen Dateien nach<br />
der ausgewählten Übergabe unwiderruflich gelöscht und aus<br />
der Historie entfernt werden. <br />
<br />Ein Beispiel: <br />
Das Kommando <code>git reset HEAD~3</code> geht 3 Übergaben zurück<br />
und löscht alle nachfolgenden.<br />
<br />
Außerdem können mit dem Befehl weitere sehr nützliche Aktionen<br />
durchgeführt werden. <br />
<br />
Mit <code>git reset</code> werden alle Dateien aus dem Index gelöscht, <br />
aber die Arbeitskopie bleibt unangetastet.<br />
<br />
<code>git reset --hard</code> setzt hingegen nicht nur den Index zurück, <br />
sondern auch den Workspace in den Status des letzten Commit.<br />
<br />
Dieser Befehl sollte nur sehr sparsam und nur auf lokalen Branches<br />
angewendet werden. Schiebt man einen mit reset bearbeiteten Branch<br />
in das Remote Repository, so kann dies schon mal zu größeren Pro–<br />
blemen bei anderen Entwicklern führen.
<h3>Link:</h3>
<a href="https://www.ordix.de/48-ordix-news/ordix-news-titelthema/403-git-kommandos-fuer-fortgeschrittene-hinterm-horizont-geht-s-weiter.html" target="_blank">Ordix-News :: Git-Kommandos für Fortgeschrittene</a>
</html>
<html>
<h2>git revert - Kommando zurück</h2>
Stellen wir uns vor, dass ein neues Feature entwickelt und anschließend<br />
übergeben wurde. Was, wenn sich in den finalen Tests herausstellt, dass<br />
alles doch nicht so funktioniert, wie es sollte? Für diesen Fall gibt es das <br />
Kommando <b><code>git revert</code></b>.<br />
<br />
Es lässt den aktuellen Branch auf einen älteren Stand zurückfallen und <br />
schreibt für den „neuen“ Stand einen eigenen Commit. So wird die Histo–<br />
rie erweitert und nicht in ihr herumgelöscht. <br />
<br />
Ein Beispiel: <br />
Das Kommando <b><code>git revert HEAD</code></b> macht den letzten Commit<br />
rückgängig und kennzeichnet dies auch mit dem Schlüsselwort <br />
„Revert“ in der Commit-Message.
<h3>Lern-Test am 2019-07-15:: </h3>
<ul>
<li>File: Testfile.txt</li>
<li>5 Eingaben, jeweils gestaged & committed<br />
git_revert_01.png<br />
git_revert_02.png</li>
<br />
<li>der letzte, der 5.te Eintrag is fehlerhaft, wird<br />
nicht gebraucht<br />
⇒ <code><b>git revert HEAD</b></code><br />
git_revert_03.png<br />
git_revert_04.png</li>
<br />
<li>der zweite Eintrag stellt sich als fehlerhaft raus, <br />
und soll entfernt werden<br />
⇒ <code><b>git revert <i>SHA-1-Wert_des_entsprechenden_Commits</i></b></code><br />
git_revert_05.png<br />
git_revert_06.png<br />
⇒ dann <code><b>git status → git add → git commit</b></code></li>
<br />
</ul>
<h3>Link:</h3>
<a href="https://www.ordix.de/48-ordix-news/ordix-news-titelthema/403-git-kommandos-fuer-fortgeschrittene-hinterm-horizont-geht-s-weiter.html" target="_blank">Ordix-News :: Git-Kommandos für Fortgeschrittene</a>
</html>
<html>
<ul>
<li>Details zu einen Commit anzeigen lassen:
<code><pre>git show <em><SHA1‐String></em>
</pre></code></li>
</ul>
</html>
<html>
<h2>git stash - Ab ins Lager</h2>
Stash bedeutet so viel wie „Lager“ oder „Versteck“ und meint nichts anderes, <br />
als einen Stack mit ungesicherten Dateien. <br />
<br />Arbeitet man gerade in einem Branch und muss seine Arbeit wegen eines <br />
dringenden Fehlers unterbrechen, so fügt man alle geänderten Dateien<br />
zum Index hinzu und führt danach ein <b><code>git stash</code></b> aus. Dadurch werden <br />
alle auf dem Index befindlichen Dateien in den Stash geschrieben und der<br />
Index geleert. Nun können der Fehler gefixt und die dafür erforderlichen <br />
Dateien übergeben werden. Anschließend werden die auf dem Stash <br />
befindlichen Änderungen per <b><code>git stash apply</code></b> oder <b><code>git stash pop</code></b> <br />
wieder in den Branch zurückgeholt und die Arbeit kann weitergehen.<br />
<br />
Es können sogar mehrere Stapel angelegt und mit Namen versehen werden. <br />
Der Befehlt <b><code>git stash list</code></b> gibt z. B. eine Liste mit allen Stapeln aus. Mit <br />
<b><code>git stash clear</code></b> wird der Stapel gelöscht.
<h3>Link:</h3>
<a href="https://www.ordix.de/48-ordix-news/ordix-news-titelthema/403-git-kommandos-fuer-fortgeschrittene-hinterm-horizont-geht-s-weiter.html" target="_blank">Ordix-News :: Git-Kommandos für Fortgeschrittene</a>
</html>
<html>
<a target="popup" onclick="window.open
('', 'popup', 'width=800,height=600,scrollbars=no, toolbar=no,status=no,
resizable=yes,menubar=no,location=no,directories=no,top=10,left=10')
"href="pictures/Git-Cheat-Sheet.png">Git-Cheat-Sheet</a>
</html>
<html>
<h2>.gitignore - Ignorieren leicht gemacht </h2>
Nicht jede Datei oder jedes Verzeichnis soll auch versioniert werden. <br />
Dazu gehören z. B. temporäre oder kompilierte Dateien oder eben <br />
ganze Verzeichnisse, in denen sich solche Dateien befinden.<br />
<br />
Ähnlich wie bei anderen Werkzeugen (CVS, SVN) gibt es auch hier <br />
die Möglichkeit, Ignore-Dateien für diesen Zweck anzulegen. Diese<br />
heißen <b><code>.gitignore</code></b> und beinhalten eine Liste von Datei– und Ver–<br />
zeichnisnamen, die beim Commit <b>nicht</b> berücksichtigt werden. Diese<br />
Dateien sind reine Textdateien, die auch Pattern enthalten können.<br />
<br />
Will man unbedingt ein File unter Versionskontrolle bringen, was Git <br />
durch einen Eintrag in <code><b>.gitignore</b></code> verweigern würde, so ist dieses <br />
File im File <code><b>.gitignore</b></code> nach dem angegebenen Ausschlußpattern<br />
mit einem Ausrufezeichen zu markieren:<br />
<b>Beispiel:</b><br />
<code><pre>
<b>*.bak</b> <i># alle Files mit der Endung </i><b>.bak</b><i> werden von Git ignoriert;</i>
<b>!hello.bak</b> <i># das File </i><b>hello.bak</b><i> ist davon ausgenommen;</i>
</pre></code>
Zu beachten ist, dieses File ist wie jedes andere File auch und muß<br />
daher auch unter die Überwachung von Git gebracht werden (<code><b>git <br />
add</b></code> und <code><b>git commit</b></code>).<br />
<br />
Es ist möglich, in jedes (Unter-)Verzeichnis ein eigenes .gitignore-File<br />
anzulegen, was aber nicht zu empfehlen ist, da man leicht den Über‐<br />
blick verlieren kann.
<h3>Link:</h3>
<a href="https://www.ordix.de/48-ordix-news/ordix-news-titelthema/403-git-kommandos-fuer-fortgeschrittene-hinterm-horizont-geht-s-weiter.html" target="_blank">Ordix-News :: Git-Kommandos für Fortgeschrittene</a><br />
Reuven Lerner :: Git-Course, Video 16<br />
</html>
<html>
<h3>Tool “Sourcetree“</h3>
<ul>
<li>GUI für das Arbeiten mit Git und Mercurial;</li>
<li>Versionen für Windows und Mac</li>
<li>von Altlassian programmiert</li>
<li>es zeigt die wichtigsten Befehle in einer einfachen <br />
Oberfläche an, sodass für diese Funktionen eine <br />
Bedienung von der Kommandozeile aus nicht not‐<br />
wendig ist. </li>
</ul>
<h3>Alternativen: </h3>
<ul>
<li>tig</li>
<li>gitg</li>
<li>gitk</li>
<li>GitKraken</li>
</ul>
<h3></h3>
<ul>
<li><a href="https://www.youtube.com/watch?v=EfU4o7U_xAk" target=_blank>Johannes Schiel :: #1 Einfach GIT nutzen mit SourceTree ohne die böse Console! [Tutorial] (YouTube)</a></li>
<li><a href="https://robinsvahn.wordpress.com/2017/04/03/git-flow-einfach-gemacht-sourcetree/" target=_blank>Robin Svahn :: IT‐Blog - Git Flow einfach gemacht (SourceTree) </a></li>
<li><a href="https://www.youtube.com/watch?v=FIabco-p_nY" target=_blank>Awais Mirza :: How to Use Sourcetree for Git Version Control System (YouTube)</a></li>
<li><a href="https://www.youtube.com/watch?v=UD7PV8auGLg" target=_blank>Virtual Play :: Getting started with Git using SourceTree - Part 1: Version control (YouTube)</a></li>
<li><a href="https://alternativeto.net/software/sourcetree/?platform=linux" target=_blank>AlternativeTo :: Sourcetree</a></li>
</ul>
</html>
<html>
<h3>Benötigte Befehle:</h3>
<ul>
<li><h3>git fork</h3></li>
<br />
<li><h3>git clone</h3></li>
<br />
<li><h3>git remote</h3></li>
<br />
<li><h3>git fetch</h3>
<ul>
<li>it fetches all the changes from the remote and stores<br />
it in your local but doesn't merge those changes locally;</li>
<li>it helps to see the updated content in the remote;</li>
<li>it won't merge it to the local branch you're working on<br />
→ <code><b>git fetch</b></code> will never change your working state (i.e.<br />
you can fetch multiple times and it won't change or up‐<br />
date any content in your working branch);</li>
<li>it downloads all the latest commits from all branches and<br />
all the new branches from remote;</li>
<li>to view the (latest) change made in the remote:
<code><pre>git checkout origin/<em><branch‐name></em></pre></code>
With this command you are basically checking out to<br />
the local branch that git has created to store all the<br />
latest changes from remote;</li>
<li>to view the updated commits from the remote use:
<code><pre>git log</pre></code></li>
<li>one of the main use‐cases of <code><b>git fetch</b></code> is to see<br />
the changes <u><em><b>before</b></em></u> merging the current branch.<br />
You're always able to understand changes and <br />
it will be easy to resole conflicts beforehand;</li>
<li>to show the difference between the local changes<br />
and the remote changes of the branch:
<code><pre>git diff develop origin/develop</pre></code></li>
<li>To show only the files changed:
<code><pre>git diff develop origin/develop ‐stat</pre></code></li>
<li>To show all the commits from origin/develop but that<br />
are <b><em><u>not</u></em></b> present in the develop branch:
<code><pre>git log develop..origin/develop</pre></code>
In this way you know how many new commits are added<br />
to the remote develop branch that is not present in the<br />
local branch.</li>
<li>To see all commits from develop (<em>local</em>) but commits<br />
that are <b><em><u>not</u></em></b> present in the original develop (<em>remote</em>):
<code><pre>git log origin/develop..develop</pre></code>
</li>
<li><b>Don't forget to <code><b>git fetch</b></code> prior!</b></li>
<!--
<li></li>
<li></li>
<li></li>
-->
</ul>
</li>
<br />
<li><h3>git merge</h3></li>
<br />
<li><h3>git pull</h3></li>
</ul>
<h3>Link:</h3>
<ul>
<li><a href="https://philna.sh/blog/2018/08/21/git-commands-to-keep-a-fork-up-to-date/" target="_blank" rel="noreferrer noopener">
Phil Nash :: Git commands to keep a fork up to date</a></li>
<li><a href="https://levelup.gitconnected.com/how-to-use-git-fetch-and-git-pull-effectively-c6a4becfbc16" target="_blank" rel="noreferrer noopener">
GitConnected :: Useful tricks about git fetch and git pull</a></li>
</html>
<html>
The intuitive, fast, and beautiful cross-platform Git client. <br />
Created by Axosoft <br />
<h3>Konfiguration</h3>
<ul>
<li><b>Problem:</b> GUI ist im Fullscreen-Modus (durch Auswahl von “<code><b>Toggle screen</b></code>“) :: <br />
<ul>
<li> Tastenkombination <code><b>Ctrl + Shift + f</b></code> drücken</li>
<li> alternativ :: <br />
Im File “<code><b>~/.gitkraken/config</b></code>“ :: <br />
<code><b>windowSettings/fullScreen</b></code> auf <b>false</b> setzen;</li>
</ul>
</ul>
<h3>Tipps (AxoSoft)</h3>
<ol>
<li>If you want to see just the commits for a specific branch, <br />
use the <b>soloing function</b>.</li>
<li>Use GitKraken's fuzzy finder to quickly open a repo, <br />
view file history, and more. </li>
<li>Pull any branch, even if it isn't checked out. Just select “Pull“<br />
in the branch actions context menu (you can also push the<br />
branch the same way). </li>
<li>Resize the commit graph to optimize space for repos with<br />
many branches, even down to a single column. </li>
<li>Scale the UI to your liking with <code><b>Ctrl + +/- </b></code>, the<br />
zoom selector, or the fuzzy finder. </li>
<li>Forgot something in your previous commit's message? Amend<br />
it by clicking the message in the right panel. </li>
<li>Drag-and-drop one remote onto another to quickly create <br />
a PR without leaving GitKraken. </li>
<li>Select multiple commits in the graph and easily squash <br />
them with 1-click. Use undo to reset if necessary. </li>
<li>Use the fuzzy finder (<code><b>Ctrl + P</b></code>) to quickly switch repos <br />
without leaving the keyboard. </li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://www.gitkraken.com/" target=_blank>GitKraken :: Hompage</a></li>
<li><a href="https://blog.axosoft.com/gitkraken-tips/" target=_blank>AxoSoft :: GitKraken ‐ Tipps</a></li>
<li><a href="https://blog.axosoft.com/learning-git-with-gui/" target=_blank>AxoSoft :: Learning Git with GUI</a></li>
<li><a href="https://www.youtube.com/watch?v=jPUew3gPoXw" target=_blank>How to Get Started with GitKraken</a></li>
<li><a href="https://stackoverflow.com/questions/44543089/gitkraken-how-to-exit-fullscreen-mode" target=_blank>StackOverflow :: How to exit fullscreen mode</a></li>
</ul>
</html>
<html>
<h3>Command line instructions</h3>
You can also upload existing files from your computer using the instructions below.<br />
<br />
<b>Git global setup</b>
<br />
… auf dem eigenen Rechner / Laptop
<ul>
<li><code><b>git config --global user.name "Jens Mueller"</b></code></li>
<li><code><b>git config --global user.email "j-a-mueller@alice-dsl.net"</b></code></li>
</ul>
<b>Create a new repository</b>
<br />
… auf dem eigenen Rechner / Laptop, <br />
auf GitLab existiert bereits das (gewünschte) Repository
<ul>
<li><code><b>git clone https://gitlab.com/mcMoneySack/TiddlyWikiFile.git</b></code></li>
<li><code><b>cd TiddlyWikiFile</b></code></li>
<li><code><b>touch README.md</b></code></li>
<li><code><b>git add README.md</b></code></li>
<li><code><b>git commit -m "add README"</b></code></li>
<li><code><b>git push -u origin master</b></code></li>
</ul>
<b>Push an existing folder</b>
<br />
… auf dem eigenen Rechner / Laptop, <br />
Files werden auf GitLab hochgeladen
<ul>
<li><code><b>cd existing_folder</b></code></li>
<li><code><b>git init</b></code> # ein neues (Git-)Repository anlegen</li>
<li><code><b>git remote add origin https://gitlab.com/mcMoneySack/TiddlyWikiFile.git</b></code></li>
<li><code><b>git add .</b></code></li>
<li><code><b>git commit -m "Initial commit"</b></code></li>
<li><code><b>git push -u origin master</b></code></li>
</ul>
<b>Push an existing Git repository</b>
<br />
… auf dem eigenen Rechner / Laptop, <br />
Files werden auf GitLab hochgeladen
<ul>
<li><code><b>cd existing_repo</b></code></li>
<li><code><b>git remote rename origin old-origin</b></code></li>
<li><code><b>git remote add origin https://gitlab.com/mcMoneySack/TiddlyWikiFile.git</b></code></li>
<li><code><b>git push -u origin --all</b></code></li>
<li><code><b>git push -u origin --tags</b></code></li>
</ul>
</html>
<html>
<h2>Customizing Git - Git Hooks</h2>
Like many other Version Control Systems, Git has a way to fire off custom scripts when certain important actions occur. There are two groups of these hooks: client-side and server-side. Client-side hooks are triggered by operations such as committing and merging, while server-side hooks run on network operations such as receiving pushed commits. You can use these hooks for all sorts of reasons.
<h3>Installing a Hook</h3>
The hooks are all stored in the hooks subdirectory of the Git directory. In most projects, that's .git/hooks. When you initialize a new repository with git init, Git populates the hooks directory with a bunch of example scripts, many of which are useful by themselves; but they also document the input values of each script. All the examples are written as shell scripts, with some Perl thrown in, but any properly named executable scripts will work fine – you can write them in Ruby or Python or whatever language you are familiar with. If you want to use the bundled hook scripts, you'll have to rename them; their file names all end with .sample.
<br />
To enable a hook script, put a file in the hooks subdirectory of your .git directory that is named appropriately (without any extension) and is executable. From that point forward, it should be called. We'll cover most of the major hook filenames here.
<h3>Client-Side Hooks</h3>
There are a lot of client-side hooks. This section splits them into committing-workflow hooks, email-workflow scripts, and everything else.
<br />
<b>Note</b>
<br />
It's important to note that client-side hooks are not copied when you clone a repository. If your intent with these scripts is to enforce a policy, you'll probably want to do that on the server side; see the example in An Example Git-Enforced Policy.
<h3>Committing-Workflow Hooks</h3>
The first four hooks have to do with the committing process.
<br />
The pre-commit hook is run first, before you even type in a commit message. It's used to inspect the snapshot that's about to be committed, to see if you've forgotten something, to make sure tests run, or to examine whatever you need to inspect in the code. Exiting non-zero from this hook aborts the commit, although you can bypass it with git commit --no-verify. You can do things like check for code style (run lint or something equivalent), check for trailing whitespace (the default hook does exactly this), or check for appropriate documentation on new methods.
<br />
The prepare-commit-msg hook is run before the commit message editor is fired up but after the default message is created. It lets you edit the default message before the commit author sees it. This hook takes a few parameters: the path to the file that holds the commit message so far, the type of commit, and the commit SHA-1 if this is an amended commit. This hook generally isn't useful for normal commits; rather, it's good for commits where the default message is auto-generated, such as templated commit messages, merge commits, squashed commits, and amended commits. You may use it in conjunction with a commit template to programmatically insert information.
<br />
The commit-msg hook takes one parameter, which again is the path to a temporary file that contains the commit message written by the developer. If this script exits non-zero, Git aborts the commit process, so you can use it to validate your project state or commit message before allowing a commit to go through. In the last section of this chapter, We'll demonstrate using this hook to check that your commit message is conformant to a required pattern.
<br />
After the entire commit process is completed, the post-commit hook runs. It doesn't take any parameters, but you can easily get the last commit by running git log -1 HEAD. Generally, this script is used for notification or something similar.
<h3>Email Workflow Hooks</h3>
You can set up three client-side hooks for an email-based workflow. They're all invoked by the git am command, so if you aren't using that command in your workflow, you can safely skip to the next section. If you're taking patches over email prepared by git format-patch, then some of these may be helpful to you.
<br />
The first hook that is run is applypatch-msg. It takes a single argument: the name of the temporary file that contains the proposed commit message. Git aborts the patch if this script exits non-zero. You can use this to make sure a commit message is properly formatted, or to normalize the message by having the script edit it in place.
<br />
The next hook to run when applying patches via git am is pre-applypatch. Somewhat confusingly, it is run after the patch is applied but before a commit is made, so you can use it to inspect the snapshot before making the commit. You can run tests or otherwise inspect the working tree with this script. If something is missing or the tests don't pass, exiting non-zero aborts the git am script without committing the patch.
<br />
The last hook to run during a git am operation is post-applypatch, which runs after the commit is made. You can use it to notify a group or the author of the patch you pulled in that you've done so. You can't stop the patching process with this script.
<h3>Other Client Hooks</h3>
The pre-rebase hook runs before you rebase anything and can halt the process by exiting non-zero. You can use this hook to disallow rebasing any commits that have already been pushed. The example pre-rebase hook that Git installs does this, although it makes some assumptions that may not match with your workflow.
<br />
The post-rewrite hook is run by commands that replace commits, such as git commit --amend and git rebase (though not by git filter-branch). Its single argument is which command triggered the rewrite, and it receives a list of rewrites on stdin. This hook has many of the same uses as the post-checkout and post-merge hooks.
<br />
After you run a successful git checkout, the post-checkout hook runs; you can use it to set up your working directory properly for your project environment. This may mean moving in large binary files that you don't want source controlled, auto-generating documentation, or something along those lines.
<br />
The post-merge hook runs after a successful merge command. You can use it to restore data in the working tree that Git can't track, such as permissions data. This hook can likewise validate the presence of files external to Git control that you may want copied in when the working tree changes.
<br />
The pre-push hook runs during git push, after the remote refs have been updated but before any objects have been transferred. It receives the name and location of the remote as parameters, and a list of to-be-updated refs through stdin. You can use it to validate a set of ref updates before a push occurs (a non-zero exit code will abort the push).
<br />
Git occasionally does garbage collection as part of its normal operation, by invoking git gc --auto. The pre-auto-gc hook is invoked just before the garbage collection takes place, and can be used to notify you that this is happening, or to abort the collection if now isn't a good time.
<h3>Server-Side Hooks</h3>
In addition to the client-side hooks, you can use a couple of important server-side hooks as a system administrator to enforce nearly any kind of policy for your project. These scripts run before and after pushes to the server. The pre hooks can exit non-zero at any time to reject the push as well as print an error message back to the client; you can set up a push policy that's as complex as you wish.<br />
<ul>
<li><code>pre-receive</code><br />
The first script to run when handling a push from a client is pre-receive. It takes a list of references that are being pushed from stdin; if it exits non-zero, none of them are accepted. You can use this hook to do things like make sure none of the updated references are non-fast-forwards, or to do access control for all the refs and files they're modifying with the push.</li>
<br />
<li><code>update</code><br />
The update script is very similar to the pre-receive script, except that it's run once for each branch the pusher is trying to update. If the pusher is trying to push to multiple branches, pre-receive runs only once, whereas update runs once per branch they're pushing to. Instead of reading from stdin, this script takes three arguments: the name of the reference (branch), the SHA-1 that reference pointed to before the push, and the SHA-1 the user is trying to push. If the update script exits non-zero, only that reference is rejected; other references can still be updated.</li>
<br />
<li><code>post-receive</code><br />
The post-receive hook runs after the entire process is completed and can be used to update other services or notify users. It takes the same stdin data as the pre-receive hook. Examples include emailing a list, notifying a continuous integration server, or updating a ticket-tracking system – you can even parse the commit messages to see if any tickets need to be opened, modified, or closed. This script can't stop the push process, but the client doesn't disconnect until it has completed, so be careful if you try to do anything that may take a long time.</li>
</ul>
<br />
<br />
<h3>Link:</h3>
<a href="https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks" target=_blank>Customizing Git :: Git-Hooks</a><br />
<br />
</html>
<html>
Sometimes when you do a git push, you might get the <br />
following permission error message.<br />
<br />
This error typically happens when multiple users are <br />
working on a particular git repository.<br />
<br />
The following git push error indicates that it doesn't have <br />
enough permission for adding a new object to the ./objects directory <br />
under your repository.<br />
<br />
Apart from the obvious permission issue, there is also another <br />
underlying problem that needs to be addressed, which is ex-<br />
plained in this tutorial.<br />
<br /><code>
$ git push<br />
counting objects: 6, done.<br />
Delta compression using upto 4 threads.<br />
Compressing objects: 100% (3/3), done.<br />
Writing objects: 100% (4/4), 388 bytes, | 0 bytes/s, done.<br />
Total: 4 (delta 1), reused 0 (delta 0)<br />
<br />
error: insufficient permission for adding an object to repository database ./objects<br />
fatal: failed to write object<br />
error: unpack failed: unpack-objects abnormal exit<br />
! [remote rejected] master -> master (n/a (unpacker error))<br />
error: failed to push some refs to john@192.168.100.1:/home/git/myproj<br />
</code><br />
It also shows that the git unpack failed with unpack-objects <br />
abnormal exit. Because of this error, it failed to push some <br />
refs as shown above.<br />
<br />
First, cd to the git repository which is having this issue. If you don't <br />
see the objects directory directly under your repository folder, then look <br />
under the .git folder as shown below.<br />
<br /><code>
[john@devdb]$ cd /home/git/myproj<br />
</code><br />
(or)<br />
<br /><code>
[john@devdb]$ cd /home/git/myproj/.git<br />
</code><br />
In this particular case, when john is trying to do “git push“,<br />
he is getting the above error because some of the directories under the <br />
objects folder of git repository are owned by lisa as shown below.<br />
<br /><code>
[john@devdb]$ ls -l objects<br />
drwxr-xr-x 2 john git 4096 Oct 8 2016 01<br />
drwxr-xr-x 2 john git 4096 Oct 8 2016 02<br />
drwxr-xr-x 2 lisa lisa 4096 Oct 8 2016 03<br />
drwxr-xr-x 2 lisa lisa 4096 May 1 2017 04<br />
drwxr-xr-x 2 john git 4096 May 1 2017 05<br />
drwxr-xr-x 2 john git 4096 May 6 2017 06<br />
</code>
<h3>Set the Appropriate Permissions on Objects Directory</h3>
To solve this problem, execute the following, which will set the group to git (or whatever group where all the users belongs to. Also make sure the user and group has read and write permission to the directory.
cd /your/git/repo
chgrp -R git objects
chmod -R g+rws objects
In the above:
Make sure all your users who need access to git are part of the git group. Change the “git“ in the above chgrp command to whatever group where all your developers belong to.
The “s“ option in the “g+rws“ is to set the setuid bit on the objects folder. This will make sure any new directory created under objects folder will make the group name from the objects folder which is owned by git group.
You may be tempted to execute the following on your objects directory, which will solve the problem that you are having. But, as you can imagine, it is not a good idea to do 777. Instead execute the above chgrp and chmod command.
chmod -R 777 objects
<h3>Share the Git Repository with a Group</h3>
But, even after doing the above, the same problem might return again, and you may have to do the above chgrp and chmod whenever the problem occurs.
So, apart from fixing the permission error as explained above, we also need to fix the underlying problem.
In this case, the git repository (for example: myproj) is not setup as shared repository for groups. It might just be a bare repository.
If it is not setup as shared repository, you'll see the above “insufficient permission on objects directory“ issue starts to show-up again.
To verify whether your repository is already setup for group sharing, do the following git config -l option inside your git repository that has the problem.
<br /><code>
$ cd /home/git/myproj<br />
<br />
$ git config -l<br />
user.name=John Smith<br />
user.email=john@thegeekstuff.com<br />
core.repositoryformatversion=0<br />
core.filemode=true<br />
core.bare=true<br />
core.logallrefupdates=true<br />
</code><br />
In the above output, we don't see a parameter called “core.sharedrepository“. So, this particular repository (i.e myproj is not setup as shared repository).
The above command displays the configuration values from the “config“ file that is located under your git repository.
<br /><code>
$ cd /your/git/repo<br />
<br />
$ cat config <br />
[core]<br />
repositoryformatversion = 0<br />
filemode = true<br />
bare = true<br />
logallrefupdates = true<br />
</code><br />
The above is setup as a bare repository. To convert a bare repository to shared repository, do the following:
<br /><code>
git config core.sharedRepository group<br />
</code><br />
Note: In the above command, don't replace the keyword “group“ with your groupname (for example: git). Use the above above command exactly as shown without changing anything. The “group“ in the above command should be typed exactly as it is.
Now, if you view the git config as shown below, you'll see the “core.sharedrepository“ parameter set to group.
<br /><code>
$ git config -l<br />
user.name=John Smith<br />
user.email=john@thegeekstuff.com<br />
core.repositoryformatversion=0<br />
core.filemode=true<br />
core.bare=true<br />
core.logallrefupdates=true<br />
core.sharedrepository=group<br />
</code><br />
The above will solve the insufficient permission issue permanently.<br />
<br />
After you set the sharedrepository, if you view the config file under your git repository, you'll notice that the value of sharedrepository parameter is set to 2 (which is group) as shown below.
<br /><code>
$ cat config <br />
[core]<br />
repositoryformatversion = 0<br />
filemode = true<br />
bare = true<br />
sharedrepository = 2<br />
[receive]<br />
denyNonFastforwards = true<br />
</code><br />
Also, anytime you make a git repository as sharedrepository for group using the above command, it will also set the receive.denyNonFastforwards to true automatically as shown above.<br />
<br />
Link:<br />
<a href="http://www.thegeekstuff.com/2017/05/git-push-error/">http://www.thegeekstuff.com/2017/05/git-push-error/</a>
<br />
</html>
<html>
<ul>
<li><h3>Lokation der Konfigurationsfiles</h3>
Befehle, um den Speicherort der Konfigurationsfile anzuzeigen:
<ul>
<li>bis inkl. Version 2.8 :: <code><pre>git config --list --show-origin</pre></code>
</li>
<li>ab inkl. Version 2.26 :: <code><pre>git config --list --show-origin --show-scope</pre></code>
</li>
</ul>
</li>
<li><h3>Anzeigen der Einstellungen:</h3>
<code><pre>git config [ -l | --list ]</pre></code></li>
<li><h3>Ändern / Hinzufügen von Einstellungen [<i>--add</i>]:</h3>
<code><pre>git config --global [--add] user.name “Jens Müller“</pre></code>
<code><pre>git config --global [--add] user.email mueller@debian-laptop</pre></code>
<code><pre>git config --global [--add] diff.tool [<i>diff | meld</i>]</pre></code></li>
<code><pre>git config --global [--add] core.editor [<i>emacs | vim</i>]</pre></code></li>
<code><pre>git config --global [--add] core.pager [<i> more | less | page </i>]</pre></code></li>
<li><h3>Löschen von Einstellungen:</h3>
<code><pre>git config [ --global ] --unset diff.tool meld</i></pre></code>
⇒ Ausgabe:<br />
<b>vorher:</b>
<code><pre>
mueller@Debian-Laptop:~/programming/java/FU_Kurs-01618_OOP$ git config -l
user.name=Jens Müller
user.email=mueller@debian-laptop
<u>diff.tool=meld</u>
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
</pre></code>
<b>nachher:</b>
<code><pre>
mueller@Debian-Laptop:~/programming/java/FU_Kurs-01618_OOP$ git config -l
user.name=Jens Müller
user.email=mueller@debian-laptop
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
</pre></code></li>
<li><h3>Wichtig!</h3>
Je nachdem, ob man <code>--global</code>,<code>--system</code>, <code>--local</code> <br />
oder keine Angabe macht, ist der Konfigurations‐<br />
eintrag in der “Hierarchie“ zu finden:<br />
<ul>
<li>eine der Angaben oben: im oberen Teil der Liste;</li>
<li>ohne eine Angabe: im unteren Teil der Liste</li>
</ul></li>
</ul>
<h3>Links:</h3>
<a href="https://git-scm.com/book/de/v1/Git-individuell-einrichten-Git-Konfiguration" target=_blank>Git Online-Buch</a>
</html>
<html>
<ul>
<li><a href="https://git-scm.com/">https://git-scm.com/</a><br />
Merge Conflicts :: <a href="https://git-scm.com/docs/git-merge#_how_conflicts_are_presented">https://git-scm.com/docs/git-merge#_how_conflicts_are_presented</a></li>
<br />
<li>CodeSchool :: TryGIT<br />
aktuell: <a href="https://try.github.io/levels/1/challenges/24">https://try.github.io/levels/1/challenges/24</a></li>
<br />
<li><a href="https://git-scm.com/book/de/v1">https://git-scm.com/book/de/v1</a><br />
Das Buch "Pro Git" online auf Deutsch. <br />
Die englische Version als PDF im "System Administration"-Verzeichnis.</li>
</ul>
</html>
<html>
<h3>Basic log viewing</h3>
<ul>
<li>Die Commit-ID ist der SHA-1-String;</li>
<li>Zum Anzeigen wird ein Pager verwendet (z.B. <code><b>more</b></code>), <br />
der ist über den Konfig-Parameter <code><b>core.pager</b></code>konfigurierbar.<br />
Falls der Eintrag leer ist, so wird der systemweite Default<br />
vom Betriebssystem genommen</li>
<li><code><b>git log [<i>File</i>]</b></code> :: <br />
<ul>
<li>zeigt sämtliche bisher eingetragenen Commits an <br />(u.U. eingeschränkt auf das angegebene File)</li>
<li>vom jüngst gemachten, aktuellsten Eintrag <br />
abwärts bis zum ältesten Eintrag</li>
<li>es wird angezeigt:
<ul>
<li>auf welchen Eintrag der HEAD-Zeiger veweist,</li>
<li>in welchem Branch man sich befindet</li>
</ul><pre><b>[bei mir nicht, warum?]</b></pre></li>
</ul>
<li><code><b>git log -<i>N</i></b></code> :: <br />
die letzten <i>N</i> Einträge anzeigen</li>
<li><code><b>git log <i>SHA-1-String</i></b></code> :: <br />
der SHA-1-String ist eindeutig (<i>unique identifier</i>),<br />
bei der Suche reicht die Angabe der ersten vier Zeichen, <br />
um den entsprechenden Commit zu finden</li>
<li><code><b>git log ‐‐pretty=oneline [ ‐<i>N</i> ]</b></code> :: <br />
ohne Angabe der Anzahl (<code><b>‐<i>N</i></b></code>) werden sämtliche Log-Einträge im Format<br />
<code><b><SHA-1-String> <oberste Kommentarzeile></b></code><br />
ausgegeben. Mittels der Angabe <code><b>‐<i>N</i></b></code> kann das auf eine<br />
bestimmte Anzahl eingeschränkt werden.</li>
<li><code><b>git log ‐p [ <i>‐N</i> ] </b></code> :: <br />
(<i>“unified diff“</i>)<br />
zeigt die Unterschiede zwischen den jeweils “benachbarten“ Versionen an.<br />
<code><b>‐p</b></code> kann als "patch" verstanden werden;<br />
Beginnt die Zeile mit:
<ul>
<li>“‐“</b></code>, so handelt es sich um den <b>ursprünglichen</b> Eintrag / Wert / String</li>
<li>“+“</b></code>, so handelt es sich um den <b>korrgierten</b> Eintrag / Wert / String</li>
</ul>
Die Ausgabe kann mittels <code><b><i>‐N</i></b></code> auf eine <br />
bestimmte Anzahl eingeschränkt werden</li>
<li><code><b>git log ‐‐reverse [ ‐<i>N</i> ]</b></code> :: <br />
Die Reihenfolge der Ausgabe von <code><b>git log</b></code> wird umgekehrt, <br />
d.h. der älteste Eintrag wird als erstes angezeigt;<br />
Mit <code><b>‐<i>N</i> </b></code> kann die Anzahl eingeschränkt werden.<br />
Dabei werden aus der reverse-Darstellung resp. ˜‐Liste die letzten <code><b><i>N</i> </b></code> <br />
Einträge angezeigt (das sind dann logischerweise die aktuellsten)</li>
<li><code><b></b></code> :: <br /></li>
<li><code><b></b></code> :: <br /></li>
</ul>
</html>
<html>
<ul>
<table>
<tr><th>Aufruf</th><th>Inhalt</th></tr>
<tr><td><b>man gittutorial</b></td><td>Auf Git basierender Ablauf eines Projekts</td></tr>
<tr><td><b>man giteveryday</b></td><td>Häufig verwendete Kommandos, <br />
inklusive Beispiele (nur Fedora)</td></tr>
<tr><td><b>man gitcore-tutorial</b></td><td>Ablauf im Detail, <br />teils unter Einsatz veralteter Kommandos</td></tr>
<tr><td><b>man git</b></td><td>Generelles Handbuch</td></tr>
</table>
</ul>
<h3>weitere Links</h3>
<a href="https://rogerdudler.github.io/git-guide/index.de.html" target=_blank>Roger Dudler :: Git-Guide</a>
</html>
<html>
<ul>
<li>um die Situation aufzuheben, einfach eingeben:<br />
<code><pre>git checkout master</pre></code></li>
<br />
<li>aktuell (07/2019) würde ich sagen: Sei vorsichtig damit!</li>
</ul>
</html>
<html>
<ol>
<li>Zentrales Repository</li>
<li>Feature-Branches</li>
<li>Git Flow</li>
<li>Eigenständige Forks</li>
</ol>
<p>
<b>Quelle:</b><br />
c't Programmieren 2017<br />
</html>
<html>
<ul>
<li>Git-Archive-Betrachter;</li>
<li>graphische Darstellung der (Projekt‐)Zweige von Git:<br />
<br />
<img src="./pictures/gitg-Archive-Betrachter_01.png" height=371 width=660 /><br /></li>
<!--
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
-->
</ul>
<h3>Links:</h3>
<ul>
<li>File gertingold.github.io-Python für Naturwissenschaftler.pdf [<em>Dir: /media/mueller/INT-256GB/Python</em>]</li>
<li>File gertingold.github.io-Python für Naturwissenschaftler.pdf [<em>Dir: /media/mueller/INT-256GB/Python</em>]</li>
</ul>
</html>
<html>
<h2>gitk - Historie grafisch</h2>
Für diejenigen, die keine Entwicklungsumgebung mit grafischer Anzeige<br />
der Historie benutzen, liefert Git das kleine, aber feine Tool <b><code>gitk</code></b> mit. <br />
<br />
Es ist in Tcl/Tk geschrieben und zeigt sowohl die textuelle Commit-Historie,<br />
als auch alle Branches in einer grafischen Baumstruktur an. Dabei kann<br />
mittels Filteroptionen komfortabel im lokalen Repository gesucht werden,<br />
genau so, wie man es mit dem Kommando <b><code>git log</code></b> im Terminal <br />
gewohnt ist. Sogar reguläre Ausdrücke sind möglich. Es lohnt sich auf<br />
jeden Fall, die Oberfläche einmal zu testen.<br />
<br />
<img src="./pictures/gitk_Screenphoto.png" width=538 height=299 /><br />
Schriftgröß verändern: <code><b>Ctrl + +</b></code> bzw. <code><b>Ctrl + −</b></code>
<h3>Link:</h3>
<ul>
<li><a href="https://www.ordix.de/48-ordix-news/ordix-news-titelthema/403-git-kommandos-fuer-fortgeschrittene-hinterm-horizont-geht-s-weiter.html"
target="_blank" rel="noreferrer noopener">
Ordix-News :: Git-Kommandos für Fortgeschrittene <em>[nicht mehr vorhanden]</em></a>
</li>
</html>
<html>
<h3>What is Tig?</h3>
Tig is an ncurses-based text-mode interface for git. It functions<br />
mainly as a Git repository browser, but can also assist in staging<br />
changes for commit at chunk level and act as a pager for output<br />
from various Git commands.<br />
<br />
<img src="./pictures/tig_Screenshot.png" width=640 height=343 />
<h3>Installation</h3>
<code><b>apt-get install tig</b></code> (Debian)
<h3>Aufruf</h3>
Vor dem Aufruf erst in das gewünschte (Git‐)Directory wechslen.<br />
Dort dann <code><b>tig</b></code> aufrufen.
<h3>Die wichtigsten Befehle</h3>
<ul>
<li>Beenden tig :: <code><b>Q (<i>Shift-q</i>)</b></code> [alle Views werden geschlossen]</li>
<li>Hilfe aufrufen :: <code><b>h</b></code> [öffnet die Help-View]</li>
<br />
<li>aktuelle View schliessen :: <code><b>q</b></code></li>
</ul>
<h3>Konfigurationsparameter</h3>
Konfig-File: <code><b>˜/.tigrc</b></code>
<ul>
<li>Zeilennummern anzeigen :: set line-number-display = yes </li>
</ul>
<h3>Links:</h3>
<ul>
<li>Aufruf des Tig-Manuals :: <code><b>man tigmanual</b></code></li>
<li><a href="https://github.com/jonas/tig" target="_blank">GitHub</a></li>
<li><a href="http://gitready.com/advanced/2009/07/31/tig-the-ncurses-front-end-to-git.html" target="_blank">Tig, ncurses front end</a></li>
<li><a href="http://jonas.nitro.dk/tig/manual.html" target="_blank">Tig - Manual page</a></li>
<li><a href="https://linoxide.com/linux-how-to/install-tig-text-mode-interface-git-ubuntu/" target="_blank">How to install Tig</a></li>
<li><a href="https://jonas.github.io/tig/" target="_blank">Tig - Homepage</a></li>
</ul>
</html>
<html>
<ul>
<li><a href="https://store.lerner.co.il/courses/understanding-and-mastering-git/" target=_blank>Homepage Reuven Lerner :: Git‐Course</a></li>
<li><a href="https://www.hostinger.com/tutorials/basic-git-commands" target="_blank" rel="noreferrer noopener">Basic Cheat Sheet</a></li>
<li><a href="https://learntutorials.net/de/git/topic/273/git-diff" target="_blank" rel="noreferrer noopener">LearnTutorials :: Git Diff</a></li>
<br />
<li>Git arbeitet <b><em>nicht</em></b> mit Verzeichnissen, <br />
das Einzige, womit Git arbeitet, sind die <b>Files</b>.</li>
<br />
<li><b>Historie :: </b><br />
SCCS (“<em>Source Code Control System</em>“, 1972) → RCS → CVS → Subversion (SVN) → Bitkeeper (proprietär) → Git (2005, Linus Torvalds)</li>
<br />
<li><a href="www.git-scm.com" target=_blank>Homepage Git</a></li>
<li><a href="https://onlywei.github.io/explain-git-with-d3/" target=_blank>Wei Wang :: Explain Git with D3 ( Übungstool)</a></li>
<br />
<li><b>Wichtig:</b> Es ist nichts falsches daran, häufig zu committen.
<div style="text-indent:50px;">Mantra :: <b>Commit early and often!</b></div><br /></li>
<li>Git bezieht sich mit Hilfe der Hashwerte auf (einzelne) Versionen.</li><br />
<li><b>Git‐KonfigFiles</b> :: Auf den aktuellen (Arbeits‐)Rechner und den User bezogen:
<ul>
<li>“local“ :: User‐HomeDir → lokales Arbeiten (eigene Repositories) → auf das <b>aktuelle Repo</b> bezogen</li>
<li>“global“ :: User‐HomeDir → globales Arbeiten (andrere Repositories des Users in dessen HomeDir)</li>
<li>“system“ :: dezentral, auf den Rechner bezogen, für alle User‐Accounts auf dem Rechner gültig</li>
</ul></li>
</ul>
<ol>
<li><details><!-- 001 -->
<summary>Git-Repository anlegen resp. initialisieren:</summary>
<ul>
<li>als Erstes in das gewünschte Verzeichnis wechseln, z.B. “myproject“</li>
<li><code><b>git init </b></code><br />
erzeugt ein leeres Git-Repository <code><b>.git</b></code> im o.g. Arbeitsverzeichnis</li>
<li>Alternativ : <code><b>git init <i>myproject</i></b></code><br />
(wenn das Verzeichnis <code><i>myproject</i></code> bereits existiert, wird es komplett neu initialisiert)<br />
Beispiel:<br />
<img src="./pictures/git_TiddlyWikiAnlegen.png" width=475 height=147 /></li>
<br />
</details></li>
<li><details><!-- 002 -->
<summary>Git-Version abfragen:</summary>
<code><b>git --version</b></code><br />
<br />
</details></li>
<li><details><!-- 003 -->
<summary>Git-Helppage für Befehl <code><b><i>CMD</i></b></code> abfragen (z.B. <code><b>init</b></code>):</summary>
<code><b>git <i>CMD</i> --help </b></code><br />
oder:<br />
<code><b>git help <i>CMD</i></b></code><br />
<br />
→ <b>Beispiel:</b> <br />
<code><b>git init --help</b></code><br />
oder: <br />
<code><b>git help init</b></code><br />
<br />
</details></li>
<li><details><!-- 004 -->
<summary>Status zu Repository abfragen:</summary>
<code><b>git status</b></code><br />
<br />
↠ dazu in das Verzeichnis vom Repository wechseln<br />
↠ es wird das Unterverzeichnis <code><b>.git</b></code> abgefragt<br />
↠ dieses Unterverzeichnis enthät folgende Files resp. Verzeichnisse:<br />
<code>
drwxr-xr-x 1 mueller mueller 0 Apr 28 10:42 branches<br />
drwxr-xr-x 1 mueller mueller 18 Apr 28 10:42 refs<br />
drwxr-xr-x 1 mueller mueller 16 Apr 28 10:42 objects<br />
drwxr-xr-x 1 mueller mueller 14 Apr 28 10:42 info<br />
drwxr-xr-x 1 mueller mueller 364 Apr 28 10:42 hooks<br />
-rw-r--r-- 1 mueller mueller 23 Apr 28 10:42 HEAD<br />
-rw-r--r-- 1 mueller mueller 73 Apr 28 10:42 description<br />
-rw-r--r-- 1 mueller mueller 92 Apr 28 10:42 config<br />
</code>
<br />
<b><i>WICHTIG !</i></b><br />
<u>Niemals</u> das Verzeichnis <code><b>.git</b></code> löschen!<br />
<br />
Deses Verzeichnis enthält sämtliche Informationen über das aktuelle Repository.<br />
Wenn es gelöscht wird, sind keine weiteren Aktionen im Rahmen von Git möglich.<br />
<br />
Auch ist das Editieren der Files im Verzeichnis <code><b>.git</b></code> zu unterlassen!<br />
<br />
<a href="https://store.lerner.co.il/courses/understanding-and-mastering-git/12594-section-1-introduction-to-git/29864-05-repositories-mp4" target=_blank>Weitere Infos</a>
</details></li>
<li><details><!-- 005 -->
<summary>aktuelle Konfiguration anzeigen:</summary>
<ul>
<li>allgemein: <code><b>git config [ ‐l | ‐‐list ] [ ‐‐system | ‐‐global | ‐‐local ]</b></code></li>
<li>default: <code><b>git config [ ‐l | ‐list ]</b></code> ⇒ zeigt sämtliche Einstellungen an<br />
<br />
<b>Wichtig!</b><br />
Die Ausgabe von <code><b>git config [ ‐l | ‐list ]</b></code> hängt von der Position im Repository resp. Verzeichnisbaum ab.</li>
<li><u>Anmerkung:</u><br />
Reihenfolge, in der die Konfigurationsfiles gelesen werden: <br />
<table>
<tr><td><code><b>system</b></code> </td><td> <code><b>→ global </b></code></td><td> <code><b>→ local</b></code></td></tr>
<tr><td>[Rechnerweit <br />(/etc/gitconfig)] </td><td> → [alle Repos des akt. Users <br /> ($HOME/.gitconfig)] </td><td> → [aktuelles Repo <br /> ($REPO‐Dir/.git/config)]</td></tr>
</table>
</ul>
<br />
</details></li>
<li><details><!-- 006 -->
<summary>Konfig-Wert hinzufügen:</summary>
<code><b>git config [‐‐add] [ ‐‐system | ‐‐global | ‐‐local ] <i>abc.def ghi</i></b></code><br />
<br />
⇒ erzeugt eine Section “abc“, die eine Variable “def“ enthält.<br />
<br />
⇒ Diese Variable hat den Wert “ghi“<br />
<img src="./pictures/git_InhaltVonConfigFile.png" heigth=400 width=400><br />
<br />
Eine Liste der (aktuell) verfügbaren Variablen und <br />
deren möglichen Werte kann man <a href="https://git-scm.com/docs/git-config#_variables" target=_blank>hier</a> finden.<br />
<br />
</details></li>
<li><details><!-- 007 -->
<summary>Konfig-Eintrag entfernen:</summary>
<ul>
<li><code><b>git config ‐‐unset <i>abc.def</i></b></code></li>
<li>Beispiel: <code><b>git config [ --global ] --unset diff.tool meld</b></code></li>
</ul>
<b>Anmerkungen:</b>
<ol>
<li>u.U. muss der “Wirkungsbereich“, also ob systemweit, <br />
gobal oder lokal, mit angegeben werden.</li>
<li>ist in dem Abschnitt nur ein Eintrag und er wird gelöscht, <br />
so wird automatisch der komplette Abschnitt (mit) gelöscht.</li>
</ol>
<br />
<details><summary>Wie muss der Befehl lauten, wenn mehrere gleiche Einträge entfernt werden soll?</summary><br />
<code><b>git config ‐‐unset‐all <i>abc.def</i></b></code><br />
z.B. <br />
<code><b>git config ‐‐unset‐all core.pager</b></code><br />
<br />
(ich hatte 'mal für core.pager zwei verschiedene Einträge<br />
angelegt …)
</details>
<br />
</details></li>
<li><details><!-- 008 -->
<summary>Konfig-Section entfernen:</summary>
<br />
<code><b>git config ‐‐remove-section <i>abc</i></b></code><br />
<br />
</details>
</li>
<li><details><!-- 009 -->
<summary>Welche Einstellungen sind nach der Erstellung des Repositories zu machen?</summary>
<br />
die Einträge für:
<ul>
<li><code><b>user.name</b></code></li>
<li><code><b>user.email</b></code></li>
</ul><br />
</li></details>
<li><details><!-- 010 -->
<summary>Wie lauten die dazugehörigen Befehle?</summary>
<ul>
<li><code><b>git config [--global] [--add] user.name “Jens Müller“</b></code></li>
<li><code><b>git config [--global] [--add] user.email mueller@debian-laptop</b></code></li>
</ul>
<br />
Diese Einträge sind für die <u>globale</u> Konfiguration.<br />
Wird “<code><b>global</b></code>“ durch “<code><b>local</b></code>“ ersetzt, so werden die <br />
Einstellungen für das aktuelle (lokale) Repository <br />
vorgenommen (anscheinend ist “<code><b>local</b></code>“ der Default, <br />
falls die Angabe fehlt)<br />
<br />
</details></li>
<li><details><!-- 011 -->
<summary>Wie lauten die jeweiligen Konfigurationsfiles?</summary>
<br />
→ Es gibt mehrere Konfig-Files:
<ul>
<li>ein lokales, bezogen auf das Repository (File: <code><b>$REPO‐DIR/.git/config</b></code>)<br />
→ Aufruf Befehl <u>mit</u> <code><b>--local</b></code>‐Option;<br />
(anscheinend ist “<code><b>local</b></code>“ der Default, <br />
falls die Angabe fehlt)</li>
<br />
<li>ein globales, bezogen auf das User-HomeDir (File: <code><b>$HOME/.gitconfig</b></code>)<br />
→ Aufruf Befehl <u>mit</u> <code><b>--global</b></code>‐Option;</li>
<br />
<li>ein systemweites, auf den Rechner bezogen (File: <code><b>/etc/gitconfig </b></code>)<br />
→ Aufruf Befehl <u>mit</u> <code><b>--system</b></code>‐Option:
<code><b>git config --system -l </b></code></li>
</ul>
<br />
</details></li>
<li><details><!-- 012 -->
<summary>Mit welchem Befehl resp. welcher Option kann man sich anzeigen lassen, <br />
in welcher Konfigurationsdatei welcher Eintrag vorliegt?</summary>
<br />
<code><b>git config ‐‐list ‐‐show‐origin</b></code><br />
<br />
⇒ Beispiel-Ausgabe: <br />
<img src="./pictures/git-config__show-origin.png" height=87 width=444 /> <!-- height=174 width=888 --><br />
<br />
</details></li>
<li><details><!-- 013 -->
<summary>Mit welchem Befehl resp. welcher Option kann man sich den Wert <br />
für einen Parameter anzeigen lassen (z.B. <code><b>user.name</b></code>)?</summary>
<br />
Es gibt zwei Möglichkeiten:
<ol>
<li>Mit dem Befehl <code><b>get config <em><PARAMETER></em></b></code></li>
<br />
<li>Mit Hilfe der Option <code><b>‐‐get</b></code><br />
<br />
Beispiel:<br />
<code><b>git config [ ‐‐global | ‐‐system | ‐‐local ] ‐‐get user.name</b></code><br />
<br />
<b>Anmerkung:</b><br />
Wird keine Bereichsangabe gemacht, also ob <code><b>system</b></code>, <code><b>global</b></code> oder <code><b>local</b></code>, <br />
so geht git <em>(anscheinend)</em> die Bereiche in der Reihenfolge
<ul>
<li>“<code><b>system</b></code>“ </li>
<li>“<code><b>global</b></code>“ </li>
<li>“<code><b>local</b></code>“</li>
</ul>
durch und gibt den ersten <em>nicht‐leeren</em> Eintrag zurück.<br />
</li>
</ol>
<br />
</details></li>
<li><details><!-- -->
<summary>Wie verhält sich Git bzgl. Verzeichnissen?</summary>
<br />
Git ignoriert Verzeichnisse, d.h. Verzeichnisse werden <b>nicht</b> dem<br />
Repository hinzugefügt. Das Einzige, was Git Repositories hinzufügt,<br />
sind Files.<br />
<br />
</details></li>
<li><details><!-- 014 -->
<summary>Unter welcher Variablen wird der Editor für die Kommentare definiert?</summary>
<br />
dafür wird die Variable <code><b>core.editor</b></code> verwendet:<br />
<br />
<code><b>git config --global [--add] core.editor [emacs | vim | /usr/bin/vi]</b></code><br />
<br />
</details></li>
<li><details><!-- 015 -->
<summary>Unter welcher Variablen wird der Pager / Seitenanzeiger für die Kommentare definiert?</summary>
<br />
dafür wird die Variable <code><b>core.pager</b></code> verwendet:<br />
<br />
<code><b>git config --global [--add] core.pager [ more | less | pager]</b></code><br />
<br />
Default ist das <code><b>less</b></code>-Kommando.<br />
<br />
</details></li>
<li><details><!-- 016 -->
<summary>Was passiert, wenn diese Einstellung vorgenommen wird: <br />
<code><b>$ git config --global core.pager ''</b></code></summary>
<br />
Damit wird der Konfigurationsparameter <b>core.pager</b> mit nichts belegt und.<br />
somit ausgeschaltet.<br />
Als Folge wird Git <u>keine</u> seitenweise Ausgbe anzeigen, sondern<br />
alles, wie beim <code><b>cat</b></code>‐Befehl, in einem Rutsch ausgeben.<br />
<br />
</details></li>
<li><details><!-- 017 -->
<summary>Mit welchem Befehl wird ein File für das Repository “vorgemerkt“?</summary>
<br />
<ul>
<li>mit Hile des Befehls <code><b>git add <i>File</i></b></code></li>
<li>diese Aktion ist die Basis für den späteren Commit-Befehl</li>
</ul><br />
</details></li>
<li><details><!-- 0?? -->
<summary>Welche Optionen für den Befehl <code><b>git add</b></code> sind dir bekannt?</summary>
<br />
<ul>
<li><code><b>‐n, ‐‐dry‐run</b></code></li>
<li><code><b>‐v, ‐‐verbose</b></code></li>
<li><code><b>‐‐refresh</b></code></li>
<li><code><b>‐u, ‐‐update</b></code></li>
</ul><br />
</details></li>
<li><details><!-- 018 -->
<summary>Mit welchem Befehl wird ein File wieder “zurückgesetzt“?</summary>
<br />
<ul>
<li>mit Hile des Befehls <code><b>git rm ‐‐cached <i>File</i></b></code></li>
<br />
<li>damit wird die Datei aus der Staging‐Area gelöscht und <br />
diese Aktion macht den Befehl “git add“ wieder rückgängig</li>
</ul><br />
</details></li>
<li><details><!-- 019 -->
<summary>Wie wird dieser Teil des Workflows genannt?</summary>
<br />
<ul>
<li>dieser Bereich wird als <code><b>Staging Area</b></code> (oder auch <em><b>Index</b></em>) bezeichnet, das File wurde <code><b>gestaged</b></code>.</li>
<li>Damit ist das File für den nächsten <code><b>Commit</b></code>‐Befehl vorgemerkt.</li>
</ul><br />
</details></li>
<li><details><!-- 020 -->
<summary>Mit welcher Option werden sämtliche Files, die sich bereits <b><em>in der Staging‐Area befinden</em></b><br />
<u>und</u> in der Zwischenzeit geändert wurden, aktualisiert?</summary>
<br />
<code><b>git add [ ‐‐ update | ‐ u]</b></code><br />
<br />
Damit werden (bereits sich im Staging Bereich befindliche) Dateien aktualisiert. <br />
Dateien, die <u>nicht</u> unter der Versionskontrolle stehen, sind davon nicht betroffen.<br />
<br />
Beispiel:<br />
<img src="./pictures/Git-Uebungen_Frage-21.png" height=303 width=585 /><br />
<br />
</details></li>
<li><details><!-- 021 -->
<summary>Gibt es einen Befehl, um sich alle im Staging-Bereich befindlichen Files anzuzeigen?</summary>
<br />
<code><b>git status</b></code><br />
<br />
… immer wieder mal benutzen …<br />
<br />
Der Befehl hat folgende Optionen:
<ol>
<li>‐s :: Show In Short Format</li>
<li>‐b :: Show Branch Status</li>
<li>‐v :: Verbose Status</li>
</ol>
<br />
</details></li>
<li><details><!-- 022 -->
<summary>Wie wird ein File, das bereits commited wurde, gelöscht?</summary>
<br />
<code><b>git reset HEAD <i>File</i></b></code><br />
<br />
Dabei wird das File wieder in den "Ursprungszustand" zurückversetzt, dh. <br />
es ist im “untracked“‐Zustand.<br />
<br />
</details></li>
<li><details><!-- 023 -->
<summary>Worin unterscheiden sich die beiden folgenden Befehle?<br />
<ul>
<li><code><b>git rm --cached <i>File</i></b></code></li>
<li><code><b>git reset HEAD <i>File</i></b></code></li>
</ul>
</summary>
<br />
Der Unterschied ergibt sich aus dem Zeitpunkt, an dem der Befehl “git status“ aufgerufen wird:<br />
<br />
<ul>
<li>Der Befehl <code><b>git rm --cached <i>File</i></b></code> ist dann notwendig, wenn es für das File _NOCH_KEINE_ <br />
commit‐Einträge im Branch existieren und das File aus der Staging Area entfernt<br />
werden soll. D.h. bevor der erste Commit ausgeführt wird und der Befehl <code><b>git log<br />
‐‐pretty=oneline</b></code> eine Fehlermeldung <code><pre>fatal: Ihr aktueller Branch 'master' hat noch keine Commits.</pre></code> ausgibt.</li>
<br />
<li>Der Befehl <code><b>git reset HEAD <i>File</i></b></code> ist dann notwendig, wenn mindestens ein<br />
Commit auf dieser Datei ausgeführt wurde. Der <code><b>git log</b></code>‐Befehl gibt den SHA‐<br />
Key des vorherigen Commits aus.<br /></li>
</ul>
<br />
</details></li>
<li><details><!-- 024 -->
<summary>Wie wird das File (letztendlich) in das Repository “eingecheckt“?</summary>
<ul><br >
<li>Mit Hilfe des Befehls <code><b>git commit</b></code> werden alle Files, <br />
die mittels <code><b>git add</b></code> für das Committen vorgemerkt<br />
worden sind, von der <b>Staging Area</b> (auch: Index) <br />
in das <b>Repository</b> (dem Projektarchiv) “transportiert“.</li>
<li>Dabei wird der unter der Git-Umgebungsvariablen<br />
<b>core.editor</b> definierte Editor aufgerufen, um eine Nachricht zu hinterlassen.</li>
</ul><br />
Beispiel:<br />
<img src="./pictures/git_Commit-Ausgabe.png" width=556 height=80 /><br >
<br />
</details></li>
<li><details><!-- ??? -->
<summary>Was erreicht man mit dem Befehl <code><b>git commit ‐m</b></code>?</summary>
<br />
Mit der Option <b>‐m</b> kann beim Aufruf von <code><b>git commit</b></code> sofort <br />
eine <b>einzeilige (!)</b> Nachricht eingegeben werden: <br />
<br />
<code><b>git commit</b></code> ‐m “<i>Kommentar ‐ Headerzeile</i>“ [ <i>File</i> ]<br />
<br />
</details></li>
<li><details><!-- 025 -->
<summary>Was erreicht man mit dem Befehl <code><b>git commit ‐a</b></code>?</summary>
<br >
<code><b>git commit ‐a</b></code> is equivalent to running <code><b>git add</b></code> first <br />
on all filenames that existed in the latest commit, and<br />
then running <code><b>git commit</b></code>.
<br />
<!-- Beispiel:<br />
<img src="./pictures/git_Commit-Ausgabe.png" width=556 height=80 /><br >
<br />-->
</details></li>
<li><details><!-- 026 -->
<summary>Was zeigt der Befehl <code><b>git diff <em>neuer Commit älterer Commit [ File | Directory ]</em></b></code> an?</summary>
<br />
Damit werden alle Unterschiede zwischen zwei Commits angezeigt.<br />
Dabei werden alle Änderungen in allen betroffenen Files,<br />
die zwischen diesen beiden Commits liegen, angezeigt.<br />
<br />
Mit der Angabe des <em>Files</em> bzw. <em>Directories</em> kann das<br />
weiter eingegrenzt werden.<br />
<br /></details></li>
<li><details><!-- 026 -->
<summary>Mit welchem Befehl werden die Unterschiede zwischen <u>Arbeitsverzeichnis</u> <br />
und <u>Repository</u> (<em>most recent commit</em>) angezeigt?</summary>
<br />
<code><b>git diff</b></code><br />
<br /></details></li>
<li><details><!-- 027 -->
<summary>Mit welchem Befehl werden die Unterschiede zwischen <u>Staging Area</u> (Index)<br />
und dem <u>letzten <em>(most recent)</em> Commit</u> (dem Repository) angezeigt?</summary>
<br />
<code><b>git diff ‐‐staged</b></code><br />
<br />
Synonym: <code><b>git diff ‐‐cached</b></code><br />
</details></li>
<li><details><!-- 0?? -->
<summary>Mit welchem Befehl können zwei Files, die _noch_ im Arbeitsverzeichnis sind,
auf Unterschiede überprüft werden?</summary>
<br />
<code><b>git diff ‐‐no‐index <em>file‐1 file‐2</em></b></code><br />
<br />
beide Files sind weder gestaged noch committed.<br />
</details></li>
<li><details><!-- 028 -->
<summary>Was ist aufzurufen, wenn der Commit-Eintrag geändert werden muß?</summary>
<code><b>git commit ‐‐amend</b></code><br />
<br />
<img src="./pictures/git_Commit-Amend.png" width=512 height=94 /><br />
<br />
When you use this command, git creates a new commit with the same parent as the<br />
current commit. (The old commit will be discarded if nothing else references it.<br />
</details></li>
<li><details><!-- 0?? -->
<summary>Worauf ist bei der Benutzung von <code><b>‐‐amend</b></code> zu achten??</summary>
Es wird dringend geraten, diese Option ausschließlich auf dem eigenen Server,<br />
in den eigenen Repositories zu verwenden resp. aufzurufen. Solange das File<br />
committed noch auf dem eigenen Rechner liegt, kann die Option gefahrlos auf‐<br />
gerufen werden. <b>ABER</b> <em>sobald das File auf einen Repo-Server gepushed <br />
wurde, ist das File für diese Option tabu!</em> <br />
<br />
Der Grund ist, dass der Befehl <code><b>git commit ‐‐amend</b></code><br /> einen Commit-Eintrag durch einen anderen ersetzt. Ist das File dann bereits auf dem (öffentlichen) Repo-Server, kann es zu erheblichen Komplikationen kommen.<br />
</details></li>
<li><details><!-- 029 -->
<summary>Wofür steht:<br />
<ol type="a">
<li>HEAD~ </li>
<li>HEAD^</li>
</ol> ?</summary>
<br />
<ol type="a">
<li>HEAD~ :: the parent of the current commit</li>
<li>HEAD^ :: </li>
</ol>
<br />
</details></li>
<h1>Log-Infos abfragen</h1>
<li><details><!-- 030 -->
<summary>Mit welchem Parameter kann die History aufgelistet werden?</summary>
<ul>
<li><code><b>git log</b></code></li>
<li>Jeder Commit ist mit einem 40-stellinge SHA1-Hash gekennzeichnet;</li>
<li>dieser dient zum eindeutigen Identifizieren und auch als Checksumme;</li>
</ul><br />
Beispiel:<br />
<img src="./pictures/git_Log-Ausgabe.png" width=379 height=127 /><br />
<br />
</details></li>
<li><details><!-- 031 -->
<summary>Defaultmässig wird die History von “alt“ nach “aktuell“ angezeigt.<br />
  Mit welchem Parameter kann die History <b>in umgekehrter Richtung</b> aufgelistet werden?</summary><br />
<code><b>git log ‐‐reverse</b></code><br />
<br />
</details></li>
<li><details><!-- 031 -->
<summary>Mit welchem Befehl / Option kann man die Log-Ausgabe formatieren?</summary>
<ul>
<li><code><b>git log --pretty=format:“<options>“</b></code><br />
<br />
Beispiel:<br /> <code><b>$ git log --pretty=format:“Commit Hash: %H, Author: %aN, Date: %aD“</b></code></li>
<br />
↠ Als Builtin sind bei <code><b>pretty</b></code> folgende Einstellungen vorhanden:
<ul>
<li><code><b>oneLine</b></code></li>
<li><code><b>short</b></code></li>
<li><code><b>medium</b></code></li>
<li><code><b>full</b></code></li>
<li><code><b>fuller</b></code></li>
<li><code><b>email</b></code></li>
<li><code><b>raw</b></code></li>
</ul>
</li>
<br />
<li><code><b>git log --oneline</b></code><br />
<br />
die Log‐Einträge werden einzeilig ausgegeben;<br />
der Unterschied zu “<code><b>git log --pretty=oneline</b></code>“:<br />
die SHA1‐Werte sind auf die ersten sieben Zeichen beschränkt,<br />
während bei “<code><b>git log --pretty=oneline</b></code>“ der gesamte SHA1‐Wert ausgegeben wird;
</li>
<br />
<li>weitere git log ‐ Optionen:
<ul>
<li>‐‐decorate</li>
<li>‐‐graph</li>
<li>‐‐all</li>
<li>‐‐[no‐]color</li>
</ul></li>
</ul>
<br />
weitere Infos: <a href="https://git-scm.com/book/de/v2/Git-Grundlagen-Anzeigen-der-Commit-Historie" target=_blank>Git‐SCM :: Allgemeine Optionen für git log</a><br />
<br />
</details></li>
<li><details><!-- 032 -->
<summary>Übung von Reuven Lerner bzgl. <code><b>git log</b></code>‐Befehle.</summary>
<br />
(1) In a repository, create four commits, spread across two different files. Try to have some additions, some deletions, and some modifications in the files.<br />
<br />
(2) Get the log of the most recent, showing the differences.<br />
<br />
(3) Show the two most recent commits.<br />
<code><b>git log</b></code><br />
<br />
(4) Show the two oldest commits.<br />
<code><b>git log -2 --reverse</b></code><br />
<br />
(5) Show the three commits made in the last 10 minutes.<br />
<br />
(6) Show the commits with relative dates.<br />
<br />
(7) Show the commits in "oneline" format.<br />
<br />
(8) Show the differences between the most recent commit and the 3rd-most-recent one.<br />
<br />
</details></li>
<h1>Das File “.gitignore“</h1>
<li><details><!-- 033 -->
<summary>Wozu dient die Datei <code><b>.gitignore</b></code>?</summary>
<br />Hin und wieder gibt es Files, die <b>nicht</b> im Repository abgelegt<br />
und getrackt werden sollen, wie z.B. Backup-Files oder Binary-Files.<br />
<br />
Um sie vom Übertragen in das Repository auszuschließen, trägt man <br />
eine Bezeichnung (Filename oder regulärer Ausdruck) in das File <code><b>.gitignore</b></code> ein.<br />
<br />
</details></li>
<li><details><!-- 0?? -->
<summary>Wie kann man Git dennoch dazu bringen, ein im File <code><b>.gitignore</b></code> angegebenes File zu sichern?</summary><br />
Es gibt zwei Möglichkeiten:<br />
<ul>
<li>mittels der git add‐Option “‐f“</li>
<li>mittels Eintrag “!<<em>gewünschtes File</em>>“ im File <code><b>.gitignore</b></code></li>
</ul>
<br />
Das sollte man aber unterlassen! Das widerspricht dem Konzept<br />
des Files <code><b>.gitignore</b></code>.<br />
<br />
</details></li>
<li><details><!-- 034 -->
<summary>Übung von Reuven Lerner bzgl. <code><b>.gitignore</b></code>.</summary>
<br />
<ol>
<li>Now add a backup file (i.e., copy a file with a .bak ending).<br />
Change the original file, as well, so that we'll know they're different.</li>
<br />
<li>Before staging or committing, show the differences between these files.</li>
<br />
<li>Add a .gitignore file that excludes all *.bak files.</li>
<br />
<li>Now do a "git status". Is the .bak file gone?</li>
<br />
<li>Stage and commit .gitignore, and nothing else.</li>
<br />
<li>Now stage and commit the modified file. Look at the logs, to see it has changed.</li>
</ol>
</details></li>
<h1>HEAD & commits</h1>
<li><details><!-- 035 -->
<summary>Was ist “<code><b>HEAD</b></code>“?</summary>
<br />
Das ist ein Zeiger, der stets auf den aktuell ausgewählten GIT-commit-Eintrag<br />
zeigt. <br />
<br />
In der Datei <code><b>.git/HEAD</b></code> ist hinterlegt, auf welchen Commit‐<br />
Eintrag HEAD aktuell zeigt.<br />
<br />
</details></li>
<li><details><!-- 036 -->
<summary>Was ist die Aufgabe vom Befehl <code><b>git checkout</b></code> ? </summary>
<br />
<code><b>git checkout </b></code>has many uses, but the main one is to switch between branches.<br />
Mit seiner Hilfe wird der HEAD-Zeiger auf den angegebenen Commit “verschoben“<br />
Das führt dann zu der (Fehler‐)Meldung eines “detached HEAD“s.<br />
<br />
</details></li>
<h1>git revert</h1>
<li><details><!-- 0?? -->
<summary>Was ist die Aufgabe von <code><b>git revert</b></code>?</summary>
<br />
Es lässt den aktuellen Branch auf einen älteren Stand zurückfallen und<br />
schreibt für den “neuen“ Stand einen eigenen Commit. So wird die Histo‐<br />
rie erweitert und nicht in ihr herumgelöscht.<br />
<br />
Ein Beispiel:<br />
Das Kommando <code><b>git revert HEAD</b></code> macht den letzten Commit<br />
rückgängig und kennzeichnet dies auch mit dem Schlüsselwort<br />
“Revert“ in der Commit-Message. <br />
<br />
</details></li>
<li><details><!-- 0?? -->
<summary>Übungen von Reuven Lerner bzgl. <code><b>git revert</b></code>‐Befehl.</summary>
<br />
<ol type="I">
<li> In a repository, add a new line to an existing file.<br />
 Commit. Now create a new commit that removes that line.<br />
</li>
<li> In a repository, remove an existing line from an existing<br />
 file. Now create a new commit that adds that line back.<br />
</li>
<li> In a repository, modify an existing line from an existing<br />
 file. Now (manually) create a new commit that undoes the<br />
 modification.<br />
</li>
<li>In a repository, add a new line to an existing file.<br />
 Commit. Now undo that change, using “git revert“.<br />
</li>
<li> In a repository, remove an existing line from an existing<br />
 file. Now undo that change, using “git revert“.<br />
</li>
<li> In a repository, modify an existing line from an existing<br />
 file. Now undo that change, using “git revert“.<br />
</li>
<li> Add a new file, with some content. Commit. Undo that addition<br />
 with “git revert“.<br />
</li>
<li> Make multiple changes to multiple files. Commit. Undo those<br />
 changes with “git revert“.<br />
</li>
</ul>
<br />
</details></li>
<h1>GIT ‐ Objeckte</h1>
<li><details><!-- 037 -->
<summary>Was gibt der Befehl <code><b>git cat-file</b></code> aus? </summary>
<br />
<code><b>git cat-file</b></code> gibt Informationen zu Objekten in Git aus.<br />
Er verfügt über folgende Optionen:
<ol>
<li><b>–s</b> :: <i>“size“<br />gibt die Größe des Objekts aus</i>
<br /></li>
<li><b>–t</b> :: <i>“type“<br />gibt den Typ des Objekts aus<br />folgende Typen gibt es: commit, blob, tree</i><br /></li>
<li><b>–e</b> :: <i>“exist?“<br />Überprüft, ob das Objekt existiert</i><br /></li>
<li><b>–p</b> :: <i>“‐‐pagination“<br />gibt die Informtionen, den Inhalt formatiert aus</i></li>
<br />
</ol>
<b>Beispiel:</b><br />
<code><b>git cat-file -p <<i>SHA1</i>></b></code> :: to read the content ( or blob ) of a git object<br />
<br />
<code><b>git cat-file -t <<i>SHA1</i>></b></code> :: to read its type<br />
<br />
</details></li>
<h1>GIT-GUIs</h1>
<li><details><!-- 038 -->
<summary>Welche GUIs zur Darstellung eines GIT-Workflows kennst Du?</summary>
<br />
<ul>
<li>gitg</li>
<li>gitk</lli>
<li>tig</li>
<li>Sourcetree (anscheinend nur für Windows und Mac)</li>
<li>GitKraken</li>
</ul>
<br />
</details></li>
<li><details><!-- 039 -->
<summary>Was mach der Git-Befehl <code><b>git reset</b></code>?</summary>
<br />
Mit dem Befehl <code><b>git reset</b></code> lässt man einen Branch, ähnlich wie<br />
bei <code><b>git revert</b></code>, auf einen älteren Stand zurückfallen. Allerdings<br />
mit dem Unterschied, dass hier alle übergebenen Dateien nach<br />
der ausgewählten Übergabe unwiderruflich gelöscht und aus<br />
der Historie entfernt werden. <br />
<br />
</details></li>
<li><details><!-- 040 -->
<summary></summary>
<br />
</details>
</li>
<li><details>
<summary></summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary></summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary></summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary></summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary></summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary></summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary></summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary></summary>
<code><b></b></code><br />
<br />
</details></li>
</ol>
<code><b></b></code>
</html>
<html>
<code><pre>git cat‐file ‐p <i>Object</i></pre> </code>
<ul>
<li>shows the contents of a commit object ‐‐<br />
or any other object in Git</li>
</ul>
<h3>Links:</h3>
Reuven Lerner - Newsletter "Better developer"
</html>
<html>
<ul>
<li><h3>Beispielausgabe:</h3>
<code><pre>
theia@theiadocker-jamueller:/home/project$ git clone https://github.com/ibm-developer-skills-network/CC201.git
Cloning into 'CC201'...
remote: Enumerating objects: 20, done.
remote: Counting objects: 100% (20/20), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 20 (delta 6), reused 19 (delta 6), pack-reused 0
Unpacking objects: 100% (20/20), done.
theia@theiadocker-jamueller:/home/project$
</pre></code>
⇒ das Verzeichnis “CC201“ wurde im aktuellen Verzeichnis erzeugt</li>
<br />
<li>in der Zwischenzeit probeweise auf meinem Rechner/Laptop ausgeführt:
<code><pre>
mueller@Debian-Laptop:~/programming$ git clone https://github.com/ibm-developer-skills-network/CC201.git
Klone nach 'CC201' ...
remote: Enumerating objects: 20, done.
remote: Counting objects: 100% (20/20), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 20 (delta 6), reused 19 (delta 6), pack-reused 0
Empfange Objekte: 100% (20/20), 7.04 KiB | 7.04 MiB/s, fertig.
Löse Unterschiede auf: 100% (6/6), fertig.
</pre></code>
</li>
</ul>
</html>
<html>
<ul>
<li>Was passiert bei einer "Neu-Initialisierung" (nochmaliger Aufruf von "git init" bei einem Repository, das bereits existiert)?</li>
<br />
<li>Meldung, die am 2022-03-07 bei <code>git init project</code> (zum ersten Mal?) erschien:<br />
<code><pre>
mueller@Debian-Laptop:~/programming/Git-Course$ git init project
Hinweis: Als Name für den initialen Branch wurde 'master' benutzt. Dieser
Hinweis: Standard-Branchname kann sich ändern. Um den Namen des initialen Branches
Hinweis: zu konfigurieren, der in allen neuen Repositories verwendet werden soll und
Hinweis: um diese Warnung zu unterdrücken, führen Sie aus:
Hinweis:
Hinweis: git config ‐‐global init.defaultBranch <Name>
Hinweis:
Hinweis: Häufig gewählte Namen statt 'master' sind 'main', 'trunk' und
Hinweis: 'development'. Der gerade erstellte Branch kann mit diesem Befehl
Hinweis: umbenannt werden:
Hinweis:
Hinweis: git branch -m <Name>
Leeres Git-Repository in /home/mueller/programming/Git-Course/project/.git/ initialisiert
</pre></code></li>
</html>
<html>
<ul>
<li><h3>Option <i>‐‐ graph</i></h3></li>
<br />
<li><h3>Option <i>‐‐ oneline</i></h3></li>
<br />
<li><h3>Option <i>‐‐ color</i></h3></li>
<br />
<li>Alias ausprobieren:<br />
<code>alias gtree='git log --graph --abbrev-commit --decorate --date=relative --format=format:'\''%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'\'' --all'</code>
</ul>
<h3>Links:</h3>
<a href="https://dev.to/drews256/i-love-git-log-off" target=_blank>Andrew Stuntz :: I love git log</a>
</html>
<html>
<h3>gitolite tutorial</h3>
Gitolite sets up a central "server" to host many git repositories for<br />
many users.<br />
<br />
I initially wrote this because someone on #git said “people <br />
always assume the official documentation is crap; that's why<br />
they look for tutorials“. But a better reason is that gitolite <br />
comes with an enormous amount of documentation, (just the<br />
master TOC/index has more than 300 entries!) so the sheer<br />
size can be overwhelming for a rank newbie. Also, a lot of<br />
people start using gitolite before they have acquired enough<br />
knowledge of git, which makes things worse.<br />
<br />
My tutorial uses words and phrases borrowed from the official gitolite<br />
documentation, so don't be surprised if it sounds similar in places!<br />
<br />
Also, since everyone's environment will not be exactly the same, you<br />
can expect some errors while following this on your machine. Let me<br />
know about them (senawario@gmail.com) so I can add tips if needed.<br />
<br />
Anything you have to type is in bold. System responses (when shown)<br />
are in normal font.
<br />
For this tutorial I will be using Fedora 15, but it should work with any Linux. Probably any Unix even. (The only non-portable command in this whole tutorial is the "useradd" command; see below for details. The rest should work fine anywhere).
<br />
As the gitolite documentation says, gitolite is invoked by ssh, so actually any "unix user" on the server can become a "gitolite server". In this tutorial we will create a user called "gitolite" to host our gitolite server. (This means developers will access repos with URLs that look like gitolite@server.name:repo (or maybe ssh://gitolite@server.name:port-number/repo if you need to use a port number other than 22).
<br />
According to the official install document, gitolite has 3 different methods of installation -- "package", "root", and "non-root". The "non-root" method, is the least intrusive of these (you just have to create one userid and everything else happens within that userid, without touching the rest of the system), so this is what this tutorial is about. [Note: a fourth method, "from-client", exists but is now deprecated].
<br />
<h4>Step 1: SET UP/CHECK PREREQUISITES</h4>
Server IP/name and OS: You will need some flavour of Unix for the server. I've only tested with Fedora 16, though.
<br />
In this tutorial we will pretend the server is called glh (stands for "gitolite host").
<br />
Server Software: You will need a POSIX compatible shell, perl, and git (at least version 1.6.6). I believe that installing git using your package manager will get you the others also so just do that!
<br />
Server Accounts: You will need an account on the server for which you have the password. This account will become the "gitolite hosting user". In this tutorial we will create a new user called gitolite and use that as the hosting user. (The following commands work on Fedora; your distro/OS may be different. For instance, I am told Debian uses "adduser" instead of "useradd").
<br />
# useradd gitolite # please find and use equivalent command for your distro
# passwd gitolite
Changing password for user gitolite.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
<br />
Server Account Environment: $HOME/bin should be part of the default $PATH for this user. If it isn't, fiddle with the .bashrc or .bash_profile or similar files and add it somehow.
<br />
Administrator: You :-)
<br />
Administrator's Workstation OS: Shouldn't really matter...
<br />
Administrator's Workstation Software: You only need git and some ssh client. If you're using Windows, msysgit is the best. YMMV. (This tutorial is not about getting ssh to work so please do not ask me for help on that. The gitolite documentation has lots of info on ssh).
<h4>Step 2: MAKING YOUR PUBKEY</h4>
On your workstation, run the following command
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/sena/.ssh/id_rsa):
Created directory '/home/sena/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/sena/.ssh/id_rsa.
Your public key has been saved in /home/sena/.ssh/id_rsa.pub.
The key fingerprint is:
a9:fc:07:e8:d2:20:36:22:f8:00:c2:17:ea:5c:3b:a8 sena@sita-lt.atc.tcs.com
The key's randomart image is:
(some unimportant output deleted)
You don't have to create a new key. If you already have a keypair, it will ask you if you want to overwrite it, like this:
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/sena/.ssh/id_rsa):
/home/sena/.ssh/id_rsa already exists.
Overwrite (y/n)?
Just say "n" and use your existing keypair for the next step.
If you're on Windows under "msysgit"'s bash shell, the commands are pretty much the same. The location of the files will be different, but the command will print very clearly where the two files (private key: id_rsa, and public key: id_rsa.pub) are placed. Adjust accordingly.
<h4>Step 3: COPYING YOUR PUBKEY TO THE SERVER</h4>
We need to copy your pubkey (~/.ssh/id_rsa.pub) from your workstation to the userid gitolite on the server glh. Do this on your workstation ("sena" is my first name, in case you forgot; please use your own here!):
$ scp ~/.ssh/id_rsa.pub gitolite@glh:sena.pub
The authenticity of host 'glh (<IP address deleted for tutorial>)' can't be established.
RSA key fingerprint is d2:5e:91:01:d8:74:a4:43:f0:3d:0a:21:b2:0f:92:1c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'glh' (RSA) to the list of known hosts.
gitolite@glh's password:
id_rsa.pub 100% 406 0.4KB/s 00:00
<h4>Step 4: GETTING THE GITOLITE SOFTWARE TO YOUR SERVER</h4>
The rest of the installation is done from the server, so log on to the server as gitolite, somehow. For example, you could log on as some other user and then "su - gitolite".
Note: Ssh-ing in directly may not work after the initial install succeeds, because your pubkey now gets sent, and on the other side, gitolite kicks in instead of giving you a shell. If that happens, you will need to force password authentication to get a shell: try ssh -o preferredauthentications=password gitolite@glh
Once you've logged in to the gitolite user on server glh you must download the gitolite software. If your server has direct internet connectivity, this is pretty easy:
$ git clone git://github.com/sitaramc/gitolite.git
If your server does not have direct internet connectivity, find some machine that does, and use it as an intermediary, like this:
# on an internet connected workstation:
$ git clone git://github.com/sitaramc/gitolite.git
$ cd gitolite
$ git bundle create /tmp/gitolite.bdl --all
# now find some way of getting that file /tmp/gitolite.bdl from /tmp on
# the internet connected workstation, to /tmp on the "glh" server
# once that is done, do this:
$ git clone /tmp/gitolite.bdl gitolite
<h4>Step 5: THE ACTUAL INSTALL</h4>
On the server still, as user "gitolite", do this:
$ mkdir bin
$ gitolite/install -ln
$ gitolite setup -pk sena.pub
Initialized empty Git repository in /home/gitolite/repositories/gitolite-admin.git/
Initialized empty Git repository in /home/gitolite/repositories/testing.git/
WARNING: /home/gitolite/.ssh/authorized_keys missing; creating a new one
<h4>Step 6: CLONING THE ADMIN REPO TO THE WORKSTATION</h4>
Now you have to get back to your workstation, and do this:
$ git clone gitolite@glh:gitolite-admin
Cloning into gitolite-admin...
remote: Counting objects: 6, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 6 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (6/6), done.
This means you have successfully installed gitolite and you are now ready to start using it.
However, if this does not work, or if it works only if you use "git clone gitolite@glh:repositories/gitolite-admin" (note the extra "repositories/") or something like that, then your ssh setup is not working. See the main gitolite project documents for an ssh-troubleshooting guide, or online here.
<h4>Step 7: ADDING NEW USERS AND REPOS</h4>
First, obtain pubkeys for your users. We will start with the example users 'alice" and "bob".
Ask both of them to generate a keypair just as you did in "step 2" of your tutorial, and send you their keys somehow. Save them with their respective names (alice.pub and bob.pub) in /tmp of your workstation.
Now you have your two users, let us assume that your two new repos are "foo" and "bar". The "foo" repo must be writable by alice, but read-only to bob. The "bar" repo is the other way around -- writable by bob, read-only to alice.
Now, on your workstation, do this:
$ cd gitolite-admin
$ cp /tmp/alice.pub keydir
$ cp /tmp/bob.pub keydir
$ vim conf/gitolite.conf
Of course, instead of vim you can use whatever editor you like. Anyway, when the editor pops up, you will see lines like this:
<code><pre>
repo gitolite-admin
RW+ = sena
repo testing
RW+ = @all
Now add these lines:
repo foo
RW = alice
R = bob
repo bar
RW = bob
R = alice
</pre></code>
Save the file and quit.
Now type in the following commands. Note: If the commit command fails with an error saying *** Please tell me who you are., you should read what it says, run the commands it suggests, and retry the commit command.
<code><pre>
$ git add keydir conf
$ git commit -m 'added users alice and bob, repos foo and bar'
[master 6a18c9c] added users alice and bob, repos foo and bar
1 files changed, 9 insertions(+), 0 deletions(-)
$ git push origin master
Counting objects: 7, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 364 bytes, done.
Total 4 (delta 1), reused 0 (delta 0)
remote: Already on 'master'
remote: creating bar...
remote: Initialized empty Git repository in /home/gitolite/repositories/bar.git/
remote: creating foo...
remote: Initialized empty Git repository in /home/gitolite/repositories/foo.git/
To gitolite@glh:gitolite-admin
a02297b..6a18c9c master -> master
</pre></code>
<br />
And you're done! <br />
<br />
Author: Sena Wario <br />
<br />
<a href="https://sites.google.com/site/senawario/home/gitolite-tutorial" target="_blank">gitolite tutorial</a><br />
<br />
Links: <br />
<a href="http://gitolite.com/gitolite/" target="_blank">Gitolite :: Hosting Git Repositories</a><br />
<a href="http://www.bigfastblog.com/gitolite-installation-step-by-step" target="_blank">Gitolite Installation Step-By-Step</a><br />
<a href="How To Use Gitolite to Control Access to a Git Server on an Ubuntu 12.04 VPS" target="_blank">veraltet, könnte hilfreich sein</a><br />
<br />
</html>
<html>
... to be filled ...
</html>
<html>
<table>
<tr>
<th>Constant</th><th>Character</th><th>Description</th>
</tr>
<tr>
<td>PUBKEY_USAGE_SIG</td><td align="center">S</td><td> <b>sign</b> some data (like a file)</td>
</tr>
<tr>
<td>PUBKEY_USAGE_CERT</td><td align="center">C</td><td> <b>certify</b>: sign a key (this is called certification)</td>
</tr>
<tr>
<td>PUBKEY_USAGE_ENC</td><td align="center">E</td><td><b>encrypt</b> data</td>
</tr>
<tr>
<td>PUBKEY_USAGE_AUTH</td><td align="center">A</td><td><b>authenticate</b> yourself to a computer (for example, logging in)</td>
</tr>
</table>
<h3>Links:</h3>
<ul>
<li><a href="https://unix.stackexchange.com/questions/31996/how-are-the-gpg-usage-flags-defined-in-the-key-details-listing"
target="_blank" rel="noreferrer noopener">
StachExchange :: How are the GPG usage flags defined in the key details listing?</a>
</li>
</ul>
</html>
<html>
<ol>
<lI>habe ihn direkt nach seinem Passwort gefragt<br />
→ COCOLOCO
</li>
<li>Is it a word from a dictionary?<br />
→ POTENTIAL
</li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://gandalf.lakera.ai/"
target="_blank" rel="noreferrer noopener">
Gandalf (LLM)</a>
</li>
</ul>
</html>
<html>
<h3>Einführung in Gatling</h3>
<ul>
<li>Open Source-Werkzeug</li>
<li>Zur Entwicklung und Ausführung von Lasttests<br />
→ NICHT in der Cloud für DoS-Angriffe verwenden! Ist von den Cloud-Providern untersagt!</li>
<li>Diese werden in einer <b>Scala DSL</b> entwickelt</li>
</ul>
Der Software-Test gehöt zur Agilen Softwareentwicklung. Auch wenn viele Softwareentwickler automatische (J)Unit-Tests als "Testen" ansehen, liegt der Schwerpunkt beim Testen im eigentlichen Sinne nicht nur im Verhindern von Regressionen durch automatische Checks, sondern auch im Gewinnen von Informationen über die entwickelte Software. Wertvolle und zeitnahe Informationen sind essenziell, um fundierte Entscheidungen zu treffen. Neben vielen anderen Test-Arten ist der Leistungstest ein wichtiger Bestandteil einer umfassenden Test-Strategie.
<h3>Performance-Testing</h3>
<p>
Ziel des Performance-Tests ist herauszufinden, ob die entwickelte Software mit den verfügbaren Ressourcen die Leistungsanforderungen erfüllen kann. Die Leistungsanforderungen sind dabei von der Art des Systems abhängig. Schon seit Grossrechnerzeiten unterscheidet man zwischen Stapelverarbeitungs- und Online-Systemen.
</p>
</p>
Bei der Stapelverarbeitung gilt es, die Ressourcen so effizient wie möglich auszunutzen, um eine definierte Datenmenge in einer möglichst kurzen Zeit zu verarbeiten. Solche Systeme sind datengetrieben und das Ziel ist, das System für möglichst hohen Durchsatz zu optimieren.
</p>
<p>
Bei Online-Systemen gilt es, genügend Ressourcen, d. h. mit Leistungsreserven, bereitzustellen, sodass auf eintretende Ereignisse in einer möglichst kurzen Zeit geantwortet werden kann. Im Regelfall sind diese Ereignisse eintreffende Benutzer bzw. deren Requests, aber auch andere Ereignisse sind nicht unüblich, z. B. eintreffende Sensordaten oder auch Nachrichten jeglicher Art. Solche Systeme sind Ereignis-getrieben und das Ziel ist, das System so zu optimieren, dass Antwortzeiten für einen Großteil der Requests unterhalb einer Toleranzschwelle liegen.
</p>
Zur Durchführung von Lasttests benötigt man Werkzeuge ‐ z. B. Gatling.
<h3>Was ist Gatling?</h3>
Gatling [1] ist ein moderner Lastgenerator, der ‐ anders als Thread-basierte Lastgeneratoren wie Apache JMeter [2] oder verschiedene kommerzielle Werkzeuge ‐ auf einer non-blocking, eventbasierten Lastgenerierung beruht. Gatling ist in Scala geschrieben und bietet eine Scala DSL zum Entwickeln von Lasttests an. Anders als mit grafischen Werkzeugen wie dem JMeter workbench werden so die Lasttests als Code geschrieben, was eine große Flexibilität mit sich bringt, jedoch grundlegende Programmierkenntnisse erfordert. Zum Einstieg in die Entwicklung bietet Gatling jedoch auch einen Recorder an, mit dem Zugriffe auf eine Seite mitgeschnitten werden können. Der Recorder erzeugt daraus den Scala-Code für Test, der dann in einer IDE nachbearbeitet werden kann. Aber selbst ohne Recorder ist die DSL einfach zu verstehen und gut dokumentiert, sodass nach einer kurzen Einarbeitungszeit einfach Lasttests erstellt werden können.
Der <b>Recorder</b> wird im Abschnitt weiter unten etwas ausführlicher beschrieben, doch zunächst möchte ich auf die Besonderheit in der Lastgenerierung in Gatling eingehen.
<h3>Event-basierte Lastgenerierung</h3>
<p>
Gatling erzeugt die Last nicht mit Hilfe von Threads, sondern einem Timer, der Events ausläst. Dadurch können reale User leichter mit virtuellen Usern abgebildet werden, zudem besteht keine Rückkopplung vom zu testenden System. Um den Unterschied genauer zu verstehen, schauen wir uns zunächst die Lastgenerierung mit einem Thread-basierten Generator an. </p>
<p>
Bei Thread-basierten Lastgeneratoren werden virtuelle User als Sequenz von Requests abgebildet, die durch einen oder mehrere Threads abgearbeitet werden. Mehrere virtuelle User "teilen" sich dabei einen Thread. Zwischen einzelnen Requests wartet der Thread ‐ die sogenannte Think Time. Über die Think Time können virtuelle User in reale User umgerechnet werden. In Thread-basierten Lastgeneratoren gibt es zwei Verschränkungen:
<ul>
<li>Virtuelle User, die sich einen Thread teilen, sind voneinander abhängig. Folgende virtuelle User müssen auf vorhergehende warten. </li>
<li>Requests eines virtuellen Users, die von einem Thread gesendet werden, sind von der Antwort des zu testenden Systems abhängig. Bevor ein neuer Request gesendet werden kann, muss der vorherige beantwortet werden. Wenn das System durch die höhere Belastung Requests langsamer beantwortet, sinkt durch die Rückkopplung die effektive Last und mit der Zeit pendeln sich Lastgenerator und zu testendes System auf ein gesättigtes Niveau ein.</li>
</ul>
Mit dem asynchronen, nicht-blockierenden Ansatz von Gatling besteht diese Verschränkung nicht, da Ereignisse nur an den Timer gebunden sind und lediglich durch die Kapazität des Event Loops, d. h. der CPU beschräkt werden. Virtuelle User sowie Requests sind so unabhängig voneinander.
<h3>Der Recorder</h3>
Abb. 1: Gatling-Recorder. ‐ © Gerald Mücke
Bevor wir zum Aufbau von Lasttests eingehen, möchte ich noch kurz auf den Recorder von Gatling eingehen. Der Recorder von Gatling ist eine Standalone-Applikation und die einzige Komponente mit einer grafischen Bedienoberfläche. Er kennt zwei Betriebsmodi: Proxy und HAR. Arbeitet er als HTTP Proxy, müssen im Browser die Proxy-Settings auf den Recorder verweisen, andernfalls können keine Requests aufgenommen werden. Sofern man als Entwickler (hoffentlich) die nötigen Berechtigungen dafür hat, kann man so sehr schnell und einfach Skripte aufnehmen.
Etwas umständlich wird es jedoch, wenn die Kommunikation ausschliesslich über https erfolgt und der Browser dem Zertifikat des Recorders nicht vertraut. An dieser Stelle kommt jedoch der zweite Betriebsmodus des Recorders zum Tragen, der meines Erachtens nach die stärkere Funktionalität darstellt &hpyhen; der Import von HAR-Dateien.
HAR steht für HTTP ARchive und ist ein Format, in dem Browser wie Firefox, Chrome aber auch Edge, HTTP-Requests protokollieren und abspeichern. Mithilfe der Entwicklertools des jeweiligen Browsers und deren Netzwerk-Sicht können die HTTP-Requests einer Seite ‐ auch seiten übergreifend ‐ aufgenommen und als HAR exportiert werden.
Der Gatling-Recorder kann diese HAR-Dateien dann direkt in ein Gatling-Szenario umwandeln. Der Vorteil dieser Methode gegenüber dem Proxy-Modus ist, dass man die Request-Sequenzen ohne besondere Einstellungen aus jedem Browser erzeugen kann, keine besonderen Proxy-Einstellungen vornehmen muss, HTTPs-Verbindungen ohne weiteres aufgenommen werden und die Archive zur Wiederverwendung aufbewahrt werden können.
<h3>Bestandteile eines Performance-Tests</h3>
Hat man eine Sequenz von Requests aufgenommen, geht es an die Nachbearbeitung, da oftmals auch unn&puml;tige Requests mit aufgezeichnet wurden. Dazu zählt vor allem das Bereinigen von Anfragen zu Content von anderen Quellen, wie z. B. JavaScript, aber auch statischer Content wie Bilder von CDNs. Schließlich wollen wir beim Lasttest nur ein System testen.
Auch wenn man ein aufgenommenes Script mit Gatling ohne weiteres ausführen kann, empfiehlt es sich, für Wiederverwendung und bessere Wart- und Erweiterbarkeit das Script zu strukturieren.
Ein Lasttest besteht aus drei Hauptelementen:
<ul>
<li>Seitenskripte, die Abfolge von Requests für eine Seite definieren. Auch dynamisch generierte Requests, z. B. für eine Echtzeitsuche, zählen hierzu.</li>
<li>Szenarien, die beschreiben, wie die Benutzermenge sich durch die Applikation navigiert. Dazu gehören neben Eintritts- und Austrittspunkten auch Verzweigungen mit Wahrscheinlichkeiten.</li>
<li>Lastprofile, die beschreiben, mit welcher Rate pro Zeitintervall die Nutzer am System antreffen. </li>
</ul>
Alle drei Elemente werden in einer Simulation zu einem Lasttest zusammengeführt.
<h3>Die Simulation</h3>
Die Simulation bildet den Rahmen um den gesamten Test. Neben den auszuführenden Szenarien sowie das angewandte Lastprofil werden hier die Grundeinstellungen zum verwendeten Protokoll vorgenommen, z. B. das Zielsystem, Verbindungsparameter, Default-Header oder Connection Handling.
Eine Simulation muss zwingend die setUp-Methode der abstrakten Gatling-Simulation-Klasse aufrufen, da darüber das Szenario und die Last-Konfiguration definiert wird. Für einfache Simulationen können zudem Protokoll-Konfigurationen (HTTP) sowie Szenarien definiert werden.
<code><pre>
class Example extends Simulation{
val httpProtocol = http
//base URL für relative Requests im Szenario
.baseURL("http://localhost:8080")
val mySzenario = Szenario("my Szenario").exec(...)
setUp(
mySzenario.inject(
constantUsersPerSec(40) during (20 minutes)
)
).protocols(httpProtocol)
}
</pre></code>
Die Protokoll-Definition erlaubt hierbei das Setup der Verbindungseigenschaften für das HTTP-Protokoll. Normalerweise enthält es mindestens die Base-URL, die zur Auflösung von relativen URLs in den später erklärten Seitenaufrufen verwendet wird. Auf diesem Weg lässt sich das Zielsystem zentral ändern. Außerdem lassen sich Connection-Pooling, Default Header, Resource Management & Caching konfigurieren.
<h5>Page Scripts</h5>
Page Scripts definieren für jede einzelne Seite, welche HTTP-Requests zum Server geschickt werden. Die einfachste Methode, ein Seiten-Skript zu erzeugen, ist der oben beschriebene Recorder, jedoch ist die von Gatling bereitgestellte DSL auch intuitiv genug, um Seiten-Skripte manuell zu erstellen.
Ein Seiten-Skript fängt entweder mit exec() oder group() an. Während group vor allem dazu dient &hyphe; wie der Name schon sagt ‐ Requests zu gruppieren, sodass diese später im Report in einer logischen Einheit dargestellt werden, wird mit exec ein eigentlicher Request abgesetzt, eingeleitet durch http() mit einer URL relativ zum Basispfad der Applikation sowie der HTTP-Method.
<code><pre>
def page = exec( http("ExamplePage").get("/example") )
</pre></code>
Dem so definerten Request lassen sie noch weitere Parameter wie z. B. HTTP-Header oder Ressourcen hinzufügen. Ressourcen sind Folgerequests, die im Kontext der Seite und nach dem initialen Requests abgesetzt werden. Anders als die Seite selbst, werden Ressourcen zudem parallel abgerufen, wobei der Parallelitätsgrad im Simulations-Setup konfigurierbar ist. Für verschiedene Browser gibt es mitgelieferte Defaults.
Eine vollständige Seite mit Ressourcen und einer Reihe von Headern sieht dann so aus:
<code><pre>
def page = exec(
http("ExamplePage")
.get("/example")
.headers(Map(
"Accept" -> "*/*",
"User-Agent" -> "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"))
.resources(
http("Stylesheet")
.get("/css/stylesheet.css")
.headers( Map("Accept" -> "text/css") ),
http("JavaScript")
.get("/js/app.js")
.headers( Map("Accept" -> " application/javascript"))
)
)
</pre></code>
Hier wird dann schon die erste Stärke der Verwendung einer Programmiersprache sichtbar. Wiederkehrende Elemente, wie z. B. die Header-Map lassen sich auslagern und seitenübergreifend wiederverwenden:
<code><pre>
def defaultHeaders = Map(
"Accept" -> "*/*",
"User-Agent" -> "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0")
def page1 = exec(
http("ExamplePage 1")
.get("/example1")
.headers(defaultHeaders)
)
def page2 = exec(
http("ExamplePage 2")
.get("/example2")
.headers(defaultHeaders)
</pre></code>
Natürlich kann man auch andere HTTP-Requests absetzen. So können einem POST Request Payload aus einer externen Datei oder dynamische Form-Parameter beigefügt werden.
<code><pre>
def submitForm = exec(
http("Submit Form")
.post("/submit")
.headers(formHeaders)
.formParam("formField 1", "value 1")
)
def createResource = exec(
http("Create Resource")
.post("/resource")
.body(StringBody("{\"data\":123}"))
)
</pre></code>
Eine weitere Stärke von Gatling bzw. der Verwendung einer Programmiersprache zur Entwicklung der Tests ist die Möglichkeit, Seiten-Skripte auch dynamisch erzeugen zu lassen. Für ein Kundenprojekt musste zum Beispiel die Live-Suche getestet werden. Bei der Live-Suche wird vom Browser während der Sucheingabe, bei jedem eingegebenen Zeichen, ein Such-Request mit der bisher eingetippten Suchfolge abgesetzt.
Die Suche nach einem Wort mit 10 Zeichen hatte also 10 Requests zur Folge, wobei der zeitliche Abstand zwischen den Requests der Tippgeschwindigkeit entsprach. Mit der Funktion im folgenden Beispiel kann eine solche Such-Sequenz anhand eines beliebigen Suchbegriffs erzeugt werden, wobei die erste Suchanfrage ab 3 Zeichen abgesetzt wird (searchThreshold) und die Wartezeit zwischen jedem Request mit 1 Sekunde einer eher langsamen Tippgeschwindigkeit entspricht (paceTime).
<code><pre>
import java.net.URLEncoder
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import scala.concurrent.duration._
def searchRealTime(query: String, paceTime: Duration = 1 second, searchThreshold: Int = 3) = {
group("Search RealTime") {
def feederData = Range(searchThreshold, query.length + 1)
.map(i => query.substring(0, i))
.map(word => Map("rtquery" -> URLEncoder.encode(word, "UTF-8")))
.toList
group("Search (RealTime)") {
foreach(feederData, "rtquery", "counter") {
exec(flattenMapIntoAttributes("${rtquery}"))
.exec( http("${counter}:query='${rtquery}'") //lesbarer name im Report
.get("/search/?query=${rtquery}")) //generierter Query
.pace(paceTime)
}
}
}
}
</pre></code>
<h3>Szenarios</h3>
Szenarien beschreiben die Navigationspfade, die eine Benutzergruppe durch das System verfolgt. Eine Benutzergruppe trifft an einem Einstiegspunkt der Webseite an. Dies ist oftmals die Startseite, kann aber auch ein Direkteinsprung auf einer Unterseite sein, z. B. durch Bookmarks oder Marketing-Kampagnen. Die Benutzergruppe kann sich im Verlauf des Besuchs aufteilen und unterschiedliche Pfade nehmen. Beispielsweise können in einem Webshop einzelne Nutzer nur stöbern, während andere auch etwas kaufen. Schließlich verlassen die Benutzer das System wieder über bestimmte Austrittspunkte. In Gatling lassen sich solche Scenarien über die Ausführung der einzelnen Page Scripte beschreiben.
<code><pre>
def Szenario = Szenario("Browse shop").exec(page1).exec(page2)
</pre></code>
Werden bestimmte Seitenabfolgen häufig wiederverwendet, so ist eine vorherige Definition der Abfolge sinnvoll:
<code><pre>
def pageChain = exec(page1).exec(page2)
def Szenario1 = scnario("Browse shop").exec(pageChain).exec(page3)
def Szenario2 = scnario("Register").exec(pageChain).exec(page4)
</pre></code>
Ein Szenario lässt sich auch aufsplitten. Eine gängige Method ist randomSwitch, bei dem sich die Verzweigung prozentual aufteilen lässt. Wichtig ist hierbei, dass die Prozente von 0 bis 100 angegeben werden und 100 nicht überschreiten dürfen. Alternative Verzweigungsmodi sind uniformRandomSwitch oder roundRobinSwitch.
<code><pre>
def Szenario = scnario("Browse shop")
.exec(chain)
.randomSwitch(
90 -> anonymousBrowsing,
10 -> shopProducts
)
</code></pre>
Neben der Modellierung von einmaligen Abläufen in Kombination mit Ankunftsraten bietet Gatling auch die "klassische" Modellierung von wiederkehrenden Abfragen an. Dabei wird eine Abfolge von Seitenaufrufen im Szenario selbst wiederholt und im Lastprofil lediglich die Anzahl der Benutzer definiert. Dies wird durch eine Reihe von Loop-Konstrukten ermöglicht:
<ul>
<li>repeat ‐ für eine definierte Anzahl von Wiederholungen,</li>
<li> foreach ‐ zum Iterieren über eine Sequenz,</li>
<li> during ‐ zur Wiederholung in einem bestimmten Zeitraum,</li>
<li> asLongAs ‐ Wiederholung bis eine Bedingung nicht mehr erfüllt ist</li> und
<li> forever ‐ zur unbegrenzten Wiederholung.</li>
</ul>
Zum Beispiel:
<code><pre>
def Szenario = scnario("Browse shop")
.during(20 minutes){
exec(page1).exec(page2)
}
</pre></code>
<h3>Lastprofile</h3>
Im Last-Profil wird definiert, mit welcher Rate bzw. wie viele Benutzer in einem bestimmten zeitlichen Verlauf ein Szenario durchlaufen. Dies wird im setup-Block der Simulation über die inject-Methode des Szenarios definiert, der eine Liste von InjectionSteps mitgegeben wird.
<code><pre>
setUp(
mySzenario.inject(
... //injection steps
)
)
</pre></code>
Die Gatling-DSL bietet zahlreiche Injection Steps an. Die wichtigsten für den Alltagsgebrauch dürften der lineare Anstieg der User, sowie konstante oder steigende Ankunftsrate pro Sekunde sein, welche durch die folgend Steps abgebildet werden.
<ul>
<li>rampUsers ‐ zur Abbildung einer fixen Benutzeranzahl, insbesondere zur Modellierung geschlossener Benutzergruppen in Kombination mit einem Loop-Konstrukt wie during (20 minutes),</li>
<li>constantUsersPerSec ‐ zur Abbildung einer konstanten Ankunftsrate. Die dadurch erzeugten Nutzer sind unabhängig voneinander und durchlaufen das Szenario exakt einmal, </li> und
<li>rampUsersPerSec ‐ zur Abbildung einer sich linear verändernden Ankunftsrate. </li>
</ul>
Darüber hinaus gibt es noch ein paar weitere Funktionen für speziellere Szenarien, hier verweise ich jedoch auf die Dokumentation [3].
Ein typisches Lastszenario, bestehend aus einem linearem Ramp-up der User und einer konstanten Last über einen gewissen Zeitraum, sieht dann wie folgt aus:
<code><pre>
setUp(
mySzenario.inject(
rampUsersPerSec(1) to (40) during (4 minutes),
constantUsersPerSec(40) during (20 minutes)
)
).protocols(httpProtocol)
</pre></code>
Im setUp lassen sich auch mehrere Szenarien definieren, die dann nebeneinander abgearbeitet werden. Die Liste an Injection Steps kann aber auch programmatisch generiert werden, um z. B. eine mathematische Funktion durch eine Reihe von rampUsersPerSec-Steps anzunähern, was ein sehr mächtiges Werkzeug für dynamische Lasten ist.
<h3>Integration in Maven</h3>
Wie auch JMeter bietet Gatling ein Maven-Plugin, womit es sich in Continous Integration-Pipelines integrieren lässt, aber auch bei der lokalen Entwicklung hilft, da sich die Simulationen leider nicht direkt über die IDE starten lassen. Ohne weitere Parameter geht das Plugin davon aus, dass es nur eine Simulation ‐ die Scala-Klasse mit dem Simulation-Setup ‐ im Projekt gibt und startet diese. Hat man mehrere Simulationen, lassen sich die Simulationen über den simulationClass- bzw. sc-Parameter der Plugin-Konfiguration bestimmen. Über verschiedene Executions lassen sich so auch mehrere Simulationen in einem Maven-Durchlauf ausführen.
<code><pre>
<plugin>
<groupId>io.gatling</groupId>
<artifactId>gatling-maven-plugin</artifactId>
<executions>
<execution>
<id>moderateLoad</id>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<sc>example.ModerateLoadSimulation</sc>
</configuration>
</execution>
<execution>
<id>highLoad</id>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<sc>example.HighLoadSimulation</sc>
</configuration>
</execution>
</executions>
</plugin>
</pre></code>
Die Simulationen können dann gezielt mit dem @-Operator in Maven gestartet werden:
<code><pre>
mvn gatling:execute@moderateLoad
</pre></code>
Abb. 2: Report. &hyhpen; © Gerald Mücke
<h3>Auswertung</h3>
Gatling generiert nach Ausführung aus dem Request-Log einen sehr anschaulichen Report. In diesem Report sind für die einzelnen Requests sowie Request-Gruppen Antwortzeiten mit Min/Max sowie 75-, 95- und 99-Prozent-Perzentilen sowie die jeweiligen Fehlerraten aufgeführt. Die Statistiken werden optisch ansprechend mit Diagrammen zum zeitlichen Verlauf der aktiven Nutzer, Antwortzeiten, Request- und Response-Anzahl sowie einem Histogramm der Antwortzeiten ergänzt.
</p><p>
Die Reports stehen als interaktive HTML-Seiten zur Verfügung und können so z. B. direkt publiziert oder vom Build Server abgerufen werden. Insbesondere die Diagramme sind anschaulich genug, um selbst Laien im Performance-Test die Ergebnisse verständlich visuell zu kommunizieren. So habe ich beispielsweise in einem Projekt nach einer initialen Erläuterung zur Interpretation der Diagramme täglich lediglich die Diagramme an die Projektleitung rapportiert, wodurch sie sich, ohne mit Details auseinandersetzen zu müssen, schnell einen Überblick über den Stand der Performance-Verbessererungen einer Web-Applikation verschaffen konnte.
</p><p>
Da die Reports aus den Logfiles ausgelesen werden, ist es auch ohne weiteres möglich, mit einem eigenen Parser die Logs zu verarbeiten und detailliertere Auswertungen zu betreiben.
<h3>Zusammenfassung</h3>
<p>
Gatling ist ein Open Source-Werkzeug zur Entwicklung und Ausführung von Lasttests, die in einer Scala DSL entwickelt werden. Damit lassen sich Szenarien besser modularisieren und wiederverwenden als z. B. in JMeter. Ein wesentlicher Unterschied zu JMeter ist zudem, dass die Last nicht-blockierend und asynchron über Ereignisse generiert wird und nicht auf Threads basiert. Damit lassen sich mit gleichem Ressourcenaufwand ungleich höhere Lasten erzeugen. Dem gegenüber steht eine geringere Funktionsvielfalt als bei JMeter, vor allem was die Konnektivität angeht, bei der Gatling lediglich HTTP(s) und JMS unterstützt.
</p><p>
Ich persönlich bevorzuge Gatling, weil die Entwicklung mit einer IDE für mich als Programmierer natürlicher von der Hand geht, als die grafisch unterstützte Entwicklung bei JMeter, und weil ich mit Gatling mit dem programmatischen und event-basierten Ansatz mehr Möglichkeiten habe, Lastkurven und Requestabfolgen zu definieren.
</p>
<h3>Quellen</h3>
Gatling
Apache JMeter
Dokumentation
<h3>Links:</h3>
<a href="https://www.informatik-aktuell.de/entwicklung/programmiersprachen/einfuehrung-in-gatling.html" target=_blank>Informatik-Aktuell - Newsletter :: Gatling</a>
</html>
<html>
Sometimes it is necessary to generate a range of<br>
numbers for further use within a command pipe or<br>
shell script. This can be done with some simple<br>
sh-code:<br>
<br>
<code>
------------------------ CUT HERE ------------------<br>
<br>
#! /bin/sh<br>
#<br>
# range - Generate of numbers.<br>
<br>
lo=$1<br>
hi=$2<br>
<br>
while [ $lo -le $hi ]<br>
do<br>
echo -n $lo " "<br>
lo=`expr $lo + 1`<br>
done<br>
<br>
------------------------ CUT HERE ------------------<br>
</code><br>
It can now be used a way like:<br>
<br><code>
for i in `range 69 4711`; do <some code>; done<br>
</code><br>
This tip generously supported <br>
by: ulli@ucrc.org<br>
<br>
+++++++++++++++++++++++++++++++++++++++++<br>
<b>Anmerkung:</b><br>
<br>
eventuell ist"seq" besser ...<br>
</html>
<html>
<ul>
<li>zwei Werte:
<ul>
<li>der obere Wert: <b>systolischer Druck</b><br />
</li>
<li>der untere Wert: <b>diastolischer Druck</b><br />
</li>
</ul>
</li>
<li><h3>Klassifikation</h3>
<table border="1">
<tr>
<th>Bewertung
</th>
<th>systolisch (mmHg)
</th>
<th>diastolisch (mmHg)
</th>
</tr>
<tr>
<td>optimaler Blutdruck
</td>
<td>> 120
</td>
<td>< 80
</td>
</tr>
<tr>
<td>normaler Blutdruck
</td>
<td>120–129
</td>
<td>80–84
</td>
</tr>
<tr>
<td>hoch-normaler Blutdruck
</td>
<td>130–139
</td>
<td>85–89
</td>
</tr>
<tr>
<td>milde Hypertonie (Stufe 1)
</td>
<td>140–159
</td>
<td>90–99
</td>
</tr>
<tr>
<td>mittlere Hypertonie (Stufe 2)
</td>
<td>160–179
</td>
<td>100–109
</td>
</tr>
<tr>
<td>schwere Hypertonie (Stufe 3)
</td>
<td>> 180
</td>
<td>> 110
</td>
</tr>
<tr>
<td>isolierte systolische Hypertonie
</td>
<td>> 140
</td>
<td>< 90
</td>
</tr>
</table>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.t-online.de/gesundheit/aktuelles/id_100506766/blutdruck-messen-studie-enthuellt-haeufigen-fehler.html"
target="_blank" rel="noreferrer noopener">
T-Online :: Darum sind Ihre Blutdruckwerte moeglicherweise falsch</a>
</li>
<li><a href="https://de.wikipedia.org/wiki/Arterielle_Hypertonie"
target="_blank" rel="noreferrer noopener">
Wikipedia :: Arterielle Hypertonie</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>dunkler Holunderbeersaft;</li>
<li>verhindert, daß Viren in die Körperzellen gelangt;</li>
<li>(altes) Hausrezept</li>
</ul>
</html>
<html>
<ul>
<li>in beiden Fällen handelt es sich künstliche Ausgänge (<em>Stoma</em>);<br />
</li>
<li>das sind Beutel, die im Darmbereich angebracht werden;
</li>
</li>
<li><h3>Colostoma</h3>
künstlicher Dickdarmausgang;
</li>
<li><h3>Ileostoma</h3>
künstlicher Dünndarmausgang;
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.dccv.de/die-dccv/arbeitskreise-der-dccv/pouch/ileoanaler-pouch/"
target="_blank" rel="noreferrer noopener">
DCCV e.V. :: Informationen zum Thema "Ileoanaler Pouch" </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
A safe way of grabbing all "hidden" files is to use <pre><code>'.??*'</code></pre><br>
rather than '.*' since this will only match 3 or more<br>
characters. Admittedly, this will miss any hidden files<br>
that are only a single character after the ., but it<br>
will always miss '.' & '..', which is probably more<br>
important...<br>
<br>
This tip generously supported <br>
by: leopard@midwinter.com<br>
</html>
<html>
You can use ifconfig to lookup IP addresses bound to your box.<br />
If you do not want to search the output from ifconfig, use the<br />
following command to get just the IP listing.<br />
<br /><code>
ifconfig | awk '/inet/{print $2}' | awk -F: '{print $2}'<br />
</code><br />
</html>
<html>
For those who want to get more info on SIGSEGV for<br />
your application in Linux, you can use the following<br />
command <b>"catchsegv"</b>.<br />
<br />
for eg: consider the program (a.c)<br />
<code>
main()<br />
{<br />
char *p = 0;<br />
*p = 'a';<br />
}<br />
</code>
<br />
$cc a.c<br />
$catchsegv a.out #produces the following output<br />
<br />
<code>
*** Segmentation fault<br />
Register dump:<br />
EAX: 00000000 EBX: 4010e1ec ECX: 08048398 EDX: 4010f098<br />
ESI: 4000ae60 EDI: bffffafc EBP: bffffab0 ESP: bffffaac<br />
<br />
EIP: 080483a8 EFLAGS: 00010296<br />
<br />
CS: 0023 DS: 002b ES: 002b FS: 0000 GS: 0000 SS: 002b<br />
<br />
Trap: 0000000e Error: 00000006 OldMask: 00000000<br />
ESP/signal: bffffaac CR2: 00000000<br />
<br />
FPUCW: ffff037f FPUSW: ffff0000 TAG: ffffffff<br />
IPOFF: 00000000 CSSEL: 0000 DATAOFF: 0000ffff DATASEL:<br />
0000<br />
<br />
ST(0) 0000 0000000000000000 ST(1) 0000 cf118de5ab2a5800<br />
ST(2) 0000 feb02a6c405d9ad4 ST(3) 0000 0000000000000000<br />
ST(4) 0000 8000000000000000 ST(5) 0000 8000000000000000<br />
ST(6) 0000 0000000000000000 ST(7) 0000 847fffdee0000848<br />
<br />
Backtrace:<br />
/usr/src/bs/BUILD/glibc-2.1.3/csu/init.c:0(??)[0x80483a8]<br />
/lib/libc.so.6(__libc_start_main+0xff)[0x400369cb]<br />
??:0(_start)[0x8048311]<br />
"csv" 25L, 860C<br />
</code>
</html>
<html>
<ul>
<li>Linux verwendet bei einem Zeilenwechsel das Zeilenvor–<br />
schubzeichen (LF), um das Ende einer Zeile zu markieren;
</li>
<br />
<li>Windows dagegen verwendet die zweistellige Sequenz <br />
<code>CR LF</code> (Carriage Return - Line Feed)
</li>
<br />
<li>How to get rid of ^M in text files using vi.<br>
<code><pre>
:1,$s/^M////g
</pre></code>
But how to get this '^M' in the command line:<br>
<br>
Keep CTRL pressed<br>
and then press v and m.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://linuxpeter.de/2020/05/12/bin-bashm-bad-interpreter-no-such-file-or-directory/"
target="_blank" rel="noreferrer noopener">
LinuxPeter SoftwareBlog :: /bin/bash^M: bad interpreter: No such file or directory</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
To get started with this blank [[TiddlyWiki]], you'll need to modify the following tiddlers:
* [[SiteTitle]] & [[SiteSubtitle]]: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* [[MainMenu]]: The menu (usually on the left)
* [[DefaultTiddlers]]: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You'll also need to enter your username for signing your edits: <<option txtUserName>>
<html>
Ein <b>Gewinnvortrag</b> ist Teil des Eigenkapitals einer <br />
Kapitalgesellschaft (Bilanzposten Gewinnvortrag/Ver- <br />
lustvortrag, § 266 Abs. 3 A. IV. HGB). <br />
<br />
Ein <b>Gewinnvortrag</b> entsteht, wenn nicht der gesamte <br />
Bilanzgewinn ausgeschüttet wird, sondern ein Teil <br />
auf neue Rechnung (d.h. in das nächste Geschäftsjahr) <br />
vorgetragen wird. <br />
<br />
Aus einem Jahresfehlbetrag, der vorgetragen wird, <br />
wird im darauffolgenden Geschäftsjahr ein <b>Verlustvortrag</b> <br />
<br />
<b>Alternative Begriffe:</b> <br />
Ergebnisvortrag, Vortrag auf neue Rechnung. <br />
<br />
<h4>Beispiel</h4>
<h5>Gewinnvortrag:: </h5>
Beispiel: Gewinnvortrag berechnen <br />
<br />
Das Beispiel zum Bilanzgewinn sei an dieser Stelle fortgeführt: <br />
<br />
Beschließt die Hauptversammlung, vom Bilanzgewinn in Höhe von 800.000 € <br />
lediglich 600.000 € auszuschütten, bleibt ein Restbetrag von 200.000 € bestehen. <br />
<br />
Dieser Restbetrag in Höhe von 200.000 € wird auf neue Rechnung im Bilanz- <br />
posten Gewinnvortrag vorgetragen. <br />
<br />
Im Folgejahr stehen diese 200.000 € z.B. für eine Ausschüttung zur Verfügung <br />
(auch wenn kein Jahresüberschuss erzielt wird). <br />
<br />
<h5>Verlustvortrag::</h5>
Beispiel: Verlustvortrag <br />
<br />
Ein Unternehmen erzielt im Geschäftsjahr 2012 einen Jahresfehlbetrag in Höhe <br />
von 200.000 &euro. <br />
<br />
Der Jahresfehlbetrag wird auf neue Rechnung in das Geschäftsjahr 2013 vorgetragen <br />
und in den Bilanzposten Verlustvortrag eingestellt. <br />
<br />
Link:<br />
<a href="http://welt-der-bwl.de/Gewinnvortrag-Verlustvortrag"> http://welt-der-bwl.de/Gewinnvortrag-Verlustvortrag</a> <br />
<br />
anderer Link: <br />
<a href="http://www.wirtschaftslexikon24.com/d/gewinnvortrag/gewinnvortrag.htm"> http://www.wirtschaftslexikon24.com/d/gewinnvortrag/gewinnvortrag.htm </a> <br />
</html>
<html>
<ol start="0">
<li><b>Man löst die reduzierte Differentialgleichung <math mathsize="1.25em">
<mi>x</mi><mo>'</mo><mo>(</mo><mi>t</mi><mo>)</mo><mo>=</mo><mi>f</mi><mo>(</mo><mi>t</mi><mo>)</mo><mo>·</mo><mi>x</mi><mo>(</mo><mi>t</mi><mo>)</mo></math></b><br />
<br />
Diese ist trennbar und die Lösungen sind <math mathsize="1.25em"><mi>x</mi><mo>(</mo><mi>t</mi><mo>)</mo><mo=</mo><mi>C</mi><msup><mi>e</mi><mrow><mi>F</mi><mo>(</mo><mi>t</mi><mo>)</mo></mrow></msup></math><br />
mit <math><mi>C</mi><mo>∈</mo><mi>ℝ</mi></math> und F eine Stammfunktion von f.
</li><br /><li>Man substituiert <math>x(t) = C(t) <msup><mn>e</mn><mn>F(t)</mn></msup></math> (dieser Trick heißt <b>“Variation der Konstanten“</b>). <br /><br />
Die Differentialgleichung wird zu <math mode="display"> C'(t) <msup><mn>e</mn><mn>F(t)</mn></msup> + C(t) <msup><mn>e</mn><mn>F(t)</mn></msup>f(t) = <br />
f (t) C(t) eF(t) + g (t)</math><br />
und vereinfacht zu <math mode="display">C'(t) = g (t) <msup><mn>e</mn><mn>‐F(t)</mn></math>.
</li><br /><li>Man suche eine Stammfunktion <math mode="display">
<mrow>C(t) = c <mo>+</mo><munderover><mo>∫</mo><mrow><msub><mi>t</mi><mn>0</mn></msub></mrow>
<mi>t</mi></munderover> <mi>g</mi><mo>(</mo><mi>s</mi><mo>)</mo> <msup><mi>e</mi><mrow><mo>−</mo><mi>F</mi><mo>(</mo><mi>s</mi><mo>)</mo></mrow></msup><mi>d</mi><mi>s</mi></math>
</ol>
</html>
<html>
<ol start="0">
<li><b>Nullstellen von f sind konstante Lösungen</b><br />
Wenn <math><mrow>f (<msub><mi>x</mi><mn>0</mn></msub>) = 0<mrow></math>,
dann ist <math><mrow>x(t) = <msub><mi>x</mi><mn>0</m></msub></mrow></math> für <math><mrow>t <mo>∈</mo> R</mrow></math> eine Lösung.<br />
<br />
</li><li><b>Wenn <math><mrow>f(<msub><mn>x</mn><mi>0</mi></msub>) <mo>≠</mo> 0</mrow></math></b>, <br />dann trennt man durch
<math><mrow><mfrac><mi>1</mi><mi>f (x(t))</mi></mfrac>
x'(t) = g (t)</mrow></math>.
<br />
<br /></li><li><b>Formale Integration und Substitution x = x(s):</b><br />
<math mode="display">
<munderover><mo>∫</mo><mn></mn><mn>x(t)</mn></munderover>
<mfrac><mi>1</mi><mi>f (x)</mi></mfrac> dx =
<munderover><mo>∫</mo><mn></mn><mn>t</mn></munderover>
<mfrac><mi>1</mi><mi>f (x(s))</mi></mfrac>x'(s) ds =
<munderover><mo>∫</mo><mn></mn><mn>t</mn></munderover>
g (s) ds</math>.
<br />
<br /></li><li><b>Man suche eine Stammfunktion H zu <math>x <mo>↦</mo> <mfrac><mn>1</mn><mn>f(x)</mn> </mfrac></math> <br />
und eine Stammfunktion G zu <math> s <mo>↦</mo> g(s) </math> </b><br />
Es folgt <math mode="display"> H (x(t)) = G(t) + c </math> mit einer Konstanten c.
<br />
<br /></li><li><b>Wenn möglich invertiert man H:</b><br />
<math mode="display">x(t) = <msup><mi>H</mi><mn>inv</mn></msup> (G(t) + c)</math>
<br />
Die Lösung ist aber erst dann vollständig, <br />
wenn auch das Existenzintervall beschrieben wird.
</li></ol>
</html>
<html>
<ul>
<li><h3>NAME</h3>
git-whatchanged - Show logs with difference each commit introduces
</li>
<li><h3>SYNOPSIS</h3>
git whatchanged <option> …
</li>
<li><h3>DESCRIPTION</h3>
Shows commit logs and diff output each commit introduces.
New users are encouraged to use git-log(1) instead. The whatchanged command is essentially the same as git-log(1)
but defaults to show the raw format diff output and to skip merges.
The command is kept primarily for historical reasons; fingers of many people who learned Git long before git log
was invented by reading Linux kernel mailing list are trained to type it.
</li>
<li><h3>EXAMPLES</h3>
<ul>
<li>git whatchanged -p v2.6.12.. include/scsi drivers/scsi
Show as patches the commits since version v2.6.12 that changed any file in the include/scsi or drivers/scsi
subdirectories
</li>
<li>git whatchanged --since="2 weeks ago" -- gitk
Show the changes during the last two weeks to the file gitk. The "--" is necessary to avoid confusion with the
branch named gitk
</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>Git auf Englisch umstellen</h3>
<ul>
<li>Die gute Nachricht ist, dass es eine einfache Lösung gibt, um Git wieder auf Englisch anzuzeigen.
<li>Du kannst in deiner <code>'~/.bashrc'</code>-Datei einen Alias für Git erstellen, der die <code>'LANG'</code>-Variable überschreibt.
<li>Der Befehl dazu lautet:
<pre><code>alias git='LANG=en_US git'</code></pre>
<li>Nachdem du diesen Befehl gespeichert hast, musst du die Datei mit `source ~/.bashrc` einlesen.
<li>Ab diesem Zeitpunkt solltest du Git wieder auf Englisch sehen.
<li>Beachte jedoch, dass wenn die `LC_ALL`-Variable gesetzt ist, du den Alias `git=’LC_ALL=en_US git’` verwenden musst, da `LC_ALL` Vorrang vor `LANG` hat.
<li>
</ul>
</li>
<li><h3>Vorteile von Git auf Englisch</h3>
<table border="1">
<tr>
<th>Vorteil
</th>
<th>Beschreibung
</tr>
<tr>
<td>Bessere Suchergebnisse
</td>
<td>Englische Fehlermeldungen liefern mehr und relevantere Suchtreffer.
</td>
</tr>
<tr>
<td>Standardisierung
</td>
<td>Englisch ist die Standardsprache in der IT-Welt; <br />
viele Ressourcen und Dokumentationen sind auf Englisch verfügbar.
</tr>
<tr>
<td>Verständlichkeit
</td>
<td>Manche Übersetzungen können verwirrend oder unklar sein;<br />
mit Englisch gehst du auf Nummer sicher.
</td>
</tr>
</table>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://ps5forum.de/news/github-auf-deutsch-umstellen/"
target="_blank" rel="noreferrer noopener">
Digital News :: Github auf Deutsch umstellen: Schritt für Schritt erklärt</a>
</li>
</ul>
</html>
<html>
<code><pre>
git add ./qs_sat/*
git commit ./qs_code/*
</pre></code>
</html>
<html>
<ul>
<li>User mcMoneySack (also mich) von der Suche ausschliessen:
<pre><code>‐author:mcMoneySack</code></pre>
</li>
<li>Von den Issues nur die Offenen ausgeben:
<pre><code>is:issue is:open</pre></code>
</li>
<!--
<li>
</li>
<li>
</li>
<li>
</li>
-->
</ul>
</html>
<html>
<b>Cross-Platform System Administration Tip</b><br />
<br />
If you want to set a system path that will apply to all users,<br />
regardless of which shell they use, edit the following file:<br />
<br />
For Solaris: /etc/default/login<br />
For HP-UX: /etc/PATH<br />
For AIX: /etc/environment<br />
</html>
<html>
The primary aim of this cheat sheet is to help Perl <br />
programmers get up and running with Go.
<h2>Your editor</h2>
<h3>vim</h3>
<p>
Consider adding the vim-go plugin to your .vimrc
</p>
<p>
If you're using Pathogen, that would look something like:
<code><pre>
runtime bundle/vim-pathogen/autoload/pathogen.vim
" Bundle: tpope/vim-pathogen
call pathogen#infect()
" Bundle: https://github.com/fatih/vim-go.git
</pre></code>
</p>
<p>
Now, open vim after installing vim-go and enter
<code><pre>
:GoInstallBinaries
</pre></code>
Now you can take advantage of :GoRename when refactoring code and :GoTest in order to test your code without leaving your vim session.
Also, you can add goimports:
First install it:
<code><pre>
go get golang.org/x/tools/cmd/goimports
</pre></code>
Then add the following to your .vimrc
<code><pre>
let g:go_fmt_command = "goimports"
</pre></code>
Lastly, if your editor is set up to display tabs, you may want to disable that for Go files.
<code><pre>
autocmd FileType go setlocal nolist
</pre></code>
<b>shortcuts</b><br />
daf in vim will now allow you to cut an entire function without first needing to select it.
<h3>Go vs Perl</h3>
In this section we'll document some commonly used Perl constructs and try to find their equivalents in Go.
<h3>Comments</h3>
Perl:
# single line
=pod
Multi line
=cut
Go:
// single line (C++-style)
/*
Multi-line (C-Style)
*/
Print
Printing strings
Perl:
print 'hello, world';
Go:
package main
import "fmt"
func main () {
fmt.Println("hello, world")
}
Formatted print statements.
Perl:
printf('We are open %i days per %s', 7, 'week');
Go:
package main
import ( "fmt" )
func main() {
fmt.Printf("We are open %d days per %s", 7, "week")
}
See golang.org/pkg/fmt/
Printing from within a test
Perl:
diag 'foo happens';
Go:
t.Log("foo happens")
t.Logf("We are open %d days per %s", 7, "week")
Variables
Variable Assignment
Perl:
my $foo = 'bar';
my $pi = 3.14;
Go:
// the following assignments are equivalent
var foo = "bar"
foo := "bar"
var pi float32 = 3.14 // explicit cast as float32
pi := float32(3.14) // explicit cast as float32
pi := 3.14 // implicit cast as float64
pi := "3.14" // implicit cast as string
Instantiate multiple variables at once
Perl:
my ($one, $two, $three);
Go:
var one, two, three string
<h3>Double vs Single Quotes</h3>
<ul>
<li><b>Perl:</b><br />
my $foo = 'bar'; // no variable interpolation<br />
my $bar = "$foo baz"; // allow for variable interpolation
</li><br />
<li><b>Go:</b><br />
foo := "本" // implicitly cast as a string<br />
foo := '本' // implicitly cast as a rune<br />
<br />
See <a hrefo"golang.org/ref/spec#Rune_literals" target=_blanks>Go lang :: Rune literals</a>
</li></ul>
<h2>Multiple Variables</h2>
<h3>Declare without explicit values</h3>
<ul>
<li><b>Perl:</b></li>
my ($foo, $bar);
<li><b>Go:</b></li>
var foo, bar int
</ul>
Declare with explicit values
Perl:
my ($i, $j) = (1, 2);
Go:
var i, j int = 1, 2
Checking for (un)definedness
Perl:
my $foo;
if ( ! defined $foo ) {
...;
}
Go:
var myString string
if myString == "" {
fmt.Println("Empty")
}
var mySlice []int
if mySlice == nil {
fmt.Println("nil")
}
String Concatenation
Perl:
my $foo = 'go';
my $bar = 'pher';
$gopher = "$foo$bar";
$gopher = $foo . $bar;
$gopher = join q{}, $foo, $bar;
$gopher = sprintf '%s%s', $foo, $bar;
Go:
foo := "go"
bar := "pher"
gopher := foo + bar
gopher := fmt.Sprintf("%s%s", foo, bar)
package main
import (
"bytes"
"fmt"
)
func main() {
var buffer bytes.Buffer
foo := "go"
bar := "pher"
buffer.WriteString(foo)
buffer.WriteString(bar)
fmt.Println(buffer.String())
}
Constants
Perl:
use Const::Fast;
const my $hello => 'Hello, world';
Go:
// Create an *untyped* string constant
const hello = "Hello, world"
// Create a typed string constant
const hello string = "Hello, World"
Constants cannot be declared using the := syntax.
Arrays
Create an Array
Perl:
my @foo = (1..3);
my $first = $foo[0];
Go:
foo := [3]int{1,2,3}
first := foo[0]
Size of an array:
Perl:
my $size = @array;
Go
size := len(array)
Hashes / Structs
Perl:
use Data::Printer; # exports p()
my %foo = (
X => 1,
Y => 2,
);
$foo{X} = 4;
print $foo{X}; # prints 4
p %foo;
# prints:
# {
# X => 4,
# Y => 2,
# }
delete $foo{X};
Go:
package main
import "fmt"
type Vertex struct {
X int
Y int
}
func main() {
v := Vertex{1, 2}
v.X = 4
fmt.Println(v.X) // prints 4
fmt.Printf("%+v\n", v) // prints {X:4 Y:2}
// additional examples
v1 = Vertex{1, 2} // has type Vertex
v2 = Vertex{X: 1} // Y:0 is implicit
v3 = Vertex{} // X:0 and Y:0
delete(v, "X")
}
See tour.golang.org/moretypes/5
<h3>Dumping Data Structures</h3>
<b>To your terminal</b><br />
<code><b>Perl:</b></code>
<code><pre>
use strict;
use warnings;
use feature qw( say );
use Data::Printer; # exports p() and np()
my %foo = ( a => 'b' );
p( %foo );
# or
say np( %foo );
</pre></code>
<code><b>Go:</b></code>
<code><pre>
package main
import "fmt"
func main() {
var config struct {
user string
pass string
}
config.user = "florence"
config.pass = "machine"
fmt.Printf("%+v", config)
return
}
</pre></code>
Or:
<code><pre>
package main
import "github.com/davecgh/go-spew/spew"
func main() {
var config struct {
user string
pass string
}
config.user = "florence"
config.pass = "machine"
spew.Dump(config)
return
}
</pre></code>
<b>To disk (write)</b><br />
<code><b>Perl:</b></code>
<code><pre>
use Data::Printer; # exports np()
use Path::Tiny qw(path);
my @list = ( 1..3 );
path('/tmp/foo.txt')->spew( np( @list ) );
</pre></code>
<code><b>Go:</b></code>
<code><pre>
package main
import (
"log"
"os"
"github.com/davecgh/go-spew/spew"
)
func main() {
list := [3]int{1, 2, 3}
file, err := os.OpenFile(
"/tmp/foo.txt",
os.O_CREATE|os.O_WRONLY,
0666,
)
if err != nil {
log.Fatal(err)
}
spew.Fdump(file, list)
file.Close()
}
</pre></code>
<b>To disk (append)</b><br />
<code><b>Perl:</b></code>
<code><pre>
use Data::Printer; # exports np()
use Path::Tiny qw(path);
my @list = ( 1..3 );
path('/tmp/foo.txt')->append( np( @list ) );
</pre></code>
<code><b>Go:</b></code>
<code><pre>
package main
import (
"log"
"os"
"github.com/davecgh/go-spew/spew"
)
func main() {
list := [3]int{1, 2, 3}
file, err := os.OpenFile(
"/tmp/foo.txt",
os.O_APPEND|os.O_CREATE|os.O_WRONLY,
0666,
)
if err != nil {
log.Fatal(err)
}
spew.Fdump(file, list)
file.Close()
}
</pre></code>
<h3>Flow Control</h3>
<b>if</b><br />
<code><b>Perl:</b></code>
<code><pre>
if ( $foo > 1 ) {
print 'bar';
}
</pre></code>
<code><b>Go:</b></code>
<code><pre>
if ( foo > 1 ) {
fmt.Println("bar")
}
// parens are optional
if foo > 1 {
fmt.Println("bar")
}
</pre></code>
<b>else</b><br />
Perl:
if ( $foo > 1 ) {
print 'bar';
}
else {
print 'baz';
}
Go:
if foo > 1 {
fmt.Println("bar")
} else {
fmt.Println("baz")
}
Loops
For loops
Perl:
my $sum;
for ( my $i = 0 ; $i < 10 ; $i++ ) {
$sum += $i;
}
Go:
sum := 0
for i := 0; i < 10; i++ {
sum += i
}
While loops
Perl:
my $sum = 0;
my $i = 0;
while ( $i < 10 ) {
$sum += $i++;
}
Go:
// The init and post statement in a Go for loop are optional.
sum := 0
i := 0
for i < 10 {
sum += i
i += 1
}
Infinite loops
Perl:
while (1) {
}
Go:
for {
}
Running Tests
Perl:
$ perl Makefile.PL
$ make
$ make test
or
$ prove -l t/path/to/test.t
Go:
$ go test
To test a subset of functions:
$ go test -run regexp
<h3>Link:</h3>
<a href="https://github.com/oalders/go-for-perl-hackers" target=_blank>GitHub :: Go-for-perl-hackers</a>
</html>
<html>
At a US government site, most of<br />
the maintenance cron jobs ran at<br />
noon, because testing showed that<br />
to be the least used time in any 24-hour<br />
weekday. Some users were around at all<br />
hours of the night, but everyone went to<br />
lunch!<br />
<br />
Tibor Pollerman<br />
</html>
<html>
<ul>
<li>Codezeile oben einfügen: Ctrl + M A</li>
<li>Codezeile unten einfügen: Ctrl + M B</li>
<li>Laufzeit neu starten: Ctrl + M</li>
<li>Kommentar hinzufügen: Ctrl + Alt + M</li>
</ul>
</html>
<html>
<ul>
<li>Das ist ein kostenloses, Software-as-a-Service-Online-Office von Google <br />
zur Erstellung von Textdokumenten, Tabellen, Präsentationen und Fragebögen.</li>
<li>Der Dienst ist voll in den Filehosting-Dienst Google Drive integriert, in den<br />
alle erstellten Dokumente automatisch gespeichert werden.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://finanzielle-freiheit-dividende-blog.de/2020/07/3-neue-comdirect-dividenden-aktien-sparplaene/" target=_blank>Marco Wunram (bei dem habe ich es das erste Mal gelesen …)</a></li>
<li><a href="https://de.wikipedia.org/wiki/Google_Docs,_Sheets,_Slides_und_Forms" target=_blank>Wikipedia</a>
<li>https://www.e-recht24.de/artikel/datenschutz/6843-google-analytics-datenschutz-rechtskonform-nutzen.html</li>
<li>https://www.google.com/intl/de/sheets/about/</li>
<li>https://docs.google.com/spreadsheets/d/1JJlY3HIy1zwOT36TScrWYORf4HvuKR43VEhSUJS_8Ps/edit#gid=1209285505</li>
<li>https://www.e-recht24.de/artikel/datenschutz/6203-datenschutz-bei-tracking-webcontrolling-analysetools.html</li>
<li>https://support.google.com/analytics/answer/1012044?hl=de</li>
<li>https://www.google.com/sheets/about/</li>
</ul>
</html>
<html>
To easily select all hidden files, use the<br />
following:<br />
<br /><code>
.[^.]* ..?*<br />
</code><br />
For example,<br />
<br /><code>
echo .[^.]* ..?*<br />
</code><br />
will output a list of all hidden files in your<br />
current directory.<br />
<br />
<b>.[^.]*</b> selects all files starting with a dot but NOT<br />
having a dot as their second character.<br />
<br />
<b>..?*</b> selects all files starting with two dots and<br />
having at least one additional character.<br />
<br />
Together, they will retrieve ANY file starting with '.'<br />
except '.' and '..' (even tricky ones like '...hideme').<br />
<br />
The ^ (caret) symbol can be used as the first character<br />
inside [ ] at any time to say "not one of the following"<br />
rather than the usual "any one of the following."<br />
<br />
[^0-9a-fA-F] will match any character that <br />
is NOT a hex digit.<br />
<br />
This tip generously supported by: <br />
wurzel@concentric.net<br />
</html>
<html>
<ul>
<li>Ein Build-Management-System</li>
<br />
<li>verwendete Sprache: Groovy<br />
⇒ sämtliche Build-Skripte <br />
sind in Groovy geschrieben</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="http://www.gradle.org" target=_blank>Gradle :: Homepage</a><li>
</ul>
</html>
<html>
<ul>
<li>Enterprise Log Management for All</li>
<li>Open Source Camp, 14.06.2018, Berlin </i>
<li><a href="https://www.graylog.org/" target=_blank>Homepage</a></li>
</ul>
</html>
<html>
In some directories such as /etc you have a mix of <br>
file types. You may want to grep out a string from<br>
one of the files but don't want to worry about the<br>
binaries, data, etc. To accomplish this, searching<br>
only text files do this:<br>
<br>
<code>
grep <string> `file * | egrep 'script|text' | awk -F: '{print $1}'`<br>
</code>
<br>
This tip generously supported <br>
by: Richard.place-eds@eds.com<br>
</html>
<html>
EinfuehrungInGroovy_groovy-einfuehrung.pdf, S. 4
</html>
<html>
<ul>
<li>Kommentare:<br />
<ul>
<li>einzeilig: // </li>
<li>mehrzeilg: </li>
</ul> </l><br />
<li> </l><br />
</ul>
</html>
<html>
<ul>
<li>Groovy ist eine Programmiersprache und Skriptsprache, die <br />
dynamische und statische Typisierung unterstützt. Sie zählt zu <br />
den Sprachen, die auf der Java Virtual Machine ausgeführt <br />
werden, was eine Verfügbarkeit für viele Plattformen wie ins-<br />
besondere Linux, Mac OS X und Windows ermöglicht.</li>
<br />
<li>Groovy ist ähnlich wie Java gestaltet;</li>
<br />
<li>Groovy besitzt einige Fähigkeiten, die in Java <b><u>nicht</u></b> vorhanden sind:<br />
<ul>
<li>Native Syntax für Maps, Listen und Reguläre Ausdrücke,</li>
<li>ein einfaches Templatesystem, mit dem HTML- und <br />
SQL-Code erzeugt werden kann,</li>
<li>eine XQuery-ähnliche Syntax zum Ablaufen von Objektbäumen,</li>
<li>Operatorüberladung</li>
und
<li>eine native Darstellung für BigDecimal und BigInteger.</li>
</ul>
</li>
<br />
<li>Groovy wird vor dem Ablauf eines Skripts direkt in Java-Bytecode <br />
übersetzt. Dh. Groovy-Skripte werden versteckt für den Entwickler <br />
durch den Compiler automatisch in Klassen eingepackt und mit<br />
einer main() -Methode versehen.</li>
<br />
<li>Groovy wird aufgrund der einfachen Handhabung von BigDecimal<br />
unter anderem im Finanzbereich eingesetzt.</li>
<br />
<li>Groovy gilt als besser integriert als die meisten anderen Skript‐<br />
sprachen auf der JVM. Dies ermöglicht eine einfache Nutzung<br />
enstehender Bibliotheken oder die Nutzung von Groovy‐Objekten<br />
und ‐Klassen in Java.</li>
<br />
<li>Für Groovy existieren Plugins für Eclipse, IntelliJ IDEA, <br />
NetBeans, vim und Emacs.</li>
</ul>
<br />
Links:<br />
<a href="https://de.wikipedia.org/wiki/Groovy">https://de.wikipedia.org/wiki/Groovy</a><br />
<a href="http://www.oio.de/public/java/groovy/groovy-einfuehrung.htm">http://www.oio.de/public/java/groovy/groovy-einfuehrung.htm</a><br />
http://java.ociweb.com/javasig/knowledgebase/2006-12/GroovyIntro.pdf (<i>downloaded</i>)<br />
http://www.oracle.com/technetwork/developer-tools/jdev/introduction-to-groovy-128837.pdf (<i>downloaded</i>)<br />
<br />
</html>
<html>
<ul>
<li><b>groovy</b></li>
<ul>
<li>der Groovy-Starter;</li><br />
<li>CMDLine-Befehl, der dazu dient, das als Quelldatei<br />
vorliegende Groovy-Programm direkt auszuführen</li><br />
<li>die Datei muß enthalten:<br />
entweder
<ol><li>ein Groovy-Skript, ohne explizite Klassendefinition</li>
oder<br />
<li>eine für Groovy ausführbare Klasse beinhalten,<br />
die eine Java-Main-Klasse oder eine Klasse, die java.lang.Runnable,<br />
groovy.util.GroovyTestCase oder groovy.util.GroovyTestSuite<br />
implementiert</li> </ol>
</li><br />
<li>mögliche File-Endungen:<br />
.groovy, .gy, .gvy, .gsh oder keine</li><br />
</ul>
<br />
<li><b>groovyc</b></li>
<ul>
<li>der Groovy-Compiler</li><br />
<li>dient dazu, Groovy-Quellprogramme in Java-Klassendateien <br />
zu &uumbl;bersetzen, die wie normale Java-Programme ausge-<br />
führt werden können</li>
</ul>
<br />
<li><b>groovysh</b></li>
<ul>
<li>die Groovy-Shell</li><br />
<li>ermöglicht interakvite Eingabe von Groovy-Skripten in der<br />
Konsole → die Eingabe wird mit „go“ abgeschlossen</li><br />
<li>um die Shell zu verlassen: <br />
<code>exit</code> oder <code>quit</code></li>
</ul>
<br />
<li><b>GroovyConsole</b></li>
<ul>
<li>die interaktive Konsole<br />
→ sie stellt eine minimale Entwicklungsumgebung bereit<br />
→ Zwei Teilfenster:
<ul><li>Eingabe Groovy-Skript</li><li>Ausgabe der Ergebnisse</li></ul></li>
</ul>
<br />
<img src="./pictures/groovyConsole.png" width=577 height=475>
<br />
</ul>
</html>
<html>
Memory Resources available on HP system:<br />
<br /><code>
# swapinfo<br />
</code><br />
Lists the memory used and available <br />
on that particular system.<br />
<br />
This tip generously supported<br />
by: srinu.sasubilli@wipro.com<br />
</html>
<html>
To remove unused s/w and free<br />
disk space in hp-ux use the command:<br />
<code><pre>freedisk [-a n] [-v]</pre></code>
Note: See man page for this before executing this..<br />
</html>
<html>
If you have run command pwconv to convert to secure<br />
password and later want to undo it, here it how;<br />
<br /><code>
/etc/tsconvert -r<br />
</code><br />
This only for HP Unix and no man pages for this.<br />
<br />
This tip generously supported <br />
by: tyl@computer.org<br />
</html>
<html>
<ul>
<li><h3><audio>: The Embed Audio element</h3>
<ul>
<li>The <audio> HTML element is used to embed sound<br />
content in documents. It may contain one or more au–<br />
dio sources, represented using the src attribute or the<br />
<source> element: the browser will choose the most<br />
suitable one. It can also be the destination for streamed<br />
media, using a MediaStream.<br />
</li>
<li><pre><code><figure>
<figcaption>Listen to the T-Rex:</figcaption>
<audio controls src="/media/cc0-audio/t-rex-roar.mp3"></audio><br />
<a href="/media/cc0-audio/t-rex-roar.mp3"> Download audio </a>
</figure></code></pre>
wird zu:<br />
<figure>
<figcaption>Listen to the T-Rex:</figcaption>
<audio controls src="/media/cc0-audio/t-rex-roar.mp3"></audio><br />
<a href="/media/cc0-audio/t-rex-roar.mp3"> Download audio </a>
</figure>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio"
target="_blank" rel="noreferrer noopener">
MDN Mozilla Firefox - Developer :: <audio>: The Embed Audio element </a>
</li>
</ul>
</html>
<html>
Ein p-Element definiert einen Textabsatz. <br />
p steht dabei für paragraph, also Absatz, Abschnitt.
</html>
<html>
<p>
Mit nachfolgendem HTML Code kann man auf einer Webseite <br />
das Datum anzeigen lassen.
</p>
<code><pre>
<a href="http://www.ixq.de/datum/" target="_blank"><img src="http://www.ixq.de/datum/datum1.php" border="0" alt="heutiger Tag"></a>
</pre></code>
→ Ausgabe: <br />
<a href="http://www.ixq.de/datum/" target="_blank"><img src="http://www.ixq.de/datum/datum1.php" border="0" alt="heutiger Tag"></a>
<p>
<h3>Alternativ mit JavaScript:</h3>
</p>
<details><summary>Code</summary>
<code><pre>
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function updateTime() {
var date = new Date();
var stunden = date.getHours();
var minuten = date.getMinutes();
var tag = date.getDate();
var monatDesJahres = date.getMonth();
var jahr = date.getFullYear();
var tagInWoche = date.getDay();
var wochentag = new Array("Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag");
var monat = new Array("Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember");
var datum = wochentag[tagInWoche] + ", " + tag + ". " + monat[monatDesJahres] + " " + jahr + " " + stunden + ":" + minuten;
document.getElementById('time').innerHTML = datum;
setTimeout(updateTime, 60000);
}
window.addEventListener("load", updateTime);
</script>
</head>
…
<body>
<div id="time">
</div>
</body>
</html>
</pre></code>
</details>
<p>
<h3>Eine weitere Alternative, mit PHP: </h3>
s. <a href="https://www.schattenbaum.net/php/datum.php" target=_blank>Schattenbaum :: Datum</a>
</p>
<h3>Alternative mit CSS:</h3>
<p><pre><code><div>
<script>
const optionsY = {
year: 'numeric',
};
const optionsM = {
month: 'numeric',
};
date_year = new Date().toLocaleDateString('de-DE', optionsY);
date_month = new Date().toLocaleDateString('de-DE', optionsM);
document.write(date_year);
document.write(date_month);
</script>
</div></code></pre>
</p>
<h3>Links:</h3>
<ul>
<li><a href="http://www.ixq.de/datum.php" target=_blank>IXQ :: Daum in HTML anzeigen lassen</a></li>
<li><a href="https://www.html-seminar.de/forum/thread/4109-aktuelles-datum-und-uhrzeit-in-html-integrieren-vielen-dank-an-lauras-f%C3%BCr-die-l%C3%B6/" target=_blank>HTML-Seminar - Forum</a></li>
<li><a href="https://www.schattenbaum.net/php/datum.php" target=_blank>Schattenbaum :: Datum</a></li>
<!--li><a href="" target=_blank></a></li-->
<li><a href="" target=_blank></a></li-->
</ul>
</html>
<html>
Zu viel Information oder zu viele Bedienelemente gleichzeitg <br />
wirken erschlagend und verwirrend auf Anwender. In manchen<br />
Fällen ist es deshalb sinnvoll, vollständige Inhalte nur auf expli‐<br />
zite Anforderung des Anwenders hin anzuzeigen. Lösbar war <br />
diese Aufgabe schon seit langem, jedoch erforderte sie Scripting.<br />
<br />
HTML5 führt eine Möglichkeit ein, um aufklappbare Details<br />
direkt in HTML zu definieren.
<h3>Code:</h3>
<code><pre>
<details>
<summary>Übungen zu Kapitel 1</summary>
<ul>
<li><a href="/?exercise=A1E1">Grammar: simple past tense</a></li>
<li><a href="/?exercise=A1E2">Vocabulary: things to eat</a></li>
<li><a href="/?exercise=A1E3">Fun: watch the apes</a></li>
</ul>
</details>
<details>
<summary>Übungen zu Kapitel 2</summary>
<ul>
<li><a href="/?exercise=A2E1">Story: to be the first one</a></li>
<li><a href="/?exercise=A2E2">Grammar: would</a></li>
<li><a href="/?exercise=A2E3">Vocabulary: traffic</a></li>
</ul>
</details>
</pre></code>
<h3>Darstelltung:</h3>
<details>
<summary>Übungen zu Kapitel 1</summary>
<ul>
<li><a href="/?exercise=A1E1">Grammar: simple past tense</a></li>
<li><a href="/?exercise=A1E2">Vocabulary: things to eat</a></li>
<li><a href="/?exercise=A1E3">Fun: watch the apes</a></li>
</ul>
</details>
<details>
<summary>Übungen zu Kapitel 2</summary>
<ul>
<li><a href="/?exercise=A2E1">Story: to be the first one</a></li>
<li><a href="/?exercise=A2E2">Grammar: would</a></li>
<li><a href="/?exercise=A2E3">Vocabulary: traffic</a></li>
</ul>
</details>
<h3>Erklärung</h3>
Mit
<code><pre><details> … </details></pre></code>
markiert man einen Bereich, der aus einem immer angezeigten, <br />
durch Anklicken aufklappbaren Inhalt besteht. Der immer ange‐<br />
zeigte, anklickbare Inhalt wird im unmittelbaren Anschluss an das<br />
einleitende <code><details></code>-Element mit <code><summary> … </summary></code> <br />
markiert. <br />
<br />
Der restliche Inhalt des details-Elements wird nur angezeigt, <br />
wenn er sich im aufgeklappten Zustand befindet. Das summary&hyphen<br />
Element verhält sich als Toggle-Element. Ein Klick öffnet den<br />
Inhalt, der nächste Klick schließt ihn wieder, der übernächste <br />
öffnet ihn wieder usw.
<h3>Links:</h3>
<a href="http://webkompetenz.wikidot.com/html-handbuch:details" target=_blank>Webkompetenz :: Handbuch</a>
</html>
<html>
Man kann dem Anwender eine Liste mit festen Einträgen anbieten, <br />
aus der er einen Eintrag auswählen kann. Der Text des ausgewählten <br />
Eintrags wird übertragen, wenn der Anwender das Formular abschickt. <br />
<br />
<code><b><select> </b></code>leitet eine Auswahlliste ein. Jede Auswahlliste sollte einen <br />
internen Bezeichnernamen erhalten, und zwar mit dem Attribut name, damit ihr <br />
Wert von der Zielseite verarbeitet werden kann. <br />
<br />
Mit dem Attribut <code>size</code> bestimmen Sie die Anzeigegröe der Liste, <br />
also die Anzahl der Zeilen bzw. gleichzeitig anzuzeigenden Einträge. Wenn die <br />
Liste mehr Einträge enthält als angezeigt werden, kann der Anwender in <br />
der Liste scrollen. Wenn Sie size="1" angeben oder das Attribut ganz weglassen, <br />
definieren Sie eine so genannte “Dropdown-Liste“.<br />
<br />
Mit <code><option> … </option></code>definieren Sie zwischen dem einleitenden <code><select></code>-Tag <br />
und dem Abschluss-Tag <code></select></code> jeweils einen Eintrag der Auswahlliste. <br />
Hinter <code><option></code> muss der Text des Listeneintrags stehen. Sie können so viele <br />
Listeneinträge definieren, wie Sie wollen. Ein Abschluss-Tag <code></option></code> ist <br />
zwar optional, im Hinblick auf verarbeitende Programmiersprachen aber dringend <br />
zu empfehlen. <br />
<br />
Um einen Eintrag der Auswahlliste vorzuselektieren, geben Sie im einleitenden <br />
<code><option></code>-Tag des betreffenden Eintrags das Attribut selected an. <br />
<br />
<code><pre>
<form action="select.html">
<label>Künstler(in):
<select name="top5" size="5">
<option>Heino</option>
<option>Michael Jackson</option>
<option>Tom Waits</option>
<option>Nina Hagen</option>
<option>Marianne Rosenberg</option>
</select>
</label>
</form>
</pre></code>
<h3>Link:</h3>
<a href="https://wiki.selfhtml.org/wiki/HTML/Formulare/Auswahllisten" target=_blank>SelfHTML :: Auswahllisten</a><br />
<a href="https://www.edv-lehrgang.de/auswahlmenue-dropdownliste-in-html/" target=_blank>EDV-Lehrgang :: Dropdownliste</a>
</html>
<html>
<ul>
<li>Bild einfügen mit den wichtigsten Attributen:
<code><pre>
<img src="Pfad / Filename" width=120 height=130 title="<i><Tooltip></i>" alt="<i><alternativer-Text></i>"/>
</pre></code>
Die Werte-Angaben sind in Pixel.<br />
</li>
<br />
<li>Bei "title" wird ein Tooltip angezeigt, wenn mit der Maus<br />
über das Bild gefahren wird.<br />
</li>
<li><h3>Der Alt-Tag</h3>
<ul>
<li>Der alt-Tag (kurz für „alternative Text“) wird in HTML verwendet, <br />
um einen alternativen Text für ein Bild anzugeben, der angezeigt<br />
wird, wenn das Bild aus irgendeinem Grund nicht geladen werden<br />
kann.
</li>
<li>Er spielt auch eine wichtige Rolle für die Barrierefreiheit, da<br />
Bildschirmleseprogramme (Screenreader) für blinde und <br />
sehbehinderte Nutzer den im alt-Tag angegebenen Text<br />
vorlesen können.
</li>
<li>Durch den alt-Tag können Suchmaschinen und andere<br />
Technologien den Inhalt eines Bildes besser verstehen,<br />
da sie den angegebenen Text als Beschreibung oder<br />
Erklärung des Bildinhalts verwenden können.
</li>
<li>Ein weiterer Vorteil des alt-Tags ist, dass er bei lang–<br />
samen Internetverbindungen oder beim Durchsuchen<br />
von Webseiten ohne Bildanzeige (z. B. in einigen<br />
Textbrowsern) als Platzhalter für das Bild dient.
</li>
<li>Das Fehlen eines alt-Tags oder das Bereitstellen<br />
eines irrelevanten oder ungenauen alt-Textes<br />
kann sowohl die Benutzererfahrung als auch<br />
die SEO-Performance einer Webseite negativ<br />
beeinflussen.
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://html-einfach.de/html/bilder-mit-html-einbinden/"
target="_blank" rel="noreferrer noopener">
html–einfach.de :: HTML Bild einfügen (Anleitung + Code zum Kopieren)</a>
</li>
</ul>
</html>
<html>
<ul>
<li>die alternative Version (ohne MathML) ist mit<br />
der <em> fraction slash entity</em>, <code><b>&frasl;</b></code> möglich:
<pre><code><sup>1</sup>&frasl;<sub>2</sub></code></pre>
wird zu:
<pre><code><sup>1</sup>/<sub>2</sub></code></pre>
<h3>Links:</h3>
<ul>
<li><a href="https://stackoverflow.com/questions/7525977/how-to-write-fraction-value-using-html"
target="_blank" rel="noreferrer noopener">
StackOverflow :: How to write fraction value using html?</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li><h3>Tiefstellen über <sub></h3>
<ul>
<li>Hier am Beispiel der chemischen Formel<br />
für Wasser H2O, bei der die Zahlen tief–<br />
gestellt werden:
<pre><code>H<sub>2</sub>O</code></pre>
Merkhilfe für <sub> - die Subway (U-Bahn)<br />
fährt vorwiegend unterirdisch.<br />
</li>
</ul>
<br />
<li><h3>Hochstellen über <sup></h3>
<ul>
<li>Hochstellen wird bei Literaturangaben <br />
benötigt, um die Verweiszahlen in klei–<br />
ner Schrift hochzustellen, z.B. Literatur–<br />
angabe1:
<pre><code>Literaturangabe<sup>1</sup></code></pre>
Merkhilfe für <sup> - Superman fliegt<br />
meistens hoch durch die Lüfte.
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.html-seminar.de/hochstellung-sup-tiefstellung-sub.htm"
target="_blank" rel="noreferrer noopener">
HTML-Seminar :: Formatieren von Text oder Zahlen als hochgestellt oder tiefgestellt </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
Es gibt folgende zwei Möglichkeiten:
<ol>
<li><h3>Verwenden der Eigenschaft margin‐left:</h3>
Diese Eigenschaft wird verwendet, um links von einem Element einen<br />
Rand hinzuzufügen. Es kann verwendet werden, um den erforderlichen<br />
Einzug hinzuzufügen, indem der benötigte Platz in geeigneten Längen‐<br />
einheiten oder Prozent angegeben wird:
<code><pre>
<head>
<style>
p {
margin‐left: 40px;
}
</style>
</head>
</pre></code>
</li>
<li><h3>Verwenden der Eigenschaft text‐indent:</h3>
Diese Eigenschaft wird verwendet, um den Abstand vor der ersten<br />
Textzeile in einem Absatz festzulegen. Sie kann wahlweise in Län‐<br />
geneinheiten oder prozentual angegeben werden:
<code><pre>
<head>
<style>
p {
text‐indent: 40px;
}
</style>
</head>
</pre></code>
</li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://de.acervolima.com/wie-kann-man-text-in-html-mit-css-einrucken/"
target="_blank" rel="noreferrer noopener">
Acervo Lima: Wie kann man Text in HTML mit CSS einrücken?</a></li>
</ul>
</html>
<html>
<code><pre>
<div style="text-indent:50px;">Mantra :: <b>Commit early and often!</b></div>
</pre></code><br />
Als Code:
<code><pre>
<div style=“text-indent:50px;“> … </div>
</pre></code>
<h3>Link:</h3>
<a href="https://www.html.de/threads/text-einruecken.12973/" target=_blank>html.de :: Text einrücken</a>
</html>
<html>
<code><pre>
…
<div style="text-indent:10px;">10px - Einzug</div>
…
</pre></code>
Der Code dazu ist:<br />
<b>
<div style=“text-indent:10px;“> <em>Text</em> </div></b>
<br />
<h3>Links:</h3>
<ul>
<li><a href="https://www.html.de/threads/text-einruecken.12973/" target=_blank>html.de :: Thread</a></li>
</ul>
</html>
<html>
<ul>
<li>Seitenumbruch vor HTML-Element :: <br />
Steuert, ob beim Ausdruck einer Webseite ein Seitenumbruch <b>vor</b><br />
dem HTML-Element erzwungen oder ignoriert wird.
</li>
<li>Beispiel:
<code><pre>
<h1 <b>style=“page‐break‐before:always</b>“>Überschrift mit Seitenumruch oberhalb</h1>
</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.css-wiki.com/css-eigenschaft/page-break-before" target="_blank" rel="noreferrer noopener">CSS ‐ Wiki :: <em>page‐break‐after</em></a></li>
</ul>
</html>
<html>
<ul>
<li>verwendeter Tag: <code><b><sup></b></code></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="http://tizag.com/htmlT/htmlsuperscript.php" target=_blank>tizag.com ‐ Blog :: superscript & footnotes</a></li>
</ul>
</html>
<html>
<ul>
<li><h3>Problem</h3>
<ul>
<li>Listenelemente mit <code><details></code>-Tag werden <b>nicht</b><br />
korrekt dargestellt:<br />
<img src="./pictures/HTML-Error-01.png"
height= width= /><!-- -->
</li>
</ul>
</li>
<li><h3>Ursache</h3>
<ul>
<li>es gibt ein <b><em>übergeordnetes</em></b> <code><details></code>-Tag;
</li>
</ul>
</li>
<li><h3>Lösung</h3>
<ul>
<li>dieses <b><em>übergeordnetes</em></b> <code><details></code>-Tag entfernen;
</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li>Um anklickbare Schaltflächen zu erzeugen, <br />
die Aktionen auslösen können. </li>
<br />
<li>Es gibt drei verschiedene Arten von Buttons, <br />
gekennzeichnet durch das type-Attribut:
<ul>
<li><code><b>type = “button“</b></code>, <i>Auslösen clientseitiger Aktionen</i></li>
<li><code><b>type = “submit“</b></code>, <i>Absenden eines Formulars, default-Wert</i></li>
<li><code><b>type = “reset“</b></code>, <i>Zurücksetzen eines Formulars</i></li>
</ul>
</li>
<br />
<li><b>Zu beachten ist:</b><br />
Der <b>default</b>‐Wert für das type-Attribut ist <code><b>submit</b></code>,<br />
das heißt bei einem fehlenden type-Attribut oder<br />
einem unbekannten Wert wird type = “submit“ <br />
gesetzt.
</li>
<br />
<li>
</li>
<br />
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.selfhtml.org/wiki/HTML/Formulare/button" target=_blank>SelfHtml ‐ Wiki :: Button</a></li>
</ul>
</html>
<html>
<table style="float:left;width:25%;" border="1">
<tr><th>Griechischer<br /> Buchstabe</th><th>HTML-Code</th></tr>
<tr><td align="center">Α, α</td><td>&Alpha;, &alpha;</td></tr>
<tr><td align="center">Β, β</td><td>&Beta;, &beta;</td></tr>
<tr><td align="center">Γ, γ</td><td>&Gamma;, γ</td></tr>
<tr><td align="center">Δ, δ</td><td>&Delta;, &delta;</td></tr>
<tr><td align="center">Ε, ε</td><td>&Epsilon;, &epsilon;</td></tr>
<tr><td align="center">Ζ, ζ</td><td>&Zeta;, &zeta;</td></tr>
<tr><td align="center">Η, η</td><td>&Eta;, &eta;</td></tr>
<tr><td align="center">Θ, θ</td><td>&Theta;, &theta;</td></tr>
<tr><td align="center">Ι, ι</td><td>&Iota;, &iota;</td></tr>
<tr><td align="center">Κ, κ</td><td>&Kappa;, &kappa;</td></tr>
<tr><td align="center">Λ, λ</td><td>&Lambda;, &lambda;</td></tr>
<tr><td align="center">Μ, μ</td><td>&Mu;, &mu;</td></tr>
<tr><td align="center">Ν, ν</td><td>&Nu;, &nu;</td></tr>
</table>
<table style="float;width:25%;" border="1">
<tr><th>Griechischer<br /> Buchstabe</th><th>HTML-Code</th></tr>
<tr><td align="center">Ξ, ξ</td><td>&Xi;, &xi;</td></tr>
<tr><td align="center">Ο, ο</td><td>&Omicron;, &omicron;</td></tr>
<tr><td align="center">Π, π</td><td>&Pi;, &pi;</td></tr>
<tr><td align="center">Ρ, ρ</td><td>&Rho;, &rho;</td></tr>
<tr><td align="center">Σ, σ</td><td>&Sigma;, &sigma;</td></tr>
<tr><td align="center">Τ, τ</td><td>&Tau;, &tau;</td></tr>
<tr><td align="center">Υ, υ</td><td>&Upsilon;, &upsilon;</td></tr>
<tr><td align="center">Φ, φ</td><td>&Phi;, &phi</td></tr>
<tr><td align="center">Χ, χ</td><td>&Chi;, &chi;</td></tr>
<tr><td align="center">Ψ, ψ</td><td>&Psi;, &psi;</td></tr>
<tr><td align="center">Ω, ω</td><td>&Omega;, &omega;</td></tr>
<tr><td> </td><td></td></tr>
<tr><td align="center">ς</td><td>&sigmaf;</td></tr>
</table>
<br />
<h3>Links:</h3>
<ul>
<li><a href="https://www.html-seminar.de/zeichenreferenz-griechisches-alphabet.htm" target="_blank" rel="noreferrer noopener">HTML-Seminar :: Zeichenreferenz - Griechisches Alphabet</a></li>
</ul>
</html>
<html>
<ul>
<li>The <input> tag specifies an input field where the user can enter data.</li>
<br />
<li>The <input> element is the most important form element.</li>
<br />
<li>The <input> element can be displayed in several ways, depending on the type attribute.</li>
<br />
<li><details><summary>The different input types are as follows:</summary>
<ul>
<li><details><summary><b><input type="button"> :: </b></summary><br />
Definiert einen Klick‐Button (mostly used with a JavaScript to activate a script)<br />
<br />
<u>Attribute:</u>
<ul>
<li>value=“Click me“</li>
<li>onclick=“msg()“</li>
</ul></details>
</li>
<br />
<li><details><summary><b><input type="checkbox"> :: </b></summary><br />
zeigt eine kleine Check-Box, ein kleines Kästchen, das angetickt werden kann<br />
<br />
<u>Attribute:</u>
<ul>
<li>name=“nameOfChoice“</li>
<li>value=“1“</li>
<li>checked</li>
</ul></details>
</li>
<br />
<li><input type="color"></li>
<br />
<li><input type="date"></li>
<br />
<li><input type="datetime-local"></li>
<br />
<li><input type="email"></li>
<br />
<li><details><summary><b><input type="file"> :: </b></summary><br />
Definiert ein file‐Auswahlfeld und einen “Browse“‐Button, um Files hochzuladen.<br />
<br />
<u>Attribute:</u>
<ul>
<li>id=“myfile“</li>
<li>name=“myfile“</li>
</ul></details></li>
<br />
<li><input type="hidden"></li>
<br />
<li><input type="image"></li>
<br />
<li><input type="month"></li>
<br />
<li><input type="number"></li>
<br />
<li><input type="password"></li>
<br />
<li><input type="radio"></li>
<br />
<li><input type="range"></li>
<br />
<li><input type="reset"></li>
<br />
<li><input type="search"></li>
<br />
<li><input type="submit"></li>
<br />
<li><input type="tel"></li>
<br />
<li><input type="text"> <em>(default value)</em></li>
<br />
<li><input type="time"></li>
<br />
<li><input type="url"></li>
<br />
<li><input type="week"></li>
</ul></details>
</li></li>
<br />
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.w3schools.com/tags/tag_input.asp" target="_blank">W3Schools :: <em>input</em> tag</a></li>
<li><a href="https://www.mediaevent.de/html/input.html" target="_blank">MediaEvent :: <em>input</em></a></li>
<li><a href="https://love2dev.com/blog/html-checkbox/" target="_blank" rel="noreferrer noopener">Love2Dev :: HTML ‐ Checkboxes</a></li>
</ul>
</html>
<html>
Mit einem kurzen Tag fügen Sie eine horizontale Linie in HTML ein:
<ul>
<li>Wählen Sie in Ihrem HTML-Dokument die entsprechende Stelle aus<br />
und tippen Sie den Befehl <code><pre><hr></pre></code> ein.</li>
<br />
<li>In Ihrem Dokument erscheint nun eine graue, dünne Linie.</li>
<br />
<li>Brauchen Sie mehr gestalterische Freiheiten, sollten Sie Ihr HTML-Dokument mit CSS erweitern.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://praxistipps.chip.de/html-linie-einfuegen-so-gehts_44864" target="_blank" noreferrer noopener>Chip :: Linie einfügen</a></li>
</ul>
</html>
<html>
<ul>
<li>ist ein freier statischer Websitegenerator, der unter der Apache‐‐<br />
Lizenz in der Version 2 verfügbar ist;</li>
<li>Ziel: eine einfach zu bedienende, aber dennoch schnelle Software‐<br />
bereitzustellen;</li>
<li>liefert einen eigenen HTTP‐Server mit, so dass kein separater Server‐<br />
(z.B. Apache HTTP Server) verwendet werden muss;</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Hugo_(Software)" target="_blank" rel="noreferrer noopener">Wikipedia</a></li>
<li><a href="https://www.gohugo.io/overview/introduction/" target="_blank" rel="noreferrer noopener">Hugo ‐ Dokumentation</a></li>
</ul>
</html>
<html>
For example, you can indent the first line of <br />
a paragraph like a tab with the following CSS:<br />
<br /><code><b>
<p style="text-indent: 5em;"><br />
The first line of this paragraph will be indented <br />
about five characters, similar to a tabbed indent.<br />
</p> </b></code><br />
<br />
will be like this:
<p style=" text-indent: 5em;">
The first line of this paragraph will be indented<br />
about five characters, similar to a tabbed indent.
</p>
<br />
</html>
<html>
Demo of "anchor links inside a tiddler". This works because
$:/core/ui/PageTemplate/story and $:/core/ui/SideBar/Open have been modified to not show (missing-)tiddlers with prefix tw-href so the scroll first goes to the anchor but then does not go to the (missing-) tiddler.<br>
A problem is that the address url is changed to show the link name. [[Here|Maybe ways to prevent url update]] might be potential methods to prevent this.
<div id="tw-hreftoc"><h2>Demo of Table of Contents using internal anchors</h2></div>
*<a href="#tw-href1">Chapter 1</a><br />
*<a href="#tw-href2">Chapter 2</a><br />
*<a href="#tw-href3">Chapter 3</a><br />
*<a href="#tw-href4">Chapter 4</a><br />
*<a href="#tw-href5">Chapter 5 in another tiddler</a> (that must be open)<br />
<br />
Here comes the epic saga:<br />
<div id="tw-href1"/>
!!!Chapter 1
My son, I have discovered the secret to happiness...
<a href="#tw-hreftoc">back to TOC</a>
<br><br>
<div id="tw-href2"/>
!!!Chapter 2
And will reveal it to you now...
<a href="#tw-hreftoc">back to TOC</a>
<br><br>
<div id="tw-href3"/>
!!!Chapter 3
Just always remember this one thing....
<a href="#tw-hreftoc">back to TOC</a>
<br><br>
<div id="tw-href4"/>
!!!Chapter 4
[To be continued in next book]
<a href="#tw-hreftoc">back to TOC</a>
</html>
<html>
<code><pre>
<h3>Willkommen!</h3>
<!-- einzeiliger Kommentar -->
<p>viel Text</p>
<!-- und das ist ein mehrzeiliger Kommentar
zudem Text mit <p>...</p>
Letzte Zeile des Kommentars -->
</pre></code>
</html>
<html>
Man kann mit einer der folgenden Optionen ein längeres Leerzeichen einfügen<br />
(u.U. mehrfach einfügen):
<ul>
<li>Zwei Leerzeichen :: Tippe <b>&ensp;</b> ein.
<li>Vier Leerzeichen :: Tippe <b>&emsp;</b> ein.
<li>Einrücken :: Tippe <b>&nbsp;</b> ein. <br />
(“nbsp“ steht für “non‐breaking space“, <br />
weil es verhindert, dass an der Stelle<br />
ein Zeilenumbruch eingefügt wird.)
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikihow.com/Leerzeichen-in-HTML-einfügen" target="_blank">WikiHow :: Leerzeichen in HTML einfügen</a></li>
</ul>
</html>
<html>
<ul>
<li>Der Code<br />
<code><pre><a href="http://de.wikipedia.org/wiki/Gammafunktion">Gammafunktion</a>
</pre></code>
wird zu<br />
<a href="http://de.wikipedia.org/wiki/Gammafunktion">Gammafunktion</a></li>
<br />
<li>neben der Angabe “http://…“ kann für lokale Links “file:///…“ angegeben werden.</li>
<br />
<li>mit dem Zusatz <code><b>target=“_blank“</b></code> hinter der href-Angabe <br />
wird die angegebene Seite in einem separatem Browser‐<br />
Tab angezeigt:<br />
<code><pre>
<a href="http://de.wikipedia.org/wiki/Gammafunktion" target="_blank">Gammafunktion</a>
</pre></code>
wird zu<br />
<a href="http://de.wikipedia.org/wiki/Gammafunktion" target="_blank">Gammafunktion</a></li>
</li>
<br />
Neben dem Zusatz “_blank“ gibt es noch die Werte
<ul>
<li>_parent</li>
<li>_self</li>
<li>_top</li>
<li>frame name :: Specifies the context in which the linked resource will open.</li>
</ul>
<br />
<li>Mittels Attribut “<code><b>type</b></code>“ kann auch angegeben werden, <br />
um was für ein Dokumententyp es sich handelt. <br />
<br />
Wird z.B. <code><b>type=“application/msword“</b></code> hinter der<br />
URL mit angegeben, so wird eine Abfrage angezeigt, <br />
mit welchem Programm die Datei angezeigt werden<br />
soll (in diesem Beispiel mit MS Word)</li>
<br />
<li><u>Security concerns with <code><b>target=_blank</b></code> (<a href="https://www.freecodecamp.org/news/how-to-use-html-to-open-link-in-new-tab/" target="_blank" rel="noreferrer noopener">freecodecamp.org</a>) : </u><br />
<ul>
<li>add <code><b>rel="noreferrer noopener"</b></code> to the anchor element whenever<br />
you use the target attribute;</li>
<li>The rel attribute sets the relationship between your page and the <br />
linked URL. Setting it to “<code><b>noopener noreferrer</b></code>“ is to prevent a type of<br />
phishing known as <a href="https://en.wikipedia.org/wiki/Tabnabbing" target="_blank" rel="noreferrer noopener">tabnabbing</a>.<br >
⇒ der Aufruf von oben wird zu<br />
<code><pre>
<a href="http://de.wikipedia.org/wiki/Gammafunktion" target="_blank" <b><em>rel="noreferrer noopener"</em></b>>Gammafunktion</a>
</pre></code>
<details><summary>Weitere Infos zu “tabnabbing“</summary>
<h4>What is tabnabbing?</h4>
<p>
Tabnabbing, sometimes called reverse tabnabbing, is an exploit that uses the browser's default <br />
behavior with target="_blank" to gain partial access to your page through the window.object API.
</p><p>
With tabnabbing, a page that you link to could cause your page to redirect to a fake login page. <br />
This would be hard for most users to notice because the focus would be on the tab that just <br />
opened ‐ not the original tab with your page.
</p><p>
Then when a person switches back to the tab with your page, they would see the fake login<br />
page instead and might enter their login details.
</p><p>
If you're interested in learning more about how tabnabbing works and what bad actors can<br />
do with the exploit, check out <a href="https://www.jitbit.com/alexblog/256-targetblank---the-most-underestimated-vulnerability-ever/" target="_blank" rel="noreferrer noopener">Alex Yumashev's article</a> and this one by <a href="https://owasp.org/www-community/attacks/Reverse_Tabnabbing" target="_blank" rel="noreferrer noopener"> OWASP</a>.
</p><p>
If you'd like to see a safe working example, check out this <a href="https://mathiasbynens.github.io/rel-noopener/" target="_blank" rel="noreferrer noopener">page</a> and its <a href="https://github.com/mathiasbynens/rel-noopener" target="_blank" rel="noreferrer noopener">GitHub repo</a> for more<br />
information about the exploit and the rel attribute.
</p>
</details></li></ul>
</li>
</ul>
</html>
<html>
<h3>Liste, "unsortiert", keine Nummerierung ::</h3>
<code><ul><br />
... <br />
</ul></code><br />
<br />
<h3>Liste, "sortiert", mit Nummerierung ::</h3>
<code><ol> <br />
... <br />
</ol></code><br />
<br />
<h3>Definitionsliste::</h3>
<code><dl> <br />
... <br />
</dl></code><br />
<br />
Es können andere Sortierungskennzeichen verwendet werden:<br />
<table border="1">
<tr>
<th>Type</th><th>Description</th>
</tr>
<tr>
<td>type="1"</td><td>The list items will be numbered with numbers (default)</td>
</tr>
<tr>
<td>type="A"</td><td>The list items will be numbered with uppercase letters</td>
</tr>
<tr>
<td>type="a"</td><td>The list items will be numbered with lowercase letters</td>
</tr>
<tr>
<td>type="I"</td><td>The list items will be numbered with uppercase roman numbers</td>
</tr>
<tr>
<td>type="i"</td><td>The list items will be numbered with lowercase roman numbers</td>
</tr>
</table>
Dazu muss die erste Zeile entsprechend angepasst werden:<br />
<code>
<ol type="a">
</code><br />
<br />
<h3>Liste, sortiert, Nummerierung mit anderem Startwert</h3>
Soll die Nummerierung mit einer anderen Zahl beginnen (z.B. mit "6"),<br />
so ist folgendes beim Start-Tag einzutragen:<br />
<code><pre><ol start=“6“></pre></code>
<br />
Das Gleiche gilt auch für den Fall, dass die Nummerierung<br />
mit Buchstaben angegeben wird:<br />
<code><pre><ol type=“a“, start=6></pre></code>
<br />
<h3>Listen-Einträge ::</h3>
Die jeweiligen Listen-Einträge werden mit folgenden Tags “umklammert“<br />
<code><li> … </li></code><br />
<br />
<h3>Definitionsliste</h3>
Eine Definitionsliste besteht aus folgenden drei Tags:
<ol>
<li><b>dl</b> :: <em>description list</em></li>
<li><b>dt</b> :: <em>description tag</em></li>
<li><b>dd</b> :: <em>description data</em></li>
</ol>
Beispiel:
<code><pre>
<div id="toc">
<dl>
<dt>1.</dt><dd><b>Zugriffsgruppen</b></dd>
<dt>2.</dt><dd><b>Darstellung der Rechte</b></dd>
<dd><dl>
<dt>2.1</dt><dd>Oktal- oder Dezimalzahlen</dd>
<dt>2.2</dt><dd>als Text</dd>
</dl></dd>
<dt>3.</dt><dd><b>Ändern der Rechte</b></dd>
<dd><dl>
<dt>3.1</dt><dd>chmod</dd>
</dl></d>
<dt>4.</dt><dd><b>ACL (Access Control Lists)</b></dd>
<dd><dl>
<dt>4.1</dt><dd>ACL setzen</dd>
<dt>4.2</dt><dd>ACL anzeigen</dd>
</dl></dd>
</dl>
</div>
</pre></code>
⇒ Ergebnis:
<code>
<div id="toc">
<dl>
<dt>1.</dt><dd><b>Zugriffsgruppen</b></dd>
<dt>2.</dt><dd><b>Darstellung der Rechte</b></dd>
<dd><dl>
<dt>2.1</dt><dd>Oktal- oder Dezimalzahlen</dd>
<dt>2.2</dt><dd>als Text</dd>
</dl></dd>
<dt>3.</dt><dd><b>Ändern der Rechte</b></dd>
<dd><dl>
<dt>3.1</dt><dd>chmod</dd>
</dl></d>
<dt>4.</dt><dd><b>ACL (Access Control Lists)</b></dd>
<dd><dl>
<dt>4.1</dt><dd>ACL setzen</dd>
<dt>4.2</dt><dd>ACL anzeigen</dd>
</dl></dd>
</dl>
</div>
</code>
<h3>Links:</h3>
<ul>
<li><a href="http://www.w3schools.com/html/html_lists.asp" target="_blank" rel="noreferrer noopener">W3Schools :: HTML : Lists</a></li>
<li><a href="http://www.thestyleworks.de/tut-art/css-sitemap.shtml" target="_blank" rel="noreferrer noopener">The Style Works :: Cascading Style Sheets</a></li>
<li><a href="https://www.html-seminar.de/html-definitionsliste-dl-dt-dd.htm" target="_blank" rel="noreferrer noopener">HTML‐Seminar :: Definitionsliste</a></li>
<li><a href="https://www.mediaevent.de/html/dl.html" target="_blank" rel="noreferrer noopener">Mediaevent :: Definitionsliste</a></li>
<!--
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
-->
</ul>
</html>
<html>
<ul>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.selfhtml.org/wiki/List-style-type"
target="_blank" rel="noreferrer noopener">
</a>
</li>
</ul>
</html>
<html>
Der Browser wird dank HTML5 immer mehr zu einer Umgebung, in der komplexe Anwendungen laufen können, ohne dass auf Plug‐ins wie Flash gesetzt werden muss. Mit Local Storage lassen sich Anwendungen auch für den Offlinebetrieb rüsten, indem Daten clientseitig gespeichert werden können.
<h3>Local Storage und Cookies</h3>
Zwar gibt es mit Cookies bereits eine bewährte Möglichkeit, Daten clientseitig zu speichern und darauf zuzugreifen. Local Storage hat jedoch noch einige Vorteile gegenüber Cookies. Über Cookies lassen sich Daten nur sehr eingeschränkt speichern. Denn die Anzahl und die Größe der Cookies ist limitiert. Nach dem Standard müssen Browser 20 Cookies pro Domain mit einer Größe von 4 Kilobyte (je nach Browser auch mehr) akzeptieren. Gerade komplexe Anwendungen kommen da schnell an die Grenze. Außerdem laufen Cookies nach einer bestimmten Zeit ab, was schnell zu Problemen führen kann, wenn man Daten für eine Anwendung dauerhaft offline speichern möchte.
Bei Local Storage gibt es all diese Einschränkungen nicht. Allerdings unterstützen nur moderne Browser diese Möglichkeit der clientseitigen Speicherung. Neben der dauerhaften Speicherung von Daten gibt es auch bei Local Storage die Möglichkeit, Daten nur temporär zu speichern. Ähnlich wie bei Cookies können auch hier Daten nur für die Dauer einer Sitzung ‐ also bis zum Schließen des Browsers ‐ gespeichert werden.
<h3>HTML5 und Local Storage nutzen</h3>
<p>
Das Speichern von Daten und der Zugriff darauf erfolgt über JavaScript. Es gibt drei Methoden, mit denen Werte gespeichert, abgerufen und gelöscht werden können. Außerdem gibt es eine Methode, mit welcher alle gespeicherten Daten einer Domain gelöscht werden können.
</p>
<p>
Folgende JavaScript-Funktionen gibt es für das Speichern, Lesen und Löschen der Localstorage-Daten:
<ul>
<li><b><code>localStorage.setItem('key', 'value');</code></b><br />
Speichert einen Wert unter dem angegebenen Schlüssel</li>
<li><b><code>localStorage.getItem('key');</code></b><br />
Gibt den Wert vom angegebenen Schlüssel zurück. Existiert dieser nicht wir “undefined“ zurückgegeben. Eine Alternative für den Zugriff auf die Daten wäre localStorage.key.</li>
<li><b><code>localStorage.removeItem('key');</code></b><br />
Entfernt den kompletten Datensatz des Keys aus dem Localstorage. Wiederherstellen ist nicht möglich.</li>
<li><b><code>localStorage.clear();</code></b><br />
Löscht alle Daten aus dem lokalen Speicher welcher von der Domain angelegt wurde.</li>
</ul>
</p>
<p>
So lassen sich zum Beispiel Formulareingaben im Local Storage speichern, anstatt sie zu versenden. Dazu wird die Formularverarbeitung einer JavaScript‐Funktion übertragen:
<code><pre>
<form onsubmit=“daten_speichern(); return false“>
<input type=“text“ name=“vorname“ />
</form>
</pre></code>
</p>
Die Funktion “daten_speichern()“ speichert den eingegebenen Wert anschließend im Local Storage:
<code><pre>
function daten_speichern() {
localStorage.setItem(“vorname“, document.forms[0][“name“].value);
}
</pre></code>
Fortan kann der Browser auf den gespeicherten Wert zugreifen und ihn ausgeben. Beim Laden einer Seite können dann im Local Storage gespeicherte Werte abgerufen und ausgegeben werden. Auch dies lässt sich über eine kleine Funktion regeln, die dann zum Beispiel über “onload“ im BODY‐Element aufgerufen wird:
<code><pre>
function daten_ausgeben() {
document.getElementById(“vorname“).firstChild.nodeValue = localStorage.getItem(“vorname“);
}
</pre></code>
Desweiteren lassen sich mit “localStorage.setItem()“ einzelne Werte aus dem Local Storage löschen sowie mit “localStorage.clear()“ alle gespeicherten Daten einer Domain:
<code><pre>
localStorage.removeItem(“key“);
localStorage.clear();
</pre></code>
Bei der Verwendung von “localStorage“ bleiben Daten so lange gespeichert, bis sie über eine der beiden genannten Methoden gelöscht werden. Alternativ gibt es noch “sessionStorage“: Hierbei werden Daten nur für die Dauer einer Browsersitzung gespeichert. “sessionStorage“ hat dieselben Methoden wie “localStorage“ zum Speichern und Aberufen von Daten.
Über “localStorage.length“ lässt sich zudem die Anzahl der gespeicherten Werte abfragen.
Alle modernen Browser unterstützen Local Storage.
<h3>HTML und LocalStorage für Offlinebetrieb</h3>
Gerade für den Offlinebetrieb von Anwendungen bietet sich die Verwendung von Local Storage an. Um festzustellen, ob der Browser derzeitig online oder offline ist, gibt es die Methode “navigator.onLine“. Sie gibt “true“ wieder, wenn eine Internetverbindung vorhanden ist und “false“, wenn keine Verbindung vorhanden ist.
Hierüber lässt sich dann zum Beispiel entscheiden, ob auf Daten im Local Storage nur dann zurückgegriffen werden soll, wenn sich der Browser im Offlinebetrieb befindet.
<h3>Links:</h3>
<ul>
<li><a href="https://t3n.de/news/html5-local-storage-daten-offlinebetrieb-speichern-350314/" target="_blank" rel="noreferrer noopener">
HTML5 und Local Storage: Daten für Offlinebetrieb speichern</a></li>
<li><a href="https://www.webmasterpro.de/coding/article/javascript-html5-local-storage-tutorial.html" target="_blank" rel="noreferrer noopener">WebmasterPro :: HTML5 Local Storage Tutorial ‐ ToDo Liste programmieren</li>
<li><a href="https://www.arungudelli.com/html5/html5-local-storage/" target="_blank" rel="noreferrer noopener">
Arunkumar‐Blog :: HTML5 Local Storage API Tutorial With Examples</li>
</ul>
</html>
<html>
<ul>
<li>findet u.a. im Jupyter Notebook Anwendung;</li>
<li><b>Formatierungssprache</b>, bei der die Ausgangs‐<br />
form aus reinem Text besteht;</li>
</ul>
<h2> Formatierungszeichen</h2>
<table>
<tr><td>Überschriften:</td><td><ul><li>#, Überschrift, Größe h1</li><li>##, Überschrift, Größe h2</li>…<li>######, Überschrift, Größe h6</li></ul></td></tr>
<tr><td>Betonung:</td><td><ul><li>*, Italic / <i>Kursiv</i></li>
<li>_, Italic / <i>Kursiv</i>, alternative Form</li><br />
<li>**, Fettdruck, <b>bold</b></li>
<li>__, Fettdruck, <b>bold</b>, alternative Form</li></ul></td></tr>
<tr><td>Listen:</td><td><ul><li>geordnet, </li><br />
<li>ungeordnet</li></ul></td></tr>
<tr><td>Zeilenumbruch:</td><td>kann mit <code><pre><b><br></b></pre></code> erzwungen werden</td></tr>
</table>
<h3>Links:</h3>
<ul>
<li>Wikipedia</li>
<li><a href="https://guides.github.com/pdfs/markdown-cheatsheet-online.pdf" target=_blank>GitHub :: MarkDown - CheatSheet (pdf)</a></li>
<li><a href="https://www.ibm.com/support/knowledgecenter/SSQNUZ_current/com.ibm.icpdata.doc/dsx/markd-jupyter.html" target=_blank>IBM :: KnowledgeCenter - Markdown & Jupyter</a></li>
</ul>
</html>
<html>
<ul>
<li>Der folgende String muss angegeben sein:<br />
<b><math xmlns="http://www.w3.org/1998/Math/MathML"></b>
<br /><br />
Ab HTML5 kann der Namensraum xmlns auch weggelassen <br />
werden, es reicht also auch einfach <b><math>...</math></b>.<br />
<br />
Dieser Tag hat folgende Attribute:<br />
<table>
<tr><td><b>mathsize</b></td><td> Die Formel wird in größeren Zeichen dargestellt;<br />
z.B. <math mathsize=“1.5em“></td></tr>
</table> </li>
<br />
<li>Die darzustellenden Zeichen sind als Text in eines der<br />
folgenden Basiselemente des <math>-Elementes einzufügen:<br /><br />
<ul>
<li><b><mi></b> für <b>Variablen</b>, z.B. <mi>x</mi> für „x“
</li>
<li><b><mn></b> für <b>Zahlwerte</b>, also z.B. <mn>2</mn> für „2“
</li>
<li><b><mtext></b> für <b>Texte</b>, also z.B. <mtext>Dies ist ein einfacher Text</mtext> für „Dies ist ein einfacher Text“
</li>
<li><b><mo></b> für <b>mathematische Operatoren und Rechenzeichen</b>, <br />
also z.B. <ul>
<li><mo>+</mo> für „+“, </li>
<li><mo>-</mo> für „-“, </li>
<li><mo>=</mo> für „=“,</li>
oder
<li><mo>(</mo> für „(“ (dies gilt für jede Klammer)</li>.
</ul>
<br />
Diese Basiselemente sind also für jeden Ausdruck in MathML notwendig<br />
und bestimmen die Schriftsetzung der beinhalteten Zeichen. Die Elemente <br />
<mn> und <mo> können mehrere Zeichen beinhalten, <mi> dagegen<br />
nur einbuchstabige Variablen.<br />
<br />
Beispiel:<br />
<math>
<mrow>
<msup><mi>a</mi><mn>2</mn></msup>
<mo>+</mo>
<msup><mi>b</mi><mn>2</mn></msup>
<mo>=</mo>
<msup><mi>c</mi><mn>2</mn></msup>
</mrow>
</math><br />
<br />
⇒ als Code:
<code><pre>
<math>
<mrow>
<msup><mi>a</mi><mn>2</mn></msup>
<mo>+</mo>
<msup><mi>b</mi><mn>2</mn></msup>
<mo>=</mo>
<msup><mi>c</mi><mn>2</mn></msup>
</mrow>
</math>
</pre></code>
</li>
</ul>
<li> Code für eine Matrix:<br />
<math>
<mrow>
<mi>A</mi>
<mo>=</mo>
<mfenced open="[" close="]">
<mtable>
<mtr>
<mtd><mi>x</mi></mtd>
<mtd><mi>y</mi></mtd>
</mtr>
<mtr>
<mtd><mi>z</mi></mtd>
<mtd><mi>w</mi></mtd>
</mtr>
</mtable>
</mfenced>
</mrow>
</math>
<br />
<br />
⇒Code:<br />
<code><pre>
<math>
<mrow>
<mi>A</mi>
<mo>=</mo>
<mfenced open="[" close="]">
<mtable>
<mtr>
<mtd><mi>x</mi></mtd> <mtd><mi>y</mi></mtd>
</mtr>
<mtr>
<mtd><mi>z</mi></mtd> <mtd><mi>w</mi></mtd>
</mtr>
</mtable>
</mfenced>
</mrow>
</math>
</pre></code>
</li>
<li>Code für den Ausdruck
<math><msup>
<mrow>
<mo>(</mo>
<mfrac>
<mn>6</mn>
<mn>2</mn>
</mfrac>
<mo>)</mo>
</mrow>
<mn>2</mn>
</msup></math>
<code><pre>
<math>
<msup>
<mrow>
<mo>(</mo>
<mfrac>
<mn>6</mn>
<mn>2</mn>
</mfrac>
<mo>)</mo>
</mrow>
<mn>2</mn>
</msup>
</math>
</pre></code></li>
<li><b><msubsup></b> :: Hoch‐ und Tiefstellung wird mit <msubsup> erreicht.<br />
  Der zweite und dritte Parameter geben Index und Exponent an. <br />
<br />
<math>
<msubsup>
<mi>a</mi>
<mi>j</mi>
<mi>k</mi>
</msubsup>
</math> wird erzeugt mit
<code><pre>
<math>
<msubsup>
<mi>a</mi>
<mi>j</mi>
<mi>k</mi>
</msubsup>
</math>
</pre></code>
</li>
<li>
<b><mover></b> :: Um einen Strich über z.B. eine Variable zu setzen,<br />
<code><pre>
<math>
<mover>
<mi>z</mi>
<mo>&#x203E;</mo>
</mover>
</math>
</pre></code>
erzeugt
<math mathsize="1.25em">
<mover>
<mi>z</mi>
<mo>‾</mo>
</mover>
</math><br /></li>
<li>Code für Ableitungen:<br />
<code><pre>
<math mathsize="1.25em" xmlns="http://www.w3.org/1998/Math/MathML">
<mstyle displaystyle="true">
<mrow class="MJX-TeXAtom-ORD">
<msup>
<mi>y</mi>
<mo>&#x2032;</mo>
</msup>
</mrow>
</mstyle>
</math>
</pre></code>
erzeugt folgende Ausgabe: <math mathsize="1.25em" xmlns="http://www.w3.org/1998/Math/MathML">
<mstyle displaystyle="true">
<mrow class="MJX-TeXAtom-ORD">
<msup>
<mi>y</mi>
<mo>′</mo>
</msup>
</mrow>
</mstyle>
</math>.
</li>
<li>Beispiel für eine Einzelklammer:
<code><pre>
<math mathsize=1.25em style=“display:block“>
<mrow>
<msub>
<mn>1</mn>
<mi>A</mi>
</msub>
<mrow>
<mo>(</mo>
<mi>ω</mi>
<mo>)</mo>
</mrow>
<mo> := </mo>
<mrow>
<mo>{</mo>
<mtable>
<mtr>
<mtd>
<mrow>
<mn>1</mn><mi>,</mi><mo> &ensp; </mo><mi>falls</mi>
<mi>ω</mi><mo>&isin;</mo><mi>A</mi>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mrow>
<mn>0</mn><mi>,</mi><mo> &ensp; </mo><mi>falls</mi>
<mi>ω</mi><mo>&notin;</mo><mi>A</mi>
</mrow>
</mtd>
</mtr>
</mtable>
</mrow><mo> </mo><mo>,</mo>
</mrow><mo> </mo><mi>ω</mi><mo>∈</mo><mi>Ω</mi>
</pre></code>
erzeugt folgende Ausgabe:
<math mathsize=1.25em style="display:block">
<mrow>
<msub>
<mn>1</mn>
<mi>A</mi>
</msub>
<mrow>
<mo>(</mo>
<mi>ω</mi>
<mo>)</mo>
</mrow>
<mo> := </mo>
<mrow>
<mo>{</mo>
<mtable>
<mtr>
<mtd>
<mrow>
<mn>1</mn><mi>,</mi><mo>   </mo><mi>falls</mi>
<mi>ω</mi><mo>∈</mo><mi>A</mi>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mrow>
<mn>0</mn><mi>,</mi><mo>   </mo><mi>falls</mi>
<mi>ω</mi><mo>∉</mo><mi>A</mi>
</mrow>
</mtd>
</mtr>
</mtable>
</mrow><mo> </mo><mo>,</mo>
</mrow><mo> </mo><mi>ω</mi><mo>∈</mo><mi>Ω</mi></math>
<br />
sehr hilfreiches Attribut beim Tag <em>mtd</em>: columnalign=…<br />
⇒ dadurch werden alle Einträge linksbündig dargestellt;<br />
</li>
</ul>
<br />
<br />
<h3>Links:</h3>
<ul>
<li><a href="https://www.geeksforgeeks.org/html5-mathml-introduction/"
target="_blank" rel="noreferrer noopener">
Geeks for geeks :: HTML5 – MATHML introduction</a>
</li>
<li><a href="http://elsenaju.info/mathml/MathML-Beispiele.htm" target="_blank">Elsenaju :: MathML-Beispiele</a> <em>(extrem gute Seite, weil der Quellcode gut lesbar ist)</em></li>
<li><a href="http://www.math-it.org/Publikationen/MathML_de.html" target="_blank">Kurztutorial MathML</a></li>
<li><a href="https://www.tutorialspoint.com/html5/html5_mathml.htm" target="_blank">HTML5 :: MathML</a></li>
<li><a href="https://iq.opengenus.org/using-mathml-in-html/" target=_blank>Using MathML (math tag) in HTML</a></li>
<li><a href="https://www.hawkeslearning.com/Accessibility/guides/mathml_content.html" target=_blank>Hawkes Learning :: Content ‐ MathML Structure</a></li>
</ul>
<br />
</html>
<html>
Ein Bruch wird mit dem Element <b><mfrac></b> erzeugt. <br />
<br />
Für <math><mfrac><mi>x</mi><mi>y</mi></mfrac></math> beispielsweise mit
<code><pre>
<mfrac>
<mi>x</mi>
<mi>y</mi>
</mfrac>
</pre></code>
<br />
Bestehen Zähler oder Nenner aus mehreren Termen, <br />
so sind sie mit <b><mrow></b> zu Einheiten zu gruppieren: <math>
<mi>f</mi><mfenced><mi>x</mi><mi>y</mi></mfenced>
<mo>=</mo>
<mfrac>
<mrow>
<mn>13</mn> <mi>x</mi> <mo>-</mo> <mn>37</mn>
</mrow>
<mrow>
<mn>2</mn> <mi>y</mi> <mo>+</mo> <mn>1</mn>
</mrow>
</mfrac>
</math>
<br /> ⇒ Code: <br />
<code><pre>
<math>
<mi>f</mi><mfenced><mi>x</mi><mi>y</mi></mfenced>
<mo>=</mo>
<mfrac>
<mrow>
<mn>13</mn> <mi>x</mi> <mo>-</mo> <mn>37</mn>
</mrow>
<mrow>
<mn>2</mn> <mi>y</mi> <mo>+</mo> <mn>1</mn>
</mrow>
</mfrac>
</math>
</pre></code>
<br />
<h3>Link: </h3>
<a href="http://www.math-it.org/Publikationen/MathML_de.html#Brüche" target=_blank>Math-IT.org :: MathML - Brüche</a>
</html>
<html>
<ul>
<li>Um Matrizen zu schreiben, benötigen wir das Element <b><mfenced></b>, <br />
das das Tabellenelement <b><mtable></b> umschließt:<br />
</li>
<li><math>
<msub><mn>σ</mn><mi>y</mi></msub>
<mo>=</mo>
<mfenced>
<mtable>
<mtr>
<mtd><mn>0</mn></mtd>
<mtd><mo>-</mo><mn>i</mn></mtd>
</mtr>
<mtr>
<mtd><mn>i</mn></mtd>
<mtd><mn>0</mn></mtd>
</mtr>
</mtable>
</mfenced>
</math>
wird durch die Anweisungen<br />
<pre><code>
<math>
<msub><mn>&sigma;</mn><mi>y</mi></msub>
<mo>=</mo>
<mfenced>
<mtable>
<mtr>
<mtd><mn>0</mn></mtd>
<mtd><mo>-</mo><mn>i</mn></mtd>
</mtr>
<mtr>
<mtd><mn>i</mn></mtd>
<mtd><mn>0</mn></mtd>
</mtr>
</mtable>
</mfenced>
</math>
</code></pre>
<br />
erzeugt. Wie man sieht, ist <mtable> genauso strukturiert wie eine <br />
HTML-Tabelle <table>, nur eben jeweils mit dem obligatorischen m <br />
als Präfix der Elementnamen.
</li>
<li>Mit den Attributen <b>open</b> und <b>close</b><br />
in <mfenced> kann man auch andere Klammern als die runden anzeigen<br />
lassen, z.B. eckige oder geschweifte Klammern:<br />
<pre><code><math>
<mi>R</mi><mo>(</mo><mi>x</mi><mo>)</mo>
<mo>=</mo>
<mfenced open="[" close="]">
<mtable>
<mtr>
<mtd><mi>cos</mi> <mi>x</mi></mtd>
<mtd><mo>-</mo><mi>sin</mi> <mi>x</mi></mtd>
</mtr>
<mtr>
<mtd><mi>sin</mi> <mi>x</mi></mtd>
<mtd><mi>cos</mi> <mi>x</mi></mtd>
</mtr>
</mtable>
</mfenced>
</math></code></pre>
ergibt also
<math>
<mi>R</mi><mo>(</mo><mi>x</mi><mo>)</mo>
<mo>=</mo>
<mfenced open="[" close="]">
<mtable>
<mtr>
<mtd><mi>cos</mi> <mi>x</mi></mtd>
<mtd><mo>-</mo><mi>sin</mi> <mi>x</mi></mtd>
</mtr>
<mtr>
<mtd><mi>sin</mi> <mi>x</mi></mtd>
<mtd><mi>cos</mi> <mi>x</mi></mtd>
</mtr>
</mtable>
</mfenced> .
</math>
</li>
<li>Sollten die Klammern nicht angezeigt werden, dann statt <b><em>mfenced</em></b><br />
folgendes verwenden:<pre><code><math style="display:block">
<msub><mn>G</mn><mi>x</mi></msub>‐Matrix
<mo>=</mo>
<mrow>
<mo>(</mo>
<mtable>
<mtr>
<mtd><mi>1</mi></mtd>
<mtd><mi>0</mi></mtd>
<mtd><mi>−1</mi></mtd>
</mtr>
<mtr>
<mtd><mi>1</mi></mtd>
<mtd><mi>0</mi></mtd>
<mtd><mi>−1</mi></mtd>
</mtr>
<mtr>
<mtd><mi>1</mi></mtd>
<mtd><mi>0</mi></mtd>
<mtd><mi>−1</mi></mtd>
</mtr>
</mtable>
<mo>)</mo>
</mrow>
</math></pre></code>
Das ergibt dann:
<math style="display:block">
<msub><mn>G</mn><mi>x</mi></msub>‐Matrix
<mo>=</mo>
<mrow>
<mo>(</mo>
<mtable>
<mtr>
<mtd><mi>1</mi></mtd>
<mtd><mi>0</mi></mtd>
<mtd><mi>-1</mi></mtd>
</mtr>
<mtr>
<mtd><mi>1</mi></mtd>
<mtd><mi>0</mi></mtd>
<mtd><mi>-1</mi></mtd>
</mtr>
<mtr>
<mtd><mi>1</mi></mtd>
<mtd><mi>0</mi></mtd>
<mtd><mi>-1</mi></mtd>
</mtr>
</mtable>
<mo>)</mo>
</mrow>
</math><br />
</li>
<li>Code für eine erweitere Koeffizientenmatrix:
<math style="display:block">
<mrow>
<mo>(</mo>
<mtable columnalign="center center center center" rowspacing="4pt" columnspacing="1em" columnlines="none none solid">
<mtr>
<mtd><mi>1</mi></mtd>
<mtd><mi>2</mi></mtd>
<mtd><mi>3</mi></mtd>
<mtd><mi>4</mi></mtd>
</mtr>
<mtr>
<mtd><mi>5</mi></mtd>
<mtd><mi>6</mi></mtd>
<mtd><mi>7</mi></mtd>
<mtd><mi>8</mi></mtd>
</mtr>
<mtr>
<mtd><mi>9</mi></mtd>
<mtd><mi>10</mi></mtd>
<mtd><mi>11</mi></mtd>
<mtd><mi>12</mi></mtd>
</mtr>
</mtable>
<mo>)</mo>
</mrow>
</math>
wird durch folgenden Code erstellt:
<pre><code><math style="display:block">
<mrow>
<mo>(</mo>
<mtable columnalign="center center center center" rowspacing="4pt" columnspacing="1em" columnlines="none none solid">
<mtr>
<mtd><mi>1</mi></mtd>
<mtd><mi>2</mi></mtd>
<mtd><mi>3</mi></mtd>
<mtd><mi>4</mi></mtd>
</mtr>
<mtr>
<mtd><mi>5</mi></mtd>
<mtd><mi>6</mi></mtd>
<mtd><mi>7</mi></mtd>
<mtd><mi>8</mi></mtd>
</mtr>
<mtr>
<mtd><mi>9</mi></mtd>
<mtd><mi>10</mi></mtd>
<mtd><mi>11</mi></mtd>
<mtd><mi>12</mi></mtd>
</mtr>
</mtable>
<mo>)</mo>
</mrow>
</math>
</code></pre>
</li>
</ul>
<h3>Link:</h3>
<ul>
<li><a href="https://www.mediaevent.de/tutorial/math-examples.html" target="_blank">MediaEvent :: Formeln mit math ‐ Beispiele</a></li>
<li><a href="http://www.math-it.org/Publikationen/MathML_de.html#Matrizen" target="_blank">http://www.math-it.org/Publikationen/MathML_de.html#Matrizen</a></li>
<li><a href="https://www.mediaevent.de/mathml-formeln-in-webseiten-mit-html5/" target="_blank">MediaEvent :: MathML: Formeln in HTML ‐ Stil mit Stil</a></li>
</ul>
</html>
<html>
<ul>
<li>Um die Schriftfarbe bei mathematischen Symbolen zu ändern,<br />
gibt es das Attribut <b><em> mathvariant</em></b>.<br />
<br />
Es besitzt folgende Parameter:
<table>
<tr><td>“bold“ </td><td> die Zeichen / Symbole werden <b>fett</b> geschrieben;</td></tr>
<tr><td>“italic“</td><td> die Zeichen / Symbole werden <i>kursiv</i> geschrieben;</td></tr>
</table>
</li>
<li>sie werden den einzelnen Tags <mn>, <mi>, <mo> hinzugefügt;<br />
<code><pre><mi mathvariant=“bold“>x</mi></pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://tex.stackexchange.com/questions/302809/how-can-i-get-bold-symbols-using-boldsymbol-and-tex4ht-with-mathml-output" target="_blank"
rel="noreferrer noopener">StackExchange ‐ Tex :: How can I get bold symbols using \boldsymbol and tex4ht with MathML output?</a></li>
</ul>
</html>
<html>
<li>
Die Grenzen von Summen und Integralen werden in MathML <br />
durch das Element <b><munderover></b> ermöglicht. Es erwartet <br />
drei Elemente in der Reihenfolge Symbol (Summe ∑ oder <br />
Integral ∫, ...), die untere Grenze und die obere Grenze. <br />
<br />
Beispielsweise wird die Formel
<math>
<munderover>
<mo>∫</mo>
<mn>1</mn> <mn>e</mn> </munderover>
<mfrac><mrow><mo>d</mo><mi>x</mi></mrow><mi>x</mi></mfrac>
<mo>=</mo>
<mn>1</mn>
</math>
durch
<code><pre>
<math>
<munderover>
<mo>&int;</mo>
<mn>1</mn>
<mn>e</mn>
</munderover>
<mfrac><mrow><mo>d</mo><mi>x</mi></mrow><mi>x</mi></mfrac>
<mo>=</mo>
<mn>1</mn>
</math>
</pre></code>
implementiert. <br />
<br />
Will man eine der Grenzen nicht angeben, so muss an die Stelle ein <br />
leeres Element <mn></mn> gesetzt werden.
</li>
<br />
<li>
Bei den Grenzen für Summen gibt es eine Besonderheit, hier wird <br />
zwischen den Darstellungsmodi <b>inline</b> und <b>display</b> unterschieden. <br />
Der Quelltext
<code><pre>
<math>
<munderover>
<mo>&sum;</mo>
<mn>1</mn>
<mn>2</mn>
</munderover>
<mfrac><mn>1</mn><mi>k</mi></mfrac>
<mo>=</mo>
<mn>1,5</mn>
</math>
</pre></code>
ergibt im Fließtext
<math>
<munderover>
<mo>∑</mo>
<mn>1</mn>
<mn>2</mn>
</munderover>
<mfrac><mn>1</mn><mi>k</mi></mfrac>
<mo>=</mo>
<mn>1,5</mn>
</math> , d.h. die Grenzen sind <i>neben</i> dem Summenzeichen angeordnet. <br />
<br />
Möchte man die Grenzen oberhalb und unterhalb von ihm haben, also <br />
<math>
<mstyle displaystyle="true">
<munderover>
<mo>∑</mo>
<mn>1</mn>
<mn>2</mn>
</munderover>
<mfrac><mn>1</mn><mi>k</mi></mfrac>
<mo>=</mo>
<mn>1,5</mn>
</mstyle>.
</math>,
so kann man das durch Einfügen des Terms in das Element <br />
<b><mstyle displaystyle="true"></b> erreichen:
<code><pre>
<math>
<mstyle displaystyle=„true“>
<munderover>
<mo>&sum;</mo>
<mn>1</mn>
<mn>2</mn>
</munderover>
<mfrac><mn>1</mn><mi>k</mi></mfrac>
<mo>=</mo>
<mn>1,5</mn>
</mstyle>.
</math>
</pre></code>
</li>
<br />
<li>Im Gegensatz dazu werden für Formeln im abgesetzten Modus die Grenzen <br />
standardmäßig immer ober- und unterhalb angeordnet, wie wir anhand der Gleichungen <br />
von Euler und Riemann
<math mode="display">
<mi>ζ</mi> <mo>(</mo><mi>s</mi><mo>)</mo>
<mo>=</mo>
<munderover>
<mo>∑</mo>
<mrow><mi>n</mi><mo>=</mo><mn>1</mn></mrow>
<mi>∞</mi>
</munderover>
<mfrac>
<mn>1</mn>
<msup><mi>n</mi><mi>s</mi></msup>
</mfrac>
<mo>=</mo>
<munderover>
<mo>∏</mo>
<mrow><mi>p</mi><mo>∈</mo><mn>ℙ</mn></mrow>
<mn></mn>
</munderover>
<mfrac>
<mn>1</mn>
<mrow><mn>1</mn><mo>-</mo><msup><mi>p</mi><mrow><mo>-</mo><mi>s</mi></mrow></msup></mrow>
</mfrac>
<mo>=</mo>
<mfrac>
<mrow>
<msup><mn>e</mn><mrow><mo>-</mo><mn>i</mn><mn>π</mn><mi>s</mi></mrow></msup>
<mn> </mn>
<mn>Γ</mn><mo>(</mo><mn>1</mn><mo>-</mo><mi>s</mi><mo>)</mo>
</mrow>
<mrow>
<mn>2</mn><mn>π</mn><mn>i</mn>
</mrow>
</mfrac>
<munderover>
<mo>∫</mo>
<mi>C</mi>
<mn></mn>
</munderover>
<mfrac>
<mrow><msup><mi>z</mi><mrow><mi>s</mi><mo>-</mo><mn>1</mn></mrow></msup><mo>d</mo><mi>z</mi></mrow>
<mrow><msup><mn>e</mn><mi>z</mi></msup><mo>-</mo><mn>1</mn></mrow>
</mfrac>
<mn> </mn><mn> </mn>
<mo>(</mo><mi>s</mi><mo>∈</mo><mn>ℂ</mn>
<mo>,</mo><mn> </mn>
<mo>Re</mo><mi>s</mi><mo>></mo><mn>1</mn>
<mo>)</mo>
</math>
ersehen. Hierbei ist
<math><mn>ζ</mn></math> die <a href="http://de.wikipedia.org/wiki/Riemannsche_Zeta-Funktion">Zeta-Funktion</a>,
<math><mn>ℙ</mn></math> die Menge der Primzahlen,
<math><mn>Γ</mn></math> die <a href="http://de.wikipedia.org/wiki/Gammafunktion">Gammafunktion</a>
<math>
<mn>Γ</mn><mo>(</mo><mi>s</mi><mo>)</mo>
<mo>=</mo>
<munderover><mo>∫</mo><mn>0</mn><mn>∞</mn></munderover>
<msup><mi>t</mi><mrow><mi>s</mi><mo>-</mo><mn>1</mn></mrow></msup>
<msup><mn>e</mn><mrow><mo>-</mo><mi>t</mi></mrow></msup>
<mo>d</mo><mi>t</mi>
</math>
und <math><mi>C</mi></math> ein Weg in der komplexen Ebene, der bei
<math><mo>+</mo><mn>∞</mn></math> beginnt, den Ursprung im positiven Sinn
einmal umkreist, ohne die Punkte
<math><mo>±</mo><mn>2πi</mn></math>, <math><mo>±</mo><mn>4πi</mn></math>, zu durchlaufen,
und schließlich nach <math><mo>+</mo><mn>∞</mn></math> zurückkehrt.<br />
Vgl. E.C. Titchmarsh & D.R. Heath-Brown: The Theory of the Riemann Zeta-function. Clarendon Press, Oxford 1986, Eqn. (2.4.2), sowie J. Neukirch: Algebraic Number Theory. Springer-Verlag, Berlin Heidelberg 1999, §VII.1. <br />
<br />
Der Quelltext dieser Identitäten lautet:
<code><pre>
<math mode="display">
<mi><span class="normal">&zeta;</span></mi> <mo><span class="normal">(</span></mo><mi><span class="normal">s</span></mi><mo><span class="normal">)</span></mo>
<mo><span class="normal">=</span></mo>
<munderover>
<mo><span class="normal">&sum;</span></mo>
<mrow><mi><span class="normal">n</span></mi><mo><span class="normal">=</span></mo><mn><span class="normal">1</span></mn></mrow>
<mi><span class="normal">&infin;</span></mi>
</munderover>
<mfrac>
<mn><span class="normal">1</span></mn>
<msup><mi><span class="normal">n</span></mi><mi><span class="normal">s</span></mi></msup>
</mfrac>
<mo><span class="normal">=</span></mo>
<munderover>
<mo><span class="normal">&prod;</span></mo>
<mrow><mi><span class="normal">p</span></mi><mo><span class="normal">&isin;</span></mo><mn><span class="normal">&primes;</span></mn></mrow>
<mn><span class="normal"></span></mn>
</munderover>
<mfrac>
<mn><span class="normal">1</span></mn>
<mrow><mn><span class="normal">1</span></mn><mo><span class="normal">-</span></mo><msup><mi><span class="normal">p</span></mi><mrow><mo><span class="normal">-</span></mo><mi><span class="normal">s</span></mi></mrow></msup></mrow>
</mfrac>
<mo><span class="normal">=</span></mo>
<mfrac>
<mrow>
<msup><mn><span class="normal">e</span></mn><mrow><mo><span class="normal">-</span></mo><mn><span class="normal">i</span></mn><mn><span class="normal">&pi;</span></mn><mi><span class="normal">s</span></mi></mrow></msup>
<mn><span class="normal">&nbsp;</span></mn>
<mn><span class="normal">&Gamma;</span></mn><mo><span class="normal">(</span></mo><mn><span class="normal">1</span></mn><mo><span class="normal">-</span></mo><mi><span class="normal">s</span></mi><mo><span class="normal">)</span></mo>
</mrow>
<mrow>
<mn><span class="normal">2</span></mn><mn><span class="normal">&pi;</span></mn><mn><span class="normal">i</span></mn>
</mrow>
</mfrac>
<munderover>
<mo><span class="normal">&int;</span></mo>
<mi><span class="normal">C</span></mi>
<mn><span class="normal"></span></mn>
</munderover>
<mfrac>
<mrow><msup><mi><span class="normal">z</span></mi><mrow><mi><span class="normal">s</span></mi><mo><span class="normal">-</span></mo><mn><span class="normal">1</span></mn></mrow></msup><mo><span class="normal">d</span></mo><mi><span class="normal">z</span></mi></mrow>
<mrow><msup><mn><span class="normal">e</span></mn><mi><span class="normal">z</span></mi></msup><mo><span class="normal">-</span></mo><mn><span class="normal">1</span></mn></mrow>
</mfrac>
<mn><span class="normal">&emsp;</span></mn><mn><span class="normal">&emsp;</span></mn>
<mo><span class="normal">(</span></mo><mi><span class="normal">s</span></mi><mo><span class="normal">&isin;</span></mo><mn><span class="normal">&complexes;</span></mn>
<mo><span class="normal">,</span></mo><mn><span class="normal">&nbsp;</span></mn>
<mo><span class="normal">Re</span></mo><mi><span class="normal">s</span></mi><mo><span class="normal">></span></mo><mn><span class="normal">1</span></mn>
<mo><span class="normal">)</span></mo>
</math>
</pre></code>
</li>
<br />
<h3>Link: </h3>
<ul>
<li><a href="http://www.math-it.org/Publikationen/MathML_de.html#Summen_und_Integrale" target="_blank">http://www.math-it.org/Publikationen/MathML_de.html#Summen_und_Integrale</a></li>
</ul>
</html>
<html>
<ul>
<li><pre><code><math mathsize=1.75em>
<msub>
<mi>κ</mi>
<mi>ℬ</mi>
</msub>
<mo>(</mo>
<mi>𝓋</mi>
<mo>)</mo>
<mo> = </mo>
<mstyle style="display:block">
<mo>(</mo>
<mtable>
<mtr>
<mtd>
<msub>
<mi>a</mi>
<mn>1</mn>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<mo>⋮</mo>
</mtd>
</mtr>
<mtr>
<mtd>
<msub>
<mi>a</mi>
<mi>n</mn>
</msub>
</mtd>
</mtr>
</mtable>
<mo>)</mo>
</mstyle>
</math></code></pre>
wird durch folgenden Code erstellt:
<pre><code><math mathsize=1.75em>
<msub>
<mi>&#x03BA;</mi>
<mi>&Bscr;</mi>
</msub>
<mo>(</mo>
<mi>&vscr;</mi>
<mo>)</mo>
<mo> = </mo>
<mstyle style="display:block">
<mo>(</mo>
<mtable>
<mtr>
<mtd>
<msub>
<mi>a</mi>
<mn>1</mn>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<mo>&#x22EE;</mo>
</mtd>
</mtr>
<mtr>
<mtd>
<msub>
<mi>a</mi>
<mi>n</mn>
</msub>
</mtd>
</mtr>
</mtable>
<mo>)</mo>
</mstyle>
</math> </code></pre>
</li>
<li>Die Klammern werden mittels
<pre><code><mstyle style="display:block">
<mo>(</mo>
…
<mo>)</mo>
</mstyle>
</code></pre>
erstellt;
</li>
</ul>
</html>
<html>
<ul>
<li> Das Wurzelzeichen erstreckt sich in der mathematischen Notation<br />
normalerweise über einen Term.</li>
<br />
<li>In MathML wird für das Wurzelzeichen das Element <b><msqrt></b> verwendet:
<code><pre>
<math>
<msqrt>
<mrow>
<mn>1</mn> <mo>-</mo> <mfrac> <mi>x</mi> <mn>2</mn> </mfrac>
</mrow>
</msqrt>
</math>
</pre></code>
ergibt
<math>
<msqrt>
<mrow>
<mn>1</mn>
<mo>-</mo>
<mfrac>
<mi>x</mi>
<mn>2</mn>
</mfrac>
</mrow>
</msqrt>
</math>
. </li>
<br />
<li>Die p-q-Formel zum Beispiel,
<math mode="display">
<mi>x</mi> <mo>=</mo>
<mo>-</mo> <mfrac><mi>p</mi><mn>2</mn></mfrac> <mo>±</mo> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac>
<msqrt>
<mrow>
<msup> <mi>p</mi> <mn>2</mn> </msup> <mo>-</mo>
<mrow>
<mn>4</mn> <mi>q</mi>
</mrow>
</mrow>
</msqrt>
</math>
wird durch den Quelltext
<code><pre>
<math mode="display">
<mi>x</mi> <mo>=</mo>
<mo>-</mo>
<mfrac><mi>p</mi><mn>2</mn></mfrac> <mo>&plusmn;</mo>
<mfrac> <mn>1</mn> <mn>2</mn> </mfrac>
<msqrt>
<mrow>
<msup> <mi>p</mi> <mn>2</mn> </msup> <mo>-</mo>
<mrow>
<mn>4</mn> <mi>q</mi>
</mrow>
</mrow>
</msqrt>
</math>
</pre></code>
bewirkt. </li>
<br />
<li>Um andere Wurzelexponenten als 2 darzustellen, also <u>nicht</u> die Quadrat-<br />
wurzel zu verwenden, gibt es in MathML das Element <b><mroot<></b>, das zwei<br />
Unterelemente erwartet, zunächst den Term, aus dem die Wurzel zu ziehen ist, <br />
und dann den Wurzelexponent:
<code><pre>
<math>
<mroot>
<mrow>
<mn>1</mn>
<mo>-</mo>
<mfrac>
<mi>x</mi>
<mn>2</mn>
</mfrac>
</mrow>
<mn>3</mn>
</mroot>
</math>
</pre></code>
ergibt somit
<math>
<mroot>
<mrow>
<mn>1</mn> <mo>-</mo>
<mfrac> <mi>x</mi> <mn>2</mn> </mfrac>
</mrow>
<mn>3</mn>
</mroot>
</math>. <br />
<br />
Weiteres Beispiel:<br />
<code><pre>
<math mathsize=1.25em>
<msub>
<mover>
<mi>x</mi>
<mi>‾</mi>
</mover>
<mi>g</mi>
</msub>
<mo>:=</mo>
<mroot>
<mrow>
<mstyle displaystyle="true">
<munderover>
<mo>&prod;</mo>
<mrow>
<mi>i</mi><mo>=</mo><mn>1</mn>
</mrow>
<mi>n</mi>
</munderover>
</mstyle>
<msub>
<mi>x</mi>
<mi>i</mi>
</msub>
</mrow>
<mi>n</mi>
</mroot>
</math>
</pre></code>
<br />
wird zu:<br />
<br />
<math mathsize=1.25em>
<msub>
<mover>
<mi>x</mi>
<mi>‾</mi>
</mover>
<mi>g</mi>
</msub>
<mo>:=</mo>
<mroot>
<mrow>
<mstyle displaystyle="true">
<munderover>
<mo>∏</mo>
<mrow>
<mi>i</mi><mo>=</mo><mn>1</mn>
</mrow>
<mi>n</mi>
</munderover>
</mstyle>
<msub>
<mi>x</mi>
<mi>i</mi>
</msub>
</mrow>
<mi>n</mi>
</mroot>
</math></li>
<br />
Link:<br />
<a href="http://www.math-it.org/Publikationen/MathML_de.html#Wurzelausdrücke">http://www.math-it.org/Publikationen/MathML_de.html#Wurzelausdrücke</a><br />
<br />
</html>
<html>
<table border="1">
<tr><th>Mathematisches <br /> Symbol</th><th>Symbol</th><th>HTML-Code</th></tr>
<tr><td>(Vorzeichen-) Minus-<br />Zeichen </td><td><center>−</center></td><td align=center>&minus;</td></tr>
<tr><td>Grad-Zeichen </td><td><center>°</center></td><td><center>&deg;</td></tr>
<tr><td>Kreiszahl pi </td><td><center>π</center></td><td><center>&pi;</td></tr>
<tr><td>PlusMinusZeichen</td><td><center>±</center></td><td><center>&plusmn;</td><tr>
<tr><td>für alle <em>(Allquantor)</em></td><td><center>∀</center></td><td><center>&forall; </td><tr>
<tr><td>partiell</td><td><center>∂</center></td><td><center>&part; </td><tr>
<tr><td>existiert</td><td><center>∃</center></td><td><center>&exist;</td><tr>
<tr><td>leere Menge</td><td><center>∅</center></td><td><center>&empty;</td><tr>
<tr><td>Nabla</td><td><center>∇</center></td><td><center>&nabla;</td><tr>
<tr><td>Element von </td><td><center>∈</center></td><td><center>&isin;</td><tr>
<tr><td>kein Element von </td><td><center>∉</center></td><td><center>&notin;</td><tr>
<tr><td>Element von (gespiegelt)</td><td><center>∋</center></td><td><center>&ni;</td><tr>
<tr><td>Produkt </td><td><center>∏</center></td><td><center>&prod; </td><tr>
<tr><td>Summe </td><td><center>∑</center></td><td><center>&sum; </td><tr>
<tr><td>minus </td><td><center>−</center></td><td><center>&minus;</td><tr>
<tr><td>Asterisk</td><td><center>∗</center></td><td><center>&lowast;</td><tr>
<tr><td>Wurzel </td><td><center>√</center></td><td><center>&radic; </td><tr>
<tr><td>proportional zu </td><td><center>∝</center></td><td><center>&prop;</td><tr>
<tr><td>unendlich<br />
(zwei Möglichkeiten)</td><td><center>
<ul>
<li>∞
</li>
<li>∞
</li>
</ul></center></td><td><center><ul>
<li>&infin;
</li>
<li>&#x221E;
</li>
</ul></td><tr>
<tr><td>Winkel</td><td><center>∠</center></td><td><center>&ang;</td><tr>
<tr><td>und</td><td><center>∧</center></td><td><center>&and; </td><tr>
<tr><td>oder</td><td><center>∨</center></td><td><center>&or;</td><tr>
<tr><td>Schnittmenge</td><td><center>∩</center></td><td><center>&cap;</td><tr>
<tr><td>Vereinigungsmenge</td><td><center>∪</center></td><td><center>&cup;</td><tr>
<tr><td>Integral</td><td><center>∫</center></td><td><center>&int; </td><tr>
<tr><td>deshalb</td><td><center>∴</center></td><td><center>&there4;</td><tr>
<tr><td>ähnlich wie (Tilde)</td><td><center>∼</center></td><td><center>&sim; </td><tr>
<tr><td>kongruent</td><td><center>≅</center></td><td><center>&cong;</td><tr>
<tr><td>beinahe gleich</td><td><center>≈</center></td><td><center>&asymp; </td><tr>
<tr><td>entspricht </td><td><center>≙</center></td><td><center>&wedgeq;</td><tr>
<tr><td>ungleich </td><td><center>≠</center></td><td><center>&ne; </td><tr>
<tr><td>identisch mit </td><td><center>≡</center></td><td><center>&equiv;</td><tr>
<tr><td>kleiner gleich </td><td><center>≤</center></td><td><center>&le; </td><tr>
<tr><td>größer gleich </td><td><center>≥</center></td><td><center>&ge; </td><tr>
<tr><td>Untermenge von </td><td><center>⊂</center></td><td><center>&sub;</td><tr>
<tr><td>Obermenge von </td><td><center>⊃</center></td><td><center>&sup;</td><tr>
<tr><td>keine Untermenge von </td><td><center>⊄</center></td><td><center>&nsub; </td><tr>
<tr><td>Untermenge von oder gleich mit </td><td><center>⊆</center></td><td><center>&sube;</td><tr>
<tr><td>Obermenge von oder gleich mit</td><td><center>⊇</center></td><td><center>&supe;</td><tr>
<tr><td>Restklassenaddition / <br />
direkte Summe (von Vektorrämen)</td><td><center>⊕</center></td><td><center>&oplus;</td><tr>
<tr><td>Kronecker-Produkt </td><td><center>⊗</center></td><td><center>&otimes;</td><tr>
<tr><td>senkrecht zu </td><td><center>⊥</center></td><td><center>&perp;</td><tr>
<tr><td>Punkt-Operator </td><td><center>⋅</center></td><td><center>&sdot;</td><tr>
<tr><td>Raute </td><td><center>◊</center></td><td><center>&loz;</td><tr>
<tr><td>Abbildung </td><td><center>↦</center></td><td><center>&mapsto;</td><tr>
<tr><td>Äquivalenz </td><td><center>⇔</center></td><td><center>&hArr;</td><tr>
<tr><td>Kartesisches Produkt </td><td><center>×</center></td><td><center>&times;</td></tr>
<tr><td>Skalarprodukt, linke Klammer </td><td><center>⟨</center></td><td><center>&langle;</td></tr>
<tr><td>Skalarprodukt, rechte Klammer </td><td><center>⟩</center></td><td><center>&rangle;</td></tr>
<tr><td>Abrundungsfunktion (Gaußklammer)</td><td><center>⌊·⌋</center></td><td><center>&lfloor; &middot; &rfloor;</td></tr>
<tr><td>Aufrundungsfunktion (Gaußklammer)</td><td><center>⌈·⌉</center></td><td><center>&lceil; &middot; &rceil;</td></tr>
<tr><td>natürliche Zahlen</td><td><center>ℕ</center></td><td><center>&Nopf;</td></tr>
<tr><td>rationale Zahlen</td><td><center>ℚ</center></td><td><center>&Qopf;</td></tr>
<tr><td>reelle Zahlen</td><td><center>ℝ</center></td><td><center>&Ropf;</td></tr>
<tr><td>ganze Zahlen</td><td><center>ℤ</center></td><td><center>&Zopf;</td></tr>
<tr><td>Multiplikation</td><td><center>·</center></td><td><center>&middot;</td></tr>
<tr><td>Negierung (Verneinungs-Zeichen) <br />(Negation) </td><td><center>¬</center></td><td><center>&not;</td></tr>
<tr><td>“Pipe–Zeichen“ </td><td><center>|</center></td><td><center>&vert;</td></tr>
<tr><td>Injektiv-Zeichen, <em>Injektion</em></td><td><center>↪</center></td><td align=center>&hookrightarrow;</td></tr>
<tr><td>Surjektiv-Zeichen, <em>Surjektion</em></td><td><center>↠</center></td><td align=center>&Rarr;</td></tr>
<tr><td>Divisions-Zeichen</td><td><center>÷</center></td><td align=center>&divide;</td></tr>
<tr><td></td><td><center>⪯</center></td><td align=center>&PrecedesEqual;</td></tr>
<tr><td></td><td><center>⪰</center></td><td align=center>&SucceedsEqual;</td></tr>
<tr><td>Vorgänger eines Elements</td><td><center>≺</center></td><td align=center>&Precedes;</td></tr>
<tr><td>Nachfolger eines Elements</td><td><center>≻</center></td><td align=center>&Succeeds;</td></tr>
<tr><td>Vorgänger eines Elements<br />
[Unicode]</td><td><center>≺</center></td><td align=center>&#x227A;</td></tr>
<tr><td>Nachfolger eines Elements<br />
[Unicode]</td><td><center> ≻</center></td><td align=center>&#x227B;</td></tr>
<tr><td>Verknüpfung von Abbildungen<br />
[Unicode]</td><td><center>∘</center></td><td align=center>&#x2218;</td></tr>
<tr><td>“mathematisches“ Kappa<br />
[<em>z.B. Koordinatenvektor</em>]</td><td><center><math mathsize=1.75em><br /><mi>κ</mi></math></center></td><td><math mathsize=1.25em><br />  <mi>&#x03BA;</mi><br /></math></td></tr>
<tr><td>die leere Menge</td><td><center>∅</center></td><td align=center>&empty;</td></tr>
<tr><td>Betragsfunktion</td><td><center>|</center></td><td align=center>&#x007C;</td></tr>
</table>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Liste_mathematischer_Symbole"
target="_blank" rel="noreferrer noopener">
Wikipedia :: Liste der mathematischen Symbole</a>
</li>
<li><a href="https://www.matheretter.de/wiki/mathe-zeichen"
target="_blank" rel="noreferrer noopener">
Matheretter :: Wiki ‐ Mathe‐Zeichen</a>
</li>
<li><a href="https://seo-summary.de/html-sonderzeichen/"
target="_blank" rel="noreferrer noopener">
SEO-Summary.de :: HTML Sonderzeichen</a>
</li>
<li><a href="https://www.compart.com/de/unicode"
target="_blank" rel="noreferrer noopener">
Compart :: HTML Sonderzeichen - Unicode</a>
</li>
</ul>
</html>
<html>
<ul>
<li>es wird dabei innerhalb vom HTML‐Dokument der Adobe‐Reader<br />
aufgerufen und das PDF‐Dokument angezeigt;</li>
</ul>
<h3>Code-Snippet:</h3>
<code><pre>
<object
width="800",
height="1075",
type="application/pdf",
data="ordner/document.pdf">
</object>
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://praxistipps.chip.de/pdf-in-html-einbinden-so-klappts_42665" target=_blank>CHIP :: PDF in HTML einbinden - so klappt's</a></li>
<li><a href="https://www.transcom.de/transcom/de/tipps-tricks/acrobat/2001_seite-direkt-anspringen.htm" target=_blank>Transcom :: Eine PDF-Datei öffnen und dabei eine Seite direkt anspringen</a></li>
</ul>
</html>
<html>
<ul>
<li><h3>HTML Triangular Arrow Entities [1]</h3>
<table border="1">
<tr>
<td>upper arrow
</td>
<td>▲
</td>
<td>&#9650;
</td>
</tr>
<tr>
<td>down arrow
</td>
<td>▼
</td>
<td>&#9660;
</td>
</tr>
<tr>
<td>right arrow
</td>
<td>▶
</td>
<td>&#9654;
</td>
</tr>
<tr>
<td>left arrow
</td>
<td>◀
</td>
<td>&#9664;
</td>
</tr>
</table>
</li>
<li><h3>Normale Pfeile [2]</h3>
<table border="1">
<tr>
<td>Dicker Pfeil nach rechts (Dingbats)
</td>
<td>➨
</td>
<td>&#10152;
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
</table>
</li>
<li>
</li>
<li>
</li>
<li>
</li>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>[1] <a href="https://www.delftstack.com/de/howto/html/html-codes-to-display-arrows/"
target="_blank" rel="noreferrer noopener">
DelfStack :: HTML-Codes zum Anzeigen von Pfeilen</a>
</li>
<li>[2] <a href="https://www.digitale-medienwelt.de/html-sonderzeichen-pfeile/"
target="_blank" rel="noreferrer noopener">
Digitale Medienwelt: </a>
</li>
<li>[3] <a href="https://www.w3schools.com/charsets/ref_utf_arrows.asp"
target="_blank" rel="noreferrer noopener">
W<sup>3</sup> Schools :: UTF-8 Arrows</a>
</li>
<li>[4] <a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<!--
<li>[5] <a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<code><pre><a target="popup" onclick="window.open
('', 'popup', 'width=580,height=360,scrollbars=no, toolbar=no,status=no,
resizable=yes,menubar=no,location=no,directories=no,top=10,left=10')
"href="popupdatei.html">Hier geht's zum Popup</a></pre></code>
<b>Wichtig:</b><br />
Die komplette Anweisung muß in einer Zeile stehen!
<h3>Beispiel:</h3>
<a target="popup" onclick="window.open ('', 'popup', 'width=580,height=360,scrollbars=no, toolbar=no,status=no, resizable=yes,menubar=no,location=no,directories=no,top=10,left=10') "href="popupdatei.html">Hier geht's zum Popup</a>
<h3>Links:</h3>
<a href="https://www.homepage-buttons.de/tipps-und-tricks/javascript/popup-ohne-javascript.html" target=_blank>homepage-buttons.de :: Popup ohne Javascript erstellen</a>
<a href="https://www.stichpunkt.de/html/popup.html" target=_blank>Stichpunkt.de :: Popups fast nur mit HTML</a><br />
<a href="https://wiki.selfhtml.org/wiki/JavaScript/Window#open" target=_blank>selfhtml :: JavaScript/Window</a>
</html>
<html>
<ul>
<li><h4>Schriftgröße ändern :: </h4>
<code><pre>
<div style=“font-size: 15px;“>Dies ist ein Text in Schriftgröße 15</div>
</pre></code>
wird zu :: <div style=“font-size: 15px;“>Dies ist ein Text in Schriftgröße 15</div><br />
In der Zwischenzeit habe ich herausgefunden, dass das mit CSS besser geht:<br />
<code><pre>
<style>
large {
font-size: 200%;
}
</style>
</pre></code>
und dann den Tag <b><large></b> verwenden.
</li>
<li><h4>Schriftart ändern :: </h4>
<code><pre>
<div style=“font-family: Arial, Verdana“>Dieser Text hat eine andere Schriftart</div>
</pre></code>
wird zu :: <div style="font-family: Arial, Verdana">Dieser Text hat eine andere Schriftart</div><br />
Durch die Angabe von mehreren Schriftarten wird die erste Schrift genommen, die<br />
verfügbar ist. Sollte also im vorhergehenden Beispiel die Schrift “Verdana“ nicht<br />
vorhanden sein, wird auf “Arial“ zurückgegriffen.
</li>
<li><h4>Schriftfarbe ändern :: </h4>
<code><pre>
<div style=“color: #2dcc77;“>Dieser Text hat eine Farbe</div>
</pre></code>
wird zu :: <div style="color: #2dcc77;"><b>Dieser Text hat eine Farbe</b></div>
</li>
<li><h4>Hintergrundfarbe ändern :: </h4>
<code><pre>
<div style=“background-color: #2dcc77;“>Dieser Text hat eine Farbe</div>
</pre></code>
wird zu :: <div style="background-color: #2dcc77;"><b>Dieser Text hat eine Farbe</b></div>
</li>
</ul>
<hr />
Damit das für das gesamte Dokument gilt, dann muss sowas<br />
wie das hier im <head>‐Bereich angegeben werden:<br />
<code><pre>
<style>
body {
background:#aaf;
}
body, th, td, weitereElemente {
font-family:Arial, sans-serif;
font-size:13px;
}
</style>
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://www.blogseite.com/html-schriftgroesse-aendern-so-gehts/"
target="_blank" rel="noreferrer noopener">
Blogseite.com :: HTML‐Schriftgröße ändern</a></li>
<li><a href="https://www.a-coding-project.de/ratgeber/html/text-gestalten"
target="_blank" rel="noreferrer noopener">
A Coding Project :: HTML ‐ Text gestalten</a></li>
<li><a href="https://www.farb-tabelle.de/de/farbtabelle.htm"
target="_blank" rel="noreferrer noopener">
Farbtabelle</a></li>
</ul>
</html>
<html>
<table>
<tr><th> Umlaut </th><th> HTML-Code </th><th>Unicode </th><th>  </th><th> Umlaut </th><th> HTML-Code </th><th> Unicode </th>
</tr>
<tr>
<td> <center><b>ä</b></center> </td><td> <center>&auml;</center> </td><td> \u00E4 </td>
<td>  </td>
<td> <center><b>ç</b></center> </td><td> <center>&ccedil;</center> </td><td>\u00E7</td>
<!--
<td>  </td>
<td> <center><b></b></center> </td><td> <center>&</center> </td><td></td>
-->
</tr>
<tr>
<td> <center><b>Ä</b></center> </td><td> <center>&Auml;</center> </td><td> \u00C4</td>
<td>  </td>
<td> <center><b>Ç</b></center> </td><td> <center>&Ccedil;</center> </td><td>\u00C7</td>
<!--
<td>  </td>
<td> <center><b></b></center> </td><td> <center>&</center> </td><td></td>
-->
</tr>
<tr>
<td> <center><b>ß</b></center> </td><td> <center>&szlig;</center> </td><td> \u00DF</td>
<td>  </td>
<td> <center><b>à</b></center> </td><td> <center>&agrave;</center> </td><td>\u00E0</td>
<!--
<td>  </td>
<td> <center><b></b></center> </td><td> <center>&</center> </td><td></td>
-->
</tr>
<tr>
<td> <center><b>ü</b></center> </td><td> <center>&uuml;</center> </td><td> \u00FC</td>
<td>  </td>
<td> <center><b>á</b></center> </td><td> <center>&aacute;</center> </td><td>&#225</td>
<!--
<td>  </td>
<td> <center><b></b></center> </td><td> <center>&</center> </td><td></td>
-->
</tr>
<tr>
<td> <center><b>Ü</b></center> </td><td> <center>&Uuml;</center> </td><td> \u00DC</td>
<td>  </td>
<td> <center><b>ê</b></center> </td><td> <center>&ecirc;</center> </td><td>&#234;</td>
</tr>
<tr>
<td> <center><b>ö</b></center> </td><td> <center>&ouml;</center> </td><td> \u00F6 </td>
<td>  </td>
<td> <center><b>Å</b></center> </td><td> <center>&Aring;</center> </td><td> &#197;</td>
</tr>
<tr>
<td> <center><b>Ö</b></center> </td><td> <center>&Ouml;</center> </td><td> \u00D6</td>
<td>  </td>
<td> <center><b>å</b></center> </td><td> <center>&aring;</center> </td><td> &#229; </td>
</tr>
<tr>
<td> <center><b>œ</b></center> </td><td> <center>&oelig;</center> </td><td> &#339; </td>
<td>  </td>
<td> <center><b>ø</b></center> </td><td> <center>&oslash;</center> </td><td> &#219; </td>
</tr>
<tr>
<td> <center><b>ā</b></center> </td><td> <center>&amacr;</center> </td><td></td>
<td>  </td>
<td> <center><b></b></center> </td><td> <center><!--&--></center> </td><td></td>
</tr>
</table>
<h3>Lateinisch erweitert</h3>
<table border="1">
<tr>
<th>Zeichen
</th>
<th>Name
</th>
<th>HTML-Code
</th>
<th>Unicode (hex.)
</th>
<th>Unicode (dez.)
</th>
</tr>
<tr>
<td><center><b>Œ</b></center>
</td>
<td>OE-Ligatur
</td>
<td>&OElig;
</td>
<td>&#x152;
</td>
<td>&#338;
</td>
</tr>
<tr>
<td><center><b>œ</b></center>
</td>
<td>oe-Ligatur
</td>
<td>&oelig;
</td>
<td>&#x153;
</td>
<td>&#339;
</td>
</tr>
<tr>
<td><center><b>Š</b></center>
</td>
<td>S mit Hatschek (Caron)
</td>
<td>&Scaron;
</td>
<td>&#x160;
</td>
<td>&#352;
</td>
</tr>
<tr>
<td><center><b>š</b></center>
</td>
<td>s mit Hatschek (Caron)
</td>
<td>&scaron;
</td>
<td>&#x161;
</td>
<td>&#353;
</td>
</tr>
<tr>
<td><center><b>Ÿ</b></center>
</td>
<td>Y Umlaut
</td>
<td>&Yuml;
</td>
<td>&#x178;
</td>
<td>&#376;
</td>
</tr>
<tr>
<td><center><b>ƒ</b></center>
</td>
<td>Funktion
</td>
<td>&fnof;
</td>
<td>&#x192;
</td>
<td>&#402;
</td>
</tr>
</table>
<br />
<b>Währungen:</b><br />
Euro ( € ) := &euro;<br />
Cent ( ¢ ) := &cent;<br />
US-Dollar ( $ ) := $<br />
Brit. Pfund : £ := &pound;<br />
Yen : ¥ := &yen;<br />
<br />
<ul>
<li>erzwungenes Leerzeichen :: &nbsp; <em>[als Unicode: &#160;]</em></li>
<li>Tabulator (Ersatz dafür) :: &nbsp;&nbsp;&nbsp;&nbsp;</li>
<li>Paragraphenzeichen :: § := &sect;</li>
<li>Gedankenstrich :: – :=&nbsp;&ndash; </li>
<li>Anführungszeichen :: „Beispiel“ := &bdquo;Beispiel&ldquo;</li>
<li>Apostroph (Auslassungzeichen) :: 'Beispiel' := &apos;Beispiel&apos;</li>
<li>    alternativ: &#39;</li>
<li>Mittelpunkt :: · := &middot;</li>
<li>At-Zeichen :: @ := &commat; (alternativ: &#64;)</li>
<li>Zirkumflex, Caret :: ˆ := &circ;</li>
<li>Horizontale Ellipse (Auslassungszeichen) :: … := &hellip;</li>
<li>Überstrich (“<i>Macron</i>“) :: ¯ := &macr;</li>
<li>Unterstrich :: _ := &lowbar;</li>
<li>Perioden-Überstrich :: 0,<span style="text-decoration: overline;">123</span> :=
<code><b>0,<span style=“text-decoration: overline;“>123</span></b></code></li>
<li>Hash-Zeichen (engl. <em>octothorpe</em>):: # := &num;</li>
<li>Durchschnittszeichen (<em>diameter sign</em>) :: ⌀ := &#8960;</li>
<li>senkrechter Strich / pipe‐Zeichen :: | := &#124;</li>
<li>Bullet :: • := &#8226; </li>
<li>Ampersand :: & := &amp;</li>
<li>Gradzeichen :: ° := &deg;</li>
<li>Tilde :: ~ := &#126;</li>
<li>Gedankenstrich, Zwischenstrich :: - := &#65293;</li>
<li>Rundungszeichen :: ≈ := &asymp;</li>
</ul>
<br />
Pfeil rechts :: → := &rarr;<br />
Doppel-Pfeil rechts :: ⇒ := &rArr;<br />
Äquivalenzpfeil :: ⇔ := &hArr;<br />
Pfeil oben :: ↑ := &uarr;<br />
Pfeil unten :: ↓ := &darr;<br />
<br />
Äquivalenz-Pfeil, einfach :: ↔ := &harr;<br />
Äquivalenz-Pfeil, doppelt :: ⇔ := &hArr;<br />
<br />
Check mark symbol (Tick off) :: ✓ := &checkmark bzw. ✓ := &check<br />
<br />
Copyright-Zeichen :: © := &copy;<br />
<br />
“Downward“‐Taste :: <span class="key">↓</span> := <span class="key">&darr;</span><br />
<br />
Schriftart für z.B. logische Aussagen :: 𝒜 := &Ascr;<br />
<h3>Links:</h3>
<ul>
<li><a href="https://www.fileformat.info/format/w3c/htmlentity.htm"
target="_blank" rel="noreferrer noopener">
Fileformat.info :: HTML EntityNames</a>
</li>
<li><a href="https://www.htmlsymbols.xyz/"
target="_blank" rel="noreferrer noopener">
HTML symbols</a>
</li>
<li><a href="https://www.vioma.de/de/wiki/tools/html-sonderzeichen/"
target="_blank" rel="noreferrer noopener">
Vioma :: HTML‐Sonderzeichen</a>
</li>
<li><a href="https://de.wikihow.com/" target="_blank" rel="noreferrer noopener">Wiki-How</a></li>
<li><a href="http://designerzone.de/html-umlaute-und-sonderzeichen/" target="_blank" rel="noreferrer noopener">Designerzone</a></li>
<li><a href="https://de.wikipedia.org/wiki/Typografische_Zeichen_in_HTML" target="_blank" rel="noreferrer noopener">Wikpedia :: Typografische Zeichen</a></li>
<li><a href="http://www.ascii.cl/htmlcodes.htm" target="_blank" rel="noreferrer noopener">ascii.cl :: Htmlcodes</a></li>
<li><a href="https://de.wikipedia.org/wiki/Liste_mathematischer_Symbole" target="_blank" rel="noreferrer noopener">Wikipedia :: Mathematische Symbole</a></li>
<li><a href="https://wiki.selfhtml.org/wiki/Referenz:HTML/Zeichenreferenz" target="_blank" rel="noreferrer noopener">SELFHTML :: Zeichenreferenz</a></li>
<li><a href="http://www.wolfgang-frank.eu/hc.php" target="_blank" rel="noreferrer noopener">Wolfgang Frank</a></li>
<li><a href="https://stackoverflow.com/questions/658044/tick-symbol-in-html-xhtml" target="_blank" rel="noreferrer noopener">StackOverflow :: Tick symbol</a></li>
<li><a href="https://www.webmaster-seo.com/de/unicode/coding" target="_blank" rel="noreferrer noopener">Webmaster SEO :: Unicode</a></li>
<li><a href="http://unicode.e-workers.de/" target="_blank" rel="noreferrer noopener">Unicode‐Darstellungen</a></li>
</ul>
</html>
<html>
<ul>
<li><h4>ein Strich bestimmter Länge:</h4>
<pre><code><hr style="width: 50px;"></code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.sven-hoerig.de/ratgeber/html-horizontale-linie-trennlinie/"
target="_blank" rel="noreferrer noopener">
Sven Hörig :: So machst du in HTML eine horizontale Linie</a>
</li>
</ul>
</html>
<html>
<ul>
<li><h4>Höhe und Breite der gesamten Tabelle erzwingen</h4>
<code><pre>
<table border width=60% height=400>
<!--hier folgt der Tabelleninhalt-->
</table>
</pre></code>
</li>
<li><h4>Breite von Spalten erzwingen</h4>
<code><pre>
<table border>
<tr>
<th width=300>Kopfzelle: 1. Zeile, 1. Spalte</th>
<th>Kopfzelle: 1. Zeile, 2. Spalte</th>
<th>Kopfzelle: 1. Zeile, 3. Spalte</th>
</tr>
<tr>
<td>Datenzelle: 2. Zeile, 1. Spalte</td> <!-- Breite 300 gilt auch hier -->
<td>Datenzelle: 2. Zeile, 2. Spalte</td>
<td>Datenzelle: 2. Zeile, 3. Spalte</td>
</tr>
<tr>
<td>Datenzelle: 3. Zeile, 1. Spalte</td> <!-- Breite 300 gilt auch hier -->
<td>Datenzelle: 3. Zeile, 2. Spalte</td>
<td>Datenzelle: 3. Zeile, 3. Spalte</td>
</tr>
</table>
</pre></code></li>
<li><h4>Höhe von Zeilen erzwingen</h4>
<code><pre>
<table border>
<tr>
<th height=300>Kopfzelle: 1. Zeile, 1. Spalte</th>
<th>Kopfzelle: 1. Zeile, 2. Spalte</th> <!-- Höhe 300 gilt auch hier -->
<th>Kopfzelle: 1. Zeile, 3. Spalte</th> <!-- Höhe 300 gilt auch hier -->
</tr>
<tr>
<td height=200>Datenzelle: 2. Zeile, 1. Spalte</td>
<td>Datenzelle: 2. Zeile, 2. Spalte</td> <!-- Höhe 200 gilt auch hier -->
<td>Datenzelle: 2. Zeile, 3. Spalte</td> <!-- Höhe 200 gilt auch hier -->
</tr>
<tr>
<td height=100>Datenzelle: 3. Zeile, 1. Spalte</td>
<td>Datenzelle: 3. Zeile, 2. Spalte</td> <!-- Höhe 100 gilt auch hier -->
<td>Datenzelle: 3. Zeile, 3. Spalte</td> <!-- Höhe 100 gilt auch hier -->
</tr>
</table>
</pre></code></li>
<li><h4>Zeilenumbruch in Zellen verhindern</h4>
<code><pre>
<table border>
<tr>
<th>Kopfzelle: 1. Zeile, 1. Spalte</th>
<td nowrap>Datenzelle: 1. Zeile, 2. Spalte - Text wird nicht umgebrochen!</td>
</tr>
</table>
</pre></code></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www2.ph.ed.ac.uk/~eisenhar/selfhtml/tcec.htm" target=_blank>SelfHtml :: Höhe und Breite der gesamten Tabelle erzwingen</a></li>
</ul>
</html>
<html>
<code><pre>
<table>
<col width="250">
<col width="150">
<col width="250">
<tr><td>1. Le forbici </td><td> <b><<em>leere Spalte</em>></b> </td><td>a. ___ uso per cambiare canale.</td></tr>
…
</table>
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://stackoverflow.com/questions/928849/setting-table-column-width#28188784" target="_blank" rel="noreferrer noopener">StackOverflow :: Setting table column width</a></li>
<li><a href="https://www.w3schools.com/tags/tag_col.asp" target="_blank" rel="noreferrer noopener">W3Schools.com :: HTML <col> Tag</a></li>
</ul>
</html>
<html>
<h2>Content</h2>
<ul>
<li> <a href="#first">Ausrichtung horizontal</a></li>
<li> <a href="#second">Ausrichtung vertikal</a></li>
<li> <a href="#third">Dezimalzeichenausrichtung</a></li>
</ul>
<div id="first" />
<h3>Ausrichtung horizontal</h3>
<h4>Kopfzeile :: </h4>
Mit <code><b>align=left</b></code> kann man eine Kopfzelle in ihrem einleitenden Tag <u>links</u> ausrichten, <br />
durch die Angabe <code><b>align=right</b></code> <u>rechts</u>.<br />
<h4>Datenzellen ::</h4>
Man kann in ihrem einleitenden Tag mit <code><b>align=center</b></code> <u>zentriert</u> ausrichten und <br />
durch <code><b>align=right</b></code> <u>rechts</u>. <br />
<br />
Die Angaben <code><b>align=center</b></code> bei Kopfzellen und <code><b>align=left</b></code> bei Datenzellen sind <br />
natürlich auch erlaubt,<br />
bewirken aber lediglich die Voreinstellung und sind deshalb nicht nötig. <br />
<br />
(align = Ausrichtung, left = links, center = zentriert, right = rechts).<br />
<br />
Ab HTML 4.0 ist auch die Angabe align=justify erlaubt. Dadurch erzwingen Sie einen<br />
Blocksatz innerhalb der Zelle. Ferner ist die Angabe align=char in Verbindung mit<br />
den Attributen char= und charoff= erlaubt. Solche Angaben sind in der Regel aber<br />
eher sinnvoll für ganze Spalten (siehe Dezimalzeichenausrichtung).<br />
<br />
<u>Zu beachten ist:</u><br />
Um alle Zellen einer Zeile gleich auszurichten, können Sie die Angaben zur Aus‐<br />
richtung auch im einleitenden Tag der Zeile <tr> notieren. So richten Sie beispiels‐<br />
weise mit <tr align=right> alle folgenden Zellen der Zeile rechts aus.
<div id="second" />
<h3>Ausrichtung vertikal</h3>
<p>
Mit valign=top können Sie eine Zelle in ihrem einleitenden Tag obenbündig ausrichten,<br />
durch die Angabe valign=bottom untenbündig. Auch die Angabe valign=middle ist mög‐<br />
lich. Dies ist jedoch die Voreinstellung ist und deshalb nicht nötig<br />
<br />
(valign = vertical align = vertikale Ausrichtung, top = oben, bottom = unten, middle = mittig).<br />
<br />
Ab HTML 4.0 ist auch die Angabe valign=baseline erlaubt. Dann werden alle Zellen <br />
innerhalb einer Zeile, die diese Angaben erhalten, an einer gemeinsamen Basislinie <br />
ausgerichtet. Und zwar so, daß die erste Textzeile aller dieser Zellen immer auf <br />
gleicher Höhe beginnt.<br />
<br />
<u>Zu beachten ist:</u><br />
Um alle Zellen einer Zeile gleich auszurichten, können Sie die Angaben zur Ausrich‐<br />
tung auch im einleitenden Tag der Zeile <tr> notieren. So richten Sie beispielsweise<br />
mit <code><tr valign=top></code> alle folgenden Zellen der Zeile obenbündig aus.
</p>
<div id="third" />
<h3>Dezimalzeichenausrichtung</h3>
<p>
Für Daten wie Kommazahlen mit unterschiedlich langen Angaben hinter dem Komma<br />
ist die normale Textausrichtung nicht so sehr geeignet. Solche Werte wirken optisch<br />
am besten, wenn sie an dem Dezimalzeichen ausgerichtet werden. Sinnvoll sind solche<br />
Angaben natürlich nur in Zellen, die einen entsprechenden Wert enthalten.<br />
<br />
Da sich die Angabe zur Ausrichtung auf eine ganze Spalte bezieht, gehört sie sinnvol‐<br />
lerweise in das <col>-Tag (siehe dazu Spalten vordefinieren).<br />
<br />
Mit align=char können Sie innerhalb eines <col>-Tags erzwingen, daß die Spalteninhalte<br />
an einem Dezimalzeichen ausgerichtet werden. Außerdem benötigen Sie noch das Attri‐<br />
but char= (char = character = Zeichen). Dahinter geben Sie - in Anführungszeichen - ein<br />
Zeichen an, das Sie als Dezimalzeichen verwenden. Alle Werte in der betreffenden Spalte,<br />
die dieses Zeichen enthalten, werden so ausgerichtet, daß das Dezimalzeichen immer an<br />
der gleichen Stelle steht. Im obigen Beispiel wird ein Komma als Dezimalzeichen definiert.<br />
In den Werten der betreffenden Spalte stehen dann Werte wie 10,3 oder 0,117.<br />
<br />
Neben dem Attribut char= zur Bestimmung des Dezimalzeichens können Sie zusätzlich <br />
noch das Attribut charoff= angeben (charoff = character offset = Zeichenposition). Damit<br />
können Sie angeben, an welcher Position das Zeichen frühestens vorkommen kann.
</p>
<h3>Links:</h3>
<ul>
<li><a href="http://euklid.mi.uni-koeln.de/c/doc/html/selfhtml-7.0/tced.htm"
target="_blank" rel="noreferrer noopener" >SELFHTML :: Tabelle ‐ Zelleninhalte ausrichten</a></li>
</ul>
</html>
<html>
<code><pre>
<table border="1">
<tr>
<td>ctrl - l</td> <td>clear screen</td>
</tr>
</table>
</pre></code>
<br />
"tr" := "table row"; der Eintrag pro Zeile <br />
"td" := "table data"; die Info, die in dem entsprechenden Tabellen-Feld stehen soll<br />
<br />
-->Ergbnis:
<table border="1">
<tr>
<td>ctrl - l</td>
<td>clear screen</td>
</tr>
</table>
• Tabelle mit Spaltenüberschrift:<br />
<code><pre>
<table border="1">
<tr>
<th>Shortcut</th><th>Bedeutung</th>
</tr>
<tr>
<td>ctrl - l</td> <td>clear screen</td>
</tr>
</table>
</pre></code>
-->Ergbnis:
<table border="1">
<tr>
<th>Shortcut</th><th>Bedeutung</th>
</tr>
<tr>
<td>ctrl - l</td>
<td>clear screen</td>
</tr>
</table>
<br />
Durch die Angabe <b>align=left</b> kann man eine Kopfzelle in ihrem <br />
einleitenden Tag links ausrichten, durch die Angabe <b>align=right</b> rechts.<br />
<br />
Datenzellen kann man in ihrem einleitenden Tag durch die Angabe <b>align=center</b><br />
zentriert ausrichten und durch <b>align=right</b> rechts. <br />
<br />
Die Angaben <b>align=center</b> bei Kopfzellen und <b>align=left</b> bei Daten‐<br />
zellen sind natürlich auch erlaubt, bewirken aber lediglich die Voreinstellung und sind deshalb nicht nötig. <br />
<br />
<u>Beachte:</u><br />
Um alle Zellen einer Zeile gleich auszurichten, können man die Angaben zur Ausrichtung, also align=left, align=center und align=right, auch im einleitenden Tag der Zeile <tr> notieren. So richten Sie beispielsweise mit <tr align=right> alle folgenden Zellen der Zeile rechts aus.
<h3>Links:</h3>
<ul>
<li><a href="http://www.starhtml.de/online/tabellen.htm" target="_blank" rel="noreferrer noopener">StarHtml :: Tabelle</a></li>
<li><a href="https://wiki.selfhtml.org/wiki/HTML/Tabellen/Aufbau_einer_Tabelle" target="_blank" rel="noreferrer noopener">SELFHTML :: Zelleninhalte ausrichten</a></li>
<li><a href="https://www.html.am/html-codes/tables/table-border.cfm" target="_blank" rel="noreferrer noopener">HTML.am :: Table border</a></li>
</html>
<html>
<ul>
<li><h3>Syntax:</h3>
<code><pre>
<table style="float:<b><u>left</u></b>;width:49.5%;" border="1">
<tr>
<td>links</td>
</tr>
</table>
<table style="float:<b><u>right</u></b>;width:49.5%;" border="1">
<tr>
<td>rechts</td>
</tr>
</table>
</pre></code></li>
<li>bei der zweiten (und jeder weiteren) Tabelle in der gleichen Zeile<br />
kann das “right“ von der <code><b>style</b></code> auch weggelassen werden.</li>
<br />
<li>Um Text ordnungsgemäß <b><em>unter</em></b>, und nicht neben<br />
der Tabellen anzeigen zu lassen, folgenden Code verwenden:
<code><pre>
<br style=“clear:both;“ />
</pre></code>
Diese Zeile hat hinter dem schliessenden <em><b>table</em></b>‐Tag zu stehen.<br />
(Ob das korrektes HTML ist, weiss ich nicht, aber es funktioniert halt …)</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.tutorials.de/threads/2-tabellen-horizontal-nebeneinander.257545/" target=_blank>Tutorials.de :: Tabellen horizontal nebeneinander</a></li>
<li>s. a. HTML :: Griechisches Alphabet - Zeichenreferenz</li>
</ul>
</html>
<html>
<ul>
<li><h3>colspan</h3>
Um Spalten zu verbinden: <pre><code><td colspan="3"></code></pre>
</li>
<li><h3>rowspan</h3>
Um Zeilen zu verbinden: <pre><code><td rowspan="3"></code></pre>
</li>
</ul>
<br />
Die überschüssigen <td> … </td>–Einträge entfernen!<br />
<br />
als Bsp. s. Tiddler "Tabelle mit Werten von Arctan"<br />
<br />
<h3>Links:</h3>
<ul>
<li><a href="https://www.html-seminar.de/tabellenzeilen-verbinden.htm"
target="_blank" rel="noreferrer noopener">
HTML‐Seminar :: Tabellen ‐ Tabellenzeilen verbinden</a>
</li>
</ul>
</html>
<html>
Zum Formatieren des Textes stehen folgende HTML-Elemente zur Vefügung:<br />
<table>
<tr><td> <b> </td><td> Bold text; defines <b>bold</b> text, without any extra importance.</td></tr>
<tr><td> <strong> </td><td> Important text; defines <strong>strong</strong> text, with added semantic "strong" importance.</td></tr>
<tr><td> <i> </td><td> Italic text; defines <i>italic</i> text, without any extra importance.</td></tr>
<tr><td> <em> </td><td> Emphasized text; defines <em>emphasized</em> text, with added semantic importance.</td></tr>
<tr><td> <mark> </td><td> Marked text</td></tr>
<tr><td> <small> </td><td> Small text</td></tr>
<tr><td> <del> </td><td> Deleted text</td></tr>
<tr><td> <ins> </td><td> Inserted text</td></tr>
<tr><td> <sub> </td><td> Subscript text, Text tiefgestellt</td></tr>
<tr><td> <sup> </td><td> Superscript text, Text hochgestellt</td></tr>
<tr><td> <center> </td><td> Text zentrieren</td></tr>
<tr><td> <strike> </td><td> Text durchgestrichen</td></tr>
</table>
<br />
• <b>doppelt unterstrichen</b>:<br />
<span style="BORDER-BOTTOM: #000000 double"> ... der Text ...</span><br />
<br />
--> <code>
<span style="BORDER-BOTTOM: #000000 double"> ... der Text ...</span>
</code><br />
<h3>Links:</h3>
<ul>
<li><a href="http://www.w3schools.com/html/html_formatting.asp"
target=_blank rel="noreferrer noopener">
w3schools :: html formatting</a>
</li>
<li><a href="http://principessa-design.de.tl/Textstyling.htm"
target=_blank rel="noreferrer noopener">
Principess-Design :: Textstyling</a>
</li>
</ul>
</html>
<html>
<ul>
<li><b>Bold</b>: <b>…</b></li>
<li><i>Kursiv</i>: <i>…</i></li>
<li><u>Unterstrichen</u>: <u>…</u></li>
</ul>
</html>
<html>
<p>
Im angezeigten HTML-Dokument ist das Trennzeichen “Unterstrich“<br />
bzw. “underscore“ nicht sichtbar.
</p>
<p>
Die Ursache ist mir nicht bekannt, aber durch den Eintrag
<code><pre>
<!doctype html>
</pre></code>
als <u>erste Zeile</u> im html‐Dokument wurde das Zeichen<br />
als “&lowbar;“ erkannt und angezeigt.
</p>
</html>
<html>
<h4>Der Anker (<em>Das Ziel</em>)</h4>
Soll an bestimmte Stellen (z.B. Überschriften, Wörter oder auch <br />
Bilder) im Dokument verwiesen werden, so müssen diese Stellen erst als Anker<br />
gekennzeichnet werden. Der hierfür notwendige Quelltext lautet:<br />
<code><pre><A NAME=“bezeichnung“> Text/Bild als Verweisziel </A></pre></code>
Für die Benennung des Ankers (hier bezeichnung) ist zu beachten:
<ol>
<li>) Die Bezeichnung muss dateiweit eindeutig sein <br />
(ist ja auch irgendwie unsinnig, mit einem Link zu <br />
zwei gleich bezeichneten Ankern springen zu wollen)</li><br />
<li>) Die Bezeichnung darf keine Sonderzeichen <br />
(außer _ ), kein ä, ö, ü, ß und keine Leerzeichen enthalten</li>
</ol>
<h4>Der Verweis (<em>Die Quelle</em>)</h4>
Der eigentliche Verweis folgt dem üblichen Schema, wobei als<br />
Verweisziel erst ein # und dann die Bezeichnung des Ankers<br />
eingefügt wird. Der Verweis zu dem Anker von oben sähe im <br />
Quelltext also folgendermaßen aus:
<code><pre><A HREF="#bezeichnung"> Verweistext </A></pre></code>
<b>Achtung:</b><br />
Wichtig ist außer dem # auch die Beachtung von Groß- und Kleinschreibung.<br />
<br />
Und hier gibt's ein Beispiel, wo man sich das Ganze mal genauer anschauen kann.<br />
<h4>Link:</h4>
<a href="https://userpage.fu-berlin.de/mirjamk/htmlkurs/links.html" target="_blank">https://userpage.fu-berlin.de/mirjamk/htmlkurs/links.html</a>
</html>
<html>
<ul>
<li><h3>Video-Befehl in HTML</h3>
<ul>
<li>Der Befehl zum Einbauen von Videos:
<pre><code><video></video></code></pre>
</li>
<li>Dieses Format wird auch von allen gängigen Browsern unterstützt. Den Bereich dazwischen müssen Sie dann mit den Eingaben und Einstellungen rund um Ihr gewünschtes Video füllen. Dafür gibt es verschiedene Anpassungsoptionen:<br />
<table>
<tr>
<td>height/width
</td>
<td>Damit gibt man die Höhe und Breite Ihres Videos in Pixeln an.
</td>
</tr>
<tr>
<td>controls
</td>
<td>Hierüber schaltet man die Anzeige von Videoeinstellungen während des Schauens an.
</td>
</tr>
<tr>
<td>source
</td>
<td>Source ist ein eigener Befehl und gibt die Quelle Ihres Videos an. Das kann eine Datei auf Ihrem Computer sein oder ein Video auf einer Internetplattform. Nach <source> muss man per "src=" Ihre Quelle angeben.
</td>
</tr>
<tr>
<td>type
</td>
<td>Hierüber definiert man das Format Ihres Videos. Die aktuelle HTML-Version, HTML5, unterstützt die Videoformate MP4, WebM und Ogg.
</td>
<tr>
</table>
</li>
<li>Man kann die Videowiedergabe auch mit weiteren Attributen anpassen:<br />
<table>
<tr>
<td>autoplay
</td>
<td>Das Video wird abgespielt, sobald die Seite aufgerufen wird. Auf manchen mobilen Geräten funktioniert das nicht immer.
</td>
</tr>
<tr>
<td>loop
</td>
<td>Sobald das Video zu Ende ist, wird es erneut gestartet.
</td>
</tr>
<tr>
<td>poster
</td>
<td>Damit kann man ein Bild festlegen. Dieses wird so lange angezeigt, bis das Video gestartet wird.
</td>
</tr>
<tr>
<td>preload
</td>
<td>Das Video muss nicht erst laden, sobald es gestartet wird. Es wird automatisch geladen, sobald die Seite geladen wird.
</td>
</tr>
<tr>
<td>volume
</td>
<td>Hier muss ein Wert zwischen 0 und 100 eingegeben werden, der die Lautstärke des Videos festlegt.
</td>
</tr>
</table>
</li>
<li>Ein fertiger Video-Befehl kann also so aussehen:
<pre><code><video width="320" height="270" controls autoplay>
<source src="beispielvideourl.mp4" type="video/mp4“></source>
</video></code></pre>
</li>
<li>Oder auch so:
<pre><code><video width="320" height="270" volume=0 loop>
<source src="beispielvideourl.mp4" type="video/mp4“></source>
</video></code></pre>
</li>
<li>Manchmal wird anstelle des oben genannten Video-Befehls auch <iframe> verwendet. Das Besondere an diesem Befehl ist, dass es sich dabei um ein einzelnes Element handelt. Die entsprechenden Einstellungen werden direkt in das erste iframe-Element geschrieben und stehen nicht als einzelnes Element zwischen <iframe> und </iframe>.
</li>
<li>Ein über dieses Format eingebundenes Video kann dann so aussehen:
<pre><code><iframe width="560" height="315" src="Quelle" frameborder="0" allow="autoplay" allowfullscreen></iframe></code></pre>
</li>
<li>Anstelle von "Quelle" müssen Sie hier den Verweis auf Ihr gewünschtes Video eintragen, beispielsweise eine Verlinkung zu YouTube.
</li>
</ul>
</li>
<li><h3>YouTube-Video einbetten</h3>
<ul>
<li>YouTube macht es Ihnen sehr einfach, das entsprechende Video in Ihre Website zu integrieren. Besuchen Sie ein Video, klicken Sie mit der rechten Maustaste darauf und wählen Sie "Einbettungscode kopieren" aus. Diesen Code können Sie direkt in Ihre HTML-Datei übernehmen.
</li>
<li>Per Rechtsklick und "<b>Einbettungscode kopieren</b>" können Sie diesen direkt weiterverwenden.
</li>
<li>Alternativ können Sie auf "Teilen" klicken, sodass Ihnen verschiedene Optionen angezeigt werden. Wählen Sie "Einbetten" aus, wird Ihnen auf der rechten Seite ebenfalls der Quellcode ausgegeben.
</li>
<li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.heise.de/tipps-tricks/Video-in-HTML-einbinden-so-geht-s-4909633.html"
target="_blank" rel="noreferrer noopener">
Heise-Onine :: Video in HTML einbinden - so geht's</a>
</li>
</ul>
</html>
<html>
Damit auch Zeilenumbrüche und Einrückungen <br />
angezeigt werden, kann auf das <pre>-Element<br />
zurückgegriffen werden, welches vorformatierten<br />
Text in dicktengleicher Schrift so anzeigt, wie er<br >
eingegeben wurde.
Beispiel:
<pre><code>
<code><pre>
<table border="1">
<tr>
<td>ctrl - l</td> <td>clear screen</td>
</tr>
<table>
</pre></code>
</code></pre>
In welcher Schriftart und Schriftgröße präformatierter Text <br />
genau dargestellt wird, darauf haben Sie mit HTML keinen<br />
Einfluss. Die Browser benutzen Default-Formatierungen, <br />
für den Inhalt von pre-Elementen typischerweise eine<br />
dicktengleiche Schrift. (→ Alternative: CSS)<br />
</html>
<html>
<ul>
<li>tiefgestellter Text:
<pre><code>This text contains <sub>subscript</sub> text.</code></pre>
wird zu:
<pre><code>This text contains <sub>subscript</sub> text.</code></pre>
</li>
<li>hochgestellter Text:
<pre><code>This text contains <sup>superscript</sup> text.</code></pre>
wird zu:
<pre><code>This text contains <sup>superscript</sup> text.</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.w3schools.com/TAGS/tag_sub.asp"
target="_blank" rel="noreferrer noopener">
W<sup>3</sup> School :: HTML <sub> Tag </a>
</li>
</ul>
</html>
<html>
Beispiel für ein HTML response:
<code><pre>
PS C:\Users\jemuelle> <b>curl http://info.cern.ch/</b>
StatusCode : 200
StatusDescription : OK
Content : <html><head></head><body><header>
<title>http://info.cern.ch</title>
</header>
<h1>http://info.cern.ch - home of the first website</h1>
<p>From here you can:</p>
<ul>
<li><a href="http://info.cern.ch...
RawContent : HTTP/1.1 200 OK
Connection: close
Accept-Ranges: bytes
Content-Length: 646
Content-Type: text/html
Date: Sat, 14 Dec 2019 14:20:08 GMT
ETag: "40521bd2-286-4f1aadb3105c0"
Last-Modified: Wed, 05 ...
Forms : {}
Headers : {[Connection, close], [Accept-Ranges, bytes], [Content-Length, 646], [Content-Type, text/html]...}
Images : {}
InputFields : {}
Links : {@{innerHTML=Browse the first website; innerText=Browse the first website; outerHTML=<A
href="http://info.cern.ch/hypertext/WWW/TheProject.html">Browse the first website</A>;
outerText=Browse the first website; tagName=A;
href=http://info.cern.ch/hypertext/WWW/TheProject.html}, @{innerHTML=Browse the first website
using the line-mode browser simulator; innerText=Browse the first website using the line-mode
browser simulator; outerHTML=<A
href="http://line-mode.cern.ch/www/hypertext/WWW/TheProject.html">Browse the first website using
the line-mode browser simulator</A>; outerText=Browse the first website using the line-mode
browser simulator; tagName=A; href=http://line-mode.cern.ch/www/hypertext/WWW/TheProject.html},
@{innerHTML=Learn about the birth of the web; innerText=Learn about the birth of the web;
outerHTML=<A href="http://home.web.cern.ch/topics/birth-web">Learn about the birth of the web</A>;
outerText=Learn about the birth of the web; tagName=A;
href=http://home.web.cern.ch/topics/birth-web}, @{innerHTML=Learn about CERN, the physics
laboratory where the web was born; innerText=Learn about CERN, the physics laboratory where the
web was born; outerHTML=<A href="http://home.web.cern.ch/about">Learn about CERN, the physics
laboratory where the web was born</A>; outerText=Learn about CERN, the physics laboratory where
the web was born; tagName=A; href=http://home.web.cern.ch/about}}
ParsedHtml : mshtml.HTMLDocumentClass
RawContentLength : 646
PS C:\Users\jemuelle>
</pre></code>
</html>
<html>
<ol>
<li><a href="https://www.hackerone.com/de"
target="_blank" rel="noreferrer noopener">
https://www.hackerone.com/de</a>
</li>
<li><a href="https://www.bugcrowd.com/"
target="_blank" rel="noreferrer noopener">
https://www.bugcrowd.com/</a>
</li>
<li><a href="https://cobalt.io/platform"
target="_blank" rel="noreferrer noopener">
https://cobalt.io/platform</a>
</li>
<li><a href="https://www.yeswehack.com/en/index.html"
target="_blank" rel="noreferrer noopener">
https://www.yeswehack.com/en/index.html</a>
</li>
<li><a href="https://www.bugbountyhq.com/"
target="_blank" rel="noreferrer noopener">
https://www.bugbountyhq.com/</a>
</li>
<li><a href="https://www.intigriti.com/public/researchers"
target="_blank" rel="noreferrer noopener">
https://www.intigriti.com/public/researchers</a>
</li>
</ol>
</html>
<html>
<h3>OWASP</h3>
<ul>
<li>Open Web Application Security Project Broken Web Applications Project
</li>
<li>it's a collection of vulnerable web applications that <br />
is distributed on a Virtual Machine in VMware for-<br />
mat compatible with their no-cost and commercial<br />
VMware products.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://sourceforge.net/projects/owaspbwa/"
target="_blank" rel="noreferrer noopener">
Sourceforge :: OWASP Broken Web Applications Project </a>
</li>
</ul>
</html>
<html>
<ul>
<li>PIE :=: Position Independent Executables
</li>
<li>ASLR :=: Address Space Layout Randomization
</li>
</li>
<li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://github.com/fekk1i/PIE-Bypass-Techniques"
target="_blank" rel="noreferrer noopener">
fekk1i :: PIE-Bypass-Techniques Public [GitHub]</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>
</li>
<li>
</li>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://book.hacktricks.wiki/en/pentesting-web/ssti-server-side-template-injection/index.html"
target="_blank" rel="noreferrer noopener">
HackTricks :: SSTI (Server Side Template Injection)</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>Codierungstheorie</li>
<li><b>Definition:</b><br />
Der <b>Hamming-Abstand</b> zweier Blöcke mit fester Länge <br />
(sogenannter Codewörter) ist dabei die Anzahl der <br &>
unterschiedlichen Stellen. </li>
</ul>
</html>
<html>
How can we change the time zone on a HP-UX machine ??<br />
<br />
<b>Answer : </b><br />
Edit the entry in <b><code>/etc/src.sh</code></b> <br />
and <b><code>/etc/src.csh</code></b>, and <b><code>reboot</code></b>.<br />
<br />
This tip generously supported <br />
by: anil_sedha@mumbai.tcs.co.in<br />
</html>
<html>
<ul>
<li>Ein-Weg-Hash</li>
<li>Kollisionsresistenz</li>
</ul>
</html>
<html>
<ul>
<li>Der Hashstring, das Ergebnis selber ist (nur) 64 Zeichen lang.</li>
<li><em>Wofür steht “256“?</em></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/SHA-2" target="_blank" rel="noreferrer noopener">Wikipedia :: SHA‐2</a></li>
<li><a href="https://web.archive.org/web/20150315061807/http://csrc.nist.gov/groups/STM/cavp/documents/shs/sha256-384-512.pdf" target="_blank" rel="noreferrer noopener">NIST :: Descriptions of SHA‐256, SHA‐384, and SHA‐512</a> (<em>PDF downloaded</em>)</li>
</ul>
</html>
<html>
<h3>SHA, “Secure Hash Algorithm“</h3>
<ul>
<li>eine Gruppe kryptologischer Hashfunktionen</li>
<li>1993 :: SHA → hatte aber einen Konstruktionsfehler</li>
<li>1995 :: SHA‐1</li>
<li>2002 :: SHA‐2 → eine Familie von SHA‐Funktionen</li>
<li>2012 :: SHA‐3, alternativ zu SHA‐2</li>
<li>Die Kommandozeilenbefehle md5sum, sha1sum, sha256sum,<br />
sha512sum usw. sind im Paket coreutils enthalten. </li>
<li> Der SHA1-Algorithmus sollte für sicherheitsrelevante Zwecke nicht<br />
mehr verwandt werden. Stattdessen sollte man einen SHA-2-Algo‐<br />
rithmus, der in den Programmen sha224sum(1), sha256sum(1), <br />
sha384sum(1) und sha512sum(1) implementiert ist oder den in<br />
b2sum(1) implementierten BLAKE2-Algorithmus verwenden.
</li>
<!--
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
-->
</ul>
<h3>MD4 bzw. MD5</h3>
<ul>
<li>gelten als unsicher → keine Verwendung mehr</li>
</ul>
<h3>Ripe-MD</h3>
<ul>
<li></li>
</ul>
<h3>Whirlpool</h3>
<ul>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Secure_Hash_Algorithm" target=_blank>Wikipedia</a></li>
<li><a href="https://wiki.ubuntuusers.de/Hashfunktionen" target="_blank" rel="noreferrer noopener">Ubuntu‐Users :: Hashfunktionen</li>
<li><a href="https://www.thomas-krenn.com/de/wiki/Md5sum_und_sha1sum_zum_Überprüfen_von_Dateidownloads_verwenden" target="_blank" rel="noreferrer noopener">Thomas Krenn :: Md5sum und sha1sum zum Überprüfen von Dateidownloads verwenden </li>
</ul>
</html>
<html>
<ul>
<li>wurde in einem Focus-Interview mit Frank Thelen erwähnt</li>
<br />
</ul>
</html>
<html>
<ul>
<li>die monatliche <b>Eigentümer</b>‐Umlage<br />
(was der Eigentümer/Vermieter z.B.<br />
an die Hausverwaltung <u>im voraus</u> zu zahlen hat);</li><br />
<li>WEG := <b>W</b>ohnungs<b>E</b>igentümer<b>G</b>emeinschaft</li><br />
<li>Die Unterschiede können erheblich sein und<br />
spielen bei der Kalkulation eine gewichtige Rolle;</li><br />
<li>lässt sich als die <b>Nebenkosten‐Vorauszahlung</b> <br />
eines Wohnungseigentümers an den Verwalter sehen</li><br />
<li> nur ist sie in der Regel höher als die Nebenkosten‐<br />
Vorauszahlung eines Mieters.</li><br />
<li>Am Jahresende gibt es üblicherweise eine Abrechnung<br />
und dann eine Erstattung oder Nachzahlung ‐ wie bei den <br />
Nebenkosten als Mieter auch.</li><br />
<li>Abgerechnet werden:<br />
<ul>
<li><u>einerseits</u> Betriebskosten für Müllentsorgung,<br />
Wasser, Gebäude-Versicherungen und Hausmeister, </li>
<li><u>andererseits</u> Heizkosten.</li></ul></li><br />
</ul>
Es sei denn, die Eigentumswohnung ist mit einer Gasetagenheizung ausgestattet. Solche Kosten können auf die Mieter umgelegt werden ‐ hinzukommen beim Eigentümer aber noch Verwaltergebühren sowie Reparatur-Rücklagen für das Gemeinschaftseigentum.<br />
<h3>Welche Kosten zählen zum Hausgeld?</h3>
Zunächst zählen Betriebskosten, die auf den Mieter umlegbar wären (in der Betriebskostenordnung genauer definiert) dazu. Das können Kosten für Heizung, Wasser, Müllentsorgung, Garteninstandhaltung und Hausmeister sein. Daneben gibt es Betriebskosten, welche nicht auf die Mieter umlegbar sind - etwa Verwaltungskosten.<br />
<br />
Einen weiteren Punkt bilden die Instandhaltungsrücklage, die Aus Abnutzung und Alterung entstehende Kosten abdeckt. <br />
<br />
Im Schnitt sind etwa 2,60 Euro pro Quadratmeter Wohnfläche anzusetzen, so eine Studie von 2006. Inzwischen dürften es etwa 2,70 Euro sein. Bei einer 75-Quadratmeter-Wohnung wären das somit rund 200 Euro monatliches Hausgeld. Deutlich mehr oder deutlich weniger ist möglich. Günstiger sind generell kleine Wohnanlagen mit bis etwa zehn Eigentümern, größere Wohnanlagen produzieren deutlich höhere Kosten.
<h3>Links:</h3>
<ul>
<li><a href="https://www.welt.de/finanzen/immobilien/article106139274/Eigentuemer-unterschaetzen-Kosten-fuer-Hausgeld.html" target=_blank>Welt :: Eigentümer unterschätzen Kosten für Hausgeld</a>
</li><li>
<a href="https://www.hausverwaltung-ratgeber.de/hausgeld.html" target=_blank>Hausverwaltung - Ratgeber :: Hausgeld</a></li>
</ul>
</html>
<html>
<ul>
<li>akt. Version: 3.9.2 (Stand: 02/2018)</li>
<br />
<li>eine in Java geschriebene In-Memory DB</li>
<br />
<li>Ebenso der Name des entsprechenden Unternehmens, <br />
das die Weiterentwicklung führt</li>
<br />
<li>Open Source </li>
<br />
<li>IMDG := “In-Memory Data Grid“</li>
<br />
<li></li>
<br />
<li></li>
<br />
</ul>
</html>
<html>
If you want to have some hidden directories on your <br />
server (warez etc.), then make a directory with permission 111.<br />
<pre><code>
% chmod 111 foo/
</code></pre>
All the contents will become hidden:
<pre><code>
% cd foo
% ls -al
Cannot access directory .: Permission denied
</code></pre>
The directory will have to opened back up (755) in order <br />
to see or access the files or the directory. To remove the<br />
directory and its contents, it will also need to have the <br />
permissions opened.<br />
</html>
<html>
There is a Solaris command to tell you <br>
if your in 64 or 32 bit mode:<br>
<br>
<b>isainfo -vk</b><br>
<br>
This tip generously supported <br>
by: boni@dsw.net<br>
</html>
<html>
If you're a csh/tcsh/zsh user, you've seen the supposed feature<br>
that lets you display how many commands you've run in your<br>
prompt:
<pre><code>
set prompt="\! %"
</code></pre>
The \! (or %h or %! for tcsh) displays not really a current<br>
count of commands run, but the current history event number.<br>
<br>
Think of it in those terms, and you'll discover it becomes quite<br>
useful.<br>
<br>
For example, how many times have you typed some enormously long<br>
command line, only to have it fail because several other conditions<br>
weren't met?<br>
<br>
You spend the next several prompts typing various commands to<br>
get conditions set up just right, and then have to retype the<br>
entire long command.<br>
<br>
Or, if it hasn't scrolled off the screen yet, just type ! followed<br>
by the history event number displayed in the prompt for that big<br>
long command. It's that simple:
<pre><code>
prompt 23 % command -with some -very +long /argument/list
command: Example command failed.
prompt 24 % cd /to/correct/directory
prompt 25 % rm certain.files
prompt 26 % !23
command -with some -very +long /argument/list
command: Example command succeeds.
prompt 27 %
</pre></code>
You can even apply the standard csh modifiers to !<number>. For<br>
example, particularly useful is !<number>:p, which just prints<br>
the command typed on prompt <number> instead of executing it<br>
again:<br>
<pre><code>
prompt 26 % !23:p
command -with some -very +long /argument/list
prompt 27 % !!
command -with some -very +long /argument/list
command: Example command succeeds.
prompt 28 %
</code></pre>
</html>
<html>
To determine the amount of main memory on Solaris:<br />
<br />
1) /usr/platform/sun4u/sbin/prtdiag<br />
2) wsinfo<br />
3) '/usr/sbin/prtconf | grep -i memory'<br />
<br />
This tip generously supported <br />
by: M.Nithyanandham@blr.spcnl.co.in<br />
</html>
<html>
You can not use GNU/cp or BSD/cp to copy a single file to multiple<br />
directories. <br />
<br />
However, you can use combination of cp and xargs/parallel and other<br />
commands to copy a single file to multiple directories in MacOS, Linux, <br />
FreeBSD, OpenBSD, NetBSD and Unix-like systems.<br />
<br />
<h3>The cp command</h3>
The basic cp command syntax is as follows to copy multiple files to a single directory:<br />
<ul>
<li><code><b>cp file1 /dir1/</b></code></li>
<li><code><b>cp file1 file2 file3 /dir1/</b></code></li>
</ul>
<h2>Copy file to multiple directories in Unix or Linux</h2>
The trick is to use the xargs command or GNU parallel command.
<h3>Copying one file named foo.txt to multiple directories <br />
called /tmp/1/, /tmp/2/, and /tmp/3 using xargs</h3>
The xargs command construct argument list(s) and execute utility such as cp or mv. The syntax is:<br />
<code><b>xargs -n 1 cp -v filename<<<"/dir1/ /dir2/ /dir3/"</b></code> <br />
## OR ##<br />
<code><b>echo "/dir1/ /dir2/ /dir3/" | xargs -n 1 cp -v filename</b></code><br />
In this example copy /etc/passwd to /tmp/1/, /tmp/2/, and $HOME/3/ as follows:<br />
<code><b>xargs -n 1 cp -v /etc/passwd<<<"/tmp/1/ /tmp/2/ $HOME/3/"</b></code> <br />
OR<br />
<code><b>echo "/tmp/1/ /tmp/2/ $HOME/3/" | xargs -n 1 cp -v /etc/passwd</b></code><br />
Sample outputs:<br />
<br />
<u>Alternative:</u><br />
<b>Copy file into multiple directories</b><br />
<br />
Instead of running:
<code><pre>
cp /path/to/file /usr/dir1
cp /path/to/file /var/dir2
cp /path/to/file /nas/dir3
</pre></code>
Run the following command to copy file into multiple dirs:
<code><pre>
echo /usr/dir1 /var/dir2 /nas/dir3 | xargs -n 1 cp -v /path/to/file
</pre></code>
<br />
Link:<br />
<a href="https://www.cyberciti.biz/open-source/command-line-hacks/20-unix-command-line-tricks-part-i/">https://www.cyberciti.biz/open-source/command-line-hacks/20-unix-command-line-tricks-part-i/</a>
<h3>Copying one file named foo.txt to multiple directories called /tmp/1/, /tmp/2/,and /tmp/3 using parallel</h3>
GNU parallel is a shell tool for executing jobs in parallel using one or more <br />
computers. The syntax is:
<code>
parallel cp fileNameHere ::: /dir1/ /dir2/ /dir3/<br />
</code>
In this example copy /etc/resolv.conf to /tmp/1/, /tmp/2/, and $HOME/3/ as follows:<br />
parallel cp -v /etc/resolv.conf ::: /tmp/1/ /tmp/2/ $HOME/3/<br />
<br />
Sample outputs:<br />
/etc/resolv.conf -> /tmp/2/resolv.conf<br />
/etc/resolv.conf -> /tmp/1/resolv.conf<br />
/etc/resolv.conf -> /Users/vivek/3/resolv.conf<br />
How to use tee command to copy file to multiple folders<br />
Say you want to copy /etc/resolv.conf to /tmp/1/ and /tmp/2/, you run the tee command as follows:<br />
tee /tmp/1/resolv.conf /tmp/2/resolv.conf < /etc/resolv.conf tee /tmp/1/resolv.conf<br />
/tmp/2/resolv.conf < /etc/resolv.conf >/dev/null <br />
You need to specify full path like /tmp/1/resolv.conf, otherwise you get the following error:<br />
tee: /tmp/1/: Is a directory<br />
<h3>How to use find command to copy files to multiple dirs simultaneously</h3>
The syntax is as follows for the find command:<br />
find /dir1/ /dir2/ -maxdepth 0 -exec cp filename {} \;<br />
To copy /etc/hosts simultaneously to /tmp/{1,2}/ and $HOME/3/ folders under a<br />
Linux/Unix/MacOS/FreeBSD etc, enter:<br />
find /tmp/1/ /tmp/2/ $HOME/3/ -maxdepth 0 -exec cp /etc/hosts {} \;<br />
Sample outputs:
/etc/hosts -> /tmp/1/hosts<br />
<br />
/etc/hosts -> /tmp/2/hosts<br />
/etc/hosts -> /Users/vivek/3/hosts<br />
<br />
Link:<br />
https://www.cyberciti.biz/faq/linux-unix-copy-a-file-to-multiple-directories-using-cp-command/<br />
<br />
</html>
<html>
Here is a Tip on how to kill yourself fast.<br>
<br>
% kill -9 -1<br>
<br>
This could also be used to kill another user:<br>
<br>
# su - johndoe -c 'kill -9 -1'<br>
<br>
NOTE: UGU does not recommend Admins<br>
going on a killing spree, but only when it is<br>
necessary.<br>
</html>
<html>
Using sed, you can remove blank lines, and <br />
lines that contain only whitespace, from a <br />
file using the following:<br />
<br />
<code>
sed -e '/^[ ]*$/d' InputFile >OutputFile<br />
</code>
<br />
Within the single quotes ('), the forward <br />
slashes (/) delimit the regular expression <br />
that will be interpreted by sed. The "d"<br />
before the closing single quote, tells sed <br />
to delete any lines that match the regular <br />
expression.<br />
<br />
Within the regular expression, …<br />
<ul>
<li> the caret (^) matches the beginning of a line;</li>
<li> the []* matches zero to many occurrences of the character list<br />
between the open bracket ([) and the close bracket (]) (in the above <br />
regular expression, you must insert a space <br />
and a tab between the brackets)</li>
<li> the dollar sign ($) matches the end of a line;</li>
</ul>
<br />
These three constructs together match any <br />
blank line or any line that contains only <br />
spaces and tabs (in any combination).<br />
<br />
Since the standard operation of sed is to <br />
echo lines to stdout, all lines except blank <br />
lines (or lines that only contain whitespace) <br />
will be sent to OutputFile.<br />
<br />
This tip generously supported by: tim.couger@wcom.com<br />
</html>
<html>
aus den FAQs zum Brext / zur Migration
<h3>Will I receive a single, combined annual activity statement at year end?</h3>
<p>
No. You will receive an annual statement of your existing account which will cover the<br />
period starting January 1, 2020 through the date of migration and a second annual<br />
statement for your new account which will cover the period starting from the migration<br />
date through the end of the year
</p>
<h3>Will my login credentials change?</h3>
<p>
No. Your username, password, and any 2-factor authentication process in place for your<br />
existing account will remain active following migration. You will, however, be assigned a<br />
new account ID for your migrated account.
</p>
</html>
<html>
wg. Brexit :: https://ibkr.info/de/node/3544
<ul>
<li>TWS, Trader WorkStation, wird in zwei Varianten angeboten:
<ul>
<li>eine Version, die automatisch aktualisiert wird, wenn eine<br />
neue Software-Version bereitsteht
</li>
<li>und eine zweite Version, die manuell installiert werden muss,<br />
bei der aber kein automatischer Software-Update durchgeführt<br />
wird, so dass die neueste Version immer vom User selbst in‐<br />
stalliert werden muss.
</li>
</ul>
</li>
<br />
<li><details><summary><b>1. Interactive Brokers - Wie logge ich mich in die Trader Workstation ein</b></summary>
<br />
</details><br /></li>
<li><details><summary><b>2. Interactive Brokers - Wie kann ich die Schriftgröße und die Symbole anpassen</b></summary>
<br />
</details><br /></li>
<li><details><summary><b>3. Interactive Brokers - Wie kann ich die Watchlist bzw. das Layout in der Trader Workstation hinterlegen resp. aktualisieren?</b></summary>
<br />
Dies ist in folgenden Situationen sinnvoll bzw. notwendig:
<ul>
<li>beim ersten Start der TWS, der Trader Workstation;</li>
<li>falls die Watchlist aktualisiert worden ist (und man die <br />
Änderungen nicht manuell selbst erledigen will);</li>
<li>bei selbstgemachten Änderungen, die sich (aus <br />
unbekannten Gründen) nicht mehr rückgängig<br />
machen lassen;</li>
</ul>
<br />
Die aktuellste Einstellungsdatei für die Trader Workstation von Interactive Brokers <br />
findest Du in den Downloads zu diesem Tutorial ([Stand: Septembre 2023] TWS-Einstellungen-Teilnehmer-V20.zip).<br />
<br/>
Sollte sie im zip‐Format vorliegen, so ist sie nach dem<br />
Download und vor dem Importieren zu extrahieren. Es <br />
muss die Original‐xml‐Datei vorliegen.<br />
<br />
Datei downloaden (sich das Ablegeverzeichnis merken)<br />
→ TraderWorkStation aufrufen<br />
→ im Header-Menü den Menüpunkt “Datei“ anklicken<br />
→ im neuen Menü in den Bereich “Programmeinstellungen“ gehen<br />
→ im neuen Menü den Punkt “Layout Settings“ auswählen<br />
→ im neuen Menü den Punkt “Einstellungen wiederherstellen“ auswählen<br />
→ neues Fenster mit Eintrag “Layout/Einstellungen wiederherstellen“ erscheint<br />
→ hier den Eintrag “Benutzerdefiniert …“ auswählen und mit Klick auf “Ok“ bestätigen<br />
→ neues Fenster, das Suchfenster, erscheint. Hier muss in das Verzeichnis, <br />
  in der die TWS-Einstellungsdatei abgelegt worden ist, gewechselt werden.<br />
→ jetzt die (gewünschte) Einstellungsdatei auswählen und dann auf den <br />
  Button “Öffnen“ klicken<br />
→ neues Fenster mit Titel “Bestätigung zum Öffnen der Einstellungen“ <br />
  erscheint. Hier auf den Button “Öffnen ohne Problem zu melden“ klicken<br />
→ die GUI resp. TraderWorkStation verschwindet und wird neu gestartet<br />
<br />
</details><br /><ul>
<li><details><summary><b>3.1 Interactive Brokers - Wie kann ich die Werte/Aktien in der Watchlist <u>selbst manuell</u> aktualisieren?</b></summary>
<br />
Dieser Weg bietet sich an, wenn man die Einstellungsdatei nicht nehmen<br />
will oder wenn einem der Aufwand zu groß erscheint.<br />
<br />
Grob gesprochen gibt es drei Wege, die Watchlist zu aktualisieren:
<ul>
<li>über den Menüeintrag “Bearbeiten“ in der Kopfleiste;</li>
<li>über die Taste “Entf“ (o. “Del“) bzw. “Einf“ (o. “Ins“)</li>
<li>über die rechte Maustaste (RMT)</li>
</ul>
<br />
Genaue Beschreibung:
<ol>
<li>Wert markieren, der <u>entfernt</u> werden soll<br />
→ Menüeintrag “Bearbeiten“ anklicken<br />
→ im Untermenü den Eintrag “Zeile entfernen“ auswählen</li>
<li>Wert markieren<br />
→ Taste entsprechend der gewünschten Aktion drücken</li>
<li>über die RMT:<br />
Wert markieren<br />
→ RMT drücken<br />
→ hier die gewünschte Aktion auswählen</li>
</ol>
<br />
Beim Anlegen eines Wertes erscheint ein neues Fenster, in dessen <br />
Suchfenster das gewünschte Kürzel einzugeben ist.<br />
→ den gewünschten Eintrag auswählen<br />
→ Eingabe mit der Eingabe‐/Return‐Taste bestätigen<br />
</details><br /></ul>
</li>
<li><details><summary><b>4. Interactive Brokers - Grundlagen - Erklärung des Ordertickets für Aktien und Optionen</b></summary>
<br />
Login in die TWS, <em>Trader WorkStation</em><br />
<br />
<ul>
<li><ol type="A">
<li><b>Orderticket für Aktien</b><br />
<ul>
<li>Kopfleiste<br />
→ Button “Order“<br />
→ neues Fenster erscheint, Titel “Orderticket“<br />
→ Auswahl Finanzinstrument:<br />
  Feld mit entsprechendem Titel anklicken<br />
→ gesuchte Aktie eingeben<br />
→ Eingabe mit Enter bestätigen<br />
→ im Tab‐Bereich “Standard“ die <br />
  Aktien auswählen; “Kauf“ oder “Verkauf“<br />
→ im Bereich “Menge“ im Feld “Ausstehende Menge“<br />
  die Menge an Aktien, die wir handeln (kaufen oder verkaufen) wollen, angeben<br />
</li>
</ul>
</li>
<li><b>Orderticket für Optionen</b><br />
<ul>
<li>Kopfleiste<br />
→ Button “Optiontrader“ anklicken<br />
→ neues Fenster erscheint: <br />
  enthält, die Optionskurse für Calls & Puts <br />
  für verschiedene Zeiträume<br />
→ Öffnen Orderticket:<br />
  Tab “Orders“<br />
→ Eingabefeld für Option markieren<br />
→ RMT → neues Menü<br />
→ Eintrag “ändern“ auswählen<br />
→ Untermenü erscheint, mit Eintrag “Orderticket“ <br />
→ diesen Eintrag anklicken<br />
→ neues Fenster erscheint, Titel “Orderticket“, mit Angabe des Instruments<br />
→ !! Darauf achten !! Wir wollen einen Put verkaufen<br />
→ den Button / Eintrag “Verkauf“ anklicken<br />
→ Achtung! 1 Options‐Kontrakt :=: 100 Aktien<br />
→ im Bereich “Order???“ :<br />
<ol>
<li>den “Ordertyp“ auswählen (am besten immer<br />
  “LMT“ für “Limit“ auswählen)
</li>
<li>das “Routingziel“ auswählen (am besten immer<br />
  “SMART“ einstellen / belassen)
</li>
</ol>
→ im Bereich “Gültigkeitsdauer“ den Eintrag "DAY" auswählen<br />
  (die Order ist nur für den gleich Tag gültig, ist also eine Tagesorder)<br />
→ Button “Vorschau“ anklicken<br />
→ Button “Übermitteln“<br />
</li>
</ul>
</li>
</ol>
</li>
</ul>
<br />
</details><br /></li>
<li><details><summary><b>5. Interactive Brokers - Grundlagen - Wie kann ich das Limit von noch nicht ausgeführten Orders ändern</b></summary>
<br />
</details><br /></li>
<li><details><summary><b>6. Interactive Brokers - Erklärung der Portfolio-Ansicht (kein Video)</b></summary>
<br />
</details><br /></li>
</ul>
</html>
<html>
<code><pre>
mueller@Debian-Laptop:~$ curl -fsSL https://clis.cloud.ibm.com/install/linux | bash
Current platform is linux64. Downloading corresponding IBM Cloud CLI...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 11.8M 100 11.8M 0 0 1726k 0 0:00:07 0:00:07 --:--:-- 1759k
Download complete. Executing installer...
Bluemix_CLI/
Bluemix_CLI/bin/
Bluemix_CLI/bin/ibmcloud
Bluemix_CLI/bin/ibmcloud.sig
Bluemix_CLI/bin/NOTICE
Bluemix_CLI/bin/LICENSE
Bluemix_CLI/bin/CF_CLI_Notices.txt
Bluemix_CLI/bin/CF_CLI_SLC_Notices.txt
Bluemix_CLI/autocomplete/
Bluemix_CLI/autocomplete/bash_autocomplete
Bluemix_CLI/autocomplete/zsh_autocomplete
Bluemix_CLI/install
Bluemix_CLI/uninstall
Bluemix_CLI/install_bluemix_cli
Superuser privileges are required to run this script.
[sudo] Passwort für mueller:
Install complete.
mueller@Debian-Laptop:~$
</pre></code>
⇒ installiert wurde das alles im /usr/local‐Verzeichnis:
<code><pre>
mueller@Debian-Laptop:~$ whereis ibmcloud
ibmcloud: /usr/local/bin/ibmcloud /usr/local/ibmcloud
mueller@Debian-Laptop:~$
</pre></code>
⇒ Login‐Vorgang:
<code><pre>
Password> mueller@Debian-Laptop:~$ ibmcloud login
API-Endpunkt: https://cloud.ibm.com
Region: us-south
Email> j-a-mueller@alice-dsl.net
Password>
Authentifizieren...
OK
Als Ziel ausgewähltes Konto Jens Müller's Account (9c44808a64fe47928667cc9430ece74a)
API-Endpunkt: https://cloud.ibm.com
Region: us-south
Benutzer: j-a-mueller@alice-dsl.net
Konto: Jens Müller's Account (9c44808a64fe47928667cc9430ece74a)
Ressourcengruppe: Keine Ressourcengruppe als Ziel ausgewählt; verwenden Sie “ibmcloud target -g RESOURCE_GROUP“
CF-API-Endpunkt:
Organisation:
Bereich:
mueller@Debian-Laptop:~$
</pre></code>
</html>
<html>
<meta Activity Statement/>
<ol>
<li>Performance und Berichte</li>
<li>Kontoauszüge</li>
<li>Benutzerdefinierte Kontoauszüge</li>
<li>MeinSteuer</li>
<li>folgende Werte in den Feldern auswählen:
<em><ul>
<li>Monatlich</li>
<li><Monat, Jahr></li>
<li>PDF</li>
<li>Deutsch</li>
</ul>
</em>
</ol>
</html>
<html>
SGI loves to try and simplify your life with<br />
chkconfig switches to toggle various services<br />
on and off. After each upgrade, DOUBLE <br />
check the chkconfig switches. If something<br />
doesn't work all of the sudden check here. <br />
<br />
For instance, tape drives in IRIX are <br />
disabled by a default install. To enable<br />
a tape subsystem:<br />
<br /><code>
# chkconfig ts on<br />
<br />
# /etc/init.d/ts start<br />
</code><br />
</html>
<html>
<meta Akronym />
<table>
<tr>
<td valign="top" width=400>
<ul>
<li><b>LotL</b><br />
“Living of the Land“<br />
nur mit Bordmitteln, sprich bei Windows Powershell und CMD
</li>
<li><b>LAPS</b><br />
“Local Administrator Password Service“
</li>
<li><b>NAC</b><br />
“Network Access Control“<br />
</li>
<li><b>REPL</b><br />
“Read‐Eval‐Print‐Loop<br />
</li>
<li><b>LLM</b><br />
“Large Language Model“<br />
</li>
<li><b>SRE</b><br />
“Site Reliability Engineer<br />
</li>
<li><b>MVNO</b><br />
“Mobie Virtual Network Operator“<br />
</li>
<li><b>apr</b><br />
“Apache Portable Runtime“<br />
</li>
</ul>
</td>
<td valign="top" width=400>
<ul>
<li><b>IIoT</b><br />
“Industrial Internet of Things“<br />
</li>
</ul>
</tr>
</table>
</html>
<html>
The command fuser is very <br />
handy when you want to know <br />
which processes or users <br />
have a file open. Its basic <br />
syntax is:<br />
<br /><code>
/etc/fuser -u /usr/my_application/foo<br />
</code><br />
You must enter the file's full <br />
path name, as shown above.<br />
<br />
The fuser command is located <br />
under the /etc directory on HP-UX,<br />
AIX and SCO flavors. You must <br />
login as root to use it. ((Stimmt nicht))<br />
<br />
Its output is a raw list of processes id <br />
numbers and users login names.<br />
<br />
Please refer to your Unix man pages <br />
to find more about this useful command.<br />
<br />
This tip generously supported <br />
by: tinaco110@hotmail.com<br />
</html>
<html>
<ul>
<li>Wäre die WFV bereit, die Verwaltung meiner Whg(en)<br />
zu übernehmen?<br />
Was würde mich das kosten?
</li>
<li>IMHO wäre es ratsam, ein separates Konto für jede<br />
Whg einzurichten. Macht das Sinn? ⇒ Steuerbe–<br />
rater fragen;<br />
</li>
</ul>
</html>
<html>
Was unterscheidet die Finanzelite vom Rest der Welt?
Was machen die, die das Sagen haben anders?
Sie bauen ihren Erfolg auf folgende drei Säulen auf:
<h3>1. Kapitalbeschaffung und Verhandlungsführung</h3>
Jeder fängt bei Null an. Mit Fleiß und harter Arbeit kannst Du Dir ein Startkapital für deine finanzielle Freiheit schaffen. Wenn Du aber richtig durchstarten willst, musst Du wissen, wo Du risikoarmes Fremdkapital her bekommst. Weiters brauchst Du Know-How, wie Du diese Deals abschließt. Schon ein einzelner Prozentpunkt macht langfristig einen riesen Unterschied.
<h3>2. Immobilien kaufen und verkaufen</h3>
Mit Deinem Startkapital wirst Du im Bereich Immobilien die sichersten und erfolgreichsten Sprünge machen. Egal ob Du in kleine, hässliche Löcher in guten Lagen investierst, oder in's Fix-und-Flip-Business einsteigst - mit Immos wirst Du reich. Aber nur wenn Du weißt, was Du tust.
<h3>3. Unternehmensbeteiligungen und Steuerstrukturen</h3>
Lass' andere für Dich arbeiten und verschenke nichts. Märkte und Unternehmen, die Du durch und durch kennst, können Dir viel Kohle einbringen, ohne dass Du selbst in ihnen tätig sein musst. Unternehmensbeteiligungen kombiniert mit den starken Steuervorteilen Deiner Immobilien und den richtigen Steuerstrukturen, geben Dir den entscheidenden Vorsprung beim Kapitalaufbau.
Diese 3 Säulen sind die Basis für jeden erfolgreichen Millionär und Milliardär.
Du kannst immer dazu lernen. Und genau das empfehle ich Dir, wenn Du in Zukunft auch in dieser Liga mitspielen willst.
</html>
<html>
Das bedeutet, dass sich heutzutage die Renditen schlechter Vermögenswerte<br />
immer weiter denen von guten Vermögenswerten angleichen. Dir bleibt das<br />
hohe Risiko bei schlechten Lagen, ohne die hohen Chancen.<br />
<br />
Investment Punk<br />
<br />
</html>
<html>
<ul>
<li><b>FipeZAP</b><br/>
<ul><li>Brasilien</li><li>erfasst die Preise für Wohnimmobilien <br />in den 20 größten Städten der Landes</ul></li>
<br />
<li></li>
<br />
</ul>
</html>
<html>
<ul>
<li>http://www.betongoldtraining.com/</li>
<li>https://www.fool.de/2021/11/01/ist-betongold-besser-als-nix-ja-aber-es-gibt-einen-kniff-fuer-maximales-potenzial/</li>
<li>https://www.beton.gold/</li>
<li>http://betongold.blog/</li>
<li>https://hausinvest.de/ratgeber/betongold/</li>
<li>Ulrich Müller Börsen‐Podcast, Folge 118?</li>
<li></li>
</ul>
</html>
<html>
<ul>
<li><b>Verschuldungsgrad</b><math>= <mfrac><mi>Net Debt</mi><mi>Equity</mi></mfrac></math></li>
<br />
<li></li>
<br />
</ul>
</html>
<html>
<ul>
<li>“<b><em>Muskelhypothek</em></b>“ ist die umgangssprachliche Bezeichnung für<br />
Eigenleistungen des Bauherrn im Zusammenhang mit dem Bau<br />
oder dem Erwerb einer Immobilie, die aus Sach- und Arbeitsleis‐<br />
tungen, vor allem aus dem Wert eingebrachter Baustoffe und der<br />
Selbsthilfe bestehen können. </li>
<br />
<li>Im Rahmen von privaten Immobilienfinanzierungen wird unter <b>Ei‐<br />
genleistung</b> jede Arbeitsleistung eines Kreditnehmers verstan‐<br />
den, die er selbst vornimmt oder durch seine Bauhelfer am finan‐<br />
zierten Bauwerk durchführen lässt. Nach § 15 Abs. 1 II. II. BV ge‐<br />
hören darüber hinaus zur Eigenleistung auch der Wert des eigenen<br />
Baugrundstücks und der Wert verwendeter Gebäudeteile.<br />
<br />
<em>“II. BV“ := <a href="https://de.wikipedia.org/wiki/Zweite_Berechnungsverordnung" target="_blank" rel="noreferrer noopener">Zweite Berechnungsverordnung</a></em></li>
<br />
<li>Da diese Arbeits- und Sachleistungen nicht von Bauunternehmen<br />
erbracht werden, senkt die Eigenleistung die Baukosten und erhöht<br />
deshalb die Eigenkapitalquote.</li>
<br />
<li>Ein höherer Eigenkapitalanteil ‐ auch durch Eigenleistungen ‐ senkt<br />
die Bankkredite und damit auch den Kapitaldienst; betriebswirtschaft‐<br />
liche Kennzahlen wie Kapitaldienstfähigkeit, Kapitaldienstgrenze und<br />
Kapitaldienstdeckungsgrad verbessern sich zu Gunsten des Kredit‐<br />
nehmers.</li>
<br />
<li>Mit einem größeren Anteil an Eigenleistung und Eigenkapital im Finan‐ <br />
zierungsplan besteht die größere Wahrscheinlichkeit der positiven Ents‐<br />
cheidung bei Kredit‐ vor allem Fördermittelvergaben.</li>
<br />
<li>Die Muskelhypothek hat das Ziel, Handwerkerlohnkosten durch per‐<br />
sönliche Arbeitsleistungen (Selbst‐, Verwandten‐, Nachbarschafts‐ ‐<br />
oder organisierte Gruppenselbsthilfe) zu reduzieren. </li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Muskelhypothek" target="_blank" rel="noreferrer noopener">Wikipedia</a></li>
<!--
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
-->
</ul>
</html>
In most cases, vendors install the /etc/inetd.conf
file pretty wide open. There are many processes in
this file that do not have to be running.
One good way to improve the systems performance is
to not run the unnecessary daemons.
If you do not plan to offer or run those
services, then comment them out and restart
inetd daemon.
Here is a list of the less common daemons, that
can turned off on workstations (Servers may
require some of these daemons).
finger
uucp
http
bootp
dhcp_bootp
tftp
ntalk
walld
...etc...
<html>
<ul>
<li> "Financial Information eXchange" </li>
<br>
<li> <a href="http://www.fixprotocol.org/" target=_blank>FIX :: Homepage</a></li>
<br>
<li> 1992, zwischen Fidelity Investments und Salomon Brothers entwickelt</li>
<br>
<li> tag-basiertes Nachrichtenformat, offen, einfach, elektronisch</li>
<br>
<li> Abgrenzung zu SWIFT:</l>
<ul>
<li>FIX :: Wertpapier-Transaktionen, Standard für Front-Office-Nachrichten</li>
<li>SWIFT :: Finanz-Transaktionen, Standard für Back-Office-Nachrichten</l>
</ul>
<br>
<li> verwendet einfache Datentypen</li>
<br>
<li> ist ein offener Standard zum Austausch von Informationen,<br>
welcher von Banken, Brokern, Börsen und sonstigen Dienstleistern <br>
geschaffen wurde.</li>
</ul>
<h3>FIXML</h3>
<ul>
<li>FIXML ist die XML-Darstellung der Geschäftsinhalte der FIX-Nachrichten<br />
<b>Link: </b><br />
<a href="http://fixwiki.org/fixwiki/FPL:FIXML_Syntax" target=_blank>FixWiki :: FPL:FIXML-Syntax</a></li>
<br>
<li>FIX ist im Securities Trading/Wertpapier-Handel populärer als FIXML,<br />
da FIXML-Nachrichten aufgrund der XML-Tags grösser als FIX-Nachrichten sind</li>
</ul>
<h3>Links:</h3>
<a href="http://www.ksvali.com/" target=_blank>ksvali : Homepage</a><br />
<a href="http://www.quickfixengine.org/" target=_blank>QuickFixEngine :: Homepage</a><br />
<a href="http://de.wikipedia.org/wiki/FIX-Protokoll" target=_blank>Wikipedia :: FIX-Protokoll</a><br />
<h3>QuickFIX:</h3>
<ul>
<li><a href="http://www.quickfixengine.org/" target=_blank>QuickFix-Engine :: Homepage</a></li>
<li>eine frei verfuegbare FIX engine</li>
<li>"QuickFIX is a full-featured open source FIX engine, currently compatible <br>
with the FIX 4.0-4.4 spec. It runs on Windows, Linux, Solaris, FreeBSD and<br>
Mac OS X.API's are available for C++, Java, .NET, Python and Ruby."</li>
<li><a href="http://sourceforge.net/projects/quickfix/files/" target=_blank>QuickFix :: Sources</a></li>
</ul>
<h3>FIXparser</h3>
Free on-line FIX Protocol message parser<br />
<b>Link:</b><br />
<a href="http://fix.aprics.net/" target=_blank>FIXparser : Homepage</a><br />
</html>
<html>
Falls Anfragen vom FO kommen, wie draft trades eigegeben werden:<br>
<br>
Simulation<br>
--> Viewer<br>
--> File ‐> Insert trade<br>
--> Produkt auswählen, z.B. CURR|FXD|FXD<br>
<br>
<img src="./pictures/draftTrades_01.wmf" alt=""><b>Bilder *wmf fehlen</b><br>
<br>
<img src="./pictures/draftTrades_02.wmf" alt=""><br>
<b>Trade ansehen:</b><br>
Roten button klicken<br>
<img src="./pictures/draftTrades_03.wmf" alt=""><br>
<b>View:</b><br>
User defined View Oliver auswählen<br>
<img src="./pictures/draftTrades_04.wmf" alt=""><br>
Rechter Mausklick<br>
convert to real<br>
neuer real Trade wird generiert, alter draft Trade wird gelöscht<br>
<br>
Mit Proceed verlassen<br>
<img src="./pictures/draftTrades_05.wmf" alt=""><br>
<br>
</html>
<html>
If you want to insert a line at the top <br />
(or anywhere for that matter) of a <br />
file within a shell script, use the ed <br />
editor.<br />
<br />
EXAMPLE:<br />
<code>
string="hello"<br />
ed << EOF<br />
e any_file<br />
1i<br />
${string}<br />
</code>
</html>
<html>
<body>
<ul>
<li><b><em>Fratelli d'Italia</em></b>
</li>
<li>auch bekannt als <em>Inno di Mameli</em> (“Mamelis Hymne“)<br />
</li>
<li>Komponist: Michele Novaro (geb. 23. Dezember 1818 in Genua; gest. 21. Oktober 1885 ebenda)<br />
</li>
<li>Autor: Goffredo Mameli (geb. 5. September 1827 in Genua; gest. 7. Juli 1849 in Rom)<br />
</li>
<li>La <em><b>Festa della Repubblica italiana</b></em>:<br />
La Repubblica italiana è nata il <b>2 giugno 1946</b>.<br />
</li>
<table>
<tr>
<th>Italienisch</th><th></th><th>Deutsch</th>
</tr>
<tr>
<td>Fratelli d'Italia,</td><td></td>
</tr>
<tr>
<td>L'Italia s'è desta,</td><td></td>
</tr>
<tr>
<td>Dell'elmo di Scipio</td><td></td>
</tr>
<tr>
<td>S'è cinta la testa.</td><td></td>
</tr>
<tr>
<td>Dov'è la Vittoria?</td><td></td>
</tr>
<tr>
<td>Le porga la chioma,</td><td></td>
</tr>
<tr>
<td>Che schiava di Roma</td><td></td>
</tr>
<tr>
<td>Iddio la creò.</td><td></td>
</tr>
<tr>
<td>(2x)
</tr>
</table>
<br />
<table>
<tr>
<b>Coro:</b>
<td width=20></td><td>Stringiàmci a coòrte,</td><td></td>
</tr>
<tr>
<td width=20></td><td>Siam pronti alla morte.</td><td></td>
</tr>
<tr>
<td width=20></td><td>Siam pronti alla morte,</td><td></td>
</tr>
<tr>
<td width=20></td><td>L'Italia chiamò.</td><td></td>
</tr>
<tr>
<td width=20></td><td>Stringiàmci a coòrte,</td><td></td>
</tr>
<tr>
<td width=20></td><td>Siam pronti alla morte.</td><td></td>
</tr>
<tr>
<td width=20></td><td>Siam pronti alla morte,</td><td></td>
</tr>
<tr>
<td width=20></td><td>L'Italia chiamò! Sì </td><td></td>
</tr>
</table>
<br />
<table>
<tr>
<td>Noi siamo da secoli</td><td></td>
</tr>
<tr>
<td>Calpesti, derisi,</td><td></td>
</tr>
<tr>
<td>Perché non siam popolo,</td><td></td>
</tr>
<tr>
<td>Perché siam divisi.</td><td></td>
</tr>
<tr>
<td>Raccolgaci un'unica</td><td></td>
</tr>
<tr>
<td>Bandiera, una speme:</td><td></td>
</tr>
<tr>
<td>Di fonderci insieme</td><td></td>
</tr>
<tr>
<td>Già l'ora suonò. </td><td></td>
</tr>
</table>
<br />
<table>
<tr>
<td>Fratelli d'Italia,</td><td></td>
</tr>
<tr>
<td>L'Italia s'è desta,</td><td></td>
</tr>
<tr>
<td>Dell'elmo di Scipio</td><td></td>
</tr>
<tr>
<td>S'è cinta la testa.</td><td></td>
</tr>
<tr>
<td>Dov'è la Vittoria?</td><td></td>
</tr>
<tr>
<td>Le porga la chioma,</td><td></td>
</tr>
<tr>
<td>Che schiava di Roma</td><td></td>
</tr>
<tr>
<td>Iddio la creò.</td><td></td>
</tr>
</table>
<br />
<table>
<b>Coro</b>
<tr>
<td width=20></td><td>Stringiàmci a coòrte,</td><td></td>
</tr>
<tr>
<td width=20></td><td>Siam pronti alla morte.</td><td></td>
</tr>
<tr>
<td width=20></td><td>Siam pronti alla morte,</td><td></td>
</tr>
<tr>
<td width=20></td><td>L'Italia chiamò.</td><td></td>
</tr>
<tr>
<td width=20></td><td>Stringiàmci a coòrte,</td><td></td>
</tr>
<tr>
<td width=20></td><td>Siam pronti alla morte.</td><td></td>
</tr>
<tr>
<td width=20></td><td>Siam pronti alla morte,</td><td></td>
</tr>
<tr>
<td width=20></td><td>L'Italia chiamò! Sì! </td><td></td>
</tr>
</table>
<br />
<table>
<tr>
<td>Uniamoci, amiamoci,</td><td></td>
</tr>
<tr>
<td>L'unione e l'amore</td><td></td>
</tr>
<tr>
<td>Rivelano ai popoli</td><td></td>
</tr>
<tr>
<td>Le vie del Signore.</td><td></td>
</tr>
<tr>
<td>Giuriamo far libero</td><td></td>
</tr>
<tr>
<td>Il suolo natio:</td><td></td>
</tr>
<tr>
<td>Uniti, per Dio,</td><td></td>
</tr>
<tr>
<td>Chi vincer ci può? </td><td></td>
</tr>
</table>
<br />
<table>
<tr>
<td>Fratelli d'Italia,</td><td></td>
</tr>
<tr>
<td>L'Italia s'è desta,</td><td></td>
</tr>
<tr>
<td>Dell'elmo di Scipio</td><td></td>
</tr>
<tr>
<td>S'è cinta la testa.</td><td></td>
</tr>
<tr>
<td>Dov'è la Vittoria?</td><td></td>
</tr>
<tr>
<td>Le porga la chioma,</td><td></td>
</tr>
<tr>
<td>Che schiava di Roma</td><td></td>
</tr>
<tr>
<td>Iddio la creò.</td><td></td>
</tr>
</table>
<br />
<table>
<tr>
<b>Coro:</b>
<td width=20></td><td>Stringiàmci a coòrte,</td><td></td>
</tr>
<tr>
<td width=20></td><td>Siam pronti alla morte.</td><td></td>
</tr>
<tr>
<td width=20></td><td>Siam pronti alla morte,</td><td></td>
</tr>
<tr>
<td width=20></td><td>L'Italia chiamò.</td><td></td>
</tr>
<tr>
<td width=20></td><td>Stringiàmci a coòrte,</td><td></td>
</tr>
<tr>
<td width=20></td><td>Siam pronti alla morte.</td><td></td>
</tr>
<tr>
<td width=20></td><td>Siam pronti alla morte,</td><td></td>
</tr>
<tr>
<td width=20></td><td>L'Italia chiamò! Sì! </td><td></td>
</tr>
</table>
<br />
<table>
<tr>
<td>Dall'Alpi a Sicilia</td><td></td>
</tr>
<tr>
<td>Dovunque è Legnano,</td><td></td>
</tr>
<tr>
<td>Ogn'uom di Ferruccio</td><td></td>
</tr>
<tr>
<td>Ha il core, ha la mano,</td><td></td>
</tr>
<tr>
<td>I bimbi d'Italia</td><td></td>
</tr>
<tr>
<td>Si chiaman Balilla,</td><td></td>
</tr>
<tr>
<td>Il suon d'ogni squilla</td><td></td>
</tr>
<tr>
<td>I Vespri suonò. </td><td></td>
</tr>
</table>
<br />
<table>
<tr>
<td>Fratelli d'Italia,</td><td></td>
</tr>
<tr>
<td>L'Italia s'è desta,</td><td></td>
</tr>
<tr>
<td>Dell'elmo di Scipio</td><td></td>
</tr>
<tr>
<td>S'è cinta la testa.</td><td></td>
</tr>
<tr>
<td>Dov'è la Vittoria?</td><td></td>
</tr>
<tr>
<td>Le porga la chioma,</td><td></td>
</tr>
<tr>
<td>Che schiava di Roma</td><td></td>
</tr>
<tr>
<td>Iddio la creò.</td><td></td>
</tr>
</table>
<br />
<table>
<b>Coro:</b>
<tr>
<td width=20></td><td>Stringiàmci a coòrte,</td><td></td>
</tr>
<tr>
<td width=20></td><td>Siam pronti alla morte.</td><td></td>
</tr>
<tr>
<td width=20></td><td>Siam pronti alla morte,</td><td></td>
</tr>
<tr>
<td width=20></td><td>L'Italia chiamò.</td><td></td>
</tr>
<tr>
<td width=20></td><td>Stringiàmci a coòrte,</td><td></td>
</tr>
<tr>
<td width=20></td><td>Siam pronti alla morte.</td><td></td>
</tr>
<tr>
<td width=20></td><td>Siam pronti alla morte,</td><td></td>
</tr>
<tr>
<td width=20></td><td>L'Italia chiamò! Sì! </td><td></td>
</tr>
</table>
<br />
<table>
<tr>
<td>Son giunchi che piegano</td><td></td>
</tr>
<tr>
<td>Le spade vendute:</td><td></td>
</tr>
<tr>
<td>Giò l'Aquila d'Austria</td><td></td>
</tr>
<tr>
<td>Le penne ha perdute.</td><td></td>
</tr>
<tr>
<td>Il sangue d'Italia,</td><td></td>
</tr>
<tr>
<td>Il sangue Polacco,</td><td></td>
</tr>
<tr>
<td>Bevé col cosacco,</td><td></td>
</tr>
<tr>
<td>Ma il cor le bruciò. </td><td></td>
</tr>
</table>
<br />
<table>
<b>Coro</b>
<tr>
<td width=20></td><td>Stringiàmci a coòrte,</td><td></td>
</tr>
<tr>
<td width=20></td><td>Siam pronti alla morte.</td><td></td>
</tr>
<tr>
<td width=20></td><td>Siam pronti alla morte,</td><td></td>
</tr>
<tr>
<td width=20></td><td>L'Italia chiamò.</td><td></td>
</tr>
<tr>
<td width=20></td><td>Stringiàmci a coòrte,</td><td></td>
</tr>
<tr>
<td width=20></td><td>Siam pronti alla morte.</td><td></td>
</tr>
<tr>
<td width=20></td><td>Siam pronti alla morte,</td><td></td>
</tr>
<tr>
<td width=20></td><td>L'Italia chiamò! Sì! </td><td></td>
</tr>
</table>
</ul>
</body>
<footer>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Il_Canto_degli_Italiani"
target="_blank" rel="noreferrer noopener">
Wikipedia :: Il Canto degli Italiani</a>
</li>
</ul>
</footer>
</html>
<html>
<ul>
<li><h3>mit zu lernende Zeiten:</h3>
<code><pre>
< Indicativo Presente;
Indicativo Passato Remoto;
Indicativo Participio Passato >
</pre></code></li>
<br />
<li><h3>Beispiel: <em>condurre</em></h3>
<code><pre>
< conducco;
condussi;
condotto >
</pre></code></li>
</ul>
</html>
<html>
<ul>
<li>Ausgabe nach <code>sudo /etc/init.d/jira start</code>:
<pre><code>If you encounter issues starting or stopping Jira, please
see the Troubleshooting guide at https://docs.atlassian.com/jira/jadm-docs-096/Troubleshooting+installation
Server startup logs are located in /opt/atlassian/jira/logs/catalina.out
Using CATALINA_BASE: /opt/atlassian/jira
Using CATALINA_HOME: /opt/atlassian/jira
Using CATALINA_TMPDIR: /opt/atlassian/jira/temp
Using JRE_HOME: /opt/atlassian/jira/jre/
Using CLASSPATH: /opt/atlassian/jira/bin/bootstrap.jar:/opt/atlassian/jira/bin/tomcat-juli.jar
Using CATALINA_OPTS:
Using CATALINA_PID: /opt/atlassian/jira/work/catalina.pid
Tomcat started.</code></pre>
</li>
<li>mit Abschnitt "Jira Web-Installation durchführen" weitermachen
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.howtoforge.de/anleitung/so-installierst-du-jira-das-werkzeug-fur-agiles-projektmanagement-unter-debian-11/"
target="_blank" rel="noreferrer noopener">
HowtoForge :: So installierst du Jira, das Werkzeug für agiles Projektmanagement, unter Debian 11 </s>
</li>
</ul>
</html>
<html>
<ul>
<li>JSON := "JavaScript Object Notation"
</li>
<li>JWT :=: "JSON Web Token"
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.cheatography.com/mackan90096/cheat-sheets/json/"
target=_blank rel="noreferrer noopener">
Cheatography :: JSON - Cheatsheet</a>
</li>
<li><a href="https://de.wikipedia.org/wiki/JSON_Web_Token"
target=_blank rel="noreferrer noopener">
Wikipedia :: JSON Web Token</a>
</li>
</ul>
</html>
<html>
<ul>
<li>Eriko Sato :: <br />
Japanisch für dummies
</li>
<li>Gabriela Kruza-Schmidt / Anna Sato :: <br />
Japanisch Grammatikübungsbuch
</li>
<li>Langenscheidt Audio–Wortschatztrainer Japanisch
</li>
<li>LSI, Landesspracheninstitut in der Ruhr-Universität Bochum :: <br />
Japanisch Intensiv - Grundstufe
</li>
</ul>
</html>
<html>
Zulu ist eine freie Java-Implementierung von Azul Systems für die Software-Entwicklung. Die Freeware basiert auf dem Open Source Code des Open Java Development Kit (OpenJDK) und ist kompatibel zum Java SE Standard von Oracle. Die Entwicklungsumgebung enthält nicht die kommerziellen Features, die von Oracle kostenpflichtig lizenziert werden.
Zulu ist für Windows, Mac OS X und Linux kostenlos erhältlich. Wer kostenpflichtigen Support benötigt, kann diesen mit Zulu Enterprise erhalten.
https://www.heise.de/download/product/azul-zulu
</html>
<html>
<ul>
<li><b>-Xss</b></li>
“Stack size“
<br />
<li><b>-Xms</b></li>
“Memory size“
<br />
<li><b>-XX</b></li>
“HeapDumpOutOfMemory“
<br />
</ul>
</html>
<html>
<code><pre>
public class <i><FileName></i> {
public static void main ( String args[]) {
System.out.println("Hello World!");
}
}
</pre></code>
</html>
<html>
<code><pre>
#!/bin/bash
path=/usr/java/jre/bin<br />
classpath=./xmltest.jar:./xercesImpl.jar:./xalan.jar:./xml-apis.jar:./xercesSamples.jar
$path/java -classpath $classpath xmltest.xmltest
</pre></code>
<h3>Link für Hinweise:</h3>
<a href="http://www.assono.de/blog/d6plinks/Java-Option-JAR-ignores-Classpath" target="_blank">Assono-Blog</a><br />
</html>
<html>
<ul>
<li><img src="./pictures/Java_collections.jpg" height=450 width=480 /></li> <!-- height=900 width=960 -->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://cbarkinozer.medium.com/collections-in-java-ec0a22fbc25e" target="_blank" rel="noreferrer noopener">medium.com :: Collections in Java</a></li>
<li><a href="http://www.codeurjava.com/p/java-les-collections.html" target="_blank" rel="noreferrer noopener">CodeUrJava :: Java ‐ Les collections</a></li>
<!--
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
-->
</ul>
</html>
<html>
<ul>
<li>Eine <b>HashMap</b> dient zum Speichern von Key-Value <br />
(Schlüssel-Wert) Paaren.</li>
<br />
<li>gehört zur Gruppe der Collections</li>
<br />
<li>Das heisst, man gibt einen Schlüssel an und kann<br />
zu diesem Schlüssel einen Wert abspeichern und <br />
zu genau diesem Schlüssel auch den Wert wieder<br />
aus der HashMap herausholen.</li>
<br />
<li>Ein Schlüssel kann ein beliebiges Objekt sein und<br />
ist zumeist eine Object Id, Speicheradresse oder <br />
ein String.</li>
<br />
<li>Wichtig ist jedoch, dass ein Schlüssel eindeutig ist, <br />
sodass niemals ein Schlüssel für zwei Werte exisitiert. </li>
</ul>
<h4>Standard-Methoden</h4>
put
get
<h4>Beispiel</h4>
<code><pre>Map<String, Number> num = new HashMap<String, Number>();</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="http://schabby.de/hashmap/" target="_blank" rel="noreferrer noopener">Schabby's Blog :: Java HashMap</a></li>
</ul>
</html>
<html>
<a href="https://java.com/en/download/linux_manual.jsp" target="_blank">Oracle - Java - Download-Seite</a>
</html>
<html>
<h3>Fehleremeldung :: “error: <identifier> expected“</h3>
<ul>
<li>Die Zeile
<code><pre>
public ArrayList<Box> simpleLoad() {
</pre></code>
führte zur o.g. Fehlermeldung.</li>
<li>Grund war, dass kein Übergabewert mitgegeben wurde,<br />
was aber erwartet wurde:
<code><pre>
public ArrayList<Box> simpleLoad(<u><em>Box box</em></u>) {
</pre></code></li>
</ul>
</html>
<html>
<ul>
<li>Test-Driven Development</li>
<li>ab Eclipse 4 standardmäßig integriert</li>
<br />
<li><b><u>Erstellen einer Testklasse für ein Java-Projekt:</u></b><br />
<ol>
<li> “Projekt“ ⇒ Eingabe Projektnamen </li>
<li> ⇒ “Next“ </li>
<li> ⇒ “Library“ ⇒ hier ist “JUnit“ (eine aktuelle Version) auszuwählen</li>
<li> ⇒ “Finish“ (2x mal)</li>
</ol>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Christoph Schulz :: Einführung in JUnit 4 ‐ für LOMF-Programmierer <br />
(File: ChristophSchulz_EinfuehrungInJUnit .pdf)</li>
</ul>
</html>
<html>
<ol>
<li>Go to the menu Run, <br />
and then to the menu item Run Configurations.</li>
<br />
<img src=./pictures/Eclipse_EnableAssertions_170zO.png height=600 width=345/>
<br />
<li>In the left panel, go to Java Application, <br />
and then go to Assertions.</li>
<br />
<li>In the right panel, choose the tab Arguments.</li>
<br />
<li>Under the field for VM arguments, <br />
type -ea to enable assertions.</li>
<br />
<img src=./pictures/Eclipse_EnableAssertions_x9TeH.png height=713 width=613 />
<br />
<li>Click on the Apply and then Run button.</li>
</ol>
<h3>To globally set it as the default for everything:</h3>
<ol>
<li>Go to menu Window (if you are on Windows), <br />
or go to menu Eclipse (if you are on Mac). <br />
For Linux it might be something similar.</li>
<br />
<li>Go to Preferences.</li>
<br />
<li>Choose Java, and then Installed JREs from the left panel.</li>
<br />
<li>Select your JRE, and then click the Edit... button in the right panel.</li>
<br />
<li>In the Default VM arguments field, add -ea.</li>
</ol>
<h4>Links:</h4>
<ul>
<li><a href="https://stackoverflow.com/questions/5509082/eclipse-enable-assertions" target=_blank>Stackoverflow :: Eclipse: enable assertions</a></li>
</ul>
</html>
<html>
assert := "Stelle sicher, dass xyz gilt"<br />
<ul>
<li><h5>assertEquals</h5>
<code><pre>assertEquals(<i><Fehlermeldung></i>,
<i><erwarteter Wert></i>,
<i><berechneter Wert></i>);</pre></code>
Beispiel: <br />
<code>assertEquals("adding two positive numbers fails", 4, myMath.add(2,2));</code><br />
<code>assertEquals("failure - strings are not equal", "text", "text");</code>
</li>
<li><h5>assertFalse</h5>
<code><pre>assertFalse("failure - should be false", false);</pre></code>
</li>
<li><h5>assertTrue</h5>
<code><pre>assertTrue("failure - should be true", true);</pre></code>
</li>
</ul>
</html>
<html>
<H3>Einige frühere Propra-Aufgabenstellungen</H4>
<ul>
<li><a href="http://dna.fernuni-hagen.de/Lehre-offen/Praktika/ProPra02-03/AufgabenKomplett.PDF">Aufgabenstellung Propra WS 2002/2003 (6 verschiedene Aufgaben zur Auswahl)</a>
<li><a href="http://www.fernuni-hagen.de/ps/docs/kursmaterial/propra/PropraWS0304.pdf">Aufgabenstellung Propra WS 2003/2004 (Spiel GoBang)</a></li>
<li><a href="http://pi7.fernuni-hagen.de/lehre/Aufgabe_1580_1582_1584.pdf">Aufgabenstellung Propra WS 2007/2008 (Spiel Oware)</a></li>
<li><a href="http://www.fernuni-hagen.de/imperia/md/content/fakultaetfuermathematikundinformatik/fakultaet/programmierpraktikum/2010_ss_aufgabenstellung.pdf">Aufgabenstellung Propra SS 2010 (5 verschiedene Aufgaben zur Auswahl)</a></li>
<li><a href="http://www.fernuni-hagen.de/imperia/md/content/fakultaetfuermathematikundinformatik/fakultaet/programmierpraktikum/2011_2012_ws_aufgabenstellung.zip">Aufgabenstellung Propra WS 2011/2012 (Pertrinetz-Editor)</li>
<li><a href="http://www.fernuni-hagen.de/imperia/md/content/fakultaetfuermathematikundinformatik/fakultaet/programmierpraktikum/2012_ss_aufgabenstellung.pdf">Aufgabenstellung Propra SS 2012 (Die konvexe Hülle und der kleinste Kreis)</li>
<li><a href="http://www.fernuni-hagen.de/imperia/md/content/fakultaetfuermathematikundinformatik/fakultaet/programmierpraktikum/2013_ss_aufgabenstellung.zip">Aufgabenstellung Propra SS 2013 (SHOWGO, ein Programm zur Planung von Theaterstückinszenierungen)</li>
<li><a href="http://www.fernuni-hagen.de/imperia/md/content/fakultaetfuermathematikundinformatik/fakultaet/programmierpraktikum/2013_2014_ws_aufgabenstellung.zip">Aufgabenstellung Propra WS 2013/2014 (mehrere Aufgaben zur Auswahl)</li>
<li><a href="https://www.fernuni-hagen.de/imperia/md/content/fakultaetfuermathematikundinformatik/fakultaet/programmierpraktikum/2015_ss_aufgabenstellung.pdf">Aufgabenstellung Propra SS 2015 (Die konvexe Hülle und die Winkelhülle)</li>
<li><a href="https://www.fernuni-hagen.de/imperia/md/content/fakultaetfuermathematikundinformatik/fakultaet/programmierpraktikum/2015_2016_ws_aufgabenstellung.zip">Aufgabenstellung Propra WS 2015/2016 (Verlegungsplan für Römischen Verbund)</li>
<li><a href="https://www.fernuni-hagen.de/imperia/md/content/fakultaetfuermathematikundinformatik/fakultaet/programmierpraktikum/2016_ss_aufgabenstellung.pdf">Aufgabenstellung Propra SS 2016 (Brückenlegespiel Bridges/Hashiwokakero)</li>
<li><a href="https://www.fernuni-hagen.de/imperia/md/content/fakultaetfuermathematikundinformatik/fakultaet/programmierpraktikum/2016_2017_ws_aufgabenstellung.zip">Aufgabenstellung Propra WS 2016/2017 (6 verschiedene Aufgaben zur Auswahl)</a></li>
<li><a href="https://www.fernuni-hagen.de/imperia/md/content/fakultaetfuermathematikundinformatik/fakultaet/programmierpraktikum/2017_2018_ws_aufgabenstellung.zip">Aufgabenstellung Propra WS 2017/2018 (Workflownetz-Editor)</a></li>
<li><a href="https://www.fernuni-hagen.de/imperia/md/content/fakultaetfuermathematikundinformatik/fakultaet/programmierpraktikum/2018_ss_aufgabenstellung.pdf">Aufgabenstellung Propra SS 2018 (Die konvexe Hülle und der größte enthaltene Kreis)</a></li>
<li><a href="https://www.fernuni-hagen.de/imperia/md/content/fakultaetfuermathematikundinformatik/fakultaet/programmierpraktikum/2018_2019_ws_aufgabenstellung.pdf">Aufgabenstellung Propra WS 2018/2019 (Brückenlegespiel Bridges/Hashiwokakero)</a></li>
</ul>
<h3>Link:</h3>
<a hreff="http://feu.mpaap.de/1618/propra.html" target=_blank>FernUni Hagen - Michael Paap</a>
</html>
<html>
<ul>
<li><h3>for ‐ Schleife</h3>
<ul>
<li>Zählschleife</li>
<li><b>Syntax des Schleifenkopfes:</b><br />
<img src="./pictures/Java_Syntax_for-Schleife.jpg" height=86 width=475 /> <!-- height=171 width=949 -->
</li>
</ul>
</li>
<li><h3>foreach ‐ Schleife</h3>
<ul>
<li>Wiederholung für alle Elemente eines Arrays (hier: bookChapter)</li>
<li>Ohne separate Zählvariable i</li>
<li>Direkte Nutzung einer Variablen (hier: bookChapter vom Typ String)</li>
<li><b>Syntax des Schleifenkopfes:</b><br />
<img src="./pictures/Java_Syntax_foreach-Schleife.jpg" height=86 width=475 /> <!-- height=171 width=949 -->
</li>
</ul>
</li><li><h3>while ‐ Schleife</h3>
<ul>
<li>kopfgesteuerte Schleife</li>
<li><b>Aufbau der Schleife:</b><br />
<img src="./pictures/Java_Syntax_while-Schleife.jpg" height=146 width=453 /> <!-- height=292 width=906 -->
</ul>
</li>
<li><h3>do ‐ while ‐ Schleife</h3>
<ul>
<li>fußgesteuerte Schleife</li>
<li><b>Aufbau der Schleife:</b><br />
<img src="./pictures/Java_Syntax_do-while-Schleife.jpg" height=140 width=470 /> <!-- height=279 width=940 -->
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li>Aufruf: <code><pre>javap <i>Klassendatei</i></pre></code></li>
<li>Das Tool <b>javap</b> ist ein Disassembler für Java-Klassendateien;</li>
<br />
<li>Mit der <b>Option -c</b> verwendet, kann man den automatisch<br />
erzeugten Default-Konstruktor auf Bytecodeebene näher <br />
untersuchen.<br />
<img src=./pictures/javap_01.png height=250 width=590 />
<br />
Link: <a href="http://www.javaseiten.de/ch01s04.html" target=_blank>JavaSeiten.de</a> </li>
</ul>
</html>
Geben Sie den Text für 'Neuer Tiddler' ein
<html>
<ul>
<li>Den Abschluss der Java-Installation (u.a. auf Debian 10 “Buster“) machen <br />
folgende Befehle mit <code><b>update‐alternatives</b></code>:
<code><pre>
mueller@Debian-Laptop:~$ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-14.0.2/bin/java 2
update-alternatives: Warnung: Neuinstallation der Alternative /usr/lib/jvm/java-11-openjdk-amd64/bin/java ist erzwungen, weil Linkgruppe java defekt ist
mueller@Debian-Laptop:~$ sudo update-alternatives --config java
Es gibt 3 Auswahlmöglichkeiten für die Alternative java (welche /usr/bin/java bereitstellen).
Auswahl Pfad Priorität Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 automatischer Modus
1 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 manueller Modus
2 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manueller Modus
3 /usr/lib/jvm/jdk-14.0.2/bin/java 2 manueller Modus
Drücken Sie die Eingabetaste, um die aktuelle Wahl[*] beizubehalten,
oder geben Sie die Auswahlnummer ein: 3
update-alternatives: /usr/lib/jvm/jdk-14.0.2/bin/java wird verwendet, um /usr/bin/java (java) im manuellen Modus bereitzustellen
</pre></code></li>
<li>habe dann manuell den Link <code><b>default‐java</b></code> gelöscht und <br />
mit dem neuen Ziel-Verzeichnis neu angelegt;<br />
lt. <a href="https://www.linuxquestions.org/questions/linux-general-1/update-alternatives-and-default-java-symbolic-link-on-debian-10-buster-4175662284/" target=_blank>LinuxQuestions</a> ist das eine “APT‐Sache“ und da ich <br />
‐ anscheinend ‐ eine der Java‐Versionen an apt “vorbei<br />
installiert“ habe, scheint dieser Mechanismus nicht mehr<br />
zu funktionieren.</li>
<h3>Links:</h3>
<ul>
<li><a href="https://tecadmin.net/install-oracle-java-on-debian-10-buster/" target=_blank>TecAdmin :: Installation Java auf Buster</a></li>
</ul>
</html>
<html>
<ul>
<li>Aufbau:<br />
<img src="./pictures/OpenHPI_arrays.jpg" height=176 width=339 /> <!-- height=235 width=452 -->
</li>
<li>Feste Größe:
<code><pre>
int[] arr = new int[5];
</pre></code></li>
<li>Einfacher Zugriff auf beliebige Elemente:
<code><pre>
arr[i]
</pre></code></li>
<li>Vergrößern sowie Einfügen und Entfernen von Elementen ist teuer:
<ul>
<li>Das Array muss vergrößert werden (bei einfachen Arrays muss sogar das gesamte Array getauscht werden)</li>
<li>Alle folgenden Elemente müssen nach hinten verschoben werden<br />
→ Erst dann ist der Platz frei, um das neue Element einzufügen</li>
</ul>
<li>Analog: Lückenloses Entfernen von Elementen</li>
<li>Vorteile und Nachteile:<br />
<img src="./pictures/OpenHPI_VorteileNachteile.jpg" height=326 width=652 /> <!-- height=653 width=1305 --> /></li>
<li>Kosten für bestimmte Aktionen?</li>
</ul>
</html>
<html>
<ul>
<li><h3>Aufruf Java-Compiler (CmdLine):</h3>
<code><pre>
javac ‐encoding utf8 HalloWeltTest1.java
</pre></code></li>
</ul>
</html>
<html>
<ul>
<li>Jedes Element hält eine Referenz auf das nächste Element:<br />
<img src="./pictures/OpenHPI_lists.jpg" height=191 width=396 /></li> <!-- height=254 width=528 -->
<li>Kein beliebiger Zugriff auf Elemente möglich</li>
<li>Iteration startet immer beim ersten Element</li>
<li>Je nach Implementierung auch rückwärts</li>
<li>Einfaches Einfügen und Entfernen von Elementen auch am Anfang der Liste
<li>Node einfügen oder löschen ⇒ Referenz auf nächsten Node “umbiegen“</li>
<li>Vorteile und Nachteile:<br />
<img src="./pictures/OpenHPI_VorteileNachteile.jpg" height=326 width=652 /> <!-- height=653 width=1305 -->
</li>
<li>Kosten für bestimmte Aktionen?</li>
</ul>
</html>
<html>
<ul>
<li><pre><code><script language="javascript">
function editFile(file) {
var el = document.getElementById("field1").innerHTML;
alert(el);
shell.Run(mousepad);
}
</script></code></pre>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>bei HTML 5</h3>
<code><br />
<script language = "javascript"> <br />
...<br />
</script> </code></li>
<li><h3>bei älteren HTML‐Versionen</h3>
<code>
<script type="text/javascript" src="skript.js"><br />
</script> <br />
</code><br /></li>
<li>Der <code><b>script</b></code>‐Bereich ist im <code><b>head</b></code>‐Abschnitt einzutragen.</li>
</ul>
The script tags can identify a language (PHP or <br />
otherwise) who's code you will be running in a <br />
section. This is useful in a file that allows for <br />
mixed scripting languages. While it is not a <br />
common setup, it is sometimes used. By using <br />
the script tags, you can easily identify what <br />
language is where, and when it switches. <br />
<br />
<h3>Links:</h3>
<ul>
<li><a href="https://www.ionos.de/digitalguide/websites/web-entwicklung/javascript-in-html-einbinden/"
target="_blank" rel="noreferrer noopener">
IONOS :: JavaScript in HTML einbinden: Einfache Anleitung und Beispiele </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>Deklarieren Sie Variablen immer mit <code><em><b>let</b></em></code>, da Sie sonst globale Variablen erzeugen, die später evtl. ungewollte Konsequenzen nach sich ziehen.</li>
<li>Geben Sie Variablen selbsterklärende, sogenannte sprechende Namen, damit Sie in ein paar Wochen wieder erkennen können, was diese Variable beinhalten soll.</li>
<li>Beachten Sie die Regeln für selbstvergebene Namen.</li>
<li>Verwenden Sie den strengen Modus:
<code><pre>
('use strict';)
</pre></code>
Damit schließen Sie Referenzfehler durch fehlerhaft geschriebene Methoden oder Variablen aus.</li>
<li>Schließen Sie alle Anweisungen mit einem Semikolon, um von Anfang an sauber zu programmieren. So vermeiden Sie später Fehler und ein mühseliges Debuggen.</li>
<li> Verwenden Sie zur Abgrenzung der mit Anführungszeichen umschlossenen HTML-Attribute für Zeichenketten in JavaScript einfache Hochkommata.<br />
<br />
In ES6 wurden Template Literale eingeführt, mit denen Sie einige Anführungszeichen sparen können:
<code><pre>
let ausgabe = `Hallo ${name}!`;
</pre></code>
So können Zeichenketten einfacher zusammengefügt werden.
<ul>
<li>Die Syntax der Schablonenliterale ist in Backticks eingeschlossen.</li>
<li>Die Syntax-Platzhalter in Schablonenliteralen verwenden <code><em><b>${expression}</b></em></code>.</li>
</ul></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.selfhtml.org/wiki/JavaScript/Tutorials" target="_blank" rel="noreferrer noopener">SelfHtml :: Tutorial Javascript</a></li>
</ul>
</html>
<html>
<ul>
<li>Abkürzung : <b>JS</b></li>
<li>Java und JavaScript haben <b>nichts</b> miteinander zu tun!</li>
<li>Scriptsprache für dynamisches HTML in Webbrowsern;</li>
<li>Zur Auswertung von Benutzerinteraktionen,<br />
um Inhalte zu verändern, nachzuladen oder zu generieren;</li>
<li>In JavaScript lässt sich je nach Bedarf
<ul><li>objektorientiert,</li><li> prozedural</li> oder <li>funktional programmieren;</li></ul></li>
<li></li>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.selfhtml.org/wiki/JavaScript/Tutorials" target="_blank" rel="noreferrer noopener">SelfHtml :: Tutorial Javascript</a></li>
</ul>
</html>
<html>
<ul>
<li><h3>Einzeilige Kommentare</h3>
<code><pre>
// <em>Kommentar</em>
</pre></code></li>
<li><h3>Mehrzeilige Kommentare</h3>
<code><pre>
/* <em>Kommentarzeilen</em> */
</pre></code></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.selfhtml.org/wiki/JavaScript/Kommentar" target="_blank" rel="noreferrer noopener">SelfHtml :: JavaScript</a></li>
</ul>
</html>
<html>
<h3>Kontrollausgabe mit der Konsole</h3>
<p>
<img src="./pictures/Console.log-3.png" height=373 width=500 /> <!-- height=559 width=750 -->
<br />
Ansicht der Firebug-Konsole im Firefox Version 40
</p>
Die Konsole öffnet sich …
<ul>
<li>über die Funktionstaste <b>F12</b>
<li>über die jeweiligen Menüs,
<li>oder aber durch eine der folgenden Tastenkombinationen:
<ul>
<li><b>Mozilla Firefox:</b>
<ul>
<li>unter Windows und Linux mit Strg + Umschalt + I</li>
<li>unter Mac mit Cmd + Opt + I</li>
</ul>
<li><b>Google Chrome:</b>
<ul>
<li>unter Windows und Linux mit Strg + Umschalt + J</li>
<li>unter Mac mit Cmd + Opt + J</li>
</ul>
<li><b>Microsoft Edge und Internet Explorer:</b>
<ul>
<li>F12 anschließend Strg + 2</li>
</ul>
</ul></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.selfhtml.org/wiki/JavaScript/Tutorials/Einstieg/Programmieren_und_Debuggen" target="_blank" rel="noreferrer noopener">SelfHtml :: Tutorial Javascript ‐ Programmieren & Debuggen</a></li>
</ul>
</html>
<html>
<h4>Links:</h4>
<ul>
<li><a href="https://nodejs.org/en/download/" target=_blank>Node.js - Download-Seite</a></li>
</ul>
</html>
<html>
<ol>
<li>Schleifen mit “while“</li>
<li>Schleifen mit “for“<br />
<code><pre>
for (<em>Zählvariable</em>; <em>Fortführungsbedingung</em>; <em>Änderung der Zählvariable</em>) {
…
}</pre></code>
Beispiel:
<code><pre>
for (var i = 10; i <= 36; i++) {
text = text + '<span style="font-size:' + i + 'px">Schrift mit ' + i + ' Pixel Größe<\/span><br>';
document.querySelector('output').innerHTML = text;
}
</pre></code>
</li>
<li>Schleifen mit “for…in“</li>
<li>Schleifen mit “for…of“</li>
<li>Schleifen mit “do‐while“</li>
<li>Kontrolle innerhalb von Schleifen ‐ break und continue</li>
</html>
<html>
<ul>
<li>The if/else statement executes a block of code if a specified condition is true. If the condition is false, another block of code can be executed.<br />
<br />
The if/else statement is a part of JavaScript's “Conditional“ Statements, which are used to perform different actions based on different conditions.<br />
<br />
In JavaScript we have the following conditional statements:
<ul>
<li>Use <b><u>if</u></b> to specify a block of code to be executed, if a specified condition is true</li>
<li>Use <b><u>else</u></b> to specify a block of code to be executed, if the same condition is false</li>
<li>Use <b><u>else if</u></b> to specify a new condition to test, if the first condition is false</li>
<li>Use <b><u>switch</u></b> to select one of many blocks of code to be executed</li>
</ul>
</li>
<br />
<li>Beispiel:<code><pre>
if (x == "") {
alert("You need to fill here!");
return false;
} else if (x == "Lisa" || x == "value2" || x == "value3") {
alert("You can't enter here");
return false;
} else {
alert("Welcome");
return false;
}</pre></code></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.w3schools.com/jsref/jsref_if.asp" target="_blank" rel="noreferrer noopener">W3Schools :: if ‐ Statement</a></li>
</ul>
</html>
<html>
Jenkins is a DevOps tool which can be used to automate your build, test <br />
and delivery of software code. If you are new to Jenkins, this tutorial will <br />
help you to understand how to create Jenkins pipeline using one of the<br />
following methods:
<ol>
<li>Classic Jenkins User Interface</li>
<li>Jenkins Blue Ocean User Interface which reduces clutter and increases clarity</li>
<li>Jenkinsfile Pipeline Script from a SCM like Git Repository</li>
</ol>
<h3>Method 1: Create Pipeline from Classic Jenkins UI</h3>
<p>
From the Jenkins menu, click on “Create New Item“. <br />
Enter the name of your pipeline: <code><b>Test‐Pipeline</b></code>. <br />
Choose “<code><b>Pipeline</b></code>“ from the list of choices. Click Ok as shown below.
</p>
<img src="./pictures/jenkins-create-test-pipeline.png" height=531 width=443 title="[Jenkins Create Test Pipeline]" />
<p>
Once the test pipeline is created, edit the pipeline. Click on “Pipeline“ Tab, <br />
and paste the following code. This sample code has three simple stages and<br />
steps defined inside each stage. <br />
<br />
For this simple example, the steps section just has echo command which will <br />
display a message.
</p>
<code><pre>
pipeline {
agent any
stages {
stage('Stage 1: Integrate Web and DB') {
steps {
echo '1.1 Getting application web files'
echo '1.2 Getting database files'
echo '1.3 Combining web and db files'
}
}
stage('Stage 2: Integration testing') {
steps {
echo '2.1 Performing integration testing'
}
}
stage('Stage 3: Release to Prod') {
steps {
echo '3.1 Releasing code to production'
}
}
}
}
</pre></code>
<img src="./pictures/jenkins-pipeline-tab.png" height=386 width=443 title="[Jenkins Pipeline Tab]" />
<p>
When the pipeline is selected, click on “Build Now“ from the side <br />
menu bar which will execute the pipeline as shown below.
</p>
<img src="./pictures/jenkins-build-now.png" height=384 width=225 title="[Jenkins Build Now]" />
<p>
Once the pipeline is executed, you can view the logs from the Console output <br />
menu item on the side menu bar as shown below.
</p>
<img src="./pictures/jenkins-console-output.png" height=443 width=443 title="[Jenkins Console Output]" />
<h3>Method 2: Create Pipeline from Blue Ocean Interface</h3>
<p>
Blue Ocean gives a better user experience for Jenkins. This UI is designed from<br />
ground up for Jenkins pipeline and reduces clutter and increases UI clarity.<br />
<br />
First, search for “blue ocean“ and install Blue Ocean Plugin from Jenkins<br />
Plugin Manager. After you install the plugin, restart Jenkins.<br />
<br />
On a related note, refer to this to keep your Jenkins and Plugins up‐to‐date:<br />
<a href="https://www.thegeekstuff.com/2016/06/upgrade-jenkins-and-plugins/" target=_blank>How to Upgrade Jenkins to New Version and Update Plugins</a><br />
<br />
On the Jenkins server, install a local git repository for blueocean to use in the pipeline.
</p>
<code><pre>
sudo yum install git -y
cd /var/lib/jenkins
mkdir localgit
cd localgit
git clone https://my-git-repor-url/v1/repos/BinCode
</pre></code>
<p>
Note: I gave the git repository path as /var/lib/jenkins/localgit/BinCode<br />
<br />
After the plugin is installed, you'll see a new menu item on the side bar called <br />
“Open Blue Ocean“ as shown below:
</p>
<img src="./pictures/jenkins-blueocean-menu.png" height=368 width=300 title="[Jenkins Blue Ocean Menu]" />
<p>
You can also access blue ocean UI directly by appending <code><b>/blue</b></code> <br />
to the jenkins URL. For example:
<code><pre>
http://192.168.101.100:8080/blue
</pre></code>
First time, Blue Ocean will look for Jenkinsfile in your local git repository and will <br />
run a pipeline for each branch containing Jenkins file.<br />
<br />
Since we have not created a Jenkinsfile yet, it will display a prompt create a new<br />
pipeline from the user interface.<br />
<br />
The pipeline creation UI will walk you through the steps to create a new pipeline:
<ul>
<li>First, Click on the + next to the start.</li>
<li>Click on “Add a Step“ … </li>
<li> … and select “Print Message“ as shown below.</li>
</ul>
</p>
<img src="./pictures/jenkins-blueocean-add-step.png" height=425 width=443 title="[Jenkins Blue Ocean Add Step]" />
<p>
After entering the message, click on the back arrow that is in front of the <br />
stage name to go back. Don't click on Save yet.<br />
<br />
Add another Step “Print Message ‐ 1.2 Getting database files“<br />
Click on the back arrow in front of the stage name to go back.<br />
<br />
Repeat above for the 3rd echo step as shown below.
</p>
<img src="./pictures/jenkins-blueocean-all-steps.png" height=243 width=443 title="[Jenkins Blue Ocean All Steps]" />
<p>
After creating all the three stages, click on the Save button to save the pipeline. <br />
You can commit your changes to the master, or create a new branch. For this<br />
example, select “Commit to new branch“ and give the name as “jenkins“ as shown below.
</p>
<img src="./pictures/jenkins-blueocean-new-git-branch.png" height=309 width=338 title="[Jenkins Blue Ocean New Git Branch]" />
<p>
Once the pipeline is created and executed, it will display the status of each stage. <br />
Click on a particular stage name to see the corresponding stage output as shown<br />
below.
</p>
<img src="./pictures/jenkins-blueocean-view-stage-output.png" height=274 width=443 title="[Jenkins Blue Ocean View Stage Output]" />
<p>
On the Jenkins server, you can see a new branch called “jenkins“ is <br />
now created for your repository:
<code><pre>
# git branch -a
jenkins
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
</pre></code>
</p>
<h3>Method 3: Create using Jenkinsfile Pipeline Script From Git Repository</h3>
<p>
First, create Jenkinsfile under your repository as shown below. In this example, <br />
I'm using the Jenkinsfile that already exists in the branch. If you don't have<br />
this file, create one.
<code><pre>
# cd /var/lib/jenkins/localgit/BinCode
# git checkout jenkins
Switched to branch 'jenkins'
# git branch -a
* jenkins
master
remotes/origin/HEAD -> origin/master
remotes/origin/master
# cat Jenkinsfile
pipeline {
agent any
stages {
stage('Stage 1: Integrate Web and DB') {
steps {
echo '1.1 Getting application web files'
echo '1.2 Getting database files'
echo '1.3 Combining web and db files'
}
}
stage('Stage 2: Integration testing') {
steps {
echo '2.1 Performing integration testing'
}
}
stage('Stage 3: Release to Prod') {
steps {
echo '3.1 Releasing code to production'
}
}
}
}
</pre></code>
First, follow similar step as explained in Method 1 to create a new pipeline from <br />
Classic UI and name this pipeline as: SCM-Test-Pipeline.<br />
<br />
Next, select SCM-Test-Pipeline and under “Pipeline“ Tab, for Definition select<br />
“Pipeline script from SCM“ option as shown below. Make sure the Script Path<br />
says “Jenkinsfile“ as shown below.
</p>
<img src="./pictures/jenkins-scm-create-pipeline-script.png" height=384 width=375 title="[Jenkins SCM Create Pipeline Script]" />
<p>
Now this will also ask for your SCM repository details. Enter your git repository<br />
details here. If your Jenkinsfile is in a specific branch, make sure to specify the<br />
branch name.<br />
<br />
To understand how to setup Jenkins credentials for Git, refer to this: <br />
<a href="https://www.thegeekstuff.com/2016/10/jenkins-git-setup/" target=_blank>How to Setup Git Repository and Credentials for Jenkins Jobs</a>.
</p>
<img src="./pictures/jenkins-scm-repository-details.png" height=378 width=443 title="[Jenkins SCM Repository Details]" />
<p>
After you specify the git repository detail, execute the pipeline. Once the pipeline <br />
is executed, from the side menu bar click on Console output to view the execution<br />
log of the pipeline.
</p>
<h3>Links:</h3>
<ul>
<li><a href="https://www.thegeekstuff.com/2021/01/create-jenkins-pipeline" target=_blank>The Geek Stuff :: 3 Methods to Create Jenkins Pipeline ‐ Classic UI, BlueOcean, Git</a></li>
</ul>
</html>
<html>
<p>
Jenkins is an open source automation server, which will help you to automate the application deployment in your infrastructure.<br />
<br />
From Jenkins, for deployment, you can connect to any kind of source code control system, and pull the source, build it, and deploy it automatically to one or more servers.<br />
<br />
In this tutorial, we'll explain how you can create a new Jenkins Job, and connect it to a Git repository to pull the source code for building.
<h3>Install Jenkins Git Plugin</h3>
For this, you should have “Git Plugin“ installed in your Jenkins.<br />
<br />
Login to Jenkins UI using your admin account, and go to “Manage Jenkins“ <br />
→ Manage Plugins <br />
→ Click on “Installed“ Tab <br />
→ From here, search for “git plugin“ in the filter.<br />
<br />
If the “Git plugin“ is already installed, it will display it here as shown below.
</p>
<img src="./pictures/jenkins-git-plugin-lists.png" height=382 width=541 title="[Jenkins Git Plugins List]" />
<p>
During Jenkins installation, if you've chosen to install the “recommended plugin“, you'll already have “git plugin“ as shown above.<br />
<br />
If you don't see it, then install it. Go to “Available“ tab, search for “git plugin“, and click on “Install without restart“.<br />
<br />
From your plugins list, if you see that “Git Plugin“ is an older version, then upgrade it to the latest version as explained here: How to Upgrade Jenkins to New Version and Update Plugins
</p>
<h3>Create New Jenkins Job</h3>
<p>
Click on “New“ to create a new jenkins job. Select “Free Style Project“ as type as shown below. Name: Dev App Build. Type: Free Style Project
</p>
<img src="./pictures/jenkins-git-new-job.png" height=392 width=382 title="[Jenkins Git Create New Job]" /> <!-- height=522 width=509 -->
<p>
By default this will go into editing the job after creating it. In the edit mode, you'll see multiple tabs on the top, and “General“ tab will be selected.
<h3>Select “Git“ for Source Code Management</h3>
For this particular job, click on “Source Code Management“ tab. This will have the following options:
<ul>
<li>None (This option will be selected by default).
<li>CVS
<li>CVS Projectset
<li>Git
<li>Subversion
</ul>
Click on “Git“ to select it. This will expand the section, and show all git related parameters as shown below.
</p>
<img src="./pictures/jenkins-git-source-code-mgmt-tab.png" height=398 width=440 title="[Jenkins Job Git Source Code Management Tab]" /> <!-- height=530 width=587 -->
<p>
Under the Git section, in the Repositories section, you'll see the following:<br />
<ul>
<li><b>Repository URL:</b> This will be the URL of your remote repository. The syntax is same<br />
as what you'll specify in the git command line. <br />
For example: <code><pre>username@git-server-ip:/git/repository/full/path</pre></code>
The following are some possible syntax for the repository URL:
<ul>
<li>ssh://git@github.com/github/git.git</li>
<li>git@github.com:github/git.git</li>
<li>ssh://user@other.host.com/~/repos/R.git</li>
<li>https://github.com/github/git.git</li>
<li>git://github.com/github/git.git</li>
</ul></li>
<li><b>Credentials:</b> By default, this will be “None“. There will an “Add“ button next to it. From here, you can specify the credentials that are required for the Git URL specified above.<br />
</li>
<li><b>Advanced button:</b> When you click on the “Advanced“ button, you'll see two more text boxes. For most cases, you don't need to enter anything here.
<ul>
Name ‐ You can leave this empty, and Jenkins will automatically generate unique name. This “name“ is exactly the same as the one used in the git remote command.
Refspec ‐ The default refspec is “+refs/heads/*:refs/remotes/REPOSITORYNAME/*“. This is Ok for most of you, and you can leave this empty. By default will be retrieve all the branch heads as remotes/repositoryname/branchname. Instead, if you always want to retrive just one branch, you may want to modify this.
</ul>
</li>
<li><b>Add repository button:</b> Click on “Add repository“ to create this as the default git repository to be used by this particular Jenkins Job.<br />
</li>
<li><b>Branches to build section:</b> In this section under “Branch Specifier (blank for “any“):“, the default value is */master. For most cases, you can leave this to default. This will track only the master branch. But, if you leave this blank, all branches will be examined for changes and built. The syntax for this field is: refs/heads/<br />
<br />
The following are various possible examples for the “Branch Specifier“ field:
<ul>
<li>refs/heads//origin/master</li>
<li>remotes/origin/master</li>
<li>refs/remotes/origin/master</li>
<li>tag-name</li>
<li>refs/tags/tag-name</li>
<li>commit-id</li>
<li>${ENV_VARIABLE}</li>
<li>${TREEISH}</li>
<li>refs/tags/${TAGNAME}, …</li>
<li>Wildcards: e,g: *, **</li>
<li>:regular-expression</li>
</ul>
</li>
<li><b>Add Branch button:</b> Click on this button to add the branch specified in the above “Branch Specifier“ field to be used.<br />
</li>
<li><b>Repository browser:</b> By default, this drop down list will be set to “Auto“. In most cases, you can just leave it to default. This will create the links for the “changes“ view inside the Jenkins to an external system for browsing. The “Auto“ option will automatically choose the best possible repository browser for the selected SCM.<br />
<br />
The following are possible values for this Repository browser:
<ul>
<li>Auto</li>
<li>AssemblaWeb</li>
<li>FishEye</li>
<li>Kiln</li>
<li>Microsoft Team Foundation Server/Visual Studio Team Services</li>
<li>bitbucketweb</li>
<li>cgit</li>
<li>gitblit</li>
<li>githubweb</li>
<li>gitiles</li>
<li>gitlab</li>
<li>gitlist</li>
<li>gitoriousweb</li>
<li>gitweb</li>
<li>phabricator</li>
<li>redmineweb</li>
<li>rhodecode</li>
<li>stash</li>
<li>viewgit</li>
</ul></li>
</ul>
When you create a new Jenkins job, make sure the security is enabled on that particular job as explained here: <a href="https://www.thegeekstuff.com/2016/06/jenkins-security/" target=_blank>How to Setup User Security on Jenkins with Project Matrix Authorization</a>
</p>
<h3>Setup Jenkins Credentials for Git</h3>
<p>
When you create the repository, you might get the following error:
<code><pre>
Repository URL error 1: ramesh@192.168.101.2:/home/git/devapp
Failed to connect to repository : Command "git ls-remote -h ramesh@192.168.101.2:/home/git/devapp HEAD" returned status code 128:
stdout:
stderr: Host key verification failed.
fatal: The remote end hung up unexpectedly
</pre></code>
Typically, you'll get the above error message, when your “Credentials“ under “Git“ is set to “None“.<br />
<br />
To add a credential, click on “Add“ next to “Credentials“ → Select “Jenkins Credential Provider“, this will display the following add credentials screen.
</p>
<img src="./pictures/jenkins-git-create-credentials-uid-pwd.png" height=454 width=436 title="[Jenkins Git Create Credentials]" />
<p>
<ul>
<li>Domain: By default “Global credentials (unrestricted)“ is selected. Other option is: “Username and password“. Use default.
<li>Kind: The following are the possible options:
<ul>
<li>Username and password (This is shown in the above screenshot).</li>
<li>SSH Username with private key</li>
<li>Secret file</li>
<li>Secret text</li>
<li>Certificate</li>
</ul>
<li>Username ‐ Specify the username that will be used to connect to the remote git repository</li>
<li>Password ‐ Specify the password for the above username.</li>
<li>ID ‐ Leave this empty. This is an internal unique ID that are used to identify this credentials in the job. When you leave this empty, Jenkins will auto generate an id.</li>
<li>Description ‐ Descriptive notes about this credentials</li>
</ul>
If you choose, the SSH username with private key, you'll see the following screen:
</p>
<img src="./pictures/jenkins-git-create-credentials-ssh.png" height=533 width=486 title="[<h3>Jenkins Git Create Credentials SSH]" />
<p>
<code><pre>
Kind: SSH Username with Private Key
Username ‐ Specify the username that will be used to connect to the remote git repository
Private Key: The following are three options for this:
Enter directly
From a file on Jenkins master
From the jenkins master ~/.ssh
Passphrase ‐ The passphrase for your key
ID ‐ The unique ID (same as what is explained above)
Description ‐ Notes
</pre></code>
Once the credentials are created, complete the remaining sections in the “Git“ section under the “Source Code Management“ tab for your particular job.<br />
<br />
After this, if you want to view all the credentials that you've created so far in Jenkins, go to “Jenkins“ → Click on “Credentials“ on the menu, which will list all the credentials that you've created inside Jenkins so far as shown below.
</p>
<img src="./pictures/jenkins-git-credentials-list.png" height=467 width=507 title="[Jenkins Git Credentials List]" />
<p>
So far we've created a new Jenkins job and associated it to a specific git repository, and specified which branch from the repository to be used when this particular job is executed.
</p>
<h3>Links:</h3>
<ul>
<li><a href="https://www.thegeekstuff.com/2016/10/jenkins-git-setup/" target=_blank>The Geek Stuff :: How to setup git repository & credentials for Jenkins jobs</a></li>
</ul>
</html>
<html>
<ul>
<li>Magic Cmd <code><b>%env</b></code>, eingegeben in einer Zelle<br />
vom Jupyter-Notebook, listet alle aktuell <br />
gesetzten Umgebungsvariablen und deren Wert auf;<br />
ist ein line magic cmd („%“)</li>
<li>Beispiel:
<code><pre>{'CLICOLOR': '1',
'CLOUDSDK_CONFIG': '/content/.config',
'COLAB_GPU': '0',
'CUDA_PKG_VERSION': '10-0=10.0.130-1',
'CUDA_VERSION': '10.0.130',
'CUDNN_VERSION': '7.6.3.30',
'DATALAB_SETTINGS_OVERRIDES': '{"kernelManagerProxyPort":6000,"kernelManagerProxyHost":"172.28.0.3","jupyterArgs":["--ip=\\"172.28.0.2\\""]}',
'DEBIAN_FRONTEND': 'noninteractive',
'ENV': '/root/.bashrc',
'GCS_READ_CACHE_BLOCK_SIZE_MB': '16',
'GIT_PAGER': 'cat',
'GLIBCPP_FORCE_NEW': '1',
'GLIBCXX_FORCE_NEW': '1',
'HOME': '/root',
'HOSTNAME': '04a4b0bbb959',
'JPY_PARENT_PID': '22',
'LANG': 'en_US.UTF-8',
'LAST_FORCED_REBUILD': '20190507',
'LD_LIBRARY_PATH': '/usr/local/nvidia/lib:/usr/local/nvidia/lib64',
'LD_PRELOAD': '/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4',
'LIBRARY_PATH': '/usr/local/cuda/lib64/stubs',
'MPLBACKEND': 'module://ipykernel.pylab.backend_inline',
'NCCL_VERSION': '2.4.8',
'NO_GCE_CHECK': 'True',
'NVIDIA_DRIVER_CAPABILITIES': 'compute,utility',
'NVIDIA_REQUIRE_CUDA': 'cuda>=10.0 brand=tesla,driver>=384,driver<385 brand=tesla,driver>=410,driver<411',
'NVIDIA_VISIBLE_DEVICES': 'all',
'OLDPWD': '/',
'PAGER': 'cat',
'PATH': '/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/tools/node/bin:/tools/google-cloud-sdk/bin:/opt/bin',
'PWD': '/',
'PYTHONPATH': '/env/python',
'PYTHONWARNINGS': 'ignore:::pip._internal.cli.base_command',
'SHELL': '/bin/bash',
'SHLVL': '1',
'TERM': 'xterm-color',
'TF_FORCE_GPU_ALLOW_GROWTH': 'true',
'_': '/tools/node/bin/node'}</pre></code></li>
</ul>
</html>
<html>
Apache Kafka kombiniert Vielseitigkeit und Einfachheit.
<p>
Geht es darum, Daten von A nach B zu bringen, hört man oft <br />
als erstes “Kafka“. Und in der Tat wird Kafka immer mehr zu <br />
einem Standard für verschiedene Einsatzzwecke. Angefangen<br />
als Messaging-System macht es nun auch anderen daten‐<br />
lastigen Frameworks wie Apache Flume Konkurrenz, aber<br />
auch Streaming-Technologien.
</p>
<p>
[…] Der große Zuspruch, den Apache Kafka sowohl in der Open<br />
Source-Gemeinde als auch bei Unternehmen erfährt, liegt sicher<br />
in verschiedenen Punkten begründet:<br />
• Zum einen an der Kombination aus Vielseitigkeit und Einfachheit<br />
und<br />
• zum anderen an der Möglichkeit der horizontalen Skalierung,<br />
die den Einsatz in modernen Clustersystemen möglich macht.<br />
</p>
<h3>Warum benötigt man ein Messaging-System wie Kafka?</h3>
Nehmen wir an, wir wollen Nachrichten von System A an System B<br />
senden. Würden wir A und B direkt miteinander verbinden, z. B. indem<br />
der Nachrichtenempfänger eine REST-Schnittstelle bietet, die der Sender<br />
aufruft, werden wir in einem Produktivsystem schnell ernstzunehmende<br />
Herausforderungen bekommen:<br />
<br />
<img src="./pictures/ApacheKafka_abb1.png" height=184 width=444 title="Abb.1: System B ist nicht erreichbar. ‐ © Lukas Berle" /><br />
<ul>
<li><b>Herausforderung 1: </b> <br />
System B ist nicht erreichbar, z. B. aufgrund eines Wartungsfensters oder wegen<br />
Netzwerkproblemen. System A hat aber nicht die Kapazität, Nachrichten so lange<br />
zu puffern, bis B wieder verfügbar ist.</li>
</li>
<li><b>Herausforderung 2: </b><br />
System A könnte System B mit unzähligen Nachrichten überhäufen und System B <br />
damit in die Knie zwingen (DoS).
</li>
<li><b>Herausforderung 3: </b><br />
System B erhält eine Nachricht von System A, beginnt mit der Verarbeitung und stürzt<br />
plötzlich ab. System A hingegen sieht die versendete Nachricht als verarbeitet an,<br />
obwohl dies nicht der Fall ist.</li>
</ul>
<img src="./pictures/ApacheKafka_abb2.png" height=123 width=666 title="Abb.2: Messaging-Systeme, die zwischen Sender und Empfänger platziert werden." /><br />
<br />
Um diese Probleme zu lösen setzt man Messaging-Systeme ein, die zwischen Sender und Empfänger platziert werden. In klassischen Messaging-Systemen wird dabei differenziert, ob der Nachrichtenkanal als Queue oder als Topic implementiert wird. Queues kann man sich wie eine Warteschlange in manchen Geschäften vorstellen: Alle Personen warten in einer Schlange vor mehreren Kassen. Sobald eine Kasse dazu bereit ist, wird der nächste Kunde aus der Schlange aufgerufen (und damit aus der Queue entfernt). Durch dieses System ist sichergestellt, dass jeder Kunde nur einmal zur Kasse gebeten wird.
Im Kontext verteilter Systemen wird der Sender einer Nachricht üblicherweise als Producer bezeichnet und der Empfänger als Consumer. Folgende Abbildung verdeutlicht, dass jede der drei gesendeten Nachrichten insgesamt nur einmal gelesen wird.
<img src="./pictures/ApacheKafka_abb3.png" height=175 width=666 title="Abb.3: Jede der drei gesendeten Nachrichten wird insgesamt nur einmal gelesen. ‐ © Lukas Berle" /><br />
<br />
Das Pendant dazu ist das Topic, das nach dem Publish-Subscribe-Mechanismus funktioniert. Das entsprechende Bild wäre dazu z. B. ein analoger Fernsehsender: Jeder der an den Inhalten interessiert ist, kann zuschalten und die Inhalte konsumieren. Jede Nachricht geht also zu allen Consumern.
<img src="./pictures/ApacheKafka_abb4.png" height=181 width=666 title="Abb.4: Jeder der an den Inhalten interessiert ist, kann zuschalten und die Inhalte konsumieren. ‐ © Lukas Berle" />
<h3>Kafka im Architektur-Überblick</h3>
<p>
Apache Kafka, ursprünglich von LinkedIn entwickelt, wurde 2011 zum Apache Incubator und wird seit 2012 von der Apache Software Foundation entwickelt und gepflegt. Benannt wurde das Framework nach dem Autor Franz Kafka. Jay Kreps, der Erfinder von Apache Kafka, schätzt die Werke von Kafka sehr und entschied sich deshalb für dessen Namen [1].</p>
<p>
Was zunächst für eine neue Messaging-Technologie verwundert: Kafka weist keinerlei JMS-Konformität auf und ist vom Feature-Reichtum auch erst hinter gängigen JMS-Systemen anzusiedeln. Dafür stellt es in Sachen Datendurchsatz und Vielseitigkeit vergleichbare Systeme in den Schatten. Die Basis dafür sind seine Skalierbarkeit sowie seine Replikationsfähigkeit und damit Ausfallsicherheit. Diese Skalierbarkeit ist in Kafka so tief verankert, dass ein nicht-repliziertes Kafka-System aus technischer Sicht lediglich ein Kafka-System mit dem Replikationsfaktor "1" ist. Das ist auch der Grund, warum Kafka speziell durch den Big Data-Kontext bekannt wurde und Teil vieler gängigen Hadoop-Distributionen wurde, zum Beispiel der von Hortonworks und der von Cloudera [2].</p>
<h3>Kafka: Technische Grundlagen</h3>
Kafka enthält aktuell vier Kern-APIs:
<ul>
<li>Producer API: Erlaubt das Schreiben von Nachrichten</li>
<li>Consumer API: Erlaubt das Lesen von Nachrichten</li>
<li>Streams API: Erlaubt das Analysieren und Transformieren von Nachrichten</li>
<li>Connect API: Erlaubt die Synchronisation zweier Datensysteme, z. B. einer relationalen Datenbank und Hadoops HDFS</li>
</ul>
<img src="./pictures/ApacheKafka_abb5.png" height=277 width=666 title="Abb.5: Ein Topic besteht aus mehreren Partitionen. ‐ © Lukas Berle" /><br />
<br />
Ein Topic in Kafka bezeichnet die logische Instanz, zu der Nachrichten gesendet werden können und von welcher gelesen werden kann. Nachrichten werden als Records bezeichnet. Widmen wir uns aber zunächst den Topics: Sie sind der eigentliche Kernbestandteil von Kafka. Haben wir zum Beispiel Sensordaten von Maschinen, die wir von A nach B bringen wollen, könnten wir ein Topic sensor_data erzeugen. Unser Topic besteht dabei aus mehreren Partitionen, die konkrete Anzahl ist konfigurierbar. Eine Erläuterung über den Sinn von Partitionen erfolgt später im Text. Im einfachen Fall haben wir einen Kafka Broker auf einem Server mit drei Partitionen.
<img src="./pictures/ApacheKafka_abb6.png" height=102 width=666 title="Abb.6: Innerhalb der Partition ist eine Nachricht als Offset gekennzeichnet. ‐ © Lukas Berle" /><br />
<br />
Der Producer, hier die Maschinen, entscheiden welche Datensätze in welche Partition geschrieben werden. In einigen Anwendungsfällen kann das relevant sein, oft jedoch genügt es, die Partitionen mittels Round-Robin-Verfahren einfach gleichmßig auszulasten.
Innerhalb der Partition ist eine Nachricht als Offset gekennzeichnet. Dies ist eine aufsteigende Zahl, die jede Nachricht innerhalb einer Partition eindeutig identifiziert. In Abb.6 wurden im Topic insgesamt 20 Nachrichten gespeichert. Die nächsten Nachrichten werden nun entweder mit dem Offset "7" in Partition 1 oder 3 gespeichert oder als "6" in Partition 2.
Kafka speichert die eingehenden Nachrichten übrigens immer auf der Festplatte, Kafka ist also kein "In-Memory"-System, aber dennoch hoch performant. Da die Festplattenauslastung steigt, je länger das System läuft, müssen Nachrichten von Zeit zu Zeit auch wieder gelöscht werden. Um den Speicherbedarf kontrollierbar zu halten, bietet Kafka drei Cleanup Policies:
<ul>
<li><b>Retention-Time:</b><br />Die ältesten Daten werden frühestens nach einer frei definierbaren Zeit gelöscht.</li>
<li><b>Retention-Size:</b><br />Die ältesten Daten werden frühestens gelöscht, sobald der Speicherbedarf der Nachrichten eine definierte Größe erreicht hat.</li>
<li><b>Log-Compaction:</b><br /> Es werden nur Nachrichten gelöscht, deren Schlüssel mehrfach vorkommt und niemals die neueste Nachricht mit dem Schlüssel. </li>
</ul>
Standardmäßig wird die Retention-Time verwendet und Nachrichten werden nach sieben Tagen gelöscht.
<h3>Zusammenspiel der Komponenten in Kafka: Producer, Topic und Consumer</h3>
Um Nachrichten aus dem Topic zu lesen wird die Consumer API verwendet. Ein wichtiges Faktum ist hier, dass die Nachrichten nicht per Push-Verfahren an die Consumer geliefert werden, sondern dass die Consumer die Nachrichten aktiv beim Topic abholen. Dies ist auch bei anderen Messaging-Systemen gängige Praxis, da der Consumer auf diese Weise die Nachrichten in der Geschwindigkeit lesen kann, in der er diese auch verarbeiten kann. Consumer sind außerdem in der Lage, nicht nur die neueste, nicht gelesene Nachricht abzuholen, sondern jede Nachricht die sich noch in der Partition und damit auf der Festplatte befindet, und die noch nicht durch die Cleanup Policies entfernt wurde.
Das wichtigste Thema dabei ist die Entscheidung, wie die Nachrichten analog der anfangs definierten Differenzierung zu behandeln sind: Sollen die Nachrichten eher queue- oder eher topic-artig werden? Kafka bietet hier mit dem Konzept der Consumer Groups beide Möglichkeiten.
Jeder Consumer kann zu einer Consumer Group gehören. Dabei wird jede Nachricht im Kafka Topic von einer Consumer Group nur insgesamt einmal gelesen. Sprich: Haben zwei Consumer die gleiche Consumer Group und lesen beide aus dem gleichem Topic, lesen beide niemals die gleiche Nachricht, sondern immer verschiedene Nachrichten. In der Praxis sind diese beiden Consumer keine unterschiedlichen Programme, sondern z. B. zwei Threads eines Programmes oder ein auf einem Hadoop-Cluster deployter Job. Ein typischer Anwendungsfall wäre hier die Lambda-Architektur [3], bei der alle Daten sowohl vom Speed-Layer als auch vom Batch-Layer für die In-Memory-Verarbeitung gelesen werden.
<img src="./pictures/ApacheKafka_abb7.png" height=347 width=666 title="Abb.7: Verteilung der Nachrichten an zwei Consumer Applikationen in jeweils zwei Threads." /><br />
<br />
Abb.7 verdeutlicht die Verteilung der Nachrichten (symbolisiert durch die drei Briefumschläge) an zwei Consumer-Applikationen die in jeweils zwei Threads laufen. Dabei hat jede Applikation eine eigene Consumer Group.
Damit kommen wir nun auch zurück zu den Partitionen. Wir erinnern uns: Ein Topic besteht aus mehreren Partitionen und Producer bestimmen die Verteilung der Daten zwischen den Partitionen. Da wir nun wissen, dass es mehrere Consumer innerhalb einer Consumer Group gibt (es sei denn, man implementiert eine nicht geclusterte Single-Thread-Applikation), stellt sich die Frage, aus welchen Partitionen die Consumer lesen. Ein Consumer kann aus mehreren Partitionen lesen, eine Partition hingegen kann nur von exakt einem Consumer einer Consumer Group gelesen werden.
<img src="./pictures/ApacheKafka_abb8.png" height=216 width=666 title="Abb.8: Da wir nun aber nur drei Partitionen haben, wird Thread 4 nicht mehr bedient und erhält somit keine Daten. ‐ © Lukas Berle" /><br />
<br />
Betrachten wir das Beispiel in Abb.8. Wir haben ein Topic mit drei Partitionen und eine Applikation, die in vier Threads läuft, welche sinnvoller Weise alle die gleiche Consumer Group haben (da die Applikation andernfalls Nachrichten mehrfach aus dem Topic abholen würde). Da wir nun aber nur drei Partitionen haben, wird Thread 4 nicht mehr bedient und erhält somit keine Daten. Analog verhält sich der umgekehrte Fall: Hätten wir hier nur zwei Threads, würde ein Thread die Daten aus Partition 1 bekommen und der andere die Daten aus Partition 2 und 3. Letzterer würde also ‐ vorausgesetzt der Producer hat die Daten gleichmäßig über die Partitionen verteilt ‐ doppelt so viele Daten bekommen wie der andere. Kafka hat hierfür eine Lösung parat: Es ist möglich, zur Laufzeit die Anzahl der Partitionen eines Topics zu erhöhen.
<h3>Replikation und Skalierung mit Kafka</h3>
Eingangs wurde erwähnt, dass Replikation und Skalierung die Kernkonzepte von Kafka sind ‐ und doch wurden beide bis jetzt noch nicht erwähnt. Der Grund: Um diese zu verstehen ist es wichtig, erst die bisher genannten Grundkonzepte verinnerlicht zu haben. Die Konstellation der letzten Abbildung mit den drei Partitionen und vier Threads soll nun skaliert werden. Wir wollen dafür nicht mehr nur einen Kafka Broker verwenden, sondern zwei. Wir setzen darüber hinaus den Replication Factor auf "2", was dafür sorgt, dass jede vorhandene Nachricht über exakt zwei Broker verteilt ist. Das Ergebnis dieser Skalierung Abb.9.
<img src="./pictures/ApacheKafka_abb9.png" height=369 width=666 title="Abb.9: Konstellation mit zwei Kafka Brokern und Replication Factor auf “2“. ‐ © Lukas Berle" /><br />
<br />
Durch den Replication Factor wird dafür gesorgt, dass die Partitionen redundant, also in diesem Fall jeweils auf beiden Brokern gespeichert werden. In den vorherigen Grafiken war außerdem jede Partition immer automatisch der "Leader". Durch die Replikation gibt es jetzt auch "Follower". Für Partition 1 ist das Broker 1 und für Partition 2 und 3 Broker 2. Sämtliche Lese- und Schreibvorgänge werden ausschließlich mit dem Leader gemacht. Will also der Producer Daten in Partition 2 schreiben, schreibt er das in die Partition 2 im Broker 2 und in keinem Fall in Broker 1. Die einzige Verantwortlichkeit der Follower liegt in der Replikation der Daten vom jeweiligen Leader. Fällt Broker 1 aus, würde Kafka feststellen, dass es keinen Leader mehr für Partition 1 gibt und würde daraufhin einen neuen Leader bestimmen ‐ in diesem Fall bleibt nur die Möglichkeit, Broker 2 für Partition 1 als Leader zu bestimmen. Jetzt gibt es verschiedene Ausfallszenarien und Synchronisationsprobleme, die potenziell eintreten, in diesem Artikel allerdings nicht weiter ausgeführt werden können. Zum Beispiel könnte es passieren, dass der Producer Daten in Partition 1 schreibt und ‐ bevor die Replikation durchgeführt wird ‐ abstürzt und nicht mehr erreichbar ist. Dann wäre die gesendete Nachricht verloren. Für dieses Risiko ist der Producer verantwortlich. Per Konfiguration kann diesem mitgeteilt werden, ab wann eine Nachricht als erfolgreich gesendet angesehen werden soll. Für diesen Fall greifen drei Optionen:
<ul>
<li>Ab sofort, unabhängig ob der Kafka Broker überhaupt erreicht wurde.</li>
<li>Sobald die Nachricht beim ersten Broker angekommen ist.</li>
<li>Sobald die Nachricht entsprechend dem eingestelltem Replication Factor repliziert wurde. </li>
</ul>
Durch die letzte Einstellung würde der Producer die Nachricht so lange als "nicht erfolgreich gesendet" ansehen, bis die gewünschte Redundanz im Kafka Cluster vorhanden ist.
<h3>War es das schon?</h3>
Nein! Auch wenn Kafka oft als ein "einfaches" System angesehen wird, gibt es noch viele weitere Herausforderungen, denen es begegnen muss. Betrachtet man die Dokumentation von Kafka [4], fallen schnell weit über 100 Properties auf, die man konfigurieren kann, um verschiedene Themen wie Security und Skalierung feingranularer zu steuern. Der Fokus dieses Beitrags liegt auf den Grundkonzepten von Kafka sowie auf Producer und Consumer. Die beiden anderen APIs, die Streams API und die Connector API, basieren auf dem gleichen Grundkonzept: dem Topic. Nur werden dort keine Producer und Consumer mehr verwendet.
Kafka hat seit seinem Open Source-Start im Jahr 2011 eine enorme Verbreitung in modernen, datenlastigen IT-Systemen erreicht und wird diese aller Wahrscheinlichkeit nach weiter ausbauen. Die Kafka Connector API wird bisherigen Standards wie Apache Flume weiterhin ernstzunehmende Konkurrenz machen und diese möglicherweise vom Markt verdrängen. Mit der Streams API drängt Kafka nun auch immer stärker in das Thema Stream Processing und macht damit Technologien wie Storm und Spark Streaming ganz erhebliche Konkurrenz.
Ein Team um Jay Kreps hat das Unternehmen Confluent [5] gegründet, das eine ganze Streaming-Plattform um Kafka entwickelt hat, bei der mit Hilfe der SQL-Engine KSQL Streaming-Daten in SQL-Syntax analysiert werden, ohne eigenen Programmcode in Java oder Python schreiben zu müssen. Betrachtet man außerdem die hochaktive Open Source-Community von Kafka auf Github [6], kann die Wahrscheinlichkeit als hoch angesehen werden, dass Kafka in einigen Jahren zu einem De-facto-Standard für datengetriebene Systeme wird.
<h3>Quellen</h3>
<ul>
<li> Wikipedia: Franz Kafka</li>
<li> Quota: What is the relation between Kafka, the writer, and Apache Kafka, the distributed messaging system?</li>
<li> Hortonworks und Cloudera</li>
<li> Lambda-Architektur</li>
<li> Dokumentation von Kafka</li>
<li> Confluent</li>
<li> Open Source-Community von Kafka auf Github</li>
</ul>
<h3>Link:</h3>
<ul>
<li><a href="https://www.informatik-aktuell.de/betrieb/verfuegbarkeit/apache-kafka-eine-schluesselplattform-fuer-hochskalierbare-systeme.html" target=_blank>Informatik Aktuell - Newsletter :: Kafka - eine Schluesselplattform für hochskalierbare Systeme</a></li>
<li><a href="https://de.wikipedia.org/wiki/Apache_Kafka" target=_blank>Wikipedia :: Apache Kafka</a></li>
<li>Kafka :: The definitive guide <em>(downloaded)</em></li>
<li><a href="https://www.ionos.de/digitalguide/server/konfiguration/apache-kafka-tutorial/" target="_blank"
rel="noreferrer noopener">Ionos :: Apacke Kafka ‐ Tutorial</a></li>
<!--
<li></li>
-->
</ul>
<br />
<br />
<br />
<br />
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://kairos.io/docs/reference/configuration/"
target="_blank" rel="noreferrer noopener">
Kairos :: Configuration</a>
</li>
<li><a href="https://kairos.io/blog/2023/03/22/understanding-immutable-linux-os-benefits-architecture-and-challenges/"
target="_blank" rel="noreferrer noopener">
Kairos :: Understanding Immutable Linux OS: Benefits, Architecture, and Challenges</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<h3>Öffentlicher Nahverkehr:</h3>
<li>nur Busverkehr, keine U- oder Strassenbahnen;</li>
<li>zentraler Busbhf: Haltestelle 'Stadtmitte'</li>
<li>Infopunkt: an der Haltestelle 'Stadtmitte'</li>
<li>Wochenkarte: ca. 20 Euro</li>
<h3>Gastronomie:</h3>
<li>Einkaufsmeile 'K in Lautern'
<ul>
<li>in der Nähe der Haltestelle 'Stadtmitte'</li>
<li><a href="www.k-in-lautern.de" target=_blank>Homepage</a></li>
</ul></li>
</ul>
</html>
<html>
<ul>
<li>Spracherkennungssystem</li>
<li>wird in “Alexa“ (Amazon) und anderen Spracherkennungssystemen verwendet</li>
</ul>
</html>
<html>
Ever get into one of those pesky admin wars<br>
or need to keep the developers off of your<br>
system for a few minutes without taking the system<br>
to single user mode?<br>
<br>
This nasty little script will do the trick.<br>
<br>
[root@foo /]# while true<br>
> do<br>
> kill -9 $(ps -aux |grep username | awk '{ print $2 }' )<br>
> sleep 2<br>
> done<br>
<br>
This can make you the life of the party (At work)<br>
<br>
Don Cooley<br>
Unix Systems/Security Admin<br>
Wellogix Inc.<br>
dcooley@wellogix.com<br>
<br>
This tip generously supported <br>
by: dcooley@wellogix.com<br>
</html>
<html>
There is a way to disable any new login attempts into a<br />
system. This can be achieved by simply creating a file<br />
called <code>/etc/nologin</code>.<br />
<br />
It can have a null file size or a message can be<br />
placed into the file informing the status of the<br />
system. If a user attempts to login remotely, a<br />
message will display with contents of the<br />
/etc/nologin file, and then disconnect the user.<br />
<br />
However, ftp connections are not affected by this, if<br />
ftpd is running.<br />
</html>
<html>
Here is a script that will keep daemons running<br>
if they decide to die for some unforseen reason.<br>
<br>
This tip generously supported by: ken@theglobeandmail.com<br>
<br>
<code>
-------------------- cut here -----------------<br>
#!/bin/csh<br>
#<br>
# NAME<br>
# keepitup.csh - Keep demons up and running<br>
#<br>
# SYNOPSIS<br>
# keepitup.csh<br>
#<br>
# DESCRIPTION<br>
# If any of the following processes are down, then start them up<br>
# again. This script can be run every few minutes from a crontab.<br>
#<br>
# AUTHOR<br>
# Ken Stevens <kstevens@globeandmail.ca><br>
<br>
foreach daemon ( \<br>
/opt/GIS/apps/EventDispatcher/scripts/EventDispatcher.pl \<br>
/opt/GIS/apps/CatchFTP/scripts/ProcessFTP.pl \<br>
/opt/GIS/apps/NewsHound/scripts/NewsHound.pl \<br>
)<br>
<br>
ps -e | fgrep `echo $daemon:t | cut -c1-8` > /dev/null<br>
<br>
if ( $status > 0 ) then<br>
echo Restarting $daemon<br>
date<br>
$daemon &<br>
endif<br>
<br>
end<br>
-------------------- cut here -----------------<br>
</code>
<br>
</html>
<html>
<ul>
<li>benannt nach Auguste Kerckhoff</li>
<li>Es besagt, daß die Sicherheit eines Systems <b>nicht</b> von der <br />
Geheimhaltung der Algorithmen abhängen darf, sondern <u>nur</u> <br />
von der Geheimhaltung eines Schlüssels.
</li>
<li>Die Grundsätze sind:
<ol>
<li>Das System muss im Wesentlichen (…) unentzifferbar sein.</li>
<li>Das System darf keine Geheimhaltung erfordern (…).</li>
<li>Es muss leicht übermittelbar sein und man muss sich die Schlüssel ohne schriftliche Aufzeichnung merken können (…).</li>
<li>Das System sollte mit telegraphischer Kommunikation kompatibel sein.</li>
<li>Das System muss transportabel sein und die Bedienung darf nicht mehr als eine Person erfordern.</li>
<li>Das System muss einfach anwendbar sein (…).</li>
</ol></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Kerckhoffs%E2%80%99_Prinzip" target=_blank>Wikipedia</a></li>
<li><a href="https://kryptografie.de/kryptografie/kerckhoffs-prinzip.htm" target=_blank>kryptografie.de</li>
</ul>
</html>
<html>
Quick way to close your X login session (for SysV)<br>
<br><code>
for PID in `ps -u$USER | grep "fv[wm]" | awk '{print $1}'`; do kill -9 $PID; done<br>
</code>
<br>
Or throw it into a shell script:<br>
<br><code>
--- cut here ---<br>
#!/bin/sh<br>
<br>
for PID in `ps -u$USER | grep "fv[wm]" | awk '{print $1}'` ; do<br>
kill -9 -$PID<br>
done<br>
--- cut here ---<br>
</code><br>
(the [] conceal the grep from ps, which would mean it would<br>
kill itself before doing anything useful. as written up,<br>
it looks for fvwm's process, which is the window manager I<br>
use; rewrite it as needed i.e. for Motif - mwm,<br>
Open Look - olwm, etc.)<br>
<br>
Write this up in a shell script contained in your $PATH<br>
or alias it and you're cooking with gas.<br>
<br>
This tip generously supported <br>
by: klaus@imprint.uwaterloo.ca<br>
</html>
<html>
<b>DISCLAIMER:</b> UGU is not telling you to kill your users.<br />
If you so choose to it is at your own discretion and you<br />
are doing it at your own risk.<br />
<br />
Although we all have that ONE USER...<br />
<br />
To kill all the processes associated with a particular user<br />
simply:<br />
<br /><code>
# kill -9 `ps -aef | grep jondoe | awk '{ print $2 }'`<br />
</code><br />
If you want to be a nice admin, tell him first.<br />
<br />
</html>
<html>
The common method for killing all of a users processes<br />
usually involves grepping the users name from 'ps', then<br />
using awk to get the process id's and submitting them<br />
to 'kill -9'.<br />
<br />
<b>Sys V</b><br />
ex: <code>kill -9 $(ps -f username | awk '{ print $2 }' )</code><br />
<br />
<b>BSDish</b><br />
ex: <code>kill -9 $(ps -aux |grep username | awk '{ print $2 }' )</code><br />
<br />
The problems with doing this way are that it is slow, and<br />
more importantly, it doesn't always kill all of the processes<br />
on the first try.<br />
<br />
There is a way to do this that always kills all of the users<br />
processes the first time, and is very fast:<br />
<br /><code>
su - username -c 'kill -9 -1'<br />
</code><br />
This tip generously supported <br />
by: jkstill@teleport.com<br />
</html>
<html>
Kivy - Open source Python library for rapid development of applications<br />
that make use of innovative user interfaces, such as multi-touch apps.
<h3>Usage example</h3>
See how easy it is to create a simple “Hello World“<br />
application that shows an actionable button:
<code><pre>
from kivy.app import App
from kivy.uix.button import Button
class TestApp(App):
def build(self):
return Button(text='Hello World')
TestApp().run()
</pre></code>
<h3>Resultat:</h3>
<img src="./pictures/Python_Kivy_HelloWorld.jpg"width=240 height=260 />
<h3>Links:</h3>
<a href="https://kivy.org/#home" target=_blank>Kivy :: Homepage</a>
</html>
<html>
<ul>
<li> the “<b>Konstanz Information Miner</b>“</li>
<li>is a free and open-source data analytics, reporting and integration platform</li>
<!--li></li>
<li></li>
<li></li>
<li></li-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://en.wikipedia.org/wiki/KNIME" target=_blank>Wikipedia (engl.)</a></li>
<li><a href="https://www.coursera.org/lecture/big-data-machine-learning/crisp-dm-icJH6" target=_blank>Coursera :: CRISP-DM</a></li>
<li><a href="" target=_blank></a></li>
<ul>
</html>
<html>
<table border line = 1>
<tr><td>*</td><td>Alle Knoten vom typ der Achse. <br />
Der Achsentyp ist immer Element außer bei attribute und namespace.</td></tr>
<tr><td>namespace:*</td><td>Alle Knoten im Namespace namespace</td></tr>
<tr><td>namespace:typ</td><td>Alle Knoten mit Namen namespace:typ</td></tr>
<tr><td>typ</td><td>Alle Knoten mit Namen typ und NULL-Namespace</td></tr>
<tr><td>text()</td><td>Alle Textknoten</td></tr>
<tr><td>comment()</td><td>Alle Kommentarknoten</td></tr>
<tr><td>processing-instruction()</td><td>Alle Processing-Instruction-Knoten</td></tr>
<tr><td>processing-instruction(name)</td><td>Alle Processing-Instruction-Knoten mit Expanded-Name name</td></tr>
<tr><td>node()</td><td>Alle Knoten</td></tr>
</table>
(Link:<br />
http://www.fh-wedel.de/~si/seminare/ws00/Ausarbeitung/3.xlink/xlink5.htm)<br />
</html>
<html>
<ul>
<li><b>A.E.I.O.U.</b> :=: „Amor Electis Iniustis Ordinor Ultor“
</li>
<li>zu Deutsch in etwa: „Geliebt von den Erwählten, gefürchtet von den Ungerechten“
</li>
<li>Herrschaftsdevise von <b><em>Kaiser Friedrich III.</em></b>,<br />
<ul>
<li>1415 ‐ 1493
</li>
<li>war der römisch‐deutsche König mit der längsten Regierungszeit (1440 ‐ 1493)
</li>
<li>und der letzte in Rom gekrönte Kaiser des Heiligen Römischen Reiches.
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://steiermark.orf.at/stories/3200851/"
target="_blank" rel="noreferrer noopener">
Steiermark @ Orf.at :: Geschichte ‐ Jahrhundertealtes A.E.I.O.U.‐Rätsel gelöst </a>
</li>
</ul>
</html>
<html>
<table>
<tr><td>AES</td><td><b>“Advanced Encryption Standard“</b></td></tr>
<tr><td>DES</td><td><b>“Data Encryption Standard“</b></td></tr>
<tr><td>MAC</td><td><b>“Message Authentication Code“</b></td></tr>
<tr><td>IDEA</td><td><b>“International Data Encryption Algorithm“</b></td></tr>
<tr><td>RSA</td><td><b>“Rivest, Shamir, Adleman“</b></td></tr>
<tr><td>SHA</td><td><b>“Secure Hash Algorithm“</b></td></tr>
<tr><td></td><td></td></tr>
</table>
</html>
<html>
<ul>
<li>Wenn eine kleine Änderung der Nachricht (z.B. ein Buchstabe ändert sich, <br />
statt “F“ wird ein “G“ verschlüsselt) einen komplett anderen Hash erzeugt.</li>
<li>Das ist die Eigenschaft eines Algorithmus, bei einer minimalen Änderung<br />
der Eingabe eine völlig andere Ausgabe zu erzeugen.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Lawineneffekt_(Kryptographie)" target="_blank" rel="noreferrer noopener">
Wikipedia</a></li>
</ul>
</html>
<html>
Beispiele für <b>symmetrische Verschlüselungsverfahren</b> sind:
<ul>
<li><b>DES</b> (Data Encryption Standard)</l>
<li><b>Triple-DES</b> (auch als TDES, 3DES oder DESede bezeichnet)</l>
<li><b>AES</b> (Advanced Encryption Standard)</l>
<li><b>IDEA</b> (International Data Encryption Algorithm)</l>
<li><b>Blowfish</b></l>
<li><b>Twofish</b></l>
<li><b>CAST-128</b>, <b>CAST-256</b></l>
<li><b>RC2, RC4</b>, <b>RC5, RC6</b></l>
<li><b>Fox</b></l>
</ul>
<h3>Link:</h3>
<a href="http://www.kryptowissen.de/symmetrische-verschluesselung.html" target=_blank>KryptoWissen :: Symmetrische Verschlüsselung</a>
</html>
<html>
<ul>
<li>von Google entwickelt (⇒ GIFEE, Google Infrastructure for everybody else);</li>
<li>Open Source Plattform; Kürzel: <b>K8s</b><br />
Orchestrierungstool für Container (z.B. Docker) (“Containerisierung“);<br />
⇒ automatisches Deployment von Containern</li>
<li><em>Orchestrierung</em> bedeutet in diesem Sinne, dass die Container nicht <br />
nur gestartet und gestoppt werden, sondern auch ihre Zusammen‐<br />
arbeit organisiert werden muss.</li>
<li>drei‐monatlicher Release‐Zyklus</li>
<li>enabling applications to be released and updated<br />
in an easy and fast way without downtime;</li>
<li>ist ein Beispiel für PaaS, “Platform as a Service“</li><br />
<li><ol><li><b>Katacoda: </b><br />
to run a virtual terminal in the web browser</li><br />
<li><b>Minikube: </b><br />
a small-scale local deployment of Kubernetes;<br />runs anywhere;<br />
Aufsetzen lokaler K8s-Cluster;<br />
startet eine virtuelle Maschine (VM);<br />
es laufen die notwendigen Kubernetes-Komponenten</li></ol></li>
<li><h4>Kubernetes Basics Modules:</h4>
<ol>
<li><h5>Create a Kubernetes Cluster</h5></li>
<li>Deploy an app</li>
<li>Explore your app</li>
<li>Expose your app publicly</li>
<li>Scale up your app</li>
<li>Update your app</li>
</ol>(<a href="https://kubernetes.io/docs/tutorials/kubernetes-basics/" target=_blank>Kubernetes :: Tutorial - Kubernetes Basics </a>)</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://training.linuxfoundation.org/certification/certified-kubernetes-administrator-cka/" target="_blank"
rel="noreferrer noopener">Linux Foundation :: Certified Kubernetes Admin</a></li>
<li><a href="https://azure.microsoft.com/de-de/topic/kubernetes-vs-docker/" target="_blank" rel="noreferrer noopener">Microsoft :: </a></li>
<li><a href="https://geekflare.com/de/docker-vs-kubernetes/" target="_blank" rel="noreferrer noopener">GeekFlare :: </a></li>
<li><a href="https://entwickler.de/kubernetes/container-orchestrierung-was-ist-kubernetes-und-wie-verhalt-es-sich-zu-docker/" target="_blank" rel="noreferrer noopener">Entwickler.de :: </a></li>
<li><a href="https://ichi.pro/de/warum-sie-kubernetes-und-docker-zusammen-verwenden-sollten-86052911656486" target="_blank" rel="noreferrer noopener">Ichi.pro :: </a></li>
<li><a href="https://www.ionos.de/digitalguide/server/knowhow/kubernetes-vs-docker/" target="_blank" rel="noreferrer noopener">Ionos :: Kubernetes vs. Docker</a></li>
<li><a href="https://www.computerwoche.de/a/so-gestalten-sie-die-container-entwicklung-sicher,3546920" target="_blank"
rel="noreferrer noopener">ComputerWoche :: </a></li>
<li><a href="https://computerwelt.at/news/ex-container-schwergewicht-der-niedergang-von-docker/" target="_blank" rel="noreferrer noopener">ComputerWelt :: </a></li>
<li><a href="https://www.informatik-aktuell.de/entwicklung/methoden/kubernetes-architektur-und-einsatz-einfuehrung-mit-beispielen.html"target="_blank" rel="noreferrer noopener">Informatik aktuell :: Kubernetes ‐ Architektur & Einsatz</a></li>
<li><a href="https://www.ionos.de/digitalguide/server/konfiguration/kubernetes-tutorial/" target="_blank"
rel="noreferrer noopener">Ionos :: Kubernetes ‐ Tutorial</a></li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://www.howtoforge.de/anleitung/rollenbasierte-zugriffskontrolle-rbac-in-kubernetes/" target="_blank">HowToForge :: Rollenbasierte Zugriffskontrolle (RBAC) in Kubernetes</a></li>
</ul>
</html>
<html>
<ul>
<li>Sometimes you might get in a situation where you need to<br />
restart your Pod. For example, if your Pod is in error state.<br />
<br />
Depending on the restart policy, Kubernetes itself tries to restart<br />
and fix it.<br />
<br />
But if that doesn't work out and if you can't find the source of<br />
the error, restarting the Kubernetes Pod manually is the fastest<br />
way to get your app working again.</li>
<br />
<li><b><u>Methode 1:</u></b> Rollout Pod restarts<br />
<br />
Starting from Kubernetes version 1.15, you can perform a rolling restart<br />
of your deployments.<br />
<br />
The controller kills one pod at a time and relies on the ReplicaSet to scale<br />
up new Pods until all the Pods are newer than the restarted time. In my<br />
opinion, this is the best way to restart your pods as your application will<br />
not go down.<br />
<br />
Note: Individual pod IPs will be changed.<br />
<br />
Let's take an example. You have a deployment named my-dep which con–<br />
sists of two pods (as replica is set to two).
<code><pre>
root@kmaster-rj:~# kubectl get deployments
NAME READY UP-TO-DATE AVAILABLE AGE
my-dep 2/2 2 2 13s
</pre></code>
Let's get the pod details:
<code><pre>
root@kmaster-rj:~# kubectl get pod -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
my-dep-6d9f78d6c4-8j5fq 1/1 Running 0 47s 172.16.213.255 kworker-rj2 <none> <none>
my-dep-6d9f78d6c4-rkhrz 1/1 Running 0 47s 172.16.213.35 kworker-rj1 <none> <none>
</pre></code>
Now let's rollout the restart for the my-dep deployment with a command<br />
like this:
<code><pre>
kubectl rollout restart deployment name_of_deployment
</pre></code>
Do you remember the name of deployment from the previous commands?<br />
Use it here:
<code><pre>
root@kmaster-rj:~# kubectl rollout restart deployment my-dep
deployment.apps/my-dep restarted
</pre></code>
You can watch the process of old pods getting terminated and new ones<br />
getting created using the command:
<code><pre>
root@kmaster-rj:~# kubectl get pod -w
NAME READY STATUS RESTARTS AGE
my-dep-557548758d-kz6r7 1/1 Running 0 5s
my-dep-557548758d-svg7w 0/1 ContainerCreating 0 1s
my-dep-6d9f78d6c4-8j5fq 1/1 Running 0 69s
my-dep-6d9f78d6c4-rkhrz 1/1 Terminating 0 69s
my-dep-6d9f78d6c4-rkhrz 0/1 Terminating 0 69s
my-dep-557548758d-svg7w 0/1 ContainerCreating 0 1s
my-dep-557548758d-svg7w 1/1 Running 0 3s
my-dep-6d9f78d6c4-8j5fq 1/1 Terminating 0 71s
my-dep-6d9f78d6c4-8j5fq 0/1 Terminating 0 72s
my-dep-6d9f78d6c4-rkhrz 0/1 Terminating 0 74s
my-dep-6d9f78d6c4-rkhrz 0/1 Terminating 0 74s
my-dep-6d9f78d6c4-8j5fq 0/1 Terminating 0 76s
my-dep-6d9f78d6c4-8j5fq 0/1 Terminating 0 76s
</pre></code>
If you check the Pods now, you can see the details have changed here:
<code><pre>
root@kmaster-rj:~# kubectl get pod -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
my-dep-557548758d-kz6r7 1/1 Running 0 42s 172.16.213.43 kworker-rj1 <none> <none>
my-dep-557548758d-svg7w 1/1 Running 0 38s 172.16.213.251 kworker-rj2 <none> <none>
</pre></code>
</li>
<br />
<li><b><u>Methode 2:</u></b> Scaling the number of replicas<br />
<br />
In a CI/CD environment, process for rebooting your pods when there<br />
is an error could take a long time since it has to go through the entire<br />
build process again.<br />
<br />
A faster way to achieve this is use the kubectl scale command to<br />
change the replica number to zero and once you set a number <br />
higher than zero, Kubernetes creates new replicas.<br />
<br />
Let's try it. Check your Pods first:<br />
<code><pre>
root@kmaster-rj:~# kubectl get pod
NAME READY STATUS RESTARTS AGE
my-dep-557548758d-kz6r7 1/1 Running 0 11m
my-dep-557548758d-svg7w 1/1 Running 0 11m
</pre></code>
Get the deployment information:
<code><pre>
root@kmaster-rj:~# kubectl get deployments
NAME READY UP-TO-DATE AVAILABLE AGE
my-dep 2/2 2 2 12m
</pre></code>
Now, set the replica number to zero:
<code><pre>
root@kmaster-rj:~# kubectl scale deployment --replicas=0 my-dep
deployment.apps/my-dep scaled
</pre></code>
And then set it back to two:
<code><pre>
root@kmaster-rj:~# kubectscale deployment --replicas=2 my-dep
deployment.apps/my-dep scaled
</pre></code>
Check the pods now:
<code><pre>
root@kmaster-rj:~# kubectl get pod
NAME READY STATUS RESTARTS AGE
my-dep-557548758d-d2pmd 1/1 Running 0 10s
my-dep-557548758d-gprnr 1/1 Running 0 10s
</pre></code>
You have successfully restarted Kubernetes Pods.<br />
<br />
Use any of the above methods to quickly and safely get your<br />
app working without impacting the end-users.<br />
<br />
After doing this exercise you please make sure to find the<br />
core problem and fix it as restarting your pod will not fix <br />
the underlying issue.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://linuxhandbook.com/restart-pod-kubernetes/" target="_blank" rel="noreferrer noopener">
LinuxHandbook :: Restart Pods in Kubernetes</a></li>
</ul>
</html>
<html>
<ul>
<li>kubectl controls the Kubernetes cluster manager.</li>
<br />
<li>Find more information at: <a href="https://kubernetes.io/docs/reference/kubectl/overview/" target="_blank" rel="noreferrer noopener">kubectl - docs</a></li>
<br />
<li>Usage:
<code><pre>
kubectl [flags] [options]
</pre></code></li>
<li>
<h3>Basic Commands (Beginner):</h3>
<table>
<tr><td>create</td><td>Create a resource from a file or from stdin.</td></tr>
<tr><td>expose</td><td>Nehme einen Replication Controller, Service, Deployment oder Pod und biete ihn als neuen Kubernetes-Service an</td></tr>
<tr><td>run</td><td>Starte ein bestimmtes Image auf dem Cluster</td></tr>
<tr><td>set</td><td>Setze bestimmte Features auf Objekten</td></tr>
</table>
<h3>Basic Commands (Intermediate):</h3>
<table>
<tr><td>explain</td><td>Dokumentation einer Resource</td></tr>
<tr><td>get</td><td>Zeige eine oder mehrere Resourcen</td></tr>
<tr><td>edit</td><td>Bearbeite eine Resource auf dem Server</td></tr>
<tr><td>delete</td><td>Lösche Resourcen von einer Datei, stdin, resources‐ und names‐ oder mit resources‐ und label‐Selektor</td></tr>
</table>
<h3>Deploy Commands:</h3>
<table>
<tr><td>rollout</td><td>Manage the rollout of a resource</td></tr>
<tr><td>scale</td><td>Set a new size for a Deployment, ReplicaSet or Replication Controller</td></tr>
<tr><td>autoscale</td><td>Auto‐skaliere ein Deployment, ReplicaSet oder ReplicationController</td></tr>
</table>
<h3>Cluster Management Commands:</h3>
<table>
<tr><td>certificate</td><td>Verändere Certificate‐Resources</td></tr>
<tr><td>cluster‐info</td><td>Zeige Cluster‐Info</td></tr>
<tr><td>top</td><td>Display Resource (CPU/Memory/Storage) usage</td></tr>
<tr><td>cordon</td><td>Markiere Knoten als unschedulable</td></tr>
<tr><td>uncordon</td><td>Markiere Knoten als schedulable</td></tr>
<tr><td>drain</td><td>Leere Knoten, um eine Wartung vorzubereiten</td></tr>
<tr><td>taint</td><td>Aktualisiere die Taints auf einem oder mehreren Knoten</td></tr>
</table>
<h3>Troubleshooting and Debugging Commands:</h3>
<table>
<tr><td>describe</td><td>Zeige Details zu einer bestimmten Resource oder Gruppe von Resourcen</td></tr>
<tr><td>logs</td><td>Schreibt die Logs für einen Container in einem Pod</td></tr>
<tr><td>attach</td><td>Weise einem laufenden Container zu</td></tr>
<tr><td>exec</td><td>Führe einen Befehl im Container aus</td></tr>
<tr><td>port‐forward</td><td>Leite einen oder mehrere lokale Ports an einen Pod weiter</td></tr>
<tr><td>proxy</td><td>Starte einen Proxy zum Kubernetes‐API‐Server</td></tr>
<tr><td>cp</td><td>Kopiere Dateien und Ordner aus/in Container(n)</td></tr>
<tr><td>auth</td><td>Inspect authorization</td></tr>
<tr><td>debug</td><td>Create debugging sessions for troubleshooting workloads and nodes</td></tr>
</table>
<h3>Advanced Commands:</h3>
<table>
<tr><td>diff</td><td>Diff live version against would-be applied version</td></tr>
<tr><td>apply</td><td>Wende eine Konfiguration auf eine Resource über den Dateinamen oder stdin an</td></tr>
<tr><td>patch</td><td>Update field(s) of a resource</td></tr>
<tr><td>replace</td><td>Ersetze eine Resource von einem Dateinamen oder stdin</td></tr>
<tr><td>wait</td><td>Experimental: Wait for a specific condition on one or many resources.</td></tr>
<tr><td>kustomize</td><td>Build a kustomization target from a directory or a remote url.</td></tr>
</table>
<h3>Settings Commands:</h3>
<table>
<tr><td>label</td><td>Aktualisiere die Labels auf einer Resource</td></tr>
<tr><td>annotate</td><td>Aktualisiere die Annotationen auf einer Resource</td></tr>
<tr><td>completion</td><td>Zeige Shell-Completion-Code für die angegebene Shell (bash oder zsh)</td></tr>
</table>
<h3>Other Commands:</h3>
<table>
<tr><td>api‐resources</td><td>Print the supported API resources on the server</td></tr>
<tr><td>api‐versions </td><td>Print the supported API versions on the server, in the form of “group/version“</td></tr>
<tr><td>config</td><td>Verändere kubeconfig Dateien</td></tr>
<tr><td>plugin</td><td>Provides utilities for interacting with plugins.</td></tr>
<tr><td>version</td><td>Schreibt die Client‐ und Server‐Versionsinformation</td></tr>
</table>
</li>
<br />
<li>Use “kubectl <command> ‐‐help“ for more information about a given command.</li>
<br />
<li>Use “kubectl options“ for a list of global command-line options (applies to all commands).</li>
</ul>
</html>
<html>
<ul>
<li>YAML‐Editor, in Go geschrieben;</li>
<li>mittlerweile Bestandteil von kubectl, mit der Option ‐k aufrufbar;</li>
<li>habe ich wie folgt bei mir installiert:
<code><pre>
curl ‐s “https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh“ | bash
</pre></code>
⇒ Ausgabe:
<code><pre>
{Version:kustomize/v4.4.1 GitCommit:b2d65ddc98e09187a8e38adc27c30bab078c1dbf BuildDate:2021-11-11T23:36:27Z GoOs:linux GoArch:amd64}
kustomize installed to /home/mueller/kustomize
mueller@Debian-Laptop:~$
</pre></code></li>
<li>Help‐Page:
<code><pre>
Manages declarative configuration of Kubernetes.
See https://sigs.k8s.io/kustomize
Usage:
kustomize [command]
Available Commands:
build Build a kustomization target from a directory or URL.
cfg Commands for reading and writing configuration.
completion Generate shell completion script
create Create a new kustomization in the current directory
edit Edits a kustomization file
fn Commands for running functions against configuration.
help Help about any command
version Prints the kustomize version
Flags:
-h, --help help for kustomize
--stack-trace print a stack-trace on error
Additional help topics:
kustomize docs-fn [Alpha] Documentation for developing and invoking Configuration Functions.
kustomize docs-fn-spec [Alpha] Documentation for Configuration Functions Specification.
kustomize docs-io-annotations [Alpha] Documentation for annotations used by io.
kustomize docs-merge [Alpha] Documentation for merging Resources (2-way merge).
kustomize docs-merge3 [Alpha] Documentation for merging Resources (3-way merge).
kustomize tutorials-command-basics [Alpha] Tutorials for using basic config commands.
kustomize tutorials-function-basics [Alpha] Tutorials for using functions.
Use "kustomize [command] --help" for more information about a command.
</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://kubectl.docs.kubernetes.io/installation/kustomize/" target="_blank" rel="noreferrer noopener">
YAML‐Editor kustomize</a></li>
</ul>
</html>
<html>
<ul>
<li><b>ldapsearch</b><br /></li>
</ul>
</html>
<html>
389 Directory Server is a super fast open source enterprise LDAP Server.
In this tutorial, we'll explain how to install and configure the LDAP client on Linux which will talk to your 389 directory server.
<h3>Install EPEL</h3>
On your client machine, make sure you have EPEL repository setup, as we'll be downloading the ldap related packages from EPEL.
First, download the latest EPEL package from fedora project website:
<code>
# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-10.noarch.rpm
</code>
Next, install the EPEL rpm on your client machine.
<code>
# rpm -ivh epel-release-7-10.noarch.rpm
</code>
<h3>Verify /etc/hosts</h3>
Make sure your hosts file is setup properly.
In this example, the following is the current /etc/hosts file setup. In this example, we have the 389 directory server installed on deploy
# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.101.10 deploy.thegeekstuff.com deploy
If you are new to 389 directory server, refer to our previous tutorial where we explained in detail about how to install LDAP 389 Directory Server On Linux.
<h3>Install the LDAP Client libraries</h3>
For the LDAP client libraries, we need to install the following packages:
<ul>
<li> openldap ‐ This contains LDAP support libraries</li>
<li> openldap-devel.x86_64 ‐ This contains LDAP development libraries and header files</li>
<li> nss-pam-ldapd ‐ This is the nsswitch module which uses directory servers</li>
</ul>
Install the above packages using yum as shown below:
# yum install nss-pam-ldapd.x86_64 openldap.x86_64 openldap-devel.x86_64
Apart from installing the above three packages, depending on your current system configuration, yum might also install the following dependent packages:
<ul>
<li> cyrus-sasl</li>
<li> cyrus-sasl-devel</li>
<li> nscd</li>
</ul>
<h3>Configure LDAP Client Authentication Resources</h3>
To configure the LDAP client authentication resources, we can use any one of the following tools:
<ul>
<li>authconfig ‐ The command line tool to configure authentication resources</li>
<li>authconfig-tui ‐ An GUI based tool to configure the auth resources</li>
</ul>
To launch the GUI version, execute the following command:
# authconfig-tui
This will bring-up the following user interface:
Use the arrow keys and select “Use LDAP Authentication“ check-box as shown below. To select a check-box, press the space bar.
In the next screen, set your LDAP server and base DN accordingly. These values should correspond to your installation of 389 directory server. Please refer to our 389 directory server installation tutorial for more details on this.
<h3>Start Name Services related Services for LDAP Client</h3>
First make sure nslcd Naming Services LDAP client daemon is up and running. If this is not up, start it accordingly.
<code>
# systemctl start nslcd<br />
<br />
# systemctl status nslcd<br />
? nslcd.service - Naming services LDAP client daemon.<br />
Loaded: loaded (/usr/lib/systemd/system/nslcd.service; enabled; vendor preset: disabled)<br />
Active: active (running) since Sun 2017-10-08 15:15:58 UTC; 7min ago<br />
Process: 2624 ExecStart=/usr/sbin/nslcd (code=exited, status=0/SUCCESS)<br />
Main PID: 2625 (nslcd)<br />
CGroup: /system.slice/nslcd.service<br />
+-2625 /usr/sbin/nslcd<br />
<br />
Oct 08 15:15:58 192.168.101.10 systemd[1]: Starting Naming services LDAP client daemon....<br />
Oct 08 15:15:58 192.168.101.10 systemd[1]: PID file /var/run/nslcd/nslcd.pid not readable (yet?) after start.<br />
Oct 08 15:15:58 192.168.101.10 nslcd[2625]: version 0.8.13 starting<br />
Oct 08 15:15:58 192.168.101.10 nslcd[2625]: accepting connections<br />
Oct 08 15:15:58 192.168.101.10 systemd[1]: Started Naming services LDAP client daemon..<br />
..<br />
..<br />
</code>
Next, start nscd Name service caching daemon as shown below using systemctl command.
<code>
# systemctl start nscd<br />
<br />
# systemctl status nscd<br />
? nscd.service - Name Service Cache Daemon<br />
Loaded: loaded (/usr/lib/systemd/system/nscd.service; disabled; vendor preset: disabled)<br />
Active: active (running) since Sun 2017-10-08 15:27:23 UTC; 3s ago<br />
Process: 2693 ExecStart=/usr/sbin/nscd $NSCD_OPTIONS (code=exited, status=0/SUCCESS)<br />
Main PID: 2694 (nscd)<br />
CGroup: /system.slice/nscd.service<br />
+-2694 /usr/sbin/nscd<br />
<br />
Oct 08 15:27:23 192.168.101.10 nscd[2694]: 2694 monitoring file `/etc/hosts` (4)<br />
Oct 08 15:27:23 192.168.101.10 nscd[2694]: 2694 monitoring directory `/etc` (2)<br />
Oct 08 15:27:23 192.168.101.10 nscd[2694]: 2694 monitoring file `/etc/resolv.conf` (5)<br />
Oct 08 15:27:23 192.168.101.10 nscd[2694]: 2694 monitoring directory `/etc` (2)<br />
Oct 08 15:27:23 192.168.101.10 nscd[2694]: 2694 monitoring file `/etc/services` (6)<br />
Oct 08 15:27:23 192.168.101.10 nscd[2694]: 2694 monitoring directory `/etc` (2)<br />
Oct 08 15:27:23 192.168.101.10 nscd[2694]: 2694 disabled inotify-based monitoring for file `/etc/netgroup': No such file or directory<br />
Oct 08 15:27:23 192.168.101.10 nscd[2694]: 2694 stat failed for file `/etc/netgroup'; will try again later: No such file or directory<br />
Oct 08 15:27:23 192.168.101.10 nscd[2694]: 2694 Access Vector Cache (AVC) started<br />
Oct 08 15:27:23 192.168.101.10 systemd[1]: Started Name Service Cache Daemon.<br />
..<br />
..<br />
</code>
<h3>Setup SSSD and PAM LDAP Configuration</h3>
Execute the following authconfig command to setup the SSSD authentication configuration as shown below. This will also make sure you are getting user home directory accordingly for the LDAP client.
<code>
# authconfig --enableldapauth --enablemkhomedir \<br />
--enablesysnetauth --enablelocauthorize \<br />
--ldapserver=ldap://deploy.thegeekstuff.com \<br />
--ldapbasedn="dc=thegeekstuff,dc=com" --update<br />
</code>
Please note that the SSSD service will be enabled and started during by the authconfig when two of the following are satisfied:
/etc/sssd/sssd.conf file exists, or atleast it is already configured using the implicit SSSD support
SSSD authentication is enabled, which means that pam_sss.so module is referred in PAM configuration
SSSD is enabled for user identity, which means that nsswitch.conf file has reference to sss
Execute the following authconfig command to setup PAM configuration as shown below.
<code>
# authconfig --enableldap --enableldapauth \<br />
--enablemkhomedir --enablesysnetauth \<br />
--enablelocauthorize \<br />
--ldapserver="deploy.thegeekstuff.com" \<br />
--ldapbasedn="dc=deploy,dc=thegeekstuff,dc=com" \<br />
--update
</code>
The following are some of the files that will get affected during the authconfig change:
<ul>
<li> /etc/nscd.conf</li>
<li> /etc/nslcd.conf</li>
<li> /etc/openldap/ldap.conf</li>
<li> /etc/pam.d/system-auth</li>
<li> /etc/pam.d/password-auth-ac</li>
<li> /etc/nsswitch.conf</li>
</ul>
The following optiosn are used in the above authconfig command:
<ul>
<li> <b>‐enableldapauth</b> will configure authentication functions via /etc/pam.d/system-auth</li>
<li> <b>‐enableldap</b> options will configure user information services in /etc/nsswitch.conf</li>
<li> <b>‐enablesysnetauth</b> option will allow authentication of system accounts that has uid < 500.</li>
<li> <b>‐enablelocauthorize</b> option will allow to bypass checking network authentication services for authorization</li>
<li> <b>‐update</b> option will make sure that all the configuration files are modified based on the specified command line options</li>
</ul>
Link:<br />
<a href="http://www.thegeekstuff.com/2017/10/389-ldap-client/" target="_blank"> http://www.thegeekstuff.com/2017/10/389-ldap-client/</a>
</html>
<html>
<ul>
<li><b>LEAPS</b> :: Long-Term Equity Anticipation Securities</li>
<li>lang laufende Optionen.</li>
<li>Öffentlich gehandelte Options-Kontrakte mit einem Auslaufdatum länger als 1 Jahr<br />
("[…] are publicly traded options contracts with expiration dates that are longer than one year.") </li>
<li>Es streiten sich etwas die Geister, ob es 12, 9 oder 6 Monate Laufzeit sind</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.investopedia.com/terms/l/leaps.asp" target=_blank>Investopedia :: LEAPS</a></li>
</ul>
</html>
<html>
<h1>LEI := Legal Entity Identifier</h1>
Ein <b>Legal Entity Identifier</b> (Akronym: LEI; deutsch:<br />
Rechtsträger-Kennung) ist eine global eindeutige Kennung für<br />
Rechtsträger im Finanzmarkt, die 2012 eingeführt wurde.<br>
<br>
Teilnehmer am Finanzmarkt wie z.B. Banken, Broker, Fonds, Wertpapier- und<br>
Rohstoff-Händler müssen eine LEI beantragen und führen.<br>
<br>
Auch die LEIs ihrer Counterparties müssen Marktteilnehmer kennen, und<br>
im regulatorischen Meldewesen nutzen. Die Verwendung der LEI ist unter anderem<br>
im Meldewesen unter Dodd-Frank und EMIR Pflicht.<br>
<br>
eine global gültige Kennungsnummer für juristische Personen<br />
im Finanzmarktbereich.<br />
<br />
<b>Struktur und Vergabe</b><br>
<br>
Ein LEI-Eintrag muss mindestens enthalten:[1]<br>
<br>
<li>
Firma / Name des Rechtsträgers in offizieller Schreibweise,<br>
</li>
<li>
Adresse der Hauptniederlassung,<br>
</li>
<li>
Adresse bei Gründung,<br>
</li>
<li>
Datum der ersten LEI-Vergabe,<br>
</li>
<li>
Datum der letzten Änderung des LEI-Eintrags,<br>
</li>
<li>
Datum des Auslaufens des LEI-Eintrags (wenn nicht mehr gültig),<br>
</li>
<li>
Verweis auf die Kennung im Handelsregister (sofern anwendbar),<br>
</li>
<li>
LEI-Code, ein zwanzigstelliger, alphanumerischer Code<br>
</li>
<br>
<img src="./pictures/AufbauDesLEI-Codes.png" alt="Aufbau des LEI-Codes">
<br>
Der zwanzigstellige LEI-Code ist der Legal Entity Identifier im engeren Sinne.
Dieser Code muss global eindeutig sein, und wird ohne sprechende Bestandteile
vergeben. Zum Beispiel enthalten in Deutschland vergebene LEI-Codes bewusst
nicht die ISO-Länderkennung "de", um den Code
durch einen Umzug des Unternehmens nicht ungültig werden zu lassen. Die
letzten beiden Ziffern des LEI-Codes sind Prüfziffern. Der LEI-Code
setzt sich wie folgt und in der Tabelle beschrieben zusammen:<br>
<br>
Die Vergabe vor dem 30. November 2012 geschah nur durch die CICI. Die dort
vergebenen LEI-Codes haben folgende Struktur:[2]<br>
<br>
18-stellige Identifikation des Rechtsträgers, eindeutig innerhalb
der CICI (bestehend aus Grossbuchstaben und/oder Ziffern)<br>
2-stellige Prüfsumme, die gemäss ISO 7064 (Modulo 97-10[3]) gebildet wird.<br>
<br>
Seit dem 1. Dezember 2012 vergibt die CICI und andere als Pre Local Operating
Unit (Pre-LOU) zugelassene Stellen den LEI-Code in folgender Struktur:<br>
<br>
4-stelliger Code für Local Operating Units (LOUs), die regional
für die Vergabe zuständig sind (bestehend aus Ziffern, z. B.
5493 für die CICI oder 5299 für das GEI-Portal)<br>
2-stellige Trennung, vorläufig reserviert (derzeit bestehend aus Nullen)<br>
12-stellige Identifikation des Rechtsträgers, eindeutig innerhalb
des LOU (bestehend aus Grossbuchstaben und/oder Ziffern)<br>
2-stellige Prüfsumme, die gemäss ISO 7064 (Modulo 97-10) gebildet wird.<br>
<br>
<b>Geschichte</b><br>
<br>
Im Mai 2012 wurde die LEI-Struktur als Norm ISO 17442:2012
("Financial Services - Legal Entity Identifier
(LEI)") veröffentlicht.[4]<br>
<br>
Das endgültige System der LEI-Vergabe soll aus einem mehrstufigen
Verfahren bestehen, mit verschiedenen Organisationen regionaler und globaler
Zuständigkeit. Bis dieses System etabliert ist, übernimmt nach
Entscheidung der CFTC vom Juli 2012 eine gemeinsam von SWIFT und DTCC zu
etablierende Organisation die vorläufige Vergabe von LEIs. Diese IDs
werden als CFTC Interim Compliant Identifiers (CICI) bezeichnet.[5]
über die Website CIC Utility sind die vergebenen CICI-Codes
öffentlich verfügbar.<br>
<br>
<b>Weblinks</b><br>
<br>
Veröffentlichungen zur LEI beim Financial Stability Board (FSB)<br>
CICI Utility, ein gemeinsam von SWIFT und DTCC betriebener LOU<br>
GEI-Portal, ein Pre-LOU, der von WM Daten betrieben und von der BaFin
beaufsichtigt wird<br>
<br>
Quelle: Wikipedia<br>
</html>
<html>
<ul>
<li><b>sudo apt-get install <i><Pgk-Name></i></b><br /></li>
</ul>
</html>
<html>
<ul>
<li><b>apt-get</b> ist ein konsolenbasiertes Frontend zum Debian-Paketmanager <b>dpkg</b>
</l><br />
<br />
<li><b>sudo apt-get update</b><br />
<ul>
<li>aktualisiert die Paketlisten, die in der Datei „/etc/apt/sources.list“ eingetragen sind.</li>
<li>Alternative Konfigurationen können auch unter „/etc/apt/sources.list.d“ liegen</li>
<li>Damit wird eine aktuelle Liste aller verfügbaren Debianpakete heruntergeladen. <br />
In dieser Liste steht unter anderem, die aktuelle Versionsnummer aller verfügbaren <br />
Programme, die von den Debianentwicklern immer dann aktualisiert werden, wenn z.B. <br />
Sicherheitslücken entfernt oder Funktionen hinzugefügt wurden. Die Quellen, <br />
aus der Debian die aktuelle Liste holt, sind in der sources.list (/etc/apt) angegeben. </li>
<li>apt-get update sollte vor jeder Programminstallation/deinstallation oder Systemaktualisierung <br />
durchgeführt werden.</li>
</ul>
</li>
<br />
<li><b>sudo apt-get upgrade</b><br />
<ul>
<li>aktualisiert dann das System.</li>
<li>die momentan installierten Versionen der Programme werden mit den Versionsnummern <br />
der Paketliste verglichen und gegebenenfalls aktualisiert. Bereits vorhandene Pakete werden <br />
dabei nicht gelöscht und es werden auch keine neue installiert.</li>
</ul>
</li>
<br />
<li><b>sudo apt-get dist-upgrade</b><br />
<ul>
<li>um auf eine neue Debianversion zu wechseln</li>
<li>im Gegensatz zu „apt-get upgrade“, werden auch neue Pakete installiert oder bereits vorhandene deinstalliert</li>
<li>kann man auch dazu verwenden, um von „stable“ auf „testing“ oder „unstable“ zu wechseln.</li>
</ul>
</li>
<br />
<li><b>sudo aptitude</b><br />
<ul>
<li>ist an Ncurses-basiertes FrontEnd zu <b>apt</b>, dem Debian-Paketmanager<br />
<li>da es text-basiert ist, läuft es in einem Terminal oder auf <br />
einer Kommandozeile (CLI, command line interface)</li>
</ul>
</li>
<br />
<li></li>
<br />
</ul>
Links:<br />
<a href="http://www.totalplanlos.de/Debian aktualisieren mit apt-get" target=_blank>http://www.totalplanlos.de/Debian aktualisieren mit apt-get</a><br />
<a href=""https://blog.doenselmann.com/debian-linux-automatisch-aktualisieren/" target=_blank>https://blog.doenselmann.com/debian-linux-automatisch-aktualisieren/</a><br />
<a href="http://www.totalplanlos.de/Debian aktualisieren mit aptitude" target=_blank>http://www.totalplanlos.de/Debian aktualisieren mit aptitude</a><br />
<a href="https://wiki.debian.org/Aptitude" target=_blank>https://wiki.debian.org/Aptitude</a><br />
</html>
<html>
<head>
</head>
<body>
<ul>
<li><b>Befehle:</b></br />
<ul>
<li>Ein Paket installieren:
<code> dpkg -i <em>dateiname.deb</em> </code>
</li>
<br />
<li>Ein Paket entfernen:
<code> dpkg -r <em>paketname</em> </code>
</li>
<br />
<li>Alle installierten Pakete auflisten:
<code> dpkg -l </code>
</li>
<br />
<li>Alle im Paket enthaltenen Dateien auflisten:
<code> dpkg -L <em>paketname</em> </code>
</li>
<br />
<li>Infos aus/von einem Paket ausgeben:
<code> dpkg ‐‐info <em>dateiname.deb</em> </code>
</li>
<br />
</li>
</ul>
<table border="1">
<h3>Kommandozeilenoptionen zu dpkg</h3>
<table>
<tr>
<th>kurze Option
</th>
<th>lange Option
</th>
<th>Beschreibung
</th>
</tr>
<tr>
<td>-i
</td>
<td>--install
</td>
<td>Installiert das als Argument übergebene .deb-Paket (Dateiname oder mit Option -R Ordnername).
</td>
</tr>
<tr>
<td>
</td>
<td>--configure
</td>
<td>Versucht die Installation von noch nicht fertig konfigurierten Paketen zu beenden. Entweder können die Paketnamen als Argumente übergeben werden oder es wird die Option -a bzw. --pending angegeben, um alle noch zu konfigurierenden Pakete zu verarbeiten.
Soll ein bereits korrekt installiertes Paket erneut konfiguriert werden, muss dpkg-reconfigure genutzt werden.
</td>
</tr>
<tr>
<td>-r
</td>
<td>--remove
</td>
<td>Entfernt das als Argument übergebene genannte Paket. Wichtig: Der Name des Pakets, nicht der Dateiname muss angegeben werden. Eventuell vom Programm angelegte Konfigurationsdateien bleiben erhalten.
</td>
</tr>
<tr>
<td>-l
</td>
<td>--list
</td>
<td>Ruft dpkg-query auf und gibt eine Liste mit Status, Version und einer Kurzbeschreibung des Pakets aus. Statt des Namens kann auch ein regulärer Ausdruck angegeben werden. Wird kein Argument übergeben, werden alle installierten Pakete aufgelistet. Diese Option ist auch für unprivilegierte Nutzer verfügbar. (Ab 20.04 wird ein Pager verwendet; verlassen mit Q .)
</td>
</tr>
<tr>
<td>-P
</td>
<td>--purge
</td>
<td>Entfernt das genannte Paket inklusive der Konfigurationsdateien.
</td>
</tr>
<tr>
<td>-R
</td>
<td>--recursive
</td>
<td>Statt eines Pfades zu einer .deb kann mit -R auch ein Verzeichnis angegeben werden, die gewählte Operation wird dann auf alle Pakete im Verzeichnis angewandt.
</td>
</tr>
<tr>
<td>-L
</td>
<td>--listfiles
</td>
<td>Ruft dpkg-query auf und gibt eine Liste der im Paket enthaltenen Dateien aus.
</td>
</tr>
<tr>
<td>-S
</td>
<td>--search
</td>
<td>Ruft dpkg-query auf, um auszugeben in welchen Paketen sich Dateien befinden, die zum angegebenen Suchmuster passen.
</td>
</tr>
<tr>
<td>
</td>
<td>--no-pager
</td>
<td>Deaktiviert die Verwendung jeglichen Pagers bei der Anzeige von Informationen (ab 20.04).
</td>
</tr>
</table>
</body>
<footer>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.ubuntuusers.de/dpkg/"
target="_blank" rel="noreferrrer noopener">
Ubuntu‐Users :: dpkg </a>
</li>
</ul>
</footer>
</html>
<html>
<h3>Question</h3>
I am using LXD (“Linux Container„) a container “hypervisor„ on Ubuntu Linux serer. <br />
How do I list all available VM images for installation in the LXD image store?
<h3>Answer</h3>
lxd is a system-wide daemon and lxd is a command line client to talk with the lxd daemon.<br />
So, you need to use the lxc command to list images in the LXD store. <br />
<br />The syntax is as follows:
<code><pre>
lxc image list images:
</pre></code>
Sample outputs:<br />
<center>
<img src="./pictures/lxc-images-outputs.png" height=555 width=748.25 /><br />
Fig.01: Listing all VM images
</center><br />
You can use the grep command or more command as follows:
<code><pre>
lxc image list images: | more
lxc image list images: | grep -i 'debian'
</pre></code>
Sample outputs:<br />
<center>
<img src="./pictures/lxc-image-grep.png" height=278.75 width=748.25 /><br />
Fig.02: Using the grep command to filter out images
</center><br />
You can apply filter as follows to just show alpine Linux vm images:
<code><pre>
lxc image list images: 'alpine'
</pre></code>
<center>
<img src="./pictures/lxc-image-alpine.png" height=555 width=748.25 /><br />
Fig.03: Using filters
</center><br />
You can now create a VM as follows:
<code><pre>
lxc launch images:alpine/3.5/amd64 alpine-www
lxc launch images:centos/7/amd64 cenots-db
lxc list
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://www.cyberciti.biz/faq/how-to-list-vm-images-in-lxd-linux-containers/" target="_blank" rel="noreferrer noopener">https://www.cyberciti.biz/faq/how-to-list-vm-images-in-lxd-linux-containers/</a></li>
</ul>
</html>
<html>
<h3>Programme zum automatischen Start hinzufügen:</h3>
<ul>
<li>Startmenue
</li>
<li>→ Einstellungen
</li>
<li>→ LXQt-Systemeinstellungen
</li>
<li>→ Sitzungskonfiguration
</li>
<li>folgendes Fenster erscheint:<br />
<img src="./pictures/LXQt-Sitzungseinstellungen.png"
height=549 width=547 /><!-- height=549 width=547 -->
</li>
<li>→ Button “Hinzufügen“ anklicken:<br />
<img src="./pictures/LXQt-StartApplication.png"
height=150 width=230 /><!-- height=150 width=230 -->
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.ubuntuusers.de/LXQt/"
target="_blank" rel="noreferrer noopener">
Ubuntu-Users :: LXQt</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://latex-tutorial.com/tutorials/hyperlinks/"
target="_blank" rel="noreferrer noopener">
Latex-Tutorial :: How to make clickable links in LaTeX</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<style>
large {
font-size: 200%
}
</style>
<table border="1">
<tr>
<th>Befehl</th><th>Eigenschaft</th>
</tr>
<tr>
<td>\int</td><td>∫  ,   Integral</td>
</tr>
<tr>
<td>\frac</td><td>Bruch ("fraction")</td>
</tr>
<tr>
<td>\sum \limits_{i=1}^n</td><td>Summenzeichen, von i=1 bis n:
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mstyle mode="display">
<munderover>
<mo>∑</mo>
<mn>i=1</mn>
<mn>n</mn>
</munderover>
</mstyle>
</math></td>
</tr>
<tr>
<td>\(a \cdot b \)</td><td>a · b</td>
</tr>
<tr>
<td><code><pre>
\begin{align*}<br />
U(f,P_n) &= \sum \limits_{i=1}^{n} i_i ( t_i - t_{i-1}) \\ <br />
&= \sum \limits_{i=1}^{n} t_{i-1} ( t_i - t_{i-1})
\end{align*}
</pre></code>
</td><td>Anmerkung: <br /> das Paket “amsmath“ muss installiert und inkludiert (“usepackage“) sein</td>
</tr>
<tr>
<td><code><pre>\(\lim\limits_{n \to \infty}\frac{1}{n}=0\)</pre></code></td><td></td>
</tr>
<tr>
<td><code><pre>\Leftarrow, \Rightarrow</pre></code></td><td> ⇐ , ⇒</td>
</tr>
<tr>
<td><code><pre>\Longleftrightarrow</pre></code></td><td><large>⇔</large></td>
</tr>
<tr>
<td><code><pre>\mathscr{·}</pre></code></td><td></td>
</tr>
<tr>
<td><code><pre>\mathcal{·}</pre></code></td><td></td>
</tr>
<tr>
<td><code><pre>\wedge, \vee</pre></code></td><td>∧, ∨</td>
</tr>
<tr>
<td></td><td></td>
</tr>
<tr>
<td></td><td></td>
</tr>
<tr>
<td></td><td></td>
</tr>
<tr>
<td></td><td></td>
</tr>
</table>
<br />
<pre><code>% arara: lualatex
\documentclass{article}
\usepackage{unicode-math}
\usepackage{mathtools}
\setmathfont{XITS math}
\begin{document}
Accents above:
\begin{itemize}
\item \verb+\grave+ $\grave x\quad Z_{\grave x}\quad Z_{Z_{\grave x}}$
\item \verb+\acute+ $\acute x\quad Z_{\acute x}\quad Z_{Z_{\acute x}}$
\item \verb+\hat+ $\hat x\quad Z_{\hat x}\quad Z_{Z_{\hat x}}$
\item \verb+\widehat+ $\widehat x\quad Z_{\widehat x}\quad Z_{Z_{\widehat x}}$
\item \verb+\tilde+ $\tilde x\quad Z_{\tilde x}\quad Z_{Z_{\tilde x}}$
\item \verb+\bar+ $\bar x\quad Z_{\bar x}\quad Z_{Z_{\bar x}}$
\item \verb+\overbar+ $\overbar x\quad Z_{\overbar x}\quad Z_{Z_{\overbar x}}$
\item \verb+\overline+ $\overline x\quad Z_{\overline x}\quad Z_{Z_{\overline x}}$
\item \verb+\breve+ $\breve x\quad Z_{\breve x}\quad Z_{Z_{\breve x}}$
\item \verb+\dot+ $\dot x\quad Z_{\dot x}\quad Z_{Z_{\dot x}}$
\item \verb+\ddot+ $\ddot x\quad Z_{\ddot x}\quad Z_{Z_{\ddot x}}$
\item \verb+\ovhook+ $\ovhook x\quad Z_{\ovhook x}\quad Z_{Z_{\ovhook x}}$
\item \verb+\ocirc+ $\ocirc x\quad Z_{\ocirc x}\quad Z_{Z_{\ocirc x}}$
\item \verb+\check+ $\check x\quad Z_{\check x}\quad Z_{Z_{\check x}}$
\item \verb+\candra+ $\candra x\quad Z_{\candra x}\quad Z_{Z_{\candra x}}$
\item \verb+\oturnedcomma+ $\oturnedcomma x\quad Z_{\oturnedcomma x}\quad Z_{Z_{\oturnedcomma x}}$
\item \verb+\ocommatopright+ $\ocommatopright x\quad Z_{\ocommatopright x}\quad Z_{Z_{\ocommatopright x}}$
\item \verb+\droang+ $\droang x\quad Z_{\droang x}\quad Z_{Z_{\droang x}}$
\item \verb+\leftharpoonaccent+ $\leftharpoonaccent x\quad Z_{\leftharpoonaccent x}\quad Z_{Z_{\leftharpoonaccent x}}$
\item \verb+\rightharpoonaccent+ $\rightharpoonaccent x\quad Z_{\rightharpoonaccent x}\quad Z_{Z_{\rightharpoonaccent x}}$
\item \verb+\overleftarrow+ $\overleftarrow x\quad Z_{\overleftarrow x}\quad Z_{Z_{\overleftarrow x}}$
\item \verb+\vec+ $\vec x\quad Z_{\vec x}\quad Z_{Z_{\vec x}}$
\item \verb+\dddot+ $\dddot x\quad Z_{\dddot x}\quad Z_{Z_{\dddot x}}$
\item \verb+\ddddot+ $\ddddot x\quad Z_{\ddddot x}\quad Z_{Z_{\ddddot x}}$
\item \verb+\overleftrightarrow+ $\overleftrightarrow x\quad Z_{\overleftrightarrow x}\quad Z_{Z_{\overleftrightarrow x}}$
\item \verb+\annuity+ $\annuity x\quad Z_{\annuity x}\quad Z_{Z_{\annuity x}}$
\item \verb+\widebridgeabove+ $\widebridgeabove x\quad Z_{\widebridgeabove x}\quad Z_{Z_{\widebridgeabove x}}$
\item \verb+\asteraccent+ $\asteraccent x\quad Z_{\asteraccent x}\quad Z_{Z_{\asteraccent x}}$
\end{itemize}
Accents below:
\begin{itemize}
\item \verb+\wideutilde+ $\wideutilde x\quad Z_{\wideutilde x}\quad Z_{Z_{\wideutilde x}}$
\item \verb+\underbar+ $\underbar x\quad Z_{\underbar x}\quad Z_{Z_{\underbar x}}$
\item \verb+\underline+ $\underline x\quad Z_{\underline x}\quad Z_{Z_{\underline x}}$
\item \verb+\threeunderdot+ $\threeunderdot x\quad Z_{\threeunderdot x}\quad Z_{Z_{\threeunderdot x}}$
\item \verb+\underrightharpoondown+ $\underrightharpoondown x\quad Z_{\underrightharpoondown x}\quad Z_{Z_{\underrightharpoondown x}}$
\item \verb+\underleftharpoondown+ $\underleftharpoondown x\quad Z_{\underleftharpoondown x}\quad Z_{Z_{\underleftharpoondown x}}$
\item \verb+\underleftarrow+ $\underleftarrow x\quad Z_{\underleftarrow x}\quad Z_{Z_{\underleftarrow x}}$
\item \verb+\underrightarrow+ $\underrightarrow x\quad Z_{\underrightarrow x}\quad Z_{Z_{\underrightarrow x}}$
\item \verb+\underline+ $\underline x\quad Z_{\underline x}\quad Z_{Z_{\underline x}}$
\end{itemize}
Trailing signs (could be set as subscript or prescripts as well:
\begin{itemize}
\item \verb+^\prime+ $x^\prime\quad Z_{x^\prime}\quad Z_{Z_{x^\prime}}$
\item \verb+^\dprime+ $x^\dprime\quad Z_{x^\dprime}\quad Z_{Z_{x^\dprime}}$
\item \verb+^\trprime+ $x^\trprime\quad Z_{x^\trprime}\quad Z_{Z_{x^\trprime}}$
\item \verb+^\qprime+ $x^\qprime\quad Z_{x^\qprime}\quad Z_{Z_{x^\qprime}}$
\item \verb+^\backprime+ $x^\backprime\quad Z_{x^\backprime}\quad Z_{Z_{x^\backprime}}$
\item \verb+^\backdprime+ $x^\backdprime\quad Z_{x^\backdprime}\quad Z_{Z_{x^\backdprime}}$
\item \verb+^\backtrprime+ $x^\backtrprime\quad Z_{x^\backtrprime}\quad Z_{Z_{x^\backtrprime}}$
\item \verb+^\hyphenbullet+ $x^\hyphenbullet\quad Z_{x^\hyphenbullet}\quad Z_{Z_{x^\hyphenbullet}}$
\item \verb+^\ast+ $x^\ast\quad Z_{x^\ast}\quad Z_{Z_{x^\ast}}$
\item \verb+^\vysmwhtcircle+ $x^\vysmwhtcircle\quad Z_{x^\vysmwhtcircle}\quad Z_{Z_{x^\vysmwhtcircle}}$
\item \verb+^\vysmblkcircle+ $x^\vysmblkcircle\quad Z_{x^\vysmblkcircle}\quad Z_{Z_{x^\vysmblkcircle}}$
\item \verb+^\llcorner+ $x^\llcorner\quad Z_{x^\llcorner}\quad Z_{Z_{x^\llcorner}}$
\item \verb+^\ulcorner+ $x^\ulcorner\quad Z_{x^\ulcorner}\quad Z_{Z_{x^\ulcorner}}$
\end{itemize}
\end{document}</code></pre>
<br />
<img src="./pictures/Latex-MathematischeZeichenUndFormeln-01.png"
height=444 width=447 /><!-- height=887 width=893 -->
<br />
<!--
Latex-MathematischeZeichenUndFormeln-01.png: PNG image data, 893 x 887
Latex-MathematischeZeichenUndFormeln-02.png: PNG image data, 832 x 1031
Latex-MathematischeZeichenUndFormeln-03.png: PNG image data, 1023 x 991
Latex-MathematischeZeichenUndFormeln-04.png: PNG image data, 1268 x 1022
Latex-MathematischeZeichenUndFormeln-05.png: PNG image data, 1055 x 337
Latex-MathematischeZeichenUndFormeln-06.png: PNG image data, 1454 x 755
Latex-MathematischeZeichenUndFormeln-07.png: PNG image data, 1340 x 756
-->
<img src="./pictures/Latex-MathematischeZeichenUndFormeln-02.png"
height= width= /><!-- height= width= -->
<br />
<img src="./pictures/Latex-MathematischeZeichenUndFormeln-03.png"
height= width= /><!-- height= width= -->
<br />
<img src="./pictures/Latex-MathematischeZeichenUndFormeln-04.png"
height= width= /><!-- height= width= -->
<br />
<img src="./pictures/Latex-MathematischeZeichenUndFormeln-05.png"
height= width= /><!-- height= width= -->
<br />
<img src="./pictures/Latex-MathematischeZeichenUndFormeln-06.png"
height= width= /><!-- height= width= -->
<br />
<img src="./pictures/Latex-MathematischeZeichenUndFormeln-07.png"
height= width= /><!-- height= width= -->
<br />
<h3>Links:</h3>
<ul>
<li><a href="https://tex.stackexchange.com/questions/177000/math-mode-accents"
target="_blank" rel="noreferrer noopener">
Stackexchange – Tex :: Math mode accents</a>
</li>
<li><a href="https://latex-tutorial.com/arrow-latex/"
target="_blank" rel="noreferrer noopener">
Latex – Tutorial</a>
</li>
<li><a href="https://wiki.selfhtml.org/wiki/Referenz:HTML/Zeichenreferenz#Mathematische_Symbole" target="_blank">SelfHtml :: Referenz:HTML/Zeichenreferenz - Mathematische Symbole</a></li>
<li><a href="https://de.wikibooks.org/wiki/LaTeX-Kompendium:_Für_Mathematiker" target="_blank">LaTeX-Kompendium: Für Mathematiker</a></li>
<li><a href="https://oeis.org/wiki/List_of_LaTeX_mathematical_symbols"
target="_blank" rel="noreferrer noopener">
OEIS :: List of LaTeX mathematical symbols</a>
</li>
</ul>
<br />
</html>
<html>
<pre><code>1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 7c:4d:8f:55:b7:fb brd ff:ff:ff:ff:ff:ff
altname enp2s0
inet 192.168.2.44/24 brd 192.168.2.255 scope global dynamic noprefixroute eno1
valid_lft 1806917sec preferred_lft 1806917sec
inet6 2003:e4:4f3a:ef3e:cccd:f3ea:dab:391b/64 scope global dynamic noprefixroute
valid_lft 172761sec preferred_lft 86361sec
inet6 fe80::b65e:ea76:84cb:a1b2/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: wlo1: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 66:6b:d0:77:c4:59 brd ff:ff:ff:ff:ff:ff permaddr 50:5a:65:96:4f:7b
altname wlp3s0
4: br-83c3609158c0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:3a:ca:de:4b brd ff:ff:ff:ff:ff:ff
inet 172.18.0.1/16 brd 172.18.255.255 scope global br-83c3609158c0
valid_lft forever preferred_lft forever
inet6 fc00:f853:ccd:e793::1/64 scope global tentative
valid_lft forever preferred_lft forever
inet6 fe80::1/64 scope link tentative
valid_lft forever preferred_lft forever
5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:19:0b:09:71 brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever
</code></pre>
</html>
<html>
Recently a single line script was posted to UGU<br />
to list the largest files in a filesystem in order<br />
of descending size.<br />
<br />
The script worked as posted on AIX but required tweaking<br />
for SCO OSR5 and UW7.<br />
<br />
Here 'tis for your edification and enjoyment:<br />
<br />
<b>OSR5:</b><br /><code>
find $1 -type f -size +2048 -xdev -exec ls -s {} | /bin/sort -brut " "</code><br />
<br />
<b>UW7:</b><br /><code>
find $1 -type f -size +2048 -xdev -exec ls -s {} + | /bin/sort -nr</code><br />
<br />
I placed the script in /usr/local/bin and removed<br />
the pipe to "more" in the published version to allow<br />
redirection to a file. I also arbitrarily added the<br />
"-size +2048" to the find command to limit the list<br />
to files of 1 Mb or larger; <br />
you may modify or remove as desired.<br />
<br />
Thank you,<br />
Lucky Leavell <br />
</html>
<html>
<p>
Die Bedeutung der Buchstaben C, M und B wird spätestens seit den 1950er Jahren<br />
als Abkürzung der lateinischen Worte „Christus mansionem benedicat“ (= „Christus<br />
segne dieses Haus“) gedeutet. Die Inschrift soll den Segen Gottes auf das Haus und<br />
seine Bewohner herabrufen und sie vor Unglück schützen. Frühere Quellen dieser Deu‐<br />
tung fehlen. In älteren volkskundlichen Abhandlungen herrscht die Deutung der Buch‐<br />
staben als Initialen der drei Könige Caspar, Melchior und Balthasar vor. Dies wird auch‐<br />
dadurch erhärtet, dass in manchen Regionen die Schreibweise „K+M+B“ üblich ist. Bei‐<br />
Verwendung dieser Schreibweise wird das „K“ als Abkürzung für das griechische Wort<br />
für „Herr“ (κυριος, „Kyrios“) interpretiert („Kyrios mansionem benedicat“).
</p>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Sternsinger" target="_blank" rel="noreferrer noopener">Wikipedia</a></li>
<li><a href="http://catholicism-wow.de/pivot/entry.php?id=591" target="_blank" rel="noreferrer noopener">Catholicism Wow :: Reallexikon der pastoralen Irrtümer</a></li>
</ul>
</html>
<html>
<ul>
<li>
<code><b>Res Non Ipsa Loquitur.</b></code>
→ “Die Sache spricht nicht für sich selbst.“<br />
(von der “PnL Explained“‐Seite.)<br />
<br />
Eigentlich:<br />
<code><b>Res ipsa loquitur.</b></code>
→ ”Die Sache spricht für sich selbst.“
</li>
<br />
<li><code><b>Ex nihilo nihil fit.</b></code>
→ ”Von nichts kommt nichts.“
</li>
<br />
<li><code><b>cum grano salis</b></code>
<details><summary>→ ”mit einem Körnchen Salz“</summary><br />
<ul>
<li>eine lateinische Redewendung;</li>
<li>Der Ausdruck wird im Deutschen heute meist verwendet, um eine Aussage<br />
einzuschränken und darauf aufmerksam zu machen, dass das Gesagte möglicher‐<br />
weise nicht in jeder Hinsicht wörtlich zu nehmen ist, sondern in Teilen ungenau,<br />
übertrieben oder sarkastisch formuliert ist und daher nur mit Abstrichen ernst<br />
genommen werden soll. Seltener wird der Satz auch so verwendet, dass eine<br />
vorausgegangene Behauptung nicht in jeder Hinsicht wahr sein muss, aber doch<br />
“ein Körnchen“ Wahrheit enthält.</li>
<li>Der Ausdruck “cum grano salis“ kann allerdings auch anders verstanden werden:<br />
Das lateinische Substantiv sal heißt auch “Witz“ oder “Verstand, Klugheit“, so dass<br />
in dieser Lesart angedeutet wird, der Leser oder Hörer solle die Mitteilung nicht ganz<br />
wörtlich auffassen, sondern “mit einem Körnchen Verstand“, also nicht völlig unkri‐<br />
tisch, aufnehmen. </li>
</details>
</li>
</ul>
</html>
<html>
Vor \begin{document} steht die <b><em>Dokumentpräambel</em></b> mit Code, der das Layout<br />
des Dokuments bestimmt. Der Befehl \usepackage wird genutzt, um die richtige<br />
Fontkodierung einzustellen.<br />
<br />
LaTeX hat andere \begin{…} und \end{…} Paare; sie werden Umgebungen ge‐<br />
nannt. Für jedes \begin{x} muss ein passendes \end{x} verwendet werden. Falls<br />
Umgebungen verschachtelt werden, muss \end{y} … \end{x} verwendet werden,<br />
um \begin{x} … \begin{y} zu entsprechen, die \begin und \end Instruktionen müs‐<br />
sen also in passender Reihenfolge aufgerufen werden.<br />
<br />
<table border ="1">
<tr>
<th>Name</th><th>Eigenschaften</th>
</tr>
<tr>
<td><i>book, scrbook</i></td><td>Für Bücher;<br /> neben <i>section</i>,<i>subsection</i> usw. gibt es noch die höheren Gliederungsebenen <i>chapter</i> (Kapitel) und <i>part</i> (Teil).<br /> Die Klasse <i>scrbook</i> gehört zum Paket KOMA-Script und ist eine modernere Variante.</td>
</tr>
<tr>
<td><i>article, scrartcl</i></td><td>Für kürzere Beiträge, z.B. Artikel für wissenschaftliche Fachzeitschriften.<br /> Die Klasse <i>scrartcl</i> gehört zum Paket KOMA-Script.
</tr>
<tr>
<td><i>report, scrreport</i></td><td>Ähnlich wie <i>article</i>, aber auch mit <i>chapter</i>-Gliederungsebenen.<br />Die Klasse <i>scrreport</i> gehört zum Paket KOMA-Script.</td>
</tr>
<tr>
<td><i>slides</i></td><td>Zum Erstellen von Vortragsfolien im PDF-Format.</td>
</tr>
<tr>
<td><i>scrittr2</i></td><td>KOMA-Script-Klasse für Briefe, die auch DIN-Briefe erstellt.</td>
</tr>
</table>
</html>
<html>
Man kann vielleicht erraten, dass \textit für kursive Schrift verwendet wird <br />
(nach dem Englischen italic), es setzt den Text allerdings immer kursiv,<br />
funktioniert also nicht bei geschachtelter Verwendung. Man beachte, dass<br />
\emph Verschachtelungen erkennt. <br />
<br />
Es gibt außerdem Stellen, in denen eine Hervorhebung keiner kursiven <br />
Schrift entspricht; in Präsentationen ist bspw. Farbe eine wesentlich ge‐<br />
eignetere Option. Mit logischer Auszeichnung muss man sich innerhalb<br />
des Textteils keine Gedanken zu derlei Feinheiten machen.<br />
<br />
<table border="1">
<tr>
<th>Befehl</th><th>Eigenschaft</th>
</tr>
<tr>
<td>\textbf</td><td><b>fett</b></td>
</tr>
<tr>
<td>\textit</td><td><i>kursiv</i></td>
</tr>
<tr>
<td>\textsl</td><td>schräggestellt</td>
</tr>
<tr>
<td>\texttt</td><td>Maschinenschrift</td>
</tr>
<tr>
<td>\textsc</td><td>KAPITÄLCHEN</td>
</tr>
<tr>
<td>\textsf</td><td>serifenlos</td>
</tr>
<tr>
<td>\underline</td><td><u>unterstrichen</u></td>
</tr>
<tr>
<td>\uuline</td><td><span style="BORDER-BOTTOM: #000000 double">doppelt unterstrichen</span></td>
</tr>
<tr>
<td>\sout</td><td>durchgestrichen</td>
</tr>
<tr>
<td>\xout</td><td>ausge-X-t</td>
</tr>
<tr>
<td>\uwave</td><td>gewellt unterstrichen</td>
</tr>
<tr>
<td>\dashuline</td><td>unterstrichelt</td>
</tr>
<tr>
<td>\dotuline</td><td>gepunktet unterstrichen</td>
</tr>
</table>
</html>
<html>
<ul>
<li>Im Fall, dass das ganze Dokument im Querformat gesetzt<br />
werden soll, sollte das <code><em>geometry</em></code> Paket verwendet werden.
</li>
<li>Dort kann durch das Setzen der entsprechenden Option <br />
<code><em>landscape</em></code> auf den Wert <code><em>true</em></code> das Dokument querkant ge–<br />
setzt werden:
<pre><code>\documentclass{article}
…
\usepackage[landscape=true]{geometry}
\begin{document}</code></pre>
</li>
<li>Hinweis: <br />
Das <code><em>geometry</em></code> Paket ist nur dazu geeignet, ein ganzes<br />
Dokument im Querformat zu setzen.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.namsu.de/Extra/befehle/Querformat.html"
target="_blank" rel="noreferrer noopener">
Namsu :: LaTex Querformat</a>
</li>
</ul>
</html>
<html>
<code>
\documentclass[11pt, a4paper]{article}<br />
<br />
\usepackage[ngerman]{babel}<br />
\usepackage[utf8]{inputenc} % <i>Umlaute wiedergeben</i><br />
\usepackage[a4paper,top=25mm,left=17mm,right=18mm,bottom=30mm]{geometry} % <i>Re-Definition der Textfläche</i><br />
<br />
% <i> Mit den nachfolgenden Befehlen werden der Kopf- resp. der Fußbereich neu definiert:</i><br />
\usepackage{fancyhdr}<br />
\pagestyle{fancy}<br />
\fancyhf{}<br />
\fancyhead[L]{<1.Text> \protect\\ <2.Text>}<br />
% ------------------------------------------------------------------- <br />
<br />
\begin{document}<br />
<br />
\chapter*{Eine Überschrift ohne Nummerierung} <br />
<br />
Dies ist ein einfacher Text.<br />
<br />
\end{document}
</code>
</html>
<html>
<table border="1">
<tr><td>article </td><td>For articles in scientific journals, presentations, short reports, program documentation, invitations, ...</td></tr>
<tr><td>IEEEtran </td><td>For articles with the IEEE Transactions format.</td></tr>
<tr><td>proc </td><td>A class for proceedings based on the article class.</td></tr>
<tr><td>report </td><td>For longer reports containing several chapters, small books, thesis, ...</td></tr>
<tr><td>book </td><td>For real books.</td></tr>
<tr><td>slides </td><td>For slides. The class uses big sans serif letters.</td></tr>
<tr><td>memoir </td><td>For changing sensibly the output of the document. It is based on the book class, but you can create any kind of document with it</td></tr>
<tr><td>letter </td><td>For writing letters.</td></tr>
<tr><td>beamer </td><td>For writing presentations (see LaTeX/Presentations).</td></tr>
</table>
</html>
<html>
<table border="1">
<tr><td> 10pt, 11pt, 12pt </td><td>Sets the size of the main font in the document. If no option is specified, 10pt is assumed.
a4paper, letterpaper,... </td><td>Defines the paper size. The default size is letterpaper; However, many European distributions of TeX now come pre-set for A4, not Letter, and this is also true of all distributions of pdfLaTeX. Besides that, a5paper, b5paper, executivepaper, and legalpaper can be specified.</td></tr>
<tr><td>fleqn </td><td>Typesets displayed formulas left-aligned instead of centered.</td></tr>
<tr><td>leqno </td><td>Places the numbering of formulas on the left hand side instead of the right.</td></tr>
<tr><td>titlepage, notitlepage </td><td>Specifies whether a new page should be started after the document title or not. The article class does not start a new page by default, while report and book do.</td></tr>
<tr><td>twocolumn </td><td>Instructs LaTeX to typeset the document in two columns instead of one.</td></tr>
<tr><td>twoside, oneside </td><td>Specifies whether double or single sided output should be generated. The classes article and report are single sided and the book class is double sided by default. Note that this option concerns the style of the document only. The option twoside does not tell the printer you use that it should actually make a two-sided printout.</td></tr>
<tr><td>landscape Changes the layout of the document to print in landscape mode.
openright, openany </td><td> Makes chapters begin either only on right hand pages or on the next page available. This does not work with the article class, as it does not know about chapters. The report class by default starts chapters on the next page available and the book class starts them on right hand pages.</td></tr>
<tr><td>draft </td><td>makes LaTeX indicate hyphenation and justification problems with a small square in the right-hand margin of the problem line so they can be located quickly by a human. It also suppresses the inclusion of images and shows only a frame where they would normally occur.</td></tr>
</table>
For example, if you want a report to be in 12pt type on A4, but <br />
printed one-sided in draft mode, you would use:<br /><br />
<code>
\documentclass[12pt,a4paper,oneside,draft]{report}<br />
</code>
</html>
<html>
<ul>
<li><code><b>LaTeX Error: There's no line here to end</b></code><br />
If you use a line-breaking command such as \\ or \newline at a time when LaTeX is not expecting it.<br />
<br />
temporary solution:<br />
<code>\leavevmode</code><br />
<br />
<a href="https://www.overleaf.com/learn/latex/Errors/LaTeX_Error%3A_There%27s_no_line_here_to_end"
target="_blank" rel="noreferrer noopener">
Overleaf :: There's no line here to end</a>
</li>
</ul>
</html>
<html>
<meta LaTeX Error: Cannot determine size of graphic in Unterschrift.png (no Boundin />
<h3>Fehlermeldung "LaTeX Error: Cannot determine size of graphic in ../Unterschrift.png (no BoundingBox)"</h3>
<ul>
<li>The DVI producing latex doesn't support reading the size of <br />
PNG, JPG or PDF images.
</li>
<li><pre><code>You need to use <b>pdflatex</b> for this. </code></pre>
</li>
<li>Actually latex is pdflatex in DVI mode in modern distributions, <br />
but it can read the sizes only in PDF mode for some reason.
</li>
<li>You are however able to state the natural size of the images<br />
using natwidth and natheight which will make latex compile<br />
without error. <br />
[<em>Bei der Verwendung von <code>pdflatex</code> ist diese Angabe - anscheinend - nicht notwendig!</em>]
</li>
<li>The produced DVI file will only link to the PDF and the<br 7>
DVI-to-PDF converter will need to include it in the final PDF.
</li>
<li>AFAIK dvpdf doesn't support this but dvipdfm does.
</li>
<li><pre><code>\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\centering
<b>\includegraphics[width=0.8\textwidth,natwidth=610,natheight=642]{tiger.pdf}</b>
\end{figure}
\end{document}</code></pre>
</li>
<li>Compile with either
<pre><code>pdflatex <file base></code></pre>
or
<pre><code>latex <file base>
dvipdfm <file base></code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://tex.stackexchange.com/questions/17734/cannot-determine-size-of-graphic"
target="_blank" rel="noreferrer noopener">
Tex & Latex Stack Exchange :: Cannot determine size of graphic
</li>
</ul>
</html>
<html>
<ol>
<li>Wenn ein LaTeX‐Lauf mit einem Fragezeichen endet, kann man<br />
ihn vollständig beenden, indem man <b><em>x</em></b> und anschließend <b><em>Enter</em></b> drücken.</li>
<li><b>Underfull \hbox</b><br />
→ zu viele Leerzeilen ("\\") eingefügt</li>
<li><b> \headheight is too small</b><br />
[...] There is a problem you may come across using package <i>fancyhdr</i>:<br />
<br />
Package Fancyhdr Warning: \headheight is too small (12.0pt):<br />
Make it at least 14.49998pt.<br />
We now make it that large for the rest of the document.<br />
<br />
[...] Here is the solution. Insert<br />
<br />
<b>\setlength{\headheight}{15pt}</b><br />
<br />
in the preamble, i.e. before \begin{document}.<br />
<br />
Tips:<br />
<br />
\headheight defines the height of the header.<br />
<br />
\setlength{len-cmd}{length}<br />
<br />
The \setlength command is used to set the value of a length command, <br />
len-cmd, which is specified as the first argument. The length argument <br />
can be expressed in any terms of length LaTeX understands, i.e., inches (in), <br />
millimeters (mm), points (pt), etc.<br />
<br />
(Link: <a href="https://nw360.blogspot.de/2006/11/latex-headheight-is-too-small.html"> https://nw360.blogspot.de/2006/11/latex-headheight-is-too-small.html</a>) </li>
</ol>
</html>
<html>
<h3>Kleinbuchstaben</h3>
<table width=80% border="1">
<tr>
<th>Buchstabe</th><th>Befehl</th><th>Buchstabe</th><th>Befehl</th><th>Buchstabe</th><th>Befehl</th><th>Buchstabe</th><th>Befehl</th>
</tr>
<tr>
<td><center>α</center></td><td>\alpha</td>
<td><center>β</center></td><td>\beta</td>
<td><center>γ</center></td><td>\gamma</td>
<td><center>δ</center></td><td>\delta</td>
</tr>
<tr>
<td><center>ε</center></td><td>\epsilon</td>
<td><center>ϵ</center></td><td>\varepsilon</td>
<td><center>ζ</center></td><td>\zeta</td>
<td><center>η</center></td><td>\eta</td>
</tr>
<tr>
<td><center>θ</center></td><td>\theta</td>
<td><center>ϑ</center></td><td>\vartheta</td>
<td><center>ι</center></td><td>\iota</td>
<td><center>κ</center></td><td>\kappa</td>
</tr>
<tr>
<td><center>λ</center></td><td>\lambda</td>
<td><center>μ</center></td><td>\mu</td>
<td><center>ν</center></td><td>\nu</td>
<td><center>ξ</center></td><td>\xi</td>
</tr>
<tr>
<td><center>ω</center></td><td>o</td>
<td><center>π</center></td><td>\pi</td>
<td><center>ρ</center></td><td>\rho</td>
<td><center>σ</center></td><td>\sigma</td>
</tr>
<tr>
<td><center>ς</center></td><td>\varsigma</td>
<td><center>τ</center></td><td>\tau</td>
<td><center>υ</center></td><td>\upsilon</td>
<td><center>φ</center></td><td>\phi</td>
</tr>
<tr>
<td><center>ϕ</center></td><td>\varphi</td>
<td><center>χ</center></td><td>\chi</td>
<td><center>ψ</center></td><td>\psi</td>
<td><center>ω</center></td><td>\omega</td></tr><tr>
</table>
<h3> Großbuchstaben</h3>
<table border="1">
<tr>
<th>Buchstabe</th><th>Befehl</th>
</tr>
<tr>
<td><center>Γ</center></td><td>\Gamma</td>
</tr>
<tr>
<td><center>Δ</center></td><td>\Delta</td>
</tr>
<tr>
<td><center>Θ</center></td><td>\Theta</td>
</tr>
<tr>
<td><center>Λ</center></td><td>\Lambda</td>
</tr>
<tr>
<td><center>Ξ</center></td><td>\Xi</td>
</tr>
<tr>
<td><center>Π</center></td><td>\Pi</td>
</tr>
<tr>
<td><center>Σ</center></td><td>\Sigma</td>
</tr>
<tr>
<td><center>Υ</center></td><td>\Upsilon</td>
</tr>
<tr>
<td><center>Φ</center></td><td>\Phi</td>
</tr>
<tr>
<td><center>Ψ</center></td><td>\Psi</td>
</tr>
<tr>
<td><center>Ω</center></td><td>\Omega</td>
</tr>
</table>
<br />
<ul>
<li> Griechische Buchstaben können nur im mathematischen <br />
Modus aufgerufen werden. Innerhalb von normalem Text <br />
(im Fließtext) müssen sie deshalb mit $ … $ eingeschach–<br />
telt werden.</li>
</ul>
<h3>Link:</h3>
<ul>
<li><a href="http://wwws.htwk-leipzig.de/~myagovki/latex/griechische_buchstaben/"
target="_blank" rel="noreferrer noopener">
HTWK Leipzig :: Griechische Buchstaben</a>
</li>
</ul>
<br />
</html>
<html>
Hoch- und Tiefstellung erfolgt über die Zeichen ^ und _.
</html>
<html>
<ul>
<li><b>CTAN</b> := „The Comprehensive TeX Archive Network&ldquo, <br />
<a href= "http://www.ctan.org/">http://www.ctan.org/</a></li>
<br />
<li> <u>Grundstruktur resp. ~aufbau:</u><br /><br />
<code>
\documentclass{article}<br />
\begin{document}
</code>
<br />
<i>… hier ist der Text …</i><br />
<code>
\end{document}<br />
</code></li>
<br />
<li><b>Kommentarzeichen:</b> %</li>
<br />
<li><b>geschütztes Leerzeichen:</b> ~ (Tilde)</li>
<br />
<li>Liste von Templates: <a href="https://www.overleaf.com/latex/templates">https://www.overleaf.com/latex/templates</a> </li>
<br />
</ul>
<br />
<b>Link:</b><br />
• easy linux 11/16 - 01/17, S. 51ff, <br />
http://www.easylinux.de/2017/01<br />
<br />
</html>
<html>
<h3>Debian-basiert</h3>
Für Debian-basierte Betriebssysteme, wie z.B. Ubuntu, kann TeX Live <br />
ganz einfach aus den Paketquellen heraus installiert werden, wobei <br />
folgende zusätzliche Pakete empfohlen werden:
<ul>
<li>texlive (das Grundsystem) </li>
<li>texlive-doc-de (deutsche Dokumentation)</li>
<li>texlive-latex-extra (zusätzliche LaTeX-Pakete)</li>
<li>texlive-lang-german (deutsche Sprachunterstützung)</li>
</ul>
Am schnellsten geht es über die Kommandozeile, wobei man <br />
mit root Rechten folgenden Befehl ausführt:<br />
<br />
<code> sudo apt-get install texlive texlive-doc-de texlive-latex-extra texlive-lang-german </code><br />
<br />
oder<br />
<br />
<code>sudo aptitude install texlive texlive-doc-de texlive-latex-extra texlive-lang-german </code><br />
<br />
Als Minimalinstallation gibt es <b>texlive-base</b>, bei der die restlichen Pakete <br />
je nach Bedarf nachinstalliert werden können.<br />
<br />
Wer sich keine Gedanken über eventuell fehlende Pakete machen möchte <br />
und genug (freien) Festplattenspeicher zur Verfügung hat, sollte mit <b>texlive-full</b> <br />
die komplette Distribution installieren. Eine schnelle Internetverbindung ist hier<br />
von Vorteil, da mehrere hundert Megabyte heruntergeladen werden.<br />
<br />
Link:<br />
<a href="https://de.wikibooks.org/wiki/LaTeX/_Installation#Debian-basiert">https://de.wikibooks.org/wiki/LaTeX/_Installation#Debian-basiert</a>
</html>
<html>
<ul>
<li>Kommentarzeichen: %
</li>
<li>To add a block comment in the source and <br />
comment out large sections of text:<br />
use the comment package in the preamble:
<pre><code>\usepackage{comment}</code></pre>
and:
<pre><code>\begin{comment}
…
\end{comment}</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.overleaf.com/learn/how-to/Is_there_a_shortcut_for_commenting_out_several_lines_of_code_at_once%3F"
target="_blank" rel="noreferrer noopener">
Overleaf :: Is there a shortcut for commenting out several lines of code at once?</a>
</li>
</ul>
</html>
<html>
Die Gestaltung der Kopf- und Fußzeile Ihres Dokuments bestimmen Sie über den Befehl<br />
<br />
<code>\pagestyle{<i>Art</i>}</code><br />
<br />
Als Wert für Art können Sie eintragen:<br />
<ul>
<li><b>empty</b>: leere Kopf- und Fußzeile </li>
<br />
<li><b>plain</b>: Seitenzahl zentriert in der Fußzeile </li>
<br />
<li><b>headings</b>: Kapitelname und Seitenzahl in der Kopfzeile </li>
<br />
<li><b>fancy</b>: freie Gestaltung mit dem Paket fancyhdr </li>
</ul>
Bei den Klassen article bzw. scrartcl und report bzw. scrreprt ist plain, <br />
bei der Klasse book bzw. scrbook ist headings voreingestellt.<br />
<br />
Mit dem Paket fancyhdr können Sie Kopf- und Fußzeile frei gestalten. <br />
Das Paket stellt folgende Befehle bereit:
<ul>
<li><b>\rhead[Text gerade Seite]{Text ungerade Seite}</b>: Kopfzeile rechts </li>
<br />
<li><b> \chead[Text gerade Seite]{Text ungerade Seite}</b>: Kopfzeile Mitte </li>
<br />
<li><b> \lhead[Text gerade Seite]{Text ungerade Seite}</b>: Kopfzeile links </li>
<br />
<li><b> \rfoot[Text gerade Seite]{Text ungerade Seite}</b>: Fußzeile rechts </li>
<br />
<li><b> \cfoot[Text gerade Seite]{Text ungerade Seite}</b>: Fußzeile Mitte </li>
<br />
<li><b> \lfoot[Text gerade Seite]{Text ungerade Seite}</b>: Fußzeile links </li>
</ul>
Bei einseitigem Druck geben Sie nur geschweifte Klammern an. Kopf- und Fußzeile <br />
sind auf geraden und ungeraden Seiten identisch. Bei beidseitigem Druck geben <br />
Sie in eckigen Klammern den Text für gerade Seiten und in geschweiften Klammern <br />
den Text für ungerade Seiten an. Die Seitenzahl geben Sie mit dem Befehl <code>\thepage</code> aus.<br />
<br />
Einstellungen, die Sie in der Präambel vornehmen, gelten für das gesamte Dokument. <br />
Im Hauptteil können Sie die Kopf- und Fußzeile einer bestimmten Seite mit dem Befehl<br />
<br />
<code>\thispagestyle{Art}</code><br />
<br />
verändern.
<br />
Link:<br />
<a href="http://www.akademie.de/wissen/latex-lernen-anleitung/kopf-fusszeile">http://www.akademie.de/wissen/latex-lernen-anleitung/kopf-fusszeile</a>
</html>
<html>
<ul>
<li><h3>Unordered lists</h3>
The unordered (unnumbered) lists are produced by the „itemize“ environment.<br />
Each entry must be preceded by the control sequence \item.
<pre><code>\begin{itemize}
\item The individual entries are indicated with a black dot, a so-called bullet.
\item The text in the entries may be of any length.
\end{itemize}</code></pre>
Result: <br />
<img src="./pictures/File_Itemize.png" width=695 height=119 >
</li>
<li><h3>Ordered lists</h3>
Ordered list have the same syntax inside a different environment:
<pre><code>\begin{enumerate}
\item The labels consists of sequential numbers.
\item The numbers starts at 1 with every call to the enumerate environment.
\end{enumerate}</code></pre>
The ordered lists are generated by a \enumerate environment and each entry must be preceded by the control sequence \item, which will automatically generate the number labelling the item. The enumerate labels consists of sequential numbers, these numbers starts at 1 with every call to the enumerate environment.
</li>
<li><h3>Nested Lists</h3>
In LaTeX you can insert a list inside another list. The above lists may be included within one another, either mixed or of one type, to a depth of four levels.
<pre><code>
\begin{enumerate}
\item The labels consists of sequential numbers.
\begin{itemize}
\item The individual entries are indicated with a black dot, a so-called bullet.
\item The text in the entries may be of any length.
\end{itemize}
\item The numbers starts at 1 with every call to the enumerate environment.
\end{enumerate}</code></pre>
Mixed.png
</li>
<li><h3>List styles</h3>
As many other LaTeX elements, unordered and ordered list styles can be personalized.
<h5>Ordered lists</h5>
The numbering styles change depending on the depth of the nested lists:
<pre><code> \begin{enumerate}
\item First level item
\item First level item
\begin{enumerate}
\item Second level item
\item Second level item
\begin{enumerate}
\item Third level item
\item Third level item
\begin{enumerate}
\item Fourth level item
\item Fourth level item
\end{enumerate}
\end{enumerate}
\end{enumerate}
\end{enumerate}</code></pre>
Items.png
The default numbering scheme is:
Arabic number (1, 2, 3, ...) for Level 1
Lowercase letter (a, b, c, ...) for Level 2
Lowercase Roman numeral (i, ii, iii, ...) for Level 3
Uppercase letter (A, B, C, ...) for Level 4.
These numbers can be changed by redefining the commands that typeset the numbers of various list levels. For example:
<pre><code> \renewcommand{\labelenumii}{\Roman{enumii}}
\begin{enumerate}
\item First level item
\item First level item
\begin{enumerate}
\item Second level item
\item Second level item
\begin{enumerate}
\item Third level item
\item Third level item
\begin{enumerate}
\item Fourth level item
\item Fourth level item
\end{enumerate}
\end{enumerate}
\end{enumerate}
\end{enumerate}</code></pre>
Items2.png
The command \renewcommand{\labelenumii}{\Roman{enumii}} changes the second level to upper case Roman numeral. It is possible to change the labels of any level, replace labelenumii for one of the listed below.
\theenumi for Level 1
\theenumii for Level 2
\theenumiii for Level 3
\theenumiv for Level 4
The command must be placed in the preamble to change the labels globally or right before \begin{enumerate} to change labels only in this list. There are some other styles, see the reference guide for a complete list.
In numbered lists the counter is incremented by \item before it is printed, and starts from 1,a,i,A,I. This can be changed:
<pre><code>\renewcommand{\labelenumii}{\Roman{enumii}}
\begin{enumerate}
\item First level item
\item First level item
\begin{enumerate}
\setcounter{enumii}{4}
\item Second level item
\item Second level item
\begin{enumerate}
\item Third level item
\item Third level item
\begin{enumerate}
\item Fourth level item
\item Fourth level item
\end{enumerate}
\end{enumerate}
\end{enumerate}
\end{enumerate}</code></pre>
Items3.png
To change the start number or letter you must use the \setcounter command. In the example, to change the start number of level 2 to V the command \setcounter{enumii}{4} was used.
To set the start number to any other counter change enumii for any of these:
enumi for Level 1
enumii for Level 2
enumiii for Level 3
enumiv for Level 4
<h5>Unordered lists</h5>
The label scheme of unordered lists also changes depending on the depth of the nested list:
<pre><code> \begin{itemize}
\item First Level
\begin{itemize}
\item Second Level
\begin{itemize}
\item Third Level
\begin{itemize}
\item Fourth Level
\end{itemize}
\end{itemize}
\end{itemize}
\end{itemize}</code></pre>
ItemL.png
The default label scheme for itemized lists is:
<pre><code>
Level 1 is \textbullet ()
Level 2 is \textendash () ,
Level 3 is \textasteriskcentered (*)
Level 4 is \textperiodcentered (·).
</code></pre>
These labels can be changed by redefining the commands that typeset them<br />
for various list levels. For example, to change Level 1 to black square and Level<br />
2 to white square we'll use :
<pre><code> \renewcommand{\labelitemi}{$\blacksquare$}
\renewcommand\labelitemii{$\square$}
\begin{itemize}
\item First Level
\begin{itemize}
\item Second Level
\begin{itemize}
\item Third Level
\begin{itemize}
\item Fourth Level
\end{itemize}
\end{itemize}
\end{itemize}
\end{itemize}</code></pre>
Itemsquare.png
The mathematical symbols used in the previous example belong to the amssymb package, so you have to add \usepackage{amssymb} to your preamble.
To redefine the label use one of the next commands, depending on the level of list mark you intend to change:
<pre><code>labelitemi for Level 1
labelitemii for Level 2
labelitemiii for Level 3
labelitemiv for Level 4 </code></pre>
You can also change the item label for a specific entry, for example:
<pre><code>\begin{itemize}
\item Default item label for entry one
\item Default item label for entry two
\item[$\square$] Custom item label for entry three
\end{itemize}</code></pre>
Itemspec.png
All you have to do is pass the desired mark as a parameter inside brackets to the item line.
<h4>Reference guide</h4>
Available styles for numbered lists:
<table>
<tr><th>Code</th><th>Description</th></tr>
<tr><td>\alph</td><td>Lowercase letter (a, b, c, … )</td></tr>
<tr><td>\Alph</td><td>Uppercase letter (A, B, C, … )</td></tr>
<tr><td>\arabic</td><td>Arabic number (1, 2, 3, … )</td></tr>
<tr><td>\roman</td><td>Lowercase Roman numeral (i, ii, iii, … )</td></tr>
<tr><td>\Roman</td><td>Uppercase Roman numeral (I, II, III, … ) </td></tr>
</table>
<h3>Links</h3>
<ul>
<li><a href="https://www.sharelatex.com/learn/Lists#/Unordered_lists">https://www.sharelatex.com/learn/Lists</a></li>
<li><a href="https://ittechnick.de/latex-listen-erstellen/" target="_blank" rel="noreferrer noopener">IT‐Tech Nick :: Latex ‐ Listen erstellen</a></li>
</ul>
</html>
<html>
<ul>
<li>Mathematische Formeln sollten stets (!) im <i>math mode</i><br />
eingebettet sein:<br />
<code><pre>
\begin{math}
…
\end{math}
</pre></code>
</li>
<br />
<li>Um mathematische Symbole in einem Text zu schreiben,<br />
sind die durch "$" zu umklammern: <br />
<code><pre>
A $\wedge$ B
</pre></code>
</li>
<br />
<li>Script-Buchstaben schreiben:
<code><pre>
$\mathcal{A}$
</pre></code>
oder
<code><pre>
\usepackage{mathrsfs}
$\mathscr{F}$
</pre></code>
</li>
</ul>
Link:<br />
<a href="http://www.math.illinois.edu/~ajh/tex/course/intro2.html">http://www.math.illinois.edu/~ajh/tex/course/intro2.html</a><br />
<a href="http://artofproblemsolving.com/wiki/index.php/LaTeX:Math">http://artofproblemsolving.com/wiki/index.php/LaTeX:Math</a>
</html>
<html>
<h3>Relationen</h3>
<ul>
<li>
</li>
</ul>
<h3>Binäre Operationen</h3>
<ul>
<li>
</li>
</ul>
<h3>Logische Zeichen</h3>
<ul>
<li>
</li>
</ul>
<h3>Begrenzer & Pfeile</h3>
<ul>
<li>
</li>
</ul>
<h3>Andere Symbole</h3>
<ul>
<li>
</li>
</ul>
<h3>Funktionssymbole</h3>
<ul>
<li>
</li>
</ul>
<h3>Unendlichkeitssymbole</h3>
<ul>
<li>
</li>
</ul>
<!--
<h3>Relationen</h3>
<ul>
<li>
</li>
</ul>
-->
<h3>Links:</h3>
<ul>
<lI><a href="https://www.namsu.de/Mathematik/1-7-3.html"
target="_blank" rel="noreferrer noopener">
:: Mathematik in Latex</a>
</li>
</ul>
</html>
<html>
<ul>
<li>LaTeX setzt Mathematische Formeln <b><u>nur</u></b> im Mathematikmodus.</li>
<li>Eine Formel im Fließtext wird durch <br />
<code>\( .... \)</code><br /> erzeugt.</li>
<li>Formeln, die abgesetzt vom Text zentriert in einer eigenen Zeile<br />
erscheinen sollen, lassen sich entweder durch <br />
<code>\[ ... \] <b>(nicht nummeriert)</b></code><br />
oder <br />
<code>\begin{equation*}...\end{equation*} <br /><b>(mit Stern: keine Nummerierung, <br />ohne Stern: Nummerierung)</b></code><br /> erzeugen.</li>
<li>Warum man den TeX-Befehl <code>$$ ... $$</code> in LaTeX nicht verwenden sollte,<br />
findet man hier oder im <a href="http://www.ctan.org/tex-archive/info/l2tabu/german/l2tabu.pdf" target=_blank>LaTex2e-Sündenregister</a>.</li>
<li>Eine einfache Umgebung für nummerierte Gleichungsketten bietet die Funktion <br />
<code>\begin{align} ... \end{align}</code>.<br />Sie ersetzt dann <code>\[ ... \]</code>. <br />(Die eqnarray-Umgebung sollte nicht verwendet werden, siehe <a href="http://www.ctan.org/tex-archive/info/l2tabu/german/l2tabu.pdf" target=_blank>LaTex2e-Sündenregister</a>)</li>
<li>\\ erzeugt einen Zeilenumbruch in der Gleichung (mit ent–<br />
sprechender Nummerierung).</li>
<li>Der Befehl <code>\nonumber</code> in eine Zeile eingefügt, setzt für <br />
diese eine Zeile den Zähler aus.</li>
<li><code>align*</code> anstelle von <code>align</code> stellt die Nummerierung <br />
für die gesamte Gleichungskette aus. </li>
</ul>
</html>
<html>
<ul>
<li><pre><code>\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[ \begin{bmatrix}
a_{11} & a_{12} & \cdots & a_{1n}\\
a_{21} & a_{22} & \cdots & a_{2n}\\
\vdots & \vdots & \ddots & \vdots\\
a_{m1} & a_{m2} & \cdots & a_{mn}
\end{bmatrix}
\times
\begin{bmatrix}
b_{11} & b_{12} & \cdots & b_{1p}\\
b_{21} & b_{22} & \cdots & b_{2p}\\
\vdots & \vdots & \ddots & \vdots\\
b_{n1} & b_{n2} & \cdots & b_{np}
\end{bmatrix}
=
\begin{bmatrix}
c_{11} & c_{12} & \cdots & c_{1p}\\
c_{21} & c_{22} & \cdots & c_{2p}\\
\vdots & \vdots & \ddots & \vdots\\
c_{m1} & c_{m2} & \cdots & c_{mp}
\end{bmatrix} \]
\[ c_{ij}= a_{i1} b_{1j} + a_{i2} b_{2j} +\cdots+ a_{in} + b_{nj} = \sum_{k=1}^n a_{ik}b_{kj} \]
\end{document}</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.physicsread.com/latex-matrix-multiplication/"
target="_blank" rel="noreferrer noopener">
Physicsread :: How do you write a matrix multiplication in LaTeX?</a>
</li>
</ul>
</html>
<html>
<code>
\[ \left( \begin{array}{ccc}<br />
a & b & c \\<br />
d & e & f \\<br />
g & h & i \end{array} \right)\]<br />
</code>
<br />
<code>\left ... \right</code> :: damit werden die beiden Klammern um den <b>ganzen</b> Block erstellt;<br />
<br />
Alternative: <br />
Hier wird eine erweiterte Matrix mit der Einheitsmatrix dargestellt:<br />
<br />
<code>
\begin{math}<br />
\left[ \begin{array}{ccc|ccc}<br />
-1 & 4 & -4 & 1 & 0 & 0 \\<br />
1 & -3 & 1 & 0 & 1 & 0 \\<br />
1 & -2 & 0 & 0 & 0 & 1<br />
\end{array} \right]<br />
\end{math}
</code><br />
<br />
Links:<br />
<a href="http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/Matrices.html">http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/Matrices.html</a>
</html>
<html>
<ul>
<li>Syntax: <br />
<code>\usepackage{fullpage}</code></li>
<br />
<li>Setzt alle Seitenbereiche (page margins) auf 1.5cm resp. 1 inch</li>
→ das kann zu Problemen führen, wenn z.B. der Kopf- resp. der <br />
Fußbereich („header“ resp. „footer“) erstellt werden soll. <br />
Es kommt zu Überschneidungen.
</ul>
</html>
<html>
<ul>
<li>Einfügen von Verweisen (<i>hyper references</i>) in TeX-Dokumenten</li>
<br />
</ul>
<h3>Links:</h3>
<a href="http://noodle.med.yale.edu/latex/hyperref.pdf" target=_blank>Yale-Noodle :: hyperref.pdf [downloaded]</a><br />
<a href="https://www.tug.org/applications/hyperref/manual.html" target=_blank>TUG :: hyperref manual</a><br />
<a href="http://www2.washjeff.edu/users/rhigginbottom/latex/resources/lecture09.pdf" target=_blank>R. Higginbottom :: Lecture 9 [downloaded]</a><br />
<a href="https://www.sharelatex.com/learn/Hyperlinks" target=_blank>Sharelatex :: Hyperlinks</a>
</html>
<html>
<ul>
<li>ç (“c cedille“) :: “\c{c}“
</li>
<li>\cdot :: mathematisches Multiplikationszeichen
</li>
<li>\`{o} :: ò, <em>Gravis</em>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikibooks.org/wiki/LaTeX/_Akzente_und_Sonderzeichen"
target="_blank" rel="noreferrer noopener">
Wikibooks :: Akzente & Sonderzeichen</a>
</li>
</ul>
</html>
<html>
<ul>
<li><a href="http://www1.maths.leeds.ac.uk/latex/TableHelp1.pdf">http://www1.maths.leeds.ac.uk/latex/TableHelp1.pdf</a></li>
<li><a href="file://media/mueller/5637-0479/TiddlyWiki/docuTableHelp1.pdf">CreatingTabelWithLatex_TableHelp1</a></li>
</html>
<html>
<table border="1">
<tr><th>Aktionen</th><th>Tastaturkürzel</th></tr>
<tr><td>Mathematikmodus <br /> im Text $...$</td><td>Ctrl+Shift+M</td></tr>
<tr><td>Asymptote</td><td>none</td></tr>
<tr><td>BibTeX</td><td>F11</td></tr>
<tr><td>Rechtschreibung prüfen</td><td>Ctrl + Shift + F7</td></tr>
<tr><td>Aufräumen</td><td>none</td></tr>
<tr><td>Kommentar</td><td>Ctrl + T</td></tr>
<tr><td>In Unicode konvertieren</td><td>none</td></tr>
<tr><td>DVI → PDF</td><td>F9</td></tr>
<tr><td>DVI → PS</td><td>F4</td></tr>
<tr><td>Via TeX4ht exportieren</td><td>none</td></tr>
<tr><td>Suchen</td><td>Ctrl + F</td></tr>
<tr><td>Im Verzeichnis finden</td><td>none</td></tr>
<tr><td>Weitersuchen</td><td>Ctrl + M</td></tr>
<tr><td>Gehe zu Zeile</td><td>Ctrl + G</td></tr>
<tr><td>Einrücken</td><td>Ctrl + ></td></tr>
<tr><td>LaTeX</td><td>F2</td></tr>
<tr><td>PDFLaTeX, <br />PDF-Dokument erstellen</td><td>F6</td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td>_{} - subscript</td><td>Ctrl + Shift + D</td></tr>
<tr><td>Fokus Editor / Pdf-An- <br />zeigeprogramm wechseln</td><td>Ctrl + Space</td></tr>
</table>
</html>
<html>
Do you want to know the list of memory leak detecting tools:<br />
<br />
http://www.cs.colorado.edu/homes/zorn/public_html/MallocDebug.html<br />
<br />
This tip generously supported <br />
by: M.Nithyanandham@blr.spcnl.co.in<br />
</html>
<html>
<ul>
<li><table>
<tr align="center"><th colspan="2"> Bronze </th></tr>
<tr><td>Kupfer (90%)</td><td>Zinn (10%)</td></tr>
</table></li>
</ul>
</html>
<html>
<table>
<tr>
<td>
<ul>
<li><b>1</b> ⇒ Baum [<em>hat einen Stamm</em>]</li>
<li><b>2</b> ⇒ Zwillinge [<em>von denen gibt es halt zwei</em>]</li>
<li><b>3</b> ⇒ Kuchengabel [<em>sie hat für gewöhnlich drei Zinken</em>]</li>
<li><b>4</b> ⇒ Auto [<em>es hat vier Reifen</em>]</li>
<li><b>5</b> ⇒ Hand [<em>sie hat fünf Finger</em>]</li>
<li><b>6</b> ⇒ Würfel [<em>er hat sechs Seiten</em>]</li>
<li><b>7</b> ⇒ Zwerg [<em>es sind halt die Sieben Zwerge</em>]</li>
<li><b>8</b> ⇒ Achterbahn [<em>trägt die Zahl bereits im Namen</em>]</li>
<li><b>9</b> ⇒ Regenschirm [<em>der Knauf ist bei dem einen oder<br />
             
anderen Regenschirm wie eine<br />
             
Neun geschwungen</em>]</li>
<li><b>10</b> ⇒ Bibel [<em>hier sind die 10 Gebote enthalten</em>]</li>
</ul>
</td>
<!--
<td>
<ul>
<li><b></b> ⇒ [<em></em>]</li>
<li><b></b> ⇒ [<em></em>]</li>
</ul>
</td>
-->
</tr>
</table>
<h3>Links:</h3>
<ul>
<li>Podcast “Speedlearning“</li>
<li><a href="https://speedlearningschool.de/klassenraum/ausbildung-zum-heilpraktiker/lessons/die-baumliste-teil-1/"
target="_blank" rel="noreferrer noopener">
SpeedLearningSchool :: Die Baumliste - Teil 1</a>
</li
<li><a href="https://speedlearningschool.de/klassenraum/ausbildung-zum-heilpraktiker/lessons/die-baumliste-teil-2/"
target="_blank" rel="noreferrer noopener">
SpeedLearningSchool :: Die Baumliste - Teil 2</a>
</li>
<li><a href="file:///media/mueller/INT-256GB/LernenLernen/Baumliste_100er-Liste.pdf"
<li><a href="file:///media/mueller/INT-256GB/LernenLernen/Baumliste_100er-Liste.pdf"
target="_blank" rel="noreferrer noopener">
All4Brain :: Die Baumliste - PDF</a> <em>(verwendet teilweise andere Symbole)</em>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>Die Körperliste</h3>
<ul>
<li>Anlegen von Listen, vor der Aufnahme von Informationen (z.B. vor einem Vortrag)</li>
<li>10 verschiedene Punkte am eigenen Körper festlegen / definieren</li>
<li><ol>
<li>Beuge dich zu deinen Füßen hinunter und berühre sie ‐ Punkt 1.</li>
<li>Jetzt die Hände auf die Knie ‐ Punkt 2.</li>
<li>Lege deine Hände auf die Oberschenkel ‐ Punkt 3</li>
<li>… </li>
</ol>
<li>Den eigenen Körper zum Merken von Informationen nutzen;</li>
</ul>
</li>
<li><h3>Mind‐Maps</h3>
</li>
<li><h3>Die Geschichtenmethode</h3>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.podcast.de/en/show/401439229/drei-techniken-zum-merken-von-informationen" target="_blank" rel="noreferrer noopener">Der Speedlearning‐Podcast :: Folge 003 ‐ Drei Techniken zum Merken von Informationen (25. März 2019)</a></li>
<li><a href="https://www.podcast.de/en/show/401439229/drei-techniken-zum-merken-von-informationen" target="_blank" rel="noreferrer noopener">Der Speedlearning‐Podcast :: Folge 004 ‐ Wenn der Körper richtig rockt (25. März 2019)</a></li>
<li><a href="https://www.lerntipp.com/lernen-lernen/bildliche-assoziationen-wie-sie-sich-personen-und-dinge-mit-koerperliste-merken"
target="_blank" rel="noreferrer noopener">Lerntipp :: Bildliche Assoziationen mit Körperliste merken</a></li>
</ul>
</html>
<html>
<ul>
<li>Abkürzung für <ul>
<li>“Light detection and ranging“ oder “Light imaging, detection and ranging“,</li>
<li>auch Ladar (“Light amplification by Stimulated Emission of Radiation detection and ranging“)</li>
</ul></li>
<li>Lidar ist eine dem Radar verwandte Methode zur optischen Abstands-<br />
und Geschwindigkeitsmessung sowie zur Fernmessung atmosphärischer<br />
Parameter. </li>
<li>Es ist eine Form des dreidimensionalen Laserscanning. Statt der Radio‐<br />
wellen wie beim Radar werden Laserstrahlen verwendet.</li>
<li>Lidar wird zur Erstellung hochauflösender Landkarten mit Anwendungen<br />
in den Bereichen Vermessung, Geodäsie, Geomatik, Archäologie, Geogra‐<br />
phie, Geologie, Geomorphologie, Seismologie, Meteorologie, Forstwirtschaft<br />
und Airborne Laserscanning verwendet. </li>
<li>Die Technologie wird auch in der Steuerung und Navigation autonomer<br />
Fahrzeuge verwendet. [deshalb die Kooperation zwischen Innoviz Techno‐<br />
logies Ltd. (INVZ) und VW]</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Lidar" target="_blank" rel="noreferrer noopener">Wikipedia</a></li>
<li>UMWA‐Börsenbrief, 05.08.2022</li>
</ul>
</html>
<html>
</ul>
<li>in der Kopfleiste Eintrag “<b>Bearbeiten</b>“ auswählen;</li>
<li>im neuen Untermenue den Eintrag “<b>Änderungen verfolgen</b>“ auswählen;</li>
<li>in diesem neuen Untermenue die gewünschten Einträge anklicken;</li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://praxistipps.chip.de/libreoffice-aenderungen-im-dokument-verfolgen-so-gehts_29808" target="_blank">Chip ‐ Praxistipps :: Libre Office ‐ Änderungen im Dokument nachverfolgen</a></li>
</ul>
</html>
<html>
<ul>
<li>Um einen anderen Symbolsatz zu verwenden, wähle<br />
“Extras“ → “Optionen …“ <br />
→ “LibreOffice“ → “Ansicht“ <br />
→ “Bereich: Benutzeroberfläche“ <br />
→ “Dropdown‐Menü: Symbolstil“</li>
</ul>
</html>
<html>
Wenn man bei LibreOffice die automatische Großschreibung am Satzanfang <br />
deaktivieren will, geht man wie folgt vor:
<ul>
<li>im Menü “Extras“ auf den Eintrag “AutoKorrektur-Optionen“ klicken</li>
<li>zum Register “Optionen“ wechseln</li>
<li>hier die Option “Jeden Satz mit einem Großbuchstaben beginnen“ deaktivieren</li>
</ul>
<img src="./pictures/LibreOfficeWriter_AutomatischeGrossschreibungDeaktivieren.png" height=484 width=520 />
<h3>Links:</h3>
<ul>
<li><a href="https://www.gtkdb.de/index_23_1517.html" target=_blank>Good-To-Know-Database :: LibreOffice Writer: Automatische Großschreibung deaktivieren</a></li>
</ul>
</html>
<html>
<ol>
<li>Öffne in LibreOffice über "Extras" die Option "Anpassen"<br />
und wechsle zum Reiter "Tastatur".
</li>
<li>Hier sind bereits alle Tastenkombinationen zu sehen. Um<br />
einen neuen Shortcut anzulegen, wähle im unteren Ab–<br />
schnitt "Funktionen" zunächst den geünschten Befehl aus.
</li>
<li>Dazu wähle aus dem "Bereich" zunächst den Reiter aus,<br />
hinter dem sich normalerweise im LibreOffice-Menü der<br />
Befehl verbirgt.
</li>
<li>Anschließend ist unter "Funktion" der genaue Befehl her–<br />
auszusuchen und im oberen Fenster das neue Tasten–<br />
kürzel dazu.
</li>
<li>Bestätige die Auswahl mit "Ändern" und schließe das <br />
Fenster über "OK".
</li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://praxistipps.chip.de/libreoffice-eigene-shortcuts-erstellen_29799"
target="_blank" rel="noreferrer noopener">
Chip – Praxistipps :: LibreOffice: Eigene Shortcuts erstellen</a>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>What is a hybrid PDF file?</h3>
<p>
This is a PDF file that is readable by any standard PDF viewer, but that also contains the source file in Writer, Calc, or Impress (ODF, ODS, or ODP) format contained within. The advantage saving your documents as a hybrid PDF is the ability to share with others who may not have LibreOffice installed, but with the ability to also modify the original using LibreOffice.
</p>
<p>
LibreOffice Draw can view and edit PDF files, but has a greatly reduced level of functionality versus modifying the original file.
</p>
</li>
<li><h3>To create a hybrid PDF</h3>
<ol>
<li>Create or open your document, presentation, spreadsheet, etc. in LibreOffice. All document types available in LibreOffice are supported;</li>
<li>go to <b><em>File</em></b> → <b><em>Export as</em></b> → <b><em>Export as PDF…</em></b>;<br />
<img src="./pictures/HowTo_Writer_PDF_Hybrid-4.png" height=433 width=636 title="Create a PDF Hybrid Dialog" /></li>
<li>check (✓) Hybrid PDF (embed ODT file) to insert the LibreOffice editable file into the PDF;</li>
<li>You can also change the other parameters such as compression, image resolution, watermark, etc. Do not forget that large images make for large documents;</li>
<li>Click the Export button to complete the save operation (choice of folder and filename).</li>
</ol>
The PDF that you have just created can be opened in the usual way with any program that can read PDFs but it will also be editable with LibreOffice using drag-and-drop.
All PDFs that you will create from this moment forward by export from LibreOffice will be hybrids until you uncheck this option.
<ul>
<li><b>Video:</b> <a href="https://www.youtube.com/watch?v=EuVZcygoZsI" target="_blank" rel="noreferrer noopener">
MinkCast: Making A PDF Anyone Can Edit (In English)</a></li>
<li><b>Article:</b> <a href="https://web.archive.org/web/20120329191738/http://blogs.computerworlduk.com/simon-says/2012/03/the-magic-of-editable-pdfs/index.htm"
target="_blank" rel="noreferrer noopener">The Magic of Editable PDFs (In English)</a></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.documentfoundation.org/Faq/Writer/PDF_Hybrid" target="_blank" rel="noreferrer noopener">Documentation Foundation :: Frequently asked questions ‐ Writer</a></li>
</ul>
</html>
<html>
<ol>
<li>Wer eine Formel in ein Writer-Dokument einfügen möchte, <br />
öffnet zunächst die Datei in LibreOffice.</li>
<li>Dann:
<ul>
<li> [Version ???] im Menü auf “<b>Einfügen</b>“ → “<b>Objekt</b>“ → “<b>Formel</b>“ klicken.
</li>
<li> [Version 7.4.*] im Menü auf “<b>Einfügen</b>“ <br />
→ “<b>OLE–Objekt</b>“ <br />
→ “<b>Formelobjekt …</b>“ klicken.
</li>
</ul>
</li>
<li>Daraufhin öffnet sich am unteren Rand des Writer-Fensters der Formel-Editor. <br />
Außerdem erscheint eine Leiste mit Elementen, die sich in die Formel einfügen<br />
lassen. Fehlt sie, lässt sie sich per Klick auf Ansicht, Elemente einblenden.</li>
<li>Ist die Formel fertig, wird der Formel-Editor per Druck auf [ESC] oder durch <br />
Klicken in das Dokument, neben die Formel, geschlossen. Später kann er<br />
durch Doppelklick auf die Formel bei Bedarf erneut geöffnet werden.</li>
</ol>
<h3>Beispiele:</h3>
<ul>
<li><code><pre>{ f ( x ) = sum from { { i = 0 } } to { infinity } { {f^{(i)}(0)} over {i!} x^i}} over {<?>} </pre></code></li><br />
<li><code><pre>left ( binom 12 2 right )</pre></code>&binom;<br />
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.schieb.de/758362/libreoffice-writer-formel-einfuegen" target=_blank>Jörg Schieb :: LibreOffice Writer: Formel einfügen </a></li>
<li><a href="https://wiki.openoffice.org/wiki/DE/Dokumentation/OOo_2.x/Handb%C3%BCcher/Writer-Handbuch/Math-Befehlsverzeichnis" target=_blank>OpenOffice :: Writer‐Handbuch :: Math‐Befehlverzeichnis</a></li>
<li><a href="http://www.ooowiki.de/FormeleditorMathematikAlgebra.html" target=_blank>OpenOffice.org-Wiki :: Mathematik - Algebra</a></li>
</ul>
</html>
<html>
<table>
<tr><th>Operation</th><th>Befehl</th><th>Darstellung</th></tr>
<tr><td>Vektor v</td><td>widevec v</td><td>Vektor v</td></tr>
<tr><td>Schriftgrösse ändern</td><td>size <em><Zahlenwert></em> {<em><String></em>} </td><td></td></tr>
<tr><td>Division (Bruch)</td><td>a over b</td><td><center><math mathsize=1.75em><mfrac><mi>a</mi><mi>b</mi></mfrac></math></center></td></tr>
<!--
<tr><td></td><td></td><td></td></tr>
<tr><td></td><td></td><td></td></tr>
<tr><td></td><td></td><td></td></tr>
<tr><td></td><td></td><td></td></tr>
<tr><td></td><td></td><td></td></tr>
-->
</table>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.openoffice.org/wiki/DE/Dokumentation/OOo_2.x/Handbücher/Writer-Handbuch/Math-Befehlsverzeichnis" target="_blank" rel="noreferrer noopener">OpenOffice :: Writer‐Handbuch ‐ Math‐Befehlsverzeichnis</a></li>
</ul>
</html>
<html>
The final equation looks like this:<br />
<br />
<math mathsize=1.25em>
<msub>
<mi>f</mi>
<mi>x</mi>
</msub>
<mo>=</mo>
<mrow>
<mo>{</mo>
<mtable>
<mtr>
<mtd>
<mrow>
<mi>if</mi><mi>x</mi><mo>≥</mo><mn>0</mn><mo>,</mo><mi>x</mi><mo>−</mo><mo>⌊</mo><mi>x</mi><mo>⌋</mo>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mrow>
<mi>if</mi><mi>x</mi><mo><</mo><mn>0</mn><mo>,</mo><mi>x</mi><mo>−</mo><mo>⌈</mo><mi>x</mi><mo>⌉</mo>
</mrow>
</mtd>
</mtr>
</mtable>
</mrow>
</math><br />
<br />
In order to get the large brace bracket on the left side only, you use "left lbrace". The "lbrace" defines a left brace. The "left" asks for LibreOffice Math to resize it as required to fit whatever appears to the right side of the brace.
The right side needs to be an equivalent, but we do not want a brace on the right. This is actually very easy, we use "right none" instead of "right rbrace". This clearly means no right brace.
Now, within that formula, I wrote two conditions that needed to be separated by what I will call "an internal newline" (internal to the formula, at least.) This is accomplished by stacking. The "newline" command is used to separate formalae from each others. In other words, you can't use "newline" to separate two lines within the same formula like presented here. Instead, you stack them with the "stack" keyword and the "#" as the separator:
<code><pre>
stack { <?> # <?> }
</pre></code>
This will work with any number of lines. The syntax is very similar to a matrix except that it only needs to use a "#" instead of "##" to separate lines.
So now we have all the parts and the code of the final complete formula shown above looks like this:
<code><pre>
f_x =
left lbrace
stack {
if x >= 0, x - lfloor x rfloor #
if x < 0, x - lceil x rceil
}
right none
</pre></code>
In my case, both forumlae are about the same length, so I did not bother with any alignment. If yours are long and short, you will notice that by default it will center the choices, which looks weird. They should be left aligned. Only LibreOffice Math does not know that you are using the left brace for a choice so it fails in that way.
To change the alignment, you can use the "alignl" command as follow:
<code><pre>
f_x =
left lbrace
stack {
alignl if x >= 0, x - lfloor x rfloor #
alignl if x < 0, x - lceil x rceil
}
right none
</pre></code>
Now the two choices will be left aligned and the formula looks good.
<h3>Links:</h3>
<ul>
<li><a href="https://linux.m2osw.com/writing-multi-choice-math-formula-libreoffice-math" target="_blank" rel="noreferrer noopener">The Linux Page :: Writing a Multi‐Choice Math Formula in LibreOffice Math</a></li>
</ul>
</html>
<html>
<h3>Gleichungen über mehrere Zeilen</h3>
<p>Wenn Sie eine Gleichung erstellen möchten, die über mehrere Zeilen geht,
z.B.<code><pre>
x=3
y=1
</pre></code>
muss man die folgende Besonderheit beachten.
</p>
<p>Wenn man im Formeleditor die Eingabetaste drückt, springt der Cursor im <br />
Editor zwar in die nächste Zeile, das Ergebnis der Gleichung hat aber <b><em>keinen</em></b> <br />
Zeilenumbruch. Man muss explizit “<b><em>newline</em></b>“ als Kommando eingeben,<br />
um einen Zeilenumbruch in der Gleichung zu erhalten. Dies ist in folgender <br />
Tabelle illustriert:<br />
<table>
<tr><td><b>Markup-Code</td><td><b>Ergebnis</b></td><td><b>Markup-Code</b></td><td><b>Ergebnis</b></td></tr>
<tr><td><b>x = 3<br />y = 1</b></td><td>x=3 y=1</td><td><b>x = 3 <em>newline</em> <br />y = 1</b></td><td>x=3<br />y=1</td></tr>
</table>
</p><p>
Wollen Sie die Rechnung in der nächsten Zeile fortsetzen, ohne eine komplette <br />
neue Gleichung zuschreiben, ist dies nicht direkt möglich, weil Math auf der linken <br />
Seite des Gleichheitszeichens einen Term erwartet. Sie können statt dessen:<br />
<ul>
<li>eine leere Zeichenkette " " benutzen. Dadurch wird die Zeile automatisch links ausgerichtet.</li>
<li>eine leere Gruppierung {} benutzen. Die nächste Zeile ist dann zentriert. Die Ausrichtung<br />
der Gleichheitszeichen untereinander wird im nächsten Abschnitt beschrieben.</li>
</ul>
</p>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.documentfoundation.org/images/3/30/06MH_01MathHandbuch_V34.pdf" target=_blank>The Document Foundation's wiki :: Math‐Handbuch [<em>downloaded</em>]</a></li>
</ul>
</html>
<html>
Die Klammerdarstellung<br />
<br />
<img src="./pictures/LibreOffice-Klammer_01.png" height=62 width=150><br />
<br />
wird durch folgende Zeile erstellt:
<code><pre>
left [ stack { 100 # 5 # 10 } stack { 0 # 105 # 10 } stack { 0 # 0 # 110 } right ]
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.openoffice.org/wiki/DE/Dokumentation/OOo_2.x/Handb%C3%BCcher/Writer-Handbuch/Math-Befehlsverzeichnis#Klammern" target=_blank>OpenOffice :: Writer‐Handbuch :: Math‐Befehlverzeichnis</a></li>
</ul>
</html>
<html>
<h3>Griechische Buchstaben</h3>
<table style="float:left;width:15%;">
<tr><th>Code </th><th>Anzeige</th></tr>
<tr><td>%ALPHA</td><td><center>Α</td></tr>
<tr><td>%ETA</td><td><center>Η</td></tr>
<tr><td>%MY</td><td><center>Μ</td></tr>
<tr><td>%PI</td><td><center>Π</td></tr>
<tr><td>%YPSILON</td><td><center>Υ</td></tr>
<tr><td>%alpha</td><td><center>α</td></tr>
<tr><td>%eta</td><td><center>η</td></tr>
<tr><td>%my</td><td><center>μ</td></tr>
<tr><td>%pi</td><td><center>π</td></tr>
<tr><td>%ypsilon</td><td><center>υ</td></tr>
<tr><td>%varsigma</td><td><center> </td></tr>
</table>
<table style="float:left;width:15%;">
<tr><th>Code </th><th>Anzeige</th></tr>
<tr><td>%BETA</td><td><center>Β</td></tr>
<tr><td>%GAMMA</td><td><center>Γ</td></tr>
<tr><td>%NY</td><td><center>Ν</td></tr>
<tr><td>%PSI</td><td><center>Ψ</td></tr>
<tr><td>%XI</td><td><center>Ξ</td></tr>
<tr><td>%beta</td><td><center>β</td></tr>
<tr><td>%gamma</td><td><center>γ</td></tr>
<tr><td>%ny</td><td><center>ν</td></tr>
<tr><td>%rho</td><td><center>ρ</td></tr>
<tr><td>%varepsilon</td><td><center> </td></tr>
<tr><td>%vartheta</td><td><center> </td></tr>
</table>
<table style="float:left;width:15%;">
<tr align=center><th>Code </th><th>Anzeige</th></tr>
<tr><td>%CHI</td><td>Χ</td></tr>
<tr><td>%JOTA</td><td>Ι</td></tr>
<tr><td>%OMEGA</td><td>Ω</td></tr>
<tr><td>%RHO</td><td>Ρ</td></tr>
<tr><td>%ZETA</td><td>Ζ</td></tr>
<tr><td>%chi</td><td>χ</td></tr>
<tr><td>%jota</td><td>ι</td></tr>
<tr><td>%omega</td><td>ω</td></tr>
<tr><td>%sigma</td><td>σ</td></tr>
<tr><td>%varphi</td><td></td></tr>
<tr><td>%xi</td><td>ξ</td></tr>
</table>
<table style="float:left;width:15%;">
<tr><th>Code </th><th>Anzeige</th></tr>
<tr><td>%DELTA</td><td>Δ</td></tr>
<tr><td>%KAPPA</td><td>Κ</td></tr>
<tr><td>%OMIKRO</td><td>Ο</td></tr>
<tr><td>%SIGMA</td><td>Σ</td></tr>
<tr><td> </td><td></td></tr>
<tr><td>%delta</td><td>δ</td></tr>
<tr><td>%kappa</td><td>κ</td></tr>
<tr><td>%omikron</td><td>ο</td></tr>
<tr><td>%tau</td><td>τ</td></tr>
<tr><td>%varpi</td><td>ϖ</td></tr>
<tr><td> </td></td><td></tr>
</table>
<table style="float:left;width:15%;">
<tr><th>Code </th><th>Anzeige</th></tr>
<tr><td>%EPSILON</td><td>Ε</td></tr>
<tr><td>%LAMBDA</td><td>Λ</td></tr>
<tr><td>%PHI</td><td>Φ</td></tr>
<tr><td>%THETA</td><td>Θ</td></tr>
<tr><td> </td><td></td></tr>
<tr><td>%epsilon</td><td>ε</td></tr>
<tr><td>%lambda</td><td>λ</td></tr>
<tr><td>%phi</td><td>φ</td></tr>
<tr><td>%theta</td><td>θ</td></tr>
<tr><td>%varrho</td><td>ϱ</td></tr>
<tr><td> </td><td></td></tr>
</table>
<br style="clear:both;" />
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.openoffice.org/wiki/DE/Dokumentation/OOo_2.x/Handb%C3%BCcher/Writer-Handbuch/Math-Befehlsverzeichnis" target="_blank">
OpenOffice ‐ Wiki :: Writer‐Handbuch ‐ Befehlsverzeichnis Mathematik</a></li>
</ul>
</html>
<html>
<p>
Ein Inhaltsverzeichnis erzeugt man am besten, indem man den Absätzen,<br />
die im Inhaltsverzeichnis erscheinen sollen, die vordefinierten Absatzvor-<br />
lagen für Überschriften (wie z. B. "Überschrift 1") zuweist. Nachdem man<br />
diese Vorlagen zugewiesen hat, kann man das Inhaltsverzeichnis erzeu-<br />
gen.
</p>
<h2>Ein Inhaltsverzeichnis einfügen</h2>
<ol>
<li> Klicke im Dokument an die Stelle, an der das Inhaltsverzeichnis <br />eingefügt werden soll.</li>
<li> Wähle Einfügen → Verzeichnisse und klicke auf<br /> das Register Verzeichnis.</li>
<li> Wähle im Feld Typ "Inhaltsverzeichnis".</li>
<li> Stelle die gewünschten Optionen ein.</li>
<li> Klicke auf OK.</li>
</ol>
<p>
Wenn man eine abweichende Absatzvorlage für das Inhaltsverzeichnis<br />
verwenden möchte, aktiviert man das Feld weitere Vorlagen im Bereich<br />
Erzeugen und klickt anschließend auf die Schaltfläche (...) neben dem<br />
Markierfeld. Im Dialog Vorlagen zuweisen klickt man auf die Vorlage in<br />
der Liste und anschließend auf die Schaltfläche >> oder die Schalt-<br />
fläche << , um die Gliederungsebene für die Absatzvorlage festzulegen.
</p>
<h2>Aktualisieren eines Inhaltsverzeichnisses</h2>
Führe einen der folgenden Schritte durch:
<ol>
<li> Rechtsklick in das Inhaltsverzeichnis und wähle Verzeichnis aktualisieren.</li>
<li> Wähle Extras → Aktualisieren → Alle Verzeichnisse.</li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://help.libreoffice.org/3.3/Writer/Creating_a_Table_of_Contents/de" target=_blank>LibreOffice Vers. 3.3 :: Inhaltsverzeichnis erstellen</a></li>
<li><a href="https://help.libreoffice.org/latest/de/text/swriter/guide/indices_toc.html?DbPAR=WRITER#bm_id3147104" target=_blank>LibreOffice Vers. 6.0 :: Inhaltsverzeichnis erstellen</a></li>
</ul>
</html>
<html>
<ul>
<li>Um die Notizen der Folien auszudrucken, wähle <br />
“Datei“ → “Drucken …“ → “Register.Impress“ <em>(wohl eher “Tab“ als “Register“ …)</em><br />
und im Abschnitt Dokument “Typ: Notizen“.</li>
</ul>
</html>
<html>
<ul>
<li>Um ein PDF zu editieren, anzupassen resp. zu ändern,<br />
ist <b>LibreOffice Draw</b> ausreichend.
</li>
<li>Es öffnet das PDF im "write"-Modus, sodass man<br />
problemlos Änderungen machen kann.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://itsfoss.com/pdf-editors-linux/"
target="_blank" rel="noreferrer noopener">
IT's FOSS :: Best PDF Editors for Linux to Edit the PDF Content and Extract Pages to Merge in Other PDF Files</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<h3>Textdokument‐Funktionen mit den Funktionstasten</h3>
<table>
<tr>
<th>Tastenkombination</th><th>Effekt</th>
</tr>
<tr>
<td>F2</td><td>Rechenleiste</td>
</tr>
<tr>
<td>Strg+F2 </td><td>Feldbefehl einfügen</td>
</tr>
<tr>
<td>F3 </td><td>AutoText expandieren</td>
</tr>
<tr>
<td>Strg+F3 </td><td>AutoText bearbeiten</td>
</tr>
<tr>
<td>F4 </td><td>Datenquellenansicht öffnen</td>
</tr>
<tr>
<td>Umschalt+F5 </td><td>Nächsten Rahmen auswählen</td>
</tr>
<tr>
<td>F5 </td><td>Navigator ein-/ ausschalten</td>
</tr>
<tr>
<td>Strg+Umschalt+F5 </td><td>Navigator einschalten</td>
</tr>
<tr>
<td>F7 </td><td>Rechtschreibprüfung</td>
</tr>
<tr>
<td>Strg+F7 </td><td>Thesaurus</td>
</tr>
<tr>
<td>F8 </td><td>Erweiterungsmodus</td>
</tr>
<tr>
<td>Strg+F8 </td><td>Markierungen an/aus</td>
</tr>
<tr>
<td>Umschalt+F8 </td><td>Ergänzungsmodus</td>
</tr>
<tr>
<td>Strg+Umschalt+F8 </td><td>Blockmodus</td>
</tr>
<tr>
<td>F9 </td><td>Felder aktualisieren</td>
</tr>
<tr>
<td>Strg+F9 </td><td>Feldbefehle anzeigen</td>
</tr>
<tr>
<td>Umschalt+F9 </td><td>Tabelle berechnen</td>
</tr>
<tr>
<td>Umschalt+Strg+F9 </td><td>Eingabefelder aktualisieren</td>
</tr>
<tr>
<td>Strg+F10 </td><td>Steuerzeichen an/aus</td>
</tr>
<tr>
<td>Taste: F11 </td><td>Fenster Formatvorlagen ein-/ ausschalten</td>
</tr>
<tr>
<td>Umschalt+F11 </td><td>Vorlage erzeugen</td>
</tr>
<tr>
<td>Strg+F11 </td><td>Springt in das Listenfeld “Vorlage anwenden“</td>
</tr>
<tr>
<td>Strg+Umschalt+F11 </td><td>Vorlage aktualisieren</td>
</tr>
<tr>
<td>F12 </td><td>Nummerierung ein</td>
</tr>
<tr>
<td>Strg+F12 </td><td>Tabelle einfügen oder bearbeiten</td>
</tr>
<tr>
<td>Umschalt+F12 </td><td>Aufzählung ein</td>
</tr>
<tr>
<td>Strg+Umschalt+F12 </td><td>Nummerierung / Aufzählung aus</td>
</tr>
</table>
<!-- ----------------------------------------------------------------------------------------------------------- -->
<h3>Tastaturbefehle für Textdokumente</h3>
<table>
<tr>
<th>Tastenkombination</th><th>Effekt</th>
</tr>
<tr>
<td>Strg+A</td><td>Alles auswählen</td>
</tr>
<tr>
<td>Strg+J</td><td>Blocksatz</td>
</tr>
<tr>
<td>Strg+D</td><td>Doppelt unterstreichen</td>
</tr>
<tr>
<td>Strg+E</td><td>Zentriert</td>
</tr>
<tr>
<td>Strg+H</td><td>Suchen und Ersetzen</td>
</tr>
<tr>
<td>Strg+Umschalt+P</td><td>Hochstellen</td>
</tr>
<tr>
<td>Strg+L</td><td>Linksbündig</td>
</tr>
<tr>
<td>Strg+M</td><td>Einzug verkleinern</td>
</tr>
<tr>
<td>Strg+K</td><td>Einzug vergrössern (<em>Vorsicht, könnte selbst erstellt sein!</em>)</td>
</tr>
<tr>
<td>Strg+R</td><td>Rechtsbündig</td>
</tr>
<tr>
<td>Strg+Umschalt+B</td><td>Tiefstellen</td>
</tr>
<tr>
<td>Strg+Umschalt+Y</td><td>Letzter Befehl</td>
</tr>
<tr>
<td>Strg +0 (null)</td><td>Standard-Absatzvorlage anwenden</td>
</tr>
<tr>
<td>Strg+1</td><td>Absatzvorlage “Überschrift 1“ anwenden</td>
</tr>
<tr>
<td>Strg+2</td><td>Absatzvorlage “Überschrift 2“ anwenden</td>
</tr>
<tr>
<td>Strg+3</td><td>Absatzvorlage “Überschrift 3“ anwenden</td>
</tr>
<tr>
<td>Strg+4</td><td>Absatzvorlage “Überschrift 4“ anwenden</td>
</tr>
<tr>
<td>Strg+5</td><td>Absatzvorlage “Überschrift 5“ anwenden</td>
</tr>
<tr>
<td>Strg + Plus Taste(+)</td>
<td>Berechnet den ausgewählten Text (ist beispielsweise 3487+3456<br />
ausgewählt, so wird das Ergebnis dieses Ausdrucks berechnet).<br />
Das Ergebnis wird in die Zwischenablage kopiert und kann von dort in<br />
das Dokument eingefügt werden.</td>
</tr>
<tr>
<td>Strg+Minus (-)</td>
<td>Bedingter Trennstrich; von Ihnen eingefügter Trennstrich im Wort.</td>
</tr>
<tr>
<td>Strg+Umschalt+Minus (-)</td>
<td>Geschützter Bindestrich (wird nicht als Silbentrennzeichen genutzt)</td>
</tr>
<tr>
<td>Strg-* (nur auf dem Nummernblock)</td><td>Makrofeld ausführen</td>
</tr>
<tr>
<td>Strg+Umschalt+Leertaste</td>
<td>Geschütztes Leerzeichen. Geschützte Leerzeichen werden<br />
am Zeilenende nicht umgebrochen und im Blocksatz nicht gedehnt.</td>
</tr>
<tr>
<td>Umschalt+Eingabetaste</td><td>Zeilenumbruch ohne Absatzwechsel</td>
</tr>
<tr>
<td>Strg+Eingabetaste</td><td>Manueller Seitenumbruch</td>
</tr>
<tr>
<td>Strg+Umschalt+Eingabe</td><td>Spaltenumbruch in mehrspaltigen Texten</td>
</tr>
<tr>
<td>Alt+Eingabe</td>
<td>Fügt einen neuen Absatz ohne Nummerierung innerhalb einer Liste ein.<br />
Dies funktioniert aber nicht, wenn sich der Cursor am Ende der Liste befindet.</td>
</tr>
<tr>
<td>Alt+Eingabe</td>
<td>Fügt einen neuen Absatz direkt vor oder nach einem Bereich<br />
oder vor einer Tabelle ein.</td>
</tr>
<tr>
<td>Cursor links</td><td>Schreibmarke nach links</td>
</tr>
<tr>
<td>Umschalt+Cursor links</td><td>Schreibmarke mit Selektion nach links</td>
</tr>
<tr>
<td>Strg+Pfeil links</td><td>Springen an Wortanfang</td>
</tr>
<tr>
<td>Strg+Shift+Pfeil links</td><td>Wortweise nach links selektieren</td>
</tr>
<tr>
<td>Cursor rechts</td><td>Schreibmarke nach rechts</td>
</tr>
<tr>
<td>Umschalt+Cursor rechts</td><td>Schreibmarke mit Selektion nach rechts</td>
</tr>
<tr>
<td>Strg+Pfeil rechts</td><td>Springt an den Anfang des nächsten Wortes</td>
</tr>
<tr>
<td>Strg+Shift+Pfeil rechts</td><td>Wortweise nach rechts selektieren</td>
</tr>
<tr>
<td>Cursor oben</td><td>Cursor um eine Zeile nach oben</td>
</tr>
<tr>
<td>Umschalt+Cursor oben</td><td>Zeile mit Selektion nach oben</td>
</tr>
<tr>
<td>Strg+Pfeil nach oben</td><td>Setzt den Cursor an den Anfang des vorherigen Absatzes</td>
</tr>
<tr>
<td>StrgShift+Pfeil nach oben</td>
<td>Markiert bis zum Absatzanfang. Die nächste Tastatureingabe erweitert<br />
die Auswahl bis zum Anfang des vorherigen Absatzes.</td>
</tr>
<tr>
<td>Cursor unten</td><td>Zeile nach unten</td>
</tr>
<tr>
<td>Umschalt+Cursor unten</td><td>Zeile mit Selektion nach unten</td>
</tr>
<tr>
<td>Strg+Pfeil nach unten</td><td>Bewegen Sie den Cursor zum Ende des Absatzes.</td>
</tr>
<tr>
<td>StrgShift+Pfeil nach unten</td>
<td>Markiert bis zum Ende des Absatzes. Die nächste Tastatureingabe<br />
erweitert die Auswahl bis zum Ende des nächsten Absatzes.</td>
</tr>
<tr>
<td>Pos1</td><td>Sprung zum Zeilenanfang</td>
</tr>
<tr>
<td>Pos1+Umschalt</td>
<td>Zum Zeilenanfang springen und den dazwischen liegenden Inhalt<br />
auswählen</td>
</tr>
<tr>
<td>Ende</td><td>Sprung zum Zeilenende</td>
</tr>
<tr>
<td>End+Shift</td>
<td>Zum Zeilenende springen und den dazwischen liegenden Inhalt<br />
auswählen</td>
</tr>
<tr>
<td>Strg+Pos1</td><td>Sprung zum Dokumentanfang</td>
</tr>
<tr>
<td>Strg+Pos1+Shift</td><td>Sprung mit Selektion zum Dokumentanfang</td>
</tr>
<tr>
<td>Strg+Ende</td><td>Sprung zum Dokumentende</td>
</tr>
<tr>
<td>Strg+Ende+Umschalt</td><td>Sprung mit Selektion zum Dokumentende</td>
</tr>
<tr>
<td>Strg+BildAuf</td><td>Cursor zwischen Text und Kopfzeile wechseln</td>
</tr>
<tr>
<td>Strg+BildAb</td><td>Cursor zwischen Text und Fußzeile wechseln</td>
</tr>
<tr>
<td>Einfg</td><td>Einfügemodus ein/aus</td>
</tr>
<tr>
<td>BildAuf</td><td>Bildschirmseite nach oben</td>
</tr>
<tr>
<td>Umschalt+BildAuf</td><td>Bildschirmseite mit Selektion nach oben</td>
</tr>
<tr>
<td>BildAb</td><td>Bildschirmseite nach unten</td>
</tr>
<tr>
<td>Umschalt+BildAb</td><td>Bildschirmseite mit Selektion nach unten</td>
</tr>
<tr>
<td>Strg+Entf</td><td>Löscht Text bis Wortende</td>
</tr>
<tr>
<td>Strg+Rückschritttaste</td><td>Löscht Text bis Wortanfang<br />
In einer Liste: Löschen eines<br />
leeren Absatzes vor dem aktuel–<br />
len Absatz</td>
</tr>
<tr>
<td>Strg+Entf+Umschalt</td><td>Löscht Text bis Satzende</td>
</tr>
<tr>
<td>Strg+Umschalt+Rück</td><td>Löscht Text bis Satzanfang</td>
</tr>
<tr>
<td>Strg+Tab</td><td>Bei automatischer Wortergänzung: nächster Vorschlag</td>
</tr>
<tr>
<td>Strg+Umschalt+Tab</td><td>Bei automatischer Wortergänzung: voriger Vorschlag</td>
</tr>
<tr>
<td>Strg+Alt+Umschalt+V</td><td>Fügt den Inhalt der Zwischenablage als unformatierten Text ein.</td>
</tr>
<tr>
<td>Strg + double-click or Ctrl + Shift + F10</td>
<td>Wenden Sie diese Kombination an, um den Navigator, die Format–<br />
vorlagen oder andere Fenster schnell an- oder abzudocken.</td>
</tr>
</table>
<!-- --------------------------------------------------------------------------------------------------------------------- -->
<h3>Tastenkombinationen für Absätze und Überschriftenebenen</h3>
<table>
<tr>
<th>Tastenkombination</th><th>Effekt</th>
</tr>
<tr>
<td>Strg+Alt+Cursor Oben</td><td>Aktuellen Absatz oder markierte Absätze einen Absatz nach oben schieben.</td>
</tr>
<tr>
<td>Strg+Alt+Cursor-Unten</td><td>Aktuellen Absatz oder markierte Absätze einen Absatz nach unten verschieben.</td>
</tr>
<tr>
<td>Tab</td><td>Die Überschrift im Format “Überschrift X“ (X = 1-9) wird in der Gliederung um eine Ebene heruntergestuft.</td>
</tr>
<tr>
<td>Umschalt+Tab</td><td>Die Überschrift im Format “Überschrift X“ (X = 2-10) wird in der Gliederung um eine Ebene hochgestuft.</td>
</tr>
<tr>
<td>Strg+Tab</td>
<td>Am Anfang einer Überschrift: Fügt einen Tabulator ein.<br />
Je nach grafischer Benutzeroberfläche ist es möglich, <br />
dass man dies mit Alt+Tab erreichen.<br />
<br />
Um die Überschriftsebenen per Tastatur zu wechseln, muss<br />
der Cursor vor Betätigen der Tasten vor die Überschrift<br />
gesetzt werden.</td>
</tr>
</table>
<!-- ---------------------------------------------------------------------------------------------------- -->
<h3>Tastatursteuerung in Tabellen in LibreOffice Writer</h3>
Strg+Umschalt+T
<table>
<tr>
<th>Tastenkombination</th><th>Effekt</th>
</tr>
<tr>
<td>Strg+A</td><td>Wenn die aktuelle Zelle leer ist: Markiert die ganze Tabelle. Sonst: Markiert den Inhalt der aktuellen Zelle, erneute Betätigung markiert die ganze Tabelle</td>
</tr>
<tr>
<td>Strg+Pos1</td><td>Wenn die aktuelle Zelle leer ist: Springt an den Anfang der Tabelle. Sonst: Springt beim ersten Druck an den Anfang der aktuellen Zelle, beim nächsten Druck an den Anfang der aktuellen Tabelle, beim dritten Druck an den Dokumentanfang.</td>
</tr>
<tr>
<td>Strg+Ende</td><td>Wenn die aktuelle Zelle leer ist: Springt an das Ende der Tabelle. Sonst: Springt beim ersten Druck an das Ende der aktuellen Zelle, beim nächsten Druck an das Ende der Tabelle, beim nächsten Druck an das Dokumentende.</td>
</tr>
<tr>
<td>Strg+Tab</td><td>Fügt einen Tabulator ein (nur in Tabellen). Je nach grafischer Benutzeroberfläche ist es möglich, dass Sie dies mit Alt+Tab erreichen.</td>
</tr>
<tr>
<td>Alt+Pfeiltasten</td><td>Vergrößern/Verkleinern der Spalte/Zeile an rechter/unteren Zellenkante</td>
</tr>
<tr>
<td>Alt+Umschalt+Pfeiltasten</td><td>Vergrößern/Verkleinern der Spalte/Zeile an linker/oberen Zellenkante</td>
</tr>
<tr>
<td>Alt+Strg+Pfeiltasten</td><td>Wie Alt, jedoch wird nur die aktuelle Zelle verändert</td>
</tr>
<tr>
<td>Alt+Strg+Umschalt+Pfeiltasten</td><td>Wie Alt, jedoch wird nur die aktuelle Zelle verändert</td>
</tr>
<tr>
<td>Alt+Einfg</td><td>3 Sekunden in Einfügemodus, Pfeiltaste fügt Zeile/Spalte ein, Strg+Pfeiltaste fügt Zelle ein</td>
</tr>
<tr>
<td>Alt+Entf</td><td>3 Sekunden in Löschmodus, Pfeiltaste löscht Zeile/Spalte, Strg+Pfeiltaste verbindet Zelle mit Nachbarzelle zu einer Zelle
Hebt den Zellschutz alle markierten Tabellen auf. Steht der Cursor irgendwo im Dokument, d. h. ist keine Tabelle markiert, wird der Zellschutz für alle Tabellen aufgehoben.</td>
</tr>
<tr>
<td>Umschalt+Strg+Entf</td><td>Sofern keine vollständige Zelle markiert ist, wird der Text von der Cursorposition bis zum Ende des aktuellen Satzes gelöscht. Befindet sich der Cursor am Ende einer Zelle und es ist keine vollständige Zelle markiert, wird der Inhalt der nächsten Zelle gelöscht.
Sofern keine vollständige Zelle markiert ist, und sich der Textcursor am Ende der Tabelle befindet, wird der auf die Tabelle folgende Satz gelöscht und der Rest des Absatzes in die letzte Zelle der Tabelle eingefügt. Wenn eine leere Zeile der Tabelle folgt, wird diese gelöscht.
Wenn eine oder mehrere Zellen markiert sind, werden alle Zeilen, die die Markierung enthält, gelöscht. Wenn alle Zeilen teilweise oder ganz markiert sind, wird die gesamte Tabelle gelöscht.</td>
</tr>
</table>
<!-- ------------------------------------------------------------------------------------- -->
<h3>Tasten zum Verschieben und Grouml;ßenänderung von Rahmen, Grafiken und Objekten</h3>
<table>
<tr>
<th>Tastenkombination</th><th>Effekt</th>
</tr>
<tr>
<td>Esc</td><td>Cursor steht in einem Textrahmen und kein Text ist ausgewählt: Esc wählt den Textrahmen aus.</td>
Textrahmen ist ausgewählt: Esc entfernt den Cursor aus dem Textrahmen.
F2 oder Eingabetaste oder eine beliebige Taste, die ein Zeichen auf dem Bildschirm erzeugt <td>Wenn ein Textrahmen ausgewählt ist: Setzt den Cursor an das Ende des Texts im Textrahmen. Wenn Sie im Bearbeitungsmodus eine Taste drücken, die ein Zeichen auf dem Bildschirm erzeugt, wird das entsprechende Zeichen hinten an den Text angefügt.
</tr>
<tr>
<td>Alt+Pfeiltasten</td><td>Objekt verschieben.</td>
</tr>
<tr>
<td>Alt+Strg+Pfeiltasten</td><td>Größenänderung durch Bewegen der rechten/unteren Kante.</td>
</tr>
<tr>
<td>Alt+Strg+Umschalt+Pfeiltasten</td><td>Größenänderung durch Bewegen der linken/oberen Kante.</td>
</tr>
<tr>
<td>Strg+Tab</td><td>Wählt die Verankerung (im Punktbearbeitungsmodus) eines Objekts aus. </td>
</tr>
</table>
<h3>Links:</h3>
<ul>
<li> <a href="https://help.libreoffice.org/3.6/Writer/Shortcut_Keys_for_Writer/de" target="_blank">LibreOffice :: Help</a>
</ul>
</html>
<html>
<table>
<tr><th>Code</th><th>Anzeige</th><th>Code</th><th>Anzeige</th><th>Code</th><th>Anzeige</th><th>Code</th><th>Anzeige</th></tr>
<tr><td>%und</td><td><center>∧</center></td><td>%winkel</td><td><center>∠</center></td><td>%element</td><td><center>∈</center></td><td>%identisch</td><td><center>≡</center></td></tr>
<tr><td>%unendlich</td><td><center>∞</center></td><td>%keinelement</td><td><center>∉</center></td><td>%ungleich</td><td><center>≠</center></td><td>%oder</td><td><center>∨</center></td></tr>
<tr><td>%promille </td><td><center>‰</center></td><td>%großgegen</td><td><center>≫</center></td><td>%kleingegen</td><td><center>≪</center></td><td>%strebt</td><td><center>→</center></td></tr>
</table>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.openoffice.org/wiki/DE/Dokumentation/OOo_2.x/Handb%C3%BCcher/Writer-Handbuch/Math-Befehlsverzeichnis" target="_blank">
OpenOffice ‐ Wiki :: Writer‐Handbuch ‐ Befehlsverzeichnis Mathematik</a></li>
<li><a href="https://de.wiktionary.org/wiki/Hilfe:Sonderzeichen/Tabelle#Mathematische_Symbole" target="_blank">Wiktionary :: Sonderzeichen ‐ Mathematische Symbole</a></li>
<li><a href="http://unicode.e-workers.de/entities.php" target="_blank">Alles über Unicode :: HTML‐Entities</a></li>
<li><a href="https://infothek.rotkel.de/tastaturkuerzel/mathematische-zeichen/relationszeichen.html" target="_blank">Rotkel :: Mathematische Zeichen ‐ Relationszeichen</a></li>
</ul>
</html>
<html>
<ul>
<li>Um eine Writer‐Tabelle einfach zu optimieren, einfach<br />
“Tabelle“ → “Größe“ → Zeilen / Spalten gleichmäßig verteilen“<br />
auswählen.</li>
</ul>
</html>
<html>
<ul>
<li>Um vorübergehen ein neues Benutzerprofil zu erstellen oder <br />
ein nicht funktionierendes LibreOffice wiederherzustellen, wähle<br />
“Hilfe“ → “Im abgesicherten Modus neu starten …“</li>
</ul>
</html>
<html>
Um die Bildschirmpräsentation nach einer festgelegten Pause<br />
neu zu starten, wähle:<br />
<br />
Bildschirmpräsentation<br />
→ Präsentations‐Einstellungen … <br />
→ Dropdown‐Liste: Schleife und wiederholen nach<br />
</html>
<html>
Menueleiste "Formatvorlagen"<br />
→ "Absatzvorlage bearbeiten"<br />
→ Tabs "Schrift" & "Schrifteffekt" anpassen
</html>
<html>
<ul>
<li>Um alle Formeln in allen Calc‐Tabellen neu zu berechnen,<br />
die Tastenkombination “Strg + Umschalt + F9“ drücken.</li>
</ul>
</html>
<html>
<ul>
<li>Um Reihen wie A1, A2, A3, A11, A15 in LibreOffice Calc <b>nicht</b> in alpha‐<br />
betischer, sondern in numerischer Folge zu sortieren, aktiviere das Mar‐<br />
kierfeld “Natürliche Sortierung verwenden“ unter “Daten“ → “Sortieren …“<br />
→ “Register: Optionen“.</li>
</ul>
</html>
<html>
<ul>
<li>Um in Calc eine Zahl als Bruch anzuzeigen (bspw. 0.125 als 1/8),<br />
wähle “Format“ <br />
→ “Zellen …“ <br />
→ “Register: Zahlen“ <br />
→ “Bereich: Kategorie“ <br />
→ “Eintrag: Bruch“</i>
</ul>
</html>
<html>
Die möglichen Schritte, um ein Sonderzeichen einzufügen:
<ol>
<li>Das ∑ -Symbol in der Werkzeugleiste drücken - es erscheint der Dialog zum Sonderzeicheneinfügen: <br />
Man wählt die Kategorie des Sonderzeichens, klickt es an und drückt auf Übernehmen.<br />
→ Es erscheint aber nicht das Sonderzeichen, sondern wieder ein Kommando, das<br />
dem Formelprogramm sagt, welches Zeichen man gewählt hat. Wieso?</li>
<br />
<li>Das ist die zweite und etwas schnellere Möglichkeit:<br />
Man kann mit <code><pre>%<<em>Sonderzeichenname</em>></pre></code> geschwind das Sonderzeichen eingeben, ohne einen Dialog zu benötigen. <br />
Bei häufig verwendeten Symbolen ist das eine enorme Arbeitsersparnis.<br />
<br />
<b>Beispiel:</b><br />
Für
<code><pre>λ</pre></code>
schreibt man
<code><pre>%lambda</pre></code></li>
</ol>
<ul>
</li><a href="https://www.openoffice.org/de/doc/howto/formel/formel05-sonderzeichen.html" target=_blank>OpenOffice :: Formeln ‐ Sonderzeichen</a></li>
</ul>
</html>
<html>
<ul>
<li>Um im Writer den Inhalt eines anderen Dokuments im aktuellen<br />
Dokument anzuzeigen, wähle “Einfügen“ → “Bereich …“ und<br />
aktiviere das Markierfeld “Verknüpfung“.
</ul>
</html>
<html>
<ul>
<li>Um einen Teil eines bearbeitbaren Writer‐Dokuments schreibgeschützt zu lassen,<br />
wähle “Einfügen“ → “Bereich …“ und füge dem Bereich Text hinzu. Klicke nun mit<br />
der rechten Maustaste auf den Bereich, wähle “Bereich bearbeiten … “ und akti‐<br />viere das Markierfeld “Schützen“.
</ul>
</html>
<html>
<ul>
<li>Durch eine komischen Zufall habe ich im Writer eine mir unbekannte <br />
Einstellung aktiviert, so dass am linken Textrand ein senkrechter Strich<br />
jedes Mal dann auftauchte, wenn ich eine Zeilenumbruch eingegeben<br />
habe:<br />
<img src="./pictures/LibreOfficeWriter_NervenderStrich.png" height=219 width=399 /> <!-- height=292 width=532 -->
<br />
Die Lösung ist:<br />
Menü “Ansicht“ → “Änderungen“ → hier den Haken entfernen
</ul>
</html>
<html>
u.a. um mathematische Texte zu schreiben;
<ul>
<li>Aufruf des Formel-Editors: <br />
<code><pre>
Alt + e + j
</pre></code></li>
<li>Betragszeichen:<br />
<code><pre>
lline <em>STRING</em> rline
</pre></code></li>
</ul>
</html>
<html>
Um Text in mehrere Spalten zu verteilen, den Text markieren<br />
und folgendes auswählen:<br />
<br />
Format → Spalten …<br />
</html>
<html>
<h3>Problem:</h3>
In einer mathematischen Formel sollte der Vektor OR verwendet werden:
<code><pre>
widevec B `=` {widevec OR}
</pre></code>
Das führte aber dazu, dass das Programm den booleschen Wert<br />
“or“ erkannt hat und mit der obigen Anweisung nichts anfangen<br />
konnte.<br />
<h3>→ Lösung:</h3>
Den booleschen Wert in doppelte Anführungszeichen setzen:
<code><pre>
widevec B `=` {widevec "OR"}
</pre></code>
</html>
<html>
Um eine Tabellenüberschrift in Writer zu wiederholen, wenn sich eine Tabell über mehr als eine Seite erstreckt, wähle "Tabelle" → "Tabelleneigenschaften …" → "Register: Textfluss" → Markierfeld: Überschrift wiederholen".
</html>
<html>
Um in Calc die Anzahl der Tage des aktuellen Monats zu ermitteln, <br />
geben Sie <code><pre>=TAGEIMMONAT(HEUTE())</pre></code> ein.
</html>
<html>
<ul>
<li>Um in Calc eine Dropdown‐Liste zu erstellen, aus welcher <br />
der Benutzer einen Wert auswählen kann anstatt diesen<br />
einzugeben, ist “Daten“ → “Gültigkeit …“ auszuwählen.</li>
</ul>
</html>
<html>
<b>Problem: </b>
In der "Tabelle3" habe ich folgende Formel:
=WENN(Tabelle2.A1>=100;"grün";"rot"). <br>
Nun möchte ich, dass anstelle der Wörter "grün" oder "rot" die Zelle in der ent-<br>
sprechenden Farbe erscheint. Ist das möglich?<br>
von Gaby Salvisberg 12.04.2011<br>
<br>
<b>Lösung:</b>
Ja, das erreichen Sie mit einer bedingten Formatierung. <br>
Klicken Sie in die Zelle, die entsprechend eingefärbt werden soll. <br>
Öffnen Sie <i>Format/Bedingte Formatierung</i> und wählen Sie unter
"Bedingung 1" <br>
die Option "Formel ist". <br>
Als Formel tippen Sie dies ein: Tabelle2.A1>=100. Bei der "Zellvorlage" wählen <br>
Sie Neue Vorlage und taufen sie z.B. "grün". Wechseln Sie zum Reiter Hintergrund <br>
und wählen den gewünschten Grünton aus. Klicken Sie auf OK.<br>
<br>
<img src="./pictures/LibreOfficeCalc_ZellenPerFormelEinfaerben.jpg" alt="">
<br>
Den roten Hintergrund erstellen Sie einfach auf die gleiche Weise als "Bedingung 2"<br>
mit der Formel Tabelle2.A1<100. Die bedingte Formatierung lässt sich per Formatpinsel <br>
in die weiteren Zellen kopieren. (PCtipp-Forum)<br>
<br>
(http://www.pctipp.ch/tipps-tricks/kummerkasten/office/artikel/libreoffice-calc-zellen-per-formel-einfaerben-55835/)
</html>
<html>
<ul>
<li>Um eine Auswahl in Draw so zu vergrößern, daß<br />
sie in das gesamte Fenster passt, drücke die Taste<br />
<b> [/] (<em>Division</em>)</b> auf dem Ziffernblock.<br />
</li>
</html>
<html>
<ul>
<li>Um die gesamte Seite in das Zeichenfenster einzupassen,<br />
drücke [*] auf dem Ziffernblock.<br />
</ul>
</html>
<html>
<ul>
<li>Um in Draw / Impress mehrfach die gleiche Form einzufügen,<br />
mach einen Doppelklick auf ein Werkzeugt in der Symbolleiste<br />
“Zeichnung“, um es für wiederholte Aufgaben zu verwenden.</li>
</ul>
</html>
<html>
Man kann ein Objekt in Draw auf eine andere Ebene verschieben, indem <br />
man es so lange angeklickt hält, bis die Kanten blinken. Dann ziehgt man<br />
es auf die Registerkarte der Ebene, auf der man es verschoben haben<br />
möchte.
</html>
<html>
mit Hilfe von Heißkleber und Feuerzeug <br />
→ um einen abgebrochenen Schlüsselrest <br />
aus einem Schlüsselloch zu bekommen<br />
<br />
Eine Stange Heißkleber mit dem Feuerzeug erhitzen,<br />
das erwärmte Ende vom Heißkleber auf den Schlüsselrest drücken,<br />
(ca. 3 Min.) warten, bis er abgekühlt ist und dann den Schlüsselrest herausziehen.<br />
<br />
aus: <a href="https://www.daserste.de/unterhaltung/quiz-show/wer-weiss-denn-sowas/videos/Abgebrochenen-Schluessel-leicht-aus-einem-Schloss-entfernen-wer-weiss-denn-sowas-folge-545-video-100.html" target="_blank" rel="noreferrer noopener">Wer weiss denn sowas?</a>
</html>
<html>
You can limit the size of "data area" using ulimit and limit. <br />
<br />
• <b>Under sh or ksh:</b><br />
<code>$ ulimit -d SIZE_IN_KB</code><br />
<br />
Displays all current resource limits <br />
<code>$ ulimit -a</code> <br />
<br />
⇒ Beispiel-Ausgabe:<br />
Die jeweilige Option (hier: –d für "data seg size") ist in <br />
der Ausgabe mit angegeben:
<code><pre>
mueller@Debian-Laptop:~$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 15786
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 65536
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 15786
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
</pre></code>
<br />
• <b>Under csh or tcsh:</b><br />
<code>$ limit datasize SIZE_IN_KB</code> <br />
<br />
Displays all current resource limits <br />
<code>$ limit</code> <br />
<br />
<br />
For example:<br />
<code>
$ ulimit -d 141073<br />
$ ulimit -a<br />
</code>
</html>
<html>
If you want a file with line numbers (say for printing).<br/>
You can use the <b>nl</b> command in linux.<br/>
<br/>
<b>$ nl file.c > file.c.num</b><br/>
See man for more options.<br/>
<br/>
Normally nl gives line numbers only for non blank lines.<br/>
<br/>
To force it to give it to all lines use -ba option:<br/>
<br/>
<b>$ nl -ba file.c > file.c.all_num</b><br/>
<br/>
</html>
<html>
<pre>
find / -type l -print |perl -nle '-e || print';
</pre>
This will look for all links that are dead and print it<br />
out. It can be piped to a file and unlink it later. It is<br />
wise to list the links first and save the output to a <br />
file. This is in case if the links are needed by users <br />
which remove those files temporary for testing or<br />
housekeeping.<br />
<br />
This tip generously supported <br />
by: tyl@computer.org<br />
<br />
</html>
<html>
The Matrix is a science fiction action movie from 1999. It was written and directed by the Wachowski Brothers. The film has falling green characters on screen. The digital rain is representing the activity of the virtual reality in “The Matrix“. You can now have Matrix digital rain with CMatrix on a Linux or Unix terminal too.
<h3>Install cmatrix</h3>
Install and setup CMatrix as per your Linux/Unix version.
How to install cmatrix on a Debian/Ubuntu Linux
Type the following apt-get command/apt command on a Debian/Ubuntu/Mint Linux:
<code><pre>
$ sudo apt install cmatrix
</pre></code>
Sample outputs:
<code><pre>
[sudo] password for vivek:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
cmatrix-xfont
The following NEW packages will be installed:
cmatrix
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 15.8 kB of archives.
After this operation, 50.2 kB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu artful/universe amd64 cmatrix amd64 1.2a-5build2 [15.8 kB]
Fetched 15.8 kB in 0s (19.7 kB/s)
Selecting previously unselected package cmatrix.
(Reading database ... 205388 files and directories currently installed.)
Preparing to unpack .../cmatrix_1.2a-5build2_amd64.deb ...
Unpacking cmatrix (1.2a-5build2) ...
Setting up cmatrix (1.2a-5build2) ...
Processing triggers for man-db (2.7.6.1-2) ...
</pre></code>
<h3>How to install cmatrix on an Arch Linux</h3>
Type the following pacman command:
<code><pre>$ sudo pacman -S cmatrix</pre></code>
<h3>How to install cmatrix on a FreeBSD system</h3>
To install the port run:
<code><pre># cd /usr/ports/misc/cmatrix/ && make install clean</pre></code>
OR add the binary package using the pkg command
<code><pre># pkg install cmatrix</pre></code>
<h3>How to install cmatrix on a macOS Unix</h3>
Type the following brew command:
<code><pre>$ brew install cmatrix</pre></code>
<h3>How to install cmatrix on a OpenBSD</h3>
Type the following pkg_add command:
<code><pre># pkg_add cmatrix</pre></code>
<h3>Using cmatrix</h3>
Simply type the command:
<code><pre>$ cmatrix</pre></code>
cmtarix in action Simulates the display from
cmtarix in action
<h3>Using keyboard</h3>
The following keystrokes are available during execution (unavailable in -s mode):
<table border="1">
<tr><th>KEYSTROKES</th><th>Description</th></tr>
<tr><td>a</td><td>Toggle asynchronous scroll</td></tr>
<tr><td>b</td><td>Random bold characters</td></tr>
<tr><td>B</td><td>All bold characters</td></tr>
<tr><td>n</td><td>Turn off bold characters</td></tr>
<tr><td>0-9</td><td>Adjust update speed</td></tr>
<tr><td>! @ # $ % ^ & )</td><td>Change the color of the matrix to the corresponding color:<br /> ! &hyphen red,<br /> @ &hyphen
green,<br /> # &hyphen yellow, <br />$ &hyphen blue, <br />% &hyphen magenta, <br />^ &hyphen cyan, <br />& &hyphen white,<br /> ) &hyphen black.</td></tr>
<tr><td>q</td><td>Quit the program</td></tr>
</table>
You can pass the following option to the cmatrix command:
<code><pre>$ cmatrix -h</pre></code>
Sample outputs:
<code><pre>
-a: Asynchronous scroll
-b: Bold characters on
-B: All bold characters (overrides -b)
-f: Force the linux $TERM type to be on
-l: Linux mode (uses matrix console font)
-o: Use old-style scrolling
-h: Print usage and exit
-n: No bold characters (overrides -b and -B, default)
-s: "Screensaver" mode, exits on first keystroke
-x: X window mode, use if your xterm is using mtx.pcf
-V: Print version information and exit
-u delay (0 - 10, default 4): Screen update delay
-C [color]: Use this color for matrix (default green)
</pre></code>
<h3>Links:</h3>
<a href="https://www.cyberciti.biz/open-source/command-line-hacks/matrix-digital-rain-on-linux-macos-unix-terminal/" target=_blank>nixCraft :: Linux/Unix desktop fun: Simulates the display from “The Matrix“</a><br />
<a href="https://github.com/abishekvashok/cmatrix" target=_blank>“The Matrix“ :: Source Code</a>
</html>
<html>
<ul>
<li> Um herauszufinden, welcher Fenstermanager gerade läuft,<br />
kann man folgenden Befehl nutzen:
<code><pre>
ls -l /etc/alternatives/ | grep -i window
</pre></code>
Die Ausgabe für Ubuntu lautet
<code><pre>
lrwxrwxrwx 1 root root 15 Mär 16 2018 x-window-manager -> /usr/bin/mutter
lrwxrwxrwx 1 root root 31 Mär 16 2018 x-window-manager.1.gz -> /usr/share/man/man1/mutter.1.gz
</pre></code>
In diesem Fall wird also Mutter verwendet.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.ubuntuusers.de/Fenstermanager/"
target="_blank" rel="referrer noopener">
Ubuntu-Users :: Fenstermanager</a>
</li>
</ul>
</html>
<html>
<ul>
<li>CUPS := <em>Common Unix Printing System</em></li>
<li>Web‐GUI :: <b><a href="http://localhost:631" target=_blank>http://localhost:631</a></b></li>
<li><h3>Auflisten, welche Print-Jobs bisher bearbeitet wurden:</h3>
<code><pre>lpstat -W completed</pre></code>
</li>
<li><h3>Aktuell anstehende Print-Jobs auflisten:</h3>
<code><pre>lpstat</pre></code>
</li>
<li><h3>Nur die Job ID ausgeben:</h3>
<code><pre>lpstat | awk -F" " '{ print $1 }'</pre></code>
</li>
<li><h3>Delete pending jobs:</h3>
<code><pre>cancel ‐a <em><JobID></em></pre></code>
</li>
<li><h3>Liste der angeschlossenen Drucker ausgeben:</h3>
<code><pre>lpstat –a</pre></code>
</li>
<li><h3>Datei auf beliebigen Drucker ausgeben:</h3>
<code><pre>lpr –P <em>DRUCKER-NAME</em> <em>FILE</em></pre></code>
</li>
<li><h3>Die aktuell anstehenden Aufträge auflisten:</h3>
<code><pre>lpstat –o [<em>DRUCKER-NAME</em>]</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.ubuntuusers.de/CUPS/"
target="_blank" rel="noreferrer noopener">
Ubuntu‐Users :: CUPS</a>
</li>
<li><a href="https://www.brennan.id.au/15-System_Printing.html"
target="_blank" rel="noreferrer noopener">
Brennan :: System Printing</a>
</li>
<li><a href="https://www.pc-erfahrung.de/linux/lpi/lpi-11072.html"
target="_blank" rel="noreferrer noopener">
PC‐Erfahrung :: Linux lpi</a>
</li>
<li><a href="https://www.linux-magazin.de/ausgaben/2008/05/druck-machen/"
target="_blank" rel="noreferrer noopener">
Linux‐Magazin :: Druck machen</a>
</li>
<li><a href="https://www.linux-community.de/ausgaben/linuxuser/2016/10/handarbeit/"
target="_blank" rel="noreferrer noopener">
Linux‐Community :: Handarbeit</a>
</li>
<li><a href="https://technobrice.com/de/tech/tbg/lpr-command-examples-in-linux/"
target="_blank" rel="noreferrer noopener">
TechnoBrice :: lpr-Befehlsbeispiele unter Linux</a>
</li>
<li><a href="https://de.linux-console.net/?p=32687"
target="_blank" rel="noreferrer noopener">
Linux–Console.net :: Drucken Sie Dateien von Ihrem Linux-Terminal aus</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<lI><code>$ sudo apt-get install sox</code>
</li>
<li><code>$ sudo apt-get install libsox-fmt-all</code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://vitux.com/play-mp3-files-from-debian-command-line/"
target="_blank" rel="noreferrer noopener">
Vitux :: How to Play MP3 Files from Debian 10 Command Line</a>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>Schlüssel-Paar erzeugen:</h3>
<code><pre>
age‐keygen [‐o keys.txt]
</pre></code>
</li>
<li><h3>File verschlüsseln:</h3>
<code><pre>
age ‐r <em><public key of recipient></em> < <em>file</em> > <em>file.age</em>
</pre></code>
oder
<code><pre>
age ‐‐encrypt ‐i <em>keys.txt</em> ‐o <em>file.age</em> <em>file</em>
</pre></code>
</li>
<li><h3>File entschlüsseln:</h3>
<code><pre>
age ‐d ‐r <em>keys.txt</em> ‐o <em>file</em> <em>file.age</em>
</pre></code>
oder
<code><pre>
age ‐‐decrypt ‐i <em>keys.txt</em> ‐o <em>file</em> <em>file.age</em>
</pre></code>
</li>
<li><h3>Verschlüsseln mit Passphrase <em>(Passphrase Method)</em></h3>
<code><pre>
$ age --passphrase -o passwd.age passwd
Enter passphrase (leave empty to autogenerate a secure one):
Using the autogenerated passphrase "release-response-step-brand-wrap-ankle-pair-unusual-sword-train".
$ age --decrypt -o passwd passwd.age
Enter passphrase:
</pre></code>
</ul>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://lindevs.com/install-age-command-for-encrypting-files-on-ubuntu/"
target="_blank" rel="noreferrer noopener">
Lindevs :: Install age Command for Encrypting Files on Ubuntu 20.04 </a>
</li>
<li><a href="https://www.linux-magazine.com/Issues/2021/252/Master-of-the-Keys"
target="_blank" rel="noreferrer noopener">
Charly‐s Column ‐ Age</a>
</li>
<li><a href="https://opensource.com/article/21/7/linux-age"
target="_blank" rel="noreferrer noopener">
OpenSource :: Encrypt and decrypt files with a passphrase on Linux </a>
</li>
</ul>
</html>
<html>
<ol>
<li><h3>Grype</h3>
Linux-Magazin 11/2022
</li>
<li><h3>Trivy</h3>
Linux-User 10/2022
</li>
</ol>
</html>
<html>
<h3>To–do–Liste für gelöschte Dateien</h3>
<ol>
<li>Papierkorb kontrollieren:<br />
Grafische Dateimanager löschen die Dateien zumeist<br />
nicht direkt.
</li>
<br />
<li>RAM–Dateisystem unter <b>/mnt</b> einbinden, um darauf<br />
das Journal ohne Beeinflußung des Root–Dateisys–<br />
tems zwischenzuspeichern:
<code><pre>
sudo mount -t tmpfs tmpfs /mnt
</pre></code>
</li>
<br />
<li>Angeschlossene Laufwerke und ihre Mountpoints auflisten<br />
lassen, um den Gerätenamen des betroffenen Dateisys–<br />
tems herauszufinden:
<code><pre>
lsblk –fp
</pre></code>
</li>
<br />
<li>Größe und Inode–Nummer des Ext4–Journals ermitteln<br />
(Standard: 1 GByte, Inode 8):
<code><pre>
sudo dumpe2fs /dev/sda3 | grep Journal
</pre></code>
Dabei muss man den Gerätenamen (<code><b>/dev/sda3</b></code>) gemäß<br />
der Ausgabe von <code><b>lsblk</b></code> aus dem vorherigen Schritt an–<br />
passen. Bei verschlüsselten Ubuntu-Installationen lautet<br />
der Gerätename des Root–Dateisystems z.B. <code><b>/dev/map–<br />
per/vgubuntu-root</b></code>.
</li>
<br />
<li>Ausstehende Dateioperationen abschließen lassen und<br />
das Journal im RAM–Dateisystem speichern:
<code><pre>
sync && debugfs -R “dump <8> /mnt/ext4.journal“ /dev/sda3
</pre></code>
Die Inode–Nummer (<code><b><8></b></code>) ist Standard, kann im Einzelfall<br />
aber abweichen — die korrekte Inode–Nummer findet man<br />
in der Ausgabe des vorherigen Schritts.
</li>
<br />
<li>Journalkopie <code><b>/mnt/ext4.journal</b></code>auf einen (externen) Da–<br />
tenträger (USB–Stick), NAS oder per <code><b>scp</b></code> auf einen ande–<br />
ren Rechner kopieren.
</li>
<br />
<li>Rechner ausschalten und Festplatte ausbauen oder mit<br />
Livesystem starten, bis die Daten wiederhergestellt sind.
</li>
</ol>
<h3>Links:</h3>
<ul>
<li>
<a href=""
target="_blank" rel="noreferrer noopener">
c't Linux–Praxis 2023, “Daten sichern und wiederherstellen“, S. 117</a>
</li>
<!--
<li>
<a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<meta pkgacquire />
<ul>
<li>Über deb-Pakete können Programme unter Debian-Systemen<br />
installiert werden, die nicht in den offiziellen Paketquellen verfügbar sind.
</li>
<li>Sie können sich deb-Pakete wie exe-Dateien in Windows vorstellen.<br />
Software-Anbieter stellen die Pakete als Download für Linux bereit.<br />
Die anschließende Installation klappt analog zu Windows über einen<br />
Doppelklick oder alternativ über das Terminal. Dabei lassen sich die<br />
Pakete unter allen Debian-basierten Linux-Betriebssystemen installieren.<br />
Wir zeigen Ihnen folgend die Installation anhand von Ubuntu.
</li>
<li><h3>deb-Pakete über das Software-Center installieren</h3>
<ul>
<li>Die einfachste Methode ist die Installation über die Software-<br />
Installation.
</li>
<li>Hier gleicht die Installation der deb-Datei der Installation<br />
von exe-Dateien unter Windows. Laden Sie dazu die deb-Datei<br />
herunter und navigieren Sie zu deren Download-Ordner.
</li>
<li>Dort machen Sie einen Doppelklick auf die Datei und es öffnet sich<br />
automatisch die Software-Installation.
</li>
<li>Am Beispiel von Ubuntu heißt<br />
das Mittel zum Zweck Software-Installation — in anderen Debian-<br />
basierten Linux-Betriebssystemen öffnen sich alternative Lö–<br />
sungen.
</li>
<li>Der Ablauf bleibt aber gleich. Klicken Sie auf "Installieren"<br />
und die Installation startet.
</li>
</ul>
</li>
<li><h3>deb-Pakete über das Terminal via <em>apt</em> installieren</h3>
<ul>
<li>Nutzen Sie lieber das Terminal und nicht die grafische Installation,<br />
geht das natürlich auch problemlos über den Paketmanager<br />
<em>apt</em>.
</li>
<li>Hierbei werden die Abhängigkeiten zu anderen Paketen<br />
automatisch aufgelöst und mitinstalliert.
</li>
<li>Dieser Weg der Installation<br />
klappt auf allen Debian-basierten Systemen.<br />
</li>
<li>Öffnen Sie ein Terminal entweder über die Tastenkombination<br />
[Strg] + [Alt] + [T] oder klicken Sie auf entsprechendes Icon.
</li>
<li>Im Terminal geben Sie nun folgenden Befehl ein:
<pre><code>sudo apt install /PFAD/ZUR/DATEI/NAMEDESPAKETS.deb</code></pre>
… [Enter] drücken.
</li>
<li>Geben Sie bei Nachfrage Ihr Passwort ein und bestätigen Sie erneut mit [Enter].
</li>
<li>Das deb-Paket mit all seinen Abhängigkeiten zu anderen Paketen wird<br />
nun automatisch von apt installiert. Anschließend ist das Programm zur<br />
sofortigen Nutzung verfügbar.
</li>
</ul>
</li>
<li><h3>Fehlermeldung:</h3>
<code><pre>
N: Der Download wird als root und nicht Sandbox-geschützt durchgeführt, da auf die Datei
“/home/mueller/Downloads/zoom_amd64.deb“ durch den Benutzer “_apt“ nicht zugegriffen werden kann.
- pkgAcquire::Run (13: Keine Berechtigung)
</pre></code>
<ul>
<li>
⇒ This is a known bug: <a href="https://bugs.launchpad.net/ubuntu/+source/aptitude/+bug/1543280" target="_blank" rel="noreferrer noopener">Link</a> bzw. [3]<br />
<br />
They suggest running the following command:<br />
<code><pre>
sudo chown _apt /home/mueller/Downloads
</pre></code>
</li>
<li>The user _apt is created by the postinst script of the apt package (/var/lib/dpkg/info/apt.postinst):
<code><pre>
# add unprivileged user for the apt methods
adduser --force-badname --system --home /nonexistent --no-create-home --quiet _apt || true
</pre></code>
It's the owner of /var/cache/apt/archives/partial and /var/lib/apt/lists/partial<br />
and used by APT to download packages, package list, and other things.<br />
</li>
<li>Usually apt uses the user _apt to download packages. In your case _apt<br />
doesn't have write permission to either /var/cache/apt/archives/partial/ or<br />
an existing file /var/cache/apt/archives/partial/samba-libs_2%3a4.5.8+dfsg-0ubuntu0.17.04.1_i386.deb<br />
so it downloaded the file as root.<br />
<br />
Make sure /var/cache/apt/archives/partial/ and everything below it are<br />
writeable for _apt, e.g. by running:
<code><pre>
sudo chown -Rv _apt:root /var/cache/apt/archives/partial/
sudo chmod -Rv 700 /var/cache/apt/archives/partial/
</pre></code>
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>[1] <a href="https://www.heise.de/tipps-tricks/DEB-in-Debian-Systemen-installieren-so-klappt-s-4926444.html"
target="_blank" rel="noreferrer noopener">
Heise–Tipps :: DEB in Debian–Systemen installieren – so klappt's </a>
</li>
<li>[2] <a href="https://askubuntu.com/questions/810202/what-is-the-sandbox-user-apt-on-my-system"
target="_blank" rel="noreferrer noopener">
AskUbuntu :: What is the sandbox user apt on my system</a>
</li>
<li>[3] <a href="https://linuxconfig.org/understanding-the-download-is-performed-unsandboxed-as-root-apt-error-in-ubuntu"
target="_blank" rel="noreferrer noopener">
LinuxConfig :: Understanding the “Download is performed unsandboxed as root” APT Error in Ubuntu</a>
</li>
</ul>
</html>
<html>
<ul>
<li>Mit dem Befehl
<code><pre>
sudo update-alternatives --config x-www-browser
</pre></code>
wird ein Menü wie das Folgende angezeigt:
<code><pre>
Es gibt 2 Auswahlmöglichkeiten für die Alternative x-www-browser (welche /usr/bin/x-www-browser bereitstellen).
Auswahl Pfad Priorität Status
------------------------------------------------------------
* 0 /usr/bin/firefox-esr 70 automatischer Modus
1 /usr/bin/chromium 40 manueller Modus
2 /usr/bin/firefox-esr 70 manueller Modus
Drücken Sie die Eingabetaste, um die aktuelle Wahl[*] beizubehalten,
oder geben Sie die Auswahlnummer ein:
</pre></code>
Jetzt ist der gewünschte Eintrag auszuwählen und einzugeben.
</li>
<br />
<li>Mit diesem Befehl <code><b>update-alternatives</b></code> lassen sich die <br />
Einstellungen bzgl. der Default-Programme verwalten:<br />
<br />
<ul>
<li>die Gruppen-Namen auflisten:
<code><pre>
sudo update-alternatives --get-selections
</pre></code>
</li>
<li>den Eintrag für den Default-Editor bearbeiten:
<code><pre>
sudo update-alternatives --config editor
</pre></code>
</li>
</ul>
</li>
</ul
<h3>Links:</h3>
<ul>
<li><a href="https://vitux.com/how-to-set-the-default-browser-on-debian-trough-the-command-line/"
target="_blank" rel="noreferrer noopener">
VITUX :: How to set default Browser with the command line? </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
Remove problematic lists by
<code><pre>
sudo rm -r /var/lib/apt/lists/*
</pre></code>
and then retry with
<code><pre>
sudo apt update
</pre></code>
<h3>Links:</h3>
<ul>
<lI><a href="https://askubuntu.com/questions/1339093/clearsigned-file-error-when-attempting-to-update-packages"
target="_blank" rel="noreferrer noopener">
Ubuntu Ask :: Clearsigned file error when attempting to update packages</a>
</li>
</ul>
</html>
<html>
<meta File lässt sich nicht löschen />
<ul>
<li><h3>Problem:</h3>
Bei Aufruf eines ls-Befehls erschien folgende Fehlermeldung:
<pre><code>ls: Ungültige Option -- y
„ls --help“ liefert weitere Informationen.</code></pre>
</li>
<li><h3>Grund:</h3>
Nach einiger Analyse der Filenamen habe ich ein File ge–<br />
funden, das mit einem "-" (dash) begann:
<pre><code>-yXoOt4q.pdf.part</code></pre>
Da die Bash alles, was mit einem Dash beginnt, als Option <br />
wertet, und in diesem Fall für den ls-Befehl keine <code><b>-y</b></code> gibt,<br />
kam es zu dieser Fehlermeldung.
</li>
<li><h3>Lösung:</h3>
Um eine Fileliste mit dem ls-Befehl erstellen zu können, muß<br />
der Befehl wie folgt beginnen:
<pre><code>ls -la ./*…</code></pre>
z.B.
<pre><code>ls -latr ./*.part</code></pre>
dh. den Filenamen muss <code><b>./</b></code> voranstehen;
</li>
</ul>
</html>
<html>
Um herauszufinden, ob die Linux-Version auf einem 32-Bit‐ oder <br />
64-Bit-Rechner läuft, gibt es folgende Befehle:
<ul>
<li>Get ALL information about CPU on Linux, execute: <br /><ul><li><code><b>lscpu</b></code></li> or <li><code><b>cat /proc/cpuinfo</b></code></li></ul></li>
<br />
<li>Is my running Linux kernel 32 bit or 64 bit? Run:<br /><code><b>getconf LONG_BIT</b></code></li>
<br />
<li>Is my CPU is in 32 bit or 64 bit mode? Run: <br /><code><b>grep -o -w 'lm' /proc/cpuinfo | sort -u</b></code></li>
<br />
<li>Execute the following <b>lshw</b> command to list all info about CPU:<br /><code><b>sudo lshw -c cpu</b></code></li>
<br />
<li>Run the following uname command:<br /><code><b>uname -i</b></code><br /><br />
For 64bit you will get x86_64 and i386 for 32bit Intel CPU.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.cyberciti.biz/faq/how-do-i-know-if-my-linux-is-32-bit-or-64-bit/" target=_blank>Cyberciti :: How do I know …</a></li>
</ul>
</html>
<html>
The GNU C library (glibc) is the GNU implementation of<br />
the standard C library. glibc is a critical component<br />
of the GNU toolchain, which is used along with binutils<br />
and compiler to generate userspace application binaries<br />
for a target architecture.<br />
<br />
When built from source, some Linux programs may be re–<br />
quired to link against a particular version of glibc.<br />
In that case, you may want to check out the information<br />
about installed glibc to see if dependencies are met.<br />
<br />
Here are simple ways to check glibc version on Linux.<br />
<ul>
<li><h3>Method 1:</h3>
A simple command-line to check the version of <br />
the GNU C library is as follows.<br />
<br />
<code>
$ ldd ––version
</code><br />
<br />
In this example, the version of glibc is 2.19.
</li>
<li><h3>Method 2:</h3>
Another method is to "type" the glibc library <br />
(i.e., libc.so.6) from the command line as if<br />
it were a command.<br />
<br />
The output will show more detailed information<br />
about glibc library, including the version of<br />
glibc and the GNU compiler used, as well as <br />
available glibc extensions. The location of <br />
glibc varies depending on distros and processor<br />
architectures.<br />
<br />
On 64-bit Debian based system:<br />
<br />
<code>
$ /lib/x86_64-linux-gnu/libc.so.6
</code><br />
<br />
on 32-bit Debian based system:<br />
<br />
<code>
$ /lib/i386-linux-gnu/libc.so.6
</code><br />
<br />
On 64-bit Red Hat based system:<br />
<br />
<code>
$ /lib64/libc.so.6
</code><br />
<br />
On 32-bit Red Hat based systems:<br />
<br />
<code>
$ /lib/libc.so.6
</code><br />
<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.xmodulo.com/check-glibc-version-linux.html"
target="_blank" rel="noreferrer noopener">
Xmodulo :: https://www.xmodulo.com/check-glibc-version-linux.html</a>
</li>
</ul>
</html>
<html>
<ul>
<li>SoundConverter, which makes use of GUI (Gnome), but can<br />
also be used from the command line. Supported Formats are<br />
Mp3, OGG, AAC, WAV, Flac.<br />
<br /></li>
<li>Installation:
<code><pre>
sudo apt-get install soundconverter
</pre></code></li>
<li>
Aufruf:
<code><pre>
soundconverter ‐b ‐r . ‐‐format=<em><ZIELFORMAT, z.B. mp3></em> ‐‐output=/media/mueller/INT-256GB/Italienisch/Adesso-Magazin/2018-09/
soundconverter ‐b ‐r . ‐‐format=<em><ZIELFORMAT, z.B. mp3></em> ‐‐output=/media/mueller/INT-256GB/Italienisch/Adesso-Magazin/2018-09/
</pre></code>
wobei:
<ul>
<li><b>b, ‐‐batch</b><br />
Convert in batch mode, from command line, without a graphical user interface.</li>
<li><b>m, ‐‐mime‐type</b><br />
Set the output MIME type for batch mode. The default is audio/x-vorbis.</li>
<li><b>s, ‐‐suffix</b><br />
Set the output filename suffix for batch mode. The default is .ogg.</li>
<li><b>r, ‐‐recursive</b></li>
</ul><br />
</li>
<li>Ausgabe: z.B.
<code><pre>
converted '/home/mueller/Musik/Unbekannt/ADESSO_0918/21 - Saluto.ogg' to '/media/mueller/INT-256GB/Italienisch/Adesso-Magazin/2018-09/ADESSO_0918/21 - Saluto.mp3'
converted '/home/mueller/Musik/Unbekannt/ADESSO_0918/21 - Saluto.ogg' to '/media/mueller/INT-256GB/Italienisch/Adesso-Magazin/2018-09/ADESSO_0918/21 - Saluto.mp3'
</pre></code>
während ich beim Aufruf in diesem Verzeichnis stand:
<code><pre>
mueller@Debian-Laptop:~/Musik/Unbekannt/ADESSO_0918$
</pre></code></li>
<br />
<li>Beispielaufruf:
<code><pre>$ soundconverter ‐b ./*.wav ‐‐format=mp3 ‐‐output=./tmp</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://askubuntu.com/questions/442997/how-can-i-convert-audio-from-ogg-to-mp3" target="_blank" rel="noreferrer noopener">
Ask Ubuntu ‐ Forum :: How can I convert audio from ogg to mp3?</a></li>
</ul>
<hr />
<hr />
<h3>VERALTET:</h3>
There's several ways you can do this. <br />
Probably the easiest is to use a tool called <b>ogg2mp3</b>. <br />
<br />
Details on the Ubuntu forums about how do install it:
<code><pre>
$ sudo apt-get install mp32ogg lame
$ wget ftp://ftp.pbone.net/mirror/plf.zarb.org/plf/mandrake/10.1/noarch/ogg2mp3-0.3-3plf.noarch.rpm
$ sudo alien ogg2mp3-0.3-3plf.noarch.rpm
$ sudo dpkg -i ogg2mp3_0.3-4_all.deb
</pre></code>
While this is an RPM for Mandrake, it should work fine after running <br />
it through alien and installing the .deb. And in the future, you can use <br />
lame to rip CDs in mp3 format as it's installed in the first step.<br />
<br />
As is commonly pointed out, converting from one lossy format (ogg) <br />
to another (mp3) will degrade the quality of the music. But its better<br />
than not being able to play the music on your portable device at all ;).<br />
<br />
<b>Link:</b><br />
<a href="https://superuser.com/questions/15327/how-to-convert-ogg-to-mp3" target=_blank>SuperUser :: How to convert *.ogg to *.mp3</a>
</html>
<html>
<ul>
<li>GPG-Schlüssel downloaden & in das angegebene File im Verzeichnis /usr/share/keyrings abspeichern:
<pre><code>wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg</code></pre>
</li>
<li>den GPG-Schlüssel für den Package-Manager im angegebenen File vermerken:
<pre><code>echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list</code></pre>
</li>
<li>Package-Cache aktualisieren & Software installieren:
<pre><code>sudo apt update && sudo apt install vagrant</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://developer.hashicorp.com/vagrant/install?product_intent=vagrant"
target="_blank" rel="noreferrer noopener">
HashiCorp :: Vagrant</a>
</li>
</ul>
</html>
<html>
<ul>
<li>Bei Ubuntu werden manche veröffentlichte Updates nicht <br />
gleichzeitig an alle installierten Betriebssysteme verteilt, <br />
sondern gestaffelt (<em>phased update</em>) an die anfragenden <br />
Kunden übertragen.
</li>
<li>Dies betrifft immer funktionale Upgrades auf eine neuere<br />
Version von Ubuntu und auch innerhalb einer LTS-Version<br />
den Übergang auf den Stand eines aktuellen Point-Re-<br />
leases.
</li>
<li>Dieses Verfahren dient der Qualitätssicherung.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.ubuntuusers.de/Aktualisierungen/phased_update/"
target="_blank" rel="noreferrer noopener">
Ubuntu-Users :: phased update</a>
<li>
</ul>
</html>
<html>
<ul>
<li>bei Ausgabe des Befehls “sudo apt list“ wurde folgende<br />
Zeile ausgegeben:<br />
<code><pre>
ansible/stable 7.3.0+dfsg-1 all [Konfiguration-verbleibend]
</pre></code>
</li>
<li>“Konfiguration verbleibend“ ist die Umschreibung für den<br />
Status 'rc' (<em>remove candidate</em>).
</li>
<li>Hauptdateien sind entfernt, die Konfigdateien sind noch<br />
vorhanden.
</li>
<li>Konfigdateien sind dabei nicht nur reine Konfig-Daten, <br />
sondern auch z.B. /etc/init.d/skripte.
</li>
<li>Um diese (Zusatz–)Meldung loszuwerden, das Paket<br />
mit folgendem Befehl aufrufen:
<code><pre>
sudo apt purge <em>PkgName</em>
</pre></code>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://debianforum.de/forum/viewtopic.php?t=165585"
target="_blank" rel="noreferrer noopener">
Debian-Forum :: Debian 9.0 APT: “[Konfiguration–verbleibend] (none)“ </a>
</li>
</ul>
</html>
<html>
<code><pre>
sudo apt-get --only-upgrade install <em>gewünschtes Paket</em>
</pre></code>
oder
<code><pre>
sudo apt --only-upgrade install <em>gewünschtes Paket</em>
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://ciksiti.com/de/chapters/12736-how-to-update-a-single-package-with-apt-get-command-in-debia"
target="_blank" rel="noreferrer noopener">
Ciksiti :: So aktualisieren Sie ein einzelnes Paket mit dem Befehl apt-get in Debian</a>
</li>
</ul>
</html>
<html>
Linux-Magazin 11/2022
</html>
<html>
<ul>
<li><pre><code>man 1 *</code> :: <code>/usr/var/man/man1</code></pre>
</li>
<li><pre><code>man 8 *</code> :: <code>/usr/var/man/man8</code></pre>
</li>
</ul>
</html>
<html>
<ul>
<li><a href="https://www.linuxlinks.com/presentations/"
target="_blank" rel="noreferrer noopener">
LinuxLinks :: Presentations </a>
</li>
<li><a href="https://www.ubuntupit.com/best-presentation-software-for-linux/"
target="_blank" rel="noreferrer noopener">
Ubuntu-Pit :: Best presentation software for Linux </a>
</li>
<li><a href="https://www.makeuseof.com/tag/beyond-powerpoint-4-linux-presentation-tools/"
target="_blank" rel="noreferrer noopener">
MUO, Make Use Of :: Beyond Powerpoint : Four Linux presentation tools</a>
</li>
</ul>
Ich habe mich erst einmal (07/2023) für LibreOffice Impress entschieden<br />
(es ist ja schon bei mir installiert ;-))
</html>
<html>
MTP := Media Transfer Protocol <br />
<br />
Die mtp Pakete sind nicht vorinstalliert.<br />
<br />
→ Die Pakete mtp-tools gmtp nachinstalliert.
<h3>Links:</h3>
<a href="https://debianforum.de/forum/viewtopic.php?t=155713">Debian-Forum</a><br />
<a href="https://www.pcwelt.de/ratgeber/Datenaustausch_zwischen_Linux_und_Android-Hardware___Netzwerk-8831995.html">PC‐Welt :: Datenaustausch zwischen Linux und Android Hardware</a>
</html>
<html>
<h3>Links:</h3>
<ul>
<li>
<a href="https://www.baeldung.com/linux/read-qr-codes"
target="_blank" rel="noreferrer noopener">
Baeldung :: Reading QR Codes in Linux</a>
</li>
<li><a href="https://www.howtogeek.com/devops/how-to-create-qr-codes-from-the-linux-command-line/"
target="_blank" rel="noreferrer noopener">
HowTo-Geek :: How to Create QR Codes From the Linux Command Line</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>Installation:
<code><pre>sudo apt-get install ffmpeg</pre></code>
</li>
<li>To identify the available screen resolutions, we can use xrandr. We don't need to provide any parameters to this command:
<code><pre>xrandr
→ 1920 x 1080 </pre></code>
</li>
<li>Here's the entire ffmpeg command:
<code><pre>ffmpeg -video_size 1920x1080 -framerate 25 -f x11grab -i :0.0 -f pulse -ac 2 -i default output.mkv -async 1 -vsync 1</pre></code>
Let's break that down:
<ul>
<li>‐video_size 1920 x 1080: Sets the size of the video capture. This is the value we used xrandr to find.</li>
<li>‐framerate 25: Sets the frames per second value.</li>
<li>‐f x11grab: Force the video format to a specific type. Here we're setting the input format to the output of your X server.</li>
<li>‐i :0.0: This specifies the video input will come from the main screen.</li>
<li>‐f pulse: Sets the expected format to be PulseAudio.</li>
<li>‐ac 2: Set two audio channels</li>
<li>‐i 1: Take audio input from PulseAudio source #1. This is the value we used pactl to discover.</li>
<li>output.mkv: The name of the file we wish to create.</li>
<li>‐async 1: Set the audio sync method. This is a deprecated parameter, but we're using it here to avoid error messages that can be ignored.</li>
<li>‐vsync 1: set the video sync method. This is a deprecated parameter, but we're using it here to avoid error messages that can be ignored.</li>
</ul><br />
</li>
<li>Converting Video Files with ffmpeg:
<code><pre>ffmpeg ‐i output.mkv output.mp4</pre></code>
</li>
<li>Bei der Konvertierung auf mp4 verdoppelt sich die Filegröße,
zumindest ungefähr:
<code><pre>mueller@Debian-Laptop:~$ ls -altr output.*
-rw-r--r-- 1 mueller mueller 3739997 7. Aug 15:40 output.mkv
-rw-r--r-- 1 mueller mueller 6306440 7. Aug 15:58 output.mp4</pre></code>
</li>
<li><h4>Tonaufnahme einstellen</h4>
<ul>
<li>im PulseAudio-Lautstärkeregler sowohl im Tab "Wiedergabe"<br />
als auch im Tab "Aufnahme" den <b>gleichen</b> Kanal auswäh-<br />
len! (z.B. HDMI / DisplayPort 3 Output)
</li>
</ul>
</li>
<li><h4>Fehlermeldung: "Unable to find a suitable output format for '‐i'" [2]</h4>
<ul>
<li>Use - (hyphen), not – (en dash).
</li>
<li>Correct: -i
</li>
<li>Incorrect: –i
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>[1] <a href="https://www.howtogeek.com/446706/how-to-create-a-screencast-on-linux/"
target="_blank" rel="noreferrer noopener">
HowToGeek :: How to create a screencast on linux</a>
</li>
<li>[2] <a href="https://stackoverflow.com/questions/13780736/ffmpeg-unable-to-find-a-suitable-output-format-for-i"
target="_blank" rel="noreferrer noopener">
StackOverflow :: ffmpeg: Unable to find a suitable output format for '–i'</a>
</li>
</ul>
</html>
<html>
<h3>Alt ‐ F1</h3>
</html>
<html>
<ul>
<li>Fehlermeldung:
<code><pre>
-bash: Warnung: setlocale: LC_ALL: Kann die Regionseinstellungen nicht ändern (c): Datei oder Verzeichnis nicht gefunden
</pre></code>
</li>
<li>Lösung:
<code><pre>
sudo locale-gen <em><Region></em>
sudo update-locale LANG=<em><Region></em>
</pre></code>
z.B. für Region “de_DE.UTF-8“:
<code><pre>
sudo locale-gen de_DE.UTF-8
sudo update-locale LANG=de_DE.UTF-8
</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://unix.stackexchange.com/questions/110757/locale-not-found-setting-locale-failed-what-should-i-do"
target="_blank" rel="noreferrer noopener">
Unix Stackexchange :: locale not found/setting locale failed - what should I do?</a>
</li>
<li><a href="https://qastack.com.de/ubuntu/114759/warning-setlocale-lc-all-cannot-change-locale"
target="_blank" rel="noreferrer noopener">
QA Stack :: Warnung: setlocale: LC_ALL: Das Gebietsschema kann nicht geändert werden</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<img src="./pictures/Keyboard-Tastaturbelegung_United_States-NoAltGr.svg.png"
height=213 width=640 />
</html>
<html>
<ul>
<li>Files, die aus Telegram heruntergeladen werden, werden im <br />
Verzeichnis
<code><pre>
~/.local/share/TelegramDesktop/tdata
</pre></code>
abgelegt.</li>
</ul>
</html>
<html>
<ul>
<li>ist eine Terminal-Applikation für Android-Smartphones resp. ‐Tablets;
</li>
<br />
<li>
Wiki: <a href="https://wiki.termux.com"
target="_blank" rel="noreferrer noopener">
https://wiki.termux.com</a><br />
Community forum: <a href="https://termux.com/community"
target="_blank" rel="noreferrer noopener">
https://termux.com/community</a><br />
Gitter chat: <a href="https://gitter.im/termux/termux"
target="_blank" rel="noreferrer noopener">
https://gitter.im/termux/termux</a><br />
IRC channel: <a href="#termux on freenode"
target="_blank" rel="noreferrer noopener">
#termux on freenode</a><br />
</li>
<li><h3>Working with packages:</h3>
<ul>
<li>Search packages: <code><b>pkg search <query></b></code>
</li>
<li>Install a package: <code><b>pkg install <package></b></code>
</li>
<li>Upgrade packages: <code><b>pkg upgrade</b></code>
</li>
</ul>
</li>
<li><h3>Subscribing to additional repositories:</h3>
<ul>
<li>Root: <code><b>pkg install root-repo</b></code>
</li>
<li>Unstable: <code><b>pkg install unstable-repo</b></code>
</li>
<li>X11: <code><b>pkg install x11-repo</b></code>
</li>
</ul>
</li>
<li><h3>Closing a session:</h3>
<ul>
<li>entering exit command:
<pre><code>exit <em><CR></em></code></pre>
</li>
<li>entering Kill command:
<pre><code>pidof com.termux
kill <em><PID></em></code></pre>
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://itsfoss.com/using-linux-terminal-android/"
target="_blank" rel="noreferrer noopener">
It's FOSS :: Use Linux Terminal on Android Smartphones With These Apps</a>
</li>
<li><a href="https://play.google.com/store/apps/details?id=com.termux"
target="_blank" rel="noreferrer noopener">
Google Play Store :: Termux </a>
</li>
<li><a href="https://github.com/termux/termux-app"
target="_blank" rel="noreferrer noopener">
GitHub :: Termux </a>
</li>
<li><a href="https://f-droid.org/en/packages/com.termux/"
target="_blank" rel="noreferrer noopener">
FDroid :: Termux </a>
</li>
<li><a href="https://termuxapp.com/how-to-close-a-termux-session/"
target="_blank" rel="noreferrer noopener">
Termux :: How to Close a Termux Session? (Facts you Need to Know)</a>
</li>
</ul>
</html>
<html>
<ul>
<li>Bei der <b>Langform</b> muss das entsprechende Argument<br />
mitgegeben werden, falls die Option das verlangt;
</li>
<li>Bei der <b>Kurzform</b> ist dies nicht notwendig, da wird der<br />
Default-Wert genommen (falls vorhanden) oder der Be–<br />
fehl fragt expressis verbis nach;
</li>
<li>Beispiel:
<ul>
<li><code>–l</code> ist identisch mit / hat den Default <code>––format=long</code>,<br />
so dass man in diesem statt der Langform<br />
auch die Kurzform nehmen kann;
</li>
<li>will man aber statt <code>long</code> eine andere Ein–<br />
stellung verwenden, so <b>muss</b> man die <br />
Langform verwenden;
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
</ul>
</html>
<html>
<h3>How do I apply updates?</h3>
Make a backup before you do this.
<h3>Find out your current Debian Linux version</h3>
Type the following lsb_release command:
<code><pre>$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.1 (stretch)
Release: 9.1
Codename: stretch</pre></code>
<h3>Update your repo and get an updated version of Debian</h3>
Type the following apt command/apt-get command:
<code><pre>
$ sudo apt-get update
<em>[alternativ kann man jetzt aufrufen: apt list --upgradable]</em>
$ sudo apt-get upgrade
</pre></code>
OR run multiple command with sudo as follows:
<code><pre>
$ sudo -- sh -c 'apt update && apt upgrade'
</pre></code>
<h3>Reboot the box</h3>
A reboot is required to replace the running services/libs and kernel:
<code><pre>$ sudo reboot</pre></code>
<h3>Verification</h3>
Find current version of Debian Linux:
<code><pre>$ lsb_release -a</pre></code>
Make sure all services are running and ports are open too:
<code><pre>
$ sudo netstat -tulpn
$ sudo ss -tulpn
$ ps aux | more
$ ps aux | grep -i mysqld
$ ps aux | grep -i nginx
</pre></code>
Also check your log files for errors, if any using the tail command or grep command:
<code><pre>
$ sudo tail -f /var/log/messages
$ sudo tail -f /var/log/my/app.log
$ sudo grep -i error /var/log/messages
</pre></code>
<h3>For more info see:</h3>
<a href="https://www.debian.org/News/2017/20171209" target="_blank">Updated Debian 8: 8.10 released</a><br />
<a href="https://www.debian.org/News/2017/2017120902" target="_blank">Updated Debian 9: 9.3 released</a><br />
<br />
<b>Link:</b><br />
<a href="https://www.cyberciti.biz/linux-news/updated-version-of-debian-linux-8-9-has-been-released/" target="_blank">nixCraft :: Updated version of Debian Linux 8/9 has been released</a>
</html>
<html>
<h2>How to install and configure tinc VPN on Linux</h2>
<ul>
<li>tinc is an open-source VPN software with a number<br />
of powerful features not found in other VPN solutions.<br />
</li>
<li>For example, tinc VPN allows peers behind NAT to<br />
communicate with one another via VPN directly, not<br />
through a third party server. This makes tinc a type<br />
of peer-to-peer VPN solution. Other features include<br />
full IPv6 support and path MTU discovery.<br />
</li>
<li>In this tinc example, I will show you how to set up<br />
a VPN connection between two hosts via tinc. Let's<br />
call these hosts alice and bob respectively. Note that<br />
these are just symbolic names used by tinc, not ne–<br />
cessarily hostnames. In this example, I assume that<br />
host bob will initiate a VPN connection to host alice.<br />
</li>
<li><h3>Install tinc on Linux</h3>
First, install tinc on both hosts.<br />
<br />
For CentOS system, first set up RepoForge repository,<br />
and then do the following:
<code><pre>
$ sudo yum install tinc -y
</pre></code>
For Debian/Ubuntu system:
<code><pre>
$ sudo apt-get install tinc
</pre></code>
</li>
<li><h3>Configure tinc</h3>
Now, let's go ahead and configure tinc VPN on both<br />
hosts as follows.<br />
<br />
On host alice, do the following:
<code><pre>
$ sudo mkdir -p /etc/tinc/myvpn/hosts
</pre></code>
Then create a tinc configuration file called tinc.conf,<br />
and host configuration file(s) as follows:
<code><pre>
$ sudo vi /etc/tinc/myvpn/tinc.conf
</pre></code>
Beispiel:
<code><pre>
Name = alice
AddressFamily = ipv4
Interface = tun0
</pre></code>
In the above example, the directory myvpn under <br />
/etc/tinc is the name of the VPN network to be es–<br />
tablished between alice and bob. VPN name can<br />
be any alphanumeric name without containing -. <br />
<br />
In tinc.conf, the Name field indicates the name of<br />
tinc-running local host, which doesn't have to be<br />
actual hostname. You can choose any generic <br />
name.<br />
<br />
Next, create host configuration files which contain<br />
host-specific information.<br />
<code><pre>
$ sudo vi /etc/tinc/myvpn/hosts/alice
</pre></code>
Beispiel:
<code><pre>
Address = 1.2.3.4
Subnet = 10.0.0.1/32
</pre></code>
The name of host configuration file (e.g., alice)<br />
should be the same as the one you defined in<br />
tinc.conf. The Address field indicates a globally<br />
routable public IP address associated with alice.<br />
This field is required for at least one host in a<br />
given VPN network so that other hosts can ini–<br />
tiate VPN connections to it.<br />
<br />
In this example, alice will serve as the boots–<br />
trapping server, and so has a public IP address<br />
(e.g., 1.2.3.4). The Subnet field indicates the<br />
VPN IP address to be assigned to alice.<br />
<br />
The next step is to generate public/private keys.
<code><pre>
$ sudo tincd -n myvpn -K4096
</pre></code>
The above command will generate 4096 bit <br />
public/private keys for host alice. The private <br />
key will be stored as /etc/tinc/myvpn/rsa_key.priv,<br />
and the public key will be appended to <br />
/etc/tinc/myvpn/hosts/alice.<br />
<br />
Next, configure the scripts that will be run right<br />
after tinc daemon gets started, as well as right<br />
before tinc daemon is terminated.<br />
<code><pre>
$ sudo vi /etc/tinc/myvpn/tinc-up
</pre></code>
Beispiel:
<code><pre>
#!/bin/sh
ifconfig $INTERFACE 10.0.0.1 netmask 255.255.255.0
</pre></code>
<code><pre>
$ sudo vi /etc/tinc/myvpn/tinc-down
</pre></code>
Beispiel:
<code><pre>
#!/bin/sh
ifconfig $INTERFACE down
</pre></code>
<code><pre>
$ sudo chmod 755 /etc/tinc/myvpn/tinc-*
</pre></code>
Now tinc configuration for host alice is done. <br />
Similar to alice, configure tinc on host bob as <br />
follows:
<code><pre>
$ sudo mkdir -p /etc/tinc/myvpn
$ sudo vi /etc/tinc/myvpn/tinc.conf
</pre></code>
Beispiel:
<code><pre>
Name = bob
AddressFamily = ipv4
Interface = tun0
ConnectTo = alice
</pre></code>
In the above, note that unlike host alice, I place<br />
ConnectTo field in bob's tinc configuration, since<br />
host bob will initiate a VPN connection to host<br />
alice when tinc daemon on host bob is up.
<code><pre>
$ sudo vi /etc/tinc/myvpn/hosts/bob
</pre></code>
Beispiel:
<code><pre>
Subnet = 10.0.0.2/32
</pre></code>
<code><pre>
$ sudo tincd -n myvpn -K4096
</pre></code>
Similarly, the bob's private key will be stored as<br />
/etc/tinc/myvpn/rsa_key.priv, and its public key<br />
will be added to /etc/tinc/myvpn/hosts/bob.
<code><pre>
$ sudo vi /etc/tinc/myvpn/tinc-up
</pre></code>
Beispiel:
<code><pre>
ifconfig $INTERFACE 10.0.0.2 netmask 255.255.255.0
</pre></code>
<code><pre>
$ sudo vi /etc/tinc/myvpn/tinc-down
</pre></code>
Beispiel:
<code><pre>
ifconfig $INTERFACE down
</pre></code>
<code><pre>
$ sudo chmod 755 /etc/tinc/myvpn/tinc-*
</pre></code>
Once you are done with configuring tinc on all<br />
hosts as above, copy each host's public key file<br />
onto the other host:<br />
<ul>
<li>On host alice:
<code><pre>
$ scp /etc/tinc/myvpn/hosts/alice root@bob:/etc/tinc/myvpn/hosts/
</pre></code>
</li>
<li>On host bob:
<code><pre>
$ scp /etc/tinc/myvpn/hosts/bob root@alice:/etc/tinc/myvpn/hosts/
</pre></code>
</li>
</ul>
Finally, start tinc daemon on them as follows. Since <br />
host bob initiates a VPN connection, you will need to<br />
start tinc daemon on host alice first, and then host bob.<br />
<code><pre>
$ sudo tincd -n myvpn
</pre></code>
Two hosts should now be able to talk to each other<br />
via VPN IP addresses assigned to them.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.xmodulo.com/how-to-install-and-configure-tinc-vpn.html"
target="_blank" rel="noreferrer noopener">
XModulo :: How to install and configure tinc VPN on Linux</a>
</li>
<li><a href="https://www.digitalocean.com/community/tutorials/how-to-install-tinc-and-set-up-a-basic-vpn-on-ubuntu-18-04-de"
target="_blank" rel="noreferrer noopener">
Digital Ocean :: So installieren Sie Tinc und richten ein einfaches VPN unter Ubuntu 18.04 ein </a>
</li>
<li><a href="https://www.linode.com/docs/guides/how-to-set-up-tinc-peer-to-peer-vpn/"
target="_blank" rel="noreferrer noopener">
Linode :: How to Set up tinc, a Peer-to-Peer VPN </a>
</li>
<li><a href="https://www.digitalocean.com/community/tutorials/how-to-use-ansible-and-tinc-vpn-to-secure-your-server-infrastructure"
target="_blank" rel="noreferrer noopener">
Digital Ocean :: How To Use Ansible and Tinc VPN to Secure Your Server Infrastructure</a>
</li>
<li><a href="https://tinc-vpn.org/"
target="_blank" rel="noreferrer noopener">
Tinc Homepage</a>
</li>
<li><a href="https://blog.wyraz.de/linux/oeffentliche-ip-adresse-mit-tinc-vpn-von-einem-server-auf-einen-anderen-tunneln/"
target="_blank" rel="noreferrer noopener">
Blog Wyraz.de :: Öffentliche IP-Adresse mit Tinc-VPN von einem Server auf einen anderen Tunneln </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
Das Linux‐Kommando <code><b>tree</b></code> erlaubt die Anzeige eines Verzeichnisbaums auf der <br />
Kommandozeile. Falls die Umgebungsvariable <em><b>LS_COLORS</b></em> gesetzt ist, wird die<br />
textuelle Darstellung in verschiedenen Farben angezeigt. Am Ende der Ausgabe<br />
wird außerdem die gesamte Anzahl an Dateien und Verzeichnissen im durchsuch‐<br />
ten Ordner ausgegeben.
<h3>Installation</h3>
Unter <b>Ubuntu</b> und <b>Debian</b> kann die Installation einfach via folgenden Kommando erfolgen:
<code><pre>
apt-get install tree
</pre></code>
bzw.
<code><pre>
sudo apt install tree
</pre></code>
Unter <b>CentOS/RHEL</b> kann das Kommando wie folgt installiert werden:
<code><pre>
yum install tree
</pre></code>
<h3>Beispiel einer “tree“‐Ausgabe</h3>
<code><pre>
<b>$ tree vector/</b>
vector/
|‐‐ csshover.htc
|‐‐ csshover.min.htc
|‐‐ images
| |‐‐ arrow-down-focus-icon.png
| |‐‐ arrow-down-icon.png
| |‐‐ audio-icon.png
| |‐‐ bullet-icon.png
| |‐‐ document-icon.png
| |‐‐ edit-icon.png
| |‐‐ external-link-ltr-icon.png
| |‐‐ external-link-rtl-icon.png
| |‐‐ file-icon.png
| |‐‐ link-icon.png
| |‐‐ lock-icon.png
| |‐‐ magnify-clip.png
| |‐‐ mail-icon.png
| |‐‐ news-icon.png
| |‐‐ page-fade.png
| |‐‐ portal-break-ltr.png
| |‐‐ portal-break.png
| |‐‐ portal-break-rtl.png
| |‐‐ preferences-break.png
| |‐‐ preferences-fade.png
| |‐‐ search-fade.png
| |‐‐ search-ltr.png
| |‐‐ search-rtl.png
| |‐‐ tab-break.png
| |‐‐ tab-current-fade.png
| |‐‐ tab-normal-fade.png
| |‐‐ talk-icon.png
| |‐‐ user-icon.png
| |‐‐ video-icon.png
| |‐‐ watch-icon-loading.gif
| |‐‐ watch-icons.png
|‐‐ screen.css
|‐‐ screen-hd.css
|‐‐ vector.js
1 directory, 36 files
</pre></code>
<h3>Hilfreiche Optionen</h3>
<ul>
<li><b>‐L #</b> :: bis zum Level # (z.B. 2) anzeigen</li>
<li><b>‐D</b> :: Print the date of last modification or (‐c) status change </l>
<li><b>‐d</b> :: nur die Verzeichnisse anzeigen</li>
</ul>
<h3>Alternativen</h3>
Sollte das tree Kommando nicht installiert sein, kann als Alternative z.B. folgende<br />
Kombination von find und sed verwendet werden:
<code><pre>
$ ls -R vector | grep ':$' | sed -e 's/:$//' -e 's/[^\/]*\//| /g' -e 's/| \([^|]\)/`--\1/g'
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://www.thomas-krenn.com/de/wiki/Linux_Verzeichnisbaum_mit_dem_tree_Kommando_anzeigen" target=_blank>Thomas Krenn.com :: Linux‐Verzeichnisse als Baum anzeigen (tree‐Befehl)</a></li>
</ul>
</html>
<html>
<ul>
<li><b>WDA</b> := Wayland Display Architecture</li>
<li>ist ein Protokoll</li>
<li></li>
</ul>
<h3>Links:</h3>
c't Linux 2019
</html>
<html>
<ul>
<li>Bei der Formatierung von Laufwerken stehen Ihnen die Dateisysteme exFAT und FAT32 zur Auswahl.
</li>
<br />
<li>Der Unterschied zwischen den Filesystemen <b>exfat</b> und <b>vfat</b>:<br />
Egal, ob Sie ein internes Laufwerk, externe Festplatten, USB-Sticks oder eine SD–Karte formatierten: Es wird ein Dateisystem benötigt, damit die Daten auch korrekt gelesen werden. Hier bietet Ihnen Windows 10 die Möglichkeit, exFAT, FAT32 oder auch NTFS zu verwenden.
<li><h3>Wieso nicht gleich NTFS?</h3>
NTFS steht für New Technology File System und ist das Dateisystem, das Windows standardmäßig verwendet. Stellt sich die Frage, wieso man überhaupt eine Festplatte als exFAT oder FAT32 formatieren sollte? Nun, falls Sie jemals eine externe Festplatte als NTFS-Dateisystem formatiert haben und diese unter macOS oder Linux wollen, gibt es ein entscheidendes Problem:<br />
<br />
Während macOS zwar die Laufwerke erkennt, kann auf NTFS nicht geschrieben werden – ein Datenaustausch ist also kaum möglich. Linux kann nur mit nachträglicher Arbeit für NTFS zur Unterstützung gezwungen werden. Ebenso funktioniert keine von Sonys PlayStation-Konsolen mit NTFS. Kurzum: NTFS ist ein gutes Dateisystem für Windows 10 und ältere Versionen, bei macOS und Linux ist die Kompatibilität aber limitiert. Aus diesen Gründen erklären wir Ihnen, welche Vorteile exFAT und FAT32 bieten und was diese überhaupt sind.<br />
<br />
<a href="https://www.heise.de/tipps-tricks/exFAT-vs-NTFS-das-sind-die-Unterschiede-4686750.html"
target="_blank" rel="noreferrer noopener">
Unterschiede von exFAT vs. NTFS in diesem Artikel.
</a>
</li>
<li><h3>Was ist FAT32?</h3>
FAT bedeutet File Allocation Table und ist das älteste der hier erwähnten Dateisysteme. Was aber nicht heißt, dass es keine Vorteile mit sich bringt. Das Dateisystem FAT32 wurde mit Windows 95 eingeführt, um seinen Vorgänger FAT16 zu ersetzen, welcher noch in MS-DOS und Windows 3 verwendet wurde. Der große Vorteil ist, dass FAT32 aufgrund seines Alters de-facto Standard ist. Haben Sie einen neue SD-Karte erworben, dann ist diese meistens als FAT32 formatiert, um die maximale Kompatibilität zur Computern oder auch Spielkonsolen zu gewährleisten.<br />
<br />
Entgegen seinem großen Vorteil der Kompatibilität, ist die maximale Dateigröße, die gespeichert werden kann, auf 4 GB limitiert. Haben Sie einen selbstgedrehten Film, dann ist FAT32 z.B. kein ideales Dateisystem, um die Datei via USB-Sticks oder externer Festplatte mit anderen PCs zu teilen.<br />
<br />
Als FAT32 formatieren sollten Sie demnach, wenn Sie auf externen Festplatten, USB-Sticks oder SD-Karten Dateien kleiner 4 GB speichern möchten, die mit anderen Geräten als einem Windows-PCs verwendet werden. Für interne Laufwerke bietet sich FAT32 hingegen nicht an. Hier fehlt es vor allem an Berechtigungen und anderen Sicherheitsfunktionen, die im moderneren NTFS-Dateisystem eingebaut sind. Zudem bieten neuere Windows-Versionen aktuell nicht mehr die Möglichkeit, auf FAT32 installiert zu werden.
</li>
<li><h3>Was ist exFAT?</h3>
exFAT steht für Extended File Allocation und wurde 2006 mit den Updates für Windows XP und Windows Vista eingeführt. Eine große SD-Karte in einer Digitalkamera oder in Ihrem Smartphone benötigt aufgrund der Beschränkungen von FAT32 ein anderes Dateisystem. Mit exFAT wird das FAT-Dateisystem erweitert – wie auch mit NTFS können mit exFAT Dateien gespeichert werden, die wesentlich größer sind als 4 GB. Ein weiterer entscheidender Vorteil von exFAT ist seine Kompatibilität. Es wird seit 2010 von macOS und seit 2019 auch komplett von Linux unterstützt.<br />
<br />
Nutzen Sie mehrere Betriebssysteme? Dann sollte exFAT das Dateisystem Ihrer Wahl sein. Ein Nachteil ist – insbesondere gegenüber NTFS – dass exFAT keine Komprimierung der Daten anbietet. Auch für Konsolen-Besitzer gibt es Vorteile: Seit der PlayStation 4 und der Xbox One wird exFAT unterstützt.
</li>
<li><h3>exFAT vs. FAT32 - Die Unterschiede auf einen Blick</h3>
<table>
<tr>
<th width=150></th><th width=150>FAT32</th><th width=150>exFAT</th>
</tr>
<tr>
<td>maximale Dateigröße
</td>
<td>4 GB
</td>
<td>kein Limit
</td>
</tr>
<tr>
<td>Kompatibilität
</td>
<td>Funktioniert mit allen Versionen von Windows, macOS, Linux und Spielkonsolen.
</td>
<td>Funktioniert mit allen Versionen von Windows, neueren Versionen von macOS und Linux. Konsolen-Support seit PlayStation 4 und Xbox One. Ältere Geräte unterstützen eher FAT32.
</td>
</tr>
<tr>
<td>Nachteil
</td>
<td>4 GB maximale Dateigröße, 8 TB maximale Partitionsgröße.
</td>
<td>Keine realistische Begrenzung der Datei- oder Partitionsgröße.
</td>
</tr>
<tr>
<td>Anwendungsbereiche
</td>
<td>Austausch von Daten zwischen verschiedenen Betriebssystemen, z.B. via USB-Sticks und externer Festplatten wenn Dateigröße < 4 GB.
</td>
<td>Austausch von Daten zwischen verschiedenen Betriebssystemen. Insbesondere bei Austausch von größeren Daten wie bei Digitalkameras, wenn Dateigröße > 4 GB.
</td>
</tr>
</table>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.heise.de/tipps-tricks/exFAT-vs-FAT32-das-sind-die-Unterschiede-4992412.html"
target="_blank" rel="noreferrer noopener">
Heise Online :: Tipps & Tricks – exfat vs. fat32</a>
</li>
</ul>
</html>
<html>
<ul>
<li><b>+x</b> :=: Hinzufügen des Execute-bits<br />
entspricht “<b>744</b>“<br />
<code><pre>
ls -altr /usr/local/bin/geek-timer.sh
-rw-r--r-- 1 root staff 66 12. Sep 08:49 /usr/local/bin/geek-timer.sh
sudo chmod +x /usr/local/bin/geek-timer.sh
ls -altr /usr/local/bin/geek-timer.sh
-rwxr-xr-x 1 root staff 66 12. Sep 08:49 /usr/local/bin/geek-timer.sh
</pre></code>
</li>
</ul>
</html>
<html>
<ul>
<li>Das Problem war, dass ich zwei Files mit identischem Namen, <br />
aber verschiedenen Inodes hatte:
<code><pre>
1230519 -rw-r--r-- 1 root root 50 8. Okt 18:32 sublime–text.list
1230532 -rw-r--r-- 1 root root 50 8. Okt 18:32 sublime–text.list
</pre></code>
</li>
<li>Die Lösung war, dass eines der beiden Files Steuer-<br />
zeichen resp. Zeichen aus einer anderen Sprachein–<br />
stellung hatte.<br />
<br />
Wenn man die Spracheinstellung ändert, und zwar<br />
auf eine, die <b>keine</b> Unicode-Zeichen resp. –Dar–<br />
stellung enthält:
<code><pre>
export LC_ALL=C
</pre></code>
und dann den folgenden ls-Befehl absetzt:
<code><pre>
ls -lib
</pre></code>
dann erkennt man den Unterschied:
<code><pre>
1230532 -rw-r--r-- 1 root root 50 Oct 8 18:32 sublime-text.list
1230519 -rw-r--r-- 1 root root 50 Oct 8 18:32 sublime\342\200\220text.list
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://unix.stackexchange.com/questions/558220/same-file-name-different-inodes"
target="_blank" rel="noreferrer noopener">
Unix Stackexchange :: Same file name different INODES</a>
</li>
</ul>
</html>
<html>
<ul>
<li>Die allgemeine Syntax des Befehls lautet:
<code><pre>apt [OPTIONEN] BEFEHL </pre></code>
</li>
<li>
Alle Befehle zum Verwalten von Paketen (also Installieren, Deinstallieren etc.) und<br />
Editieren benötigen Root‐Rechte. Die Befehle zum (Durch‐)Suchen können mit nor‐<br />
malen Nutzerrechten ausgeführt werden.
</li>
<li><h3>Pakete verwalten</h3>
Die Befehle zur Verwaltung von Paketen lauten:
<table>
<tr><th>Befehl</th><th>Beschreibung</th></tr>
<tr><td>update </td><td>Neueinlesen der Paketlisten</td></tr>
<tr><td>upgrade </td><td>Installierte Pakete wenn möglich auf eine verbesserte Version<br />
aktualisieren. Um geänderte Abhängigkeiten zu erfüllen, werden<br />
gegebenenfalls auch neue Pakete installiert.</td></tr>
<tr><td>full-upgrade </td><td>Wie upgrade, nur können bei dem Vorgang auch Pakete entfernt<br />
werden. Alternativ kann statt full‐upgrade auch der Befehl dist‐up‐<br />
grade verwendet werden. Das Ergebnis ist identisch, allerdings ist<br />
dist‐upgrade in der Hilfe und der Man‐Page von apt nicht dokumen‐<br />
tiert.</td></tr>
<tr><td>install PAKETNAME </td><td>installiert das Paket PAKETNAME</td></tr>
<tr><td>install /PFAD/ZUM/PAKET </td><td>installiert ein lokales Paket und dessen Abhängigkeiten</td></tr>
<tr><td>remove PAKETNAME </td><td>deinstalliert das Paket PAKETNAME</td></tr>
<tr><td>purge PAKETNAME </td><td>wie remove, es werden aber zusätzlich auch alle Konfigurations‐<br />
dateien gelöscht</td></tr>
<tr><td>autoremove </td><td>deinstalliert alle automatisch installierten Pakete, die nicht<br />
mehr benötigt werden und keine Abhängigkeiten mehr zu<br />
anderen Paketen haben</td></tr>
</table>
</li>
<li><h3>Suchen/Durchsuchen</h3>
Die Befehle zum Suchen und Durchsuchen von Paketen lauten:
<table>
<tr><th>Befehl</th><th>Beschreibung</th></tr>
<tr><td>search SUCHBEGRIFF</td><td>Zeigt alle Pakete an, in deren Namen oder Beschreibung der Begriff SUCHBEGRIFF vorkommt. Als Suchbegriff kann auch ein regulärer Ausdruck verwendet werden.</td></tr>
<tr><td>show PAKETNAME </td><td>zeigt Informationen zum Paket PAKETNAME an</td></tr>
<tr><td>list SUCHMUSTER [OPTION]</td><td>Listet alle Paketnamen auf, deren Paketname auf das Suchmuster SUCHMUSTER passen. Das Suchmuster kann dabei auch ein Glob-Pattern sein. Als Optionen stehen z.B. ‐‐installed (listet nur Pakete auf, die auch installiert sind) und ‐‐upgradeable (listet nur Pakete auf, für die eine aktuelle Version in den Paketquellen bereit steht) zur Verfügung.</td></tr>
</table>
</li>
<li><h3>sources.list editieren</h3>
Mit dem Befehl
sudo apt edit-sources
wird die Datei /etc/apt/sources.list mit einem Editor geöffnet, so dass die Paketquellen editiert werden können. Sind auf dem System mehrere Editoren installiert, wird vor dem Öffnen gefragt, welcher Editor verwendet werden soll. (Da apt im Terminal ausgeführt wird, werden nur reine Texteditoren zum Editieren angeboten, keine grafischen.)
Hinweise
</li>
<li><h3>Verwendung in Skripten</h3>
Die Hilfeseiten empfehlen, apt nicht in Skripten zu benutzen, da es nicht zwingend abwärtskompatibel und nicht als Entwicklerwerkzeug konzipiert wurde. Dies wird auch in der Manpage zu apt explizit hervorgehoben:
<quote>
"Die apt(8)-Befehlszeile wurde als Endanwenderwerkzeug entworfen und kann bei Versionswechseln die Ausgabe ändern. Obwohl es versucht, nicht die Abwärtskompatibilität zu unterbrechen, kann sie nicht garantiert werden. Alle Funktionalitäten von apt(8) sind in apt-cache(8) und apt-get(8) über APT-Optionen verfügbar. Bitte benutzen Sie vorzugsweise diese Befehle in Ihren Skripten."</quote>
</li>
<li><h3>Vergleiche apt‐get/apt</h3>
<table>
<tr><th></th><th>apt install</th><th>apt-get install</th><th>apt upgrade</th><th>apt-get upgrade</th><th>apt full-upgrade</th><th>apt-get dist-upgrade</th></tr>
<tr><td>installierte Pakete wenn möglich auf eine neuere Version aktualisieren</td><td>ja</td><td>ja</td><td>ja</td><td>ja</td><td>ja</td><td>ja</td></tr>
<tr><td>ggf. Installation neuer Pakete</td><td>ja</td><td>ja</td><td>ja</td><td>nein</td><td>ja</td><td>ja</td></tr>
<tr><td>ggf. Löschung unnötig gewordener Abhängigkeiten</td><td>nein</td><td>nein</td><td>nein</td><td>nein</td><td>ja</td><td>ja</td></tr>
<tr><td>installiert ein lokales Paket und dessen Abhängigkeiten</td><td>ja</td><td>nein</td><td> ‐ </td><td> ‐ </td><td> ‐ </td><td> ‐ </td></tr>
</table>
</li>
<li><h3>Unterschiede apt/apt-get</h3>
<table>
<tr><th></th><th>apt <em><BEFEHL></em></th><th>apt‐get <em><BEFEHL></em></th></tr>
<tr><td>update </td><td>Neueinlesen der Paketlisten
<tr><td>upgrade </td><td><ul>
<li>Installierte Pakete wenn möglich auf eine neuere Version aktualisieren.</li>
<li>Um geänderte Abhängigkeiten zu erfüllen, werden gegebenenfalls auch neue Pakete installiert.</li></ul></td><td><ul><li>Installierte Pakete wenn möglich auf eine neuere Version aktualisieren.</li>
<li>Es werden keine neuen Pakete installiert.</li>
</ul>
<tr><td>full-upgrade</td><td>Installierte Pakete wenn möglich auf eine neuere Version aktualisieren.
Um geänderte Abhängigkeiten zu erfüllen, werden gegebenenfalls auch neue Pakete installiert.
Bei nicht mehr benötigten Abhängigkeiten werden gegebenenfalls auch Pakete entfernt.</td><td> ‐ nicht dokumentiert ‐
<tr><td>dist-upgrade </td><td>‐ nicht dokumentiert ‐ </td><td>Installierte Pakete wenn möglich auf eine neuere Version aktualisieren.
Um geänderte Abhängigkeiten zu erfüllen, werden gegebenenfalls auch neue Pakete installiert.
Bei nicht mehr ben&jouml;tigten Abhängigkeiten werden gegebenenfalls auch Pakete entfernt.
<tr><td>install PAKETNAME </td><td>installiert das Paket PAKETNAME
<tr><td>install /PFAD/ZUM/PAKET </td><td>installiert ein lokales Paket und dessen Abhängigkeiten (siehe auch Problembehebung) ‐
<tr><td>remove PAKETNAME </td><td>deinstalliert das Paket PAKETNAME
<tr><td>purge PAKETNAME </td><td>wie remove, es werden aber zusätzlich auch alle Konfigurationsdateien gelöscht
<tr><td>autoremove </td><td>deinstalliert alle Pakete, die nicht mehr benötigt werden und keine Abhängigkeiten mehr zu anderen Paketen haben
</table>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.ubuntuusers.de/apt/apt/" target="_blank" rel="noreferrer noopener">Ubuntu‐Users :: apt</a></li>
<li><a href="https://tombouctou-food.com/de/verwenden-von-apt-befehlen-unter-linux-vollstaendige-anleitung/" target="_blank" rel="norferrer noopener">Tombuoctou-Food :: Verwenden von apt‐Befehlen unter Linux</a></li>
</ul>
</html>
<html>
<pre><code>┌──(root㉿geecko)-[/mnt/c/Users/mueller]
└─# apt upgrade wireshark
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libqt6multimedia6 : Depends: libavcodec60 (>= 7:6.0)
Depends: libavformat60 (>= 7:6.0)
E: Broken packages
┌──(root㉿geecko)-[/mnt/c/Users/mueller]</code></pre>
<h3>Lösung</h3>
In diesem Fall habe ich den Befehl
<pre><code>sudo apt install ––fix–broken <em>PACKAGE</em></code></pre>
mehrmals mit verschiedenen (angegeben) Paketen aufgerufen.
</html>
<html>
<pre><code>N: Repository 'Kali Linux' changed its 'non-free component' value from 'non-free' to 'non-free non-free-firmware'
N: More information about this can be found online at: https://www.kali.org/blog/non-free-firmware-transition/</code></pre>
</html>
<html>
<pre><code>
W: http://repos.azulsystems.com/debian/dists/stable/Release.gpg: Schlüssel ist im veralteten Schlüsselbund trusted.gpg gespeichert (/etc/apt/trusted.gpg), siehe den Abschnitt MISSBILLIGUNG in apt-key(8) für Details.
W: https://repos.azul.com/zulu/deb/dists/stable/InRelease: Schlüssel ist im veralteten Schlüsselbund trusted.gpg gespeichert (/etc/apt/trusted.gpg), siehe den Abschnitt MISSBILLIGUNG in apt-key(8) für Details.
</code></pre>
bzw.
<pre><code>W: https://packagecloud.io/slacktechnologies/slack/debian/dists/jessie/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.</code></pre>
<h3>Links:</h3>
<ul>
<li><a href="https://itsfoss.com/key-is-stored-in-legacy-trusted-gpg/"
target="_blank" rel="noreferrer noopener">
It's FOSS :: Fixing "Key is stored in legacy trusted.gpg keyring" Issue in Ubuntu
</a>
</li>
</ul>
</html>
<html>
<ul>
<li>ein neues Paketformat für Linux (s. <a href="https://support.mozilla.org/de/kb/firefox-unter-linux-installieren" target=_blank>Firefox Homepage</a>)
<li>Tool für die Software-Entwicklung, das Paket-Management <br />
und für die Virtualisierung von Desktop-Applikationen auf<br />
Linux-Systemen. </li>
<li>Es stellt eine Sandbox-Umgebung zur Verfügung, in der <br />
der Anwender bzw. Entwickler Applikationen isoliert vom<br />
Rest des Systems laufen lassen kann. </li>
<li>Alternativen:
<ol>
<li>Snappy (Canonical)</li>
<li><a href="https://appimage.org/" target=_blank>AppImage</a></li>
</ol></li>
<li>Anwendungen, die mit Flatpak ausgeführt werden, brauchen<br />
für den Zugriff auf Dateien oder für den Zugriff auf die Hardware<br />
die Erlaubnis des Benutzers.</li>
<li><a href="https://flathub.org/" target=_blank>Flathub</a> ‐ Software-Verzeichnis; <br />
eine zentrale Anlaufstelle für einen Großteil<br />
verfügbarer Flatpak-Anwendungen</li>
</ul>
<h3>Fehlermeldung:</h3>
<ul>
<li>Befehl: <code><b>flatpak install ‐‐user flathub com.visualstudio.code</b></code><br />
→ Die Befehle “flatpak remotes“ und “flatpak remotes ‐‐user“ zeigen unterschiedliche Ergebnisse an.<br />
→ Grund / Ursache:<br />
im User-eigenen File <b>~/.local/share/flatpak/repo/config</b> fehlt ein Abschnitt, der das Remote-Repository "flathub" definiert<br />
→ Den entsprechenden Abschnitt aus dem File <b>/var/lib/flatpak/repo/config</b> in das User-eigene File kopieren: z.B.
<code><pre>
[remote "flathub"]
gpg-verify=true
gpg-verify-summary=true
url=https://dl.flathub.org/repo/
xa.title=Flathub
xa.title-is-set=true
</pre></code>
Manuell durchgeführt, aber anscheinend geht das auch automatisch:
<code><pre>
flatpak remote‐add ‐‐if‐not‐exists flathub https://flathub.org/repo/flathub.flatpakrepo ‐‐user
</pre></code>
</li>
<li><b>Fehler: Unable to load summary from remote flathub: GPG signatures found, but none are in trusted keyring</b><br />
→ der GPG-Key fehlte, habe ihn downgeloaded und manuell importiert:
<code><pre>
wget https://flathub.org/repo/flathub.gpg
flatpak ‐‐user remote&hyhen;modify ‐‐gpg‐import=flathub.gpg flathub
</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Flatpak" target=_blank>Wikipedia</a></li>
<li><a href="https://wiki.ubuntuusers.de/Flatpak/" target=_blank>Ubuntu‐Users :: Flatpak</li>
<li><a href="https://wiki.ubuntuusers.de/AppImage/" target=_blank>Ubuntu‐Users :: AppImage</li>
<li><a href="https://ostechnix.com/how-to-install-and-use-flatpak-in-linux/" target=_blank>OSTechnix.com :: Flatpack - Installation und Gebrauch</a></li>
</ul>
</html>
<html>
<h3></h3>
<table>
<tr><td><b>Window list (sticky)</b></td><td>Ctrl + Alt + Tab </td></tr>
<tr><td><b>PCMan File Manager</b></td><td>Super + E <br />or Ctrl + Alt + D </td></tr>
<tr><td><b>LXPanel Run</b></td><td>Super + R <br /> or Alt + F2</td></tr>
<tr><td><b>LXPanel Menu</b></td><td>Alt + F1 <br />or Ctrl + Esc </td></tr>
<tr><td><b>LXTask (task manager)</b></td><td>Ctrl + Alt + Del </td></tr>
<tr><td><b>Open terminal</b></td><td>Ctrl + Alt + T </td></tr>
<tr><td><b>Lock screen</b> </td><td>Ctrl + Alt + L</td></tr>
<!--tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr-->
</table>
<h3>Links:</h3>
<ul>
<li><a href="https://defkey.com/linux-lxde-shortcuts" target=_blank>DefKey :: LXDE shortcuts</a></li>
</ul>
</html>
<html>
<table>
<tr><th>Aktion</th><th>Tastenkürzel</th></tr>
<tr><td>Neues Fenster</td><td>Shift + Strg + N</td></tr>
<tr><td>Neuer Reiter</td><td>Shift + Strg + T</td></tr>
<tr><td>Reiter schließen</td><td>Shift + Strg + W</td></tr>
<tr><td>Fenster schließen</td><td>Shift + Strg + Q</td></tr>
<tr><td>Kopieren</td><td>Shift + Strg + C</td></tr>
<tr><td>Einfügen</td><td>Shift + Strg + V</td></tr>
<tr><td>Titel festlegen</td><td>Shift + Strg + I</td></tr>
<tr><td>Vorheriger Reiter</td><td>Strg + Bild auf</td></tr>
<tr><td>Nächster Reiter</td><td>Strg + Bild ab</td></tr>
<tr><td>Reiter nach links verschieben</td><td>Shift + Strg + Bild auf</td></tr>
<tr><td>Reiter nach rechts verschieben</td><td>Shift + Strg + Bild ab</td></tr>
<tr><td>Zoom In</td><td>Strg + +</td></tr>
<tr><td>Zoom Out</td><td>Strg + _</td></tr>
<tr><td>Zoom Reset</td><td>Strg + )</td></tr>
</table>
<h3>Links:</h3>
<ul>
<li>zu finden unter:<br />
lxterminal aufrufen ⇒ “Bearbeiten“ ⇒ “Einstellungen“ ⇒ Tab “Tastenkürzel“</li>
</ul>
</html>
<html>
<ul>
<li><h3>Standard commands</h3>
<table>
<tr><td>asn1parse</td><td>ca</td><td>ciphers</td><td>cms</td></tr>
<tr><td>crl</td><td>crl2pkcs7</td><td>dgst</td><td>dhparam</td></tr>
<tr><td>dsa</td><td>dsaparam</td><td>ec</td><td>ecparam</td></tr>
<tr><td>enc</td><td>engine</td><td>errstr</td><td>gendsa</td></tr>
<tr><td>genpkey</td><td>genrsa</td><td>help</td><td>list</td></tr>
<tr><td>nseq</td><td>ocsp</td><td>passwd</td><td>pkcs12</td></tr>
<tr><td>pkcs7</td><td>pkcs8</td><td>pkey</td><td>pkeyparam</td></tr>
<tr><td>pkeyutl</td><td>prime</td><td>rand</td><td>rehash</td></tr>
<tr><td>req</td><td>rsa</td><td>rsautl</td><td>s_client</td></tr>
<tr><td>s_server</td><td>s_time</td><td>sess_id</td><td>smime</td></tr>
<tr><td>speed</td><td>spkac</td><td>srp</td><td>storeutl</td></tr>
<tr><td>ts</td><td>verify</td><td>version</td><td>x509</td></tr>
</table>
</li>
<li><h3>Message Digest commands (see the `dgst' command for more details)</h3>
<table>
<tr>
<td>blake2b512</td><td>blake2s256</td><td>gost</td><td>md4</td>
</tr>
<tr>
<td>md5</td><td>rmd160</td><td>sha1</td><td>sha224</td>
</tr>
<tr>
<td>sha256</td><td>sha3-224</td><td>sha3-256</td><td>sha3-384</td>
</tr>
<tr>
<td>sha3-512</td><td>sha384</td><td>sha512</td><td>sha512-224</td>
</tr>
<tr>
<td>sha512-256</td><td>shake128</td><td>shake256</td><td>sm3</td>
</tr>
</table>
</li>
<li><h3>Cipher commands (see the `enc' command for more details)</h3>
<table>
<tr>
<td>aes-128-cbc</td><td>aes-128-ecb</td><td>aes-192-cbc</td><td>aes-192-ecb</td>
</tr>
<tr>
<td>aes-256-cbc</td><td>aes-256-ecb</td><td>aria-128-cbc</td><td>aria-128-cfb</td>
</tr>
<tr>
<td>aria-128-cfb1</td><td>aria-128-cfb8</td><td>aria-128-ctr</td><td>aria-128-ecb</td>
</tr>
<tr>
<td>aria-128-ofb</td><td>aria-192-cbc</td><td>aria-192-cfb</td><td>aria-192-cfb1</td>
</tr>
<tr>
<td>aria-192-cfb8</td><td>aria-192-ctr</td><td>aria-192-ecb</td><td>aria-192-ofb</td>
</tr>
<tr>
<td>aria-256-cbc</td><td>aria-256-cfb</td><td>aria-256-cfb1</td><td>aria-256-cfb8</td>
</tr>
<tr>
<td>aria-256-ctr</td><td>aria-256-ecb</td><td>aria-256-ofb</td><td>base64</td>
</tr>
<tr>
<td>bf</td><td>bf-cbc</td><td>bf-cfb</td><td>bf-ecb</td>
</tr>
<tr>
<td>bf-ofb</td><td>camellia-128-cbc</td><td>camellia-128-ecb</td><td>camellia-192-cbc</td>
</tr>
<tr>
<td>camellia-192-ecb</td><td>camellia-256-cbc</td><td>camellia-256-ecb</td><td>cast</td>
</tr>
<tr>
<td>cast-cbc</td><td>cast5-cbc</td><td>cast5-cfb</td><td>cast5-ecb</td>
</tr>
<tr>
<td>cast5-ofb</td><td>des</td><td>des-cbc</td><td>des-cfb</td>
</tr>
<tr>
<td>des-ecb</td><td>des-ede</td><td>des-ede-cbc</td><td>des-ede-cfb</td>
</tr>
<tr>
<td>des-ede-ofb</td><td>des-ede3</td><td>des-ede3-cbc</td><td>des-ede3-cfb</td>
</tr>
<tr>
<td>des-ede3-ofb</td><td>des-ofb</td><td>des3</td><td>desx</td>
</tr>
<tr>
<td>rc2</td><td>rc2-40-cbc</td><td>rc2-64-cbc</td><td>rc2-cbc</td>
</tr>
<tr>
<td>rc2-cfb</td><td>rc2-ecb</td><td>rc2-ofb</td><td>rc4</td>
</tr>
<tr>
<td>rc4-40</td><td>seed</td><td>seed-cbc</td><td>seed-cfb</td>
</tr>
<tr>
<td>seed-ecb</td><td>seed-ofb</td><td>sm4-cbc</td><td>sm4-cfb</td>
</tr>
<tr>
<td>sm4-ctr</td><td>sm4-ecb</td><td>sm4-ofb</td>
</tr>
</table>
</li>
</ul>
</html>
<html>
<ul>
<li>A Unit file can be in one of the following states:
<ol>
<li><b><em>stop</em></b>
</li>
<li><b><em>disable</em></b><br />
i.e. all symlinks of the specified unit file are removed
</li>
<li><b><em>mask</em></b> (<em>“third level of off“</em>)<br />
i.e. the units will be linked to /dev/null
</li>
</ol>
</li>
<li>The services labeled as <b><em>masked</em></b> can neither be started manually<br />
(using the <b><em>start</em></b> command) nor by systems (at system boot). <br />
Therefore, use caution when employing the <em><b>systemctl mask</b></em> com‐<br />
mand on a service.
</li>
<li>The infos will be displayed by using e.g. systemctl status halt.service.
</li>
<li>The advantage of mask is to prevent any kind of activation, even manual.
</li>
<p>
Caution: systemctl list-unit-files is listing the state of the unit files (static, enabled, disabled, masked, indirect) and has nothing to do with the state of the service. To have a look at the services use systemctl list-units.
</p>
<h3>Links:</h3>
<ul>
<li><a href="https://askubuntu.com/questions/710420/why-are-some-systemd-services-in-the-masked-state"
target="_blank" rel="noreferrer noopener">
Ask Ubuntu :: Why are some systemd services in the "masked" state?</a>
</li>
</ul>
</html>
<html>
<body>
<p>
If you are a sysadmin, managing your Linux server's hard disk<br />
partition is a critical task.<br />
<br />
In this tutorial, we'll focus on how to use sfdisk command-line<br />
utility to manage your hard disk partitions.<br />
<br />
While sfdisk is similar to fdisk, there are few partition manipu‐<br />
lation activities that are very easy to perform in sfdisk. For<br />
example, you can create new partitions in an non-interactive<br />
method using sfdisk.<br />
</p>
The following sfdisk activities are covered in this tutorial:
<a name="toc"></a>
<ol>
<li><a href="#first">View Existing Disk Partitions</a>
</li>
<li><a href="#second">Change Display Units (Display Size in MB)</a>
</li>
<li><a href="#third">Create New Disk Partitions (Interactive Method)</a>
</li>
<li><a href="#fourth">Verify Partition Table Consistency</a>
</li>
<li><a href="#fifth">Display Total Partition Size</a>
</li>
<li><a href="#sixth">Dump Disk Partition Details to Text File</a>
</li>
<li><a href="#seventh">Create New Partitions from Text File (Non-interactive Method)</a>
</li>
<li><a href="#eigthth">Display Extended Partition Details</a>
</li>
<li><a href="#nineth">Display Disk Geometry for Debugging</a>
</li>
<li><a href="#tenth">Display All Disk Partition types</a>
</li>
<li><a href="#eleventh">Manipulate Only a Single Disk Partition</a>
</li>
<li><a href="#twelveth">Dry-run Mode for Verification</a>
</li>
<li><a href="#thirteenth">Mark a Specific Partition as Bootable</a>
</li>
<li><a href="#fourteenth">Change Partition Type</a>
</li>
<li><a href="#fifteenth">Create New Partitions from Shell Script (Non-interactive Method)</a>
</li>
</ol>
</p>
<a name="first"><h3>1. View Existing Disk Partitions</h3></a>
Using -l option you can view all your disk partitions. -l stands for list.
By default this will display partitions of all the disks on your systems.
<code><pre>
# sfdisk -l
Disk /dev/sda: 1044 cylinders, 255 heads, 63 sectors/track
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sda1 * 0+ 1044- 1045- 8387584 83 Linux
/dev/sda2 0 - 0 0 0 Empty
/dev/sda3 0 - 0 0 0 Empty
/dev/sda4 0 - 0 0 0 Empty
Disk /dev/sdf: 1044 cylinders, 255 heads, 63 sectors/track
</pre></code>
In the above:
<ul>
<li>It displays the partitions for both sda and sdf device.
</li>
<li>sda has only one partition. i.e sda1. But, the -l option will still always display all the 4 primary partition information. Since, in this example, sda has only one partition (i.e sda1), the remaining 3 partitions (sda2, sda3, sda4) will says “Empty“ in the last column.
</li>
<li>The device sdf doesn't have any partition. i.e Nothing has been created on this device yet. So, it doesn't list anything for this device.
</li>
</ul>
You can also view disk partitions of a specific device by passing the device name as shown below.
<code><pre>
# sfdisk -l /dev/sdf
</pre></code>
Instead of -l, you can also use ‐ ‐list as shown below.
<code><pre>
sfdisk ‐‐list
sfdisk ‐‐list /dev/sdf
</pre></code>
If you are new to managing hard disk, you may also want to understand how to use the regular trusted fdisk command: <br />
<a href="https://www.thegeekstuff.com/2010/09/linux-fdisk"
target="_blank" rel="noreferrer noopener">
The Geek Stuff ::7 Linux fdisk Command Examples to Manage Hard Disk Partition</a><br />
<br />
<a href="#toc">TOC</a>
<a name="second"><h3>2. Change Display Units (Display Size in MB)</h3></a>
By default, sfdisk will display the size in blocks. In the above sfdisk -l output, look at the column called “#blocks“.<br />
<br />
However, if you want to display the size in MB, then use the -u option as shown below. -u stands for Unit. You have to specify the unit type. In this example, the unit type we are specifying is M (which is MB).<br />
<br />
-uM option will replace the “#cyls“ column from the above output with “MiB“ (size in MB) as shown below.
<code><pre>
# sfdisk -l -uM
Disk /dev/sdf: 1044 cylinders, 255 heads, 63 sectors/track
Units: 1MiB = 1024*1024 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End MiB #blocks Id System
/dev/sdf1 0+ 8032- 8033- 8225279+ 83 Linux
/dev/sdf2 8032+ 8189- 157- 160650 83 Linux
/dev/sdf3 0 - 0 0 0 Empty
/dev/sdf4 0 - 0 0 0 Empty
</pre></code>
The following are the different unit types that you can specify:
<ul>
<li>M for MB
</li>
<li>C for number of cylinders (this is the default)
</li>
<li>S for number of sectors
</li>
<li>B for number of blocks (this is also display in the default output along with #cylinders)
</li>
</ul>
<code><pre>
# sfdisk -l -uM
# sfdisk -l -uC
# sfdisk -l -uS
# sfdisk -l -uB
</pre></code>
<br />
<a href="#toc">TOC</a>
<a name="third"><h3>3. Create New Disk Partitions (Interactive Method)</h3></a>
In the following example, we'll take an empty hard disk (sdf) and create partitions on it using sfdisk.
<code><pre>
# sfdisk /dev/sdf
</pre></code>
The following is the output of the above command broken down into multiple section to understand it easily.<br />
<br />
First, it will check the sdf to make sure it is not currently mounted or getting used by somebody else.
<code><pre>
Checking that no-one is using this disk right now ...
OK
</pre></code>
Next, it will display the current partition information on this device. As<br />
seen from here, currently there are no partition on sdf device.
<code><pre>
Disk /dev/sdf: 1044 cylinders, 255 heads, 63 sectors/track
sfdisk: /dev/sdf: unrecognized partition table type
Old situation:
sfdisk: No partitions found
</pre></code>
Next, it will ask you to enter partition size for all 4 primary partition. Even<br />
if you want to create only one partition, it will prompt you 4 different time<br />
for all primary partitions.<br />
<br />
In the following:<br />
<ul>
<li>In this example, I like to create two partition.
</li>
<li>So, when it prompted for “/dev/sdf1 :“, I'm creating the 1st<br />
partition. Here, I entered “0 1024“. 0 is the start of the cylinder, and<br />
1024 is the end of the cylinder for the 1st partition.<br />
</li>
<li>Next, when it prompted for “/dev/sdf2 :“, I'm creating the<br />
2nd partition. Here, I just pressed enter, which will take all the remai‐<br />
ning space and create the 2nd partition.<br />
</li>
<li>Next, I just pressed enter for sdf3 and sdf4. Since there is no space<br />
left on sdf, it will just be Empty as shown below.<br />
</li>
<li>Also, please note that by default it will create the partition as<br />
“Linux“ type. If you want to change it to different type, you<br />
should specify the type.<br />
</li>
</ul>
<code><pre>
Input in the following format; absent fields get a default value.
<start> <size> <type [E,S,L,X,hex]> <bootable [-,*]> <c,h,s> <c,h,s>
Usually you only need to specify <start> and <size> (and perhaps <type>).
/dev/sdf1 :0 1024
/dev/sdf1 0+ 1023 1024- 8225279+ 83 Linux
/dev/sdf2 :
/dev/sdf2 1024 1043 20 160650 83 Linux
/dev/sdf3 :
/dev/sdf3 0 - 0 0 0 Empty
/dev/sdf4 :
/dev/sdf4 0 - 0 0 0 Empty
</pre></code>
Now, sfdisk will display the partitions that it will create. As shown<br />
below, it will be creating two partitions (sdf1 and sdf2).
<code><pre>
New situation:
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdf1 0+ 1023 1024- 8225279+ 83 Linux
/dev/sdf2 1024 1043 20 160650 83 Linux
/dev/sdf3 0 - 0 0 0 Empty
/dev/sdf4 0 - 0 0 0 Empty
Warning: no primary partition is marked bootable (active)
This does not matter for LILO, but the DOS MBR will not boot this disk.
</pre></code>
Finally, it will ask for confirmation. If you've made a mistake and<br />
don't want to create the above partitions, type “q“ to exit.<br />
Here, I typed y to create these two new partitions.
<code><pre>
Do you want to write this to disk? [ynq] y
Successfully wrote the new partition table
Re-reading the partition table ...
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
</pre></code>
Finally, I verified that the partitions got created successfully using<br />
sfdisk -l as shown below.
<code><pre>
# sfdisk -l /dev/sdf
Disk /dev/sdf: 1044 cylinders, 255 heads, 63 sectors/track
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdf1 0+ 1023 1024- 8225279+ 83 Linux
/dev/sdf2 1024 1043 20 160650 83 Linux
/dev/sdf3 0 - 0 0 0 Empty
/dev/sdf4 0 - 0 0 0 Empty
</pre></code>
On a related note, for creating large size partitions, refer to this: <br />
<a href="https://www.thegeekstuff.com/2012/08/2tb-gtp-parted"
target="_blank" rel="noreferrer noopener">
The Geek Stuff :: How to Create Partition on Linux for >2TB Size using Parted GPT</a><br />
<br />
<a href="#toc">TOC</a>
<a name="fourth"><h3>4. Verify Partition Table Consistency</h3></a>
Use -V (upper-case V) option to perform consistency check on the partition tables. V stands for verify.
As shown in the following output, it will say “OK“ when everything is good. This will also display any warning messages.
<code><pre>
# sfdisk -V
Warning: partition 1 does not end at a cylinder boundary
/dev/sda: OK
Warning: no primary partition is marked bootable (active)
This does not matter for LILO, but the DOS MBR will not boot this disk.
/dev/sdf: OK
</pre></code>
You can also verify only a specific device as shown below.
<code><pre>
# sfdisk -V /dev/sdf
</pre></code>
Also, you can combine V and l option as shown below.
<code><pre>
sfdisk -lV
</pre></code>
If you are performing the verification from inside a shell script, then<br />
you can use -q option along with V. q stands for quiet. In this case,<br />
it will not display any output. But, you can check the status of the<br />
command to check whether the consistency check passed or failed<br />
as shown below.
<code><pre>
# sfdisk -Vq
# echo $?
0
</pre></code>
If you want to check the consistency of the disk content itself, then use this method: <br />
<a href="https://www.thegeekstuff.com/2012/08/fsck-command-examples"
target="_blank" rel="noreferrer noopener" >
The Geek Stuff :: 10 Linux Fsck Command Examples to Check and Repair Filesystem</a><br />
<br />
<a href="#toc">TOC</a>
<a name="fifth"><h3>5. Display Total Partition Size</h3></a>
To display the total size of the disk including all the partitions, use the -s option. -s stands for size.
This will display the total partition size in number of blocks.
By default, this will display the total partition size for each and every hard disk on your system. Also, it will display the total size for all the disks on your system as shown below.
<code><pre>
# sfdisk -s
/dev/sda: 8388608
/dev/sdf: 8388608
total: 16777216 blocks
</pre></code>
You can also specify the individual hard disk (or) partition as shown below.
<code><pre>
# sfdisk -s /dev/sdf
8388608
# sfdisk -s /dev/sdf1
1654694
</pre></code>
<br />
<a href="#toc">TOC</a>
<a name="sixth"><h3>6. Dump Disk Partition Details to Text File</h3></a>
sfdisk also provides the option for you to dump all the disk partition information into a text file.
For this use the -d option. -d stands for dump.
By default, -d will dump the output on the screen. This will include the partition information for all the devices on your system.
<code><pre>
# sfdisk -d
</pre></code>
You can also dump the partition information of a particular device as shown below.
<code><pre>
# sfdisk -d /dev/sda
</pre></code>
To dump it to a text file, do the following. This will dump the partition information of sda into sda.out text file.
<code><pre>
# sfdisk -d /dev/sda > sda.out
# cat sda.out
# partition table of /dev/sda
unit: sectors
/dev/sda1 : start= 2048, size= 16775168, Id=83, bootable
/dev/sda2 : start= 0, size= 0, Id= 0
/dev/sda3 : start= 0, size= 0, Id= 0
/dev/sda4 : start= 0, size= 0, Id= 0
</pre></code>
<br />
<a href="#toc">TOC</a>
<a name="seventh"><h3>7. Create New Partitions from Text File (Non‐interactive Method)</h3></a>
The beauty of the -d option is that you can take a partition dump <br />
of a particular device, and use that to create a similar partition<br />
dump on another device.<br />
<br />
For example, if you want to replicate the current partition on sda<br />
device onto sdf device, then you can use the -d option as shown<br />
below.<br />
<br />
First, take the dump of sda device as shown in the previous <br />
example to sda.out file.<br />
<br />
In the above example, as we see we have one partition on <br />
sda device.<br />
<br />
Now, on the sdf device, currently we have two partitions.
<code><pre>
# sfdisk -l /dev/sdf
Disk /dev/sdf: 1044 cylinders, 255 heads, 63 sectors/track
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdf1 0+ 499 500- 4016249+ 83 Linux
/dev/sdf2 500 1043 544 4369680 83 Linux
/dev/sdf3 0 - 0 0 0 Empty
/dev/sdf4 0 - 0 0 0 Empty
</pre></code>
Now, use the sda.out file from the previous example, and use it <br />
to create similar partitions on the sdf device as shown below.
<code><pre>
# sfdisk /dev/sdf < sda.out
</pre></code>
The above command will use the partition information from <br />
sda.out file and use it to create new partition on sdf automa-<br />
tically without asking any input from the user as shown below.
<code><pre>
Checking that no-one is using this disk right now ...
OK
Disk /dev/sdf: 1044 cylinders, 255 heads, 63 sectors/track
Old situation:
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdf1 0+ 499 500- 4016249+ 83 Linux
/dev/sdf2 500 1043 544 4369680 83 Linux
/dev/sdf3 0 - 0 0 0 Empty
/dev/sdf4 0 - 0 0 0 Empty
New situation:
Units: sectors of 512 bytes, counting from 0
Device Boot Start End #sectors Id System
/dev/sdf1 * 2048 16777215 16775168 83 Linux
/dev/sdf2 0 - 0 0 Empty
/dev/sdf3 0 - 0 0 Empty
/dev/sdf4 0 - 0 0 Empty
Warning: partition 1 does not end at a cylinder boundary
Successfully wrote the new partition table
Re-reading the partition table ...
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
</pre></code>
Now, as you see from the following output sdf has one new<br />
partition, which is similar to sda.
<code><pre>
# sfdisk -l
Disk /dev/sda: 1044 cylinders, 255 heads, 63 sectors/track
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sda1 * 0+ 1044- 1045- 8387584 83 Linux
/dev/sda2 0 - 0 0 0 Empty
/dev/sda3 0 - 0 0 0 Empty
/dev/sda4 0 - 0 0 0 Empty
Disk /dev/sdf: 1044 cylinders, 255 heads, 63 sectors/track
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdf1 * 0+ 1044- 1045- 8387584 83 Linux
/dev/sdf2 0 - 0 0 0 Empty
/dev/sdf3 0 - 0 0 0 Empty
/dev/sdf4 0 - 0 0 0 Empty
</pre></code>
<br />
<a href="#toc">TOC</a>
<a name="eigthth"><h3>8. Display Extended Partition Details</h3></a>
x stands for eXtended partition. When you combine x along <br />
with l, then it will also display the non-primary extended par-<br />
titions as shown below.
<code><pre>
# sfdisk -lx /dev/sdf
Disk /dev/sdf: 1044 cylinders, 255 heads, 63 sectors/track
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdf1 0+ 205 206- 1654694+ 83 Linux
/dev/sdf2 206 411 206 1654695 83 Linux
/dev/sdf3 412 514 103 827347+ 82 Linux swap / Solaris
/dev/sdf4 515 1043 529 4249192+ 5 Extended
/dev/sdf5 515+ 617 103- 827347 83 Linux
- 618 1043 426 3421845 5 Extended
- 515 514 0 0 0 Empty
- 515 514 0 0 0 Empty
/dev/sdf6 618+ 1043 426- 3421844+ 83 Linux
- 618 617 0 0 0 Empty
- 618 617 0 0 0 Empty
- 618 617 0 0 0 Empty
</pre></code>
You can also use -x option when you are creating new par-<br />
titions in which case, sfdisk will ask for (or expect) input de-<br />
scriptors for them.<br />
<br />
<a href="#toc">TOC</a>
<a name="nineth"><h3>9. Display Disk Geometry for Debugging</h3></a>
When you are debugging any issues related to partitions<br />
tables, one of the things that you should verify is whether<br />
partition table information is same on the device as it is<br />
understood by kernel.<br />
<br />
It is a good idea to verify that the kernel's idea of the geometry<br />
of the device is same as the real geometry of the device<br />
by directly reading the partition table.<br />
<br />
–G option (upper-case G) will display the real geometry<br />
of the device by directly reading the partition table as shown<br />
below.
<code><pre>
# sfdisk -G
/dev/sda: 1044 cylinders, 255 heads, 63 sectors/track
/dev/sdf: 1044 cylinders, 255 heads, 63 sectors/track
</pre></code>
–g option (lower-case g) will display the kernel's idea of the geometry of the device.
<code><pre>
# sfdisk -g
/dev/sda: 1044 cylinders, 255 heads, 63 sectors/track
/dev/sdf: 1044 cylinders, 255 heads, 63 sectors/track
</pre></code>
In this example, both the output matches like it should. If this doesn't match, then there is some problem.<br />
<br />
<a href="#toc">TOC</a>
<a name="tenth"><h3>10. Display All Disk Partition types</h3></a>
To view all the supported partition types that can be used while creating new partitions using sfdisk, use the -T option. T stands for type (i.e partition type).
This will display the partition type id, and descriptive name. While creating the partition you'll specify the partition type id. For example, use 82 as type for swap partition.
<code><pre>
# sfdisk -T
Id Name
0 Empty
1 FAT12
2 XENIX root
3 XENIX usr
4 FAT16 <32M
5 Extended
6 FAT16
…
…
82 Linux swap / Solaris
83 Linux
84 OS/2 hidden C: drive
85 Linux extended
86 NTFS volume set
87 NTFS volume set
88 Linux plaintext
8e Linux LVM
…
…
</pre></code>
Regarding swap space:<br />
<a href="https://www.thegeekstuff.com/2010/08/how-to-add-swap-space/"
target="_blank" rel="noreferrer noopener">
The Geek Stuff :: 2 Ways to Add Swap Space Using dd, mkswap and swapon</a><br />
<br />
<a href="#toc">TOC</a>
<a name="eleventh"><h3>11. Manipulate Only a Single Disk Partition</h3></a>
You can use –N option to manipulate a particular disk partition. <br />
–N stands for number (i.e partition number).<br />
<br />
You can use this to create a new partition on an existing disk which<br />
already have other partitions.<br />
<br />
In the following example, in the sdf device, we already have one<br />
partition. But, we want to create a 2nd partition.
<code><pre>
# sfdisk /dev/sdf -N2
Checking that no-one is using this disk right now ...
OK
Disk /dev/sdf: 1044 cylinders, 255 heads, 63 sectors/track
Old situation:
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdf1 0+ 511 512- 4112639+ 83 Linux
/dev/sdf2 0 - 0 0 0 Empty
/dev/sdf3 0 - 0 0 0 Empty
/dev/sdf4 0 - 0 0 0 Empty
Input in the following format; absent fields get a default value.
<start> <size> <type [E,S,L,X,hex]> <bootable [-,*]> <c,h,s> <c,h,s>
Usually you only need to specify <start> and <size> (and perhaps <type>).
/dev/sdf2 :512 1024
Warning: given size (1024) exceeds max allowable size (532)
/dev/sdf2 :512 532
/dev/sdf2 512 1043 532 4273290 0 Empty
New situation:
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdf1 0+ 511 512- 4112639+ 83 Linux
/dev/sdf2 512 1043 532 4273290 0 Empty
/dev/sdf3 0 - 0 0 0 Empty
/dev/sdf4 0 - 0 0 0 Empty
Warning: no primary partition is marked bootable (active)
This does not matter for LILO, but the DOS MBR will not boot this disk.
Do you want to write this to disk? [ynq] y
Successfully wrote the new partition table
Re-reading the partition table ...
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
</pre></code>
In the above:<br />
<ul>
<li>We used -N2 option to manipulate only the 2nd partition.<br />
</li>
<li>This which means that, sfdisk will ask you for the partition <br />
information only for sdf2 as shown above.<br />
</li>
<li>This will not modify the existing sdf1 partition.<br />
</li>
<li>Also, this will not prompt you for information on sdf3 and sdf4.<br />
</li>
</ul>
<br />
<a href="#toc">TOC</a>
<a name="twelveth"><h3>12. Dry-run Mode for Verification</h3></a>
Before you really create a new partition, or change any information<br />
on the partition tables, you want to make sure whether the syntax <br />
of the command you have is all good.<br />
<br />
In that case, it is best to use the -n option, which will really go through<br />
all the motions without really doing anything.<br />
<br />
-n option is a dry-run option, which will go through whatever the<br />
command is supposed to do, but will not save anything, or change<br />
anything.<br />
<br />
For example, when you are changing a partition type, you can use<br />
-n option, which will go through the command but will not really<br />
change anything as shown below.
<code><pre>
# sfdisk -n --change-id /dev/sdf 1 82
sfdisk: -n flag was given: Nothing changed
</pre></code>
You can also use this when you are creating new partitions as<br />
shown below. This will go through the command and display<br />
everything in the output, but without really creating new partitions.
<code><pre>
sfdisk -n /dev/sdf < sda.out
</pre></code>
<br />
<a href="#toc">TOC</a>
<a name="thirteenth"><h3>13. Mark a Specific Partition as Bootable</h3></a>
Use -A option to mark a specific partition as boot partition. -A <br />
stands for activate.<br />
<br />
The following example is activating 2nd partition (sdf2) as active<br />
partition (i.e marking as boot). Please note that if any other par-<br />
tition on this device (sdf) is already marked for boot, they'll be<br />
unmarked now.
<code><pre>
# sfdisk -A2 /dev/sdf
Done
</pre></code>
As you see from the following output, only sdf2 is made active.<br />
The “&asterisk;“ in the 2nd column (i.e Boot) indicates<br />
that this is marked as boot partition.
<code><pre>
# sfdisk -l /dev/sdf
Disk /dev/sdf: 1044 cylinders, 255 heads, 63 sectors/track
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdf1 0+ 511 512- 4112639+ 83 Linux
/dev/sdf2 * 512 1043 532 4273290 0 Empty
/dev/sdf3 0 - 0 0 0 Empty
/dev/sdf4 0 - 0 0 0 Empty
</pre></code>
<br />
<a href="#toc">TOC</a>
<a name="fourteenth"><h3>14. Change Partition Type</h3></a>
You can change partition type of an existing partition.<br />
<br />
First, use the – –print-id option to dis-<br />
play the partition type of a specific partition. The following<br />
command will display the partition type of sdf1. Here 83 in<br />
the output indicates that sdf1 is Linux partition type.
<code><pre>
# sfdisk --print-id /dev/sdf 1
83
</pre></code>
The following output 0 indicates that the sdf2 partition is<br />
currently empty.
<code><pre>
# sfdisk --print-id /dev/sdf 2
0
</pre></code>
Now, use the –&ndsp;–change-id option as<br />
shown below to change the partition type of a partition<br />
device.
In this example, we are changing the partition type of<br />
sdf2 partition to 83 (which is Linux partition)
<code><pre>
# sfdisk --change-id /dev/sdf 2 83
Done
</pre></code>
As you see from the following output, now the sdf2 is<br />
set to Linux partition type (.i.e Look at the last column<br />
“System“)
<code><pre>
# sfdisk -l /dev/sdf
Disk /dev/sdf: 1044 cylinders, 255 heads, 63 sectors/track
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdf1 0+ 511 512- 4112639+ 83 Linux
/dev/sdf2 * 512 1043 532 4273290 83 Linux
/dev/sdf3 0 - 0 0 0 Empty
/dev/sdf4 0 - 0 0 0 Empty
</pre></code>
<br />
<a href="#toc">TOC</a>
<a name="fifteenth"><h3>15. Create New Partitions from Shell Script (Non‐interactive Method)</h3></a>
One of the great benefit of sfdisk is that you can <br />
create partition on-the-fly from command-line with-<br />
out any interaction from sfdisk.<br />
<br />
This is very helpful when you want to automate<br />
the partition creation from a shell-script.<br />
<br />
Currently, as you see from the following output,<br />
the sdf device is currently empty. This doesn't have<br />
any partitions.
<code><pre>
# sfdisk -l /dev/sdf
Disk /dev/sdf: 1044 cylinders, 255 heads, 63 sectors/track
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdf1 0 - 0 0 0 Empty
/dev/sdf2 0 - 0 0 0 Empty
/dev/sdf3 0 - 0 0 0 Empty
/dev/sdf4 0 - 0 0 0 Empty
</pre></code>
Now, execute the following command, which will auto-<br />
matically create three partitions (sdf1, sdf2, sdf3) using<br />
the values provided below.
<code><pre>
# sfdisk /dev/sdf <<EOF
0,512
,512
;
;
EOF
</pre></code>
In the above:<br />
<ul>
<li>There should be 4 lines in the above input for all 4<br />
primary partitions.<br />
</li>
<li>The first line indicates that it should start from 1st<br />
cylinder until 512 to create 1st partition (i.e sdf1).<br />
</li>
<li>The second line indicates that it should start from<br />
the last available cylinder as the first cylinder and<br />
from there use +512 cylinders to create the 2nd <br />
partition (i.e sdf2).
</li>
<li>The third line has semi-colon, which indicates that<br />
use the default values, and don't prompt any-<br />
thing from the user for the 3rd partition. In this case,<br />
it will use all remaining cylinders on the disk and<br />
create 3rd partition (i.e sdf3).
</li>
<li>The fourth line has semi-colon, which indicates<br />
that use the default values, and don't prompt<br />
anything from the user for the 4th partition. In<br />
this case, since there is no space left, it will not<br />
create anything for 4th partition (i.e sdf4)<br />
</li>
</ul>
The following is the output of the above sfdisk command. <br />
Please note that this is not asking for any input from the user.
<code><pre>
Checking that no-one is using this disk right now ...
OK
Disk /dev/sdf: 1044 cylinders, 255 heads, 63 sectors/track
Old situation:
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdf1 0 - 0 0 0 Empty
/dev/sdf2 0 - 0 0 0 Empty
/dev/sdf3 0 - 0 0 0 Empty
/dev/sdf4 0 - 0 0 0 Empty
New situation:
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdf1 0+ 511 512- 4112639+ 83 Linux
/dev/sdf2 512 1023 512 4112640 83 Linux
/dev/sdf3 1024 1043 20 160650 83 Linux
/dev/sdf4 0 - 0 0 0 Empty
Warning: no primary partition is marked bootable (active)
This does not matter for LILO, but the DOS MBR will not boot this disk.
Successfully wrote the new partition table
Re-reading the partition table ...
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
</pre></code>
Verify that the three partitions got created automatically using<br />
the provided values.
<code><pre>
# sfdisk -l /dev/sdf
Disk /dev/sdf: 1044 cylinders, 255 heads, 63 sectors/track
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdf1 0+ 511 512- 4112639+ 83 Linux
/dev/sdf2 512 1023 512 4112640 83 Linux
/dev/sdf3 1024 1043 20 160650 83 Linux
/dev/sdf4 0 - 0 0 0 Empty
</pre></code>
<br />
<a href="#toc">TOC</a>
</body>
<footer>
<h3>Link:</h3>
<a href="http://www.thegeekstuff.com/2017/05/sfdisk-examples/"
target="_blank" rel="noreferrer noopener">
The Geek Stuff :: sfdisk ‐ examples</a>
<br />
<br />
<br />
<br />
</footer>
</html>
<html>
Ein Location-Path ist wie folgt aufgebaut:<br />
<pre><b>Absolut:</b>
/verhältnis[prädikat]/verhältnis[prädikat]/....
<b>Relativ:</b>
verhältnis[prädikat]/verhältnis[prädikat]/....</pre><br />
<b>verhältnis</b> gibt dabei das Verhältnis der gesuchten Knoten zum aktuellen Knoten an.<br />
<h3>Link:</h3>
<ul>
<li><a href="http://www.fh-wedel.de/~si/seminare/ss01/Ausarbeitung/5.xslt/xslt3.htm" target="_blank" rel="noreferrer noopener">FH Wedel :: XSLT</a></li>
</ul>
</html>
Das Logging für den MLC-Logger einschalten:
File ''mlc_logger.xml''
im Verzeichnis <application dir>/fs/public/mxres/mxmlc/
<logger name=" murex.ext.server.mom">
<level value="DEBUG"/>
<appender-ref ref="mxmlc" />
</logger>
Die Log-Infos werden im File .mxmlc....log file abgelegt
<html>
Sometimes you look for a string <br />
in files on your directory using<br />
grep, but you end up getting funny <br />
characters on your terminal. This <br />
is really annoyance, since sometimes <br />
you have to reset your terminal if <br />
you are using X. What you can do, <br />
you can grep only those files that in <br />
text by doing the following command:<br />
<br /><code>
grep "hello world" `find ./ -name "*" -print -exec file {} \; | grep text | cut -d ':' -f 1`<br />
</code><br />
Sure you have to change the "hello World" <br />
to the string what you are looking for.<br />
</html>
<html>
<h3>Lotus Notes - Wissenswertes </h3>
IBM Software, Management-Tool<br />
<br />
enthät Mail- und Kalender-Bereich<br />
Oberfläche eingeteilt in Arbeitsbereiche, die wiederum Kacheln enthalten<br />
<br />
<b>• Passwort ändern:</b><br />
Datei --> Sicherheit --> Benutzersicherheit<br />
<br />
<b>• Abwesenheitsagenten aktivieren & deaktivieren</b><br />
In das eigene Postfach wechslen;<br />
In der Kopfleiste "Mehr ... " auswählen;<br />
Dann "Abwesenheit" auswählen;<br />
"Status" anpassen<br />
<br />
<b>• Signatur ändern </b><br />
In das eigene Postfach wechslen;<br />
--> “Aktionen“ <br />
--> “Mehr“ <br />
--> “Vorgaben“ <br />
--> Tab “Mail“ --> Tab “Signatur“<br />
<br />
<b>Mehrere Einträge zu Verarbeitung (z.B. Verschieben) markieren: </b><br />
Shiift + Pfeil-nach-oben-Taste <br />
<br />
<h4>Utilities:</h4>
<p><b>• killNotes</b><br />
Programm: killNotes.exe<br />
killed Lotus Notes-Zombies, die nach einem unkontrolliertem Abbruch noch laufen
</p>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://www.luca-app.de/" target="_blank" rel="noreferrer noopener">Luca :: Homepage</li>
<li><a href="https://www.giga.de/artikel/luca-app-anleitung-so-funktioniert-die-app-und-das-einchecken/" target="_blank"
rel="noreferrer noopener">GIGA :: Luca‐App ‐ So funktioniert die App </a></li>
</ul>
</html>
<html>
<ul>
<li>Analyse von Heap-Dumps (“<i>Out-Of-Memory</i>“-Error), <br /> Speicheranalyse-Werkzeug</li>
<li>sprachunabhängig, solange die JVM verwendet wird<br />
(Beispiele: Jave, Kotlin, Scala)</li>
<li>läßt sich sowohl <b><code>stand-alone</code></b><br />
als auch <b><code>integriert in Eclipse</code></b> verwenden.</li>
</ul>
<h3>Installation</h3>
<ul>
<li>Entpacken des zip-Files in einem beliebigen Ordner;</li>
<li>Die startbare Datei befindet sich daraufhin:
<ul>
<li>im Ordner "mat"
<ul>
<li>unter Linux, Solaris und MacOSX :: Unter dem Dateinamen "MemoryAnalyzer" </li>
<li>unter Windows :: Unter dem Dateinamen "MemoryAnalyzer.exe" </li>
</ul></li></ul></li>
<li>MAT kann per Software-Update in eine vorhandene Eclipse-Umgebung als Plugin <br />
eingebunden werden:
<ul>
<li>Hierzu ist Über "Help" -> "Software Updates..." der Button "Add Site..." zu wählen. Unter "Location" muss die URL "http://download.eclipse.org/technology/mat/0.7/update-site/" eingegeben und mit "OK" bestätigt werden.</li>
<li>Daraufhin kann im linken Fensterteil der Memory Analyzer über die eingerichtete "Memory Update Site" mit Setzen eines Häkchens ausgewählt und mit "Install" installiert werden.</li>
<li>Anschließend muss Eclipse neu gestartet werden. </li>
<li>Die "Memory Analysis"-Ansicht lässt sich daraufhin über "Open Perspective" -> "Other" öffnen.</li>
</ul></li>
<li>Desweiteren verlangt MAT (in der Eclipse-PlugIn-Variante) auch die Installation der "BIRT Chart Engine", welche der Dartellung der Ergebnisse in Chart-Diagrammen dient. Allerdings wird die aktuelle Version 2.3.1 anscheinend nicht erkannt und nach dem Parsen einer ".hprof"-Datei innerhalb der Eclipse-Umgebung lediglich die Fehlermeldung "BIRT Chart Engine (>2.2.2) not available" ausgegeben.</li>
<li>In der Standalone-Version sind die BIRT-Funktionen schon enthalten und funktionieren hier anstandslos. </li>
</ul>
<h3>Links:</h3>
<a href="https://www.eclipse.org/mat/" target=_blank>MAT :: Homepage</a><br />
IT-Tage 2018, G:\Programming\Java\IT-Tage_2018<br />
<a href="http://www.vogella.com/tutorials/EclipseMemoryAnalyzer/article.html" target=_blank>Eclipse Memory Analyzer (MAT) - Tutorial</a><br />
<a href="http://home.edvsz.fh-osnabrueck.de/skleuker/CSI/Werkzeuge/MAT.html" target=_blank>FH Osnabrück :: Werkzeug MAT</a> (… mit Beispiel!)<br />
<a href="https://eclipsesource.com/blogs/2013/01/21/10-tips-for-using-the-eclipse-memory-analyzer/" target=_blank>EclipseSource :: 10 Tips for using the Eclipse Memory Analyzer</a><br />
</html>
<html>
<ul>
<li>dahinter stecken “durch Hypotheken besicherte Wertpapiere“</li>
<li>s.a. UMWA Börsenbrief, 2021-08-06</li>
</ul>
</html>
- MDRS :: "Market Data Repository Service"
- sorgt dafür, dass die Marktdaten der Murex Financial Database zur
Verfügung gestellt werden
<html>
<h3>Problem:</h3>
Im MLC sind alle Auslastungen (ca) doppelt so hoch als am Freitag <br />
(ebenso wurden die letzten CD-Anpassungen für das Collateral Manage-<br />
ment nicht berücksichtigt).
<h3>Lösung / Hintergrund:</h3>
Hintergrund ist, das die Feeder die Daten doppelt in den Tabellen haben: <br />
<br />
<img src="./pictures/MLC_doppelteFeederEintraege-01.jpg" width=682 height=135><br />
<img src="./pictures/MLC_doppelteFeederEintraege-02.jpg" width=716 height=125><br />
<br />
<b>Anmerkung:</b><br />
Die obigen Einträge sind in der o.g. dynamischen Tabelle zu finden.<br />
<br />
Die Tabellen, die die MLC Daten beinhalten, werden immer durch den User "MUREXFO"<br />
mit Daten geladen. Diese Tabellen sind <b>nicht</b> im truncate-Script für, das die Datamart <br />
Report-Feeder leert.<br />
<br />
Die Feeder sind entsprechend so konfiguriert, dass sie immer nur einen Datensatz “pro <br />
Benutzer“ erlauben. Startet der Feeder, löscht er also erst den alten Datensatz und stellt<br />
dann die neuen ein. <br />
<br />
Da es aber zwei Benutzer gibt, welche Daten per Feeder in die Tabellen geladen haben, <br />
greift sich der MLC beim Reset auch beide Datensätze, sieht alle Geschäfte doppelt <br />
und trägt diese dann auch in die MLC-Tabellen ein. <br />
<br />
Ich habe jetzt alle nicht-MUREXFO-Datensätze aus den Tabellen gelöscht. <br />
<br />
Daher die Bitte, keine Feeder unter euren Benutzerkennungen zu starten wenn es um MLC-<br />
Feeder geht. Bitte die entsprechenden Processingscripte per UC4 starten. <br />
<br />
(eMail von Niels)
</html>
<html>
Pricing<br>
‐‐> e-Tradepad<br>
‐‐> RMT : Leg ‐ Add (oder: Strg+Shift+ Einfügen)<br>
‐‐> Produkt-Type auswählen (z.B. IRS Vanilla),
Doppelklick<br>
‐‐> "Instrument" auswählen: Leertaste: z.B.
Euribor 6M 1Y<br>
‐‐> Maturity Period: 1Y<br>
‐‐> Limits Preview (der eigentliche MLC)<br>
<br>
<img src="./pictures/MLC-Testen.jpeg" alt="">
</html>
<html>
The necessary set up for MQ:<br>
Open a <b>CONFIG</b> session;<br>
<br>
Navigate to <b>Risk/Interfaces/Limits Connector</b>,<br>
right-mouse-click and choose <b>External Systems</b>.<br>
<br>
Highlight the TestConnection option in the image below<br>
and choose the page-with-pen icon in the top left hand <br>
corner to edit the configuration I have set up (with dummy<br>
password).<br>
<br>
Please update the parameters as necessary in order to<br>
allow us to send messages via MQ.<br>
<br>
<p>
<img src="./pictures/mq_setting.png" alt="MQ-Settings">
</p>
</html>
<html>
<h3>MQTT, „Message Queueing Telemetry Transport“ </h3>
<ul>
<li>TCP-basiertes Protokoll</li>
<li>Pub/Sub-Protokoll (Publish/Subscribe): <br />
Clients verbinden sich mit einem Server genannten Broker und können, <br />
falls sie autorisiert sind, Nachrichten publizieren oder auf das Eintreffen<br />
von Nachrichten warten.</li>
<li>Standardmäßig verwendete Ports:<br />
TCP-Port 1883 und den TLS-TCP-Port 8883. </li>
<li>ist das Standard-Messaging- und Datenaustausch-Protokoll<br />
für das IoT, Internet of Things. </li>
</ul>
<br />
<h3>Quellen:</h3>
<ul>
<li>Linux-Magazin 11/2015, "Stille Post"</li>
<li><a href="https://www.hivemq.com/mqtt/" target="_blank" rel="noreferrer noopener">HiveMQ :: Infos</a></li>
<li><a href="https://www.hivemq.com/mqtt-essentials/" target=_blank rel="noreferrer noopener">
HiveMQ :: MQTT essentials</a></li>
<li><a href="https://www.modius-techblog.de/smart-home/mqtt-broker-auf-dem-raspberry-pi/" target="_blank"
rel="noreferrer noopener">Modius ‐ Techblog :: Smart‐Home : MQTT Brocker auf dem RaspberryPi</a></li>
</ul>
</html>
<html>
<ul>
<li>Word starten</li>
<li>Auf den Reiter “Datei“ resp. “File“ klicken</li>
<li>Dann auf “Optionen“ resp. “Options“ klicken</li>
<li>In der linken Leiste “Dokumentprüfung“ resp. “Proofing“ auswählen.</li>
<li>Im rechten Fenster auf “AutoKorrektur-Optonen“ resp. “AutoCorrect Options“ klicken.</li>
<li>Im neuen Fenster im Reiter “AutoKorrektur“ resp. “AutoCorrect“ den Haken entfernen bei:
<ul>
<li>“Zwei Großbuchstaben am Wortanfang korrigieren“ <br />
resp. “Correct TWo INitial CApitals“</li><br />
<li>“Jeden Satz mit einem Großbuchstaben beginnen“ <br />
resp. “Capitalize first letter of sentences“</li><br />
<li>“Wochentage immer großschreiben“ <br />
resp. “Capitalize names of days“</li>
</ul></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://praxistipps.chip.de/ms-office-word-automatische-grossschreibung-ausschalten_34139" target=_blank>Chip :: Ausschalten automatische Großschreibung</a></li>
<li><a href="https://www.philognosie.net/computer/ms-office-word-grossschreibung-am-zeilenanfang-abschalten" target=_blank>philognosie.net :: Großschreibung in Word ausschalten</a></li>
<!-- li><a href="" target=_blank></a></li -->
</ul>
</html>
<html>
Shortcut:
<code><pre>
Alt + <Shift + = >
</pre></code>
</html>
<html>
<ul>
<li>Ctrl + W :: Schließen des Dokuments ("Close")</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://support.office.com/en-us/article/keyboard-shortcuts-in-word-95ef89dd-7142-4b50-afb2-f762f663ceb2" target=_blank>MicroSoft Office Support</a></li>
</ul>
</html>
<html>
Geschrieben von taz<br>
Montag, 14. April 2008 <br>
Manchmal kann man an den einfachsten Dingen fast verzweifeln.<br>
Ausgangsproblem: Ein Worddokument mit 4 Seiten Hochformat, aber <br>
die letzte Seite mit einer
gro&sz;en Tabelle MUSS im Querformat sein <br>
--> mit Datei --> Seite einrichten kann man zwar zwischen Hoch- und <br>
Querformat wechseln, aber damit wird diese Einstellung
für das ganze <br>
Dokument
geändert. <br>
<br>
Muss das sein ? <br>
Nein. Einfach am Ende der Seiten im Hochformat mittels <br>
Einfügen --> Manuellen Umbruch --> Abschnittsumbruch
(Nächste Seite)
auswählen. <br>
Nun kann man im Bereich, der Hochformat sein soll,
über Datei --> Seite einrichten <br>
Hochformat wählen und bei der Schlusstabelle
über den gleichen Weg Querformat <br>
verwenden (in einer Datei). <br>
</html>
<html>
<ul>
<li>Die Liste der MSL-Funktionen für ein (bestimmtes) Menü
kann<br />
über <i>Help → Monitor → Dump MSL functions
list</i><br />
in einer Config-Session ermittelt werden.<br /><br />
Die Liste befindet sich im mx3-Verzeichnis in der Datei <b>mslFunctions.xml</b> </li>
</ul>
</html>
<html>
<ol>
<li><b>lookupDate</b></li>
<br />
<li><b>lookupDouble</b></li>
<br />
<li><b>lookupFilterResults</b></li>
<br />
<li><b>lookupInt</b></li>
<br />
<li><b>lookupInteger</b></li>
<br />
<li><b>lookupNumeric</b></li>
<br />
<li><b>LookupResults</b></li>
<br />
<li><b>lookupResultsGetDate</b></li>
<br />
<li><b>lookupResultsGetInteger</b></li>
<br />
<li><b>lookuptResultsGetList</b></li>
<br />
<li><b>lookupResultsGetNumberOfLines</b></li>
<br />
<li><b>lookupResultsGetNumeric</b></li>
<br />
<li><b>lookupResultsGetString</b></li>
<br />
<li><b>lookupString</b></li>
<br />
</ol>
</html>
<html>
<ul>
<li>von Murex entwickelte, Murex-eigene Script-Sprache</li>
<br />
<li>in Online-Hilfe:<br />
Mx Reference Guide ⇒ Integration ⇒ Pre-trade Sequence ⇒ MSL Functions</li>
<br />
<li>Kommentare: <br />
<table border=1>
<tr> <td> // </td> <td> ... einzeilliger Kommenter </td> </tr>
<tr> <td> /* ... */ </td> <td> ... mehrzeiliger Kommentar </td> </tr>
</table></li>
<br />
<li>Abschluss Befehlszeile: <br />
<ul>
<li>, (Komma) , wenn die Befehle in einem Block stehen ( { ... } )</li>
<li>; (Semikolon), sonst </li>
</ul>
</li>
<br />
<li><b>Kontrollstrukturen:</b> <br />
<ol>
<li>IF - THEN { - ELSE}</li>
<li>WHILE - DO</li>
</ol>
</li>
<br />
<li>Blockbereich: { ... } </li>
<br />
<li><b>Präfixe für Variablen:</b><br />
<ul>
<li> p := Pointer-Variable, z.B. pLeg</li>
<li> s := String-Variable, z.B. sSector</li>
<li> f := Float-Variable, z.B. fBranch</li>
<li> i := Integer-Variable, z.B. iCounter</li>
<li> b := Boolean-Variable, z.B. bLink</li>
<li> d := Datums-Variable</li>
<li> h := Stunde-Variable</li>
<li> x := Bid / Ask-Modus</li>
</ul>
</li>
<br />
<li> Schreibweise der Variablen: CamelCase</li>
</ul>
</html>
<html>
<h1>!!! Wichtig !!! die Anpassungen in der rules-Datei zuruecknehmen!!!</h1>
<br />
Bei einigen Mobilgeräten, wie etwa dem "Samsung Galaxy S3", wird zwar das Gerät<br />
durch mtpfs erkannt, man bekommt jedoch keinen Zugang.<br />
<br />
jmtpfs ist ein auf FUSE und libmtp basierendes Dateisystem für den Zugang zu den <br />
MTP-Geräten. Es war explizit für den Dateiaustausch zwischen Linux- (und macOS-)<br />
Systemen und neuen Android-Geräten entwickelt, die das MTP unterstützen, aber<br />
nicht mehr USB Mass Storage.
<h2>Installation</h2>
<b>jmtpfs (<em>universe</em>)</b><br />
<br />
Paketliste zum Kopieren:
<code><pre>
sudo apt-get install jmtpfs mtp-tools
</pre></code>
<ul>
<li>Oder mit apturl installieren, Link: apt://jmtpfs
</li>
<li>vorsichtshalber das Paket mtp-tools gleich mit–<br />
installieren, könnte nützlich sein (s. u., Abschnitt "neueste Infos")
</li>
</ul>
<h2>Benutzung</h2>
<h3>Verbinden:</h3>
<ul>
<li>Das Gerät mit dem Rechner verbinden und den Bildschirm (des Gerätes)<br />
entsperren.</li>
<li>Wenn das Paket jmtpfs installiert ist und das Gerät automatisch erkannt<br />
wird, muss das MTP-Dateisystem ausgehängt werden. Dazu gibt es fol‐<br />
gende Möglichkeiten:
<ol>
<li>im Dateimanager: <br />
rechte Maustaste Mausklick → “Dateisystem aushängen“.
</li>
<li>mit dem <code><b>gio</b></code>‐Befehl: <em>{anscheinend nicht mehr gültig, s. weiter unten!}</em>
<code><pre>
gio mount -li | grep activation <em># Infos über das angehängte MTP-Filesystem anzeigen</em>
gio mount -u "$(gio mount -li | grep activation | awk -F"=" '{ print $2 }')" <em># das MTP-Filesystem aushängen</em>
</pre></code>
</li>
<li>den Prozess
<pre><code>/usr/libexec/gvfsd-mtp --spawner :1.7 /org/gtk/gvfs/exec_spaw/5</code></pre>
stoppen resp. killen:
<pre><code>killall gvfsd-mtp</code></pre>
(s. weiter unten, “neueste Infos“)
</ol>
</li>
<li>in den root‐User wechseln:
<code><pre>
sudo su ‐
</pre></code></li>
<li>Einen Einhängepunkt (“mount point“) im Home-Verzeichnis anlegen:
<code><pre>
mkdir ~/android # <em>bei mir: mkdir /media/SamsungGalaxy </em>
</pre></code></li>
<li>Das Android-Gerät anhängen:
<code><pre>
jmtpfs ~/android # <em>bei mir: jmtpfs /media/SamsungGalaxy </em>
<br />
→ Ausgabe:
mueller@Debian-Laptop:~$ jmtpfs /media/SamsungGalaxy/
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
mueller@Debian-Laptop:~$
</pre></code>
Es wird das erste verfügbare MTP-Gerät eingehängt.</li>
</ul>
<h3>Verbindung lösen:</h3>
Der Befehl
<code><pre>
fusermount -u ~/android # <em>bei mir: fusermount -u /media/SamsungGalaxy </em>
</pre></code>
hängt das Verzeichnis aus, in dem das MTP-Android-Gerät eingebunden ist. <br />
<br />
Man sollte darauf achten, dass vorher alle Dateioperationen erfolgreich beendet<br />
wurden, sonst droht Datenverlust. Im Gegensatz zum “mass storage“‐Modus<br />
braucht man jedoch kein inkonsistentes Dateiystem zu befürchten, da alle Zugriffe<br />
auf Datei- und nicht Sektor-Ebene durchgeführt werden.<br />
#####################################################################################<br />
<h3>neueste Infos:</h3>
<pre>
MTP :=: Media Transfer Protocol
Verzeichnis /dev:
Eintrag :: libmtp-1.2.2 -> bus/usb/001/013
Befehl "lsusb" - Ausgabe:
root@localhost:/dev# lsusb | grep OPPO
Bus 001 Device 013: ID 22d9:2764 OPPO Electronics Corp. OPPO Find X3 Lite 5G
Befehle aus den mtp-tools:
* mtp-detect
* ps -ef | grep -i gvfsd-mtp [alternativ: pgrep -an mtp]
-> Ausgabe:
Wenn dieser Prozess läuft (oder ähnlich):
mueller 7060 3289 0 16:07 ? 00:00:00 /usr/libexec/gvfsd-mtp --spawner :1.13 /org/gtk/gvfs/exec_spaw/8
dann scheint im PCFMDateimanager ein mtp-
Eintrag vorhanden zu sein.
Nach dem Entfernen im Dateimanager war
der Prozess verschwunden.
Daher:
Beim nächsten Mal diesen Prozess killen.
(passt mir nicht ...)
--------------------------------------------------------------------------
By default, MTP devices are only readable/writable
by root users. Therefore, we should first allow
other users to read and write to the MTP devices.
So, uncomment the user_allow_other option in the /etc/fuse.conf file:
$ sed -i '/user_allow_other/s/^#//g' /etc/fuse.conf
--------------------------------------------------------------------------
* Links: *
- https://www.baeldung.com/linux/mounting-mtp-devices
- https://wiki.debianforum.de/MTP
- https://github.com/libmtp/libmtp
###################################################################################################
</pre>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.ubuntuusers.de/MTP/"
target="_blank" rel="noreferrer noopener">
Ubuntu‐Users :: Wiki : MTP</a>
</li>
<li><a href="https://askubuntu.com/questions/87667/getting-mtp-enabled-devices-to-work-with-ubuntu"
target="_blank" rel="noreferrer noopener">
Ask Ubuntu :: Getting mtp enabled devices to work with Ubuntu</a>
</li>
<li><a href="https://wiki.ubuntuusers.de/gio/"
target="_blank" rel="noreferrer noopener">
Ubuntu‐Users :: gio </a>
</li>
</ul>
</html>
<html>
<ul>
<li>Veränderung der Zieldaten über die Zeit;</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Concept_drift" target=_blank>Wikipedia.en</a></li>
</ul>
</html>
<html>
<ul>
<li>Veränderung der Eigenschaften der Eingabedaten;</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="" target=_blank></a></li>
</ul>
</html>
<html>
PAC := Probably Approximately Correct
</html>
<html>
The most important requirements on the learning process when learning from informants are:
<ul>
<li><b>conservativeness (Conv)</b>,<br />where only inconsistent hypotheses are allowed to be changed; </li><br />
<li><b>strong decisiveness (SDec)</b>,<br />forbidding to ever return semantically to a withdrawn hypothesis; </li><br />
<li><b>strong monotonicity (SMon)</b>,<br />requiring that in every step the hypothesis incorporates the former one; </li><br />
<li><b>monotonicity (Mon)</b>,<br />fulfilled if in every step the set of correctly inferred words incorporates the formerly correctly guessed;</li><br />
<li><b>cautiousness (Caut)</b>,<br />for which never a strict subset of earlier conjectures is guessed.</li>
</ul>
Lange, Zeugmann, and Kapur (1996) observed that requiring monotonicity is restrictive and that under the assumption of strong monotonicity even fewer collections of languages can be learned from informants.
<h3>Links:</h3>
<ul>
<li>https://arxiv.org/abs/1801.10502v4</li>
<li>https://www.groundai.com/project/learning-from-informants-relations-between-learning-success-criteria/</li>
<!--li></li>
<li></li>
<li></li-->
</ul>
</html>
<html>
If you have a directory with large number of files and you<br />
want to rename or copy or process it, here is a simple<br />
way to do it;<br />
<br /><code>
# for temp in *<br />
> do<br />
> echo cp $temp $temp.org >> t.txt<br />
> done</code><br />
<br />
You can change the copy command to what ever that <br />
you need to do. This will create a file tmp.txt with all the <br />
files listed in the current working directory and insert a <br />
line into the file tmp.txt as;<br />
<br /><code>
cp filename filename.org<br />
</code><br />
This tip generously supported <br />
by: tyl@computer.org<br />
</html>
<html>
<ul>
<li>ist ein Computer-Algebra-Programm</li><br />
<li>ähnlich Mathematica, SageMath</li><br />
<li>dient u.a. zur Bestimmung von Stammfunktionen</li><br />
<li></li><br />
<li></li><br />
</ul>
</html>
<html>
<ul>
<li><h3>Fehlermeldung:</h3>
<pre><code>ERROR 1290 (HY000): The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement</code></pre>
</li>
<li><h3>Lösung:</h3>
<ul>
<li>One simple way to change the root password for<br />
modern versions of MySQL is using the ALTER<br />
USER command.
</li>
<li>However, this command won’t work right now be–<br />
cause the grant tables aren’t loaded.
</li>
<li>Let’s tell the database server to reload the grant<br />
tables by issuing the FLUSH PRIVILEGES com–<br />
mand:
<pre><code>MariaDB [mysql]> flush privileges;</code></pre>
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.digitalocean.com/community/tutorials/how-to-reset-your-mysql-or-mariadb-root-password"
target="_blank" rel="noreferrer noopener">
DigitalOcean :: Tutorial - How To Reset Your MySQL or MariaDB Root Password</a>
</li>
</ul>
</html>
<html>
<ul>
</ul>
<h3>Links:</h3>
<ul>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
</ul>
</html>
<html>
<ul>
<li>Fehlermeldung:
<pre><code>ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)</code></pre>
</li>
<li>Lösung:
<pre><code>mariadb -u root -p</code></pre>
</ul>
</ul>
</html>
<html>
<ul>
<li>MariaDB ist eine Abspaltung (Fork) von MySQL. <br />
<em>(das äußert sich darin, dass die MySQL-Befehle<br />
Links auf die MariaDB-Befehle sind)</em>
</li>
<li>Diese wurde entwickelt, nachdem Oracle Sun Microsystems im Jahre 2010 übernommen hatte.
</li>
<li>MariaDB ist größtenteils kompatibel mit MySQL und kann MySQL meist ohne Probleme ersetzen (API-kompatibel).
</li>
<li>Es werden die Prozessorarchitekturen x86 und AMD64 unterstützt.
</li>
<li>Unterschiede zwischen MySQL und MariaDB:
<ul>
<li>MariaDB verwendet die "Storage-Engine" XtraDB als Ersatz für InnoDB.
</li>
<li>Es gibt weitere "Storage-Engines":
<ul>
<li>OQGRAPH,
</li>
<li>SphinxSE,
</li>
<li>IBMDB2I,
</li>
<li>Cassandra
</li>
<li>und Aria (Ersatz für MyISAM).
</li>
</ul>
</li>
<li>Alphanumerische Felder in Heap-Tabellen können eine Größe von 256 Zeichen übersteigen.
</li>
<li>Unterstützung von Pool of Threads, um auch mit 200000+ Verbindungen noch hohe Geschwindigkeit zu garantieren
</li>
<li>"sub queries" sind nun benutzbar.
</li>
<li>Es gibt nun Group commits.
</li>
</ul>
</li>
<li><h3>Hinweis:</h3>
<pre><code>Man kann nicht gleichzeitig MariaDB und MySQL installiert haben,
es sei denn, man installiert die Datenbank manuell. Wer es auspro–
bieren möchte, sollte sich <a href="https://kb.askmonty.org/en/mariadb-coexist-with-mysql/"
target="_blank" rel="noreferrer noopener">MariaDB coexist with MySQL</a> ansehen.
Es ist allerdings anzumerken, dass es nicht zu empfehlen ist, diese
Konstellation produktiv einzusetzen, da sie ungetestet ist. </code></pre>
</li>
<li><h3>Konfiguration der MariaDB</h3>
<ul>
<li>Im Anschluss sollten Sie MariaDB zusätzlich absichern.
</li>
<li>Das Programm/Die DB stellt für diesen Zweck ein eigenes Sicherheitsskript<br />
zur Verfügung, welches Sie zur Einstellung individueller Sicherheitsmecha–<br />
nismen nutzen können. Sie führen es mit dem folgenden Befehl aus:
<pre><code>sudo mysql_secure_installation
bash</code></pre>
</li>
<li>Dieses Skript bietet Ihnen einige zusätzliche Optionen zur Absicherung<br />
beziehungsweise Stärkung der Installation. So kann man u.a. nach <br />
Wunsch ein Root-Passwort einrichten, anonyme User entfernen, die<br />
Testdatenbank löschen und Root-Logins aus der Ferne (per Remote)<br />
unterbinden.
</li>
<li>Um Aktionen durchzuführen, gebe man [Y] ein. Möchte man auf eine<br />
Maßnahme verzichten, so wähle man [N]. Beide Möglichkeiten bestä–<br />
tig man jeweils mit [Enter].
</li>
<li><details><summary>Ausgabe des Sicherheitsskripts <code>mysql_secure_installation</code></summary><br />
<pre><code>mueller@HPLaptop:~$ sudo mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password or using the unix_socket ensures that nobody
can log into the MariaDB root user without the proper authorisation.
You already have your root account protected, so you can safely answer 'n'.
Switch to unix_socket authentication [Y/n] n
... skipping.
You already have your root account protected, so you can safely answer 'n'.
Change the root password? [Y/n] n
... skipping.
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] Y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] Y
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] Y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] Y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
mueller@HPLaptop:~$ </code></pre>
<br />
</details>
</li>
</ul>
</li>
<li><h3>MariaDB aufrufen (MariaDB-Prompt sehen)</h3>
<pre><code>sudo mariadb</code></pre>
⇒ Ausgabe:
<pre><code>Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 45
Server version: 10.11.6-MariaDB-0+deb12u1 Debian 12
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]></code></pre>
</li>
<li><h3>Versions-Nummer von MariaDB prüfen:</h3>
<pre><code>SELECT version();</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.ubuntuusers.de/MariaDB/"
target="_blank" rel="norferrer noopener">
Ubuntu-Users :: MariaDB</a>
</li>
<li><a href="https://www.mariadbtutorial.com/"
target="_blank" rel="norferrer noopener">
MariaDB Tutorial</a>
</li>
<li><a href="https://www.ionos.de/digitalguide/hosting/hosting-technik/mariadb-installieren-debian-12/"
target="_blank" rel="norferrer noopener">
IONOS :: MariaDB unter Debian 12 installieren – diese Schritte sind nötig</a>
</li>
<!--
<li><a href=""
target="_blank" rel="norferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>Converter tool (→ HTML): <code>markdown</code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.lifewire.com/md-file-4143558"
target="_blank" rel="noreferrer noopener">
Lifewire :: What Is an MD File?</a>
</li>
<li><a href="https://www.markdownguide.org/"
target="_blank" rel="noreferrer noopener">
Markdown Guide - Homepage</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>is a Magical Typewriter. <br />
It is a Markdown-inspired format to write books</li>
<br />
<li>md := “Markdown“<br />
dom := “Document Object Model“</li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://allthings.how/how-to-use-mastodon/"
target="_blank" rel="noreferrer noopener">
AllThings.How :: How to use Mastodon</a>
</li>
</ul>
</html>
<html>
<ul>
<li><a href="https://www.mediaevent.de/tutorial/math-formatieren.html" target="_blank">https://www.mediaevent.de/tutorial/math-formatieren.html</a></li>
<br />
<li><a href="http://elsenaju.info/mathml/MathML-Beispiele.htm" target="_blank">http://elsenaju.info/mathml/MathML-Beispiele.htm</a></li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://www.focus.de/wissen/die-fabelhafte-welt-der-mathematik-bei-der-unendlichkeit-muessen-wir-uns-von-einem-mathe-mythos-verabschieden_id_197185100.html"
target="_blank" rel="noreferrer noopener">
Focus Online :: Bei der Unendlichkeit müssen wir uns von einem Mathe‐Mythos verabschieden</a>
</li>
<li><a href="https://www.spektrum.de/kolumne/die-meisten-reellen-zahlen-sind-nicht-berechenbar/2133762"
target="_blank" rel="noreferrer noopener">
Spektrum :: Die meisten reellen Zahlen kennen wir nicht</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li><h3>Kettenregel</h3>
<math mathsize="1.25em">
<mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo>
<mo>=</mo>
<mi>u</mi><mo>[</mo><mi>v</mi><mo>(</mo><mi>x</mi><mo>)</mo><mo>]</mo>
</math>
<br /><br />
<math mathsize="1.25em">
<mo>⇒</mo>
<mi>f</mi><mo>'</mo><mo>(</mo><mi>x</mi><mo>)</mo>
<mo>=</mo>
<mi>u</mi><mo>'</mo><mo>[</mo><mi>v</mi><mo>(</mo><mi>x</mi><mo>)</mo><mo>]</mo>
<mo>·</mo>
<mi>v</mi><mo>'</mo><mo>(</mo><mi>x</mi><mo>)</mo>
</math>
</li>
<br />
<li><h3>Quotientenregel</h3>
<math mathsize="1.25em">
<mstyle displaystyle="true">
<mo>(</mo>
<mfrac>
<mrow><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow>
<mrow><mi>g</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow>
</mfrac>
<mo>)</mo>
<mo>'</mo>
<mo>=</mo>
<mfrac><mrow>f'(x)g(x) − f(x) · g'(x)</mrow><msup><mrow><mi>g</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow><mn>2</mn></msup></mfrac>
</mstyle>
</math></li>
<br />
<li><h3>Produktregel</h3>
<math mathsize="1.25em">
<mstyle displaystyle="true">
<mo>(</mo>
<mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo>
<mo>·</mo>
<mi>g</mi><mo>(</mo><mi>x</mi><mo>)</mo>
<mo>)</mo>
<mo>'</mo>
</mstyle>
<mo>=</mo>
<mi>f</mi><mo>'</mo><mo>(</mo><mi>x</mi><mo>)</mo>
<mi>g</mi><mo>(</mo><mi>x</mi><mo>)</mo>
<mo>+</mo>
<mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo>
<mi>g</mi><mo>'</mo><mo>(</mo><mi>x</mi><mo>)</mo>
</math></li>
<br />
<li><h3>Summenregel</h3>
<math mathsize="1.25em">
<mo>(</mo>
<mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo>
<mo>=</mo>
<mi>g</mi><mo>(</mo><mi>x</mi><mo>)</mo>
<mo>+</mo>
<mi>h</mi><mo>(</mo><mi>x</mi><mo>)</mo>
<mo>)</mo>
<mo>'</mo>
</math><br />
<br />
<math mathsize="1.25em">
<mo>⇒</mo>
<mi>f</mi><mo>'</mo><mo>(</mo><mi>x</mi><mo>)</mo>
<mo>=</mo>
<mi>g</mi><mo>'</mo><mo>(</mo><mi>x</mi><mo>)</mo>
<mo>+</mo>
<mi>h</mi><mo>'</mo><mo>(</mo><mi>x</mi><mo>)</mo>
</math></li>
<br />
<li><h3>Differenzregel</h3>
f(x)=g(x)-h(x) f'(x)=g'(x)-h'(x)
<br />
<li><h3>Faktorregel</h3>
f(x)=c\cdot h(x) f'(x)=c \cdot h'(x)
<br />
<li><h3>Potenzregel</h3>
<math mathsize="1.25em"><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo>
<mo>=</mo>
<msup><mi>x</mi><mi>n</mi></msup>  
<mo>⇒</mo>
<mi>f</mi><mo>'</mo><mo>(</mo><mi>x</mi><mo>)</mo>
<mo>=</mo>
<mi>n</mi><mo>·</mo><msup><mi>x</mi><mrow><mi>n</mi><mo>−</mo><mn>1</mn></mrow></math>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="http://www.mathematik.net/diff1/formeln/differentialrechnung.PDF" target="_blank" rel="noreferrer noopener">Mathematik.net :: PDF “Formeln ‐ Differentialrechnung“</a></li>
<li><a href="/media/mueller/INT-256GB/TiddlyWiki/differentialrechnung.PDF" target="_blank" rel="noreferrer noopener">Regeln Differentialrechnung</a></li>
<li><a href="/media/mueller/INT-256GB/TiddlyWiki/differentialrechnung.PDF" target="_blank" rel="noreferrer noopener">Regeln Differentialrechnung</a></li>
<lI><a href="https://studyflix.de/mathematik/kettenregel-1846" target="_blank" rel="noreferrer noopener">
Studyflix :: Kettenregel</a></li>
</ul>
</html>
<html>
<ul>
<li>Die Ableitung einer <em>“zusammengesetzten“</em> Euler‐Funktion kannst<br />
du wie folgt durchführen: <b>innere Ableitung · äußere Ableitung</b></li>
<br />
<li><u>Beispiel:</u><br />
<code><pre>
<math><mo>(</mo><msup><mi>e</mi><mrow><mo>−</mo><mn>2</mn><mi>x</mi><mo>+</mo><mn>1</mn></mrow></msup><mo>)</mo><mo>'</mo></math>
</pre></code>
<ul>
<li><b>innere Ableitung:</b><br />
Die Abeitung der e‐Funktion ist die e‐Funktion selbst:
<code><pre>
<math><msup><mi>e</mi><mi>x</mi></msup><mo>'</mo><mo>=</mo><msup><mi>e</mi><mi>x</mi></msup></math>
</pre></code></li>
<li><b>äußere Ableitung:</b><br />
Hier wird der Teil im Exponenten der e‐Funktion abgeleitet:
<code><pre>
<math><mo>(</mo><mo>−</mo><mn>2</mn><mi>x</mi><mo>+</mo><mn>1</mn><mo>)</mo><mo>'</mo><mo>=</mo><mo>−</mo><mn>2</mn></math>
</pre></code></li>
</ul>
⇒ demnach lautet die Ableitung:
<code><pre>
<math><mo>(</mo><msup><mi>e</mi><mrow><mo>−</mo><mn>2</mn><mi>x</mi><mo>+</mo><mn>1</mn></mrow></msup><mo>)</mo><mo>'</mo>
<mo>=</mo>
<mo>−</mo><mn>2</mn><msup><mi>e</mi><mrow><mo>−</mo><mn>2</mn><mi>x</mi><mo>+</mo><mn>1</mn></mrow></msup>
</math>
</pre></code></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.ableitungsrechner.net" target="_blank" rel="noreferrer noopener">Ableitungsrechner Online</a></li>
</h3>
</html>
<html>
<ul>
<li>eine unendliche Folge natürlicher Zahlen, die (ursprünglich) mit <br />
zweimal der Zahl 1 beginnt oder (häufig, in moderner Schreibweise)<br />
zusätzlich mit einer führenden Zahl 0 versehen ist.</li>
<br />
<li>die Summe zweier aufeinanderfolgender Zahlen ergibt die unmittelbar<br />
danach folgende Zahl:
<code><pre>
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, …
</pre></code>
Die darin enthaltenen Zahlen heißen Fibonacci-Zahlen. Benannt ist<br />
die Folge nach Leonardo Fibonacci, der damit im Jahr 1202 das <br />
Wachstum einer Kaninchenpopulation beschrieb. Die Folge war<br />
aber schon in der Antike sowohl den Griechen als auch den Indern<br />
bekannt.</li>
<br />
<li>Die Fibonacci-Folge ist durch das rekursive Bildungsgesetz
<code><pre>
<math>
<mrow><msub><mi>f</mi><mn>n</mn></msub> = <msub><mi>f</mi><mn>n-1</mn></msub> + <msub><mi>f</mi><mn>n-2</mn></msub></mrow> für n ≥ 3
</math>
</pre></code>
mit den Anfangswerten
<code><pre>
<math>
<mrow><msub><mi>f</mi><mn>1</mn></msub> = <msub><mi>f</mi><mn>2</mn></msub></mrow> = 1
</math>
</pre></code>
definiert.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Fibonacci-Folge" target=_blank>Wikipedia.de :: Fibonacci‐Folge</a></li>
</ul>
</html>
<html>
<a href="https://de.wikipedia.org/wiki/Gau%C3%9Fsches_Eliminationsverfahren" target="_blank" rel="noreferrer noopener">Wikipedia</a>
<br />
<hr>
<a href="https://matrixcalc.org/de/slu.html" target="_blank" rel="noreferrer noopener">Matrix-Rechner</a>
</html>
<html>
<ul>
<li>Funktionen, die jeder reellen Zahl die nächstliegende nicht größere bzw. nicht<br />
kleinere ganze Zahl zuordnen. </li>
<li>Die Notation wurde nach Carl Friedrich Gauß benannt, der das Symbol <code><b>[x]</b></code> <br />
für die Abrundungsfunktion 1808 einführte.</li>
<li>Ende des 20. Jahrhunderts verbreiteten sich auch die von Kenneth E. Iverson <br />
eingeführten Bezeichnungen <code><b>floor(x)</b></code> und <code><b>⌊x⌋ </b></code>(engl. floor “Boden“) für die <br />
Gaußklammer sowie <code><b>ceil(x)</b></code> und <code><b>⌈x⌉</b></code> (englisch ceiling “Decke“) für die Auf‐<br />
rundungsfunktion.</li>
<li>Im Deutschen bezieht sich das Wort Gaußklammer ohne weitere Zusätze <br />
meist auf die ursprüngliche von Gauß verwendete Notation.</li>
<li>Für die von Iverson eingeführten Varianten werden dann zur Unterscheidung <br />
die Bezeichnungen <code><b>untere Gaußklammer</b></code> und <code><b>obere Gaußklammer</b></code> verwendet.</li>
<!--li></li>
<li></li>
<li></li>
<li></li-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Abrundungsfunktion_und_Aufrundungsfunktion" target=_blank>Wikipedia :: Abrundungs‐ / Aufrundungsfunktion</a></li>
<!--li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li-->
</ul>
</html>
<html>
<table>
<tr><th>Formel</th><th>Bedeutung</th></tr>
<tr><td>Potenz mit dem Exponent 0</td><td>Potenz mit dem Exponent 0</td></tr>
<tr><td>Potenz mit dem Exponent 1</td><td>Potenz mit dem Exponent 1</td></tr>
<tr><td>Multiplikation von Potenzen mit gleicher Basis</td><td>Multiplikation von Potenzen mit gleicher Basis: Potenzen mit gleicher Basis werden multipliziert, indem ihre Exponenten addiert werden.</td></tr>
<tr><td>Potenzierung von Potenzen</td><td>Potenzierung von Potenzen: Potenzen werden potenziert, indem alle Exponenten miteinander multipliziert werden.</td></tr>
<tr><td>Multiplikation von Potenzen mit gleichem Exponent</td><td>Multiplikation von Potenzen mit gleichem Exponent: Potenzen mit gleichem Exponent werden multipliziert, indem die Basen multipliziert werden.</td></tr>
<tr><td>Potenz mit negativem Exponenten</td><td>Potenz mit negativem Exponenten</td></tr>
<tr><td>Division von Potenzen mit gleicher Basis</td><td>Division von Potenzen mit gleicher Basis</td></tr>
<tr><td>Potenz deren Exponent das Inverse einer natürlichen Zahl ist</td><td>Potenz deren Exponent das Inverse einer natürlichen Zahl ist</td></tr>
<tr><td>Potenz deren Exponent ein Bruch ist</td><td>Potenz deren Exponent ein Bruch ist. (Achtung: wenn n gerade ist, muss a größer als 0 sein!)</td></tr>
</table>
<h3>Links:</h3>
<ul>
<li><a href="https://www.formelsammlung-mathe.de/potenzen.html#" target="_blank" rel="noreferrer noopener">Mathematik :: Formelsammlung ‐ Potenzen</a></li>
</ul>
</html>
<html>
<ul>
<li><b>Bedeutung/Definition</b>
<ol>
<li><b><em>allgemein:</em></b> nicht vergleichbar; nicht zusammen messbar</li>
<li><b><em>Mathematik:</em></b> Eigenschaft zweier Werte, die nicht ganzzahlige Vielfache einer dritten Zahl sind (also keinen gemeinsamen Teiler besitzen)</li>
<li><b><em>Physik:</em></b> nicht vergleichbar; über Stoffe mit Messwerten wegen fehlender, zum Vergleich geeigneter Eigenschaften</li>
<li><b><em>Philosophie:</em></b> nicht vergleichbar, unverträglich; über zweier Theorien (Paul Feyerabend) </li>
</ol>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>
<a href="https://biancahoegel.de/mathe/zahl/inkommensurabilitaet_math.html"
target="_blank" rel="noreferrer noopener">
Bianco Högel :: Inkommensurabilität </a>
</li>
<li>
<a href="https://www.wortbedeutung.info/inkommensurabel/"
target="_blank" rel="noreferrer noopener">
Wortbedeutung.info :: inkommensurabel</a>
</li>
<li>
<a href="https://de.wikipedia.org/wiki/Inkommensurabilit%C3%A4t_(Mathematik)"
target="_blank" rel="noreferrer noopener">
Wikipedia :: Mathematik ‐ Inkommensurabilität</a>
</li>
<li>
<a href="https://www.spektrum.de/lexikon/mathematik/inkommensurabel/4383"
target="_blank" rel="noreferrer noopener">
Spektrum der Wissenschaft :: Lexikon ‐ inkommensurabel</a>
</li>
<li>
<a href="https://de.wikipedia.org/wiki/Inkommensurabilit%C3%A4t_(Wissenschaftstheorie)"
target="_blank" rel="noreferrer noopener">
Wikipedia :: Wissenschaftstheorie ‐ Inkommensurabilität</a>
</li>
<li>
<a href=""
targert="_blank" rel="noreferrer noopener">
</a>
</li>
<li>
<a href=""
targert="_blank" rel="noreferrer noopener">
</a>
</li>
</ul>
</html>
<html>
<ul>
<li>Für <math mathsize="1.25em"><mi>z</mi><mo>=</mo><mi>x</mi><mo>+</mo><mi>i</mi><mo>·</mo><mi>y</mi><mo>∈</mo><mi>ℂ</mi></math> nennt man
<ul>
<li>x den <b>Realteil</b></li>
und
<li>y den <b>Imaginärteil</b></li>
</ul>
von z.</li>
<br />
<li>Zahlen <math mathsize="1.25em"><mi>z</mi><mo>=</mo><mi>x</mi><mo>+</mo><mi>i</mi><mo>·</mo><mn>0</mn></math> mit <math mathsize="1.25em"><mi>y</mi><mo>=</mo><mn>0</mn></math> nennt man <b>reell</b>, <br />
schreibt auch kurz <math mathsize="1.25em"><mi>z</mi><mo>=</mo><mi>x</mi></math> und identifiziert <math mathsize="1.25em"><mi>z</mi></math> mit <math mathsize="1.25em"><mi>x</mi><mo>∈</mo><mi>ℝ</mi></math>.</li>
<br />
<li>Zahlen <math mathsize="1.25em"><mi>z</mi><mo>=</mo><mn>0</mn><mo>+</mo><mi>i</mi><mo>·</mo><mi>y</mi></math> mit <math mathsize="1.25em"><mi>x</mi><mo>=</mo><mn>0</mn></math> nennt man <b>imaginär</b> <br />
und schreibt auch kurz <math mathsize="1.25em"><mi>z</mi><mo>=</mo><mi>i</mi><mo>·</mo><mi>y</mi></math>.
</li>
<br />
<li>Der <b>Nullpunkt</b> <math mathsize="1.25em"><mi>z</mi><mo>=</mo><mn>0</mn><mo>+</mo><mi>i</mi><mo>·</mo><mn>0</mn></math>
wird auch kurz als <math mathsize="1.25em"><mi>z</mi><mo>=</mo><mn>0</mn></math> geschrieben.
</li>
<br />
<li><b>Addition</b> :: <br />
<math mathsize="1.25em">
<msub><mi>z</mi><mn>1</mn></msub><mo>+</mo><msub><mi>z</mi><mn>2</mn></msub>
<mo>=</mo>
<mrow>
(<msub><mi>x</mi><mn>1</mn></msub><mo>+</mo><mi>i</mi><mo>·</mo><msub><mi>y</mi><mn>1</mn></msub>)
<mo>+</mo>
(<msub><mi>x</mi><mn>2</mn></msub><mo>+</mo><mi>i</mi><mo>·</mo><msub><mi>y</mi><mn>2</mn></msub> )
</mrow>
<mo>=</mo>
<mrow>
(<msub><mi>x</mi><mn>1</mn></msub><mo>+</mo><msub><mi>x</mi><mn>2</mn></msub>)<mo>+</mo>
<mi>i</mi><mo>·</mo>(<msub><mi>y</mi><mn>1</mn></msub><mo>+</mo><msub><mi>y</mi><mn>2</mn></msub>)
</mrow>
</math>
</li>
<br />
<li><b>Multiplikation</b> :: <br />
<math mathsize="1.25em">
<msub><mi>z</mi><mn>1</mn></msub><mo>·</mo><msub><mi>z</mi><mn>2</mn></msub>
<mo>=</mo>
<mrow>
(<msub><mi>x</mi><mn>1</mn></msub><mo>+</mo><mi>i</mi><mo>·</mo><msub><mi>y</mi><mn>1</mn></msub>)
<mo>·</mo>
(<msub><mi>x</mi><mn>2</mn></msub><mo>+</mo><mi>i</mi><mo>·</mo><msub><mi>y</mi><mn>2</mn></msub> )
</mrow>
<mo>=</mo>
<mrow>
(<msub><mi>x</mi><mn>1</mn></msub><mo>·</mo><msub><mi>x</mi><mn>2</mn></msub>
<mo>−</mo>
<msub><mi>y</mi><mn>1</mn></msub><mo>·</mo><msub><mi>y</mi><mn>2</mn></msub>)
<mo>+</mo>
<mi>i</mi><mo>·</mo>(<msub><mi>x</mi><mn>1</mn></msub><mo>·</mo><msub><mi>y</mi><mn>2</mn></msub>
<mo>+</mo><msub><mi>x</mi><mn>2</mn></msub><mo>·</mo><msub><mi>y</mi><mn>1</mn></msub>)
</mrow>
</math>
</li>
<br />
<li>
Es werden folgende speziellen Operationen auf den komplexen Zahlen ein-gef üuhrt:<(z) =<(x+iy) =x(derRealteilvonz),=(z) ==(x+iy) =y(derImaginärteilvonz),|z|=|x+ix2+y2(derBetragvonz),z=x+iy=x-iy(daskomplex Konjugiertevonz).
1.1. DEFINITIONEN3Merkregel 1.5:Die Division komplexer Zahlen läuft auf den Standardtrick Erweiternmit dem komplex konjugierten Nenner hinaus:z1z2=x1+iy1x2+iy2=(x1+iy1)(x2iy2)(x2+iy2)(x2y2)=z1z2z2z2.Satz 1.6:(Rechenregeln)Füur allez, z1, z2Cgilt:Kommutativitä t undAssoziativit ä vonMultiplikation und Divisionz1z2=z2z1,(z1z2)z3=z1(z2z3),1z1z2=1z21z1,(1z11z2)1z3=1z1(1z21z3),Linearitatvon<,=und Konjugation<(z1+z2) =<(z1)+<(z2),=(z1+z2) ==(z1)+=(z2),z1+z2=z1+z2,Multiplikativitatdes Betrags und der Konjugation|z1z2|=|z1||z2|,£z1z2£=|z1||z2|,z1z2=z1z2,(z1z2)=z1z2sowie die Beziehungen|z|2=|z|2=zz=<(z)2+=(z)2,z1z2=z1z2|z2|2und dieDreiecksungleichung:|z1+z2||z1|+|z2|.
Bemerkung 1.9:Führt man den eingezeichneten Winkelzwischen demVek-torzund der reellen Achse ein, so gilt mit den aus der Schule bekanntenWinkelfunktionensinundcos:z=x+icos() +i|z|sin().Die Darstellungz=x+iynennt man dieKartesische Darstellungderkomplexen Zahlzdurch Real- und Imagin ärteil. Die Darstellungz=|z|(cos() +i·sin())durch den Betrag|z|und denPolarwinkel[0,2)heißtPolardarstel-lungvonz(heißt auchdas Argument vonz). Wir werden später inAbschnitt 5.3 auf die Polardarstellung komplexer Zahlen zurückkommen, nach-dem wir die komplexe Exponentialfunktion eingefüuhrt haben.
<!--
<li></li>
<li></li>
<li></li>
<li></li>
-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://tu-dresden.de/ing/maschinenwesen/ifkm/ressourcen/dateien/gtl/lehre/dateien/gt_umdrucke.pdf?lang=de" target="_blank">TU Dresden :: Komplexe Zahlen ‐ Rechenregeln</a> (Downloaded: <em>TU-Dresden_KomplexeZahlen-Rechenregeln_gt_umdrucke.pdf</em>)</li>
<li><a href="http://math-www.uni-paderborn.de/~walter/teachingSS02/Kapitel1.pdf" target="_blank">Uni Paderborn :: Komplexe Zahlen ‐ Rechenregeln</a>
(Downloaded: <em>UniPaderborn_KomplexeZahlen-Rechenregeln_Kapitel1.pdf</em>)</li>
<li>Ralf Hartmann :: Aufgabensammlung, Abschnitt “Komplexe Zahlen“ (Downloaded: <em>TU-Chemnitz_RolfHaftmann_Aufgabensammlung.pdf</em></li>
<li><a href="https://www.tf.uni-kiel.de/matwis/amat/mw1_ge/kap_2/basics/b2_1_5.html" target="_blank">Uni Kiel :: Einführung in die Materialwissenschaft I
(<em>Prof. Dr. Helmut Föll</em>)</a></li>
<!--
<li></li>
<li></li>
<li></li>
<li></li>
-->
</ul>
</html>
<html>
<h3>Schritte bei einer Kurvendiskussion</h3>
<ol>
<li>Definitionsmenge</li>
<li>Schnittpunkte mit den Koordinatenachsen</li>
<li>Symmetrieverhalten</li>
<li>Verhalten im Unendlichen</li>
<li>Monotonie und Extremwerte</li>
<li>Krümmung und Wendepunkte</li>
<li>Wertebereich und Graph</li>
</ol>
<hr />
<h4>Definitionsmenge</h4>
Die Definitionsmenge besteht aus allen Zahlen, die für die Variable x eingesetzt werden dürfen.
<h4>Schnittpunkte mit den Koordinatenachsen</h4>
Die Schnittpunkte mit den Koordinatenachsen sind zum einen die Schnittpunkte mit der x-Achse und zum anderen der Schnittpunkt mit der y-Achse. Bei den x-Werten der Schnittpunkte mit der x-Achse handelt es sich um die Nullstellen. <br />
<ul>
<li>Berechnung Nullstellen :: die Funktion gleich Null setzen (f(x)=0) </li>
<li>Berechnung Schnittpunkt mit der y-Achse :: für die Variable x Null einsetzen (x=0).</li>
</ul>
<table>
<tr><th>Untersuchungsaspekt</th><th>Kriterium</th><th></th></tr>
<tr><td>Nullstelle</td><td><math mathsize="1.25em"><mi>f</mi><mo>(</mo><msub><mi>x</mi><mi>N</mi></msub><mo>)</mo><mo>=</mo><mn>0</mn></math></td></tr>
<tr><td>Extremstelle</td><td>
<math mathsize="1.25em"><mi>f</mi><mo>'</mo><mo>(</mo><msub><mi>x</mi><mi>E</mi></msub><mo>)</mo><mo>=</mo><mn>0</mn></math><br />
<math mathsize="1.25em"><mi>f</mi><mo>'</mo><mo>(</mo><msub><mi>x</mi><mi>E</mi></msub><mo>)</mo><mo>=</mo><mn>0</mn><mo>∧</mo><mi>f</mi><mo>'</mo><mo>'</mo><mo>(</mo><msub><mi>x</mi><mi>E</mi></msub><mo>)</mo><mo>≠</mo><mn>0</mn></math></td><td>(notwendiges Kriterium)<br />(hinreichendes Kriterium)</td></tr>
<tr><td>Minimalstelle</td><td>
<math mathsize="1.25em"><mi>f</mi><mo>'</mo><mo>(</mo><msub><mi>x</mi><mi>E</mi></msub><mo>)</mo><mo>=</mo><mn>0</mn></math><br />
<math mathsize="1.25em"><mi>f</mi><mo>'</mo><mo>(</mo><msub><mi>x</mi><mi>E</mi></msub><mo>)</mo><mo>=</mo><mn>0</mn><mo>∧</mo><mi>f</mi><mo>'</mo><mo>'</mo><mo>(</mo><msub><mi>x</mi><mi>E</mi></msub><mo>)</mo><mo>></mo><mn>0</mn></math></td><td>(notwendiges Kriterium) <br />(hinreichendes Kriterium)</td></tr>
<tr><td>Maximalstelle</td><td>
<math mathsize="1.25em"><mi>f</mi><mo>'</mo><mo>(</mo><msub><mi>x</mi><mi>E</mi></msub><mo>)</mo><mo>=</mo><mn>0</mn></math><br />
<math mathsize="1.25em"><mi>f</mi><mo>'</mo><mo>(</mo><msub><mi>x</mi><mi>E</mi></msub><mo>)</mo><mo>=</mo><mn>0</mn><mo>∧</mo><mi>f</mi><mo>'</mo><mo>'</mo><mo>(</mo><msub><mi>x</mi><mi>E</mi></msub><mo>)</mo><mo><</mo><mn>0</mn></math></td><td>(notwendiges Kriterium) <br />(hinreichendes Kriterium)</td></tr>
<tr><td>Wendestelle</td><td>
<math mathsize="1.25em"><mi>f</mi><mo>'</mo><mo>'</mo><mo>(</mo><msub><mi>x</mi><mi>W</mi></msub><mo>)</mo><mo>=</mo><mn>0</mn></math><br />
<math mathsize="1.25em"><mi>f</mi><mo>'</mo><mo>'</mo><mo>(</mo><msub><mi>x</mi><mi>W</mi></msub><mo>)</mo><mo>=</mo><mn>0</mn><mo>∧</mo><mi>f</mi><mo>'</mo><mo>'</mo><mo>'</mo><mo>(</mo><msub><mi>x</mi><mi>W</mi></msub><mo>)</mo><mo>≠</mo><mn>0</mn></math></td><td>(notwendiges Kriterium) <br /> (hinreichendes Kriterium)</td></tr>
<tr><td>Sattelstelle</td><td><math mathsize="1.25em"><mi>f</mi><mo>'</mo><mo>(</mo><msub><mi>x</mi><mi>W</mi></msub><mo>)</mo><mo>=</mo><mn>0</mn><mo>∧</mo><mi>f</mi><mo>'</mo><mo>'</mo><mo>(</mo><msub><mi>x</mi><mi>W</mi></msub><mo>)</mo><mo>=</mo><mn>0</mn></math><br />
<math mathsize="1.25em"><mi>f</mi><mo>'</mo><mo>(</mo><msub><mi>x</mi><mi>W</mi></msub><mo>)</mo><mo>=</mo><mn>0</mn><mo>∧</mo><mi>f</mi><mo>'</mo><mo>'</mo><mo>(</mo><msub><mi>x</mi><mi>W</mi></msub><mo>)</mo><mo>=</mo><mn>0</mn><mo>∧</mo><mi>f</mi><mo>'</mo><mo>'</mo><mo>'</mo><mo>(</mo><msub><mi>x</mi><mi>W</mi></msub><mo>)</mo><mo>≠</mo><mn>0</mn></math> </td><td>(notwendiges Kriterium) <br /> (hinreichendes Kriterium)</td></tr>
<tr><td>Verhalten im Unendlichen</td><td><math mathsize="1.25em"><munder><mi>lim</mi><mrow><mi>x</mi><mo>→</mo><mo>∞</mo></mrow></munder><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo></math></td>
<td><math mathsize="1.25em"><munder><mi>lim</mi><mrow><mi>x</mi><mo>→</mo><mo>−</mo><mo>∞</mo></mrow></munder><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo></math></td></tr>
<tr><td><b>Symmetrie</b><br />
Achsensymmetrie zur Koordinatenachse<br />
Punktsymmetrie zum Koordinatenursprung</td><td><math mathsize="1.25em"><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo><mo>=</mo><mi>f</mi><mo>(</mo><mo>−</mo><mi>x</mi><mo>)</mo></math><br /><math mathsize="1.25em"><mo>−</mo><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo><mo>=</mo><mi>f</mi><mo>(</mo><mo>−</mo><mi>x</mi><mo>)</mo></math></td></tr>
<tr><td><b>Monotonie</b><br />
steigend/streng steigend <br />
fallend/streng fallend </td><td><math mathsize="1.25em"><mi>f</mi><mo>'</mo><mo>(</mo><mi>x</mi><mo>)</mo><mo>≥</mo><mn>0</mn></math><br /><math mathsize="1.25em"><mi>f</mi><mo>'</mo><mo>(</mo><mi>x</mi><mo>)</mo><mo>≤</mo><mn>0</mn></math></td><td><math mathsize="1.25em"><mi>f</mi><mo>'</mo><mo>(</mo><mi>x</mi><mo>)</mo><mo>></mo><mn>0</mn></math><br /><math mathsize="1.25em"><mi>f</mi><mo>'</mo><mo>(</mo><mi>x</mi><mo>)</mo><mo><</mo><mn>0</mn></math></td></tr>
<tr><td><b>Krümmung</b><br />
Linkskrümmung/Konvexbogen<br />
(nach oben offen)<br />
<br />
Rechtskrümmung/Konkavbogen<br />
(nach unten offen) </td><td><math mathsize="1.25em"><mi>f</mi><mo>'</mo><mo>'</mo><mo>(</mo><mi>x</mi><mo>)</mo><mo>></mo><mn>0</mn></math><br /><br /><br /><math mathsize="1.25em"><mi>f</mi><mo>'</mo><mo>'</mo><mo>(</mo><mi>x</mi><mo>)</mo><mo><</mo><mn>0</mn></math></td></tr>
<tr><td>Periodizität</td><td><math mathsize="1.25em"><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo><mo>=</mo><mi>f</mi><mo>(</mo><mi>x</mi><mo>+</mo><mi>p</mi><mo>)</mo></math></td></tr>
</table>
Diskutiert wird <math mathsize="1.25em"><mi>f</mi><mo>:</mo><mi>x</mi><mo>↦</mo><mfrac><mrow><mi>p</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow><mrow><mi>q</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mfrac></math>
<table>
<tr><th>Untersuchungsaspekt</th><th>Kriterium</th></tr>
<tr><td>Definitionsbereich </td><td><math mathsize="1.25em"><mi>𝔻</mi><mo>=</mo><mi>ℝ</mi></math></td></tr>
<tr><td>Polstelle </td><td> (notwendiges Kriterium)<br />
(hinreichendes Kriterium) </td></tr>
</table>
<h4>Wertebereich und Graph</h4>
Im letzten Schritt bestimmen wir den Wertebereich. Das bedeutet, dass wir die Werte bestimmen, die der Funktionswert annehmen kann. Dann können wir mit allen berechneten Punkten, den Graph skizzieren. Für f(x)=x2 bedeutet es, dass die y-Werte alle positiven reellen Zahlen sowie die Zahl Null annehmen können. Mathematisch formuliert bedeutet das: Wf=R+
<h3>Links:</h3>
<ul>
<li><a href="https://www.studienkreis.de/mathematik/kurvendiskussion-erklaerung/" target="_blank" rel="noreferrer
noopener">Studienkreis :: Erklärung Kurvendiskussion</a></li>
<li><a href="https://de.wikipedia.org/wiki/Kurvendiskussion" target="_blank" rel="noreferrer noopener">Wikipedia</a></li>
</ul>
</html>
<html>
<ul>
<li>rekursiv definiert:<br />
<code>
<b>L(n) = 1, falls n < 2</b><br />
<b>L(n) = 1 + L(n-1) + L(n-2), falls n ≥ 2</b><br />
</code>
→ Die Folge beginnt wie folgt (der Index beginnt bei 0):<br />
<div style="text-indent: 30px"> </div>1, 1, 3, 5, 9, 15, 25, 41, 67, …
</li>
<li> ähnelt der Fibonacci-Folge
</li>
<li>Komplexität: O(2^n) # exponentiell
</li>
<li>Rekursive Implementierung (Python):
<code><pre>
def leonardo_numbers(start):
if start < 2:
result = 1
else:
result = 1 + leonardo_numbers(start - 1) + \
leonardo_numbers(start - 2)
return result
def main():
start = int(input("Startwert: "))
ln = leonardo_numbers(start)
print(f'{ln}')
if __name__ == "__main__": <em># in Python3 kann diese Zeile entfallen</em>
main()
</pre></code>
</li>
</html>
<html>
<ol>
<li><h4>P : Problembewusstsein schaffen</h4>
<ul>
<li>→ Analyse des Problemzustands</li>
<li>Einordnen, zu welchem Themenfeld eine Aufgabe gehört;</li>
<li>Worin besteht das eigentliche Problem der Aufgabenstellung?</li>
<li>Inwiefern ist die Aufgabe nicht trivial zu beantworten?</li>
<li></li>
</ul>
</li>
<li><h4>K : Klärung der Handlungsoptionen</h4>
<ul>
<li>Sichten der Handlungsoptionen, die zur Aufgabenlösung<br />
beitragen können;</li>
<li>Es ist abzuwägen, welche Art von Strategie, welche Theorie, <br />
welcher Satz, welche Definition, welcher Kalkül zum Einsatz<br />
kommen könnte;</li>
<li>In der Folge muß die Entscheidung für eine der Optionen<br />
getroffen werden;</li>
<li>Fehlgeschlagene Handlungsoptionen während des Lösungs‐<br />
prozesses müssen verworfen werden und neue aufgenom‐<br />
men werden;</li>
<li>Diese Klärung von Handlungsoptionen begleitet den gesam‐<br />
ten Aufgabenlösungsprozess;</li>
<li></li>
</ul>
</li>
<li><h4>Z : Einen Zugriff herstellen, die Aufgabe handhabbar machen</h4>
<ul>
<li></li>
</ul>
</li>
<li><h4>A : Anpassen oder Prüfen der Passung</h4>
<ul>
<li></li>
</ul>
</li>
<li><h4>H : Handwerk</h4>
<ul>
<li></li>
</ul>
</li>
<li><h4>T : Tricks</h4>
<ul>
<li></li>
</ul>
</li>
<li><h4>B : Begleitende, strukturierende Kommentare und Erläuterungen</h4>
<ul>
<li></li>
</ul>
</li>
</ol>
<h3>Quelle:</h3>
Christoph Ableitinger / Angela Herrmann :: Lernen aus Musterlösungen zur Analysis und Linearen Algebra, 2. Aufl.
</html>
<html>
<ul>
<li><a href="https://elsenaju.eu/" target="_blank">Jürgen Brandes :: Mathematics Tutorial ‐ Content overview of the math tutorial</a> </li>
</ul>
</html>
<html>
<ul>
<li><code><pre>Ist z eine beliebige ganze Zahl und ist n > 0 eine natürliche Zahl, dann ist
z mod n := z − n <math>· ⌊<mfrac><mi>x</mi><mi>n</mi></mfrac>⌋</math>
Beispielsweise ist
17 mod 5 = 2 <em>[ 17 = 3* 5 + <b>2</b> ]</em>
und
&hpyhen; 17 mod 5 = 3. <em>[ Berechnung: <math> -17 mod 5 = -17 - 5 · ⌊<mfrac><mi>-17</mi><mi>5</mi></mfrac>⌋</math>
<math> = -17 - 5 · (-3.4)</math>
<math> = -17 - 5 · (-4)</math> # !Abrunden
<math> = -17 - (-20)</math>
<math> = -17 + 20</math>
<math> = 3 </math>]</em>
In jedem Falle gilt
z mod n ∈ {0, 1, . . . , n − 1}.</pre></code></li>
<!--li></li>
<li></li>
<li></li>
<li></li-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="http://www.math.tu-dresden.de/~ganter/inf0708/folien/inf07-Modulo.pdf" target=_blank>TU Dresen :: Modulo-Berechnung <em>(downloaded)</em></a></li>
<!--li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li-->
</ul>
</html>
<html>
<img src="./pictures/koordinatensystem-quadranten.png" height=383 width=409 />
<h3>Links:</h3>
<ul>
<li><a href="https://www.matheretter.de/wiki/quadranten" target="_blank" rel="noreferrer noopener">Matheretter :: Quadranten</a></li>
</ul>
</html>
<html>
<pre><code><math mathsize=1.5em>
<mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo>
<mo>=</mo>
<mi>a</mi>
<msup>
<mrow>
<mo>(</mo>
<mi>x</mi>
<mo>−</mo>
<msub>
<mi>x</mi>
<mi>s</mi>
</msub>
<mo>)</mo>
</mrow>
<mn>2</mn>
</msup>
<mo>+</mo>
<msub>
<mi>y</mi>
<mi>s</mi>
</msub>
</math></code></pre>
bzw.
<pre><code><math mathsize=1.5em>
<mo>(</mo>
<mi>y</mi>
<mo>−</mo>
<msub>
<mi>y</mi>
<mi>s</mi>
</msub>
<mo>)</mo>
<mo>=</mo>
<mi>a</mi>
<msup>
<mrow>
<mo>(</mo>
<mi>x</mi>
<mo>−</mo>
<msub>
<mi>x</mi>
<mi>s</mi>
</msub>
<mo>)</mo>
</mrow>
<mn>2</mn>
</msup>
</math></code></pre>
wobei <math mathsize="1.5em"><mo>(</mo><msub><mi>x</mi><mi>s</mi></msub>,<msub><mi>y</mi><mi>s</mi></msub><mo>)</mo></math> der gegebene Scheitelpunkt ist.<br />
<br />
Daraus ergeben sich folgende Kombinationen:
<ul>
<li><math mathsize="1.25em"><msub><mi>x</mi><mi>s</mi></msub><mo>=</mo><mn>0</mn><mo>,</mo><msub><mi>y</mi><mi>s</mi></msub><mo>=</mo><mn>0</mn></math> :: Parabel direkt durch den <b>Koordinatenursprung</b>;</li>
<li><math mathsize="1.25em"><msub><mi>x</mi><mi>s</mi></msub><mo>=</mo><mn>0</mn><mo>,</mo><msub><mi>y</mi><mi>s</mi></msub><mo>≠</mo><mn>0</mn></math> :: Verschiebung der Parabel auf der <b>y‐Achse;</b></li>
<li><math mathsize="1.25em"><msub><mi>x</mi><mi>s</mi></msub><mo>≠</mo><mn>0</mn><mo>,</mo><msub><mi>y</mi><mi>s</mi></msub><mo>=</mo><mn>0</mn></math> :: Verschiebung der Parabel auf der <b>x‐Achse;</b></li>
<li><math mathsize="1.25em"><msub><mi>x</mi><mi>s</mi></msub><mo>≠</mo><mn>0</mn><mo>,</mo><msub><mi>y</mi><mi>s</mi></msub><mo>≠</mo><mn>0</mn></math> :: Verschiebung der Parabel auf der <b>x‐</b> und der <b>y‐Achse</b> (in einen der vier Quadranten hinein).</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.mathematik-oberstufe.de/analysis/qf/parabel-aus-p-sp.html" target="_blank">Mathematik in der Oberstufe :: Parabelgleichung aus Punkt und Scheitelpunkt bestimmen</a></li>
<li><a href="https://de.wikipedia.org/wiki/Scheitelpunkt#Scheitelpunktform" target="_blank">Wikipedia :: Scheitelpunktform</a></li>
</ul>
</html>
<html>
<code><pre>
Zahl: 6210001000
----------
0123456789 Stelle
--> dh. 6 mal die 0,
2 mal die 1,
1 mal die 2,
0 mal die 3,
0 mal die 4,
0 mal die 5,
1 mal die 6,
0 mal die 7,
0 mal die 8,
0 mal die 9
Die Zahl ist zur Basis 10 (Dezimalsystem).
Zahl: 21200
-----
01234
→ dh. 2 mal die 0,
1 mal die 1,
2 mal die 2,
0 mal die 3,
0 mal die 4
Die Zahl ist zur Basis 5 (Fünfer-System).
</pre></code>
</html>
<html>
<style>
large {
font-size: 150%;
}
</style>
<ul>
<li><b>dreimal so viele Hühner (<em>x</em>) als Kaninchen (<em>y</em>)</b> ::
<large><math><mn>x</mn><mo>=</mo><mi>3</mi><mn>y</mn></math></large>
</li>
<li><b>dreimal mehr Hühner (<em>x</em>) als Kaninchen (<em>y</em>)</b> ::
<large><math><mn>x</mn><mo>=</mo><mi>4</mi><mn>y</mn></math></large>
</li>
</ul>
</html>
<html>
<h3>Die Summe der natürlichen Zahlen von 1 bis n</h3>
<math>
<mstyle displaystyle="true">
<munderover>
<mo>∑</mo>
<mn>i=1</mn>
<mn>n</mn>
</munderover>
<mrow>k
<mo>=</mo>
<mn>1</mn><mo>+</mo>
<mn>2</mn><mo>+</mo>
<mn>3</mn><mo>+</mo>
…
<mo>+</mo>n<mo>=</mo>
<mfrac>
<mi>n ( n <mo>+</mo> 1) </mi>
<mi>2</mi>
</mfrac>
</mrow>
</mstyle>
</math>
<h3>Die Summe der Quadratzahlen bis <math><msup><mi>A</mi><mn>2</mn></msup></math></h3>
<math>
<mstyle displaystyle="true">
<munderover>
<mo>∑</mo>
<mn>i=1</mn>
<mn>n</mn>
</munderover>
<mrow>
<msup><mi>k</mi><mn>2</mn></msup>
<mo>=</mo>
<msup><mi>1</mi><mn>2</mn></msup>
<mo>+</mo>
<msup><mi>2</mi><mn>2</mn></msup>
<mo>+</mo>
<msup><mi>3</mi><mn>2</mn></msup>
<mo>+</mo>
<msup><mi>4</mi><mn>2</mn></msup>
<mo>+</mo>
…
<mo>+</mo>
<msup><mi>n</mi><mn>2</mn></msup>
<mo>=</mo>
<mfrac>
<mi>n ( n <mo>+</mo> 1) ( 2n <mo>+</mo> 1) </mi>
<mi>6</mi>
</mfrac>
</mrow>
</mstyle>
</math>
<h3>Links:</h3>
<a href="http://www.arndt-bruenner.de/mathe/Allgemein/summenformel1.htm" target=_blank>A. Brunner :: Summenformeln</a>
</html>
<html>
<table border="1">
<tr><th colspan="2"><center>x</center></th>
<th><center>0</center></th>
<th><center><math>2 – <msqrt>3</msqrt> </math></center></th>
<th><center><math><msqrt>1 – <mfrac><mi>2</mi><mn>5</mn></mfrac><msqrt>5</msqrt></msqrt> </math></center></th>
<th><center><math><msqrt>2</msqrt> – 1</math></center></th>
<th><center><math><mfrac><mi>1</mi><mn><msqrt>3</msqrt></mn></mfrac></math></center></th>
<th><center><math><msqrt>5 – 2 <msqrt>5</mqsrt></msqrt></math></center></th>
<th><center>1</center></th>
</tr>
<tr>
<td rowspan="2"><center><math>arctan(x)</math></center>
</td>
<td>rad
</td>
<td>0
</td>
<td><center><math><mfrac><mi>pi</mi><mn>12</mn></mfrac></math></center></td><td><center><math><mfrac><mi>pi</mi><mn>10</mn></mfrac></math></center></td><td><center><math><mfrac><mi>pi</mi><mn>8</mn></mfrac></math></center></td><td><center><math><mfrac><mi>pi</mi><mn>6</mn></mfrac></math></center></td><td><center><math><mfrac><mi>pi</mi><mn>5</mn></mfrac></math></center></td><td><center><math><mfrac><mi>pi</mi><mn>4</mn></mfrac></math></center></td></tr>
<tr>
<td><center>Grad</center></td><td><center>0°</center></td><td><center>15°</center></td><td><center>18°</center></td><td><center>22,5°</center></td><td><center>30°</center></td><td><center>36°</center></td><td><center>45°</center></td></tr>
</table>
<br />
Link:<br />
<a href="https://de.wikipedia.org/wiki/Arkustangens_und_Arkuskotangens" target="_blank">Wikipedia</a>
</html>
<html>
<table border="1">
<tr align="center"><td><center>α</center></td><th><center>0° bzw. 360°</center></th><th>15°</th><th>30°</th><th>45°</th><th>60°</th><th>75°</th><th>90°</th><th>105°</th></tr>
<tr align="center"><td><center>α - 360°</center></td><td><center>360° bzw. 0°</center></td><td><center>-345°</center></td><td><center>-330°</center></td><td><center>-315°</center></td><td><center>-300°</center></td><td><center>-285°</center></td><td><center>-270°</center></td><td><center>-255°</center></td></tr>
<tr align="center"><td><center>x</center></td><td><center>0 − 2π</center></td><td><center><math><mfrac>π<mn>12</mn></mfrac></math></center></td><td><center><math><mfrac>π<mn>6</mn></mfrac></math></center></td><td><center><math><mfrac>π<mn>4</mn></mfrac></math></center></td><td><center><math><mfrac>π<mn>3</mn></mfrac></math></center></td><td><center><math><mfrac><mn>5</mn><mn>12</mn></mfrac>π</math></center></td><td><center><math><mfrac>π<mn>2</mn></mfrac></math></center></td><td><center><math><mfrac><mn>7</mn><mn>12</mn></mfrac>π</math></center></td></tr>
<tr align="center"><td><center>x − 2π</center></td><td> <center>− 2π − 0</center></td><td><center><math>−<mfrac><mn>23</mn><mn>12</mn></mfrac></math>π</center></td><td><center><math>−<mfrac><mn>11</mn><mn>6</mn></mfrac></math>π</center></td><td><center><math>−<mfrac><mn>7</mn><mn>4</mn></mfrac></math>π</center></td><td><center><math>−<mfrac><mn>5</mn><mn>3</mn></mfrac></math>π</center></td><td><center><math>−<mfrac><mn>19</mn><mn>12</mn></mfrac></math>π</center></td><td><center><math>−<mfrac><mn>3</mn><mn>2</mn></mfrac></math>π</center></td><td><center><math>−<mfrac><mn>17</mn><mn>12</mn></mfrac></math>π</center></td></tr>
<tr></tr>
<tr></tr>
<tr><td><center>sin(x)</td></center>
</td><td> <center> 0<center></td>
<td><center><math>
<mfrac>
<mrow>
<msqrt><mn>6</mn></msqrt><mo>-</mo><msqrt><mn>2</mn></msqrt>
</mrow>
<mrow>
<mn>4</mn>
</mrow>
</mfrac>
</math></center></td>
<td><center><math><mfrac><mrow><mn>1</mn></mrow><mrow><mn>2</mn></mrow></mfrac></math></center></td>
<td><center><math><mfrac><mrow><msqrt><mn>2</mn></msqrt></mrow><mrow><mn>2</mn></mrow></mfrac></math></center></td>
<td><center><math><mfrac><mrow><msqrt><mn>3</mn></msqrt></mrow><mrow><mn>2</mn></mrow></mfrac></math></center></td>
<td><center><math><mfrac><mrow><msqrt><mn>6</mn></msqrt><mo>+</mo><msqrt><mn>2</mn></msqrt></mrow><mrow><mn>4</mn></mrow></mfrac></math></center></td>
<td><center><math><mn>1</mn></math></center></td>
<td><center><math><mfrac><mrow><msqrt><mn>6</mn></msqrt><mo>+</mo><msqrt><mn>2</mn></msqrt></mrow><mrow><mn>4</mn></mrow></mfrac></math></center></td></tr>
<tr></tr>
<tr></tr>
<tr><td><center>cos(x)</td></center>
</td><td> <center> 1<center></td>
<td><center><math>
<mfrac>
<mrow>
<msqrt><mn>6</mn></msqrt><mo>+</mo><msqrt><mn>2</mn></msqrt>
</mrow>
<mrow>
<mn>4</mn>
</mrow>
</mfrac>
</math></center></td>
<td><center><math><mfrac><mrow><msqrt><mn>3</mn></msqrt></mrow><mrow><mn>2</mn></mrow></mfrac></math></center></td>
<td><center><math><mfrac><mrow><msqrt><mn>2</mn></msqrt></mrow><mrow><mn>2</mn></mrow></mfrac></math></center></td>
<td><center><math><mfrac><mrow><mn>1</mn></mrow><mrow><mn>2</mn></mrow></mfrac></math></center></td>
<td><center><math><mfrac><mrow><msqrt><mn>6</mn></msqrt><mo>-</mo><msqrt><mn>2</mn></msqrt></mrow><mrow><mn>4</mn></mrow></mfrac></math></center></td>
<td><center><math><mn>0</mn></math></center></td>
<td><center><math><mfrac><mrow>-<msqrt><mn>6</mn></msqrt><mo>+</mo><msqrt><mn>2</mn></msqrt></mrow><mrow><mn>4</mn></mrow></mfrac></math></center></td></tr>
</table>
<table border="1">
<tr><td><center>α</center></td><th>120°</th><th>135°</th><th>150°</th><th>165°</th><th>180°</th><th>195°</th><th>210°</th><th>225°</th></tr>
<tr><td><center>α - 360°</center></td><td>-240°</td><td>-225°</td><td>-210°</td><td>-195°</td><td>-180°</td><td>-165°</td><td>-150°</td><td>-135°</td></tr>
<tr><td>
<center>x</center></td><td>
<center><math><mfrac><mn>2π</mn><mn>3</mn></mfrac></math></center></td><td>
<center><math><mfrac><mn>3π</mn><mn>4</mn></mfrac></math></center></td><td>
<center><math><mfrac><mn>5π</mn><mn>6</mn></mfrac></math></center></td><td>
<center><math><mfrac><mn>11π</mn><mn>12</mhn></mfrac></math></center></td><td>
<center><math>π</math></center></td><td>
<center><math><mfrac><mn>13π</mn><mn>12</mn></mfrac></math></center></td><td>
<center><math><mfrac><mn>7π</mn><mn>6</mn></mfrac></math></center></td><td>
<center><math><mfrac><mn>5π</mn><mn>4</mn></mfrac></math></center></td></tr>
<tr><td>
<center>x - 2π</center></td><td>
<center><math><mfrac><mn>−4π</mn><mn>3</mn></mfrac></math></center></td><td>
<center><math><mfrac><mn>−5π</mn><mn>4</mn></mfrac></math></center></td><td>
<center><math><mfrac><mn>−7π</mn><mn>6</mn></mfrac></math></center></td><td>
<center><math><mfrac><mn>−13π</mn><mn>12</mhn></mfrac></math></center></td><td>
<center><math>-π</math></center></td><td>
<center><math><mfrac><mn>−11π</mn><mn>12</mn></mfrac></math></center></td><td>
<center><math><mfrac><mn>−5π</mn><mn>6</mn></mfrac></math></center></td><td>
<center><math><mfrac><mn>−3π</mn><mn>4</mn></mfrac></math></center></td></tr>
<tr></tr>
<tr></tr>
<tr><td><center>sin(x)</td></center>
</td><td><center><math><mfrac><mrow><msqrt><mn>3</mn></msqrt></mrow><mrow><mn>2</mn></mrow></mfrac>
</math></center>
</td><td><center><math><mfrac><mrow><msqrt><mn>2</mn></msqrt></mrow><mrow><mn>2</mn></mrow></mfrac></math></center></td>
<td><center><math><mfrac><mrow><mn>1</mn></mrow><mrow><mn>2</mn></mrow></mfrac></math></center></td>
<td><center><math><mfrac><mrow><msqrt><mn>6</mn></msqrt>−<msqrt>2</msqrt></mrow><mrow><mn>4</mn></mrow></mfrac></math></center></td>
<td><center><math>0</math></center></td>
<td><center><math><mfrac><mrow><msqrt><mn>6</mn></msqrt>+<msqrt>2</msqrt></mrow><mrow><mn>4</mn></mrow></mfrac></math></center></td>
<td><center><math>−<mfrac><mrow><mn>1</mn></mrow><mrow>2</mrow></mfrac></math></center></td>
<td><center><math>−<mfrac><mrow><msqrt><mn>2</mn></msqrt></mrow><mrow><mn>2</mn></mrow></mfrac></math></center></td></tr>
<tr><td><center>cos(x)</td></center>
</td><td><center><math>−<mfrac><mrow><mn>1</mn></mrow><mrow><mn>2</mn></mrow></mfrac></math></center>
</td><td><center><math>−<mfrac><mrow><msqrt><mn>2</mn></msqrt></mrow><mrow><mn>2</mn></mrow></mfrac></math></center></td>
<td><center><math>−<mfrac><mrow><msqrt><mn>3</mn></msqrt></mrow><mrow><mn>2</mn></mrow></mfrac>
</math></center></td>
<td><center><math>−<mfrac><mrow><msqrt><mn>6</mn></msqrt>−<msqrt>2</msqrt></mrow><mrow><mn>4</mn></mrow></mfrac></math></center></td>
<td><center><math>− 1</math></center></td>
<td><center><math>−<mfrac><mrow><msqrt><mn>6</mn></msqrt>−<msqrt>2</msqrt></mrow><mrow><mn>4</mn></mrow></mfrac></math></center></td>
<td><center><math>−<mfrac><mrow><msqrt><mn>3</mn></msqrt></mrow><mrow><mn>2</mn></mrow></mfrac>
</math></center></td>
<td><center><math>−<mfrac><mrow><msqrt><mn>2</mn></msqrt></mrow><mrow><mn>2</mn></mrow></mfrac></math></center></td></tr>
</table>
<table border="1">
<tr align="center"><td>α</td><th>240°</th><th>255°</th><th>270°</th><th>285°</th><th>300°</th><th>315°</th><th>330°</th><th>345°</th></tr>
<tr align="center"><td>α - 360°</td><td>-120°</td><td>-105°</td><td>-90°</td><td>-75°</td><td>-60°</td><td>-45°</td><td>-30°</td><td>-15°</td></tr>
<tr align="center"><td>x</td>
<td>
<math mathsize="1.25em"><mfrac><mrow><mn>4</mn><mi>π</mi></mrow><mn>3</mn></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mfrac><mrow><mn>17</mn><mi>π</mi></mrow><mn>12</mn></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mfrac><mrow><mn>3</mn><mi>π</mi></mrow><mn>2</mn></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mfrac><mrow><mn>19</mn><mi>π</mi></mrow><mn>12</mn></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mfrac><mrow><mn>5</mn><mi>π</mi></mrow><mn>3</mn></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mfrac><mrow><mn>7</mn><mi>π</mi></mrow><mn>4</mn></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mfrac><mrow><mn>11</mn><mi>π</mi></mrow><mn>6</mn></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mfrac><mrow><mn>23</mn><mi>π</mi></mrow><mn>12</mn></mfrac></math>
</td></tr>
<tr align="center"><td>x - 2π</td>
<td>
<math mathsize="1.25em"><mo>−</mo><mfrac><mrow><mn>2</mn><mi>π</mi></mrow><mn>3</mn></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mo>−</mo><mfrac><mrow><mn>7</mn><mi>π</mi></mrow><mn>12</mn></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mo>−</mo><mfrac><mrow><mi>π</mi></mrow><mn>2</mn></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mo>−</mo><mfrac><mrow><mn>5</mn><mi>π</mi></mrow><mn>12</mn></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mo>−</mo><mfrac><mrow><mi>π</mi></mrow><mn>3</mn></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mo>−</mo><mfrac><mrow><mi>π</mi></mrow><mn>4</mn></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mo>−</mo><mfrac><mrow><mi>π</mi></mrow><mn>6</mn></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mo>−</mo><mfrac><mrow><mi>π</mi></mrow><mn>12</mn></mfrac></math>
</td></tr>
<tr></tr>
<tr></tr>
<tr align="center"><td>sin(x)</td>
<td>
<math mathsize="1.25em"><mo>−</mo><mfrac><mrow><msqrt>3</msqrt></mrow><mn>2</mn></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mfrac><mrow><mo>−</mo><msqrt><mn>6</mn></msqrt><mo>−</mo><msqrt><mn>2</mn></msqrt></mrow><mrow><mn>4</mn></mrow></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mo>−</mo><mn>1</mn></math>
</td>
<td>
<math mathsize="1.25em"><mfrac><mrow><mo>−</mo><msqrt><mn>6</mn></msqrt><mo>−</mo><msqrt><mn>2</mn></msqrt></mrow><mrow><mn>4</mn></mrow></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mo>−</mo><mfrac><mrow><msqrt>3</msqrt></mrow><mn>2</mn></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mo>−</mo><mfrac><mrow><msqrt>2</msqrt></mrow><mn>2</mn></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mo>−</mo><mfrac><mn>1</mn><mn>2</mn></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mfrac><mrow><mo>−</mo><msqrt><mn>6</mn></msqrt><mo>+</mo><msqrt><mn>2</mn></msqrt></mrow><mrow><mn>4</mn></mrow></mfrac></math>
</td>
</tr>
<tr align="center"><td>cos(x)</td>
<td>
<math mathsize="1.25em"><mo>−</mo><mfrac><mn>1</mn><mn>2</mn></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mfrac><mrow><mo>−</mo><msqrt><mn>6</mn></msqrt><mo>+</mo><msqrt><mn>2</mn></msqrt></mrow><mrow><mn>4</mn></mrow></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mn>0</mn></math>
</td>
<td>
<math mathsize="1.25em"><mfrac><mrow><mo>−</mo><msqrt><mn>6</mn></msqrt><mo>−</mo><msqrt><mn>2</mn></msqrt></mrow><mrow><mn>4</mn></mrow></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mfrac><mn>1</mn><mn>2</mn></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mfrac><mrow><msqrt>2</msqrt></mrow><mn>2</mn></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mfrac><mrow><msqrt><mn>3</mn></msqrt></mrow><mn>2</mn></mfrac></math>
</td>
<td>
<math mathsize="1.25em"><mfrac><mrow><msqrt><mn>6</mn></msqrt><mo>+</mo><msqrt><mn>2</mn></msqrt></mrow><mrow><mn>4</mn></mrow></mfrac></math>
</td></tr>
</table>
<br />
zu beachten ist: <math mathsize="1.25em"><mfrac><mrow><msqrt>2</msqrt></mrow><mn>2</mn></mfrac><mo>=</mo><mfrac><mn>1</mn><mrow><msqrt><mn>2</mn></msqrt></mrow></mfrac></math> [mittels <em>radical rule</em>: <math mathsize="1.25em"><mfrac><mrow><msqrt>2</msqrt></mrow><mn>2</mn></mfrac>
<mo>=</mo>
<mfrac><mrow><msqrt>2</msqrt></mrow><mrow><msqrt><mn>2</mn></msqrt><mo>·</mo><msqrt><mn>2</mn></msqrt></mrow></mfrac>
<mo>=</mo>
<mfrac><mn>1</mn><mrow><msqrt><mn>2</mn></msqrt></mrow></mfrac></math>]<br />
<br />
<h3>Links<h3>
<ul>
<li><a href="http://www2.hs-esslingen.de/~kamelzer/2011WS/Werte_sin_cos.pdf"
target="_blank" rel="noreferrer noopener">
http://www2.hs-esslingen.de/~kamelzer/2011WS/Werte_sin_cos.pdf</a>
</li>
</ul>
</html>
<html>
<h3>Übungsklausuren zu gewöhnlichen Differentialgleichungen</h3>
<h4>Mit Musterlösungen:</h4>
<ul>
<li> http://www.hcm.uni-bonn.de/fileadmin/schlein/analysis/klausur_loesung.pdf</li>
<li> http://www.math.uni-bielefeld.de/~mfriesen/files/ana2/gdgl%20Losungen.pdf</li>
<li> https://www.uni-ulm.de/fileadmin/website_uni_ulm/mawi.inst.100/vorlesungen/ss11/dgl/Probeklausur.pdf<br />
https://www.uni-ulm.de/fileadmin/website_uni_ulm/mawi.inst.100/vorlesungen/ss11/dgl/Probeklausur_lsg.pdf</li>
<li> http://www.uni-stuttgart.de/bio/adamek/numerik/loedgl.pdf</li>
<li> http://www.math.uni-hamburg.de/home/lauterbach/scripts/dsode/lklausur.pdf</li>
</ul>
<h4>Ohne Musterlösungen:</h4>
<ul>
<li> https://www.uni-due.de/~mat201/dokumente/ana3ws11/PKana3.pdf</li>
<li> http://www.mathematik.uni-muenchen.de/~reisert/13ana3_files/alteklausur.pdf</li>
<li> http://www-lm.ma.tum.de/gdgl13/aufgaben/blatt07.pdf</li>
<li> http://www.mi.uni-koeln.de/Vorlesung_Sweers/GDGL1213/KlausurDGL1213.pdf</li>
<li> http://www.mathematik.uni-dortmund.de/lsix/stiemer/dgl0708/Uebungen/probeklausur.pdf</li>
<li> http://www.mathematik.tu-darmstadt.de/lehrmaterial/WS2009-2010/Ana3/KlausurM-BSc-WS0809DGL.pdf</li>
<li> https://www.uni-due.de/~bm0036/dokumente/ode_kl_ws04/ode04_Klausur_2.pdf</li>
<li> http://www-lm.ma.tum.de/archiv/sos10/gdgl10/aufgaben/blatt08.pdf</li>
</ul>
<h3>Übungsklausuren zur Maßtheorie</h3>
<h4>Mit Musterlösungen</h4>
<ul>
<li> http://wwwmath.uni-muenster.de/u/joachim.lohkamp/AG/AnalysisIIIUeb/Loesung1.pdf</li>
<li> http://www.uni-ulm.de/fileadmin/website_uni_ulm/mawi.inst.020/gerlach/ws1112/masstheorie/klausurloesung2.pdf</li>
<li> http://reh.math.uni-duesseldorf.de/~weiss/Analysis3/probe.pdf <br />
http://reh.math.uni-duesseldorf.de/~weiss/Analysis3/muster_probe.pdf</li>
<li> http://reh.math.uni-duesseldorf.de/~weiss/Analysis3/klausur.pdf <br />
http://reh.math.uni-duesseldorf.de/~weiss/Analysis3/musterloesung.pdf</li>
<li> http://reh.math.uni-duesseldorf.de/~weiss/Analysis3/nachklausur.pdf <br />
http://reh.math.uni-duesseldorf.de/~weiss/Analysis3/musterloesungnachklausur.pdf</li>
<li> http://www2.mathematik.hu-berlin.de/~geomanal/teaching/bruening/analysis3_WS0809/Loesung_uebklausur.pdf</li>
</ul>
<h4>Ohne Musterlösungen</h4>
<ul>
<li> http://www.math.uni-leipzig.de/fachschaft/klausurensammlung/</li>
</ul>
</html>
<html>
<ul>
<li>
<table>
<tr><th>Funktion</th><th>Umkehrfunktion</th></tr>
<tr><td><math mathsize="1.25em"><mo>tan</mo><mi>x</mi></math></td><td><math mathsize="1.25em"><mo>arctan</mo><mi>x</mi></math></td></tr>
<!--
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
-->
</table></li>
</ul>
</html>
<html>
<ol start="0">
<li>Rechenoperationen in Klammern werden vor allen anderen Operationen<br />
ausgeführt;</li>
<br />
<li>Rechenoperationen der <b>dritten</b> Stufe werden ausgeführt<br />
(Potenzen, Wurzeln & Logarithmen);</li>
<br />
<li>Rechenoperationen der <b>zweiten</b> Stufe werden ausgeführt<br />
(Multiplikation / Division, Punktrechnung vor Strichrechnung);</li>
<br />
<li>Rechenoperationen der <b>ersten</b> Stufe werden ausgeführt<br />
(Addition / Subtraktion);</li>
<br />
<li>Ausführen gleichartiger Rechenoperationen von links nach rechts.</li>
</ol>
</html>
<html>
<h1><em>NOCHMAL ÜBERPRÜFEN!!!!!!</em></h1>
<ul>
<li><h3>konkav</h3>
Liegt die <u>Verbindungslinie</u> zwischen zwei Punkten eines Graphen<br />
<u>unterhalb</u> des Graphen, so ist die Funktion <em><b>konkav</b></em>.<br />
</li>
<li><h3>konvex</h3>
Liegt die <u>Verbindungslinie</u> zwischen zwei Punkten eines Graphen<br />
<u>oberhalb</u> des Graphen, so ist die Funktion <em><b>konvex</b></em>.<br />
</li>
</ul>
<br />
<b>Merksatz:</b> <br />
“Ist die Schlüssel <em>konkav</em>, bleibt die Suppe brav,<br />
ist die Schlüssel <em>konvex</em>, macht die Suppe einen Kleks.“<br />
</html>
<html>
<ul>
<li><h3>Lösungsformel für die Normalform (p‐q‐Formel)</h3>
Bei Vorliegen der Normalform
<math mathsize="1.5em">
<mrow>
<msup>
<mi>x</mi>
<mn>2</mn>
</msup>
<mo>+</mo>
<mi>p</mi><mi>x</mi>
<mo>+</mo>
<mi>q</mi>
<mo>=</mo> <mn>0</mn>
</mrow>
</math> lauten die Lösungen nach der p‐q‐Formel:<br />
<br />
<math mathsize="1.5em">
<mrow>
<msub>
<mi>x</mi>
<mn>1,2</mn>
</msub>
<mo>=</mo>
<mo>−</mo>
<mfrac>
<mi>p</mi>
<mn>2</mn>
</mfrac>
<mo>±</mo>
<msqrt>
<msup>
<mrow>
<mo>(</mo>
<mfrac>
<mi>p</mi>
<mn>2</mn>
</mfrac>
<mo>)</mo>
</mrow>
<mn>2</mn>
</msup>
<mo>−</mo><mi>q</mi>
</msqrt>
</math></li>
<!--
<li></li>
<li></li>
<li></li>
-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://mathematik-wissen.de/klasse-8/quadratische-funktion-scheitelpunktform-pq-formel-quadratische-ergaenzung-quadratische-gleichungen/quadratische-gleichungen-loesen-mit-pq-formel-oder-quadratischer-ergaenzung" target="_blank">Mathematik‐Wissen :: PQ‐Formel</a></li>
<li><a href="https://de.wikipedia.org/wiki/Quadratische_Gleichung#L%C3%B6sungsformel_f%C3%BCr_die_Normalform_(p-q-Formel)" target="_blank">Wikipedia :: Quadratische Gleichung</a></li>
<li><a href="http://elsenaju.info/Quadratische-Gleichung.htm" target="_blank">Elsenaju :: Quadratische Gleichung</a></li>
<!--
<li></li>
<li></li>
<li></li>
-->
</ul>
</html>
<html>
<ul>
<li>Rationale Zahlen sind Zahlen, die sich durch einen Bruch darstellen lassen;
</li>
<li><h3>Eigenschaften von rationalen Zahlen:</h3>
<ul>
<li>… die Nachkommastellen sind unendlich, aber periodisch.
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
</ul>
</html>
<html>
<br />
Link: <br />
<a href="www.torsten-horn.de/techdocs/maven.htm" target="_blank">www.torsten-horn.de/techdocs/maven.htm</a><br />
<br />
</html>
<html>
Maximum number of files that one process<br />
can have open at one time can be find out <br />
by using:
<code><pre>
getconf OPEN_MAX
</pre></code>
</html>
<html>
<ol>
<li>LPIC 1 - 102-Prüfung ablegen → Prüfung am 28.02.2024 !!
</li>
<li>Portfoliomanager-Ausbildung
</li>
<li>auf CEH-Prüfung vorbereiten
</li>
<li>auf RHCSA-Prüfung vorbereiten
</li>
<!--
<li>
</li>
<li>
</li>
-->
</ol>
</html>
<html>
<img src="./pictures/ZahlBilder.jpg" height=647 width=560 /> <!-- height=862 width=746 -->
</html>
<html>
<h3>Getting a file's size, link count or other metavalue in a shell script</h3>
When you want to extract a specific piece of meta information about a<br />
specific file (such as it's size, link count, or one of its time stamps)<br />
you can use the find <b>-printf</b> option and any of the various %-directives <br />
listed in the find(1) man page. <br />
<br />
Example:
<code><pre>
size=$(find some_file -printf "%s" )
</pre></code>
(under ksh, bash, and similar shells). <br />
<br />
Here the $() form is used as a more readable equivalent to the older ``<br />
(back tick) operator. (Another advantage to the $() is that it is nestable). <br />
<br />
To get the user name of the owner of a file "foo" you could use:
<code><pre>
set owner = `find foo -maxdepth 0 -printf "%u"`
</pre></code>
(here we're using the csh syntax). This also uses<br />
the -maxdepth option in case "foo" is actually a<br />
directory name; since we don't want find to<br />
spend time traversing directory and printing the<br />
owners to ALL of the entries thereunder. A<br />
maxdepth of zero ensures that this will only print<br />
the detail we want on the specific link that we<br />
named on the command line.<br />
<br />
This can be much more flexible than the options provided<br />
by the test command (try to see which of two files is<br />
larger, or if to files are owned by the same user or<br />
assigned to the same group, using just test).<br />
<br />
This tip generously supported <br />
by: jdennis@linuxcare.com
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://docs.microsoft.com/en-us/azure/information-protection/what-is-information-protection" target="_blank" rel="noreferrer noopener">Microsoft Docs :: What is Azure Information Protection?</a></li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://techcommunity.microsoft.com/t5/security-compliance-and-identity/introducing-azure-advanced-threat-protection/ba-p/250332" target="_blank" rel="noreferrer noopener">Microsoft TechCommunity :: Introducing Azure Advanced Threat Protection</a></li>
</ul>
</html>
<html>
<h3>Questions (Stand: 10/2020)</h3>
<ol>
<li><details><summary><!--001-->
"Is the following sentence True or False?<br />
""In the past, companies needed to acquire physical premises and infrastructure to start their business. There was a substantial up-front cost in hardware and infrastructure to start or grow a business. Cloud computing provides services to customers without significant upfront costs or equipment setup time.""</summary>
<br />
True</details>
</li>
<br />
<li><details><summary><!--002-->"Which of the following is NOT part of OpEx cloud computing costs?
<ol>
<li>Leasing software and customized features</li>
<li>Scaling charges based on usage/demand instead of fixed hardware or capacity.</li>
<li>Technical personnel</li>
<li>Billing at the user or organization level.</li>
</ol></summary>
<br />
c.) Technical personnel</details>
</li>
<br />
<li><details><summary><!--003-->"Which of the following is NOT a Cloud Deployment Model?
<ol>
<li>Private cloud</li>
<li>Public cloud</li>
<li>Mix Cloud</li>
<li>Hybrid cloud</li>
</ol></summary>
<br />
c. Mix Cloud</details>
</li>
<br />
<li><details><summary><!--004-->"Which of the following is the most flexible category of cloud services?
<ol>
<li>Platform as a service (PaaS)</li>
<li>Software as a service (SaaS)</li>
<li>Infrastructure as a service (IaaS)</li>
<li>Functions as a service</li>
</ol></summary>
<br />
c) Infrastructure as a service (IaaS)</details>
</li>
<br />
<li><details><summary><!--005-->"Which of the following sentences describes an Azure Subscription?
<ol>
<li>An Azure subscription is a logical container used to provision resources in Azure. It holds the details of all your resources.</li>
<li>An Azure subscription is a logical space where you can schedule the monthly maintenance of the Azure services you use.</li>
<li>An Azure subscription is an invoice you receive every two weeks with the charges for the Azure services you consume.</li>
<li>An Azure subscription is a storage resource that you can use to store all the services you need Azure to provide.</li>
</ol></summary>
<br />
a) An Azure subscription is a logical container used to provision resources in Azure. It holds the details of all your resources</details>
</li>
<br />
<li><details><summary><!--006-->"From the most commonly used categories in Azure, what category does the service Azure Kubernetes Service belong to?
<ol>
<li>Compute</li>
<li>Networking</li>
<li>Storage</li>
<li>Mobile</li>
</ol></summary>
<br />
a) Compute</details>
</li>
<br />
<li><details><summary><!--007-->"What is cloud computing?
<ol>
<li>It is a continually expanding set of networking services that help your organization meet your current and future business challenges.</li>
<li>It is the delivery of computing services over the Internet using a pay-as-you-go pricing model.</li>
<li>A set of learning services that can naturally communicate with your users through vision, hearing, and speech.</li>
<li>A fully-managed global IoT software as a service (SaaS) solution that makes it easy to connect, monitor, and manage your IoT assets at scale.</li>
</ol></summary>
<br />
b) It is the delivery of computing services over the Internet using a pay-as-you-go (PAYG) pricing model.</details>
</li>
<br />
<li><details><summary><!--008-->"Scale refers to adding network bandwidth, memory, storage, or compute power to achieve better performance. Which of the following means to increase the memory, storage, or compute power on an existing virtual machine.
<ol>
<li>Scaling up</li>
<li>Scaling out</li>
</ol></summary>
<br />
a) Scaling up
</details>
</li>
<br />
<li><details><summary><!--009-->"Microsoft offers previews of Azure features for evaluation purposes. With Azure Preview Features, you can test beta and other pre-release features, products, services, software, and regions. Which are the two types of previews available?
<ol>
<li>General Preview and Individual Preview.</li>
<li>General Availability and Individual Availability.</li>
<li>Private Preview and Public Preview.</li>
<li>Private Availability and Public Availability.</li>
</ol></summary>
<br />
c) Private Preview and Public Preview<br />
<br />
<b>Private Preview:</b><br />
An Azure feature marked "private preview" is available to specific Azure customers for evaluation purposes. This is typically by invite only and issued directly by the product team responsible for the feature or service.<br />
<br />
<b>Public Preview:</b><br />
An Azure feature marked "public preview" is available to all Azure customers for evaluation purposes.</details>
</li>
<br />
<li><details><summary><!--010-->"________ is a modified runtime environment built on top of a host OS that executes your application.
<ol>
<li>A Container</li>
<li>Azure Kubernetes Service</li>
<li>A Virtual Machine</li>
<li>Azure Active Directory</li>
</ol></summary>
<br />
a) A Container</details>
</li>
<br />
<li><details><summary><!--011-->"Which service helps you control your applications' secrets by keeping them in a single, central location and by providing secure access, permissions control, and access logging capabilities?
<ol>
<li>Transparent Data Encryption</li>
<li>Azure Key Vault</li>
<li>Azure Disk Encryption</li>
<li>Azure Storage Service Encryption</li>
</ol></summary><br />
b) Azure Key Vault
<br /></details>
</li>
<br />
<li><details><summary><!--012-->"What is the name of the cloud-based security solution that identifies, detects, and helps you investigate advanced threats, compromised identities, and malicious insider actions directed at your organization.
<ol>
<li>Microsoft Azure Information Protection</li>
<li>Azure Information Protection Portal</li>
<li>Azure Advanced Threat Protection</li>
<li>Azure ATP Sensor</li>
</ol></summary><br />
c) Azure Advanced Threat Protection
<br /></details>
</li>
<br />
<li><details><summary><!--013-->"Tags are name-value pairs of text data that you can apply to resources and resource groups. A resource can have up to how many tags?
<ol>
<li>20</li>
<li>30</li>
<li>40</li>
<li>50</li>
</ol></summary>
<br />
50 Tags
<br /></details>
</li>
<br />
<li><details><summary><!--014-->"You can use this service to create, assign, and manage policies. These policies apply and enforce rules that your resources need to follow.
<ol>
<li>1. Azure Policy Manager</li>
<li>2. Azure Policy Inspector</li>
<li>3. Azure Policy</li>
<li>4. Azure Policy Group</li>
</ol></summary>
<br />
c) Azure Policy</details>
</li>
<br />
<li><details><summary><!--015-->"True or False? If you de-allocate a VM then you will not be billed for compute hours, I/O reads or writes, or the private IP address since the VM is not running and has no allocated compute resources. However, you will still incur storage costs for the disks.
<ol>
<li>True</li>
<li>False</li>
</ol></summary>
<br />
a) True
</details>
</li>
<br />
<li><details><summary><!--016-->"Which of the tabs below are featured in the Azure Pricing Calculator? Select all that apply.
<ol>
<li>1.Products</li>
<li>2.Example Scenarios</li>
<li>3.Saved Estimates</li>
<li>4.FAQ</li>
<li>5.None of the above.</li>
</ol></summary><br />
1., 2., 3., und 4.
<br /></details>
</li>
<br />
<li><details><summary><!--017-->"This service allows or denies inbound network traffic to your Azure resources. Think of it as a cloud-level firewall for your network.
<ol>
<li>Azure Virtual Network</li>
<li>Azure Network Watcher</li>
<li>Azure Network Security Group</li>
<li>Azure Virtual Network Gateways</li>
</ol></summary><br />
c) Azure Network Security Group</details>
</li>
<br />
<li><details><summary><!--018-->"Let's suppose you need to distribute traffic evenly among each system in a pool, what service would you enable?
<ol>
<li>1.Azure Balanced Pool</li>
<li>2.Azure Virtual Network</li>
<li>3.Azure Network Systems</li>
<li>4.Azure Load Balancer</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--019-->"This service uses the DNS server that is closest to the user to direct user traffic to a globally distributed endpoint.
<ol>
<li>1.DNS Zones</li>
<li>2.Route Tables</li>
<li>3.Azure Traffic Manager</li>
<li>4.Azure Express Route</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"A _________________ expresses what to evaluate and which action to take.
<ol>
<li>Policy Definition</li>
<li>Azure Policy</li>
<li>Role-Based Access Control (RBAC)</li>
<li>None of the above</li>
</ol></summary>
<br />
a) Policy Definition</details>
</li>
<br />
<li><details><summary><!--001-->"A company 'Proactive consulting' is planning on creating several Virtual Machines in Azure. They would be using the Azure Virtual Machine service. Azure Virtual Machine service belongs to ____________.
<ol>
<li>1. Software as a service (SaaS)</li>
<li>2. Function as a service (FaaS)</li>
<li>3. Infrastructure as a service (IaaS)</li>
<li>4. Platform as a service (PaaS)</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You have an on-premises network that contains 100 servers. You need to recommend a solution that provides additional resources to your users. The solution must minimize capital and operational expenditure costs. What should you include in the recommendation?
<ol>
<li>1. An additional data center</li>
<li>2. A private cloud</li>
<li>3. A complete migration to the public cloud</li>
<li>4. A hybrid cloud</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You plan to deploy several Azure virtual machines. You need to ensure that the services running on the virtual machines are available if a single data center fails. Solution: You deploy virtual machines to two or more availability zones. Does this meet the goal?
<ol>
<li>Incorrect</li>
<li>Correct</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your company plans to migrate all its data and resources to Azure. The company's migration plan states that only platform as a service (PaaS) solutions must be used in Azure. You need to deploy an Azure environment that supports the planned migration. Solution: You create an Azure App Service and Azure virtual machines that have Microsoft SQL Server installeDoes this meet the goal?
<ol>
<li>Correct</li>
<li>Incorrect</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Which Azure service should you use to correlate events from multiple resources into a centralized repository?
<ol>
<li>1. Azure Analysis Services</li>
<li>2. Azure Log Analytics (In the exam might also appear Azure Stream Analytics)</li>
<li>3. Azure Monitor</li>
<li>4. Azure Event Hubs</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You have an Azure environment. You need to create a new Azure virtual machine from an Android laptop. Solution: You use PowerShell in Azure Cloud Shell. Does this meet the goal?
<ol>
<li>Correct</li>
<li>Incorrect</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"A company 'Cubezoid' wants to try out some services which are being offered by Azure in Public Preview. So, the company deploy resources which are a part of Public Preview in their production environment. Is this the correct action in this case?
<ol>
<li>Incorrect</li>
<li>Correct</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your company plans to migrate all its data and resources to Azure. The company's migration plan states that only platform as a service (PaaS) solutions must be used in Azure. You need to deploy an Azure environment that supports the planned migration. Solution: You create an Azure App Service and Azure SQL databases.
Does this meet the goal?
<ol>
<li>Incorrect</li>
<li>Correct</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"A company 'Livestream Media' needs to store 2TB of data that will be infrequently useThe data needs to be accessed via PowerBI. Which of the following would Jessie consider as a cost-effective data storage layer for this?
<ol>
<li>1. Azure SQL Datawarehouse</li>
<li>2. Azure CosmosDB</li>
<li>3. Azure PostgreSQL</li>
<li>4. Azure SQL Databases</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You plan to store 20 TB of data in Azure. The data will be accessed infrequently and visualized by using Microsoft Power BI. You need to recommend a storage solution for the data.
Which two solutions should you recommend?
<ol>
<li>1.Azure Cosmos DB</li>
<li>2.Azure SQL Data Warehouse</li>
<li>3.Azure Data Lake</li>
<li>4.Azure SQL Database</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your company hosts an accounting named App1 that is used by all the customers of the company.
App1 has low usage during the first three weeks of each month and very high usage during the last week of each month
Which benefit of Azure Cloud Services supports cost management for this type of usage pattern?
<ol>
<li>high availability</li>
<li>high latency</li>
<li>elasticity</li>
<li>load balancing</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You plan to migrate a web application to Azure. The web application is accessed by external users. You need to recommend a cloud deployment solution to minimize the amount of administrative effort used to manage the web application. What should you include in the recommendation?
<ol>
<li>software as a service (SaaS)</li>
<li>platform as a service (PaaS)</li>
<li>infrastructure as a service (IaaS)</li>
<li>database as a service (DaaS)</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You plan to migrate several servers from an on-premises network to Azure. You need to identify the primary benefit of using a public cloud service for the servers. What should you identify?
<ol>
<li>The public cloud is owned by the public, NOT a private corporation</li>
<li>The public cloud is a crowd-sourcing solution that provides corporations with the ability to enhance the cloud</li>
<li>All public cloud resources can be freely accessed by every member of the public</li>
<li>The public cloud is a shared entity whereby multiple corporations each use a portion of the resources in the cloud</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You have 1,000 virtual machines hosted on the Hyper-V hosts in a data center. You plan to migrate all the virtual machines to an Azure pay-as-you-go subscription. You need to identify which expenditure model to use for the planned Azure solution. Which expenditure model should you identify?
<ol>
<li>operational</li>
<li>elastic</li>
<li>capital</li>
<li>scalable</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your company plans to deploy an Artificial Intelligence (AI) solution in Azure. What should the company use to build, test, and deploy predictive analytics solutions?
<ol>
<li>Azure Logic Apps</li>
<li>Azure Machine Learning Studio (In the exam might also appear Azure Machine Learning Service since Studio deprecated)</li>
<li>Azure Batch</li>
<li>Azure Cosmos DB</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your company has several business units. Each business unit requires 20 different Azure resources for daily operation. All the business units require the same type of Azure resources. You need to recommend a solution to automate the creation of the Azure resources. What should you include in the recommendations?
<ol>
<li>Azure Resource Manager templates</li>
<li>virtual machine scale sets</li>
<li>the Azure API Management service</li>
<li>management groups</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"A team of developers at your company plans to deploy, and then remove, 50 customized virtual machines each week. Thirty of the virtual machines run Windows Server 2016 and 20 of the virtual machines run Ubuntu Linux. You need to recommend which Azure service will minimize the administrative effort required to deploy and remove the virtual machines. What should you recommend?
<ol>
<li>Azure Reserved Virtual Machines (VM) Instances</li>
<li>Azure virtual machine scale sets</li>
<li>Azure DevTest Labs</li>
<li>Microsoft Managed Desktop</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"A support engineer plans to perform several Azure management tasks by using the Azure CLI. You install the CLI on a computer. You need to tell the support engineer which tools to use to run the CLI. Which two tools should you instruct the support engineer to use? Each correct answer presents a complete solution.
<ol>
<li>Command Prompt</li>
<li>Azure Resource Explorer</li>
<li>Windows PowerShell</li>
<li>Windows Defender Firewall</li>
<li>E. Network and Sharing Center</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You need to identify the type of failure for which an Azure availability zone can be used to protect access to Azure services. What should you identify?
<ol>
<li>a physical server failure</li>
<li>an Azure region failure</li>
<li>a storage failure</li>
<li>an Azure data center failure</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You have a virtual machine named VM1 that runs Windows Server 2016. VM1 is in the East US Azure region.
Which Azure service should you use from the Azure portal to view service failure notifications that can affect the availability of VM1?
<ol>
<li>Azure Service Fabric</li>
<li>Azure Monitor</li>
<li>Azure virtual machines</li>
<li>Azure Advisor</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"An Azure administrator plans to run a PowerShell script that creates Azure resources. You need to recommend which computer configuration to use to run the script. Solution: Run the script from a computer that runs Linux and has the Azure CLI tools installed.
Does this meet the goal?
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You have an Azure environment that contains 10 virtual networks and 100 virtual machines. You need to limit the amount of inbound traffic to all the Azure virtual networks. What should you create?
<ol>
<li>one network security group (NSG)</li>
<li>10 virtual network gateways</li>
<li>10 Azure ExpressRoute circuits</li>
<li>one Azure firewall</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You have an Azure environment that contains multiple Azure virtual machines. You plan to implement a solution that enables the client computers on your on-premises network to communicate to the Azure virtual machines. You need to recommend which Azure resources must be created for the planned solution. Which two Azure resources should you include in the recommendation? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.
<ol>
<li>a virtual network gateway</li>
<li>a load balancer</li>
<li>an application gateway</li>
<li>a virtual network</li>
<li>E. a gateway subnet</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your company plans to move several servers to Azure. The company's compliance policy states that a server named FinServer must be on a separate network segment. You are evaluating which Azure services can be used to meet the compliance policy requirements. Which Azure solution should you recommend?
<ol>
<li>a resource group for FinServer and another resource group for all the other servers</li>
<li>a virtual network for FinServer and another virtual network for all the other servers</li>
<li>a VPN for FinServer and a virtual network gateway for each other server</li>
<li>one resource group for all the servers and a resource lock for FinServer</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You plan to map a network drive from several computers that run Windows 10 to Azure Storage. You need to create a storage solution in Azure for the planned mapped drive.
What should you create?
<ol>
<li>an Azure SQL database</li>
<li>a virtual machine data disk</li>
<li>a Files service in a storage account</li>
<li>a Blobs service in a storage account</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your company plans to migrate all its network resources to Azure. You need to start the planning process by exploring Azure. What should you create first?
<ol>
<li>a subscription</li>
<li>a resource group</li>
<li>a virtual network</li>
<li>a management group</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You have an on-premises application that sends email notifications automatically based on a rule. You plan to migrate the application to Azure. You need to recommend a serverless computing solution for the application. What should you include in the recommendation?
<ol>
<li>a web app</li>
<li>a server image in Azure Marketplace</li>
<li>a logic app</li>
<li>an API app</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You plan to deploy a website to Azure. The website will be accessed by users worldwide and will host large video files. You need to recommend which Azure feature must be used to provide the best video playback experience. What should you recommend?
<ol>
<li>an application gateway</li>
<li>an Azure ExpressRoute circuit</li>
<li>a content delivery network (CDN)</li>
<li>an Azure Traffic Manager profile</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You have an Azure web app. You need to manage the settings of the web app from an iPhone. What are two Azure management tools that you can use? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.
<ol>
<li>Azure CLI</li>
<li>the Azure portal</li>
<li>Azure Cloud Shell</li>
<li>Windows PowerShell</li>
<li>E. Azure Storage Explorer</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your Azure environment contains multiple Azure virtual machines. You need to ensure that a virtual machine named VM1 is accessible from the Internet over HTTP. Solution: You modify a DDoS protection plan.
Does this meet the goal?
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your company plans to deploy an Artificial Intelligence (AI) solution in Azure. What should the company use to build, test, and deploy predictive analytics solutions?
<ol>
<li>Azure Logic Apps</li>
<li>Azure Machine Learning Studio</li>
<li>Azure Batch</li>
<li>Azure Cosmos DB</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"What are two characteristics of the public cloud? Each correct answer presents a complete solution. <br />
NOTE: Each correct selection is worth one point.
<ol>
<li>dedicated hardware</li>
<li>unsecured connections</li>
<li>limited storage</li>
<li>metered pricing</li>
<li>self-service management</li>
</ol> </summary>
<br />
d.) metered pricing<br />
e.) self-service management<br />
<br /></details>
</li>
<br />
<li><details><summary><!--001-->"You plan to deploy several Azure virtual machines. You need to ensure that the services running on the virtual machines are available if a single data center fails. Solution: You deploy the virtual machines to two or more scale sets. Does this meet the goal?
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You have a virtual machine named VM1 that runs Windows Server 2016. VM1 is in the East US Azure region. Which Azure service should you use from the Azure portal to view service failure notifications that can affect the availability of VM1?
<ol>
<li>Azure Service Fabric
<li>Azure Monitor
<li>Azure virtual machines
<li>Azure Advisor</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your company has an Azure environment that contains resources in several regions. A company policy states that administrators must only be allowed to create additional Azure resources in a region in the country where their office is locateYou need to create the Azure resource that must be used to meet the policy requirement. What should you create?
<ol>
<li>a read-only lock</li>
<li>an Azure policy</li>
<li>a management group</li>
<li>a reservation</li>
</ol> </summary></details>
</li>
<br />
<li><details><summary><!--001-->"You need to configure an Azure solution that meets the following requirements: Secures websites from attacks; Generates reports that contain details of attempted attacks
What should you include in the solution?
<ol>
<li>Azure Firewall</li>
<li>a network security group (NSG)</li>
<li>Azure Information Protection</li>
<li>DDoS protection</li>
</ol> </summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your company plans to migrate all on-premises data to Azure. You need to identify whether Azure complies with the company's regional requirements.
What should you use?
<ol>
<li>the Knowledge Center</li>
<li>Azure Marketplace</li>
<li>the Azure portal</li>
<li>the Trust Center </li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your company plans to automate the deployment of servers to Azure. Your manager is concerned that you may expose administrative credentials during the deployment. You need to recommend an Azure solution that encrypts the administrative credentials during the deployment. What should you include in the recommendation?
<ol>
<li>Azure Key Vault</li>
<li>Azure Information Protection</li>
<li>Azure Security Center</li>
<li>Azure Multi-Factor Authentication (MFA)</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Which two types of customers are eligible to use Azure Government to develop a cloud solution? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.
<ol>
<li>a Canadian government contractor</li>
<li>a European government contractor</li>
<li>a United States government entity</li>
<li>a United States government contractor</li>
<li>E. a European government entity</li>
</ol> </summary></details>
</li>
<br />
<li><details><summary><!--001-->"You need to ensure that when Azure Active Directory (Azure AD) users connect to Azure AD from the Internet by using an anonymous IP address, the users are prompted automatically to change their password.
Which Azure service should you use?
<ol>
<li>Azure AD Connect Health</li>
<li>Azure AD Privileged Identity Management</li>
<li>Azure Advanced Threat Protection (ATP)</li>
<li>Azure AD Identity Protection</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"To what should an application connect to retrieve security tokens?
<ol>
<li>an Azure Storage account</li>
<li>Azure Active Directory (Azure AD)</li>
<li>a certificate store</li>
<li>an Azure key vault</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your network contains an Active Directory forest. The forest contains 5,000 user accounts. Your company plans to migrate all network resources to Azure and to decommission the on-premises data center. You need to recommend a solution to minimize the impact on users after the planned migration. What should you recommend?
<ol>
<li>Implement Azure Multi-Factor Authentication (MFA)</li>
<li>Sync all the Active Directory user accounts to Azure Active Directory (Azure AD)</li>
<li>Instruct all users to change their password</li>
<li>Create a guest user account in Azure Active Directory (Azure AD) for each user</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Which Azure service should you use to store certificates?
<ol>
<li>Azure Security Center</li>
<li>an Azure Storage account</li>
<li>Azure Key Vault</li>
<li>Azure Information Protection</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"What can Azure Information Protection encrypt?
<ol>
<li>network traffic</li>
<li>documents and email messages</li>
<li>an Azure Storage account</li>
<li>an Azure SQL database</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"What should you use to evaluate whether your company's Azure environment meets regulatory requirements?
<ol>
<li>the Knowledge Center website</li>
<li>the Advisor blade from the Azure portal</li>
<li>Compliance Manager from the Security Trust Portal </li>
<li>the Security Center blade from the Azure portal</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your company plans to purchase Azure. The company's support policy states that the Azure environment must provide an option to access support engineers by phone or email. You need to recommend which support plan meets the support policy requirement. Solution: Recommend a Basic support plan.
Does this meet the goal?
<ol>
<li>Yes</li>
<li>No </li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"What is required to use Azure Cost Management?
<ol>
<li>a Dev/Test subscription</li>
<li>Software Assurance</li>
<li>an Enterprise Agreement (EA)</li>
<li>a pay-as-you-go subscription</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You attempt to create several managed Microsoft SQL Server instances in an Azure environment and receive a message that you must increase your Azure subscription limits.
What should you do to increase the limits?
<ol>
<li>Create a service health alert</li>
<li>Upgrade your support plan</li>
<li>Modify an Azure policy</li>
<li>Create a new support request </li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your company plans to migrate to Azure. The company has several departments. All the Azure resources used by each department will be managed by a department administrator.
You need to recommend an Azure deployment that provides the ability to segment Azure for the departments. The solution must minimize administrative effort.
What should you include in the recommendation?
<ol>
<li>multiple subscriptions</li>
<li>multiple Azure Active Directory (Azure AD) directories</li>
<li>multiple regions</li>
<li>multiple resource groups</li>
</ol> </summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your company has an Azure subscription that contains the following unused resources:
<ul>
<li>20 user accounts in Azure Active Directory (Azure AD)</li>
<li>Five groups in Azure AD</li>
<li>10 public IP addresses</li>
<li>10 network interfaces</li>
</ul>
You need to reduce the Azure costs for the company.
Solution: You remove the unused network interfaces.
Does this meet the goal?
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"In which Azure support plans can you open a new support request?
<ol>
<li>Premier and Professional Direct only</li>
<li>Premier, Professional Direct, and Standard only</li>
<li>Premier, Professional Direct, Standard, and Developer only</li>
<li>Premier, Professional Direct, Standard, Developer, and Basic</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"A company is planning on deploying Azure resources to a resource group. The company is planning on assigning tags to the resource groups. Would the resources in the resource group also inherit the same tags?
<ol>
<li>No</li>
<li>Yes</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"A platform as a service (PaaS) solution that hosts web apps in Azure provides professional development services to continuously add features to custom applications.
<ol>
<li>No</li>
<li>Yes</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"If you create two Azure virtual machines that use the B2S size, each virtual machine will always generate the same monthly costs.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"An Azure service in general availability is released to a subset of Azure customers.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You have an on-premises network that contains several servers.You plan to migrate all the servers to Azure. You need to recommend a solution to ensure that some of the servers are available if a single Azure data center goes offline for an extended perioWhat should you include in the recommendation?
<ol>
<li>A.Fault tolerance
<li>B.Elasticity
<li>C.Scalability
<li>D.Low latency</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"This question requires that you evaluate the underlined text to determine if it is correct. An organization that hosts its infrastructure in a private cloud can decommission its data center. Instructions: Review the underlined text. If it makes the statement correct, select “No change is needed“. If the statement is incorrect, select the answer choice that makes the statement correct.
<ol>
<li>A.No change is needed</li>
<li>B.In a hybrid cloud</li>
<li>C.In the public cloud</li>
<li>D.On a hyper-V host</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"This question requires that you evaluate the underlined text to determine if it is correct. When planning to migrate a public website to Azure, you must plan to pay monthly usage costs. Instructions: Review the underlined text. If it makes the statement correct, select “No change is needed“. If the statement is incorrect, select the answer choice that makes the statement correct.
<ol>
<li>A.No change is needed</li>
<li>B.Deploy a VPN</li>
<li>C.Pay to transfer all the website data to Azure</li>
<li>D.Reduce the number of connections to the website</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You plan to map a network drive from several computers that run Windows 10 to Azure Storage.You need to create a storage solution in Azure for the planned mapped drive.What should you create?
<ol>
<li>A.An Azure SQl database</li>
<li>B.A virtual machine data disk</li>
<li>C.A Files service in a storage account</li>
<li>D.A Blobs service in a storage account</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You have a resource group named RG1. You plan to create virtual networks and app services in RG1. You need to prevent the creation of virtual machines only in RG1. What should you use?
<ol>
<li>A lock</li>
<li>An Azure role</li>
<li>A tag</li>
<li>An Azure policy</li>
</ol></summary>
<br />
A lock
<br /></details>
</li>
<br />
<li><details><summary><!--001-->"Deploying your own datacenter is an example of CapEx.
<ol>
<li>Yes</li>
<li>B: No</li>
</ol></summary>
<br />
Yes
<br /></details>
</li>
<br />
<li><details><summary><!--001-->"You plan to migrate several servers from an on-premises network to Azure. You need to identify the primary benefit of using a public cloud service for the servers. What should you identify?
<ol>
<li>The public cloud is owned by the public, NOT a private corporation</li>
<li>The public cloud is a crowd-sourcing solution that provides corporations with the ability to enhance the cloud</li>
<li>All public cloud resources can be freely accessed by every member of the public</li>
<li>The public cloud is a shared entity whereby multiple corporations each use a portion of the resources in the cloud</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->The Service Level Agreement (SLA) for Azure Active Directory Basis is the same as the SLA for Azure Active Directory Free.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary>
<br />
No</details>
</li>
<br />
<li><details><summary><!--001-->"Your Azure environment contains multiple Azure virtual machines. You need to ensure that a virtual machine named VM1 is accessible from the Internet over HTTP.
Solution: You modify a DDoS protection plan. Does this meet the goal?
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your company plans to migrate all its data and resources to Azure. The companys migration plan states that only platform as a service (PaaS) solutions must be used in Azure. You need to deploy an Azure environment that supports the planned migration.
Solution: You create an Azure App Service and Azure virtual machines that have Microsoft SQL Server installeDoes this meet the goal?
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"If you implement the security recommendations provided by Azure Advisor, your company's secure score will decrease.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"The companys support policy states that the Azure environment must provide an option to access support engineers by phone or email. You need to recommend which support plan meets the support policy requirement. Solution: Recommend a Standard support plan. Does this meet the goal?
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"An Azure free account has a spending limit.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You have an Azure environment. You need to create a new Azure virtual machine from an Android laptop. Solution: You use PowerShell in Azure Cloud Shell. Does this meet the goal?
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"A company can extend the computing resources of its internal network by using the public cloud.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You plan to deploy several Azure virtual machines. You need to ensure that the services running on the virtual machines are available if a single data center fails. Solution: You deploy the virtual machines to two or more resource groups. Does this meet the goal?
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Each user account in Azure Active Directory (Azure AD) can be assigned only one license.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You need to ensure that when Azure Active Directory (Azure AD) users connect to Azure AD from the Internet by using an anonymous IP address, the users are prompted automatically to change their passworWhich Azure service should you use?
<ol>
<li>Azure AD Connect Health</li>
<li>Azure AD Privileged Identity Management</li>
<li>Azure Advanced Threat Protection (ATP)</li>
<li>Azure AD Identity Protection</summary></details>
</li>
<br />
<li><details><summary><!--001-->"An Azure free account can contain an unlimited number of web apps.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You have an on-premises network that contains several servers. You plan to migrate all the servers to Azure. You need to recommend a solution to ensure that some of the servers are available if a single Azure data center goes offline for an extended perioWhat should you include in the recommendation?
<ol>
<li>Fault tolerance</li>
<li>Elasticity</li>
<li>Scalability</li>
<li>Low latency</summary></details>
</li>
<br />
<li><details><summary><!--001-->"All data that is copied to an Azure Storage account is backed up automatically to another Azure data center.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Only virtual machines that run Windows Server can be created in availabillity zones.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"A platform as a service (PaaS) solution that hosts web apps in Azure provides professional development services to continuously add features to custom applications.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"<Authorization> is the process of verifying a users credentials.
<ol>
<li>No change is needed</li>
<li>Authentication</li>
<li>Federation</li>
<li>Ticketing</summary></details>
</li>
<br />
<li><details><summary><!--001-->"Storing 1 TB of data in Azure Blob storage will always cost the same, regardless of the Azure region in which the data is located.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Azure Active Directory (Azure AD) provides authentication services for resources hosted in Azure and Microsoft 365.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You plan to deploy 20 virtual machines to an Azure environment. To ensure that a virtual machine named VM1 cannot connect to the other virtual machines, VM1 must <be deployed to a separate virtual network>.
<ol>
<li>No change is needed</li>
<li>run a different operating system than the other virtual machines</li>
<li>be deployed to a separate resource group</li>
<li>have two network interfaces</summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your Azure environment contains multiple Azure virtual machines. You need to ensure that a virtual machine named VM1 is accessible from the Internet over HTTP. Solution: You modify a network security group (NSG).
Does this meet the goal?
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your Azure trial account expired last week. You are now unable to <create additional Azure Active Directory (Azure AD) user accounts>.
<ol>
<li>No change is needed</li>
<li>Start an existing Azure virtual machine</li>
<li>Access your data stored in Azure</li>
<li>Access the Azure portal</summary></details>
</li>
<br />
<li><details><summary><!--001-->"If you create two Azure virtual machines that use the B2S size, each virtual machine will always generate the same monthly costs.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Companies can increase the Service Level Agreement (SLA) guaranteed uptime by purchasing multiple subscriptions.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You have an on-premises application that sends email notifications automatically based on a rule. You plan to migrate the application to Azure. You need to recommend a serverless computing solution for the application. What should you include in the recommendation?
<ol>
<li>A web app</li>
<li>A server image in Azure Marketplace</li>
<li>A logic app</li>
<li>An API app</summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your company plans to migrate all its data and resources to Azure. The companys migration plan states that only platform as a service (PaaS) solutions must be used in Azure. You need to deploy an Azure environment that supports the planned migration.
Solution: You create an Azure App Service and Azure Storage accounts. Does this meet the goal?
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"If your company uses an Azure free account, you will only be exposed to a subset of Azure services.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"An Azure administrator plans to run a PowerShell script that creates Azure resources. You need to recommend which computer configuration to use to run the script. Solution: Run the script from a computer that runs Linux and has the Azure CLI tools installeDoes this meet the goal?
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your company plans to migrate all on-premises data to Azure. You need to identify whether Azure complies with the companys regional requirements. What should you use?
<ol>
<li>The Knowledge Center</li>
<li>Azure Marketplace</li>
<li>The Azure portal</li>
<li>The Trust Center</summary></details>
</li>
<br />
<li><details><summary><!--001-->"If you delete a resource group, all the resources in the resource group will be deleted.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"The cost of an Azure service in private preview decreases when the service becomes generally available.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Data that is copied to an Azure Storage account is maintained automatically in at least three copies.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Azure Pay-As-You-Go pricing is an example of CapEx.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your company plans to move several servers to Azure. The companys compliance policy states that a server named FinServer must be on a separate network segment. You are evaluating which Azure services can be used to meet the compliance policy requirements. Which Azure solution should you recommend?
<ol>
<li>A resource group for FinServer and another resource group for all the other servers</li>
<li>A virtual network for FinServer and another virtual network for all the other servers</li>
<li>A VPN for FinServer and a virtual network gateway for each other server</li>
<li>One resource group for all the servers and a resource lock for FinServer</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"A single Microsoft account can be used to manage multiple Azure subscriptions.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your company plans to migrate to Azure. The company has several departments. All the Azure resources used by each department will be managed by a department administrator. You need to recommend an Azure deployment that provides the ability to segment Azure for the departments. The solution must minimize administrative effort. What should you include in the recommendation?
<ol>
<li>Multiple subscriptions</li>
<li>Multiple Azure Active Directory (Azure AD) directories</li>
<li>Multiple regions</li>
<li>Multiple resource groups</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You have an Azure environment. You need to create a new Azure virtual machine from an Android laptop.
Solution: You use PowerShell in Azure Cloud Shell. Does this meet the goal?
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"When you use a general-purpose v2 Azure Storage account, you are only charged for the amount of data that is storeAll read and write operations are free.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Azure virtual machines that run Windows Server 2016 can encrypt the network traffic sent from the virtual machine to a host on the internet.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You have several virtual machines in an Azure subscription. You create a new subscription. <The virtual machines cannot be moved to the new subscription>.
<ol>
<li>No change is needed.</li>
<li>The virtual machines can be moved to the new subscription.</li>
<li>The virtual machines can be moved to the new subscription only if they are all in the same resource group.</li>
<li>The virtual machines can be moved to the new subscription only if they run Windows Server 2016</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Azure Reserved VM instances are an example of OpEx.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You plan to migrate a web application to Azure. The web application is accessed by external users. You need to recommend a cloud deployment solution to minimize the amount of administrative effort used to manage the web application. What should you include in the recommendation?
<ol>
<li>Software as a service (SaaS)</li>
<li>Platform as a service (PaaS)</li>
<li>Infrastructure as a service (IaaS)</li>
<li>Database as a service (DaaS)</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"To maintain Microsoft support, you must implement the security recommendations provided by Azure Advisor within a period of 30 days.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"A company can store resources in multiple subscriptions.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"If you set permissions to a resource group, all the Azure resources in that resource group inherit the permissions.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your company has 10 departments. The company plans to implement an Azure environment. You need to ensure that each department can use a different payment option for the Azure services it consumes. What should you create for each department?
<ol>
<li>A reservation</li>
<li>A subscription</li>
<li>A resource group</li>
<li>A container instance</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You attempt to create several managed Microsoft SQL Server instances in an Azure environment and receive a message that you must increase your Azure subscription limits. What should you do to increase the limits?
<ol>
<li>Create a service health alert</li>
<li>Upgrade your support plan</li>
<li>Modify an Azure policy</li>
<li>Create a new support request</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Data that is stored in the Archive access tier of an Azure Storage account <can be accessed at any time by using azcopy.exe>.
<ol>
<li>No change is needed.</li>
<li>Can only be read by using Azure Backup</li>
<li>Must be restored before the data can be accessed</li>
<li>Must be rehydrated before the data can be accessed</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"In which Azure support plans can you open a new support request?
<ol>
<li>Premier and Professional Direct only</li>
<li>Premier, Professional Direct, and Standard only</li>
<li>Premier, Professional Direct, Standard, and Developer only</li>
<li>Premier, Professional Direct, Standard, Developer, and Basic</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You plan to create an Azure virtual machine. You need to identify which storage service must be used to store the data disks of the virtual machine. What should you identify?
<ol>
<li>Blobs</li>
<li>Files</li>
<li>Tables</li>
<li>Queues</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Identities stored in an on-premises Active Directory can be synchronized to Azure Active Directory (Azure AD).
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"What can Azure Information Protection encrypt?
<ol>
<li>Network traffic</li>
<li>Documents and email messages</li>
<li>An Azure Storage account</li>
<li>An Azure SQL database</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You need to configure an Azure solution that meets the following requirements:
<ul>
<li>-Secures websites from attacks</l>
<li>-Generates reports that contain details of attempted attacks.</li>
</ul> What should you include in the solution?
<ol>
<li>Azure Firewall</li>
<li>a network security group (NSG)</li>
<li>Azure Information Protection</li>
<li>DDoS protection</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"All Azure services in private preview must be accessed by using a seperate Azure portal.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your Azure environment contains multiple Azure virtual machines. You need to ensure that a virtual machine named VM1 is accessible from the Internet over HTTP.
Solution: You modify an Azure Traffic Manager profile.
Does this meet the goal?
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Each Azure subscription can contain multiple account administrators.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Azure services in public preview are subject to a Service Level Agreement (SLA).
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"<Resource groups> provide organizations with the ability to manage the compliance of Azure resources across multiple subscriptions.
<ol>
<li>No change is needed</li>
<li>Management groups</li>
<li>Azure policies</li>
<li>Azure App Service plans</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"A support plan solution that gives you best practice information, health status and notifications, and 24/7 access to billing information at the lowest possible cost is a <standard> support plan.
<ol>
<li>No change is needed</li>
<li>Developer</li>
<li>Basic</li>
<li>Premier</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your company plans to migrate all its network resources to Azure. You need to start the planning process by exploring Azure. What should you create first?
<ol>
<li>A subscription</li>
<li>A resource group</li>
<li>A virtual network</li>
<li>A management group</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"A Premier support plan can only be purchased by companies that have an Enterprise Agreement (EA).
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You plan to deploy 20 virtual machines to an Azure environment. To ensure that a virtual machine named VM1 cannot connect to the other virtual machines, VM1 must <be deployed to a separate virtual network>.
<ol>
<li>No change is needed</li>
<li>run a different operating system than the other virtual machines</li>
<li>be deployed to a separate resource group</li>
<li>have two network interfaces</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"This question requires that you evaluate the underlined text to determine if it is correct.
When planning to migrate a public website to Azure, you must plan to pay monthly usage costs. Instructions: Review the underlined text. If it makes the statement correct, select “No change is needed“. If the statement is incorrect, select the answer choice that makes the statement correct.
<ol>
<li>A.No change is needed</li>
<li>B.Deploy a VPN</li>
<li>C.pay to transfer all the website data to Azure</li>
<li>D.reduce the number of connections to the website</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You plan to map a network drive from several computers that run Windows 10 to Azure Storage.You need to create a storage solution in Azure for the planned mapped drive.What should you create?
<ol>
<li>A.an Azure SQL database</li>
<li>B.a virtual machine data disk</li>
<li>a Files service in a storage account</li>
<li>a Blobs service in a storage account</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Your company plans to deploy several million sensors that will upload data to Azure. You need to identify which Azure resources must be created to support the planned solution. Which two Azure resources should you identify? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.
<ol>
<li>Azure Data Lake</li>
<li>Azure Queue storage</li>
<li>Azure File Storage</li>
<li>Azure IoT Hub</li>
<li>E. Azure Notification Hubs</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Azure Advisor provides recommendations on how to improve the security of an Azure Active Directory (Azure AD) environment.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Azure Advisor provides recommendations on how to reduce the cost of running Azure virtual machines.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Azure Advisor provides recommendations on how to configure the network settings on azure virtual machines.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Which term from the list below would be viewed as benefits of using cloud services?
<ol>
<li>Unpredictable costs</li>
<li>Elasticity</li>
<li>Local reach only</li>
</ol> </summary></details>
</li>
<br />
<li><details><summary><!--001-->"Suppose you have two types of applications: legacy applications that require specialized mainframe hardware and newer applications that can run on commodity hardware. Which cloud deployment model would be best for you?
<ol>
<li>Public cloud</li>
<li>Private cloud</li>
<li>Hybrid cloud</li>
</ol> </summary></details>
</li>
<br />
<li><details><summary><!--001-->"You're developing an application and want to focus on building, testing, and deploying. You don't want to worry about managing the underlying hardware or software. Which cloud service type is best for you?
<ol>
<li>Infrastructure as a Service (IaaS)</li>
<li>Platform as a Service (PaaS)</li>
<li>Software as a Service (SaaS)</li>
</ol> </summary></details>
</li>
<br />
<li><details><summary><!--001-->"Which of the following statements is true about an Azure subscription?
<ol>
<li>Using Azure does not require a subscription</li>
<li>An Azure subscription is a logical unit of Azure services</li>
<li>You can't have more than one subscription</li>
</ol> </summary>
<br />
An Azure subscription is a logical unit of Azure services
<br /></details>
</li>
<br />
<li><details><summary><!--001-->"Your billing is based on your usage of Azure resources and is invoiced ______________
<ol>
<li>Annually</li>
<li>Monthly</li>
<li>Daily</li>
</ol> </summary>
<br />
Monthly
<br /></details>
</li>
<br />
<li><details><summary><!--001-->"When you create an Azure resource like a virtual machine, you select the ______________ it belongs to.
<ol>
<li>Billing account</li>
<li>Billing profile</li>
<li>Azure subscription</li>
</ol></summary>
<br />
Azure subscription
<br /></details>
</li>
<br />
<li><details><summary><!--001-->"Which Azure support plan is best for business-critical workloads?
<ol>
<li>Azure Developer</li>
<li>Azure Professional Direct</li>
<li>Azure Standard</li>
</ol></summary>
<br />
Azure Professional Direct
<br /></details>
</li>
<br />
<li><details><summary><!--001-->"What is Azure?
<ol>
<li>Microsoft's cloud computing platform, which provides compute power, storage, and services over the Internet using a pay-as-you-go pricing model.</li>
<li>A single data center located in Redmond, Washington.</li>
<li>A hosting environment specifically for virtual machines</li>
</ol> </summary>
<br />
Microsoft's cloud computing platform, which provides compute power, storage, and services over the Internet using a pay-as-you-go pricing model.
<br /></details>
</li>
<br />
<li><details><summary><!--001-->"Which of the following is an example of an Azure application platform?
<ol>
<li>Azure App Service</li>
<li>Azure Load Balancer</li>
<li>Azure Table Storage</li>
<li>D.Azure Cache for Redis</li>
</ol> </summary></details>
</li>
<br />
<li><details><summary><!--001-->"When should you scale out your deployment?
<ol>
<li>When your application or service requires a more powerful CPU or more memory to run faster.</li>
<li>When you need additional virtual machines to speed up your application.</li>
<li>When you're using excess capacity that you don't need.</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->" Suppose you work at a startup with limited funding. Why might you prefer Azure data storage over an on-premises solution?
<ol>
<li>To ensure you run on a specific brand of hardware, which will let you form a marketing partnership with that hardware vendor.</li>
<li>The Azure pay-as-you-go billing model lets you avoid buying expensive hardware.</li>
<li>To get exact control over the location of your data store.</li>
</ol> </summary></details>
</li>
<br />
<li><details><summary><!--001-->"Which of the following situations would yield the most benefits from relocating an on-premises data store to Azure?
<ol>
<li>Unpredictable storage demand that increases and decreases multiple times throughout the year.</li>
<li>Long-term, steady growth in storage demand.</li>
<li>Consistent, unchanging storage demand.</li>
</ol> </summary></details>
</li>
<br />
<li><details><summary><!--001-->"A newly released mobile app using Azure data storage has just been mentioned by a celebrity on social media, seeing a huge spike in user volume. To meet the unexpected new user demand, what feature of pay-as-you-go storage will be most beneficial?
<ol>
<li>The ability to provision and deploy new infrastructure quickly</li>
<li>The ability to predict the service costs in advance</li>
<li>The ability to meet compliance requirements for data storage</li>
</ol> </summary></details>
</li>
<br />
<li><details><summary><!--001-->"Tags can be applied to any type of resource on Azure
<ol>
<li>True</li>
<li>False</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Tags applied at a resource group level are propagated to resources within the resource group.
<ol>
<li>True</li>
<li>False</li>
</ol> </summary></details>
</li>
<br />
<li><details><summary><!--001-->"Which of the following features does not apply to resource groups?
<ol>
<li>Resources can be in only one resource group.</li>
<li>Resources can be moved from one resource group to another resource group.</li>
<li>Resource groups can be nested.</li>
<li>Role-based access control can be applied to the resource group.</li>
</ol></summary>
<br />
c. “Resource groups can be nested“ → No, resource groups <u>cannot</u> be nested!
<br /></details>
</li>
<br />
<li><details><summary><!--001-->"Which of the following approaches might be a good usage of tags?
<ol>
<li>Using tags to associate a cost center with resources for internal chargeback</li>
<li>Using tags in conjunction with Azure Automation to schedule maintenance windows</li>
<li>Using tags to store environment and department association</li>
<li>All of the above are good ways to use tags</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Which of the following approaches would be the most efficient way to ensure a naming convention was followed across your subscription?
<ol>
<li>Send out an email with the details of your naming conventions and hope it is followed</li>
<li>Create a policy with your naming requirements and assign it to the scope of your subscription</li>
<li>Give all other users except for yourself read-only access to the subscription. Have all requests to create resources sent to you so you can review the names being assigned to resources, and then create them</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Which of the following items would be good use of a resource lock?
<ol>
<li>An ExpressRoute circuit with connectivity back to your on-premises network</li>
<li>A non-production virtual machine used to test occasional application builds</li>
<li>A storage account used to temporarily store images processed in a development environment</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"What is an Azure region?
<ol>
<li>One or more Azure data centers within a specific geographical location.</li>
<li>A way of breaking networks into smaller networks.</li>
<li>Firewall rules which define the flow of traffic in and out of Azure.</li>
</ol> </summary></details>
</li>
<br />
<li><details><summary><!--001-->"Which of the following is true about virtual networks?
<ol>
<li>You configure virtual networks through software.</li>
<li>A virtual network accepts network traffic on all ports. You configure the firewall through virtual machines.</li>
<li>Virtual networks are always reachable from the internet.</li>
</ol> </summary></details>
</li>
<br />
<li><details><summary><!--001-->"Which is true about Azure Load Balancer?
<ol>
<li>You must use Azure Load Balancer if you want to distribute traffic among your virtual machines running in Azure.</li>
<li>Azure Load Balancer works with internet-facing traffic only.</li>
<li>Azure Load Balancer distributes traffic among similar systems, making your services more highly available. </li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"What is network latency?
<ol>
<li>The amount of data that can fit on the connection.</li>
<li>The distance data must travel to reach its destination.</li>
<li>The time it takes for data to travel over the network.</li>
</ol>
</summary></details>
</li>
<br />
<li><details><summary><!--001-->"How does Azure Traffic Manager reduce latency?
<ol>
<li>It chooses only the fastest networks between endpoints.</li>
<li>It chooses the endpoint that's closest to the user's DNS server.</li>
<li>It caches content, similar to how content delivery networks work.</li>
</ol> </summary></details>
</li>
<br />
<li><details><summary><!--001-->"Suppose you have an existing application running locally on your own server. You need additional capacity but prefer to move to Azure instead of buying upgraded on-premises hardware. Which compute option would likely give you the quickest route to getting your application running in Azure?
<ol>
<li>Serverless computing</li>
<li>Containers</li>
<li>Virtual machines </li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Imagine that you work on a photo-sharing application that runs on millions of mobile devices. Demand is unpredictable because you see a spike in usage whenever a locally or nationally significant event occurs. Which Azure compute resource is the best match for this workload?
<ol>
<li>Serverless computing</li>
<li>Containers</li>
<li>Virtual machines </li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"The compute options give you different levels of control over the configuration of the environment in which your application runs. Which of the following lists the compute options in order of your control from ""most control"" to ""least control""?
<ol>
<li>Serverless computing, containers, virtual machines</li>
<li>Containers, serverless computing, virtual machines</li>
<li>Virtual machines, containers, serverless computing</li>
</ol> </summary></details>
</li>
<br />
<li><details><summary><!--001-->How many VMs and how many availability zones do you need to fullfil the SLA 99,9%?
Which Azure services are chargeable even when not in use?
URL of Azure Advisor?
"An SLA that defines an operating time of 99.999% allows only about 5 minutes of total downtime per year.
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Deploying an app can be done directly to what level of physical granularity?
<ol>
<li>Region</li>
<li>Datacenter</li>
<li>Server rack</li>
</ol> </summary></details>
</li>
<br />
<li><details><summary><!--001-->"To use Azure datacenters that are made available with power, cooling, and networking capabilities independent from other datacenters in a region, choose a region that supports _________?
<ol>
<li>Geography distribution</li>
<li>Service-Level Agreements (SLAs)</li>
<li>Availability Zones</li>
</ol> </summary></details>
</li>
<br />
<li><details><summary><!--001-->"<b><em>Application availability</em></b> refers to what?
<ol>
<li>The service level agreement of the associated resource.</li>
<li>Application support for an availability zone.</li>
<li>The overall time that a system is functional and working.</li>
</ol></summary>
<br />
c) The overall time that a system is functional and working.</details>
</li>
<br />
<li><details><summary><!--001-->"True or false: You can download published audit reports and other compliance-related information related to Microsoft's cloud service from the Service Trust Portal
<ol>
<li>True</li>
<li>False</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Which Azure service allows you to configure fine-grained access management for Azure resources, enabling you to grant users only the rights they need to perform their jobs?
<ol>
<li>Locks</li>
<li>Policy</li>
<li>Initiatives</li>
<li>Role-based Access Control</li>
</ol></summary>
<br />
d) Role-based Access Control (RBAC)</details>
</li>
<br />
<li><details><summary><!--001-->"Which Azure service allows you to create, assign, and, manage policies to enforce different rules and effects over your resources and stay compliant with your corporate standards and service-level agreements (SLAs)?
<ol>
<li>Azure Policy</li>
<li>Azure Blueprints</li>
<li>Azure Security Center</li>
<li>Role-based Access Control</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Which of the following services provides up-to-date status information about the health of Azure services?
<ol>
<li>Compliance Manager</li>
<li>Azure Monitor</li>
<li>Service Trust Portal</li>
<li>Azure Service Health</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Where can you obtain details about the personal data Microsoft processes, how Microsoft processes it, and for what purposes?
<ol>
<li>Microsoft Privacy Statement</li>
<li>Compliance Manager</li>
<li>Azure Service Health</li>
<li>Trust Center</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"An Azure dashboard is stored as which type of file?
<ol>
<li>XML</li>
<li>JSON</li>
<li>PNG</li>
</ol></summary>
<br />
b) JSON
<br /></details>
</li>
<br />
<li><details><summary><!--001-->"Azure Advisor provides advice on which of these topics:
<ol>
<li>Creating an Azure account</li>
<li>Best practices and security for your services</li>
<li>Using the Azure portal effectively</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"True or false: Azure Cloud Shell is an interactive, browser-accessible shell for managing Azure resources?
<ol>
<li>True</li>
<li>False</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Cloud security is a shared responsibility between you and your cloud provider. Which category of cloud services requires the greatest security effort on your part?
<ol>
<li>Infrastructure as a service (IaaS)</li>
<li>Platform as a service (PaaS)</li>
<li>Software as a service (SaaS)</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Which of these options helps you most easily disable an account when an employee leaves your company?
<ol>
<li>Enforce multi-factor authentication (MFA)</li>
<li>Monitor sign-on attempts</li>
<li>Use single sign-on (SSO)</li>
</ol> </summary></details>
</li>
<br />
<li><details><summary><!--001-->"Which of these approaches is the strongest way to protect sensitive customer data?
<ol>
<li>Encrypt data as it sits in your database</li>
<li>Encrypt data as it travels over the network</li>
<li>Encrypt data both as it sits in your database and as it travels over the network</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"There has been an attack on your public-facing website, and the application's resources have been overwhelmed and exhausted, and are now unavailable to users. What service should you use to prevent this type of attack?
<ol>
<li>DDoS protection</li>
<li>Azure Firewall</li>
<li>Network Security Group</li>
<li>Application Gateway</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"You want to store certificates in Azure to centrally manage them for your services. Which Azure service should you use?
<ol>
<li>AIP</li>
<li>Azure AD</li>
<li>Azure Key Vault</li>
<li>Azure ATP </li>
</ol></summary>
<br />
Azure Key Vault
<br /></details>
</li>
<br />
<li><details><summary><!--001-->"Which tab of the Azure pricing calculator will you use to put together your estimate?
<ol>
<li>Estimate</li>
<li>Products</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"True or false: You can share your estimate through an Excel spreadsheet or through a URL.
<ol>
<li>True</li>
<li>False</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Azure Advisor provides recommendations for _________.
<ol>
<li>Costs only</li>
<li>High availability, security, performance, operational excellence, and cost</li>
<li>High availability, performance, and cost</li>
</ol> </summary></details>
</li>
<br />
<li><details><summary><!--001-->"Azure Cost Management allows you to _________.
<ol>
<li>See historical breakdowns of what services you are spending your money on.</li>
<li>See estimates of what your services might cost if you make a change.</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"Which one of these approaches is not a cost-saving solution?
<ol>
<li>Deallocate virtual machines during off hours.</li>
<li>Use Azure Reserved Virtual Machine Instances.</li>
<li>Load balance your virtual machines for incoming messages.</li>
<li>Right-size underutilized virtual machines.</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"True or false: PaaS is typically less expensive than IaaS.
<ol>
<li>True</li>
<li>False</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"True or false: If you already have Windows Server licenses, you have to pay for them again on Azure.
<ol>
<li>True</li>
<li>False</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->"True or false: Azure has money-saving options for test and development servers.
<ol>
<li>True</li>
<li>False</li>
</ol></summary>
<br />
a) True
</br /></details>
</li>
<br />
<li><details><summary><!--001-->"Which one of the following systems is used to determine Azure costs for each billing period?
<ol>
<li>The Azure website</li>
<li>Number of created virtual machines</li>
<li>The Azure pricing calculator</li>
<li>Usage meters</li>
</ol></summary>
<br />
d) Usage meters
<br /></details>
</li>
<br />
<li><details><summary><!--001-->Which of the following factors affects costs?
<ol>
<li>Global infrastructure</li>
<li>Location</li>
<li>Availability zone</li>
</ol></summary>
<br />
c) Location</details>
</li>
<br />
<li><details><summary><!--001-->"Complete the following sentence. As an Azure customer, Azure Reservations offer discounted prices if you _________
<ol>
<li>Make upfront commitments on compute capacity</li>
<li>Provision many resources</li>
<li>Have a free account</li>
<li>Set Spending Limits</li>
</ol></summary>
<br />
a) Make upfront commitments on compute capacity<br />
</details>
</li>
<br />
<li><details><summary><!--001-->Welche Serverless Services gibt es?</summary>
<br />
<ol>
<li>Azure Functions</li>
<li>Blog Storage</li>
<li>Logic Apps</li>
<li>Event Grid</li>
</ol></details>
</li>
<br />
<li><details><summary><!--001-->Was wird zu den Management Tools gezählt?</summary>
<br />
<ol>
<li>Azure Portal</li>
<li>Azure Portal Preview</li>
<li>Azure PowerShell</li>
<li>Azure Visual Studio</li>
<li>Azure Cloud Shell</li>
<li>Azure CLI, Command Line Interface</li>
</ol></summary></details>
</li>
<br />
<li><details><summary><!--001-->Are multiple Azure Portal Dashboards supported in Azure?<br />
<ol>
<li>Yes</li>
<li>No</li>
</ol></summary>
<br />
a) Yes
<br /></details>
</li>
<br />
<li><details><summary><!--001-->"Which of the following is part of OpEx cloud computing costs?
<ol>
<li>Leasing software and customized features</li>
<li>Scaling charges based on usage/demand instead of fixed hardware or capacity.</li>
<li>Technical personnel</li>
<li>Billing at the user or organization level.</li>
</ol></summary>
<br />
a.) Leasing software and customized features,<br />
b.) Scaling charges based on usage/demand instead of fixed hardware or capacity,<br />
und <br />
d.) Billing at the user or organization level.<br /></details>
</li>
<br />
<li><details><summary><!--001-->Was versteht man unter “Initiatives“?<br />
</summary>
<br />
Die Bündelung von Policies<br />
<br />
A <b>initiative</b> is a set or group of policy definitions to help track your compliance state for
a larger goal. Even if you have a single policy, we recommend using initiatives if you
anticipate increasing the number of policies over time.</details>
</li>
<br />
<li><details><summary><!--001-->What are the cost‐affecting factors?</summary>
<br />
<ol>
<li>Resource type</li>
<li>Services</li>
<li>Location</li>
<li>Azure billing zones</li>
</ol></details>
</li>
<br />
<li><details><summary><!--001-->What are the characteristics of SLAs for Azure products?</summary>
<br />
<ol>
<li>Performance Targets</li>
<li>Uptime & Connectivity Guarantees</li>
<li>Service Credits</li>
</ol></details>
</li>
<br />
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://k21academy.com/microsoft-azure/az-900/az-900-microsoft-azure-fundamentals-cloud-computing-capex-vs-opex-model/"
target="_blank" rel="noreferrer noopener">
K21‐Academy :: AZ900 Microsoft Azure fundamentals ‐ CapEx vs OpEx model</a>
</li>
</ul>
<br /><br /><br /><br />
</html>
<html>
<ul>
<li>Cloud-Computing-Plattform von Microsoft</li>
<li>Konkurrenten:
<ul>
<li>Google App Engine</li>
<li>Elastic Compute Cloud (Amazon)</li>
</ul></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Microsoft_Azure" target=_blank>Wikipedia.de</a></li>
<!--li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li-->
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="http://thedevopspage.com/azurecli-powershell-cheatsheet" target="_blank" rel="noreferrer noopener">
The DevOps Page :: Azure CLI & Powershell ‐ Cheatsheet</a></lI>
</ul>
</html>
<html>
Falls jemand Linux‐VMs unter Microsoft Azure nutzt: <br />
Dort werden stillschweigend OMI-Agenten installiert. Diese haben aber in der ungepatchten Version<br />
vier schwere Sicherheitslücken, die Angreifern die Remote Code-Ausführung mit root-Rechten ermög‐<br />
lichen. Da es keine Update-Mechanismen über Azure gibt, müssen Administratoren selbst prüfen, ob<br />
die OMI-Agenten aktuell sind. #Sicherheit #OMIGOD<br />
<br />
<a href="https://www.borncity.com/blog/2021/09/15/microsoft-azure-schwachstelle-omigod-in-linux-vms-patchen/" target="_blank"
rel="noreferrer noopener">Microsoft Azure-Schwachstelle OMIGOD in Linux VMs patchen</a>
<h3>Links:</h3>
<ul>
<li><a href="https://administrator.de/knowledge/microsoft-azure-schwachstelle-omigod-in-linux-vms-1263307472.html"
target="_blank" rel="noreferrer noopener">IT Administrator :: MS Azure ‐ Schwachstelle OMIGOD in Linux VMS</a></li>
</ul>
</html>
<html>
<h3>Hybrid cloud computing</h3>
<p>
A hybrid cloud is a type of cloud computing that combines on-premises infrastructure ‐ or a private cloud ‐ with a public cloud. Hybrid clouds allow data and apps to move between the two environments.
</p>
<p>
Many organizations choose a hybrid cloud approach due to business imperatives such as meeting regulatory and data sovereignty requirements, taking full advantage of on-premises technology investment, or addressing low latency issues.
</p>
<p>
The hybrid cloud is evolving to include edge workloads as well. Edge computing brings the computing power of the cloud to IoT devices ‐ closer to where the data resides. By moving workloads to the edge, devices spend less time communicating with the cloud, reducing latency, and they are even able to operate reliably in extended offline periods.
</p>
<h3>The benefits of a hybrid cloud platform</h3>
<p>
A hybrid cloud platform gives organizations many advantages ‐ such as greater flexibility, more deployment options, security, compliance, and getting more value from their existing infrastructure. When computing and processing demand fluctuates, hybrid cloud computing gives businesses the ability to seamlessly scale up their on-premises infrastructure to the public cloud to handle any overflow ‐ without giving third-party datacenters access to the entirety of their data. Organizations gain the flexibility and innovation the public cloud provides by running certain workloads in the cloud while keeping highly sensitive data in their own datacenter to meet client needs or regulatory requirements.
</p>
<p>
This not only allows companies to scale computing resources ‐ it also eliminates the need to make massive capital expenditures to handle short-term spikes in demand, as well as when the business needs to free up local resources for more sensitive data or applications. Companies will pay only for resources they temporarily use instead of having to purchase, program, and maintain additional resources and equipment that could remain idle over long periods of time.
Read more about hybrid cloud capabilities and getting started with Azure
</p>
<h3>Advantages of the hybrid cloud</h3>
<ul>
<li>Control ‐ your organization can maintain a private infrastructure for sensitive assets or workloads that require low latency.
<li>Flexibility ‐ you can take advantage of additional resources in the public cloud when you need them.
<li>Cost-effectiveness ‐ with the ability to scale to the public cloud, you pay for extra computing power only when needed.
<li>Ease ‐ transitioning to the cloud doesn't have to be overwhelming because you can migrate gradually ‐ phasing in workloads over time.
</ul>
[…]
<h3>What is a public cloud?</h3>
<p>
Public clouds are the most common type of cloud computing deployment. The cloud resources (like servers and storage) are owned and operated by a third‐party cloud service provider and delivered over the internet. With a public cloud, all hardware, software, and other supporting infrastructure are owned and managed by the cloud provider. Microsoft Azure is an example of a public cloud.
</p>
<p>
In a public cloud, you share the same hardware, storage, and network devices with other organizations or cloud 'tenants,‐ and you access services and manage your account using a web browser. Public cloud deployments are frequently used to provide web-based email, online office applications, storage, and testing and development environments.
</p>
<h3>Advantages of public clouds</h3>
<ul>
<li>Lower costs ‐ no need to purchase hardware or software, and you pay only for the service you use.
<li>No maintenance ‐ your service provider provides the maintenance.
<li>Near-unlimited scalability ‐ on‐demand resources are available to meet your business needs.
<li>High reliability ‐ a vast network of servers ensures against failure.
</ul>
<h3>What is a private cloud?</h3>
<p>
A private cloud consists of cloud computing resources used exclusively by one business or organization. The private cloud can be physically located at your organization's on-site datacenter, or it can be hosted by a third-party service provider. But in a private cloud, the services and infrastructure are always maintained on a private network and the hardware and software are dedicated solely to your organization.
</p>
<p>
In this way, a private cloud can make it easier for an organization to customize its resources to meet specific IT requirements. Private clouds are often used by government agencies, financial institutions, any other mid‐ to large‐size organizations with business-critical operations seeking enhanced control over their environment.
</p>
<h3>Advantages of a private cloud</h3>
<ul>
<li>More flexibility ‐ your organization can customize its cloud environment to meet specific business needs.
<li>More control ‐ resources are not shared with others, so higher levels of control and privacy are possible.
<li>More scalability ‐ private clouds often offer more scalability compared to on-premises infrastructure.
</ul>
[…]
<h3>Related hybrid cloud products and services</h3>
<ul>
<li><b>Azure hybrid cloud solutions</b><br />
Deliver innovation anywhere with Azure across on-premises, multicloud, and the edge</li>
<li><b>Azure Arc</b><br />
Extend Azure services and management to any infrastructure</li>
<li><b>Azure Stack</b><br />
Build and run hybrid apps across datacenters, edge locations, remote offices, and the cloud</li>
<li><b>Azure Hybrid Benefit</b><br />
Migrate your workloads cost-effectively to the best cloud for Windows and SQL Server</li>
<li><b>Azure VMware Solution</b><br />
Seamlessly run VMware workloads across Azure and on-premises environment</li>
<li><b>Azure Sentinel</b><br />
Gain AI-enabled threat protection with a cloud-native SIEM.</li>
<li><b>Azure Defender</b><br />
Protect hybrid cloud workloads against threats with streamlined security</li>
<li><b>Azure ExpressRoute</b><br />
Privately connect on-premises networks to the cloud, and enjoy high speed and reliability</li>
<li><b>Azure VPN Gateway</b><br />
Connect your infrastructure to the cloud and enable remote user access at scale</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://azure.microsoft.com/en-us/overview/what-are-private-public-hybrid-clouds/" target=_blank>Microsoft :: Azur - Überblick “public cloud“ ‐ “hybrid cloud“ ‐ “private cloud“ </a></li>
</ul>
</html>
<html>
Der Grund für das Problem war, dass im <br />
Windows Media Player (WMP) unter <br />
<br />
<b>Organize ⇒ Manage Libraries ⇒ Music</b><br />
<br />
ein Verzeichnis als Default-Verzeichnis angegeben<br />
war, dass so nicht (mehr) existierte. Es wurde auf<br />
eine Festplatte (hier: USB-Stick) verwiesen, aber<br />
diese Festplatte existierte so nicht (mehr).<br />
<br />
Nachdem ich den Eintrag mit dem Default-Verzeichnis<br />
gelöscht hatte, funktionierte das Rippen von CDs<br />
wieder.<br />
<br />
<h3>Link:</h3>
<a href="https://answers.microsoft.com/en-us/windows/forum/windows_7-pictures/cd-wont-rip-using-windows-media-player-in-windows/96afeb65-4a6d-4559-af83-c9b52e42a938" target=_blank>Microsoft Community :: Cd won't rip using Windows Media Player in windows 7</a>
</html>
<html>
<ul>
<li><b><em>Windows Hello</em></b> ist eine neue Funktion in Windows 10, die es Benutzern ermöglicht,<br />
sich mit biometrischer Authentifizierung (Finger, Gesicht) am Betriebssystem anzu‐<br />
melden.</li>
<br />
<li>Windows Hello ist eine persönlichere und sicherere Methode, um per Fingerabdruck,<br />
Gesichtserkennung oder einer sicheren PIN sofortigen Zugriff auf Ihre Windows-10-<br />
Geräte zu erhalten. Die meisten PCs mit Fingerabdruckleser funktionieren bereits mit<br />
Windows Hello und machen die Anmeldung am PC einfacher und sicherer.</li>
</ul>
<h3>Links:</h3>
<ul>
<li>https://www.youtube.com/watch?v=qrJ0SlP8L08</li>
<li>https://www.youtube.com/watch?v=GYmN1x-OnFE</li>
<li>https://de.minitool.com/nachrichten/windows-hello-deaktivieren.html</li>
<li>https://docs.microsoft.com/en-us/windows-hardware/design/device-experiences/windows-hello-face-authentication</li>
</ul>
</html>
<html>
<ul>
<li><b>Mimikry</b><br />
<ul>
<li>Bates'sche Mimikry, 1862</li>
<li>ein harmlosess Lebewesen gibt sich <br />
als ein wehrhaftes o. ungenießbares<br />
Lebewesen aus.</li>
</ul></li>
<li><b>Mimese</b><br />
bezeichnet die Fähigkeit, sich in Farbe<br />
und Gestalt an die Umgebung anzupassen</li>
<li><b>Blaumeise:</b> <br />
Bei Gefahr ihres Nestes zischt sie wie eine<br />
Schlange → akustisches Mimikry</li>
<li><b>Birkenspanner:</b><br />
Industriemelanismus<br />
→ Durch Industrie und der damit einhergehenden <br />
Umweltverschmutzung wurden die Bäume (resp. <br />
deren Rinde) schwarz<br />
→ die hellen Birkenspanner wurden schneller von<br />
ihren Fressfeinden “gefunden“ als die dunkleren<br />
→ Ergebnis: <br />
Die dunkelfarbenen Birkenspanner überlebten</li>
<li><b>Chamelions:</b><br />
Sie wechslen ihre Farbe nicht nur bei Gefahr, sondern<br />
auch als Temperaturregelung und zur Kommunikation</li>
</ul>
</html>
<html>
<p>
Wenn das Mindesthaltbarkeitsdatum abgelaufen ist, müssen Sie nicht alle Lebensmittel sofort wegwerfen. Wir zeigen Ihnen, welche Lebensmittel auch nach dem Ablauf noch gut genießbar sind. Beachten Sie jedoch: Wenn Lebensmittel schimmeln, sollten Sie diese am besten wegwerfen. Es reicht oft nicht aus, die Stellen nur herauszuschneiden. Ausnahmen bilden natürlich Produkte wie der Schimmelkäse.
</p>
<p>
<ul>
<li><b>Brot:</b><br />Sie können Brot auch nach Ablauf des Mindesthaltbarkeitsdatums noch essen. Am längsten hält sich Brot am Stück. Lagern Sie es am besten trocken, zum Beispiel in einem passenden Brotkasten.</li>
<li><b>Müsli, Getreide und Nüsse:</b><br />Auch diese Produkte sind nach dem Mindesthaltbarkeitsdatum noch genießbar, meist noch mehrere Monate lang. Alle Produkte sollte dafür trocken gelagert werden, wie zum Beispiel in einem Schrank oder in der Abstellkammer.</li>
<li><b>Eier:</b><br />Sie können Eier meist noch gut zwei Wochen nach dem Ablauf des Mindesthaltbarkeitsdatums benutzen. Sind Sie sich unsicher, machen Sie den Ei-Test. Eier bleiben gekühlt am längsten frisch.</li>
<li><b>Mehl, Reis und Nudeln:</b><br />Diese Lebensmittel sind noch gut und halten sich lange, wenn Sie trocken und im Dunkeln gelagert werden. Dann können Sie sie häufig noch nach mehreren Monaten unbedenklich verzehren.</li>
<li><b>Milch:</b><br />Sie sollten Milch maximal drei Tage nach Ablauf des Mindesthaltbarkeitsdatums öffnen und verzehren. Auch geöffnete H-Milch ist nur rund eine Woche gekühlt haltbar, frische Milch maximal drei Tage.</li>
<li><b>Wurst:</b><br />Meist können Sie Wurst noch ein paar Tage nach dem Mindesthaltbarkeitsdatums essen. Achten Sie jedoch darauf, die Wurst im Kühlschrank zu lagern. Schlechte Wurst erkennen Sie am Geruch und an der dunkleren Farbe.</li>
<li><b>Käse und Joghurt:</b><br />Viele Milchprodukte sind noch ein paar Tage nach Ablauf des Mindesthaltbarkeitsdatums haltbar. Essen Sie diese allerdings auch nur, wenn sich der Deckel nicht nach außen wölbt. Milchprodukte sollten Sie immer kühl lagern.
Marmelade und Aufstriche: Wenn der Zuckeranteil hoch ist, hält sich Marmelade länger. Nach dem Öffnen gehört Marmelade übrigens auch immer in den Kühlschrank.</li>
</ul>
</p>
<h3>Bei diesen Lebensmitteln ist das Mindesthaltbarkeitsdatum besonders wichtig</h3>
<p>
Es gibt einige Lebensmittel, die Sie keinesfalls nach Ablauf des Mindesthaltbarkeitsdatums verzehren sollten. Wir zeigen Ihnen, welche das sind:
</p>
<p>
<ul>
<li><b>Fleisch, Fisch und Geflügel:</b><br />Hier sollten Sie das sogenannte Verbrauchsdatum einhalten, ansonsten laufen Sie Gefahr, sich zu vergiften.</li>
<li><b>Obst und Gemüse:</b><br />Alle wasserhaltigen Lebensmittel werden schnell schlecht. Dazu zählen vor allem Obst und Gemüse. Sortieren Sie verfaulte Lebensmittel entweder aus oder werfen Sie diese direkt weg. Bei Schimmelbefall sollten Sie Obst und Gemüse keinesfalls verzehren.</li>
<li><b>Grundsätzlich gilt:</b><br />Alles, was von Schimmel befallen ist, sich wie bei Konserven nach oben wölbt oder Ihnen komisch vorkommt, sollten Sie nicht mehr essen. Achten Sie unbedingt auf Ihr eigenes Bauchgefühl. Selbst wenn das Mindesthaltbarkeitsdatum etwas anderes sagt und Sie das Gefühl haben, dass etwas schlecht ist, werfen Sie es lieber weg.<br /> Vorsicht: Schimmelpilze lassen sich nicht durch Kochen, Backen oder Einfrieren bekämpfen. </li>
</ul>
</p>
<h3>Links:</h3>
<ul>
<h4><a href="https://praxistipps.focus.de/mindesthaltbarkeitsdatum-abgelaufen-was-ist-noch-gut_40078" target="_blank" rel="noreferrer noopener">Focus Online :: Mindesthaltbarkeitsdatum abgelaufen ‐ Was ist noch gut?</a></h4></ul>
</ul>
</html>
<html>
<ul>
<li><details><summary>Version abfragen: <b>‐‐version</b></summary>
<code><pre>
$ <b>mongo ‐‐version</b>
MongoDB shell version v4.4.11
Build Info: {
"version": "4.4.11",
"gitVersion": "b7530cacde8432d2f22ed506f258ff9c3b45c5e9",
"openSSLVersion": "OpenSSL 1.1.1n 15 Mar 2022",
"modules": [],
"allocator": "tcmalloc",
"environment": {
"distmod": "ubuntu2004",
"distarch": "x86_64",
"target_arch": "x86_64"
}
}</pre></code>
</details>
</li>
<br />
<li><details><summary>Daten importieren:<br />
<code><pre>$ mongoimport ‐‐file <em>PathToFile/FileToImport</em> ‐‐collection aircraft ‐‐db flightmgmt ‐‐drop \ <br /> ‐‐username mongouser -p <em>PasswordOfUser</em> ‐‐authenticationDatabase admin</pre></code>
</summary>
Beispielausgabe:
<code><pre>2022-06-12T20:15:57.504+0200 connected to: mongodb://localhost/
2022-06-12T20:15:57.504+0200 dropping: flightmgmt.aircraft
2022-06-12T20:15:58.508+0200 9 document(s) imported successfully. 0 document(s) failed to import.
</pre></code>
</li>
<li>Einloggen in die Mongo DB:
<code><pre>$ mongo ‐u mongouser ‐p ‐‐authenticationDatabase admin</pre></code></li>
</li>
<li>Liste aktueller User anzeigen:
<code><pre>> db.getUsers()</pre></code></li>
<li><details><summary>User in DB anlegen:</summary>
<code><pre>
> use admin
> db.createUser(
{
user: "mongouser",
pwd: passwordPrompt(),
roles: [ { role: "userAdminAnyDatabase", db: "admin" }, "readWriteAnyDatabase" ]
}
)
Enter password: # das Passwort war nicht zu sehen
Successfully added user: {
"user" : "mongouser",
"roles" : [
{
"role" : "userAdminAnyDatabase",
"db" : "admin"
},
"readWriteAnyDatabase"
]
}
</pre></code></li>
<br />
<li>Password eines User ändern:
<code><pre>> db.changeUserPassword(“<em><UserName></em>“, “<em><Password></em>“)</pre></code>
</li>
<li>Vorhandene Databanken auflisten:
<code><pre>> db</pre></code>
<li>
<li>
<code><pre>> db</pre></code>
<li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.tutorialspoint.com/how-to-change-the-password-in-mongodb-for-existing-user" target="_blank" rel="noreferrer noopener">Tutorialspoint :: MongoDB - Change User Password</a></li>
<li><a href="https://www.mongodb.com/docs/database-tools/" target="_blank" rel="noreferrer noopener">MongoDB :: Database Tools</a></li>
<li><a href="https://www.mongodbtutorial.org/" target="_blank" rel="noreferrer noopener">MongoDB :: Tutorial</a></li>
</ul>
</html>
<html>
<ul>
<li><h3>Download:</h3>
<a href="https://www.mongodb.com/try/download/community" target="_blank" rel="noreferrer noopener">Mongo DB - Community</a><br />
→ <ul>
<li>Version: 5.0.9</li>
<li>Plattform: Debian 11.0</li>
<li>deb‐Paket: mongodb-org-shell_5.0.9_amd64.deb</li>
</ul>
<br />
⇒ Diese Version hat nur Probleme gemacht. Dann nach <br />
  <a href="https://stackoverflow.com/questions/68598164/ubuntu-18-04-mongodb-5-0-install-code-dumped-signal-ill" target="_blank" rel="noreferrer noopener">StackOverflow</a> vorgegangen und die Version 4.4.11<br />
  erfolgreich über die 5er Version installiert.<br />
<br />
Auf der Seite <a href="https://programming.vip/docs/fault-analysis-mongodb-5.0-error-reporting-and-legal-instruction-solution.html" target="_blank" rel="noreferrer noopener">Programming VIP :: Fault analysis ‐ MongoDB 5.0 error reporting and legal instruction solution</a><br />
ist das alles gut beschrieben. Die Quintissenz ist: Die Version 5 benötigt eine(n) bestimmte(n) (Art von) Chip(s):<br />
<em>“… the installation of mongodb version 5.0 really depends on the CPU supporting AVX instruction set …“</em><br />
[AVX := Advanced Vector Extensions ]
</ul>
</li>
<li><h3>Installation:</h3>
mittels apt‐get:
<code><pre>
sudo apt-get install ‐y ‐‐allow‐downgrades mongodb-org=4.4.11 mongodb-org-server=4.4.11 mongodb-org-shell=4.4.11 mongodb-org-mongos=4.4.11 mongodb-org-tools=4.4.11
</pre></code>
</li>
<li><h3>Vorbereitungen:</h3>
Um die Mongo DB benutzen zu können, muss sie “<em>up & running</em>“ sein:<br />
<ul>
<li>sudo systemctl start mongod</li>
<li>sudo systemctl enable mongod</li>
</ul>
Die Datenbank hört immer über Port 27017.<br />
</li>
<li><h3>Infos: MongoDB shell client</h3>
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDB's native replication and automated failover enable enterprise-grade reliability and operational flexibility.<br />
<br />
MongoDB is an open-source database used by companies of all sizes, across all industries and for a wide variety of applications. It is an agile database that allows schemas to change quickly as applications evolve, while still providing the functionality developers expect from traditional databases, such as secondary indexes, a full query language and strict consistency.<br />
<br />
MongoDB has a rich client ecosystem including hadoop integration, officially supported drivers for 10 programming languages and environments, as well as 40 drivers supported by the user community.<br />
<br />
MongoDB features:
<ul>
<li>JSON Data Model with Dynamic Schemas</li>
<li>Auto-Sharding for Horizontal Scalability</li>
<li>Built-In Replication for High Availability</li>
<li>Rich Secondary Indexes, including geospatial</li>
<li>TTL indexes</li>
<li>Text Search</li>
<li>Aggregation Framework & Native MapReduce</li>
</ul>
This package contains the mongo shell.
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.mongodb.com/try/download/community" target="_blank" rel="noreferrer noopener">Mongo DB - Community</a></li>
<li><a href="https://programming.vip/docs/fault-analysis-mongodb-5.0-error-reporting-and-legal-instruction-solution.html" target="_blank" rel="noreferrer noopener">Programming VIP :: Fault analysis ‐ MongoDB 5.0 error reporting and legal instruction solution</a></li>
<li><a href="https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-debian/" target="_blank" rel="noreferrer noopener">Mongo DB - Installation MongoDB on Debian</a></li>
</ul>
</html>
<html>
One of the popularly known method of breaking into a Unix host<br>
is by inserting a uid value 0 in the /etc/passwd file which could<br>
be done in many ways including backdoors for later accesses .<br>
<br>
The script below displays warning messages on the console if<br>
such changes a detacted. Simply place the script in the crontab<br>
and run as frequent as you wish.<br><br>
<code>
------------------------------CUT HERE-----------------------------------------<br>
<br>
for id in `awk 'FS=":" {if(($3 == 0 && $1 != "root" )) print $1}' /etc/passwd`<br>
do<br>
cat << the_end >/dev/console<br>
<br>
+----------------------------------------------------------------<br>
|<br>
| `date "+Detacted On Date :%D Time :%r"`<br>
| Break-in ALERT! Login ID `echo ${id}` has uid 0<br>
|<br>
+----------------------------------------------------------------<br>
<br>
the_end<br>
done<br>
------------------------------CUT HERE-----------------------------------------<br>
</code>
</html>
<html>
To edit a file after looking at it with "more"<br />
Press the letter "v" key and you will be placed<br />
in a vi session.<br />
<br />
Quitting the vi session will bring you back<br />
to viewing the file with the "more" command<br />
<br />
This will not work with piping a file to "more".<br />
<br />
This works:<br />
<br />
<code>
$ more /etc/hosts<br />
</code>
<br />
This does not:<br />
<br />
<code>
$ cat /etc/hosts | more<br />
</code>
<br />
</html>
<html>
<table>
<tr align="center"><td>A</td><td>· ‐</td></tr>
<tr align="center"><td>B</td><td>‐ · · ·</td></tr>
<tr align="center"><td>C</td><td>‐ · ‐ ·</td></tr>
<tr align="center"><td>D</td><td>‐ · ·</td></tr>
<tr align="center"><td>E</td><td>·</td></tr>
<tr align="center"><td>F</td><td>· · ‐ ·</td></tr>
<tr align="center"><td>G</td><td>‐ ‐ ·</td></tr>
<tr align="center"><td>H</td><td>· · · ·</td></tr>
<tr align="center"><td>I</td><td>· ·</td></tr>
<tr align="center"><td>J</td><td>· ‐ ‐ ‐</td></tr>
<tr align="center"><td>K</td><td>‐ · ‐</td></tr>
<tr align="center"><td>L</td><td>· ‐ · ·</td></tr>
<tr align="center"><td>M</td><td>‐ ‐</td></tr>
<tr align="center"><td>N</td><td>‐ ·</td></tr>
<tr align="center"><td>O</td><td>‐ ‐ ‐</td></tr>
<tr align="center"><td>P</td><td>· ‐ ‐ ·</td></tr>
<tr align="center"><td>Q</td><td>‐ ‐ · ‐</td></tr>
<tr align="center"><td>R</td><td>· ‐ ‐</td></tr>
<tr align="center"><td>S</td><td>· · ·</td></tr>
<tr align="center"><td>T</td><td>‐</td></tr>
<tr align="center"><td>U</td><td>· · ‐</td></tr>
<tr align="center"><td>V</td><td>· · · ‐</td></tr>
<tr align="center"><td>W</td><td>· ‐ ‐</td></tr>
<tr align="center"><td>X</td><td>‐ · · ‐</td></tr>
<tr align="center"><td>Y</td><td>‐ · ‐ ‐</td></tr>
<tr align="center"><td>Z</td><td>‐ ‐ · ·</td></tr>
<tr></tr>
<tr align="center"><td>SOS</td><td>· · · ‐ ‐ ‐ · · ·</td></tr>
</table>
</html>
<html>
If you want to mount an ISO 9660 CDROM on HP-UX<br />
or a ISO 9660 CDROM with RockRidge Interchange <br />
Format you have to start pfs_mountd and pfsd.<br />
<br />
<code>
# /usr/sbin/pfs_mountd &<br />
[3] 1969<br />
# /usr/sbin/pfsd &<br />
[4] 1970<br />
</code>
<br />
Edit or create the file /etc/pfs_fstab:<br />
<br />
<code>
/dev/dsk/c0t4d0 /ISO_CDROM pfs-iso9660 xlat=unix 0 0<br />
/dev/dsk/c0t4d0 /ISO_RR_CDROM pfs-rrip xlat=unix 0 0<br />
</code>
<br />
Create the dirs, if they don't exist:<br />
<br />
<code>
# ls -dl /ISO*<br />
drwxr-xr-x 2 root root 4 Apr 2 20:44 ISO_CDROM<br />
drwxr-xr-x 2 root root 4 Apr 2 20:44 ISO_RR_CDROM<br />
</code>
<br />
Now it is easy to mount ISO CDROMs:<br />
<br />
<code>
# pfs_mount /ISO_CDROM<br />
# ls -l /ISO_CDROM<br />
drwxr-xr-x 2 root root 4488 May 6 1988 cdsample<br />
# pfs_umount /ISO_CDROM<br />
</code>
<br />
Or with long filenames:<br />
<br />
<code>
# pfs_mount /ISO_RR_CDROM<br />
# ls -l /ISO_RR_CDROM<br />
-r--r--r-- 1 root root 4488 Nov 5 19:00 Copyright<br />
dr-xr-xr-x 2 root root 1469 Oct 13 19:01 pictures_from_susi<br />
</code>
<br />
This tip generously supported by:<br />
tomschit@ti-voyager.fbe.fh-weingarten.de<br />
</html>
<html>
Here is another way to move files around.<br>
<br>
Sometimes you find yourself wanting to <br>
move a bunch of files into a new directory <br>
that is to be created in the current working <br>
directory.<br>
<br>
Rather than using a temporary directory, <br>
or grep and variable substitution, use a <b>subshell</b>:<br>
<code><b>$( \\ls; echo dir; mkdir dir ) | xargs mv</b></code><br>
<br>
The trick is in using a subshell <b>$( … ) </b> to run a <br>
number of commands _before_ the output is <br>
piped to xargs. This idiom is also useful for<br>
plenty of other applications.<br>
<br>
*Zusatz*<br>
Es mußten bestimmte Files in ein anderes<br>
Verzeichnis verschoben werden:<br>
<pre><code>find . -name "*MLC*" -print | xargs -i mv {} ~/Documents/Attached_Documents_13052010/</code></pre>
<table>
<tr><th>Option</th><th>Description</th></tr>
<tr><td>-n #</td><td>Execute command once for every # argument. For example, -n2 bundles
arguments into groups of two or less and executes command on each argument
bundle</td></tr>
<tr><td>-l #</td><td>[kleines "L"]<br /> Execute command once for every # lines of input. For
example, -l1 creates a bundle of arguments for every one line of input and
executes command on each argument bundle.</td></tr>
<tr><td> -I <i>replace-str</i></td><td>[grosses "i"] <br />Replace occurrences of replace-str in the
initial-arguments with names read from standard input. Also, unquoted blanks
do not terminate input items; instead the separator is the newline character.
Implies -x and -L 1.<br />Bsp: xargs -I % curl http://example.com/persons/%.tar<br>
dh. jedes Vorkommen von "%" wird ersetzt ("%" steht für ein File)</td></tr>
<tr><td>-i</td><td>[deprecated (openSuSE)] <br />Normally xargs places input arguments at the
end of command. Used with the -i option, xargs will replace all instances of
{} with input arguments. You need to put them in single brackets or use a
backslash (\\) before each bracket to keep the shell from interpreting the
special characters</td></tr>
<tr><td>-t</td><td>"test", echo each command before executing. Nice for debugging</td></tr>
<tr><td>-p</td><td> "prompt", Prompts the user before executing each command. Useful for
debugging.</td></tr>
</table>
(Quelle: <a href="http://www.softpanorama.org/Tools/xargs.shtml" target=_blank>SoftPanorama :: xargs</a>)
</html>
<html>
<ul>
<li><a href="http://math-www.uni-paderborn.de/~walter/teachingWS03_04/"> http://math-www.uni-paderborn.de/~walter/teachingWS03_04/ </a></li>
<br />
<li>s. auch Word-Dokument "MuPAD erlernen" im Ordner "MuPAD"</li>
<br />
<li>wurde 2008 (?) von MathLab übernommen</li>
</ul>
</html>
<html>
To see what someone logged in as root is running,<br />
if root's shell uses .sh_history ( ksh, for example ) do:<br />
<pre><code>
# tail -f /.sh_history
</code></pre>
This is good in multi-Sysadm environments when you want to<br />
get an idea of what another admin is doing to fix something.<br />
</html>
<html>
This Tip will show one of the ways to update<br>
multiple systems with one script unattended:<br>
<br>
There are a variety of ways to accomplish this,<br>
but this one requires NO update to the remote<br>
systems except for the files you wish to update<br>
(i.e. - no update to .rhosts or hosts.equiv<br>
type files). I use an ftp macro as follows:<br>
<br>
<code>
------------------------------- CUT HERE ---------------------------<br>
<br>
#!/bin/ksh<br>
#<br>
# program: update-all-workstations<br>
# purpose: To ensure that all workstations have the same update of<br>
# specific programs.<br>
#<br>
# notes: We run a ping command also to see if host is alive<br>
# before we try to do the updates.<br>
#<br>
hosts=`ypcat hosts | grep col[d-f] | awk '{print $2}'`<br>
for host in $hosts<br>
do<br>
alive=`ping -v $host 1 | awk '{print $3}'`<br>
if [ $alive = "alive" ];<br>
then<br>
echo $host >> live-hosts<br>
else<br>
echo $host >> dead-hosts<br>
fi<br>
done<br>
<br>
# This next sequence is totally unneeded if all workstations have a .rhosts<br>
# file that allows the server (or system running this script) root access.<br>
# If .rhosts is used, eliminate the prompting for the password and the<br>
# building of the .netrc file.<br>
#<br>
# This next line assumes that ALL workstations have the same password<br>
# If this is not the case, then administration becomes somewhat more<br>
# cumbersome. Move the following 2 lines down to below the next do statement<br>
# if the password differs from workstation to workstation.<br>
echo "Please enter the root password for the workstations:\c"<br>
read password<br>
for host in `cat live-hosts`<br>
do<br>
echo "machine $host login root password $password" > $HOME/.netrc<br>
chmod 600 $HOME/.netrc<br>
echo "macdef init" >> $HOME/.netrc<br>
echo "prompt" >> $HOME/.netrc<br>
echo "binary" >> $HOME/.netrc<br>
echo "put /tmp/myfiles.tar /tmp/myfiles.tar" >> $HOME/.netrc<br>
echo "close" >> $HOME/.netrc<br>
echo "quit" >> $HOME/.netrc<br>
echo "\n\n" >> $HOME/.netrc<br>
<br>
# these next few steps may seem redundant, but they are necessary.<br>
# if you are using a .netrc file, it must be whacked after the ftp and<br>
# before the rexec command<br>
<br>
rm $HOME/.netrc<br>
echo "machine $host login root password $password" > $HOME/.netrc<br>
chmod 600 $HOME/.netrc<br>
rexec $host "cd /usr/local; tar xvf /tmp/myfiles.tar"<br>
done<br>
<br>
# End of this script<br>
#################################################################<br>
</code>
<br>
Now, if you are using .rhosts files, the whole process becomes much<br>
simpler.<br>
<br>
Lets examine a script would look like if we are using .rhosts files on<br>
each workstation to allow the server or UNIX admin workstation to have <br>
root access.<br>
<br>
<code>
---------------------------- CUT HERE -----------------------------<br>
<br>
#!/bin/ksh<br>
#<br>
# program: update-using-rhosts<br>
# purpose: To ensure that all workstations have the same update of<br>
# specific programs.<br>
#<br>
# notes: We run a ping command also to see if host is alive<br>
# before we try to do the updates.<br>
#<br>
hosts=`ypcat hosts | grep col[d-f] | awk '{print $2}'`<br>
for host in $hosts<br>
do<br>
alive=`ping -v $host 1 | awk '{print $3}'`<br>
if [ $alive = "alive" ];<br>
then<br>
echo $host >> live-hosts<br>
else<br>
echo $host >> dead-hosts<br>
fi<br>
done<br>
<br>
for host in `cat live-hosts`<br>
do<br>
<br>
# first we do a tar archive to standard out, then pipe to rsh to the<br>
# host, make # sure we are in the root directory, then tar extract from<br>
# standard in<br>
<br>
tar cvf - ./usr/local/bin | rsh $host "cd /; tar xvf -"<br>
done<br>
<br>
# End of this script<br>
</code>
<br>
Obviously the second method is easier, but obviously it depends on your<br>
site characteristics on which you would use.<br>
<br>
If you need assistance with these types of scripts, I will assist you,<br>
but keep in mind, I accept no responsibility for anything that<br>
happens to you or your site due to the use of these scripts.<br>
Only an experienced admin should attempt to use these scripts, and<br>
you should always have the appropriate safety precautions in<br>
place.<br>
<br>
James A. (Jamie) Dennis <br>
james.a.dennis@ameritech.net<br>
<br>
</html>
<html>
• ähnlich deutschen Kommunalanleihen;<br />
die Stadt legt eine Anleihe auf, um bestimmte Projekte<br />
zu finanzieren.<br />
</html>
<html>
Supervisor <br />⇒ Gruppe auswählen <br />⇒ Tab “MLC“ auswählen<br />
⇒ “No Contribution“ auswählen <br />⇒ abspeichern
</html>
<html>
Murex offers 2 ways to open trades from the trade query:<br>
<h2>a. SPACE BAR (→ write mode)</h2>
you can select the trade and press space bar, in this case the system<br>
will lock the trade and open it in WRITE mode, so the user is able to<br>
change some values of the trade;<br>
<br>
locking the trade means, no other user is able to open the trade in<br>
WRITE mode and also the application is not able to complete its pro-<br>
cess (like P&L acceptance etc.);<br>
<h2>b. OPEN (→ read only)</h2>
the system offers also another option to just open the trade, therefore<br>
select the trade, right click and select "Open (read only)";<br>
<br>
the system will open the trade now in READ mode only, the trade will<br>
not be locked and the application is able to complete its processes;<br>
<br>
We stronly recommend to use method 2 (Open in READ mode), other-<br>
wise the trade will be locked. (To ease your life we try to add a short<br>
code "Ctrl-O" to open trades).<br>
<br>
--> s. <i>Murex - Adding short code</i><br>
<br>
</html>
<html>
<ul>
<li>als User “ADMIN“ einloggen</li>
<li>→ das nächste GUI‐Fenster zeigt nur zwei<br />
Icons an:
<ul>
<li>User Home</li>
<li>Change Password</li>
</ul></li>
<li>→ Fokus auf “User Home“</li>
<li>→ Auflistung der User's Gruppen, wie z.B. Config, <br />
Housekeep, Licadmin & Useradmin (und deren jeweiliger Typ)</li>
<!--li></li-->
</ul>
</html>
<html>
<ol>
<li>Überprüfung, ob das logsegment vollgelaufen ist<br />
→ Aufruf <b>“<code>dump tran with no_log</code>“</b></li>
</ol>
</html>
<html>
<table border = "1">
<tr>
<td> OSP</td>
<td> <i>One Stop Processing</i><br> im Workflow Manager </td>
</tr>
</table>
</html>
<html>
<ul>
<li>Ablageort ist auf lokalem Rechner</li>
<li>z.B. im Verzeichnis<br />
<code><b>C:\<u><em>Programme(x86)\Murex</em></u>\Test\FITS\murex05\<u><em>Mx3</em></u></b></code><br />
(die unterstrichenen “Abschnitte“ sind IMHO die überall vorkommenen Verzeichnisse)</li>
</ul>
</html>
<html>
<h3> Aufruf des “Adapt Data Modell“ aus dem RichClient heraus</h3>
RichClient<br />
→ Install Session<br />
→ Custom Installation<br />
→ bei “Murex“ den Punkt “uncheck all"“ auswählen bzw. “Uncheck Sub tree items“<br />
→ <img src="./pictures/RichClient_AdaptDataModell_1.png" width=956 height=306><br />
→ oben “adapt“ eingeben<br />
<img src="./pictures/RichClient_AdaptDataModell_2.png" width=956 height=620><br />
</html>
<html>
To add a short code (e.g. Ctrl-O) to the application to open trades:
<code><pre>
<Accelerator MenuCode="1000010" KeyCode="79" KeyModifiers="2"> Open (read only) </Accelerator>
</pre></code>
to the file <b><em><Base-Dir></em>/app/murexacc.xml</b>.
</html>
<html>
GUI ‐ Markets
<p style="text-indent:2.5em;"> → Volatilities (Murex‐interne Bezeichnung: fxvl)</p>
<p style="text-indent:2.5em;"> → CurrencyPair auswählen/markieren</p>
<p style="text-indent:2.5em;"> → Space‐Taste drücken</p>
<p style="text-indent:2.5em;"> → Anzeigen der FX-Smiles (Pillars ?)</p>
</html>
<html>
Config-Session<br />
→ Data extraction<br />
→ Datamart ‐<br />
→ Datamart setup (tables definition and mapping)<br />
<br />
⇒ folgende View erscheint:<br />
<br />
<em>Sreenshot - was für einer?</em><br>
<br />
Hier sind (anscheinend) die einzelnen Tabellen mit ihren Feldern und deren<br />
Charakteristika definiert und aufgelistet<br />
</html>
<html>
<ul>
<li>In der BreakClause sind Datumsangaben hinterlegt. An diesen<br />
Tagen kann der Deal beendet werden ("Brechen der Laufzeit").<br />
Dazu wird (in einem Report) einige Tage vorher dieser Trade <br />
angezeigt.</li>
<br />
<li>Die BreakClauses sind zu finden im:<br />
<ul>
<li>Trade</li>
<li>⇒ Tab "Characteristics"</li>
<li>⇒ Eintrag "Flex" bzw. "Exotic"</li>
</ul></li>
</ul>
</html>
<html>
<ul>
<li>Um die Titelzeile einer Murex Client-Session zu setzen,<br />
gibt es zwei Möglichkeiten:
<ul><li><b>global:</b>
<ul>
<li>auf dem Murex-FS-/App-Server einloggen;</li>
<li>in das Verzeichnis /murex/<i><ENV></i>/mx3/public/code/client wechslen</li>
<li>die Datei <i>client.xml</i> öffnen</li>
<li>den Eintrag <code><Title Name="…"/></code> anpassen & abspeichern</li>
<li>die Murex-Umgebung (Server) stoppen & starten</li>
</ul>
<br />
<li><b>local:</b>
<ul>
<li>im Verzeichnis z.B. <code>C:/Programme (x86)/Murex/UAT/FITS/3.1.32/MxG</code> …</li>
<li>… und das File <code>client.xml</code> öffnen</li>
<li>im Feld <code><Screen> → <Title> → <Text></code> <br />
die Textzeile eingeben</li>
<li> in den Tags <code><MainBar><Title></code> kann man auch den Title eingeben</li>
</ul></li>
</ul>
</li>
</ul>
</html>
<html>
- provided by Murex<br>
<br>
- a tool as means of monitoring and controlling Murex processes / services<br>
<ul type="a">
<li><h3>Accessing Monit</h3>
<br>
- start via double‐click on monit.cmd<br>
<br>
- user account & password is that from the murex client (single-sign on)<br>
<br>
<img src="./pictures/monit01.jpg" alt=""><br>
<br>
- after a few seconds a screen with the main categories of services will show up:<br>
<br>
[[Include::Image::monit02.jpg]]<br>
</li>
<br>
<li><h3>Resetting password</h3>
<br>
- after logging into the monit tool chose from the main menue "Tools" → "Password generator"',<br>
<br>
[img[http://wikitext.tiddlyspace.com/fractalveg.jpg]]
</li>
</ul>
</html>
<html>
Wenn man z.B. die Ausgabe der “Batch execution list“ komplett<br />
in z.B. ein Excel-Sheet bringen will, so ist die Tastenkombination<br />
<code><b>Ctrl ‐ Shift ‐ C</b></code><br />
anzuwenden.<br />
</html>
<html>
Murex unterstützt 8k page size für die Datenbanken <b><u>nicht</u></b><br />
(ergo: nur 4k).<br />
Wenn es Probleme mit dynamischen Tabellen gibt, dann <br />
soll man sich zur Optimierung seiner Abfrage an Murex<br />
wenden.
</html>
<html>
Login in ein MX-Session (Config-Session), dann<br>
<br>
DataExtraction → Datamart → Import/Export (z.B. "Import" auswählen) → <br>
<br>
<img src="./pictures/datamart-01.png" alt="Selecting source">
<br>
Das Verzeihnis angeben, in dem die zu importierenden Files zu <br>
finden sind ("Path").<br>
<br>
Das Default-Verzeichnis ist <b><code><i><ENV></i>/app/reporting/public/batches</code></b>, dh. die<br>
Verzeichnisstruktur beginnt unter <b><code><i><ENV></i>/app/reporting</code></b>.<br>
<br>
Dann auf "Proceed" drücken:<br>
<img src="./pictures/datamart-02.png" alt="Action">
<br>
(+ the other tabs of course)<br>
<br>
Im Verzeichnis "reporting/public" gibt es dann Unterverzeichnisse wie:<br>
batches ==> Tab "Datamart items"<br>
dapscripts/clients ==> Tab "Datamart batches"<br>
datamartsetup ==> Tab "Datamart setup"<br>
links<br>
rightstemplates ==> Tab "Rights templates"<br>
sets ==> ?? Tab "Datamart batches" ??<br>
und weitere ...<br>
(eine endgültige Zuordnung konnte ich bis jetzt nicht erstellen, nicht<br>
genügend Infos)<br>
<br>
in denen dann die Reportfiles (*.xml) zu finden sind.
</html>
<html>
Config-Session <br />
⇒ Infrastructure <br />
⇒ Processing center<br />
⇒ Scripts definition<br />
⇒ <b>ProcessingScript</b> (PS-Script, z.B. C_E_TP_EU_PS)<br />
<br />
Zu einem PS-Script gehören:<br />
<ul>
<li>ein PS-File (z.B. c_e_tpeu.xml)</li>
<li>ein Header-File (z.B. c_e_tpeu_header.xml)</li>
</ul>
zur Verfügung stehende Units: <br />
<ul>
<li>DATAMART.REPORTING.BATCHES.FEEDERS</li>
<li>DATAMART.REPORTING.BATCHES.TABLES</li>
</ul>
<br />
Das PS-Script ruft auf:<br />
<ul>
<li><b>Batches of table feeders ('BF')</b><br />
→ Data extraction <br />
→ Datamart <br />
→ Batches of table feeders (z.B. als Parameter C_E_TPEU_BF)</li>
<br />
<li><b>Batches of datamart extractions ('BE')</b><br />
verwendet ein (oder mehrere) SQL-Statement(s)</li>
</ul>
</html>
<html>
z.B. aus "Display batch status'"<br />
<ul>
<li>Daten markieren: Ctrl ‐ a</li>
<br />
<li>Daten kopieren: Ctrl + Shift ‐ v</li>
</ul>
</html>
<html>
Mit den folgenden SQL-Statements kann man das jeweilige Datum in der DB überprüfen:<br>
<br>
<h3>Entity Date</h3>
select 'ENTITY', M_LABEL, M_PCG_DATE<br />
from mxcuser.TRN_ENTD_DBF
<h3>Front Office Date</h3>
select 'FO', M_LABEL, M_DATE <br />
from mxcuser.TRN_PLCC_DBF<br>
where M_LABEL in ('???')
<h3>Middle Office Date</h3>
select 'MO', M_LABEL, M_DATE<br />
from mxcuser.TRN_PLCC_DBF
<h3>Accounting Date</h3>
select 'ACCOUNTING', M_LABEL, M_ACC_DATE <br />
from mxcuser.TRN_ENTD_DBF
<h3>Reporting Date</h3>
select 'REPORTING DATE', M_DATE_REP <br />
from mxcuser.PROCESS#PS_DATE_DBF;<br>
<br>
Als einziges Datum kann dieses Datum bei Bedarf zurückgesetzt werden:<br>
CONFIG-Session → Data extraction → Datamart → Initialize reporting date
<h3>Back Office Date</h3>
select 'BO', M_DATE from <br />
mxcuser.TRN_PC_DBF;<br>
</html>
<html>
Wenn ein Job, z.B. der Warehouse-Rebuild, wg. eines </br>
Deals immer wieder abbricht, dann kann man den Deal </br>
logisch löschen:
</br><code><pre>
update MUREXDB.TRN_HDR_DBF
set M_PURGE_REF=(select max(M_ID) from MUREXDB.TRN_ARCH_DBF),
M_PURGE_DATE=(select max(M_DATE_ARC) from MUREXDB.TRN_ARCH_DBF)
where M_NB=<<i>zu loeschender Deal</i>>
</pre></code></br>
Danach ist der Deal wieder zu “re-aktivieren“ <b>(Frage ist, was </br>
damit gemeint ist, und wie das zu machen ist)</b>.
</html>
<html>
Der DocServer ist definiert im File<br />
<App_Dir>/fs/public/mxres/mxdoc/docserveraddr.mxres:<br />
<code><pre>
<?xml version="1.0"?>
<docserver> ⁢!-- this file is available for mx version ??? or higher -->
<server> <!-- this tag (docserver/server) is used both for reference
documentation (JMDBrowser) and element online help
(JMDHelper) -->
<host>RECHNERNAME</host>
<port>TCP-PORT</port>
</server>
</docserver>
</pre></code>
<br />
Dh. der DocServer läuft hier auf dem Rechner RECHNERNAME, mit dem Port TCP-PORT.<br />
<br />
<b>DocServer aktulisieren / neu installieren:</b><br />
<br />
• <u>DocServer beenden:</u> <br />
<code><b>cd /murex/doc_fs/mxdoc_fs && ./launchmxj.app ‐fs ‐kill</b></code><br />
<br />
• <u>DocServer starten:</u> <br />
<code><b>cd /murex/doc_fs/mxdoc_fs && ./launchmxj.app ‐fs 1>&‐ 2>&‐</b></code><br />
</html>
<html>
Config-Session <br>
→ Data → Organization → Processing Center<br>
<br>
Die benötigte Gruppe muß dann (mind.) eine MiddleOffice-Gruppe sein.<br>
(Bei FrontOffice-Gruppe wird die in dem Auswahlmenü nicht angezeigt.)<br>
<br>
<br>
<i>You definitely need a FO Desk to roll the FO EOD as it creates the P&L figures <br>
per deal/day and you need it for MOP as of past date.<br>
As a result, at least one FO desk needs to be set.</i><br>
<br>
</html>
<html>
Um Zero-Fixing zuzulassen:<br />
<br />
File: global_launcher_setting.mxres:<br />
<br /><code>
<b>/ALLOW_ZERO_FIXING</b></code><br />
<br />
--> das gilt aber global, dh. für sämtliche Trades<br />
<br />
ab Version 3.1.xx kann das in der in der GUI gesetzt werden;<br />
<br />
</html>
<html>
<img src="./pictures/xmlServer_Fehlermeldung.png" alt=""><br>
<br>
Umgebung nicht oben resp. nicht
möglich einzuloggen:<br>
--> Ein hub-Prozess
läuft nicht oder ist blockiert (oder was auch immer);<br>
<br>
--> <b>Aktion /
Lösung:</b><br>
<p style="text-indent:2.5em;">z.B. ./launchmxj.app ‐k ‐hub /MXJ_HUB_NAME:hub‐han ‐sync</p>
und danach wieder:<br>
<p style="text-indent:2.5em;">./launchmxj.app ‐hub /MXJ_HUB_NAME:hub‐han
-sync</p>
<br>
</html>
<html>
In your version, there is a flag that should be put in the launcher file common_launcher_settings.mxres: <br>
<b>COM_FATHER_FACTOR_IMPACTING_ONLY_HEDGE_SENSI</b><br>
<br />
The Path is: \\application directory\fs\public\mxres\common<br>
Im common-Bereich eingefügt:<br>
<DefaultCommand>/COM_FATHER_FACTOR_IMPACTING_ONLY_HEDGE_SENSI</DefaultCommand><br>
<br>
This will activate then the father factor feature.<br>
Afterwards, in general settings/sensitivities, can you set this setting Sensivities hedge curve projection to All Hedge. It will allow the system to display the GO10 and GO ICE curves at simulation level.<br>
<br>
<img src="./pictures/Murex_SensitivityExpression.png" alt="SensitivityExpresion">
<br>
</html>
<html>
- displays shortcuts for formula<br>
<br>
- editing a given formula:<br>
1. from the top menu: View --> Edit single formula<br>
<br>
2. from a formula editor: select your formula, right click --> Edit formula<br>
<br>
<h1>XML Editor shortcut summary:</h1><br>
<table>
<tr>
<td><</td><td>Invoke Tags auto complete popup window</td>
</tr>
<tr>
<td>& </td><td>Invoke Entities auto complete popup window</td>
</tr>
<tr>
<td>> </td><td>Insert closing Tag for the one being edited</td>
</tr>
<tr>
<td>Control-M</td><td>Go to matching tag</td>
</tr>
<tr>
<td>Control-F7</td><td>Parse document for errors and show errors inspector</td>
</tr>
<tr>
<td>Control-B</td><td>Beautify buffer contents</td>
</tr>
<tr>
<td>Control-N</td><td>Remove all comments and beautify the buffer contents</td>
</tr>
<tr>
<td>Control-H</td><td>Hide errors inspector</td>
</tr>
<tr>
<td>Control-E</td><td>Transfer the focus to an external component</td>
</tr>
<tr>
<td>Control-W</td><td>Transfer the focus between the editor components</td>
</tr>
</table>
</html>
<html>
<h1>Murex generic upgrade procedure</h1>
<h2>1 Stop the services</h2>
Stop the services using one of the following ways:<br />
- startbats_murex$EnvID<br />
- Services.sh -k (The advantages of using this script is that it kills the zombie processes, but this script should not be used in production ? Und welches stattdessen?)<br />
- launchmxj.app -killall (it kill the launchers but it does not kill native processes, for instance if someone having an open MX session it will remain alive and might become a zombie process ? Und welches stattdessen?))
<h2>2 Backup the database and the application directory</h2>
Backup the databases (financial, reporting and MLC), and the application directory.
<h2>3 Explode primary setup package</h2>
From the application directory, run the following command<br />
<br />
For the wizard in console mode<br />
<br />
$path_to_Java/bin/java -cp 2138661-130219-1131-380996-SetupPrimaryApplicationServer.jar run -console<br />
<br />
For the wizard in GUI mode (requires X server)<br />
<br />
$path_to_Java/bin/java -cp 2138661-130219-1131-380996-SetupPrimaryApplicationServer.jar run<br />
<br />
Meaning of the numbers:<br />
2138661 :: <br />
130219 :: <br />
1131 :: <br />
380996 :: <br />
<h2>4 Explode secondary setup package</h2>
From the application directory, run the following command<br />
<br />
For the wizard in console mode<br />
<br />
$path_to_Java/bin/java -cp 2138661-130219-1131-380996-SetupSecondaryApplicationServer.jar run -console<br />
<br />
For the wizard in GUI mode (requires X server)<br />
<br />
$path_to_Java/bin/java -cp 2138661-130219-1131-380996-SetupSecondaryApplicationServer.jar run
<h2>5 Explode new customer rights</h2>
Go to the directory $app_server/fs/license, backup its content, and explode the new customer rights jar using the following command<br />
<br />
jar -xvf customerrights.jar
<h2>6 Explode client setup package</h2>
Go to the client directory and install the client setup package by double clicking on the file 2138661-130219-1131-380996-SetupClient.jar then follow the wizard.
<h2>7 Version pre-requisites</h2>
Make sure that all pre-requisites related to the new version are installed.<br />
<br />
For MX.3 environment pre-requisites you can refer to the following PDFs<br />
<br />
A- $app_server/fs/docs/MxOperatingEnvironmentRequirements.pdf<br />
The file contains dedicated section related to every support server type, for instance SPARC or x86.<br />
<br />
Mainly this PDF contains for every server type:<br />
- For client tier, the supported Windows version and the required Java version.<br />
- For application tier, the supported OS, Java version, and Sybase open client version.<br />
- Locale environment variable settings.<br />
<br />
B- $app_server/fs/docs/MxRDBMSSettingsAndConfiguration.pdf<br />
The file contains the supported database version along with the recommended settings.
<h2>8 Start the services</h2>
Start the services using startbats_murex$EnvID or any script for instance Services.sh:<br />
- Services.sh -l<br />
- Services.sh -l 2<br />
- Services.sh -l 3<br />
?worin unterscheiden sie sich?<br />
<h2>9 Richclient upgrade</h2>
The richclient contains the list of steps to be launched to upgrade from version to another.<br />
<br />
- Open the rich client<br />
- Login using INSTALL/INSTALL<br />
- Click proceed.<br />
- Make sure that the page shows from which MX version to which version you are upgrading.<br />
- Choose Customized Installation and click Proceed.<br />
- Right click on the root and choose “Check Sub tree items“<br />
- If you don't need to upgrade MLC make sure to uncheck MLC steps.<br />
- Turn traces on, this will help in case a specific step fails.<br />
<br />
<img src="./pictures/TraceOnOff.png" width=328 height=118><br />
- Click the Start button to proceed with the upgrade.
<h2>10 Best practices</h2>
<h3>10.1 Deleting jar and bin folder</h3>
After stopping the services, it is better to delete the jar and bin folder under both application server directory and client directory. This is to prevent having two jar files having same classes in case there is a new version for a specific jar file $jar_file_name.jar and now it becomes $jar_file_name1.jar, or in case a jar is not referenced anymore.
<h3>10.2 Files under fs/public</h3>
When exploding the primary setups, all files under fs/public/ are not overwritten, this is done on purpose to preserve customer customizations.<br />
<br />
It is a good practice to explode the primary setup package in a temporary folder, and then compare all the files under fs/public between the existing application directory and the temporary directory (the Unix diff command can be used). Files should be modified depending on the difference found and this should be treated case by case.
<h3>10.3 Files under fs/murex</h3>
When exploding the primary setups, all files under fs/murex/ are overwritten, but in case a file got removed by Murex starting a specific MX release, the file will not be removed by the setup wizard. Such files should be deleted manually.<br />
<br />
This is also the case for some other folders, such as $app_server/mxmlexchange/.<br />
<br />
For this, the ideal thing that can be done is exploding the setup packages of the current running MX version in a temporary folder, for instance temp1, and the new delivered MX release setup packages in temp2, then compare temp1 and temp2. In this case the list of files which differ will be listed regardless what the customer has customized.
<h3>10.4 Additional binaries</h3>
Another important thing is to take care of the additional binaries delivered by Murex. These binaries do not come by default with the setup packages. <br />
<br />
For instance if the bank is using MX Reuters TOF connector (Ticket Output Format), thus Murex already provided the bank with a separate binary called 'tofmurex' this binary can be found in the application directory, in this case a new binary dedicated to the new MX version should be sent by Murex.
<h3>10.5 Flex libraries</h3>
Flex libraries should be recompiled using the new Flex headers which come with the new MX version.
<h3>10.6 New documentation package</h3>
Whenever installing a new MX version, Murex has to send a new documentation package since some documents have been changed with the new release.
<br />
</html>
<html>
<li>
<h4>Datamart: </h4>“View execution jobs“<br />
</li>
<li>
<h4>MReports:</h4> “Display batch status“<br />
</li>
</html>
<html>
Wenn das Warehouse-Maintenance nicht zum Ende kommt,<br />
also ein “Langläufer“ ist, dann:
<ol>
<li>Warehouse-Maintenance-Prozess/WF abbrechen / killen</li>
<li>Warehouse-Cleanup durchführen</li>
<li>Rerun Warehouse-Maintenance</li>
</ol>
</html>
[[Murex :: Service "FileServer"]]
[[Murex :: Service "Warehouse"]]
[[Murex :: Service "Hibernate"]]
[[Murex :: Service "Amendment Agent"]]
[[Murex :: Service "MxML Exchange"]]
[[Murex :: Service "FIX"]]
<html>
<h3>Login-Screen erscheint nicht (graues Fenster)</h3>
Im Log-Verzeichnis folgenden Befehl abgeben:
<code><pre>
grep -i license *log | more
</pre></code>
und nach folgender Zeile Ausschau halten:<br>
<code><pre>
→ unable to get file license/GUICLIENTAUDIT_customerrights.mxres
from http://as230mqa.is.fm.hypovereinsbank.de:12048/murex.download.service.download.
</pre></code>
(oder gleich nach "unable" greppen, sollte auch gehen)<br>
<br>
Daraus folgt, dass das Licensefile abgelaufen ist!<br>
<br>
</html>
<html>
<ul>
<li> MDCS :: "Market Data Contribution Service"</li>
<br />
<li> also known as "Cache"</li>
<br />
<li> allows a direct update of a market data set stored in the database
from a supplied file, or the export of a market data set to a file.</li>
<br />
<li> XML requests (which are conform to the MdML format) are sent to MDRS where
they are appropriately handled.</li>
<br />
<li> The requests can originate from a script or via programming</li>
<br />
<li> der Service ist der Cache-Server für die Marktdaten</li>
<br />
<li> stellt eine API zur Verfügung, in Baumstruktur</li>
<br />
<li> The engine interface MUREX application with the standard external
parameter feeds and loads them into cache</li>
<br />
<li> the service is a repository for real time data.</li>
<br />
<li> Import and export processing scripts can be set up for loading
realtime data to and from the database</li>
<br />
<li> im monit-tool den Tab "site1:MXCONTRIBUTION" anklicken,<br />
den Menü-Punkt "Details" auswählen,<br />
den Prozess "LAUNCHERCACHE" anklicken, RMT -> Activate auswählen.<br />
<br />
Dann:<br />
a) RMT auf markierten Eintrag, "Explore ..." -> "Select User"<br />
-> REALTIME auswählen, bei "Levels" dann "first 5 levels" auswählen<br />
<br />
Oder:<br />
b) RMT auf markierten Eintrag, "Explore ..." -> set Levels to "all levels", den<br />
Baum expandieren<br />
<br />
<h4>Quelle:</h4>
Excelian-Doku<br />
</html>
<html>
<h3>MReport - z.B. Anpassung </h3>
MRC_CF_FXD :: angepasst, in Murex06 <br />
(Config → Define user reports <br />
→ nach "MRC_CF_FXD" suchen <br />
→ Report internal configuration <br />
→ Report modification <br />
→ View <br />
→ Data Dictionary <br />
→ &Horizontal calculation <br />
→ Edit → Insert → Eingaben: <br />
Name: REP_DATE <br />
Type: DATE <br />
Comment: Report Date <br />
Caculation formula: DENV('CRT_BND12') <br />
→ Save & exit → <br />
<img src="./pictures/ReportDate_CONFIG_MUELLER_ Murex06.jpg" />
</html>
<html>
<h2>Mx3 :: z.B. Report MRC_PL bricht immer ab </h2>
BO-Session <br />
→ <code>Display batch status</code> (Middle Office / Reporting) <br >
→ nach dem Batch “MRC_PL“ suchen (u.U. über die Uhrzeit)
</br />
→ Spacebar drücken <br />
→ <b>“test on screen and save on disk“ </b>auswählen </br />
→ dann sollte eine Fehlermeldung “geworfen“ werden <br />
</html>
<html>
<ul>
<li><b>Abkürzungen:</b><br />
C := Credit Curve <br />
Z := Zero Coupon Curve <br />
M := Mark-to-Market <br />
<br />
</li>
<li>Normale BO-Session <br />
→ End-user → Market data → Bonds → Bonds Spreads <br />
→ neues Fenster erscheint: <br />
falls die Spalte “EvalMode“ (Evaluation Mode) nicht zu sehen ist:<br />
TopMenue → Tools → Layout <br />
dann z.B. "ALL" oder "Ev-mode" auswählen <br />
<br />
→ “Advanced Finder“ anklicken <br />
<img src="./pictures/EvalMode_01.jpg">
<br />
→ neues Fenster erscheint: <br />
<img src="./pictures/EvalMode_02.jpg">
<br />
→ im Feld "Filter" einfach nur “123“ <br />
im Feld "Label" den Bondtitel (z.B. "NDB 1.8 1021") eingeben & auf Button "Search" drücken
(es kann sein, dass eine "Result list" auftaucht. <br />
Dann halt den gewünschten auswählen ...) <br />
<br />
oder falls nur die ISIN angegeben ist<br />
in → BO → End-user → Configuration →Securities → Bonds <br />
→ mit CTRL F in der Spalte SE_I_CODE nach der ISIN suchen <br />
→ in der Spalte SE_LABEL ist dann das gesuchte Label <br />
<br />
→ Spalte "Eval Mode" markieren & mit der Leertaste aufrufen <br />
<br />
→ neues Fenster erscheint: <br />
<img src="./pictures/EvalMode_03.jpg"> <br />
<br />
in diesem Fenster die gewünschte Curve/den gewünschten Spread auswählen
(z.B. Credit curve) <br />
<br />
→ EvalPrice eintragen (normalerweise wird der mitgeliefert; falls nicht, einfach <br />
den von der vorherigen Einstellung übernehmen) <br />
<br />
→ Dann mittels "Save & exit" das Fenster verlassen <br />
<br />
u.U. muss dies für andere Tage (rechts oben) wiederholt werden.<br />
</html>
<html>
Wenn im MxMLExchange-WF ein MxML-Import-Task (<b>nicht</b> die File-<br />
reader) sich nicht starten lässt, so ist zu überprüfen, ob der Trade-<br />
Repository-Prozeß “ lauchnertraderepository“ (oder so) läuft: <br />
<code><pre>./launchmxj.app -s | grep -i traderepository</pre></code><br />
⇒ Beispiel-Ausgabe:<br />
<code><pre></pre></code
</html>
<html>
<ul>
<li>PFE := “Potential Future Exposure“ </li>
<li>Unix-Verzeichnis:<br />
<code>/murex/<i><ENV></i>/mx3/pfe.store</code><br />
⇒ entält für jede MLC-Engine ein separates Unterverzeichnis<br />
⇒ bei NordLB: RTLIM, CvA, EoD, Default</li>
<li><b>NordLB</b>:<br />
Zugriff über: FO-Session → …
<li>!!Screenshots!!</li>
</ul>
</html>
<html>
<ul>
<li>Monit aufrufen <br />
→ “MXMLEXCHANGE“ auswählen<br />
→ RMT, “Details“ auswählen</li>
→ neues Fenster, “ServiceDetails: xxx:MXMLEXCHANGE“<br />
→ Eintrag “MXMLEXCHANGE.SPACES“ markieren<br />
→ RMT, “Activate monitoring“ auswählen<br />
→ neues Fenster, “SpaceDetails for MXMLEXCHANGE“<br />
→ im Fenster “Maintenance“ den Button “Refresh“ drücken
</ul>
</html>
<html>
<ol>
<li>Config-Session</li>
<li>⇒ Processing Templates</li>
<li>⇒ Booking Sequences</li>
</ol>
Beispiel für eine PreTradeRule:
<ol>
<li>Trade</li>
<li>⇒ Rules</li>
<li>⇒ public</li>
<li>⇒ completion</li>
<li>⇒ ALL</li>
<li>⇒ Booking</li>
<li>⇒ <b>Check_BC</b></li>
</ol>
⇒ Code:
<code><pre>
//public.preTrade.completion.ALL.Booking.Check_BC
/*
Description:
This rule compares for all non-cleared trades the Break Clause dates and
types between the Flex and Exotic details and throw error messages in
case of discrepancy.
Furthermore the rule prevents from doing modifications in FO status for trade
containing break clauses. Due to a Murex defect after a modifying a trade the
break clause date generator for mutual fields is set to payment schedule.
Version 1.0
Creator:
Alexander Labutin
*/
{
pleg:= legGetComponentAt(This,0),
pStreams:=legGetStreams(pleg),
iMutualBreakNB:=breakableGetNumberOfExerciseDates(pStreams),
pUDf := legGetUserFields(pleg),
sCLEARSTATUS := udfGetString(pUDf,"CLRSTATUS"),
iBlocks := legGetNumberOfFlexExtensions(pleg),
iPar := 0,
iCount := 0,
WHILE (iPar < iBlocks) DO
{
IF (flxGetBlockName(legGetFlexExtensionAt(pleg,iPar)) == "BRK_CLAUSE" ) THEN
{
pBlock := legGetFlexExtensionAt(pleg,iPar),
iCount := iCount + 1
},
iPar := iPar +1
},
// compares mutual bc dates with flex bc dates
IF iCount == 1 THEN
{
iFlexDatesNB:=flxUdGetListLength(pBlock),
iMutualBreakNB:=breakableGetNumberOfExerciseDates(pStreams),
iCheck:=0,
iTest := 0,
WHILE (iFlexDatesNB == iMutualBreakNB AND iTest < iMutualBreakNB ) DO
{
IF breakableGetEffectiveDate(pStreams,iTest) == flxUdGetDate(pBlock, "DYN0", iTest)
THEN iCheck := iCheck +1,
iTest := iTest + 1
}
},
IF sCLEARSTATUS == "03" THEN
{
legSetString(pleg,"Mutual_break_status","No")
}
ELSE
{
IF (iCount == 1 AND iFlexDatesNB > 0 AND properties.Get( "mx.preTrade.action" ) == "MOD")
THEN ThrowError(pleg,
"Please do a 'Cancel and reissue' to prevent differences in Break Clause Dates!",""),
IF (iCount == 1 AND iFlexDatesNB > 0 AND iMutualBreakNB == 0)
THEN ThrowError(pleg,
"Break Clauses in Exotic Details are missing!",""),
IF (iCount == 0 AND iMutualBreakNB > 0)
THEN ThrowError(pleg,
"Break Clauses in Flex Details are missing!",""),
IF (iCount == 1 AND iFlexDatesNB > 0 AND iMutualBreakNB > 0) THEN
{
IF ((iFlexDatesNB <> iMutualBreakNB) OR (iCheck <> iMutualBreakNB)) THEN
ThrowError(pleg,"Break Clause differences between 'Flex' and 'Exotic'","")
},
IF iCount == 1 THEN
{
pStreams:=legGetStreams(pleg),
iMutualBreakNB:=breakableGetNumberOfExerciseDates(pStreams),
iMan:=0,
iMut := 0,
WHILE iMut < iMutualBreakNB DO
{
IF (breakableGetBreakType(pStreams,iMut) == 1) THEN iMan := iMan + 1,
iMut := iMut +1
},
IF(flxUdGetString(pBlock, "B_TYPE",0) == "ISDA (Mandatory)" OR flxUdGetString(pBlock, "B_TYPE",0)
== "DRV (Mandatory)" ) THEN
{
IF iMan <> iMutualBreakNB THEN ThrowError(pleg, "Please check the Break Clause type!","")
}
ELSE
{
IF iMan <> 0 THEN ThrowError(pleg, "Please check the Break Clause type!","")
}
}
}
};
</pre></code>
</html>
<html>
<img src="./pictures/navigationTemplate_Fehlermeldung.png" alt=""><br>
<br>
NAVS: responsible for the navigation<br>
<br>
<b>Folgende Ursachen könnten sein:</b><br>
1. Wird vom Launcher launchermandatory.mxres (Mandatory launcher) gestartet<br>
<br>
Cmdline: <br>
<p style="text-indent:2.5em;">launchmxj.app -mandatory -k ; #Stoppen</p>
<p style="text-indent:2.5em;">launchmxj.app -mandatory -nosilent; #Starten</p>
<br>
2. die Konfiguration der Gruppe ist fehlerhaft (z.B. FO_LDN_T_S)<br>
⇒ Einloggen als "SUPERVISOR / SUPERVISOR "<br>
⇒ Gruppe SUPERVISOR auswählen<br>
⇒ Groups‐Fenster erscheint, Gruppe auswählen, Space bar<br>
⇒ Feld Navigation Template auswählen<br>
⇒ Liste der Templates erscheint, Template auswählen<br>
⇒ Änderungen durchführen, abspeichern<br>
⇒ zwecks Überprüfung erneut aufrufen<br>
<br>
./fs/murex/mxres/mxsession/client/navigation.mxres<br>
./fs/murex/mxres/mxsession/navigation<br>
./fs/murex/mxres/common/launchernavs.mxres<br>
./fs/murex/mxres/migration/navigation_rights.mxres<br>
./fs/murex/mxres/odr/assembly/installation/upgrade/navigation<br>
<br>
</html>
<html>
<ul>
<li>MLC-Admin &arr; RTLIM-Enigne-Instanz läuft ewig (“Wurstwender“)<br />
→ Umgebung neu starten<br />
→ Produktion: Nur ein RECOVERY laufen lassen</li>
</ul>
</html>
<html>
<ul>
<li>MLC-Admin <br />
→ Administration <br />
→ System-Monitoring
</li>
</ul>
</html>
<html>
Dafür muss ein spezieller Prozess gestartet werden: <br />
<br />
Wenn MxMLExchange mal wieder abgestürzt ist und Events in <br />
MxG2000 erzeugt wurden, die nicht an MxMLExchange weiter<br />
geleitet wurden und statt dessen im Vezeichnis<br />
<code>mxg2000/mxml/core</code><br />
gelandet sind, so kann man diese Events über den Recovery<br />
Monitor nachverarbeiten. Hierzu muss allerdings erst einmal<br />
ein spezieller Serviceprozess gestartet werden.
<ol>
<li>Den Servicelauncher auf dem Primaryserver starten:
<code><pre>
cd mxg2000
launchmxj.app -l /MXJ_CONFIG_FILE:public.mxres.common.launchermxsession_service.mxres
</pre></code>
</li>
<li>Danach im Client über Select & Start den Service MXML_RECOVERY starten. </li>
<li>Als User TECHNIK oder MUREXBO in der BO-Gruppe anmelden. </li>
<li>Über <br />Processing –> Document workflow –> Recovery Monitor<br />
den Recoverymonitor starten. </li>
<li>Jetzt solte eine Liste der Dateien im Verzeichnis <code>mxg2000/mxml/core</code> angezeigt werden. <br />Diese lassen sich dann über Proceed an MxMLExchange weiterleiten.<br />
<br />
Achtung! Es ist so ohne weiteres nicht erkennbar, ob der Recovery Monitor arbeitet. <br />
Das Einzige, was man machen kann, ist: <br />
Weitere Session aufmachen, Trade Query mit einer "simple trade number" <br />
(von cttree_trade_6415229.xml ist 6415229 ) aufrufen, <br />
und die Zeitstempel in der Spalte "Status Time" von DocHistory des Trades
anschauen <br />
–> wenn der angegebene Zeitpunkt (sehr) nahe dem aktuellen Zeitpunkt ist, <br />
ja, dann ist der Trade durch den Recovery Manager importiert worden …
<br />
Und was die Laufzeit anbelangt: <br />
Heute brauchte der Recovery Monitor für 343 Files/Trades(?) sage und schreibe
ca. 2 Stunden! (Also nicht verzweifeln!)
</li>
<li>Abschliessend den Servicelauncher stoppen:
<code><pre>
cd mxg2000
launchmxj.app -l /MXJ_CONFIG_FILE:public.mxres.common.launchermxsession_service.mxres -k
</pre></code></li>
</html>
<html>
BO-Session<br />
→ Middle Office<br />
→ Reporting<br />
→ Print Batch of reports<br />
→ Fenster: Batch report<br/>
</html>
<html>
BO-Session<br />
→ Middle Office <br />
→ Reporting <br />
→ Print Batch of reports <br />
Batch suchen (z.B. RE_ACCROIS) <br />
<br>
<img src="./pictures/reportDrucken_01.png" alt=""><br />
<br>
→ RMT, ?? auswählen <br />
<br>
<img src="./pictures/reportDrucken_02.png" alt=""><br />
→
"Proceed" drücken und Abfrage bestätigen <br />
<br>
</html>
<html>
MLC-Client aufrufen<br />
→ Prüfen, ob LRB aufrufbar ist (Bereich Reports)<br />
→ Requests<br />
→ Expand all<br />
→ Doppelklick auf einen “blauen“ Eintrag
</html>
<html>
<h3>SNF - SwapNote Future </h3>
<h4>Problemstellung:</h4>
Im Murex‐Bereich "Long term futures" verschwinden bei einigen <br />
maturity sets die settlement maturities. <br />
<br />
(Alle Murex Session mit BO oder CONFIG, siehe Screenshot Titelzeile) <br />
<br />
<b>Beispiel INT SNF 01Y </b>
<br />
Beide Prüfungen durchführen! <br />
Es kann nämlich sein, dass die erste Prüfung ok ist (der geforderte Eintrag <br />
ist vorhanden), aber das Problem ist dann in der zweiten Prüfung ... <br />
<br />
1) Prüfen der Maturity (Öffnen mit Leertase) / Bild 1 <br />
<img src="./pictures/SNF_01.png" height=395 width=849>
<br />
2) Prüfen der Preise (Öffnen mit Doppelklick), Achtung: Immer auf die letzte Seite scrollen <br />
<img src="./pictures/SNF_02.png">
<br />
<u>Wer macht was im Fehlerfall:</u> <br />
<br />
<b>Problem Fall I </b><br />
P: Maturity Set ist vorhanden (Bild 1) in den long term futures wird aber nicht in den future closing prices angezeigt<br />
L: <ol><li>In den long term futures, jeden INT SNF Eintrag einzeln markieren, alt+e -> o -> alt+f -> a und dann weiter zum nächsten </li>
<li>MD_WARMUP in einer BO Session starten</li>
<li>RTBS Fixing in einer CONFIG Session starten (bis keine neuen Werte mehr kommen ...)</li>
<li>MD_IMPORT_FIXING in einer BO Session starten.</li>
</ol>
<br />
Die Schritte 2) bis 4) können / sind dann untertägig auszuführen. <br />
<br />
<b>Problem Fall II </b><br />
P: Maturity Set ist nicht vorhanden (Bild 1) in den long term futures und wird daher auch nicht in den future closing prices angezeigt <br />
L: <ol>
<li>MSDN bitten die Maturity sets anzulegen </li>
<li>MD_WARMUP in einer BO Session starten</li>
<li>RTBS Fixing in einer CONFIG Session starten</li>
<li>MD_IMPORT_FIXING in einer BO Session starten.</li>
</ol>
<br />
Die Schritte 2) bis 4) können / sind dann untertägig auszuführen. <br />
<br />
Hinweis zu "RTBS Fixing in einer CONFIG Session starten <br />
<br />
<img src="./pictures/SNF_03.png" height=231 width=563>
<br />
<img src="./pictures/SNF_04.png" height=196 width=575>
</html>
<html>
<ul>
<li>Starten & Stoppen: <code>launchmxj.app ‐aagent [‐k] </code></li>
</ul>
</html>
<html>
<h2>Service “FIX“</h2>
<ul>
<li>QuickFIX-Anbindung</li>
<li>Prozess-Name (in launchmxj.app -s):<code> launchermxfix</code></li>
<li>Start & Stoppen: <code><pre>launchmxj.app -fix [-k]</pre></code></li>
<li>Config-File: <i><ENV></i>/fs/public/mxrex/common/launchermxfix.mxres</li>
<li>eigener MxML-Task:</li>
<li></li>
<li></li>
</ul>
</html>
<html>
<ul>
<li>sorgt dafür, dass die jar‐ & bin‐Files auf dem neuesten Stand sind; </li>
<br />
<li>nachdem der Client gestartet ist, macht der FileServer-Prozess <br />
einen Abgleich zwischen Server und Client</li>
<br />
<li>speichert die Konfiguration, die Ressourcen und Jar-Files,<br />
die vom Client heruntergeladen werden</li>
<br />
<li>Prozess-Name (in launchmxj.app -s): <code><b>fileserver</b></code></li>
<br />
<li><u>Starten & Stoppen:</u>
<code><pre>launchmxj.app -fs [-k]</pre></code></li>
<br />
<li>ConfigFile:</li>
<li></li>
</ul>
</html>
<html>
<ul>
<li>Starten & Stoppen: <code>launchmxj.app ‐hibernate [‐k]</code></li>
</ul>
</html>
<html>
<ul>
<li>Starten & Stoppen: <code>launchmxj.app ‐mxml [‐k]</code></li>
</ul>
</html>
<html>
<ul>
<li>Starten &: Stoppen: <code>launchmxj.app -warehouse [-k] </code></li>
<br />
<li>Aufgabe der Warehouse-Prozesse:
<ul>
<li>sie spielen für Simulationen eine Rolle;</li>
<li>beim Warehouse-Start werden bestimmte Tabellen mit Daten gefüllt, <br />
die dann für die Simulationen benötigt werden;</li>
</ul>
</ul>
</html>
<html>how to recreate missing windows
Hi Pierro,
please have a look to the following steps.
That should bring back the 'missing' windows in your e-Tradepad
(0) Start-Point = e-TradePad with missing Windows for 'Lookup Tables' and 'Default Notepad'
Step (1) -> click on 'Folders'
Step (2) -> doubleclick on 'Lookup Tables' , 'Default Notepad' and 'Default Strategy'
This leads to the following screen
Step (4) -> click on 'Products'
...from now on everything should look and work as before
Von: Pirro Ayala/NORDLB
An: Murex-RTB/NORDLB@NORDLB,
Kopie: Claus Leggewie/Extern/NORDLB@NORDLB, Treasury New York@NORDLB, Ralf Haeusser/Extern/NORDLB@NORDLB
Datum: 26.04.18 20:55
Betreff: Re: Antwort: * correction: ("WITHOUT the tools look-up table")..............Re: set-up problem with margin sell-down within e-Tradepad / INCC00008731653
________________________________________
Hi,
yes, please have Ralf Hauesser investigate as restarting did not work.
Thanks.
From: Murex-RTB/NORDLB
To: Pirro Ayala/NORDLB@NORDLB
Cc: Murex-RTB/NORDLB@NORDLB, Treasury New York@NORDLB
Date: 04/26/2018 02:37 PM
Subject: Antwort: * correction: ("WITHOUT the tools look-up table")..............Re: set-up problem with margin sell-down within e-Tradepad / INCC00008731653
Sent by: Claus Leggewie
________________________________________
Hello Pirro,
Unfortunately, I can not currently reproduce the problem.
Therefore, I would like to have the problem investigated by my colleague Ralf Hauesser. He is already out of the house, and will be come in tomorrow.
Is that ok for you?
The only tip I currently have is to restart the Murex client.
Mit freundlichen Grüßen / With best regards
Murex RTB Team
_________________________________________________
NORD/LB
Norddeutsche Landesbank Girozentrale
Konzern Informationstechnologie
Trading-IT
Friedrichswall 10
30159 Hannover - Germany
Tel.: +49 511 / 361 - 5236 (HAN, LON)
Tel.: +49 511 / 361 - 6691 (NYC)
Tel.: +49 511 / 361 - 6862 (SGP)
E-Mail: murex-rtb@nordlb.de
Service hours: Monday (02:00 a.m.) to Saturday (09:00 p.m.)
Von: Pirro Ayala/NORDLB
An: Murex-RTB/NORDLB@NORDLB,
Kopie: Treasury New York
Datum: 26.04.2018 19:42
Betreff: * correction: ("WITHOUT the tools look-up table")..............Re: set-up problem with margin sell-down within e-Tradepad / INCC00008731653
________________________________________
From: Pirro Ayala/NORDLB
To: Murex-RTB/NORDLB@NORDLB
Cc: Treasury New York
Date: 04/26/2018 01:38 PM
Subject: set-up problem with margin sell-down within e-Tradepad
________________________________________
Hi,
can you help me restore my margin sell-down set-up? (see {A} for my current set-up)
It appears I can't perform the margin sell-down operation without the "tools look-up table" (see {B} which is a copy of my colleagues set-up)
{A}
{B}
<html>
Es gibt folgende zwei Möglichkeiten, die Sprach‐ und <br />
Datumseinstellungen vorzunehmen:
<ol>
<li>über die GUI, <br />
im Menüpunkt “Settings“ → “Properties“ → “Locale“</li><br />
<li>im File client.xml:<br />
<code><pre><Locale Language=“xx“ Country=“yy“ DateFormat=“**“ ExcelDateFormat=“ … “></Locale></pre></code></li>
</ol>
</html>
<html>
<ul>
<li>Beim Starten der Prozesse schaut Murex nur nach,<br />
ob PID-Files vorliegen.<br />
<br />
Wenn das der Fall ist, dann sucht Murex nach einem<br />
Prozess mit der PID, unabhängig, ob das der gewün<br />
schte Prozess ist oder nicht. D.h. es kann irgendein<br />
anderer Prozess sein, der nichts mit Murex zu tun hat.<br />
<br />
Das Vorhandensein des PID-Files allein reicht Murex<br />
schon, um den Prozess, der vom PID-File angegeben<br />
wird, in der Liste von <code>launchmxj.app -fs</code> auftauchen<br />
zu lassen</li>
</ul>
</html>
<html>
<ul>
<li>
<b>TRN_USRD_DBF :</b><br />
enthält Infos über die einzelnen User<br />
</li>
<br />
<li>
<b>TRN_USRG_DBF :</b><br />
zu welcher Gruppe gehört welcher User<br />
</li>
<br />
<li>
<b>TRN_CPDF_DBF :</b><br />
enthält die Liste der Counterparties<br />
</li>
</ul>
</html>
<html>
<ul>
<li>Der Ticket-Druck ist erst dann möglich, wenn <br />
das Ticket <b>nicht</b> mehr im FO-Status, sondern<br />
bereits im Com‐ oder BO‐Status ist.</li>
</ul>
</html>
<html>
Wenn ein User zu viele Sessions aufgemacht hat (i.d.R. 10 Stück),<br />
dann dauert es mind. 15 – 20 Min., bis die Meldung nicht wieder<br />
auftritt.<br />
</html>
<html>
<ul>
<li>Mit Hilfe von <br />
BO-Session ⇒ Middle Office ⇒ Datamart reporting <br />
⇒ Batch of table feeders job recovery<br />
kann man einen Report-Abbruch untersuchen</li>
<br />
<li>VORSICHT! Nicht ausführen!</li>
</ul>
</html>
<html>
<ul>
<li>Jedem Prozess unter “MXTRADEREPOSITORY“ im Monit<br />
ist ein EVS-Task im MxML-Exchange zugeordnet. <br />
Leider kann man nicht erkennen, welcher Prozess zu welchem Task gehört. </li>
<br />
<li>Es ist gefahrlos, einen TradeRepository-Prozess (oder alle) zu killen.<br />
Sie werden, sobald der EVS-Task benötigt / aufgerufen wird (dh. <br />
wenn Trade durch den Task verarbeitet werden soll), wieder gestartet.<br />
<br />
⇒ über den Monit.cmd <br />
>> MXTRADEREPOSITORY markieren, RMT, dann <br />
>> Detail auswählen<br />
>> Prozess suchen, markieren, RMT & “Kill“ auswählen <br />
</li>
<br />
<li>Wenn im MxMLExchange-WF ein MxML-Import-Task (<b>nicht</b> die File-<br />
reader) nicht läuft, so ist zu überprüfen, ob der TradeRepository-Pro-<br />
zeß “ lauchnertraderepository“ (oder so) läuft: <br />
<code><pre>./launchmxj.app -s | grep -i traderepository</pre></code>
⇒ <b>Beispiel-Ausgabe:</b><br />
<code><pre></pre></code</li>
<br />
</ul>
</html>
<html>
Ein Einloggen in Murex ist problemlos, aber eine Tradeeingabe <br />
ist nicht möglich, kann es folgende Ursachen haben:
<ul>
<li>Nach Aufruf der Tradeeingabe-Maske erscheit der "Wurstwender"<br />
und der Bildschirm scheint einzufrieren.<br /><br />
<b>⇒ Ursache & Lösung:</b><br />
Murex kann keine Verbindung zum MLC (oder einer seiner Teil-<br />
komponenten) aufbauen, z.B. zur CVA-Engine, um ein Limit Pre-<br />
view aufzurufen-</li><br />
<li></li><br />
<li></li><br />
</ul>
</html>
<html>
<p>
This document describes based on the example of the release “101051-2016-0194 UsE Counterparty UDFs and Trade UDFs“ how to restrict the access to certain UDF layouts and hence the visibility of the corresponding UDFs using an appropriate template in the <b>SUPERVISOR</b> menu.
</p>
<h3>UsE – project related changes </h3>
Within the scope of the above named release two trade UDFs were implemented which allow specific treatment for non-simulated trades as well as external valued deals within the CVA/PFE module:
<ul>
<li> <b>“Exclude from PFE SIM“ (Field name: “EX_PFE_SIM“), Check Box </b><br />
This UDF is needed in order to exclude defected trades from CVA/PFE simulation which then are handled by a “fallback“
</li>
<li><b>“EXT_VALUE“</b>
This UDF is a purely technical field which will be automatically filled by a pre trade rule if a Flex block “EXT_VALUE“ is created (this indicates that a trade is valued externally via Flex API).
The exclusive right to edit both “Exclude from PFE SIM“ and “EXT_VALUE“ should be limited to one specific group “BO_ICR_SVR“ which could be achieved by performing following steps
</li>
<li>Creation of the new UDF layout “PFE“ containing both UDFs (for all trade structures: IRD, CURR and CRD)
<img src="./pictures/visibility_rights_01.jpg" width=415 height=98>
</li>
<li>Creation of two “layout right templates“ in SUPERVISOR menu to restrict the visibility rights for the newly created UDF layout by group
<br />
<img src="./pictures/visibility_rights_02.jpg" width=771 height=227><br />
<br />
<img src="./pictures/visibility_rights_03.jpg" width=464 height=134><br />
<br />
A layout right template is a list of available UDF layouts which will be visible if they are ticked and vice versa. To avoid inconsistency each user group should be assigned to a layout right template.
</li>
<li>In the considered case the layout right template “ALL“ containing all available layouts was assigned to the group “BO_ICR_SVR“ <br />
<br />
<img src="./pictures/visibility_rights_04.jpg" width=513 height=525>
</li>
<li>The remaining groups were linked to the template “EX_PFE“ having excluded the “PFE“ layouts (one for each structure). <br />
<br />
<img src="./pictures/visibility_rights_05.jpg" width=668 height=679>
</li>
</ul>
<h3>Points to be considered for future changes/releases </h3>
</ul>
<li>
The new layout right methodology has no impact on existing UDF layouts. However, newly created layouts need to be maintained in all layout right templates, i.e. it needs to be ensured that the corresponding check boxes are ticked in all templates (unless the considered UDF layouts should be hidden)
</li>
<li>In order to guarantee data consistency all new created user groups should be assigned to one of the templates. In the current state it must be the template “EX_PFE“ since “ALL“ is blocked by the group “BO_ICR_SVR“
</li>
<li>The layout right templates enable managing the visibility rights of the UDF layouts. However, it does not prevent users from editing the fields located in those layouts, since the desired fields can be inserted and amended in the e-Tradepad. In order to avoid this case, the fields can be additionally protected in the corresponding “pricing template“ layouts or due to a pre trade rule
</li>
</ul>
</html>
<html>
<h2>Manual steps to change a datamart view</h2>
am Beispiel der View 'REP_HDR_VW'<br />
<br />
Change header content to the respective test environment in order <br />
to be able to differentiate datamart print outputs of different environments <br />
<h3>Implementation / Deployment</h3>
Login with user MUREXBO and group “BO“in the environment <br />
<br />
Then go to 'Data extraction' <br />
→ 'Datamart' → 'Datamart extraction'<br />
→ Press Space bar on “C_E_CDS_CDD_EXT“
And you should be able to see it as below
- Now Click on the green highlighted button to come to window “User Defined View“
- Now select view “REP_HDR_VW“ and press spacebar to open it check Screenshot 2
Screenshot 1: <br />
<img src="./pictures/watermark_1.png" height=394 height=510 alt="watermark_1" /><!--Originalgrösse: 788 x 1019 --><br />
<br />
In the below screenshot click on the Green highlighted pencil to enter the edit mode of the view:
<img src="./pictures/watermark_2.png" alt="watermark_2"/>
Now double click in empty line and enter appropriate text for environment you are using. E. g. Murex18-REPORT in case test environment MUREX18 is used.
Press button “Center Align“:
<img src="./pictures/watermark_3.png" alt="watermark_3" height=160 width=733 /><!--Originalgrösse: 240 x 1100 -->
Afterwards press “Enter“ (VERY IMPORTANT !!!) and then click on the Save button on the top left corner 3 to 4 times:
<img src="./pictures/watermark_4.png" alt="watermark_4"/>
After change it should look as shown in screenshot 5:
<img src="./pictures/watermark_5.png" alt=watermark_5"/>
<h3>Deployment Verification steps </h3>
Then go to Data extractionDatamartDatamart extraction Press Space bar on “C_E_CDS_CDD_EXT“
And you should be able to see it as below
- Now Click on the green highlighted button to come to window “User Defined View“
- Now select view “C_E_CDS_CDD_EXT_VIEW1“ and press spacebar to open it check Screenshot 7
- And click on the yellow highlighted pdf button to generate the test pdf output as shown in the Screenshot 8
<img src="./pictures/watermark_6.png" alt="watermark_6"/>
Screenshot 8
<img src="./pictures/watermark_7.png" alt="watermark_7.png"/>
Press ESC until you exit and come to Main Murex start session screen .
</html>
<html>
• <b>Zugriff:</b> <br>
CONFIG → Processing centre → Processing templates<br>
→ es werden mehrere Tabs ("Palette") der
verfügbaren Tasks angezeigt<br>
<br>
• ein Workflow für jedes Business-Objekt:
<ol>
<li><b>Contract workflow</b></li>
<li><b>Event workflow</b></li>
<li><b>Document workflow</li>
<li><b>Deliverables workflow</b></li>
<li><b>Financial Contracts workflow</b></li>
</ol>
<br>
•<b> Die Workflow-Tasks:</b><br>
1. Timer, Router, DocSender, CheckException, <br>
Import/Export FS, Import MxML<br>
2. Flow Trigger <br>
--> verschiebt Daten zu einem anderen Task<br>
3. Check Exception/Validation Cycle<br>
--> ähnlich der Auth Queue (Authentification Queue)<br>
</html>
<html>
<ul>
<li><h3>Aufruf e-Tradepad:</h3>
<ol>
<li>FO-Session → Pricing → All → e-Tradepad <br />→ Desk (z.B. FO HAN) [via Doppelklick] auswählen</li><br />
<li>BO-Session → Pricing → All → e-Tradepad</ol></li>
<br />
</ul>
</html>
<html>
<h3>set-up problem with margin sell-down within e-Tradepad (NYC) </h3>
Anscheinend hat sich Pierro Ayala seine Ansicht des e-TradePads zerschossen.
Ich habe ihn zuächst eine Anleitung zur Wiederherstellung der Fenster gesendet.
Wie sich zeigte, hatte er jedoch keine Chance mehr, unter 'Folder' die LookupTables zu klicken.
<br />
In einer zweiten Anleitung (ähnlichen Fall hatte ich mal bei Frau Schmiedhold) habe ich dann eine Beschreibung ergänzt, wie die LookupTables im e-Tradepad zurückzukonfigurieren sind. <br />
<br />
Please try the following, but be carefully....
<ol>
<li> in "Folders" mark the Folder "Tools" , do a Right-Mouse-Click and select "New"
<img src="./pictures/e-Tradepad_01.png">
</li>
<li>A "Box Configuration" come up
<img src="./pictures/e-Tradepad_02.png">
<ul>
<li>Please choose "Name = LT "</li>
<li>select Content "Lookup Tables" </li>
<li>under Position select the window on the top left (marked yellow in the Screenshot ) </li>
<li>then
click "Details" right in the 'Position' box and select the checkbox at "21 Lookup Tables" </li>
<li>Then click "OK" :
<img src="./pictures/e-Tradepad_03.png">
</li>
</ul>
<li>=> afterwards the Lookup Tables should be back
<img src="./pictures/e-Tradepad_04.png"
</li>
</ol>
</html>
<html>
Aufruf:
<code><pre>
~/scripts/perl/environsettings.pl ~/scripts/cfg/prod.cf ~/scripts/cfg/murex06.cf ~/scripts/cfg/Mx3_Settings.cf
</pre></code>
<code><pre>
#!/usr/bin/perl
# environsettings.pl -- Replaces entries in MxG2000 and MLC configuration
# files, database settings specific to an environment, links in the file
# system and alias settings in the database (as user sa). Which entries in
# which files / file system / database tables are to be replaced is defined
# in configuration files. The configuration file of the current system and
# the configuration file of the destination system are submitted to this
# script as command line arguments.
# The script uses a file MurexSettings.cf to determine which files, links,
# or database table to adopt. The file to use may be set as third argument
# to this script.
# Version: 4.0
# Date: 06.03.2014
# Author: Bernd Ihmels, Capgemini Deutschland GmbH
# Date: 24.10.2014
# Author: Ghassan Ghaith, Capgemini Deutschland GmbH
# Added the function GrantFullRightsDBEntries(...)
# Date: 07.03.2018
# Author: Bernd Ihmels, Capgemini Deutschland GmbH
# Replaced DBUser settings. Add now missing links to ro user for all ro_ users.
# Added a deleting procedure to remove superfluos entries from sysalternates.
use Getopt::Std;
use File::Basename;
use Data::Dumper;
use strict;
# Default settings file.
my $settings = "$ENV{HOME}/scripts/cfg/Mx3_Settings.cf";
# Read lines from command line.
if (getopt('h') || $#ARGV < 1 || $#ARGV > 2) {
die <<NoOfArgs
$0: Program to exchange configuration entries specific for a
Murex environment. Reads configuration parameters of the current
configuration and the destination configuration from files. As default,
this script gets all informations, where to set environment specific
values in a Murex enivronment from MurexSettings.cf in ~/scripts/cfg.
The name of this file may be set as third argument to this script.
Usage: $0 SourceConfigFile DestinationConfigFile [SettingsFile]
NoOfArgs
}
my ($source,$dest) = @ARGV;
# Check, if other name for settings file has been provided to script.
if ($#ARGV == 2) {
$settings = $ARGV[2];
}
# Read values of source environment.
open(CONFIG,"<$source") || die "Can not open config file $source!\n";
my $SourceValues = ReadConfigFile(\*CONFIG);
close(CONFIG);
# Put file name into SourceValues.
($SourceValues->{ConfigFile} = $source) =~ s/(\.\.\/)+//;
# Read values of destination environment.
open(CONFIG,"<$dest") || die "Can not open config file $dest!\n";
my $DestValues = ReadConfigFile(\*CONFIG);
close(CONFIG);
# Put file name into DestValues.
($DestValues->{ConfigFile} = $dest) =~ s/(\.\.\/)+//;
# Read list of parameters to change.
open(CONFIG,"<$settings") || die "Can not open config file $settings!\n";
my ($LinkList,$DBList,$DBAliase,$FileList,$Dummy) =
ReadConfigFile(\*CONFIG);
close(CONFIG);
die "Value of \$MurexHome is empty! Do not know where to search files!"
unless ($DestValues->{MurexHome});
my $ExitCode = ReplaceFileEntries($FileList,$SourceValues,$DestValues)
if (scalar(keys %$FileList));
$ExitCode += ReplaceDBEntries($DBList,$DestValues)
if (scalar(keys %$DBList));
$ExitCode = ReplaceLinks($LinkList,$DestValues)
if (scalar(keys %$LinkList));
$ExitCode = ReplaceDBUsers($DBAliase,$DestValues);
$ExitCode += GrantFullRightsDBEntries($DestValues);
exit $ExitCode;
##############################################################################
# Read configuration files. Each type of information has a different separator
##############################################################################
sub ReadConfigFile { # Read config files.
my $CONFIG = $_;
my (%EnvironValues, %FileList, %DBList, %DBAliase, %LinkList);
my ($line, $db);
my $i=-1;
# Read contents of file.
while (defined($line = <CONFIG>)) {
chomp $line;
$line =~ s/^\s*#.*//; # Keine Kommentarzeilen einlesen.
$line =~ s/.*@.*//; # Keine Zeilen mit @-Zeichen einlesen.
$line =~ s/^\s+//; # Keine f?hrenden Leerzeichen.
$line =~ s/\s+$//; # Keine anh?ngenden Leerzeichen.
next unless length($line); # Falls die Zeile nichts mehr enth?lt, gehe
# weiter.
if ($line =~ s/\\$//) {
$line .= <CONFIG>; # Concatenate entries with continuation sign \
# at the end of a line.
redo unless eof(CONFIG);
}
if ($line =~ /\|\|/) { # Read lines containing DB replacements.
# Check, if $db has been defined before.
die 'Database name and user has to be defined using |/ before ' .
'defining table settings!' if (! defined($db));
# Read and process line.
my ($table,$column,@list) = split(/\s*\|\|\s*/,$line);
if ($#list == 0) {
$DBList{$db}->{'tables'}->{$table}->{$column}->{'value'} = shift(@list);
} elsif ($#list == 2) {
$DBList{$db}->{'tables'}->{$table}->{$column}->{$list[1]}->{$list[2]}
= $list[0];
} else {
die "Wrong format of line \"$line\" in file $source!"
}
} elsif ($line =~ /\|\//) { # Read lines containing DB parameters.
my ($ase, $user, $file);
($ase, $db, $user, $file) = split(/\s*\|\/\s*/,$line);
$DBList{$db}->{'ASE'} = $ase;
$DBList{$db}->{'User'} = $user;
$DBList{$db}->{'File'} = $file;
} elsif ($line =~ /\|\\/) { # Read lines containing dbo settings
my ($ase, $user, $file);
($ase, $db, $user, $file) = split(/\s*\|\\\s*/,$line);
$DBAliase{$db}->{'ASE'} = $ase;
$DBAliase{$db}->{'User'} = $user;
$DBAliase{$db}->{'File'} = $file;
} elsif ($line =~ /\|\>/) { # Read lines containing DB aliases.
die 'Database dbo name has to be set using |\ before defining ' .
'alias definitions!' if (! defined($DBAliase{$db}->{'User'}));
my ($db,$list) = split(/\s*\|\>\s*/,$line,2);
$DBAliase{$db}->{'Alias'} = $list;
} elsif ($line =~ /\-\>/) { # Read lines containing new links.
my ($file,$linkto) = split(/\s*\-\>\s*/,$line,2);
$LinkList{$file} = $linkto;
} elsif ($line =~ /=/) { # Read lines containing environment settings.
my ($var,$value) = split(/\s*=\s*/,$line,2);
$EnvironValues{$var} = $value;
} elsif ($line =~ /:/) { # Read lines containing settings in files.
my ($var,$list) = split(/\s*:\s*/,$line,2);
$FileList{$var} = $list;
} else { # Config file has a wrong format.
die "Wrong format of line \"$line\" in file $source!"
}
}
return \%LinkList,\%DBList,\%DBAliase,\%FileList,\%EnvironValues;
}
##############################################################################
# Replace entries in files in replacing all occurences of "old string" with
# "new string".
##############################################################################
sub ReplaceFileEntries {
my ($FileList,$SourceValues,$DestValues) = @_;
my $ExitCode = 0;
# Replace entries in each of the files listed in %$FileList.
foreach my $file (sort(keys %$FileList)) {
# Remove \$signs from values.
$FileList->{$file} =~ s/\$//g;
# Put values to replace in List.
my @ReplaceList;
@ReplaceList = split(/\s*,\s*/,$FileList->{$file});
my $datei = $DestValues->{MurexHome} . '/' . $file;
# Read lines from $file.
if (! open(REPLACE,"<$datei")) {
warn "Can not open file $datei! Go on to next...\n";
$ExitCode++; # Prevent exit code of zero;
next;
}
my @lines = <REPLACE>;
close(REPLACE);
# Write corrected entries back to $file.
if (! open(REPLACE,">$datei")) {
warn "Can not open file $datei for write! Go on to next...\n";
$ExitCode++; # Prevent exit code of zero;
next;
}
foreach my $line (@lines) {
chomp $line;
# print "\nline = $line\n";
foreach my $entry (@ReplaceList) {
if (defined($SourceValues->{$entry})) {
# print "Source = $SourceValues->{$entry}, Dest = $DestValues->{$entry}\n";
$line =~ s/$SourceValues->{$entry}/$DestValues->{$entry}/
}
}
print REPLACE "$line\n";
}
close(REPLACE);
}
------------ return $ExitCode;
}
##############################################################################
# Replaces entries in db tables. This functions currently expects tables to
# consist of a single line. Up to now, this assumption is valid.
##############################################################################
sub ReplaceDBEntries {
my ($DBEntries,$DestValues) = @_;
my $ExitCode = 0;
# Set path to isql command
my $isql = $DestValues->{'OpenClient'} . '/' . $DestValues->{'SYBASE_OCS'} .
'/bin/isql';
# Replace entries in each of the tables listed in $DBEntries.
foreach my $db (sort(keys %$DBEntries)) {
my ($entry, $value);
# Remove $-sign in front of db name.
(my $DBname = $db) =~ s/^\$//;
$DBname = $DestValues->{$DBname};
# User name in database.
my $user = $DBEntries->{$db}->{'User'};
# Get password to login as user $user.
my $pw;
# Remove $-sign in front of file name
(my $file = $DBEntries->{$db}->{'File'}) =~ s/^\$//;
$file = "$ENV{HOME}/scripts/.cfg/" . $DestValues->{$file};
# Remove $-sign in front of ase name
(my $ase = $DBList->{$db}->{'ASE'}) =~ s/^\$//;
$ase = $DestValues->{$ase};
# Get password from file $file.
open(PW, $file) || die "Can not read file $file";
while (<PW>) {
chomp; # no newline
s/#.*//; # no comment
s/^\s+//; # no leading white
s/\s+$//; # no trailing white
next unless length; # anything left?
my $num = ($_ =~ tr/://); # No. of column separators in file
if ($num == 1) {
$pw = $1 if (/$ase:(.+)/);
} elsif ($num == 2) {
$pw = $1 if (/$ase\:$user\:(.+)/);
} else {
die "Unexpected format of file $file";
}
}
close(PW);
$pw =~ s/([\$\@\%\\])/\\$1/g;
foreach my $table (sort(keys %{$DBEntries->{$db}->{'tables'}})) {
foreach my $column (sort(keys %{$DBEntries->{$db}->{'tables'}->{$table}})) {
if (exists($DBEntries->{$db}->{'tables'}->{$table}->{$column}->{'value'})) {
$value = $DBEntries->{$db}->{'tables'}->{$table}->{$column}->{'value'};
# Replace parameter in $value if necessary.
$value =~ s/\$//g;
foreach my $tmp (keys %$DestValues) {
$value =~ s/$tmp/$DestValues->{$tmp}/eg;
}
# Generate isql command.
$entry = "$isql -U$user -D$DBname -S$ase -w200<<EOSql" .
"\n$pw" .
"\nset nocount on" .
"\ngo" .
"\nupdate $table set $column = $value" .
"\ngo" .
"\nEOSql";
$ExitCode += SybaseQuery($entry, "Updating table $table, column" .
" $column with value $value");
} else {
foreach my $wherecol (sort(keys %{$DBEntries->{$db}->{'tables'}->{$table}->{$column}})) {
foreach my $whereval (sort(keys
%{$DBEntries->{$db}->{'tables'}->{$table}->{$column}->{$wherecol}})) {
$value = $DBEntries->{$db}->{'tables'}->{$table}->{$column}->{$wherecol}->{$whereval};
# Replace parameter in $value if necessary.
$value =~ s/\$//g;
foreach my $tmp (keys %$DestValues) {
$value =~ s/$tmp/$DestValues->{$tmp}/eg;
}
# Generate isql command.
$entry = "$isql -U$user -D$DBname -S$ase -w200<<EOSql" .
"\n$pw" .
"\nset nocount on" .
"\ngo" .
"\nupdate $table set $column = $value" .
"\n where $wherecol = $whereval" .
"\ngo" .
"\nEOSql";
$ExitCode += SybaseQuery($entry, "Updating table $table, column" .
" $column with value $value where" .
" $wherecol = $whereval");
}
}
}
}
}
}
return $ExitCode;
}
###############################################################################
# Replaces alias settings in the table sysalternates. Needs sa rights for this.
# Old entries are deleted first.
###############################################################################
sub ReplaceDBUsers {
my ($DBList,$DestValues) = @_;
my $ExitCode = 0;
my @UserList;
# Set path to isql command
my $isql = $DestValues->{'OpenClient'} . '/' . $DestValues->{'SYBASE_OCS'} .
'/bin/isql';
# Replace users in database.
foreach my $db (keys %$DBList) {
# Remove $-sign in front of db name.
(my $DBname = $db) =~ s/^\$//;
$DBname = $DestValues->{$DBname};
# User name in database.
my $user = $DBList->{$db}->{'User'};
# Get password to login as user $user.
my $pw;
# Remove $-sign in front of file name
(my $file = $DBList->{$db}->{'File'}) =~ s/^\$//;
$file = "$ENV{HOME}/scripts/.cfg/" . $DestValues->{$file};
# Remove $-sign in front of ase name
(my $ase = $DBList->{$db}->{'ASE'}) =~ s/^\$//;
$ase = $DestValues->{$ase};
# Get password from file $file.
open(PW, $file) || die "Can not read file $file";
while (<PW>) {
chomp; # no newline
s/#.*//; # no comment
s/^\s+//; # no leading white
s/\s+$//; # no trailing white
next unless length; # anything left?
my $num = ($_ =~ tr/://); # No. of column separators in file
if ($num == 1) {
$pw = $1 if (/$ase:(.+)/);
} elsif ($num == 2) {
$pw = $1 if (/$ase\:$user\:(.+)/);
} else {
die "Unexpected format of file $file";
}
}
close(PW);
#$pw =~ s/([\$\@\%\\])/\\$1/g;
# Correct alias definitions to ro user in database
# Add missing alias definitions
my $entry = "$isql -U$user -D$DBname -S$ase -w200<<EOSql\n" .
"$pw" .
"\nset nocount on" .
"\ngo" .
"\nselect l.name into #tbd_$DBname" .
"\n from master..syslogins l left outer join sysalternates a" .
"\n on a.suid = l.suid where l.name like \"ro_%\" and " .
"\n l.name <> 'ro_profile' and a.suid is NULL" .
"\ngo" .
"\ndeclare \@n varchar(32)" .
"\ndeclare \@cmd varchar(64)" .
"\nwhile 1=1" .
"\nbegin" .
"\n set rowcount 1" .
"\n select \@n = name from #tbd_$DBname" .
"\n if \@\@rowcount = 0 break" .
"\n delete #tbd_$DBname where name = \@n" .
"\n set rowcount 0" .
"\n select \@cmd = 'sp_addalias ' + \@n + ', ro'" .
"\n exec(\@cmd)" .
"\nend" .
"\ngo" .
"\ndrop table #tbd_$DBname" .
"\ngo" .
"\nEOSql";
$ExitCode += SybaseQuery($entry,"Adding of aliases");
# Remove alias definitions to suid, that do not exist.
my $serverName = substr($DBname,-4);
if ($serverName == "_MLC") {
$serverName = $DestValues->{'MLC_Server'};
} elsif ($serverName == "_REP") {
$serverName = $DestValues->{'REP_Server'};
} else {
$serverName = $DestValues->{'FIN_Server'};
}
my $cmd = "/bin/ssh syb157\@$serverName \". ~/.bash_profile; " .
"~/scripts/shells/run_isql.sh -U sa_murex -S $ase -D $DBname " .
"-i ~/scripts/sql/nordlb/purge_sysalternates.sql; " .
"/bin/tac ~/scripts/log/run_isql_\$(/bin/date '+%Y%m%d').log | " .
"/bin/grep 'STATUS = ' | /bin/head -1\" | /bin/sed 's/STATUS = //'";
$ExitCode += `$cmd`;
}
return $ExitCode;
}
##############################################################################
# Execute a sybase script.
##############################################################################
sub SybaseQuery {
my ($entry,$msg) = @_;
my $ExitCode = 0;
# Execute command and return output to this program.
open(ISQL,"$entry 2>&1 |") || warn "ISQL command failed";
# Print error messages of command.
while (<ISQL>) {
if (! /^(\(? row affected\)|Password:|\(return status = 0\)|Alias user|Your password will expire in|New user
added|User has been dropped|No login with the specified name exists)/) {
print $_;
$ExitCode++;
}
}
close(ISQL); # Close the pipe.
warn "$msg failed" if ($ExitCode);
return $ExitCode;
}
##############################################################################
# Replace the links configured in DestinationConfigFile.
##############################################################################
sub ReplaceLinks {
use Cwd;
my ($LinkList,$DestValues) = @_;
my $ExitCode = 0;
my $HOME = $DestValues->{MurexHome};
my $olddir = cwd;
foreach my $link (sort(keys %$LinkList)) {
my $newdir = $HOME . '/' . dirname($link);
chdir($newdir) || die "Can not chdir to directory $newdir!\n";
my $linkname = basename($link);
if (! -l $linkname) {
warn "$linkname is not a link! Go on to next...";
$ExitCode++; # Prevent an exit code of zero.
next;
}
if (! unlink($linkname)) { # Remove link.
warn "Can not delete link $link!\n";
$ExitCode++;
next;
}
# Replace placeholders in link with values from DestValues hash.
my $target = $LinkList->{$link};
foreach my $key (sort (keys %$DestValues)) {
if ($target =~ /\$$key/) {
$target =~ s/\$$key/$DestValues->{$key}/;
}
}
# If file system where the link is pointing to is not a full path,
# add the path of the environment to the target path.
if (! ($target =~ m-^/-)) {$target = $HOME . '/' . $target};
if (! symlink($target,$linkname)) {
# Create new link.
"Can not create link $link!\n";
$ExitCode++;
next;
}
chdir($olddir) || die "Can not move back to directory $olddir!";
}
return $ExitCode;
}
##############################################################################
# Grant full rights to set of users by inserting new entries in MX_USER_GROUP_DBF
##############################################################################
sub GrantFullRightsDBEntries {
my ($DestValues) = @_;
my $ExitCode = 0;
my $SkipJob = 0;
my ($statment, $usersList, $groupsList, $dbParameters, $userPass) = "";
$dbParameters = `grep "FullRights:DatabaseParameters" $settings | grep -v "#" | cut -d'=' -f2`;
$usersList = `grep "FullRights:UsersList" $settings | grep -v "#" | cut -d'=' -f2`;
$usersList =~ s/\s+$//;
$groupsList = `grep "FullRights:GroupsList" $settings | grep -v "#" | cut -d'=' -f2`;
$groupsList =~ s/\s+$//;
my ($serverName, $dbName, $userName, $userConfigFile) = split(/,/,$dbParameters);
if (!defined($usersList) || ($usersList eq "")) {
print "Users list is not defined, will skip the part related to giving users full rights\n";
$SkipJob ++;
$ExitCode ++;
}
if (!defined($groupsList) || ($groupsList eq "")) {
print "Groups list is not defined, will skip the part related to giving users full rights\n";
$SkipJob ++;
$ExitCode ++;
}
if (!defined($dbParameters) || ($dbParameters eq "")) {
print "DB parameters are not defined, will skip the part related to giving users full rights\n";
$SkipJob ++;
$ExitCode ++;
}
# if basic parameters are not there, no need to continue or it means the Mx3_Settings.cf is not in line with environsettings.pl
if ($SkipJob > 0) {
return $ExitCode;
}
if (!defined($serverName) || ($serverName eq "")) {
print "ASE servername could not be retrieved from $dbParameters\n";
$ExitCode ++;
}
elsif ($serverName =~ /\$/ ) {
# replace the $servername by its value from the destination environment cf file
$serverName =~ s/^\$//g;
$serverName = `grep $serverName $dest | cut -d'=' -f2`;
$serverName =~ s/^\s+|\s+$//g;
if (!defined($serverName) || ($serverName eq "")) {
print "ASE servername could not be retrieved from $dest\n";
$ExitCode ++;
}
}
if (!defined($dbName) || ($dbName eq "")) {
print "Database name could not be retrieved from $dbParameters\n";
$ExitCode ++;
}
elsif ($dbName =~ /\$/ ) {
# replace the $dbName by its value from the destination environment cf file
$dbName =~ s/^\$//g;
$dbName = `grep $dbName $dest | cut -d'=' -f2`;
$dbName =~ s/^\s+|\s+$//g;
if (!defined($dbName) || ($dbName eq "")) {
print "Database name could not be retrieved from $dest\n";
$ExitCode ++;
}
}
if (!defined($userName) || ($userName eq "")) {
print "Username could not be retrieved from $dbParameters\n";
$ExitCode ++;
}
elsif ($userName =~ /\$/ ) {
# replace the $userName by its value from the destination environment cf file
$userName =~ s/^\$//g;
$userName = `grep $userName $dest | cut -d'=' -f2`;
$userName =~ s/^\s+|\s+$//g;
print "User name $userName\n";
if (!defined($userName) || ($userName eq "")) {
print "User name could not be retrieved from $dest\n";
$ExitCode ++;
}
}
if (!defined($userConfigFile) || ($userConfigFile eq "")) {
print "ASE user config file could not be retrieved from $dbParameters\n";
$ExitCode ++;
}
elsif ($userConfigFile =~ /\$/ ) {
# replace the $userConfigFile by its value from the destination environment cf file if it is pointing to another variable
$userConfigFile =~ s/^\$//g; # removing the dollar sign
$userConfigFile =~ s/^\s+//; # removing blank space from left side
$userConfigFile =~ s/\s+$//; # removing blank space from right side
$userConfigFile = `grep $userConfigFile $dest | cut -d'=' -f2` ;
$userConfigFile =~ s/^\s+//; # removing blank space from left side from the new retrieved value
$userConfigFile =~ s/\s+$//; # removing blank space from right side from the new retrieved value
}
$userConfigFile = "$ENV{HOME}/scripts/.cfg/" . $userConfigFile;
if (!defined($userConfigFile) || ($userConfigFile eq "")) {
print "User config filename could not be retrieved from $dest\n";
$ExitCode ++;
}
$userPass = `grep $serverName $userConfigFile | cut -d':' -f2`;
$userPass =~ s/^\s+//; # removing blank space from left side
$userPass =~ s/\s+$//; # removing blank space from right side
if (!defined($userPass) || ($userPass eq "")) {
print "User password could not be retrieved from $userConfigFile\n";
$ExitCode ++;
}
my $isql = $DestValues->{'OpenClient'} . '/' . $DestValues->{'SYBASE_OCS'} . '/bin/isql';
# Generate isql command.
my $insertStm = "$isql -U$userName -D$dbName -S$serverName -w200<<EOSql" .
"\n$userPass" .
"\nset nocount on" .
"\ngo" .
"\ninsert into MX_USER_GROUP_DBF " .
"\nselect USR.M_REFERENCE, GRP.M_REFERENCE " .
"\nfrom MX_USER_DBF USR, MX_GROUP_DBF GRP " .
"\nwhere USR.M_LABEL in ($usersList) " .
"\nand GRP.M_LABEL in ($groupsList) " .
"\nand convert(varchar, USR.M_REFERENCE) + ';' + convert(varchar,GRP.M_REFERENCE) " .
"\nnot in (select convert(varchar, M_USER_ID) + ';' + convert(varchar,M_GROUP_ID) from MX_USER_GROUP_DBF) " .
"\ngo" .
"\nEOSql";
$ExitCode += SybaseQuery($insertStm, "Granting full rights by inserting into MX_USER_GROUP_DBF");
# Generate isql command.
my $updateStm = "$isql -U$userName -D$dbName -S$serverName -w200<<EOSql" .
"\n$userPass" .
"\nset nocount on" .
"\ngo" .
"\nupdate MX_USER_POLICY_DBF " .
"\nset M_PRV_P_U = 300 " .
"\n where M_NAME in ('__AdminUsers__', '__StandardUsers__') " .
"\ngo" .
"\nEOSql";
$ExitCode += SybaseQuery($updateStm, "Extending the expiry of the passwords");
return $ExitCode;
}
</pre></code>
</html>
<html>
<h3>Inhalt murex06.cf: </h3>
<code><pre>
# Configuration file for murex06 - Test Mx.3 Environment.
# General settings
StartUser = muradm
StartGroup = murex
# Port number of Mx.3 services.
ServerName = tlmxps42
FQDN = tlmxps42.nlbapp.f-i-verbund.de
SiteName = nlb-murex06
DefaultHub = hub-xml
Fileserver = 9601
XMLServer = 9602
DocServer = tlmxps42.nlbapp.f-i-verbund.de
DocPort = 8207
Murexnet = 9604
SOAPServer = 9605
XMLHub = 9606
MailServerPort = 25
MailServerHost = 172.20.144.53
PrimaryName = tlmxps42
SecondaryName = tlmxss4
# Hubs for branches, including Hannover
HubHan = 9620
HubLux = 9621
HubSgp = 9622
HubLon = 9623
HubNYC = 9624
HubSha = 9625
HubMD = 9626
HubHan2 = 9640
HubLux2 = 9641
HubSgp2 = 9642
HubLon2 = 9643
HubNYC2 = 9644
HubSha2 = 9645
# Installation directory of this environment.
MurexHome = /murex/murex06
JavaHome = /opt/murex/java/jdk1.7.0_51
PythonHome = /opt/murex/python/2.5.1
# Database parameters.
OpenClient = /opt/murex/sybase/ocs_157_100
SYBASE_OCS = OCS-15_0
FIN_Server = tlmxdb41.nlbapp.f-i-verbund.de
FIN_Name = MXTST8
FIN_Port = 8008
DB_Name = MX_TST06_FIN
# Passwords configured in Mx.3
INSTALpw = 005000910051005600870057008000970006000000870077
CONFIGpw = 00f0008100800077000700e7
MUREXBOpw = 00e00063005200a5006700f500f500520043003200800010
MUREXFOpw = 00a00052009200f500d40080006700a2001300f2002500c5
SUPERVISORpw = 00d0003300b20085007500d000b60052000300e2005400a4
MUREXTECHpw = 00e100a100210050008700a600a6005000400021
MNT_ADMpw = 001000830082008500d4006500b4005200930012000000b0
INSTALLERpw = 0050009100510056008700570057
INSTALfile = install.cfg
DBOfile = dbouser.cfg
# MLC database and port numbers.
MLC_Server = tlmxdb41.nlbapp.f-i-verbund.de
MLC_Name = MXTST8
MLC_Port = 8008
MLC_DB = MX_TST06_MLC
MLC_JLS = 9610
MLC_LRB = 9611
MLC_XML_PROXY = 9612
MLC_Enabled = 1
# MLC users
MLC_LTSuser = SUPERVISOR
MLC_LTSpw = 00d0003300b20085007500d000b60052000300e2005400a4
MLC_LRBuser = SUPERVISOR
MLC_LRBpw = 00d0003300b20085007500d000b60052000300e2005400a4
MLC_EODuser = MLC_EOD
MLC_EODpw = 009000810020003000b600c7009600f10070004100e700d7
MLC_LIMITSpw = 000000e100b0008700d600a600800097000600b000d700a7
# Datamart database and port numbers
REP_Server = tlmxdb41.nlbapp.f-i-verbund.de
REP_Name = MXTST8
REP_Port = 8008
REP_DB = MX_TST06_REP
# RTBS configurations
RTBS_Username = murex
RTBS_LocalIP = 2.109.14.54
RTBS_Sessionname = TEST::SSL
RTBS_RFAport = 9632
RTBS_FIXINGport = 9633
# Should be removed later
RTIport = 9630
RTIcache = 9632
RTIfxg = 9633
# OpenDACS configuration
DacsSite = Hannover
DacsAuthHost = 14.170.0.23
DacsAuthPort = 8211
DacsEnable = true
# Port numbers for monitoring service.
FED_ALL_SERVICES = 9650
FED_RTMS = 9651
FED_FO_POS = 9652
FED_MXMLEXCHANGE = 9653
FED_MPC = 9654
FED_HTTP_ALL_SERVICES = 9655
FED_VIT_RMI_PORT = 9656
FED_PFE_RMI_PORT = 9657
FED_PFE_HTTP_PORT = 9658
# ADD cross task
ADD_CrossTask = 9670
INSTALNITpw = 123;37;-119;20;1;-69;-38;8;-49;34;-46;50;75;-18;-26;52;-76;61;-115;
# PFE engine settings
TM_Engines = 12
TM_MX_Engines = 6
# Archive path
Archive = ../../psarchive/local/murex06
# UBS Secure Client
UBS_LOGIN = ccd00015
UBS_PW = noConnection
# DHB
DHBFtpUser = mddthypftp_test
DHBFtpPW = qzafsz3m
# DHB Secondary
DHB_FtpUser_Sec = mddthypftp_test
DHB_FtpPW_Sec = qzafsz3m
# Three60t
Three60tName = 360T TradeImporter for NordLB.TEST - Integration
Archive = ../../psarchive/local/murex06
# UBS Secure Client
UBS_LOGIN = ccd00015
UBS_PW = noConnection
# DHB
DHBFtpUser = mddthypftp_test
DHBFtpPW = qzafsz3m
# DHB Secondary
DHB_FtpUser_Sec = mddthypftp_test
DHB_FtpPW_Sec = qzafsz3m
# Three60t
Three60tName = 360T TradeImporter for NordLB.TEST - Integration
Three60tTitle = 360T TradeImporter for NordLB.TEST - Integration
Three60tDescription = 360T TradeImporter for NordLB.TEST for Integration purpose
Three60tPW = l5TgsY7rVMu83g7
Three60thttpUrl = http://tex-int.360t.com/clients/nordlb2/ti/nordlb2Ti.jnlp
Three60thttpsUrl = https://tex-int.360t.com/clients/nordlb2/ti/nordlb2Ti.jnlp
Three60tFtpUser = tex360tftp_test
Three60tFtpPW = mouzzg5x
# MessageDB
# MsgDB connection parameter
MurexEnv = murex06
MsgDB_ConnectionURL = jdbc:db2://db2ie01.nlbapp.f-i-verbund.de:60006/FEMSGDB
MsgDB_Login = MSGDBTU
MsgDB_Pw = noConnection
# Title of the envirionment (client window and mail from address)
Title = Murex06
Description = Murex06 -- FITS
TitleColour = dark
</pre></code>
</html>
<html>
<h3>Inhalt prod.cf: </h3>
<code><pre>
# Configuration file for PROD Mx.3 Environment.
# $Id: prod.cf,v 1.14 2017/04/09 20:09:59 pb Exp $
# General settings
StartUser = muradm
StartGroup = murex
# Port number of Mx.3 services.
ServerName = hlmxps41
FQDN = hlmxps41.nlbapp.f-i-verbund.de
SiteName = nlb-prod
DefaultHub = hub-xml
Fileserver = 8201
XMLServer = 8202
DocServer = hlmxps41.nlbapp.f-i-verbund.de
DocPort = 8203
Murexnet = 8204
SOAPServer = 8205
XMLHub = 8206
MailServerPort = 25
MailServerHost = 172.20.144.53
PrimaryName = hlmxps42
SecondaryName = hlmxss4
# Hubs for branches, including Hannover
HubHan = 8220
HubLux = 8221
HubSgp = 8222
HubLon = 8223
HubNYC = 8224
HubSha = 8225
HubMD = 8226
HubHan2 = 8240
HubLux2 = 8241
HubSgp2 = 8242
HubLon2 = 8243
HubNYC2 = 8244
HubSha2 = 8245
# Installation directory of this environment.
MurexHome = /murex/prod
JavaHome = /opt/murex/java/jdk1.7.0_51
PythonHome = /opt/murex/python/2.5.1
Java_1_8 = /opt/murex/java/jdk1.8.0_152
# Database parameters.
OpenClient = /opt/murex/sybase/ocs_157_100
SYBASE_OCS = OCS-15_0
FIN_Server = hlmxdb41.nlbapp.f-i-verbund.de
FIN_Name = MXPROD2
FIN_Port = 8002
DB_Name = MX_PROD
# Passwords configured in Mx3
INSTALpw = 008100a300e3002000d6008500f000d70023006700640075
CONFIGpw = 00b1001200b0009400a000d500c600d7001200f700450075
MUREXBOpw = 008000660032005400c600e400d000d200700043007000e4
MUREXFOpw = 0090003300f70077006500c60006001200f60082003000e5
SUPERVISORpw = 00f100260082006000d500b600f400a3000200e700550047
MUREXTECHpw = 00e100a100210050008700a600a6005000400021
MNT_ADMpw = 00d0001600b2005500d000c400e4002200f000e7000500f6
INSTALLERpw = 00810020000200e500c60094000000a70063007700f500a6
INSTALfile = install.cfg
DBOfile = dbouser.cfg
# MLC database and port numbers.
MLC_Server = hlmxdb42.nlbapp.f-i-verbund.de
MLC_Name = MXPROD3
MLC_Port = 8003
MLC_DB = MX_PROD_MLC
MLC_JLS = 8210
MLC_LRB = 8211
MLC_XML_PROXY = 8212
MLC_Enabled = 1
# MLC users
MLC_LTSuser = SUPERVISOR
MLC_LTSpw = 00f100260082006000d500b600f400a3000200e700550047
MLC_LRBuser = SUPERVISOR
MLC_LRBpw = 00f100260082006000d500b600f400a3000200e700550047
MLC_EODuser = MLC_EOD
MLC_EODpw = 009000810020003000b600c7009600f10070004100e700d7
MLC_LIMITSpw = 008100a300a2002500d70010009000b300930032009000a6
# Datamart database and port numbers
REP_Server = hlmxdb42.nlbapp.f-i-verbund.de
REP_Name = MXPROD3
REP_Port = 8003
REP_DB = MX_PROD_REP
# RTBS configurations
RTBS_Username = murex
RTBS_LocalIP = 2.109.62.53
RTBS_Sessionname = Murex::SSL
RTBS_RFAport = 8232
RTBS_FIXINGport = 8233
# Should be removed later
RTIport = 8230
RTIcache = 8232
RTIfxg = 8233
# OpenDACS configuration
DacsSite = Hannover
DacsAuthHost = 14.170.0.23
DacsAuthPort = 8211
DacsEnable = true
# Proxy settings
ProxyHost = 14.169.4.38
ProxyPort = 8080
# Port numbers for monitoring service.
FED_ALL_SERVICES = 8250
FED_RTMS = 8251
FED_FO_POS = 8252
FED_MXMLEXCHANGE = 8253
FED_MPC = 8254
FED_HTTP_ALL_SERVICES = 8255
FED_VIT_RMI_PORT = 8256
FED_PFE_RMI_PORT = 8257
FED_PFE_HTTP_PORT = 8258
# ADD cross task
ADD_CrossTask = 8270
INSTALNITpw = 123;37;-119;20;1;-69;-38;8;-46;1;-7;85;94;-61;-31;55;-28;64;-94;-38;
# PFE engine settings
TM_Engines = 24
TM_MX_Engines = 6
# Archive path
Archive = ../../psarchive/local/prod
# UBS Secure Client
UBS_LOGIN = ccp00015
UBS_PW = 3EdcvgZ7
# DHB
DHBFtpUser = mddthypftp
DHBFtpPW = 1vi11g
# DHB Secondary
DHB_FtpUser_Sec = mddthypftp
DHB_FtpPW_Sec = 1vi11g
# MessageDB
# MsgDB connection parameter
MurexEnv = prod
MsgDB_ConnectionURL = jdbc:db2://db2ip51.nlbapp.f-i-verbund.de:60510/FPMSGDB
MsgDB_Login = MSGDBTU
MsgDB_Pw = 3demV5aXF1OHdlZVh1!v
# Three60t
Three60tName = 360T TradeImporter for NordLB - Production
Three60tTitle = 360T TradeImporter for NordLB - Production
Three60tDescription = 360T TradeImporter for NordLB for Production purpose
Three60tPW = Osei3aeyeiT9
Three60thttpUrl = http://tex.360t.com/clients/nordlb2/ti/nordlb2Ti.jnlp
Three60thttpsUrl = https://tex.360t.com/clients/nordlb2/ti/nordlb2Ti.jnlp
Three60tFtpUser = tex360tftp
Three60tFtpPW = 6yu2u9
# Title of the envirionment (client window and mail from address)
Title = Mx3_Production
Description = Mx3_Production -- FITS
TitleColour = blue
</code></pre>
</html>
<html>
<ul>
<li>C_E_TP.REP, Trade details</li>
<li>C_E_TRN_CPDF.REP, Counterparty informations</li>
<li>C_E_SE_HEAD.REP, Security informations</li>
<li>C_E_TRN_HEADER.REP, Trade informations ??</li>
</ul>
</html>
<html>
RichClient → Config → Housekeeper → Database → Datamodel → Struct Datamodel <br />
→ Tab “Tables“ auswählen & den zu suchenden Tabellennamen eintragen <br />
→ Liste der Tabellen erscheint → Auf die gesuchte Tabelle doppelt klicken <br />
→ ein neues Fenster erscheint <br />
</html>
<html>
<ul>
<li>MxML-Exchnage Data Dictionary unterstützt folgende zwei XSLT-Engines:<br />
<br />
<ol>
<li> Xalan (2.7.1)</li>
<li> SaxonEE</li>
</ol>
</li>
<br />
<li> Um zwischen den beiden Engines umzuschalten, muss im File <br />
<b>"public/mxres/mxdictionary/client/datadictionaryxslparser.mxres"</b><br />
der folgende Eintrag geändert:<br />
<b><MxAnchor Code="XsltProcessorName">Xalan|Saxon</MxAnchor></b><br />
<br />
(Bei NordLB gab es noch das File im Verzeicnis "fs/murex/mxres") </li>
</ul>
</html>
<html>
There are two files that need to edited in the MX application directory in order to allow the MxML exchange workflow to function correctly for MLC.<br />
<br />
• The first file to be edited is <b>mxmlexguimonitor.mxres</b>, which is located in <MX>/fs/public/mxres/mxmlexchange/client/gui/, with the addition of a new reference to an MLC jar, mxmlc-mx3.jar.<br>
<code>
<Location><br>
<JarFile>mxmlc-mx3.jar</JarFile><br>
<Packages><br>
<Package><br>
<Name>murex.mx</Name><br>
<Recursive>Y</Recursive><br>
</Package><br>
</Packages><br>
</Location><br>
</code>
<br>
• The second file to be edited <b>mxmlexspaceworkflow.mxres</b>, which is located in <MX>/fs/murex/mxres/mxmlexchange/spaces/, with alteration of the column width parameter for the db field STPDOC_REF. Search the file for the location where the <DbKeyFieldName> equals STPDOC_REF, edit the <DbKeyFieldLength> parameter from 20 to 30.<br>
<br>
The reason for second edition is to allow workflow objects to have references longer than 20 characters. Currently many Credit Indices & Baskets have names with a length longer than 20 characters and without this change alterations to these objects will not be passed to the MxML exchange workflow.<br>
<br>
Please note that the file mxmlexspaceworkflow.mxres will need to be updated every time a new MX binary is installed as this file will be overwritten each time once this is taken into production (it will be included in the golden copy spreadsheet).<br>
<br>
After completing the above alteration please restart all services at a time that is convenient.<br>
</html>
<html>
MxMLExchange basiert auf folgende drei Dienste:<br>
<br>
<b>* dem MXMLEXCHANGE-Dienst</b><br>
manages workflow data handling, configuration,<br>
database management and monitoring<br>
<br>
folgende Server-Prozesse bilden den Service:<br>
- MXMLEXCHANGE server : processing<br>
- MXMLEXCHANGE.SPACES : data layer management<br>
- MXMLEXCHANGE.LAUNCHER : launches remote tasks<br>
<br>
<b>* dem MXDICTIONARY-Dienst</b><br>
handles various types of formulae creation,<br>
execution and template execution<br>
<br>
folgende Server-Prozesse bilden den Service:<br>
- MXDICTIONARY.SPACES : formulae definitions storage<br>
- MXDICTIONARY.REMOTE : execution from the GUI<br>
<br>
<b>* dem MXTEMPLATES-Dienst</b><br>
handles confirmation creation and maintenance<br>
<br>
folgende Server-Prozesse bilden den Service:<br>
- MXTEMPLATES.SPACES : temlates definitions storage<br>
</html>
<html>
<code><pre>help <BEFEHL></pre></code>
Beispiel:
<code><pre>help <SHOW></pre></code>
⇒ Ausgabe:
<code><pre>
mysql> help show
Name: 'SHOW'
Description:
SHOW has many forms that provide information about databases, tables,
columns, or status information about the server. This section describes
those following:
SHOW AUTHORS
SHOW {BINARY | MASTER} LOGS
SHOW BINLOG EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count]
SHOW CHARACTER SET [like_or_where]
SHOW COLLATION [like_or_where]
SHOW [FULL] COLUMNS FROM tbl_name [FROM db_name] [like_or_where]
SHOW CONTRIBUTORS
SHOW CREATE DATABASE db_name
SHOW CREATE EVENT event_name
SHOW CREATE FUNCTION func_name
SHOW CREATE PROCEDURE proc_name
SHOW CREATE TABLE tbl_name
SHOW CREATE TRIGGER trigger_name
SHOW CREATE VIEW view_name
SHOW DATABASES [like_or_where]
SHOW ENGINE engine_name {STATUS | MUTEX}
SHOW [STORAGE] ENGINES
SHOW ERRORS [LIMIT [offset,] row_count]
SHOW EVENTS
SHOW FUNCTION CODE func_name
SHOW FUNCTION STATUS [like_or_where]
SHOW GRANTS FOR user
SHOW INDEX FROM tbl_name [FROM db_name]
SHOW MASTER STATUS
SHOW OPEN TABLES [FROM db_name] [like_or_where]
SHOW PLUGINS
SHOW PROCEDURE CODE proc_name
SHOW PROCEDURE STATUS [like_or_where]
SHOW PRIVILEGES
SHOW [FULL] PROCESSLIST
SHOW PROFILE [types] [FOR QUERY n] [OFFSET n] [LIMIT n]
SHOW PROFILES
SHOW RELAYLOG EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count]
SHOW SLAVE HOSTS
SHOW SLAVE STATUS
SHOW [GLOBAL | SESSION] STATUS [like_or_where]
SHOW TABLE STATUS [FROM db_name] [like_or_where]
SHOW [FULL] TABLES [FROM db_name] [like_or_where]
SHOW TRIGGERS [FROM db_name] [like_or_where]
SHOW [GLOBAL | SESSION] VARIABLES [like_or_where]
SHOW WARNINGS [LIMIT [offset,] row_count]
like_or_where:
LIKE 'pattern'
| WHERE expr
If the syntax for a given SHOW statement includes a LIKE 'pattern'
part, 'pattern' is a string that can contain the SQL % and _ wildcard
characters. The pattern is useful for restricting statement output to
matching values.
Several SHOW statements also accept a WHERE clause that provides more
flexibility in specifying which rows to display. See
http://dev.mysql.com/doc/refman/5.5/en/extended-show.html.
URL: http://dev.mysql.com/doc/refman/5.5/en/show.html
</pre></code>
</html>
<html>
<ul>
<li>In den Server einloggen:
<code><pre>mysql -u root -p</pre></code></li>
<li>Befehl:<br />
<code><pre>SELECT User, Host, Password FROM mysql.user;</pre></code>
⇒ Ausgabe:<br />
<code><pre>
+------------------+---------------+-------------------------------------------+
| user | host | password |
+------------------+---------------+-------------------------------------------+
| root | localhost | *DD5540D8EC4CFFDC8B9C6FA7AC9B5E20522BC3DB |
| root | debian-laptop | *DD5540D8EC4CFFDC8B9C6FA7AC9B5E20522BC3DB |
| root | 127.0.0.1 | *DD5540D8EC4CFFDC8B9C6FA7AC9B5E20522BC3DB |
| root | ::1 | *DD5540D8EC4CFFDC8B9C6FA7AC9B5E20522BC3DB |
| debian-sys-maint | localhost | *BB5BD4554E1744C643F917150B7D9BA91F148B1D |
+------------------+---------------+-------------------------------------------+
5 rows in set (0.00 sec)</pre></code>
</li>
</ul>
<h3>Link:</h3>
<a href="https://www.rosehosting.com/blog/mysql-show-users/" target="_blank">RoseHosting-Blog :: MySQL Show Users</a>
</html>
<html>
<ul>
<li>In MySQL or MariaDB, anytime you make a change to the database, <br />
that particular event is logged.<br />
</li>
<li>For example, when you create a new table, or update data on an existing <br />
table, those events are stored in the binary logs.<br />
</li>
<li><u>Binary log</u> is very helpful in MySQL replication, where the main server<br />
will send the data from the binary logs to the remote servers.<br />
</li>
<li>You'll also be dealing with binary log files when you are performing<br />
any kind of recovery operations in MySQL.<br />
</li>
<li><b>mysqlbinlog</b> command is used to view the content of the binary log in a <br />
readable user friendly format. You'll also use the mysqlbinlog command<br />
to read the content and pipe it to other mysql utilities.<br />
</li>
<li>In this tutorial, we'll discuss the following examples using mysqlbinlog command:<br />
<ol>
<li>Get a List of Current Binary Logs</li>
<li>Mysqlbinlog Default Behavior</li>
<li>Get Entries for a Specific Database</li>
<li>Disable Binary log for Recovery</li>
<li>Control base-64 BINLOG in the Output</li>
<li>Debug Messages in mysqlbinlog Output</li>
<li>Skip First N number of Entries</li>
<li>Save Output to a File</li>
<li>Extract Entries starting from a Specific Position</li>
<li>Extract Entries upto a Specific Position</li>
<li>Flush Logs for Clean Binlog Output</li>
<li>Display Only SQL Queries in the Output</li>
<li>View Entries starting from a Specific Time</li>
<li>View Entries upto a Specific Time</li>
<li>Get Binary Log from a Remote Server</li>
</ol>
<h3>1. Get a List of Current Binary Logs</h3>
From mysql, execute the following show binary logs command which will <br />
display all the binary logs in your system.
<pre><code>mysql> SHOW BINARY LOGS;
+-------------------+-----------+
| Log_name | File_size |
+-------------------+-----------+
| mysqld-bin.000001 | 15740 |
| mysqld-bin.000002 | 3319 |
…
… </code></pre>
If you are system doesn't have the binary logging enabled, then you'll <br />
see the following error message.
<pre><code>
mysql> SHOW BINARY LOGS;
ERROR 1381 (HY000): You are not using binary logging
</code></pre>
By default, the binary log files are located under the /var/lib/mysql directory as shown <br />
below.
<pre><code>
# ls -l /var/lib/mysql/
-rw-rw----. 1 mysql mysql 15740 Aug 16 14:57 mysqld-bin.000001
-rw-rw----. 1 mysql mysql 3319 Aug 16 14:57 mysqld-bin.000002
…
…
</code></pre>
<h3>2. Mysqlbinlog Default Behavior</h3>
The following will display the content of the specified mysql binary log file (for example: mysqld-bin.000001) in a user friendly format.
<pre><code>
# mysqlbinlog mysqld-bin.000001
</code></pre>
The following is the partial output of the above command:
<pre><code>
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#170726 14:57:37 server id 1 end_log_pos 106 Start: binlog v 4, server v 5.1.73-log created 170726 14:57:37 at startup
# Warning: this binlog is either in use or was not closed properly.
ROLLBACK/*!*/;
BINLOG '
IeZ4WQ8BAAAAZgAAAGoAAAABAAQANS4xLjczLWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAh5nhZEzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC
'/*!*/;
# at 106
#170726 14:59:31 server id 1 end_log_pos 182 Query thread_id=2 exec_time=0 error_code=0
SET TIMESTAMP=1501095571/*!*/;
SET @@session.pseudo_thread_id=2/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
…
…
# at 14191
#170726 15:20:38 server id 1 end_log_pos 14311 Query thread_id=4 exec_time=0 error_code=0
SET TIMESTAMP=1501096838/*!*/;
insert into salary(name,dept) values('Ritu', 'Accounting')
/*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
</code></pre>
The above command will display events that happened on all the database <br />
on that system.<br />
<br />
<b>Note:</b><br />
When you execute mysqlbinlog command, you might sometime get this error message
<pre><code>
unknown variable default-character-set=utf8
</code></pre>
in that case, use the – –set-charset option in the mysqlbinlog to set <br />
appropriate character set. <br />
Another option would be to add the “loose-default-character-set=utf8“to your<br />
/etc/my.cnf file under the [client] section.<br />
<br />
If you are new to MySQL, this will help:<br />
<a href="http://www.thegeekstuff.com/2017/06/install-mariadb-mysql/" target="_blank" >6 Steps to Install and Configure MariaDB MySQL on Linux</a>
<h3>3. Get Entries for a Specific Database</h3>
The default output of mysqlbinlog can be overwhelming, as it will display <br />
lot of data from all the statements.<br />
<br />
Using -d option, you can also specify a database name, which will display <br />
on the events that happens on the given database.<br />
<br />
The following command will dump all the events that belongs to “crm“ database <br />
into the crm-events.txt file:
<pre><code>
mysqlbinlog -d crm mysqld-bin.000001 > crm-events.txt
</code></pre>
Instead of -d option, you can also use – –database option as shown below.
<pre><code>
mysqlbinlog --database crm mysqld-bin.000001 > crm-events.txt
</code></pre>
<h3>4. Disable Binary log for Recovery</h3>
When you are using mysqlbinlog to restore from a database crash, you <br />
don't want your restore process to create binary logs. If it does, then <br />
you'll be in an loop, where you'll keep on restoring, as the <br />
restore itself will generate new binary log files.<br />
<br />
So, to disable the binary log when you are using the mysqlbinlog command, <br />
use the -D option as shown below:
<pre><code>
mysqlbinlog -D mysqld-bin.000001
</code></pre>
You can also use – –disable-log-bin as shown below. The following is <br />
exactly same as the above command.
<pre><code>
mysqlbinlog --disable-log-bin mysqld-bin.000001
</code></pre>
Note: In the output, when you specify the -D option, you'll see the<br />
additional 2nd line in the output. i.e the one which says SQL_LOG_BIN=0.
<pre><code>
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!32316 SET @OLD_SQL_LOG_BIN=@@SQL_LOG_BIN, SQL_LOG_BIN=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
</code></pre>
This option will also be helpful when you are – –to-last-log option. Also, <br />
keep in mind that you need root privilege to execute this command.<br />
<br />
For backup and restore, you'll typically use mysqldump command, but <br />
sometimes in a situation where you have to recover from a crash, mysqlbinlog is helpful.
<h3>5. Control base-64 BINLOG in the Output</h3>
Using base64-output option, you can control the behavior of when the <br />
output statement should be base64-encoded BINLOG statements.<br />
<br />
The following are possible values for base64-output:
<ul>
<li>never</li>
<li>always</li>
<li>decode-rows</li>
<li>auto (this is default)</li>
</ul>
* <b>never</b>: When you specify “never“ as shown below, this will <br />
display the base64-encoded BINLOG statements in the output.
<pre><code>
mysqlbinlog --base64-output=never mysqld-bin.000001
</code></pre>
i.e When you use “never“, in the output of the mysqlbinlog command, you'll <br />
not any lines that are similar to the following which has the base64-encoded BINLOG.
<pre><code>
BINLOG '
IeZ4WQ8BAAAAZgAAABAAQANS4xLjczLWxvZwAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAh5nhZEzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC
</code></pre>
Please note that the above “never“ option for the base64-output will work on <br />
binary log files when they don't contain the row-based events.<br />
<br />
* <b>always</b>: When you specify “always“ option, this will display only the <br />
BINLOG entries whenever possible. So, use this only when you specifically debugging some <br />
issues.
<pre><code>
mysqlbinlog --base64-output=always mysqld-bin.000001
</code></pre>
The following is the output of the above with “always“, which shows only the BINLOG entries.
<pre><code>
BINLOG '
IeZ4WQ8BAAAAZgAAAGoAAAABAAQANS4xLjczLWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAh5nhZEzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC
'/*!*/;
# at 106
#170726 14:59:31 server id 1 end_log_pos 182
BINLOG '
k+Z4WQIBAAAATAAAALYAAAAIAAIAAAAAAAAADAAAGgAAAEAAAAEAAAAAAAAAAAYDc3RkBAgACAAI
AHRoZWdlZWtzdHVmZgBCRUdJTg==
'/*!*/;
# at 182
#170726 14:59:30 server id 1 end_log_pos 291
BINLOG '
kuZ4WQIBAAAAbQAAACMBAAAAAAIAAAAAAAAADAAAGgAAAEAAAAEAAAAAAAAAAAYDc3RkBAgACAAI
AHRoZWdlZWtzdHVmZgBJTlNFUlQgSU5UTyB0IFZBTFVFUygxLCAnYXBwbGUnLCBOVUxMKQ==
'/*!*/;
# at 291
#170726 14:59:30 server id 1 end_log_pos 422
BINLOG '
kuZ4WQIBAAAAgwAAAKYBAAAAAAIAAAAAAAAADAAAGgAAAEAAAAEAAAAAAAAAAAYDc3RkBAgACAAI
AHRoZWdlZWtzdHVmZgBVUERBVEUgdCBTRVQgbmFtZSA9ICdwZWFyJywgZGF0ZSA9ICcyMDA5LTAx
LTAxJyBXSEVSRSBpZCA9IDE=
</code></pre>
* <b>decode-rows</b>: This option will decode the row based events into comented SQL <br />
statements, especially when you specify – –verbose option also along with <br />
it as shown below.
<pre><code>
mysqlbinlog --base64-output=decode-rows --verbose mysqld-bin.000001
</code></pre>
* <b>auto</b>: This is the default option. When you don't specify any base64-decode <br />
option, then it will use auto. In that case, mysqlbinlog will print the BINLOG entries only for <br />
certain event types like row-based events and format description events.<br />
<br />
Both the following statements are exactly the same.
<pre><code>
mysqlbinlog --base64-output=auto mysqld-bin.000001
mysqlbinlog mysqld-bin.000001
</code></pre>
<h3>6. Debug Messages in mysqlbinlog Output</h3>
The following debug-check option will check for open file and memory use after <br />
it finish processing the given binary log file.
<pre><code>
mysqlbinlog --debug-check mysqld-bin.000001
</code></pre>
The following debug-info option will display additional debugging option after it <br />
finish processing the given binary log file as shown below.
<pre><code>
# mysqlbinlog --debug-info mysqld-bin.000001 > /tmp/m.di
User time 0.00, System time 0.00
Maximum resident set size 2848, Integral resident set size 0
Non-physical pagefaults 863, Physical pagefaults 0, Swaps 0
Blocks in 0 out 48, Messages in 0 out 0, Signals 0
Voluntary context switches 1, Involuntary context switches 2
</code></pre>
<h3>7. Skip First N number of Entries</h3>
Instead of reading the whole mysql binary log file, you can also read only <br />
certain portion of it by specifying offset.<br />
<br />
For this use -o option. -o stands for offset.<br />
<br />
The following will skip the first 10 entries in the specified mysql bin log.
<pre><code>
mysqlbinlog -o 10 mysqld-bin.000001
</code></pre>
To make sure this works properly, give a hug number for the offset, and you'll<br />
not see any entries. The following will skip the first 10,000 entries (events) from the log.<br />
<br />
In this example, since this particular log file doesn't have 10,000 entries, <br />
it it nos showing any database events in the output.
<pre><code>
# mysqlbinlog -o 10000 mysqld-bin.000001
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
..
..
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
</code></pre>
<h3>8. Save Output to a File</h3>
You can use the simple Linux redirection command > and store the <br />
output to a file as shown below.
<pre><code>
mysqlbinlog mysqld-bin.000001 > output.log
</code></pre>
Or, you can use the -r (result file) option as shown below to store the output in a file. <br />
Please note that -r and – –result-file are the same.
<pre><code>
mysqlbinlog -r output.log mysqld-bin.000001
</code></pre>
Note: You can also specify – –server-id and extract log entries that are <br />
generated by a mysql server with the given server id.
<pre><code>
mysqlbinlog --server-id=1 -r output.log mysqld-bin.000001
</code></pre>
<h3>9. Extract Entries starting from a Specific Position</h3>
Typically in mysql binary log file, you'll see position numbers as shown<br />
below. The following is a partial output of the mysqlbinlog, where you see “15028“ <br />
is a position number.
<pre><code>
#170726 15:38:14 server id 1 end_log_pos 15028 Query thread_id=5 exec_time=0 error_code=0
SET TIMESTAMP=1501097894/*!*/;
insert into salary values(400,'Nisha','Marketing',9500)
/*!*/;
# at 15028
#170726 15:38:14 server id 1 end_log_pos 15146 Query thread_id=5 exec_time=0 error_code=0
SET TIMESTAMP=1501097894/*!*/;
insert into salary values(500,'Randy','Technology',6000)
</code></pre>
The following command will start reading the binary log entries fro position number 15028.
<pre><code>
mysqlbinlog -j 15028 mysqld-bin.000001 > from-15028.out
</code></pre>
When you specify multiple binary log files in the command line, then the start<br />
position will be applied only to the first binary log in the given list.<br />
<br />
You can use -H option to get a hex dump of the given binary log files as shown<br />
below.
<pre><code>
mysqlbinlog -H mysqld-bin.000001 > binlog-hex-dump.out
</code></pre>
<h3>10. Extract Entries upto a Specific Position</h3>
Just like the previous example, you can also read entries from a mysql binary<br />
log upto a specific position as shown below.
<pre><code>
mysqlbinlog --stop-position=15028 mysqld-bin.000001 > upto-15028.out
</code></pre>
The above example will stop from the binlog exactly at position 15028. When<br />
you specify multiple binary log files in the command line, then the stop position<br />
will be applied only to the last binary log in the given list.
<h3>11. Flush Logs for Clean Binlog Output</h3>
When a binary log was not closed properly, you'll see a warning <br />
message in the output as shown below.
<pre><code>
# mysqlbinlog mysqld-bin.000001 > output.log
</code></pre>
As you see here, it says the binlog file was not closed properly.
<pre><code>
# head output.log
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
..
..
# Warning: this binlog is either in use or was not closed properly.
…
…
BINLOG '
IeZ4WQ8BAAAAZgAAAGoAAAABAAQANS4xLjczLWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAh5nhZEzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC
</code></pre>
When you see that, then connect to the mysql and flush the logs as shown below.
<pre><code>
mysql> flush logs;
</code></pre>
Once you flush the logs, and execute your mysqlbinlog command again, you'll<br />
not see that binlog not closed properly warning message anymore in your <br />
mysqlbinlog output.
<h3>12. Display Only SQL Queries in the Output</h3>
By default, as you see in output of previous examples, apart from the SQL queries, <br />
you'll also see some additional information in the mysqlbinlog output.<br />
<br />
If you only want the regular SQL queries and nothing else, then use the <b>-s option</b> <br />
as shown below.<br />
<br />
-s here stands for short form. You can also use – –short-form option. Both <br />
the following examples are exactly the same.
<pre><code>
mysqlbinlog -s mysqld-bin.000001
mysqlbinlog -short-form mysqld-bin.000001
</code></pre>
The following is partial output of the above command. As you see here, it displays<br />
only the SQL queries from the given binary log file.
<pre><code>
SET TIMESTAMP=1501096106/*!*/;
insert into employee values(400,'Nisha','Marketing',9500)
/*!*/;
SET TIMESTAMP=1501096106/*!*/;
insert into employee values(500,'Randy','Technology',6000)
…
…
</code></pre>
You'll not see entires like the following in the short-form:
<pre><code>
# at 1201
#170726 15:08:26 server id 1 end_log_pos 1329 Query thread_id=3 exec_time=0 error_code=0
</code></pre>
<h3>13. View Entries starting from a Specific Time</h3>
The following will extract only the entries that are starting from the specified time. <br />
Any entries before this time will be ignored.
<pre><code>
mysqlbinlog --start-datetime="2017-08-16 15:00:00" mysqld-bin.000001
</code></pre>
This is very helpful when you want to extract data from a binary file from only a <br />
specific time frame that you want to use it to recover or reconstruct certain data–<br />
base activities that happened within that time period.<br />
<br />
The format of the timestamp can be anything that is understood by the MYSQL <br />
server DATETIME and TIMESTAMP types. So, you have lot of flexibility here.
<h3>14. View Entries upto a Specific Time</h3>
Just like the previous start time example, you can also specify stop time as shown below.
<pre><code>
mysqlbinlog --stop-datetime="2017-08-16 15:00:00" mysqld-bin.000001
</code></pre>
The above command will read the entries upto the given stop time. Any entries from the <br />
mysql binary log file that are beyond the given stop time will not be processed.
<h3>15. Get Binary Log from a Remote Server</h3>
From your local machine, you can also read the mysql binary logs that is located<br />
in a remote server.<br />
<br />
For this, you need to specify the ip-address, username and password for the <br />
remote server as explained below.<br />
<br />
Use -R option for this. -R option is same as – –read-from-remote-server.
<pre><code>
mysqlbinlog -R -h 192.168.101.2 -p mysqld-bin.000001
</code></pre>
In the above:
<ul>
<li>-R option instructs mysqlbinlog command to read the log file from the remote server</li>
<li>-h specify the ip-address of the remote server</li>
<li>-p This will prompt you for the password. By default, it will use “root“ as the username. <br />
You can also specify an username using -u option.</li>
<li>mysqld-bin.000001 This is the name of the binary log file from the remote server that we are reading here.</li>
</ul>
The following command is exactly same as the above command:
<pre><code>
mysqlbinlog --read-from-remote-server --host=192.168.101.2 -p mysqld-bin.000001
</code></pre>
The following is the partial output of the above command:
<pre><code>
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#170726 13:57:37 server id 1 end_log_pos 106 Start: binlog v 4, server v 5.1.73-log created 170726 13:57:37 at startup
ROLLBACK/*!*/;
BINLOG '
IeZ4WQ8BAAAAZgAAAGoAAAAAAAQANS4xLjczLWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAh5nhZEzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC
'/*!*/;
# at 106
#170726 13:59:31 server id 1 end_log_pos 182 Query thread_id=2 exec_time=0 error_code=0
..
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
</code></pre>
If you specify only the -h option, you'l get the following error message.
<pre><code>
# mysqlbinlog -h 192.168.101.2 mysqld-bin.000001
mysqlbinlog: File 'mysqld-bin.000001' not found (Errcode: 2)
</code></pre>
When you don't have enough privilege on the remote database, then you'll <br />
get the following “is not allowed to connect“ error message. In this case, make <br />
sure you grant proper privileges on the remote database for your local client (i.e where <br />
mysqlbinlog command is running)
<pre><code>
# mysqlbinlog -R --host=192.168.101.2 mysqld-bin.000001
ERROR: Failed on connect: Host '216.172.166.27' is not allowed to connect to this MySQL server
</code></pre>
If you don't specify the proper password using the -p option, you'll get <br />
the following “access denied“ error message
<pre><code>
# mysqlbinlog -R --host=192.168.101.2 mysqld-bin.000001
ERROR: Failed on connect: Access denied for user 'root'@'216.172.166.27' (using password: YES)
</code></pre>
The following example shows that you can also use -u option to specify the username that mysqlbinlog should use to connect to the remote MySQL database. Please note that this user is mysql user (not Linux server user).
<pre><code>
mysqlbinlog -R --host=192.168.101.2 -u root -p mysqld-bin.000001
</code></pre>
<br />
Link:<br />
<a href="http://www.thegeekstuff.com/2017/08/mysqlbinlog-examples/" target="_blank">The Geek Stuff :: 15 mysqlbinlog Command Examples for MySQL Binary Log Files</a>
</html>
<html>
Um sich den Aufbau einer Tabelle einzuzeigen, ist <br />
der “describe“-Befehl zu verwenden:
<code><pre>describe <i><TableName></i>;</pre></code>
bzw. <code><pre>desc <i><TableName></i>;</pre></code>
<br />
Das ist eine Abkürzung für
<code><pre>SHOW COLUMNS FROM <i><TableName></i>;</pre></code>
⇒ Beispiel:<br />
<code><pre>
mysql> describe ANGESTELLTER;
+------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+-------+
| id | decimal(5,0) | NO | PRI | NULL | |
| name | varchar(100) | NO | | NULL | |
| vorname | varchar(50) | YES | | NULL | |
| gehalt | decimal(8,2) | YES | | NULL | |
| kommission | decimal(8,2) | YES | | NULL | |
| chef | decimal(5,0) | YES | MUL | NULL | |
+------------+--------------+------+-----+---------+-------+
6 rows in set (0.00 sec)
</pre></code>
</html>
<html>
<h3>Überprüfen, ob der MySQL Server “is up and running“</h3>
<pre><code> mysqladmin -u root -p ping</code></pre>
<h3>Ermitteln, welche Version gerade läuft</h3>
<pre><code> mysqladmin -u root -p version</code></pre>
⇒ Beispiel-Ausgabe:
<pre><code> mysqladmin Ver 8.42 Distrib 5.1.36, for suse-linux-gnu on x86_64
Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license
Server version 5.1.36-log
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/run/mysql/mysql.sock
Uptime: 1 min 33 sec
Threads: 1 Questions: 2 Slow queries: 0 Opens: 15 Flush tables: 1 Open tables: 8 Queries per second avg: 0.21</code></pre>
<h3>Ermitteln, welchen aktuellen Status der MySQL Server hat</h3>
<pre><code> mysqladmin -u root -p status</code></pre>
⇒ Beispiel-Ausgabe:
<pre><code>Uptime: 231 Threads: 1 Questions: 3 Slow queries: 0 Opens: 15 Flush tables: 1 Open tables: 8 Queries per second avg: 0.12</code></pre>
<h3>Anzeige aller MySQL Server Statusvariablen und deren aktueller Wert</h3>
<pre><code> mysqladmin -u root -p extended-status</code></pre>
⇒ Beispiel-Ausgabe:
<pre><code> +-----------------------------------+----------+
| Variable_name | Value |
+-----------------------------------+----------+
| Aborted_clients | 0 |
| Aborted_connects | 0 |
| Binlog_cache_disk_use | 0 |
| Binlog_cache_use | 0 |
| Bytes_received | 313 |
| Bytes_sent | 558 |
| Com_admin_commands | 1 |
| Com_assign_to_keycache | 0 |
| Com_alter_db | 0 |
(to be continued ...)
</code></pre>
<h3> Anzeige aller MySQL Server Systemvariablen und deren aktueller Wert</h3>
<pre><code> mysqladmin -u root -p variables</code></pre>
⇒ Beispiel-Ausgabe:
<pre><code> +-----------------------------------+---------------------------------------------------+
| Variable_name | Value |
+-----------------------------------+---------------------------------------------------+
| auto_increment_increment | 1 |
| auto_increment_offset | 1 |
| autocommit | ON |
| automatic_sp_privileges | ON |
| back_log | 50 |
| basedir | /usr/ |
| big_tables | OFF |
| binlog_cache_size | 32768 |
| binlog_format | MIXED |
| bulk_insert_buffer_size | 8388608 |
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
(to be continued ...)
</code></pre>
<h3> Anzeigen aller laufenden Prozesse/Anfragen in der MySQL Datenbank</h3>
<pre><code> mysqladmin -u root -p processlist</code></pre>
⇒ Beispiel-Ausgabe:
<pre><code> +----+------+-----------+----+---------+------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+------+-----------+----+---------+------+-------+------------------+
| 7 | root | localhost | | Query | 0 | | show processlist |
+----+------+-----------+----+---------+------+-------+------------------+
</code></pre>
Dieses Kommando kann benutzt werden, um Performance-Probleme zu <br />
debuggen und die Query, die Probleme bereitet, ausfindig zu machen,<br />
indem das Kommando automatisch jede Sekunde ("-i 1") gestartet <br />
wird:
<pre><code> mysqladmin -u root -p -i 1 processlist </code></pre>
<h3> Erzeugen einer MySQL Datenbank</h3>
<pre><code> mysqladmin -u root -p create <dbname></code></pre>
Anmerkung:<br />
Um alle Tabellen in der Datenbank anzuzeigen, ist das Kommando "<b>mysqlshow</b>"<br />
zu verwenden
<h3> Löschen/Droppen einer MySQL Datenbank</h3>
<pre><code> mysqladmin -u root -p drop <dbname></code></pre>
<h3> Reload/Refresh der Privilegien- oder Grant-Tabellen</h3>
<pre><code> mysqladmin -u root -p reload</code></pre>
<pre><code> mysqladmin -u root -p refresh</code></pre>
<h3> Herunterfahren einer MySQL Datenbank</h3>
<pre><code> mysqladmin -u root -p shutdown</code></pre>
<h3> Auflistung aller <code>mysqladmin flush</code>–Befehle</h3>
<pre><code> mysqladmin -u root -p flush_{hosts | logs | privileges | status | tables | threads}</code></pre>
<h3> Killen eines hängenden MySQL Client Prozesses</h3>
zuerst die ID des Client Prozesses ermitteln:
<pre><code> mysqladmin -u root -p processlist</code></pre>
dann mittels "kill" den Prozess abschiessen:
<pre><code>mysqladmin -u root -p kill <pid></code></pre>
<h3> Starten/Stoppen der MySQL replication auf einem Slave-Server</h3>
<pre><code> mysqladmin -u root -p stop-slave</code></pre>
<pre><code> mysqladmin -u root -p start-slave</code></pre>
<h4> Anmerkung</h4>
Es ist auch möglich, mehrere Befehle zusammen in <br />
einem Aufruf zu verwenden:
<pre><code>mysqladmin -u root -p process status version</code></pre>
oder:
<pre><code>mysqladmin -u root -p pro stat verfügbaren <em>????</em></code></pre>
<h3>!!!ACHTUNG!!</h3>
Innerhalb von SQL hat AND eine höhere Precedence als OR. <br />
<br />
If you use both operators, it is a good idea to use <br />
parentheses to indicate explicitly how conditions should<br />
be grouped.<br />
<br />
The default sort order is ascending, with smallest values first.<br />
<br />
The order is undefined for columns that are identical except<br />
for their case. You can force a case-sensitive sort for a name<br />
of a column by using BINARY like so: ORDER BY BINARY col_name.<br />
<br />
<h3>Links</h3>
<ul>
<li><a href="https://www.thegeekstuff.com/2009/01/15-practical-usages-of-mysqladmin-command-for-administering-mysql-server/" t
arget="_blank" rel="noreferrer noopener">
TheGeekStuff :: MySQLAdmin</a>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>Syntax:</h3>
<code>mysqlshow [options] [db_name [tbl_name [col_name]]]</code><br />
<br />
Shows the structure of a MySQL database (databases, tables, and columns).<br />
<br />
<ul>
<li> If no database is given, a list of database names is shown.<br />
<br />Example:<br />
<code><pre>mysqlshow -u root -p -v</pre></code>
⇒ Output:<br /><code><pre>+--------------------+--------+
| Databases | Tables |
+--------------------+--------+
| information_schema | 40 |
| DVDSTAR | 13 |
| JOINS | 4 |
| mysql | 24 |
| performance_schema | 17 |
+--------------------+--------+
5 rows in set.
</pre></code></li>
<br />
<li>If no table is given, all matching tables in the database are shown.<br />
<br />Example:<br />
<code><pre>mysqlshow -u root -p -v JOINS</pre></code>
⇒ Output:<br /><code><pre>Database: JOINS
+--------+----------+
| Tables | Columns |
+--------+----------+
| DREI | 2 |
| EINS | 2 |
| GRUPPE | 4 |
| ZWEI | 2 |
+--------+----------+
4 rows in set.
</pre></code></li>
<br />
<li>If no column is given, all matching columns and column types in the table are shown.<br />
<br />Example:<br />
<code><premysqlshow -u root -p -v JOINS DREI</pre></code>
⇒ Output:<br /><code><pre>Database: JOINS Table: DREI
+-------+------------+-------------------+------+-----+---------+-------+---------------------------------+---------+
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
+-------+------------+-------------------+------+-----+---------+-------+---------------------------------+---------+
| c | varchar(2) | latin1_swedish_ci | YES | | | | select,insert,update,references | |
| d | varchar(2) | latin1_swedish_ci | YES | | | | select,insert,update,references | |
+-------+------------+-------------------+------+-----+---------+-------+---------------------------------+---------+
</pre></code></li>
<br />
<li> The output displays only the names of those databases, tables, or columns<br />
for which you have some privileges.</li>
</ul>
</li>
<br />
<li>The mysqlshow client can be used to quickly see which databases exist, <br />
their tables, or a table's columns or indexes.<br />
<br />
<li>mysqlshow provides a command-line interface to several SQL SHOW <br />
statements. See Section 13.7.5, “SHOW Syntax“. <br />
<br />
The same information can be obtained by using those statements directly. <br />
For example, you can issue them from the mysql client program.<br />
<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>??? <em>an die Original-Quelle kann ich mich nicht erinnern</em>
</li>
<li><a href="https://www.thegeekstuff.com/2008/08/get-quick-info-on-mysql-db-table-column-and-index-using-mysqlshow/"
target="_blank" rel="noreferrer noopener">
The Geek Stuff :: mysqlshow – Get Quick Info On MySQL DB, Table, Column and Index</a>
</li>
</ul>
</html>
<html>
<a href="./pictures/mysql-cheat-sheet-v1.pdf" target="_blank"> Cheat Sheet</a>
</html>
<html>
<h2>3 Methods to Connect to MySQL from PHP using Example Code</h2>
<p>
To get most out of your MySQL database, it is important to understand how<br />
to connect from your custom PHP program to MySQL database.<br />
<br />
This tutorial explains the following three methods along with appropriate <br />
example PHP program, which will explain how to connect from your PHP<br />
to MySQL database.<br />
<br />
<ol>
<li>Connect using mysqli extension (Recommended)</li>
<li>Connect using PDO (Recommended)</li>
<li>Connect using traditional legacy mysql_ functions (Deprecated)</li>
</ol>
<br />
For this, you should install php-mysql package.<br />
<br />
On RedHat based distro including CentOS, use yum to install php-mysql as shown below.<br />
<code><pre>
yum install php-mysql
</pre></code>
Depending on your system, the above will either install or update the following dependencies:<br />
php
php-cli
php-common
php-pdo
php-pgsql
<br />
Once it is installed, the phpinfo page will display the mysql module as shown below:<br />
PHP MySQL Extension<br />
<br />
For all the examples below, we'll be connecting to a MySQL database that already exists. If you are new to MySQL, this is a good place to start: <a href="http://www.thegeekstuff.com/2011/10/mysql-tutorial-basics/">MySQL Beginners Guide</a>
<br />
Note: Everything that is explained here will also work with MariaDB, as it is same as MySQL.
</p>
<ol>
<li><h3>Connect from PHP Using mysqli Extension</h3>
mysqli stands for MySQL Improved.
Please note that on most distros (for example: CentOS), php-mysqli is already part of the php-mysql package. So, you don't have to search and look for the php-mysqli package. All you have to do is install the php-mysql package to get the mysqli extension working on your system.
Create the following mysqli.php file under the Apache DocumentRoot:
<code><pre>
<?php
$conn = new mysqli("localhost", "root", "mySecretDBpass", "thegeekstuff");
if ($conn->connect_error) {
die("ERROR: Unable to connect: " . $conn->connect_error);
}
echo 'Connected to the database.<br>';
$result = $conn->query("SELECT name FROM employee");
echo "Number of rows: $result->num_rows";
$result->close();
$conn->close();
?>
</pre></code>
In the above:
mysqli – This function will initiate a new connection using mysqli extension. This function will take these four arguments
hostname where the MySQL database is running
MySQL username to connect
Password for the mysql user
MySQL database to connect.
query function &ndash Use this to specify your MySQL query. In this example, we are selecting the name column from employee database.
Finally, we are displaying the number of rows selected using the num_rows variable in the result. We are also closing both the result and connection variable as shown above.
When you call the above mysqli.php from your browser, you'll see the following output, which indicates that PHP was able to connect to the MySQL database and fetch data.
Connected to the database.
Number of rows: 6
Note: If you are trying to connect to a remote MySQL database, then you may have to do this to avoid host not allowed error message: How to Allow MySQL Client to Connect to Remote MySQL server
</li>
<li><h3>Connect from PHP MySQL PDO Extension</h3>
PDO stands for PHP Data Objects.
PDO_MYSQL drive implements the PDO interface provided by PHP to connect from your PHP program to MySQL database.
On most Linux distros (for example: CentOS and RedHat), php-pdo package is already part of the php-mysql package. So, you don't have to search and look for the php-pdo package. All you have to do is install the php-mysql package to get the PDO_MYSQL PHP extension working on your system.
Create the following mysql-pdo.php file under your Apache DocumentRoot:
<code><pre>
<?php
try {
$conn = new PDO("mysql:host=localhost;dbname=thegeekstuff", "root", "mySecretDBpass");
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
echo 'Connected to the database.<br>';
$sql = 'SELECT name FROM employee';
print "Employee Name:<br>";
foreach ($conn->query($sql) as $row) {
print $row['name'] . "<br>";
}
$conn = null;
}
catch(PDOException $err) {
echo "ERROR: Unable to connect: " . $err⇒getMessage();
}
?>
</pre></code>
In the above:
new PDO – This will create a new PDO object which will take the following three arguments:
mysql connect string: This will be in the format of “mysql:host=$hostname;dbname=$dbname&ldquo. In the above example, the db is running on localhost and we are connecting to thegeekstuff database.
MySQL username to connect
Password for the mysql user
$sql variable – Create the sql query that you want to execute. In this example, we are selecting name column from employee table.
query($sql) – Here we are executing the sql query that we just created.
foreach – Here, we are looping through the output from the above query command and storing it in the $row variable, and then we are displaying it using print command.
In MySQL PDO, to close the connection, simply set the $conn variable to null value.
When you call the above mysqli.php from your browser, you'll see the following output, which indicates that PHP was able to connect to the MySQL database and fetch data.
Connected to the database.
Employee Name:
Thomas
Jason
Mayla
Nisha
Randy
Ritu
</li>
<li><h3>Connect from PHP Using Legacy mysql_ Functions (Deprecated)</h3>
Use this method only if you are using an older version of PHP and cannot upgrade it to the new version for some reason.
It is recommended that you use the Method#2 and Method#3 shown above instead of this method. I've included this method only for reference, and not as a recommendation to use.
This particular extension was deprecated as of PHP 5.5 version. But starting from PHP 7.0 version, this will not even work, as it was removed.
Starting from PHP 5.5 version, when you use these functions, it will generate E_DEPRECATED error.
Create the following mysql-legacy.php file under the Apache DocumentRoot:
<code><pre>
<?php
$conn = mysql_connect('localhost', 'root', 'mySecretDBpass');
mysql_select_db("thegeekstuff");
if (!$conn) {
die('ERROR: Unable to connect: ' . mysql_error());
}
echo 'Connected to the database.<br>';
$result = mysql_query('SELECT name FROM employee');
$row = mysql_fetch_row($result);
echo "Employee 1: ", $row[0], "<br>\n";
mysql_close($conn);
?>
</pre></code>
In the above:
mysql_connect function takes three argument: 1) hostname where the MySQL database is running 2) MySQL username to connect 3) Password for the mysql user. Here it is connecting to the MySQL database that is running on the local server using username root and its password.
mysql_select_db function – As the name suggests, this will pick the database that you want to connect to. This is equivalent to the “use“ command. In this example, we are connecting to the database thegeekstuff.
mysql_query function – Use this to specify your MySQL query. In this example, we are selecting the name column from employee database.
mysql_fetch_row – Use this function to fetch the rows from the SQL query that we just created.
Finally close the connection using mysql_close command as shown above.
When you call the above mysql-legacy.php from your browser, you'll see the following output, which indicates that PHP was able to connect to the MySQL database and fetch data.<br />
<br /><code>
Connected to the database.<br />
Employee 1: Thomas
</code>
</li>
</ol>
<p>
Link:
<a href="http://www.thegeekstuff.com/2017/05/php-mysql-connect/"> http://www.thegeekstuff.com/2017/05/php-mysql-connect/</a>
</p>
</html>
<html>
<meta "Datenbanken auflisten" />
<ul>
<li>Once you’ve installed and configured MySQL or MariaDB, the first step is to create a database.
</li>
<li>Only after creating a database, you can create tables and insert records.
</li>
<li>This tutorial explains the following examples that are used to create and manipulate a MySQL database:
<div id="tw-hreftoc"/>
<ol>
<li><a href="#tw-href1">Create New MySQL Database</a>
</li>
<li><a href="#tw-href2">Create MySQL DB with Specific Character Set (UTF8)</a>
</li>
<li><a href="#tw-href3">Delete Existing MySQL Database</a>
</li>
<li><a href="#tw-href4">Create MySQL DB Only If it Doesn’t Exists</a>
</li>
<li><a href="#tw-href5">Drop MySQL DB Only If it Exists</a>
</li>
<li><a href="#tw-href6">Alter Database Characteristics for db.opt</a>
</li>
<li><a href="#tw-href7">Upgrade Data Directory Option for Migration and Encoding</a>
</li>
</ol>
</li>
<br />
<li>Befehl, um vorhandene Datenbanken aufzulisten:
<pre><code>show databases;</code></pre>
</li>
<li><div id="tw-href1"/><h3>1. Create New MySQL Database</h3>
<ul>
<li>To create a MariaDB database, use the create database command as shown below.
</li>
<li>The following will create a database called “thegeekstuff”.
<pre><code>MariaDB [(none)]> CREATE DATABASE thegeekstuff;
Query OK, 1 row affected (0.00 sec)</code></pre>
</li>
<li>If you have background on Oracle database, don’t confuse the term “database” here.
</li>
<li>When we are creating a “database” in the MySQL, we are actually creating a “schema”. But in MySQL and MariaDB world, it is really called and referred as “database” instead of “schema”.
</li>
<li>But for some reason, if you prefer, you can also use the following “create schema” command to create a database. Create schema is nothing but a synonym for Create database.
</li>
<li>The following command is exactly same as the above create database.
<pre><code>MariaDB [(none)]> CREATE SCHEMA thegeekstuff;</code></pre>
</li>
<li>Please note that only users who have the CREATE privilege for the database can execute the above commands.
</li>
<li>In a typical situation, you’ll login to mysql as root and execute the above create database command.
<pre><code># mysql -u root -pMySecretPWD</code></pre>
</li>
<li>CREATE DATABASE creates a database with the given name. To use this statement, you need the CREATE privilege for the database. CREATE SCHEMA is a synonym for CREATE DATABASE.
</li>
<li>If you are new to MySQL, this will explain how to install MySQL MariaDB on Linux.
</ul>
<a href="#tw-hreftoc">back to TOC</a>
</li>
<div id="tw-href2"/>
<li><h3>2. Create MySQL DB with Specific Character Set (UTF8)</h3>
<ul>
<li>Create database will use whatever default character set from your system while creating a new database.
</li>
<li>But, if you know exactly what character set you want, you can specify them during the database creation as shown below.
</li>
<li>In the following example, we are creating a mariadb database called “tgs” with “utf8” charater set.
</li>
<li>Here we’ve also specified the collate along with character set.
<pre><code>MariaDB [(none)]> CREATE DATABASE tgs CHARACTER SET = utf8 COLLATE = utf8_general_ci;
Query OK, 1 row affected (0.00 sec)</code></pre>
</li>
<li>If you like to view all available character set on your system, use the following show character set command.
<pre><code>MariaDB [(none)]> SHOW CHARACTER SET;
+----------+-----------------------------+---------------------+--------+
| Charset | Description | Default collation | Maxlen |
+----------+-----------------------------+---------------------+--------+
| big5 | Big5 Traditional Chinese | big5_chinese_ci | 2 |
| dec8 | DEC West European | dec8_swedish_ci | 1 |
| cp850 | DOS West European | cp850_general_ci | 1 |
| hp8 | HP West European | hp8_english_ci | 1 |
| koi8r | KOI8-R Relcom Russian | koi8r_general_ci | 1 |
| latin1 | cp1252 West European | latin1_swedish_ci | 1 |
| latin2 | ISO 8859-2 Central European | latin2_general_ci | 1 |
…
…
| utf8 | UTF-8 Unicode | utf8_general_ci | 3 |</code></pre>
</li>
<li>When you specify a character set during create database, this information is stored in the db.opt file for that particular database.
</li>
<li>For example, for the “tgs” database, this db.opt file will be under /var/lib/mysql/tgs directory as shown below.
<pre><code># cat /var/lib/mysql/tgs/db.opt
default-character-set=utf8
default-collation=utf8_general_ci</code></pre>
</li>
<li>Once you’ve created a database, you can then create tables inside MySQL database.
</li>
</ul>
<a href="#tw-hreftoc">back to TOC</a>
</li>
<div id="tw-href3"/>
<li><h3>3. Delete Existing MySQL Database</h3>
<ul>
<li>To remove an existing mysql database from your system, use the drop database command as shown below.
The following will delete “thegeekstuff” database.
<pre><code>MariaDB [(none)]> DROP DATABASE thegeekstuff;</code></pre>
Few things to keep in mind:
As you can imagine, this is a dangerous commands, as this will drop all the tables along with data from the database and then deletes the database itself.
To execute this command you’ll need DROP privilege on the database.
Also, similar to create database and create schema, you can also use drop database and drop schema.
Both of the following commands are exactly the same.
<pre><code>MariaDB [(none)]> DROP DATABASE thegeekstuff;
MariaDB [(none)]> DROP SCHEMA thegeekstuff;</code></pre>
Once you drop a database, execute the show databases to make sure the database is not listed anymore.
<pre><code>MariaDB [(none)]> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+</code></pre>
When you drop the database, it will also delete the database directory along with all the files including the db.opt from the /var/lib/mysql folder as shown below.
<pre><code># ls -l /var/lib/mysql/thegeekstuff/
ls: cannot access /var/lib/mysql/thegeekstuff/: No such file or directory</code></pre>
One thing to keep in mind is that if you have manually created some file under your database directory (i.e /var/lib/mysql/thegeekstuff), then the above drop database command will not remove your custom files or the database directory itself. However, it will remove all other files that was created by the mysql server itself including the table files, etc.
On a related note, if you have created any TEMPORARY tables, they’ll not be removed. But, they’ll be removed automatically whenever the particular sessions that created it ends.
</ul>
<a href="#tw-hreftoc">back to TOC</a>
</li>
<div id="tw-href4"/>
<li><h3>4. Create MySQL DB Only If it Doesn’t Exists</h3>
<ul>
<li>As shown below, create database command by default will fail when you try to create a database that already exists.
<pre><code>MariaDB [(none)]> CREATE DATABASE thegeekstuff;
ERROR 1007 (HY000): Can't create database 'thegeekstuff'; database exists</code></pre>
That might be Ok if you are just doing it on command line, as you can imply ignore and move on.
But, if you are doing it inside a script, which checks for any error message from a SQL command and exists the script, then we have a problem.
In that case, use the “if not exists” clause along with create database as shown below.
This will create the database only if it doesn’t exists. But, when the database exists, it will not thrown any error message.
<pre><code>MariaDB [(none)]> CREATE DATABASE IF NOT EXISTS thegeekstuff;
Query OK, 1 row affected, 1 warning (0.00 sec)</code></pre>
Similar to the create database, you can also do drop database if exists clause as shown below.
<pre><code>DROP DATABASE IF EXISTS thegeekstuff;
DROP SCHEMA IF EXISTS thegeekstuff;</code></pre>
</ul>
<a href="#tw-hreftoc">back to TOC</a>
</li>
<div id="tw-href5"/>
<li><h3>5. Drop MySQL DB Only If it Exists</h3>
<ul>
<li>When you try to drop a database that doesn’t exists, you’ll get the following error message.
<pre><code>MariaDB [none]> DROP DATABASE thegeekstuff;
ERROR 1008 (HY000): Can't drop database 'thegeekstuff'; database doesn't exist</code></pre>
This might be Ok when you are doing it interactively from command line. But, if are executing the drop command from an automated script, and you don’t to see the error message, that might stop the script, then use the IF EXISTS clause as shown below.
Same behavior as the above command, but doesn’t return any error message.
<pre><code>MariaDB [none]> DROP DATABASE IF EXISTS thegeekstuff;
Query OK, 0 rows affected, 1 warning (0.00 sec)</code></pre>
</ul>
<a href="#tw-hreftoc">back to TOC</a>
</li>
<div id="tw-href6"/>
<li><h3>6. Alter Database Characteristics for db.opt</h3>
<ul>
<li>Using alter database command, you can change certain characteristics of your database.
Typically, you’ll use this to change the DB options that are set in the db.opt file.
For example, here we have the character set defined as LATIN for thegeekstuff database in the db.opt
<pre><code># cat /var/lib/mysql/thegeekstuff/db.opt
default-character-set=latin1
default-collation=latin1_swedish_ci
… </code></pre>
Now, to change this to UTF8, we can use the alter database command as shown below.
<pre><code>MariaDB [(none)]> ALTER DATABASE thegeekstuff CHARACTER SET = utf8 COLLATE = utf8_general_ci;
Query OK, 1 row affected (0.00 sec)</code></pre>
Anytime you execute an ALTER database command, you’ll see the value that you updated are reflected in the db.opt file as shown below.
<pre><code># cat /var/lib/mysql/thegeekstuff/db.opt
default-character-set=utf8
default-collation=utf8_general_ci</code></pre>
To execute the alter database command, you’ll see the ALTER privilege on the database.
Just like create and drop, you can also use “schema”. Both of the following are exactly the same, as ALTER SCHEMA is just a synonym to alter database.
<pre><code>ALTER DATABASE thegeekstuff CHARACTER SET = utf8 COLLATE = utf8_general_ci;</code></pre>
<pre><code>ALTER SCHEMA thegeekstuff CHARACTER SET = utf8 COLLATE = utf8_general_ci;</code></pre>
Also, note that you can omit the database name in the “ALTER” command when you are already inside the database as shown below.
As you see here, I did USE to change the database. So, in my ALTER DATABASE, I didn’t have to specify the database name.
<pre><code>MariaDB [(none)]> USE thegeekstuff;</code></pre>
<pre><code>MariaDB [thegeekstuff]> ALTER DATABASE CHARACTER SET = utf8 COLLATE = utf8_general_ci;
Query OK, 1 row affected (0.00 sec)</code></pre>
</ul>
<a href="#tw-hreftoc">back to TOC</a>
</li>
<div id="tw-href7"/>
<li><h3>7. Upgrade Data Directory Option for Migration and Encoding</h3>
<ul>
<li>If you are running an alter version of MySQL database (prior to 5.1), <br />
and trying to upgrade to a version of MySQL / MariaDB that is 5.1 or<br />
later, then you need to do this.
</li>
<li>The following command with the “upgrade data directory name” <br />
option will update the name of the database directory with the <br />
appropriate encoding implementation that matches the MySQL<br />
5.1 or above version.
</li>
<li>This will make sure the database name and database directory<br />
is mapped properly without any encoding issue in the name.
</li>
<li>Again, you’ll use this only when you are upgrading from an older<br />
version of MySQL to 5.1 or later version, AND when you have<br />
special characters in your database name as shown below which<br />
has hypen in the database name (i.e the-geek-stuff).
</li>
<li>Also, note that the “#mysql50#” is the keyword that should be<br />
used as it is followed by the database name:
<pre><code>ALTER DATABASE `#mysql50#the-geek-stuff` UPGRADE DATA DIRECTORY NAME;</code></pre>
</li>
<li>In this example, the above command will encode the database<br />
name properly as “the@002dgeek@002dstuff”, where it will <br />
use @002d for the dash special character in the database name.
</li>
</ul>
<a href="#tw-hreftoc">back to TOC</a>
</li>
</ul>
<h3>Link:</h3>
<ul>
<li><a href="https://www.thegeekstuff.com/2017/07/mysql-create-alter-drop-database/"
target="_blank" rel="noreferrer noopener">
TheGeekStuff :: 7 MySQL MariaDB Create, Alter, Drop Database Command Examples</a>
</li>
</ul>
</html>
<html>
<h3>The USE Command in MySQL</h3>
The syntax for the USE command is:
<code><pre><i>mysql></i> USE [DatabaseName];</pre></code>
For example, this code switches to the database named "Dresses."
<code><pre><i>mysql></i> USE Dresses;</pre></code>
After you select a database, it remains the default until you end <br />
the session or choose another database with the USE command.<br />
<h3>Link:</h3>
<a href="https://www.thoughtco.com/use-sql-command-2693990" target="_blank">Thought & Co-Blog</a>
</html>
<html>
<h3>Die aktuelle Datenbank ermitteln:</h3>
If you are unsure which database is currently in use, use the following code:
<code><pre>mysql> SELECT DATABASE();</pre></code>
This code returns the name of the database currently in use. <br />
If no database is currently in use, it returns NULL. <br />
<h3>Alle verfügbaren Datenbanken anzeigen:</h3>
<code><pre>mysql> SHOW DATABASES();</pre></code>
bzw.
<code><pre>mysql> SHOW DATABASES;</pre></code>
</html>
<html>
In any case, there are three possible values for the "Key" attribute:
<ul>
<li> PRI, primary key</li>
<li> UNI, unique key</li>
<li> MUL</li>
</ul>
The third possibility, MUL, is basically an index that is neither<br />
a primary key nor a unique key. The name comes from “multiple“<br />
because multiple occurences of the same value are allowed. <br />
<br />
Straight from the MySQL documentation:<br />
<code>
If Key is MUL, the column is the first column of a <br />
nonunique index in which multiple occurrences of<br />
a given value are permitted within the column.
</code><br />
<br />
There is also a final caveat:<br />
<code>
If more than one of the Key values applies to a<br />
given column of a table, Key displays the one<br />
with the highest priority, in the order PRI, UNI, MUL.
</code><br />
<br />
(https://stackoverflow.com/questions/5317889/sql-keys-mul-vs-pri-vs-uni#15268888)
</html>
<html>
<h3>Wie man ermittelt, unter welchem User man eingeloggt ist:</h3>
Actually, you need to use two functions:
<ul>
<li><pre><code>SELECT USER();</code></pre>
</li>
<li><pre><code>CURRENT_USER();</code></pre>
</li>
</ul>
<b>USER()</b> reports how you attempted to authenticate in MySQL<br />
<br />
<b>CURRENT_USER()</b> reports how you were allowed to authenticate in MySQL<br />
<br />
Sometimes, they are different.<br />
<br />
<h3>Link:</h3>
<ul>
<li><a href="https://superuser.com/questions/266758/how-do-i-see-which-user-i-am-logged-in-as-in-mysql"
target="_blank" rel="noreferrer noopener">
StackOverflow :: how do I see which user I am logged in as in MySQL?</a>
</li>
</ul>
</html>
<html>
<code>mysql> select version(), current_date;</code>
<br /><br />
⇒ Beispielausgabe:<br />
<code><pre>
+-----------------+--------------+
| version() | current_date |
+-----------------+--------------+
| 5.5.58-0+deb8u1 | 2018-01-13 |
+-----------------+--------------+
1 row in set (0.00 sec)
</pre></code>
<br />
weitere Funktionen:<br />
- current_time<br />
- curdate()<br />
- curtime()<br />
- current_timestamp()<br />
- user() :: Mit welchem Account bin ich eingeloggt?<br />
- now() :: Ausgabe des aktuellen Datums und Uhrzeit<br />
- database() :: Welche Datenbanken sind auf dem Server installiert resp. vorhanden?<br />
<br />
Anmerkung:<br />
es können mehrere select-Statements, die durch Semikolons (";") getrennt sind, abgegeben werden<br />
</html>
<html>
<ul>
<li>It seems odd that this directory was not<br />
created at install - have you manually<br />
changed the path of the socket file in <br />
the my.cfg?
</li>
<li>Have you tried simply creating this di-<br />
rectory yourself, and restarting the ser-<br />
vice?
</li>
<li><pre><code>mkdir -p /var/run/mysqld
chown mysql:mysql /var/run/mysqld</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://stackoverflow.com/questions/42153059/mysqld-safe-directory-var-run-mysqld-for-unix-socket-file-dont-exists"
target="_blank" rel="noreferrer noopener">
StackOverflow :: mysqld_safe Directory '/var/run/mysqld' for UNIX socket file don't exists</a>
</li>
</ul>
</html>
<html>
<code><pre>ERROR 1366 (HY000): Incorrect string value: '\xFCl\xF6 sc...' for
column 'testcolumn' at row 1
Query OK, 1 row affected (0.06 sec) </pre></code>
<br />
→ Die einfachste Möglichkeit, diesen Fehler zu umgehen, ist die folgende:<br />
Jedes Mal, wenn Sie sich mit der Eingabeaufforderung gegen den MySQL-<br />
Server verbinden, geben Sie als erstes folgenden Befehl ein:<br />
<code><pre>mysql> set names cp850;
Query OK, 0 rows affected (0.06 sec) </pre></code>
</html>
<html>
<meta clear screen clear />
<ul>
<li>To clear the console, you need to add the \! symbol before the clear command.
</li>
<li>The \! symbol can be used in mysql client to execute a system shell command. The syntax is as shown below:
<pre><code>\! <em>shell-command</em></code></pre>
</li>
<li>When you’re in a Unix-like OS like Linux or macOS, you can clear the mysql console screen with the following command:
<pre><code>mysql> \! clear
# clears the mysql console screen</code></pre>
</li>
<li>Alternatively, you can also use the <code>CTRL + L</code> command to clear the screen.
</li>
<li>If you’re accessing MySQL from the Command Prompt in Windows OS, then you need to replace the clear command with the <code>cls</code> command.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://sebhastian.com/mysql-clear-screen/"
target="_blank" rel="noreferrer noopener">
Nathan Sebastian :: How to clear MySQL console screen</a>
</li>
</ul>
</html>
<html>
<h3>How To Grant Different User Permissions</h3>
Here is a short list of other common possible permissions that users can enjoy.
<table border="1">
<tr><td> ALL PRIVILEGES</td><td> as we saw previously, this would allow a MySQL user full access to a designated database (or if no database is selected, global access across the system)</td></tr>
<tr><td> CREATE</td><td> allows them to create new tables or databases</td></tr>
<tr><td> DROP</td><td> allows them to them to delete tables or databases</td></tr>
<tr><td> DELETE</td><td> allows them to delete rows from tables</td></tr>
<tr><td> INSERT</td><td> allows them to insert rows into tables</td></tr>
<tr><td> SELECT</td><td> allows them to use the SELECT command to read through databases</td></tr>
<tr><td> UPDATE</td><td> allow them to update table rows</td></tr>
<tr><td> GRANT OPTION</td><td> allows them to grant or remove other users' privileges</td></tr>
</table>
To provide a specific user with a permission, you can use this framework:
<code><pre>GRANT type_of_permission ON database_name.table_name TO 'username'@'localhost';</pre></code>
If you want to give them access to any database or to any table, make sure to put an asterisk (*) in the place of the database name or table name.
Each time you update or change a permission be sure to use the Flush Privileges command.
If you need to revoke a permission, the structure is almost identical to granting it:
<code><pre>REVOKE type_of_permission ON database_name.table_name FROM 'username'@'localhost';</pre></code>
Note that when revoking permissions, the syntax requires that you use FROM, instead of TO as we used when granting permissions.
You can review a user's current permissions by running the following:
<code><pre>SHOW GRANTS FOR username;</pre></code>
Just as you can delete databases with DROP, you can use DROP to delete a user altogether:
<code><pre>DROP USER 'username'@'localhost';</pre></code>
To test out your new user, log out by typing:
<code><pre>quit</pre></code>
and log back in with this command in terminal:
<code><pre>mysql -u [username] -p</pre></code>
<h3>Link:</h3>
<a href="https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql" target="_blank">DigitalOcean :: Granting permissions</a>
</html>
<html>
<code><pre><i>mysql ></i> CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';</pre></code>
<h3>Note: </h3>
When adding users within the MySQL shell in this tutorial, we <br />
will specify the user's host as localhost and not the server's IP<br />
address. localhost is a hostname which means “this computer“,<br />
and MySQL treats this particular hostname specially: when a user<br />
with that host logs into MySQL it will attempt to connect to the local<br />
server by using a Unix socket file. Thus, localhost is typically used <br />
when you plan to connect by SSHing into your server or when you're<br />
running the local mysql client to connect to the local MySQL server.<br />
<br />
<code><pre><i>mysql ></i> GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';</pre></code>
Please note that in this example we are granting newuser full root<br />
access to everything in our database. While this is helpful for explaining<br />
some MySQL concepts, it may be impractical for most use cases and <br />
could put your database's security at high risk.<br />
<br />
Once you have finalized the permissions that you want to set up for <br />
your new users, always be sure to reload all the privileges.
<code><pre><i>mysql ></i> FLUSH PRIVILEGES;</pre></code>
<h3>Link:</h3>
<a href="https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql" target="_blank">DigitalOcean :: HowTo create a new user</a>
</html>
<html>
<h2>8 Steps to Install MirthConnect with MySQL / MariaDB on Linux</h2>
<h3>Link:</h3>
<a href="https://www.thegeekstuff.com/2017/01/mirthconnect-install-linux/" target="_blank">TheGeekStuff :: MirthConnect Installation</a>
</html>
<html>
<ul>
<li><h3>Konfiguration</h3>
Source-Files: <br />
/etc/mysql/my.cnf (bei mir nicht vorhanden)<br />
⇒ /etc/my.cnf <br />
⇒ ~/my.cnf</li>
</ul>
</html>
<html>
Note that all text commands must be first on line and end with ';'
<table border="1">
<tr>
<td>?</td><td> (\?) Synonym for `help'.</td>
</tr><tr>
<td>clear </td><td>(\c) Clear the current input statement.
</tr><tr>
<td>connect </td><td>(\r) Reconnect to the server. Optional arguments are db and host.
</tr><tr>
<td>delimiter</td><td>(\d) Set statement delimiter.
</tr><tr>
<td>edit </td><td>(\e) Edit command with $EDITOR.
</tr><tr>
<td>ego </td><td>(\G) Send command to mysql server, display result vertically.
</tr><tr>
<td>exit </td><td> (\q) Exit mysql. Same as quit.
</tr><tr>
<td>go </td><td> (\g) Send command to mysql server.
</tr><tr>
<td>help </td><td> (\h) Display this help.
</tr><tr>
<td>nopager </td><td> (\n) Disable pager, print to stdout.
</tr><tr>
<td>notee </td><td> (\t) Don't write into outfile.
</tr><tr>
<td>pager </td><td> (\P) Set PAGER [to_pager]. Print the query results via PAGER.
</tr><tr>
<td>print </td><td> (\p) Print current command.
</tr><tr>
<td>prompt </td><td> (\R) Change your mysql prompt.
</tr><tr>
<td>quit </td><td> (\q) Quit mysql.
</tr><tr>
<td>rehash </td><td> (\#) Rebuild completion hash.
</tr><tr>
<td>source</td><td> (\.) Execute an SQL script file. Takes a file name as an argument.
</tr><tr>
<td>status </td><td>(\s) Get status information from the server.
</tr><tr>
<td>system</td><td> (\!) Execute a system shell command.
</tr><tr>
<td>tee </td><td> (\T) Set outfile [to_outfile]. Append everything into given outfile.
</tr><tr>
<td>use </td><td> (\u) Use another database. Takes database name as argument.
</tr><tr>
<td>charset </td><td> (\C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets.
</tr><tr>
<td>warnings</td><td> (\W) Show warnings after every statement.
</tr><tr>
<td>nowarning </td><td>(\w) Don't show warnings after every statement.
</tr><tr>
</table>
</html>
<html>
<h2>10 MySQL Load Data Infile Examples to Upload Text File Data to Tables</h2>
If you have data in a text file, you can easily upload them<br />
to one or more tables in a database.<br />
<br />
In MySQL database (or MariaDB), using „load data infile“ command, <br />
you can upload data from a text file to tables.<br />
<br />
The load data infile command provides several flexible options<br />
to load various formats of data from text file to tables.<br />
<h3>1. Basic Example to Load Data From Text File</h3>
In the following example, the employee1.txt file has the field <br />
values that are separate by tab.<br />
<pre><code>
# cat employee1.txt
100 Thomas Sales 5000
200 Jason Technology 5500
300 Mayla Technology 7000
400 Nisha Marketing 9500
500 Randy Technology 6000
</code></pre>
By default, the load data infile command uses TAB as the <br />
default field delimiter.<br />
<br />
First, go to the database where you want to upload the text file. <br />
In this example, we'll upload the above employee1.txt <br />
file to the employee table located under thegeekstuff mysql database.<br />
<pre><code>
USE thegeekstuff;
</code></pre>
The following MySQL command will load the records from the<br />
above employee1.txt file to the employee table as shown below.<br />
This command doesn't use any extra options.<br />
<pre><code>
LOAD DATA INFILE 'employee1.txt'
INTO TABLE employee;
</code></pre>
<b>Note:</b><br />
In the above example, the command assumes that the employee1.txt<br />
file located under the database directory. For example, if you are<br />
executing the above command in thegeekstuff database, then place<br />
the file under: /var/lib/mysql/thegeekstuff/<br />
<br />
The following will be the output of the above command.
<pre><code>
Query OK, 5 rows affected (0.00 sec)
Records: 5 Deleted: 0 Skipped: 0 Warnings: 0
</code></pre>
In the above:
<ul>
<li>The first line „Query OK“ says that the query got executed <br />
without any error. It also says that total of 5 rows were uploaded to the table. <br />
This also displays the time taken to upload the data from the text file to the table in seconds.</li>
<li>The second line displays the the total rows uploaded, how many were skipped <br />
and how many records displayed warnings during the upload.</li>
</ul>
After the data is loaded, the following is what we'll see in the employee table.
<pre><code>
MariaDB [thegeekstuff]> select * from employee;
+-----+--------+------------+--------+
| id | name | dept | salary |
+-----+--------+------------+--------+
| 100 | Thomas | Sales | 5000 |
| 200 | Jason | Technology | 5500 |
| 300 | Mayla | Technology | 7000 |
| 400 | Nisha | Marketing | 9500 |
| 500 | Randy | Technology | 6000 |
+-----+--------+------------+--------+
</pre></code>
<b>Note:</b><br />
If you want to backup and restore your whole MySQL database, use mysqldump command.
<h3>2. Upload Data Using „Fields terminated by“ Option</h3>
In the following example, in the input file employee2.txt, the field values <br />
are separated by commas.
<code></pre>
# cat employee2.txt
100,Thomas,Sales,5000
200,Jason,Technology,5500
300,Mayla,Technology,7000
400,Nisha,Marketing,9500
500,Randy,Technology,6000
</pre></code>
To upload the above records to the employee table, use the following command.<br />
<br />
During the upload, using the „FIELDS TERMINATED BY“ option, <br />
you can specify the comma field delimiter as shown below.
<pre><code>
LOAD DATA INFILE 'employee2.txt'
INTO TABLE employee
FIELDS TERMINATED BY ',';
</pre></code>
Again, use this option only when the field values are separated by anything other <br />
than TAB. If the fields are terminted by colon, you'll use the following option<br />
in the above command:
<code>
FIELDS TERMINATED BY ':';
</code>
If you are new to MySQL read this: MySQL Tutorial: Install, Create DB and Table, Insert and Select Records<br />
<br />
The following are few basic errors that might happen during MySQL upload:
<ul>
<li>Error 1: If the text file is not located under the proper directory, you might get the following „ERROR 13 (HY000) Can't get stat of (Errcode: 2)“ error message.</li>
</ul>
<pre><code>
MariaDB [thegeekstuff]> LOAD DATA INFILE 'employee2.txt' INTO TABLE employee;
ERROR 13 (HY000): Can't get stat of '/var/lib/mysql/thegeekstuff/employee2.txt' (Errcode: 2)
</code></pre>
Also, you can specify the full path to the file in the load data infile command as shown below. If you do this, make sure the file can be accessed by mysql. If not, change the ownership to mysql appropriately. If not, you'll get the load data infile permission denied error message.
<pre><code>
MariaDB [thegeekstuff]> LOAD DATA INFILE '/data/employee2.txt' INTO TABLE employee;
</code></pre>
<ul>
<li>Error 2: If you don't specify the correct fields terminated by, then you'll see some issues in the upload. In this example, only the first field „id“ got uploaded. The value of all other fields are NULL. This is because, the following command doesn't specify the field terminated by option, as the input file has comma as the field delimiter.</li>
</ul>
<pre><code>
MariaDB [thegeekstuff]> LOAD DATA INFILE 'employee2.txt' INTO TABLE employee;
Query OK, 5 rows affected, 20 warnings (0.00 sec)
Records: 5 Deleted: 0 Skipped: 0 Warnings: 20
MariaDB [thegeekstuff]> select * from employee;
+-----+------+------+--------+
| id | name | dept | salary |
+-----+------+------+--------+
| 100 | NULL | NULL | NULL |
| 200 | NULL | NULL | NULL |
| 300 | NULL | NULL | NULL |
| 400 | NULL | NULL | NULL |
| 500 | NULL | NULL | NULL |
+-----+------+------+--------+
</code></pre>
<h3>3. Upload Data Using „Enclosed by“ Option</h3>
In the following example, the input text file has the text field values enclosed by double-quotes. i.e The name and department values have double quotes around them.
<pre><code>
# cat employee3.txt
100,"Thomas Smith","Sales & Marketing",5000
200,"Jason Bourne","Technology",5500
300,"Mayla Jones","Technology",7000
400,"Nisha Patel","Sales & Marketing",9500
500,"Randy Lee","Technology",6000
</code></pre>
In this case, use the „enclosed by“ option as shown below.
<pre><code>
LOAD DATA INFILE 'employee3.txt'
INTO TABLE employee
FIELDS TERMINATED BY ',' ENCLOSED BY '"';
</code></pre>
The above command will upload the records properly as shown below by the mysql select command:
<pre><code>
MariaDB [thegeekstuff]> select * from employee;
+-----+--------------+-------------------+--------+
| id | name | dept | salary |
+-----+--------------+-------------------+--------+
| 100 | Thomas Smith | Sales & Marketing | 5000 |
| 200 | Jason Bourne | Technology | 5500 |
| 300 | Mayla Jones | Technology | 7000 |
| 400 | Nisha Patel | Sales & Marketing | 9500 |
| 500 | Randy Lee | Technology | 6000 |
+-----+--------------+-------------------+--------+
</code></pre>
Please note that when you are combining fields terminated by and fields enclosed by, you don't have to use the keyword „FIELDS“ twice as shown below, which will display the following error message:
<pre><code>
FIELDS TERMINATED BY ',' FIELDS ENCLOSED BY '„';
</code></pre>
The above will display the following „ERROR 1064 (42000)“ error:
<pre><code>
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FIELDS ENCLOSED BY „“ ' at line 4
</code></pre>
<h3>4. Using Escape Character in Text File Data</h3>
Let us say you have comma in the value of a particular field.
For example, in the following example, the 2nd field name has the value in this format: „firstname, lastname“.
<pre><code>
# cat employee4.txt
100,Thomas, Smith,Sales,5000
200,Jason, Bourne,Technology,5500
300,Mayla, Jones,Technology,7000
400,Nisha, Patel,Marketing,9500
500,Randy, Lee,Technology,6000
</code></pre>
If you load the above file using the following command, you'll see that it will display „10 warnings“:
<pre><code>
MariaDB [thegeekstuff]> LOAD DATA INFILE 'employee4.txt'
-> INTO TABLE employee
-> FIELDS TERMINATED BY ',';
Query OK, 5 rows affected, 10 warnings (0.00 sec)
Records: 5 Deleted: 0 Skipped: 0 Warnings: 10
</code></pre>
The records are also not loaded properly because there is a comma in the value of one of the fields.
<pre><code>
MariaDB [thegeekstuff]> select * from employee;
+-----+--------+---------+--------+
| id | name | dept | salary |
+-----+--------+---------+--------+
| 100 | Thomas | Smith | 0 |
| 200 | Jason | Bourne | 0 |
| 300 | Mayla | Jones | 0 |
| 400 | Nisha | Patel | 0 |
| 500 | Randy | Lee | 0 |
+-----+--------+---------+--------+
</code></pre>
Correct File: To solve the above problem, use back-slash (\) in front of the comma in the name field value as shown below.
<pre><code>
# cat employee4.txt
100,Thomas\, Smith,Sales,5000
200,Jason\, Bourne,Technology,5500
300,Mayla\, Jones,Technology,7000
400,Nisha\, Patel,Marketing,9500
500,Randy\, Lee,Technology,6000
</code></pre>
The following will work this time without any error, as we have \ as escape character.
<pre><code>
MariaDB [thegeekstuff]> LOAD DATA INFILE 'employee4.txt'
-> INTO TABLE employee
-> FIELDS TERMINATED BY ',';
MariaDB [thegeekstuff]> select * from employee;
+-----+---------------+------------+--------+
| id | name | dept | salary |
+-----+---------------+------------+--------+
| 100 | Thomas, Smith | Sales | 5000 |
| 200 | Jason, Bourne | Technology | 5500 |
| 300 | Mayla, Jones | Technology | 7000 |
| 400 | Nisha, Patel | Marketing | 9500 |
| 500 | Randy, Lee | Technology | 6000 |
+-----+---------------+------------+--------+
</code></pre>
You can also use a different escape character as shown below. In this example, we are using ^ as the escapte character instead of the default \.
<pre><code>
# cat employee41.txt
100,Thomas^, Smith,Sales,5000
200,Jason^, Bourne,Technology,5500
300,Mayla^, Jones,Technology,7000
400,Nisha^, Patel,Marketing,9500
500,Randy^, Lee,Technology,6000
</code></pre>
In this case, use the „ESCAPED BY“ option as shown below.
<pre><code>
LOAD DATA INFILE 'employee41.txt'
INTO TABLE employee
FIELDS TERMINATED BY ',' ESCAPED BY '\^'
</code></pre>
Please note that some of the characters cannot be used as escape character. For example, if you use % as escape character, you'll get the following error message.
<pre><code>
LOAD DATA INFILE 'employee41.txt'
INTO TABLE employee
FIELDS TERMINATED BY ',' ESCAPED BY '\%'
ERROR 1083 (42000): Field separator argument is not what is expected; check the manual
</code></pre>
<h3>5. Upload Data Using „Lines terminated by“ Option</h3>
Instead of having all the records on a separate line, you can also have them on the same line.
In the following example, each and every record is separated by | symbol.
<pre><code>
# cat employee5.txt
100,Thomas,Sales,5000|200,Jason,Technology,5500|300,Mayla,Technology,7000|400,Nisha,Marketing,9500|500,Randy,Technology,6000
</code></pre>
To upload the above file, use the lines terminated by option as shown below.
<pre><code>
LOAD DATA INFILE 'employee5.txt'
INTO TABLE employee
FIELDS TERMINATED BY ','
LINES TERMINATED BY '|';
</code></pre>
The above command will upload the records from employee5.txt as shown below.
<pre><code>
MariaDB [thegeekstuff]> select * from employee;
+-----+--------+------------+--------+
| id | name | dept | salary |
+-----+--------+------------+--------+
| 100 | Thomas | Sales | 5000 |
| 200 | Jason | Technology | 5500 |
| 300 | Mayla | Technology | 7000 |
| 400 | Nisha | Marketing | 9500 |
| 500 | Randy | Technology | 6000 |
+-----+--------+------------+--------+
</code></pre>
The following are couple of points to keep in mind:
<ul>
<li>If the input file is coming from a Windows machine, then you may want to use this: LINES TERMINATED BY „\r\n“</li>
<li>If you are using a CSV file to upload data to table, then try one of this: 1) LINES TERMINATED BY „\r“ 2) LINES TERMINATED BY „\r\n“</li>
</ul>
<h3>6. Ignore Line Prefix in Upload File Using „Starting By“ Option</h3>
You can also have some prefix to the records in your input text file which can be ignored during the upload.
For example, in the following employee6.txt file, for the 1st, 2nd and 5th record, we have „Data:“ at the beginning of the line. You can upload only these records by ignoring the line prefix.
<pre><code>
# cat employee6.txt
Data:100,Thomas,Sales,5000
Data:200,Jason,Technology,5500
300,Mayla,Technology,7000
400,Nisha,Marketing,9500
Data:500,Randy,Technology,6000
</code></pre>
To ignore the line prefix and upload these records, (for example: „Data:“ in the above file), use the „lines starting by“ option as shown below.
<pre><code>
LOAD DATA INFILE 'employee6.txt'
INTO TABLE employee
FIELDS TERMINATED BY ','
LINES STARTING BY 'Data:';
</code></pre>
The following is the output of the above command:
<pre><code>
Query OK, 3 rows affected (0.00 sec)
Records: 3 Deleted: 0 Skipped: 0 Warnings: 0
</code></pre>
As you see below, the above command has uploaded only the records that started with the prefix „Data:“. This is helpful to selectively upload only the records that has certain prefix.
<pre><code>
MariaDB [thegeekstuff]> select * from employee;
+-----+--------+------------+--------+
| id | name | dept | salary |
+-----+--------+------------+--------+
| 100 | Thomas | Sales | 5000 |
| 200 | Jason | Technology | 5500 |
| 500 | Randy | Technology | 6000 |
+-----+--------+------------+--------+
3 rows in set (0.00 sec)
</code></pre>
<h3>7. Ignore Header Line from the Upload File</h3>
In the following input text file, the first line is the header line, which has the name of the columns.
<pre><code>
# cat employee7.txt
empid,name,department,salary
100,Thomas,Sales,5000
200,Jason,Technology,5500
300,Mayla,Technology,7000
400,Nisha,Marketing,9500
500,Randy,Technology,6000
</code></pre>
During upload, we want to ignore the 1st header lien from the employee7.txt file. For this, use the IGNORE 1 lines option as shown below.
<pre><code>
LOAD DATA INFILE 'employee7.txt'
INTO TABLE employee
FIELDS TERMINATED BY ','
IGNORE 1 LINES;
</code></pre>
As you see from the following output, even though the input file has 6 lines, it ignored the 1st line (which is header line) and uploaded the remaining 5 lines.
<pre><code>
Query OK, 5 rows affected (0.00 sec)
Records: 5 Deleted: 0 Skipped: 0 Warnings: 0
MariaDB [thegeekstuff]> select * from employee;
+-----+--------+------------+--------+
| id | name | dept | salary |
+-----+--------+------------+--------+
| 100 | Thomas | Sales | 5000 |
| 200 | Jason | Technology | 5500 |
| 300 | Mayla | Technology | 7000 |
| 400 | Nisha | Marketing | 9500 |
| 500 | Randy | Technology | 6000 |
+-----+--------+------------+--------+
</code></pre>
<h3>8. Upload Only Only Specific Column (and Ignore Others Columns) from Upload File</h3>
In the following example, we have values only for three fields. We don't have department column in this example file.
<pre><code>
# cat employee8.txt
100,Thomas,5000
200,Jason,5500
300,Mayla,7000
400,Nisha,9500
500,Randy,6000
</code></pre>
To upload values from the input record to a specific column in the table, specify the column names during the load data infile as shown below. The last line in the following command has the column names that should be used to upload the records from the input text file.
<pre><code>
LOAD DATA INFILE 'employee8.txt'
INTO TABLE employee
FIELDS TERMINATED BY ','
(id, name, salary);
</code></pre>
Since we didn't specify the „dept“ column in the above command, we'll see that this column is NULL as shown below.
<pre><code>
MariaDB [thegeekstuff]> select * from employee;
+-----+--------+------+--------+
| id | name | dept | salary |
+-----+--------+------+--------+
| 100 | Thomas | NULL | 5000 |
| 200 | Jason | NULL | 5500 |
| 300 | Mayla | NULL | 7000 |
| 400 | Nisha | NULL | 9500 |
| 500 | Randy | NULL | 6000 |
+-----+--------+------+--------+
</code></pre>
Again, keep in mind that when you don't specify the list of columns, the command will expect all the columns to be present in the input file.
Also, if you don't specify the column list in the last line, you'll get syntax error as shown below.
<pre><code>
MariaDB [thegeekstuff]> LOAD DATA INFILE 'employee7.txt'
-> INTO TABLE employee (id, name, salary)
-> FIELDS TERMINATED BY ',';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FIELDS TERMINATED BY ','' at line 3
</code></pre>
<h3>9. Use Variables During Upload with „Set“ Option</h3>
For this example, let us use the following employee2.txt file.
<pre><code>
# cat employee2.txt
100,Thomas,Sales,5000
200,Jason,Technology,5500
300,Mayla,Technology,7000
400,Nisha,Marketing,9500
500,Randy,Technology,6000
</code></pre>
In this example, we want to increment the salary by 500 before uploading it to the table. For example, the salary for Thomas (which is the 1st record) is 5000. But, during upload we want to increment it by 500 to 5500 and update this incremented value in the table.
For this, use the SET command and use salary as a variable and do the increment as shown below.
<pre><code>
LOAD DATA INFILE 'employee2.txt'
INTO TABLE employee
FIELDS TERMINATED BY ','
(id, name, dept, @salary)
SET salary = @salary+500;
</code></pre>
As you see from the following output, the salary column in incremented by 500 for all the records during the data upload from the text file.
<pre><code>
MariaDB [thegeekstuff]> select * from employee;
+-----+--------+------------+--------+
| id | name | dept | salary |
+-----+--------+------------+--------+
| 100 | Thomas | Sales | 5500 |
| 200 | Jason | Technology | 6000 |
| 300 | Mayla | Technology | 7500 |
| 400 | Nisha | Marketing | 10000 |
| 500 | Randy | Technology | 6500 |
+-----+--------+------------+--------+
</code></pre>
<h3>10. Write Shell Script to Load data from Text File</h3>
Sometimes you may want to upload the data from a text file automatically without having to login to mysql prompt every time.
Let us say we want to put the following command inside a shell script and execute this automatically on thegeekstuff database.
<pre><code>
LOAD DATA INFILE 'employee2.txt'
INTO TABLE employee
FIELDS TERMINATED BY ','
</code></pre>
To execute the load from the command line, you'll use the -e option in the mysql command and execute it from the linux prompt as shown below.
<pre><code>
# mysql -e "LOAD DATA INFILE 'employee2.txt' INTO TABLE employee FIELDS TERMINATED BY ','" \
-u root -pMySQLPassword thegeekstuff
</code></pre>
Or, you can put that inside a shell script as shown below. In this example, the load-data.sh shell script has the above mysql command.
<pre><code>
# cat load-data.sh
mysql -e "\
LOAD DATA INFILE 'employee2.txt'\
INTO TABLE employee \
FIELDS TERMINATED BY ','\
" \
-u root -pMySQLPwd4MDN! test
</code></pre>
Give the execute permission to this load-data.sh script, and execute it from the command line, which will load the data automatically to the table. You can also schedule this as cronjob to load the data from the file automatically to the table at a scheduled interval.<br />
<br />
<code>
# chmod u+x load-data.sh<br />
<br />
# ./load-data.sh<br />
</code>
<br />
Link:<br />
http://www.thegeekstuff.com/2016/11/mysql-load-data-infile<br />
<br />
</html>
<html>
<ul>
<li>mysql is a simple SQL shell for MySQL and MariaDB database server. <br />
</li>
<li>You need to use the mysql command to reset a password for a user <br />
account on a Linux or Unix-like system. If you are using MS-Windows <br />
use mysql.exe file and the sql commands are same. <br />
</li>
<li>The <b>SET PASSWORD</b> sql command assigns a password to an <br />
existing MariaDB user account. Newer version of MySQL/MariaDB server <br />
can use the <b>ALTER USER</b> sql command too. <br />
</li>
<li>The procedure to reset the password for the user account<br />
named jerry as follows:<br />
<ul>
<li><h3>Step 1 :: Login as root</h3>
Run mysql command:
<pre><code>mysql -u root -p mysql</code></pre>
OR
<pre><code>mysql -u root -p -h localhost mysql</code></pre>
OR
<pre><code>mysql --user root --password --host localhost msyql</code></pre>
</li>
<li>Sample outputs:
<pre><code>Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 7
Server version: 5.5.56-MariaDB MariaDB Server
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]></code></pre>
</li>
<li><h3>Step 2 :: MySQL reset password for user named jerry</h3>
<ul>
<li>The syntax is as follows to reset password (depends<br />
upon your version of mysql/mariadb server):
<pre><code>ALTER USER userNameHere IDENTIFIED BY 'passwordHere';</code></pre>
OR
<pre><code>SET PASSWORD FOR 'userNameHere'@'localhost' = 'passwordHere';</code></pre>
OR
<pre><code>SET PASSWORD FOR 'userName'@'localhost' = PASSWORD('newPass');</code></pre>
</li>
<li>For example, if you had an entry with User <br />
and Host column values of “jerry“ and 'localhost', you would write the statement like this at the mysql/maridb shell prompt:
<pre><code>SET PASSWORD FOR 'jerry'@'localhost' = PASSWORD('newPassHere');</code></pre>
</li>
<li>Sample outputs:
<pre><code>Query OK, 0 rows affected (0.00 sec)</code></pre>
</li>
</ul>
</li><h3>Step 3 :: Exit from mysql shell</h3>
<ul>
<li>You must flush privileges and exit to<br />
the shell using following two sql com–<br />
mands:
<pre><code>FLUSH PRIVILEGES;
exit</code></pre>
</li>
</ul>
</li>
<li><h3>Step 4 :: Test new password</h3>
<ul>
<li>Now password has been changes. It is time<br />
to test it. Again syntax is:
<pre><code>mysql -u jerry -p</code></pre>
OR
<pre><code>mysql -u jerry -p -h localhost</code></pre>
OR
<pre><code>mysql --user jerry --password --host localhost db_name_here</code></pre>
</li>
<li>When promoted type password you set<br />
earlier in step #2. You can verify<br />
who you are with the following sql<br />
command:
<pre><code>SELECT USER(),CURRENT_USER();</code></pre>
</li>
<li>Sample session from above commands:<br />
<img src="./pictures/MariaDB-MySQL-reset-password-for-user-account.jpg" width=598 height=569><br />
MariaDB MySQL reset password for user account
</li>
</ul>
</li>
</ul>
</li>
<li><h3>Ist die folgende Befehlsfolge auch möglich?:</h3>
<ul>
<li><pre><code> use mysql;</code></pre>
</li>
<li><pre><code> select user, password, host from user where user = '<USER>'</code></pre>
</li>
<li><pre><code> update user set password=password('<PASSWORD>') where user ='<USER>';</code></pre>
</li>
</ul>
</li>
<li> ⇒ MySQL-Daemon restarten
</li>
</ul>
</li>
</ul>
<h3>Link:</h3>
<ul>
<li><a href="https://www.cyberciti.biz/faq/mysql-change-reset-password-user-account/"
target="_blank" rel="noreferrer noopener">
nixCraft :: MySQL reset password for user account</a>
</li>
</ul>
</html>
<html>
Durch Anpassen des SQL-Modus des Servers gibt es Möglichkeiten,<br />
MySQL „zu zwingen“ eher ANSI-SQL zu verarbeiten.
<ul>
<li>liefert den Server SQL-Modus: <code>SELECT @@global.sql_mode; </code></li>
<br />
<li>liefert den session SQL-Modus: <code>SELECT @@session.sql_mode; </code></li>
</ul>
→ s. SQL-Tipps-und-Tricks-III.pdf
</html>
<html>
<ul>
<li><h3>Syntax:</h3>
<code><pre>SHOW GRANTS [FOR user]</pre></code></li>
<li><h3>Beispiele:</h3>
<code><pre>show grants for 'mueller'@'localhost';</pre></code>
oder für den aktuellen User:
<code><pre><i>mysql></i> SHOW GRANTS;</pre></code>
⇒ Ausgabe:
<code><pre> +----------------------------------------------------------------------------------------------------------------------------------------+
| Grants for root@localhost |
+----------------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*DD5540D8EC4CFFDC8B9C6FA7AC9B5E20522BC3DB' WITH GRANT OPTION |
| GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION |
+----------------------------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
</pre></code>
</li>
</ul>
<h3>Link:</h3>
<a href="https://dev.mysql.com/doc/refman/5.5/en/show-grants.html" target="_blank">MySQL :: Manual - Show Grants</a>
</html>
<html>
<ul>
<li><h3>Auflisten der zur Verfügung stehenden Engines:</h3>
<code><pre><i>mysql ></i> show engines;</pre></code>
</ul>
<table border="1">
<tr><th>Engine</th><th>Support</th><th>Comment</th><th>Transactions</th><th>XA</th><th>Savepoints</th></tr>
<tr><td> EXAMPLE</td><td>YES</td><td>Example storage engine</td><td>NO</td><td>NO</td><td>NO</td></tr>
<tr><td> MRG_MYISAM</td><td>YES</td><td>Collection of identical MyISAM tables</td><td>NO</td><td>NO</td><td>NO
<tr><td> CSV</td><td>YES</td><td>CSV storage engine</td><td>NO</td><td>NO</td><td>NO
<tr><td> BLACKHOLE</td><td>YES</td><td>/dev/null storage engine (anything you write to it disappears)</td><td>NO</td><td>NO</td><td>NO
<tr><td> InnoDB</td><td>YES</td><td>Supports transactions, row-level locking, and foreign keys</td><td>YES</td><td>YES</td><td>YES
<tr><td> MEMORY</td><td>YES</td><td>Hash based, stored in memory, useful for temporary tables</td><td>NO</td><td>NO</td><td>NO
<tr><td> ARCHIVE</td><td>YES</td><td>Archive storage engine</td><td>NO</td><td>NO</td><td>NO
<tr><td> MyISAM</td><td>DEFAULT</td><td>Default engine as of MySQL 3.23 with great performance</td><td>NO</td><td>NO</td><td>NO
<tr><td> FEDERATED</td><td>NO</td><td>Federated MySQL storage engine</td><td>NULL</td><td>NULL</td><td>NULL
<tr><td> ndbcluster</td><td>NO</td><td>Clustered, fault-tolerant tables</td><td>NULL</td><td>NULL</td><td>NULL
</table>
<ul>
<li>es fehlt noch die Engine "MERGE"</li>
<br />
<li>Anzeigen der aktuell verwendeten Engine:* ???Befehl???</li>
<br />
<li><h3>weitere Engines:</h3>
<ul>
<li>XtraDB (eine Ersetzung für InnoDB ?)</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li>Seit der Version 11.2.0 werden dabei auch provisorische Tabellen<br />
(Temporary Tables) gelistet. Für den Einsatz der Anweisung sind<br 7>
die passenden Nutzerrechte notwendig.
</li>
<li><h3>Befehlssyntax:</h3>
<pre><code>SHOW TABLES [FROM name_der_datenbank] [LIKE 'muster'];</code></pre>
</li>
<li><h3>Befehlssyntax, um den Tabellentyp anzuzeigen:</h3>
<ul>
<li><pre><code>SHOW FULL TABLES FROM <em>Name-Der-DB</em></code></pre>
</li>
<li>Wenn nicht nur die Namen der vorhandenen Tabellen in einer <br />
Datenbank aufgelistet werden sollen, sondern gleichzeitig auch<br />
Informationen über die Art der Tabelle benötigen, kann man<br />
SHOW TABLES in MariaDB mit der Option FULL verwenden. <br />
</li>
<li>Diese fügt neben den Namen eine zweite Spalte in die Aus–<br />
gabe ein, die den Namen „table_type“ trägt. Hier wird ange–<br />
zeigt, um welche Art Tabelle es sich jeweils handelt. <br />
</li>
<li>Die verschiedenen Typen sind:
<ul>
<li>BASE TABLE,
</li>
<li>VIEW
</li>
<li>und SEQUENCE
</li>
</ul>
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.ionos.de/digitalguide/hosting/hosting-technik/mariadb-show-tables/"
target="_blank" rel="noreferrer noopener">
IONOS :: SHOW TABLES in MariaDB: So erhalten Sie einen Überblick über alle Tabellen</a>
</li>
</ul>
</html>
<html>
<ul>
<li><pre><code>create user [if not exists] <em><USR-NAME></em> identified by '<em><PASSWORD></em>';</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.mysqltutorial.org/mysql-administration/mysql-create-user/"
target="_blank" rel="noreferrer noopener">
MySQL-Tutorial :: MySQL CREATE USER</a>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>Homepage von MySQL:</h3>
<a href="http://www.mysqltutorial.org/" target="_blank">http://www.mysqltutorial.org/</a><br />
<br />
Hat mittlerweile Forks: MariaDB, Percona<br />
gehört zu Oracle
</li>
<li><h3>Installation unter Linux:</h3>
<pre><code>sudo apt-get install mysql-server </code></pre>
</li>
<li><h3>Login: </h3>
<b>mysql -u <UserName> -p</b>
</li>
</li>
<li><h3>Logoff: </h3>
<i>mysql ></i> <b>quit</b>
</li>
<li><h3>MySQL-Version <u>innerhalb von MySQL</u> ermitteln:</h3>
<pre><code>select version();</code></pre>
</li>
<li><h3>Syntax von mysql</h3>
<code><pre>/etc/init.d/mysql {start| stop | status | reload | restart | try-restart | force-reload } </pre></code>
</li>
<li><h3>Starten von MySQL</h3>
als root-User : <code><pre>/etc/init.d/mysql start</pre></code>
</li>
<li>*Daten in eine Tabelle importieren:*<br />
⇒ Daten in ein File eintragen<br />
⇒ File dann importieren
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.ubuntuusers.de/MySQL/"
target="_blank" rel="noreferrer noopener">
Ubuntu-Users :: MySQL </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li><pre><code>select user();</code></pre>
</li>
</ul>
</html>
<html>
Das select-Kommando von MySQL kennt <b>kein</b> “top N“.<br />
<br />
Der select-Befehl hat eine LIMIT-Option, die hinter <br />
dem Tabellennamen mit angegeben werden müssen:<br />
<code><pre>
<i>mysql></i> select * from ANGESTELLTER <b>LIMIT 10</b>;
</code></pre>
</html>
<html>
<h2>mycli: Awesome MySQL/MariaDB mysql client with auto-completion and syntax highlighting</h2>
already wrote about auto-completion in the MySQL/MaiaDB <br />
command-line client using an auto-rehash feature. Recently <br />
I found out a new tool called mycli. It is a command line inter–<br />
face for MySQL, MariaDB, and Percona with auto-completion<br />
and syntax highlighting.<br />
<br />
This tool is written in Python. You need to use pip command to <br />
install it on Linux or Unix-like system. This tool support auto-<br />
completion table names, database names, aliases, SQL syntax, <br />
keeps track of the queries entered, and much more.
<h3>Installation</h3>
If pip not installed on a Debian/Ubuntu Linux, type the following apt command/apt-get command:
<code><pre>$ sudo apt install python-pip</pre></code>
If you are using RHEL/CentOS, use yum command to install the same:
<code><pre>$ sudo yum install python-pip</pre></code>
<h3>Install mycli</h3>
Type the following command on Linux or Unix-like system to install mycli:
<code><pre>$ pip install mycli</pre></code>
If you are using macOS Unix, type the following brew command to install mycli:
<code><pre>$ brew update && brew install mycli</pre></code>
Sample outputs:
<code><pre>
==> Downloading https://homebrew.bintray.com/bottles/mycli-1.10.0.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring mycli-1.10.0.sierra.bottle.tar.gz
==> Using the sandbox
/usr/local/Cellar/mycli/1.10.0: 1,293 files, 24.4MB
</pre></code>
<h3>How do I use mycli command?</h3>
The syntax is:
<code><pre>
$ mycli -u user -p db_name
$ mycli -u user -h host_name -p db_name
</pre></code>
Sample outputs:<br />
<img src="./pictures/mycli-1.jpg" heigth=389 width=599><br />
Fig.01: mycli in action<br />
<br />
Let us see mycli auto complete feature. Just start typing <br />
sql command such as show dat:<br />
<img src="./pictures/auto-complete.jpg" height=448 width=517><br />
Fig.02: Simple completions such as keywords and sql-functions.<br />
<br />
Here is a small demo:<br />
<img src="./pictures/mycli-demo.gif" height=805 width=599<br />
Gif.01: Auto-completion and syntax demo
<h3>Link:</h3>
<a href="https://www.cyberciti.biz/open-source/command-line-hacks/mycli-awesome-mysqlmariadbpercona-mysql-client-with-auto-completion-and-syntax-highlighting/" target="_blank">Cyberciti :: mycli - MySQL client</a>
</html>
<html>
<ul>
<li> One thing that tripped me up on a new install of MySQL and wondering why I couldn't get the default password to work and why even the reset methods where not working. Well turns out that on Ubuntu 18 the most recent version of MySQL server does not use password auth at all for the root user by default. So this means it doesn't matter what you set it to, it won't let you use it. It's expecting you to login from a privileged socket.
<pre><code>mysql -u root -p</code></pre>
This will not work, even if you are using the correct password.
Instead, you need to use:
<pre><code>sudo mysql</code></pre>
that will work with out any password. then once you in you need type in
<pre><code>ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<em>Password you want to use</em>';</code></pre>
Then log out and now it will accept your password.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://stackoverflow.com/questions/10895163/how-to-find-out-the-mysql-root-password"
target="_blank" rel="noreferrer noopener">
StackOverflow :: How to find out the MySQL root password</a>
</ul>
</html>
<html>
<ul>
<li>Wenn das Passwort für den MySQL/MariaDB-Root-User verloren<br />
gegangen ist, kann man es zurücksetzen, indem MySQL/MariaDB<br />
im abgesicherten Modus neu gestartet wird, der kein Passwort er–<br />
fordert.
</li>
<li>Zunächst die Datenbank herunterfahren mit dem Befehl
<ul>
<li><b>Ubuntu/Debian: </b>
<ul>
<li>MySQL:
<pre><code>sudo service mysql stop</code></pre>
</li>
<li>MariaDB:
<pre><code>sudo service mariadb stop</code></pre>
</li>
</ul>
</li>
<li><b>CentOS/Red Hat:</b>
<ul>
<li>MySQL:
<pre><code>sudo systemctl stop mysql</code></pre>
</li>
<li>MariaDB:
<pre><code>sudo systemctl stop mariadb</code></pre>
</li>
</ul>
</li>
</ul>
</li>
<li>MySQL/MariaDB im abgesicherten Modus starten mit dem Befehl:
<pre><code>mysqld_safe --skip-grant-tables &</code></pre>
</li>
<li>Sie können sich nun als root bei MySQL/MariaDB anmelden, ohne ein Passwort eingeben zu müssen:
<pre><code>mysql -u root mysql</code></pre>
</li>
<li>Laden Sie die Berechtigungstabellen neu: <em>{habe die Reihenfolge geändert [2024-08-05]</em>
<pre><code>FLUSH PRIVILEGES;</code></pre>
</li>
<li>Setzen Sie das MySQL/MariaDB-Passwort mit dem folgenden Befehl zurück. Ändere mein neues Passwort in ein sicheres Passwort.
<pre><code>UPDATE user SET password=PASSWORD("my-new-password") WHERE user='root';</code></pre>
</li>
<li>Beenden Sie den MySQL/MariaDB-Client:
<pre><code>quit;</code></pre>
</li>
<li>Beenden Sie MySQL/MariaDB:
<pre><code>mysqladmin -u root -p shutdown</code></pre>
Jetzt muss das Passwort für root eingegeben werden,<br />
das im vorherigen Schritt festgelegt worden ist.<br />
</li>
<li>Anschließend starten Sie die Datenbank im Normalmodus neu:
<ul>
<li><b>Ubuntu/Debian: </b>
<ul>
<li>MySQL:
<pre><code>sudo service mysql start</code></pre>
</li>
<li>MariaDB:
<pre><code>sudo service mariadb start</code></pre>
</li>
</ul>
</li>
<li><b>CentOS/Red Hat:</b>
<ul>
<li>MySQL:
<pre><code>sudo systemctl stop start</code></pre>
</li>
<li>MariaDB:
<pre><code>sudo systemctl stop start</code></pre>
</li>
</ul>
</li>
</ul>
</li>
<hr />
<li><h3>die korrektere Vorgehensweise?</h3>
<ul>
<li>scheint richtiger zu sein:
<pre><code>sudo /etc/init.d/mysql stop</code></pre>
</li>
<li>In some cases, if /var/run/mysqld doesn't exist, <br />
you have to create it at first:
<pre><code>sudo mkdir -vp /var/run/mysqld && sudo chown mysql /var/run/mysqld</code></pre>
</li>
<li>Start the mysqld configuration:
<pre><code> sudo mysqld --skip-grant-tables &</code></pre>
</li>
<li>Login to MySQL as root:
<pre><code>mysql -u root mysql</code></pre>
</li>
<li>For MySQL >= 8.0:
<pre><code>FLUSH PRIVILEGES;
ALTER USER 'root'@'localhost' IDENTIFIED BY 'YOURNEWPASSWORD';
FLUSH PRIVILEGES;</code></pre>
</li>
[Link: https://stackoverflow.com/questions/16556497/mysql-how-to-reset-or-change-the-mysql-root-password]
</ul>
<li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
</ul>
</html>
<html>
• der NAV ist der Wert der Immobilien nach
Abzug der Schulden
</html>
<html>
In an NFS environment (Hp-UX based), sometimes no user is<br />
able to log-in when home directories are mounted using automounter.<br />
As user validation occurs, the user .profile is executed but no shell<br />
prompt appears unless the user presses CTRL-C.<br />
<br />
The Solution to this is to kill the portmap & inetd and restart<br />
the two daemons. The problem will then be sorted out.<br />
<br />
This tip generously supported <br />
by: sgogia@hss.hns.com<br />
</html>
<html>
<ul>
<li><b>Nadir</b><br />
Richtungsangabe;<br />
der Fußpunkt gegenüber des Zenits<br />
</li>
<br />
<li><b>Zenit</b><br />
Scheitelpunkt des Himmels<br />
</li>
</ul>
</html>
<html>
<h3>Updating System Packages</h3>
<ul>
<li>
</li>
</ul>
<h3>Installing Required Packages</h3>
<ul>
<li>
</li>
</ul>
<h3>Downloading Nagios Core Setup File</h3>
<ul>
<li>
</li>
</ul>
<h3>Extracting Downloaded Files</h3>
<ul>
<li>
</li>
</ul>
<h3>Configuring Nagios Core</h3>
<ul>
<li>
</li>
</ul>
<h3>Compiling and Installing Nagios Core</h3>
<ul>
<li>
</li>
</ul>
<h3>Enabling Apache Modules</h3>
<ul>
<li>ab hier weitermachen
</li>
</ul>
<h3>Creating Nagios Admin User</h3>
<ul>
<li>
</li>
</ul>
<h3>Install Nagios Plugins</h3>
<ul>
<li>
</li>
</ul>
<h3></h3>
<ul>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.baeldung.com/linux/nagios-install-configure"
target="_blank" rel="noreferrer noopener">
Baeldung :: How to Install and Set up Nagios on Linux</a>
</li>
</ul>
</html>
<html>
Dazu gehören folgende Files:<br />
<br />
ausgehend vom app-Verzeichnis:<br />
<ul>
<li>./navigation/navigation.gz</li>
<li>./scr_xml/statics/navigation_template.xml</li>
<li>./scr_xml/statics/navigation_plugin.xml</li>
<li>./scr_xml/mx/statics/inavigation_template.xml</li>
</ul>
</html>
<html>
<ul>
<li>Herausfinden, welche Geräte unter Linux mit dem Netzwerk verbunden sind
</li>
<li><h3>Methode 1: Linux-Befehlszeile verwenden - nmap</h3>
<ul>
<li><h4>Schritt 1: Nmap installieren</h4>
<ul>
<li>nmap ist eines der beliebtesten Netzwerk-Scan-Tools unter Linux.
</li>
<li>Verwenden Sie den folgenden Befehl, um nmap in Ubuntu-basierten Linux-Distributionen zu installieren:
<pre><code>sudo apt-get install nmap</code></pre>
</li>
<li>Sie können es auch problemlos in anderen Linux-Distributionen installieren.
</li>
<li>Es sollte sich im offiziellen Software-Repository befinden.
</li>
</ul>
</li>
<li><h4>Schritt 2: Ermitteln Sie den IP-Bereich des Netzwerks</h4>
<ul>
<li>Jetzt müssen wir den IP-Adressbereich des Netzwerks kennen.
</li>
<li>Verwenden Sie den Befehl ifconfig, um die IP-Adresse unter Linux zu finden.
</li>
<li>Suchen Sie nach wlan0, wenn Sie WLAN verwenden, oder nach eth0, wenn Sie Ethernet verwenden.
<pre><code>user@user-notebook:~$ ifconfig
wlan0 Link encap:Ethernet HWaddr 70:f1:a1:c2:f2:e9
inet addr:<b>192.168.1.91</b> Bcast:192.168.1.255 <b>Mask:255.255.255.0</b>
inet6 addr: fe80::73f1:a1ef:fec2:f2e8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2135051 errors:0 dropped:0 overruns:0 frame:0
TX packets:2013773 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1434994913 (1.4 GB) TX bytes:636207445 (636.2 MB)</code></pre>
</li>
<li>Wie Sie sehen, ist meine IP 192.168.1.91 und die Subnetzmaske 255.255.255.0, was bedeutet, dass der IP-Adressbereich in meinem Netzwerk von 192.168.1.0 bis 192.168.1.255 variiert.
</li>
<li>Sie können auch den Befehl ip a verwenden, um Ihre IP-Adresse in Ubuntu und anderen Linux-Distributionen zu erfahren.
</li>
<li>Gleichzeitig empfehle ich Ihnen, die grundlegenden Linux-Netzwerkbefehle zu lesen, um weitere Informationen zu erhalten.
</li>
</ul>
</li>
<li><h4>Schritt 3: Scannen Sie, um Geräte zu finden, die mit Ihrem Netzwerk verbunden sind</h4>
<ul>
<li>Es wird empfohlen, beim Scannen des Netzwerks Root-Rechte zu verwenden, um genauere Informationen zu erhalten.
</li>
<li>Verwenden Sie den Befehl nmap wie folgt:
<pre><code>user@user-notebook:~$ sudo nmap -sn 192.168.1.0/24
Starting Nmap 5.21 ( http://nmap.org ) at 2012-09-01 21:59 CEST
Nmap scan report for neufbox (192.168.1.1)
Host is up (0.012s latency).
MAC Address: E0:A1:D5:72:5A:5C (Unknown)
Nmap scan report for takshak-bambi (192.168.1.91)
Host is up.
Nmap scan report for android-95b23f67te05e1c8 (192.168.1.93)
Host is up (0.36s latency).</code></pre>
</li>
<li>Wie Sie sehen, sind drei Geräte mit meinem Netzwerk verbunden.
</li>
<li>Der Router selbst, mein Laptop und mein Android-Smartphone.
</li>
<li>Wenn Sie sich fragen, warum ich im obigen Befehl 24 verwendet habe, sollten Sie ein wenig über die CIDR-Notation wissen.
</li>
<li>Dies bedeutet im Wesentlichen, dass der Scan von 192.168.1.0 bis 192.168.1.255 erfolgt.
</li>
</ul>
</li>
<li><h4>Scan bei mir zu Hause [2025-04-25]:</h4>
<pre><code>mueller@HPLaptop:~$ sudo nmap -sn 192.168.2.0/24
Starting Nmap 7.93 ( https://nmap.org ) at 2025-04-25 13:46 CEST
Nmap scan report for speedport.ip (192.168.2.1) # Gateway; gleichzeitig DNS-Server
Host is up (0.00039s latency).
MAC Address: 30:B1:B5:3B:77:BC (Arcadyan)
Nmap scan report for Debian-Laptop (192.168.2.31) # Acer Laptop
Host is up (0.00031s latency).
MAC Address: E0:CB:4E:97:CC:48 (Asustek Computer)
Nmap scan report for OPPO-Find-X3-Lite-5G (192.168.2.228) # Smartphone
Host is up (0.20s latency).
MAC Address: FA:9C:47:9C:54:87 (Unknown)
Nmap scan report for GigaTV (192.168.2.230) # Fernseher
Host is up (0.0025s latency).
MAC Address: 94:3C:96:3A:E7:C4 (Sagemcom Broadband SAS)
Nmap scan report for HPLaptop (192.168.2.44) # HP Laptop
Host is up.
Nmap done: 256 IP addresses (5 hosts up) scanned in 2.50 seconds
</code></pre>
</li>
</ul>
</li>
<li><h3>Methode 2: GUI-Tool <em>nutty</em> verwenden</h3>
<ul>
<li>Nutty ist ein neues Netzwerküberwachungstool, das für Elementary OS entwickelt wurde.
</li>
<li>zuletzt aktualisiert im Jahr 2019
</li>
<li>Installieren Sie einfach diese App und führen Sie sie aus.
</li>
<li>Es sucht regelmäßig nach neuen Geräten im Netzwerk und benachrichtigt Sie, wenn ein neues Gerät vorhanden ist.<br />
<img src="./pictures/Nutty-Device-Monitoring.png"
height= width= /><!-- -->
</li>
<li>Diese Anwendung ist nur für Elementary OS, Ubuntu und hoffentlich auch andere Ubuntu-basierte Linux-Distributionen verfügbar.
</li>
<li>Eine Installationsanleitung finden Sie in diesem ausführlichen Artikel auf Nutty.
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.linux-console.net/?p=19577"
target="_blank" rel="noreferrer noopener">
Linux-Console :: So finden Sie heraus, welche Geräte unter Linux mit dem Netzwerk verbunden sind </a>
</li>
</ul>
</html>
<html>
<body>
<ul>
<li><h3>Calculating the Netmask Length (also called a prefix):</h3>
Convert the dotted-decimal representation of the netmask to binary. <br />
Then, count the number of contiguous 1 bits, starting at the most<br />
significant bit in the first octet (i.e. the left-hand-side of the binary<br />
number).
<pre><code>255.255.248.0 in binary: 11111111 11111111 11111000 00000000
-----------------------------------
I counted twenty-one 1s -------> /21
</code></pre>
The prefix of 128.42.5.4 with a 255.255.248.0 netmask is /21.
</li>
<li><h3>Calculating the Network Address:</h3>
The network address is the logical AND of the respective bits in<br />
the binary representation of the IP address and network mask. <br />
Align the bits in both addresses, and perform a logical AND on<br />
each pair of the respective bits. Then convert the individual<br />
octets of the result back to decimal.<br />
<br />
<b>Logical AND truth table:</b><br />
<table>
<tr align="center"><th colspan="2" width=100><b>Input</b></th><th width=100><b>Output</b></th></tr>
<tr align="center"><th>A</th><th>B</th><th>A and B</th></tr>
<tr align="center"><td>0</td><td>0</td><td>0</td></tr>
<tr align="center"><td>0</td><td>1</td><td>0</td></tr>
<tr align="center"><td>1</td><td>0</td><td>0</td></tr>
<tr align="center"><td>1</td><td>1</td><td>1</td></tr>
</table>
<pre><code>128.42.5.4 in binary: 10000000 00101010 00000101 00000100
255.255.248.0 in binary: 11111111 11111111 11111000 00000000
----------------------------------- [Logical AND]
10000000 00101010 00000000 00000000 ------> 128.42.0.0</code></pre>
As you can see, the network address of 128.42.5.4/21 is 128.42.0.0<br />
</li>
<li><h3>Berechnung der Broadcast-Adresse:</h3>
Calculating the Broadcast Address:
The broadcast address converts all host bits to 1s …<br />
Remember that our IP address in decimal is:
<pre><code>128.42.5.4 in binary: 10000000 00101010 00000101 00000100</code></pre>
The network mask is:
<pre><code>255.255.248.0 in binary: 11111111 11111111 11111000 00000000</code></pre>
This means our host bits are the last 11 bits of the IP address,<br />
because we find the host mask by inverting the network mask:
<pre><code>Host bit mask : 00000000 00000000 00000hhh hhhhhhhh</code></pre>
To calculate the broadcast address, we force all host bits to be<br />
1s:
<pre><code>128.42.5.4 in binary: 10000000 00101010 00000101 00000100
Host bit mask : 00000000 00000000 00000hhh hhhhhhhh
----------------------------------- [Force host bits]
10000000 00101010 00000111 11111111 ----> 128.42.7.255</code></pre>
</li>
<li><h3>Calculating subnets:</h3>
You haven't given enough information to calculate subnets for this<br />
network; as a general rule you build subnets by reallocating some<br />
of the host bits as network bits for each subnet. Many times there<br />
isn't one right way to subnet a block … depending on your con–<br />
straints, there could be several valid ways to subnet a block of ad–<br />
dresses.<br />
<br />
Let's assume we will break 128.42.0.0/21 into 4 subnets that must<br />
hold at least 100 hosts each … <br />
<img src="./pictures/wHlF8.png" height=365 width=742 title="Subnetting" /> <!-- height=486 width=989 --><br />
In diesem Beispiel wissen wir, dass Sie mindestens ein<br />
Präfix / 25 benötigen, um 100 Hosts zu enthalten. Ich<br />
habe a / 24 gewählt, weil es auf eine Oktettgrenze fällt.<br />
Beachten Sie, dass die Netzwerkadresse für jedes Sub–<br />
netz Host-Bits aus dem übergeordneten Netzwerkblock<br />
entlehnt.
</li>
<li><h3>Ermitteln der erforderlichen Subnetzmaskenlänge oder Netzmaske:</h3>
Woher wusste ich, dass ich mindestens eine /25-Mas–<br />
kenlänge für 100 Hosts benötige? Berechnen Sie das<br />
Präfix, indem Sie die Anzahl der Host-Bits angeben, <br />
die 100 Hosts enthalten sollen. Man braucht 7 Host-<br />
Bits, um 100 Hosts zu enthalten. Offiziell wird dies be–<br />
rechnet mit:
<pre><code>Hostbits = Log 2 (Anzahl der Hosts) = Log 2 (100) = 6.643</code></pre>
Da IPv4-Adressen 32 Bit breit sind und wir die Host-<br />
Bits (dh niedrigstwertige Bits) verwenden, subtra–<br />
hieren Sie einfach 7 von 32, um das minimale Sub–<br />
netz-Präfix für jedes Subnetz zu berechnen …
<pre><code>32 - 7 = 25</code></pre>
</li>
<li><h3>Der träge Weg, 128.42.0.0/21 in vier gleiche Subnetze zu unterteilen:</h3>
Da wir nur vier Subnetze aus dem gesamten<br />
128.42.0.0/21-Block benötigen, könnten wir /23-Sub–<br />
netze verwenden. Ich habe /23 gewählt, weil wir 4<br />
Subnetze benötigen … dh zwei zusätzliche Bits zur <br />
Netzmaske hinzugefügt.<br />
<br />
Dies ist eine ebenso gültige Antwort auf die Ein–<br />
schränkung, die /23 Subnetze von 128.42.0.0/21<br />
verwendet … <br />
<img src="./pictures/nKRVg.png" height=378 width=732 title="Subnetting, 2. Option" /> <!-- height=504 width=976 -->
</li>
<li><h3>Berechnung der Hostnummer:</h3>
Dies ist , was haben wir bereits oben gemacht ... nur den Host - Maske Wiederverwendung von der Arbeit , die wir haben , wenn wir die Broadcast - Adresse der 128.42.5.4/21 berechnet ... Dieses Mal , wenn ich 1s statt verwenden werden h, denn wir brauchen erneut ein logisches UND für die Netzwerkadresse ausführen.
<pre><code>128.42.5.4 in binary: 10000000 00101010 00000101 00000100
Host bit mask : 00000000 00000000 00000111 11111111
----------------------------------- [Logical AND]
00000000 00000000 00000101 00000100 -----> 0.0.5.4</code></pre>
</li>
<li><h3>Berechnung der maximal möglichen Anzahl von Hosts in einem Subnetz:</h3>
Sehen Sie sich die Anzahl der Binärbits in der obigen Hostnummer an, um die maximale Anzahl der Hosts zu ermitteln. Am einfachsten ist es, die Netzmaskenlänge von 32 (Anzahl der Bits in einer IPv4-Adresse) zu subtrahieren. Dies gibt Ihnen die Anzahl der Host-Bits in der Adresse. An diesem Punkt...
<pre><code>Maximale Anzahl von Hosts = 2 ** (32 - netmask_length) - 2</code></pre>
Der Grund, warum wir oben 2 subtrahieren, liegt darin, dass die Host-Nummern "Alle Einsen" und "Alle Nullen" reserviert sind. Die Hostnummer mit Nullen ist die Netzwerknummer. Die All-Ones-Host-Nummer ist die Broadcast-Adresse.<br />
Unter Verwendung des obigen Beispielsubnetzes 128.42.0.0/21 beträgt die Anzahl der Hosts …
<pre><code>Maximale Anzahl von Hosts = 2 ** (32 - 21) - 2 = 2048 - 2 = 2046</code></pre>
</li>
<li><h3>Ermitteln der maximalen Netzmaske (minimale Hostmaske), die zwei IP-Adressen enthält:</h3>
Angenommen, jemand gibt uns zwei IP-Adressen und erwartet, dass wir die längste Netzmaske finden, die beide enthält. Was wäre zum Beispiel, wenn wir Folgendes hätten:
<pre><code> 128.42.5.17
128.42.5.67</code></pre>
Am einfachsten ist es, beide in Binärdateien umzuwandeln und auf der linken Seite der Adresse nach der längsten Zeichenfolge von Netzwerkbits zu suchen.
<pre><code>128.42.5.17 in binary: 10000000 00101010 00000101 00010001
128.42.5.67 in binary: 10000000 00101010 00000101 01000011
^ ^ ^
| | |
+--------- Network ---------+Host-+
(All bits are the same) Bits</code></pre>
In diesem Fall wäre die maximale Netzmaske (minimale Hostmaske) / 25
HINWEIS: Wenn Sie versuchen, von der rechten Seite aus zu beginnen, lassen Sie sich nicht täuschen, nur weil Sie eine übereinstimmende Spalte mit Bits finden. es könnte nicht passende Bits jenseits dieser übereinstimmenden Bits geben. Ehrlich gesagt ist es am sichersten, von der linken Seite zu beginnen.
‐ Mike Pennington
Die Antwort oben trifft den Nagel auf den Kopf perfekt. Als ich anfing, brauchte ich ein paar verschiedene Beispiele aus verschiedenen Quellen, um wirklich Erfolg zu haben. Wenn Sie sich für andere Beispiele interessieren, habe ich daher einige Blog-Beiträge zu diesem Thema verfasst: http://www.oznetnerd.com/category/subnetting/
Administratoren, wenn dieser Beitrag als Spam eingestuft wird, können Sie ihn gerne löschen.
Bearbeiten: Gemäß dem Vorschlag von YLearn werde ich versuchen, die relevanten Teile aus Teil 1 meiner Serie zu übernehmen, ohne den gesamten Eintrag hier einzufügen.
Nehmen wir als Beispiel 195.70.16.159/30.
Da es ein / 30 ist, wissen wir, dass der Host-Teil im vierten Oktett sein wird. Lassen Sie uns das in Binär umwandeln:
<pre><code>128 64 32 16 8 4 2 1
SN SN SN SN SN SN H H
1 0 0 1 1 1 1 1</code></pre>
Um nun die Netzwerkadresse herauszufinden, müssen wir nur die SN-Bits, unter denen sich eine 1 befindet, addieren. (128 + 16 + 8 + 4 = 156).
Wenn Sie diese 156 zu den ersten drei Oktetten der Adresse hinzufügen, verbleibt die Netzwerkadresse 195.70.16.156.
Da wir nun wissen, dass die erste verwendbare Adresse immer die Netzwerkadresse plus eine ist, müssen wir nur die folgende Berechnung durchführen: (156 + 1 = 157).
Dies gibt uns eine erste verwendbare Adresse von 195.70.16.157.
Lassen Sie uns nun die letzte verwendbare Adresse für einen Moment überspringen und die Broadcast-Adresse ermitteln. Um herauszufinden, was es ist, müssen wir nur alle H-Bits addieren (unabhängig davon, ob es sich um eine 1 oder eine 0 handelt) und diese Zahl dann zur Netzwerkadresse hinzufügen. (2 + 1 + 156 = 159).
Dies gibt uns eine Broadcast-Adresse von 195.70.16.159.
Und zum Schluss erarbeiten wir die letzte verwendbare Adresse. Dieser Vorgang ähnelt dem Ermitteln der ersten verwendbaren Adresse. Anstatt jedoch eine zur Netzwerkadresse hinzuzufügen, subtrahieren wir tatsächlich eine von der Broadcast-Adresse. (159-1 = 158).
Dies gibt uns eine letzte verwendbare Adresse von 195.70.16.158.
Und da haben wir es! Unser template ist komplett. Zum einfachen Nachschlagen hier noch einmal:
</ul>
<li>Netzwerkadresse: 195.70.16.156</li>
<li>Erste verwendbare Adresse: 195.70.16.157</li>
<li>Letzte verwendbare Adresse: 195.70.16.158</li>
<li>Broadcast-Adresse: 195.70.16.159</li>
</ul>
Als Abkürzung können Sie auch diese Formel verwenden. Es funktioniert in Subnetzen jeder Größe:
<ul>
<li>Erste verwendbare Adresse = Netzwerkadresse + 1</li>
<li>Broadcast-Adresse = Nächste Netzwerkadresse - 1</li>
<li>Letzte verwendbare Adresse = Broadcast-Adresse - 1</li>
</ul>
‐ OzNetNerd
Winzige (fast unbedeutende) Einschränkung: Die Formel Last Usable Address (Letzte verwendbare Adresse) unten funktioniert für alle Subnetze mit Ausnahme von / 31 ... siehe RFC 3021 . Es ist eine kleine, aber relevante Ausnahme, wenn jemand versucht hat, Ihren Algorithmus in Code zu verwenden.
‐ Mike Pennington
Ich möchte Mike Penningtons exzellenter Antwort , für die ich unermüdlich geworben habe, nichts wegnehmen , aber ich sehe immer wieder Fragen, die von seiner Antwort nicht direkt angesprochen werden, und ich habe etwas geschaffen, das ursprünglich auf Mikes Antwort basierte, aber ich habe Weitere Informationen zu Fragen, die im Laufe der Zeit aufgetaucht sind. Leider ist es zu groß und ich musste es in zwei Antworten aufteilen.
</li>
<li><h3>Teil 1 von 2 :: IPv4 Math</h3>
Bei einer gegebenen IPv4-Adresse und der IPv4-Netzwerkmaske (die Netzwerkmaske kann auch von einer Netzwerkmaskenlänge oder einer Hostmaske abgeleitet werden) können Sie viele Informationen zu einem IPv4-Netzwerk ermitteln: Netzwerkadresse, Netzwerk-Broadcast-Adresse, Gesamtzahl der Hostadressen, Gesamtzahl der verwendbaren Adressen Hostadressen, erste verwendbare Hostadresse und letzte verwendbare Hostadresse.
Ich kann gar nicht genug betonen, dass Sie IPv4-Mathematik in Binärform ausführen müssen. Ich denke, jeder Netzwerktechniker (oder angehende Netzwerktechniker) hat versucht, einen Weg zu finden, wie Sie es sicher tun werden *. Das Problem ist, dass 10 (Dezimalzahl) keine Potenz von 2 (Binärzahl) ist. Daher werden Dezimalzahl und Binärzahl nicht auf natürliche Weise ineinander konvertiert, wie Hexadezimalzahl (Basis 16) auf natürliche Weise in Binärzahl und von Binärzahl konvertiert wird, da 16 eine Potenz von 2 ist .
Es scheint, dass die Verwendung der Punkt-Dezimal-Notation für IPv4 ein früher Fehler war, der jetzt nicht korrigiert werden kann. IPv6 hat jedoch von Anfang an die Verwendung von Hexadezimal übernommen, und es ist einfach, zwischen Hexadezimal und Binär umzurechnen.
Wenn Sie keinen IP-Taschenrechner haben (wahrscheinlich nicht in Prüfungen oder Zertifizierungstests für Netzwerkunterricht zugelassen), ist es hilfreich, ein Diagramm der Werte der Bits in einem Oktett zu erstellen. Da es sich um eine Binärzahl handelt, entspricht jeder Bitwert dem 2-fachen des gleichen Ziffernwerts in der nächstniedrigeren Ziffer. Jede Ziffer ist die Zahlenbasis multipliziert mit dem gleichen Ziffernwert in der nächstniedrigeren Ziffer. Dies gilt auch für jede andere Zahlenbasis, einschließlich Dezimalzahl (Basis 10), bei der jeder Ziffernwert das Zehnfache des Werts desselben Ziffernwerts an der nächstniedrigeren Ziffernposition beträgt. Für binäre Ziffern (Bits):
<pre><code>---------------------------------------------------------
| Bit # | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
---------------------------------------------------------
| Value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
---------------------------------------------------------</code></pre>
Bei Dezimalzahlen handelt es sich um Potenzen von 10, bei Binärzahlen handelt es sich um Potenzen von 2. Beachten Sie, dass für jede Bitnummer in der obigen Tabelle der entsprechende Wert 2 zur Potenz der Bitnummer ist.
<pre><code>For our example IPv4 dotted-decimal address of 198.51.100.223:
1st octet: 198 = 128 + 64 + 0 + 0 + 0 + 4 + 2 + 0 = 11000110
2nd octet: 51 = 0 + 0 + 32 + 16 + 0 + 0 + 2 + 1 = 00110011
3rd octet: 100 = 0 + 64 + 32 + 0 + 0 + 4 + 0 + 0 = 01100100
4th octet: 223 = 128 + 64 + 0 + 16 + 8 + 4 + 2 + 1 = 11011111
For our example IPv4 binary address of 11000110001100110110010011011111:
1st octet: 11000110 = 128 + 64 + 0 + 0 + 0 + 4 + 2 + 0 = 198
2nd octet: 00110011 = 0 + 0 + 32 + 16 + 0 + 0 + 2 + 1 = 51
3rd octet: 01100100 = 0 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 100
4th octet: 11011111 = 128 + 64 + 0 + 16 + 8 + 4 + 2 + 1 = 223</code></pre>
Sie müssen sich auch Ihre Wahrheitstabellen aus der Schule merken (in binärer Mathematik ist 0 falsch und 1 ist wahr):
<pre><code>-----------------------------------------
| False AND False = False | 0 AND 0 = 0 |
-----------------------------------------
| False AND True = False | 0 AND 1 = 0 |
-----------------------------------------
| True AND False = False | 1 AND 0 = 0 |
-----------------------------------------
| True AND True = True | 1 AND 1 = 1 |
-----------------------------------------
-----------------------------------------
| False OR False = False | 0 OR 0 = 0 |
-----------------------------------------
| False OR True = True | 0 OR 1 = 1 |
-----------------------------------------
| True OR False = True | 1 OR 0 = 1 |
-----------------------------------------
| True OR True = True | 1 OR 1 = 1 |
-----------------------------------------</code></pre>
* Wenn Sie jahrelang IPv4-Mathematik ausführen, können Sie möglicherweise Binär- / Dezimalumwandlungen in Ihrem Kopf durchführen und scheinen dann in der Lage zu sein, IPv4-Mathematik in Dezimalform auszuführen. Obwohl ich dies in meinem Kopf tun kann, überprüfe ich es immer mit einem IP-Rechner oder konvertiere es in Binär, führe die Berechnung durch und konvertiere es zurück in Dezimalzahl, bevor ich eine Änderung an einem Produktionsnetzwerk vornehme.
</li>
<li><h3>IPv4-Adresse</h3>
Die IPv4-Dezimalpunktnotation 198.51.100.223dient beispielsweise lediglich dazu, dem Menschen das Lesen einer IPv4-Adresse zu erleichtern. Die vier separaten Abschnitte, Oktette genannt, haben für IPv4 eigentlich keine Bedeutung. Machen Sie nicht den Fehler, dass die Oktette eine besondere Bedeutung haben. Eine IPv4-Adresse ist in Wirklichkeit eine 32-Bit-Binärzahl, und so sehen und verwenden Netzwerkgeräte eine IPv4-Adresse.
Unser Beispiel IPv4 - Adresse 198.51.100.223ist tatsächlich 11000110001100110110010011011111zu einem Gerät im Netzwerk, so dass Sie , dass die Dezimalschreibweise Darstellung sehen können wirklich macht es einfacher für die Menschen. Jedes Oktett besteht aus acht Bits der 32-Bit-Adresse (daher der häufig verwendete Begriff “Oktett“), es gibt also vier Oktette ( 32 address bits / 8 bits per octet = 4 octets). Unsere Beispiel-32-Bit-Binäradresse wird in vier Oktette aufgeteilt, und jedes Binäroktett wird in eine Dezimalzahl * konvertiert:
<pre><code>Binary address: 11000110001100110110010011011111
---------------------------------------------
Binary octets: | 11000110 | 00110011 | 01100100 | 11011111 |
Decimal octets: | 198 | 51 | 100 | 223 |
---------------------------------------------
Dotted-decimal: 198.51.100.223</code></pre>
Da jedes Oktett acht Bits lang ist, weist jedes Oktett einen Wert zwischen 0und auf 255(alle Werte, die größer als 255ungültig sind). Der Grund ist, dass 2^8 = 256: 2(die binäre 8Zahlenbasis) gleich der Potenz von (acht Bits pro Oktett) ist 256, die Anzahl der verschiedenen Werte, die durch ein Acht-Bit-Oktett ausgedrückt werden können. Denken Sie daran , dass der erste Wert ist 0, so dass der 256wird th Wert ein kleiner sein , dass die Gesamtzahl der Werte , die (ausgedrückt werden kann 256 − 1 = 255).
Um IPv4-Mathematik korrekt auszuführen, müssen Sie dies in Binärform tun. Andernfalls werden Sie Fehler machen, die Probleme und Frustrationen verursachen. Das bedeutet, dass Sie die gepunktete Dezimalschreibweise in eine Binärschreibweise konvertieren müssen, bevor Sie versuchen, sie zu bearbeiten:
<pre><code>Dotted-decimal: 198.51.100.223
---------------------------------------------
Decimal octets: | 198 | 51 | 100 | 223 |
Binary octets: | 11000110 | 00110011 | 01100100 | 11011111 |
---------------------------------------------
Binary address: 11000110001100110110010011011111</code></pre>
* Führende Nullen in einer IPv4-Adresse mit gepunkteten Dezimalstellen werden von einigen Anwendungen und Programmiersprachen möglicherweise als Oktal (Basis 8) und nicht als Dezimalstelle (Basis 10) interpretiert, was zu Fehlern führt. Führende Nullen sollten für die IPv4-Darstellung mit gepunkteten Dezimalstellen vermieden werden. Führende Nullen sind jedoch für die binären IPv4-Adressoktette erforderlich, da sie Bitpositionen in der vollständigen Adresse darstellen und das Weglassen einer Bitposition die Adresse verkürzt und den Binärwert ändert.
</li>
<li><h3>IPv4-Netzwerkmaske</h3>
Eine IPv4-Netzwerkmaske wird verwendet, um eine IPv4-Adresse in zwei Teile zu unterteilen: den Netzwerkteil und den Hostteil. Die Unterteilung kann eine beliebige Bitnummer sein, sodass sie möglicherweise in ein Oktett und nicht an eine Oktettgrenze fällt, wie dies viele Menschen fälschlicherweise immer annehmen. Eine IPv4-Netzwerkmaske hat die gleiche Größe wie eine IPv4-Adresse (32 Bit) und wird in Punkt-Dezimal-Schreibweise ausgedrückt, wie Sie eine IPv4-Adresse in Punkt-Dezimal-Schreibweise ausdrücken würden (vier Acht-Bit-Oktette, getrennt durch ein Zeitraum). Zum Beispiel 255.255.248.0.
Eine IPv4-Netzwerkmaske besteht aus einer Reihe von aufeinanderfolgenden 1Bits (die den Netzwerkteil einer Adresse darstellen), gefolgt von einer Reihe von 0Bits (die den Hostteil der Adresse darstellen). Die Gesamtzahl der 1Bits und die Gesamtzahl der 0Bits summieren sich zu 32der Anzahl der Bits in einer IPv4-Adresse oder einer Netzwerkmaske. Für unsere Beispielnetzmaske:
<pre><code>Dotted-decimal: 255.255.248.0
------------------------------------------------
Decimal octets: | 255 | 255 | 248 | 0 |
Binary octets: | 11111111 | 11111111 | 11111 | 000 | 00000000 |
------------------------------------------------
| 21 Network bits | 11 Host bits |
------------------------------------------------</code></pre>
Wie Sie sehen, liegt die Aufteilung zwischen dem Netzwerk- und dem Host-Teil der IPv4-Adresse unter Verwendung dieser speziellen Maske innerhalb eines Oktetts und nicht an einer Oktettgrenze.
Eine IPv4-Netzwerkmaske wird häufig durch die Anzahl aufeinanderfolgender 1Bits in der Maske dargestellt. Dies wird verschiedentlich als Netzwerkmaskenlänge oder Präfixlänge bezeichnet und als /gefolgt von der Anzahl aufeinanderfolgender 1Bits in der Netzwerkmaske dargestellt. In unserem Beispiel wird die Anzahl der aufeinanderfolgenden 1Bits gezählt 21, die dargestellt werden können als /21.
Bei gegebener Maskenlänge können Sie die Punkt-Dezimal-Darstellung der Maske berechnen. Schreiben Sie einfach die Anzahl der 1Bits für die Maskenlänge auf und addieren Sie 0am Ende genug Bits zu den Gesamtbits 32. Konvertieren Sie die resultierende Binärzahl in die Punkt-Dezimal-Darstellung:
<pre><code>Mask length: /21
------------------------------------------------
| 21 Network bits | 11 Host bits |
------------------------------------------------
Binary octets: | 11111111 | 11111111 | 11111 | 000 | 00000000 |
Decimal octets: | 255 | 255 | 248 | 0 |
------------------------------------------------
Dotted-decimal: 255.255.248.0</code></pre>
Das Beispiel kann traditionell als 198.51.100.223, mit einer Netzwerkmaske von 255.255.248.0oder als das modernere CIDR (Classless Inter-Domain Routing) dargestellt werden 198.51.100.223/21.
</li>
<li><h3>IPv4-Netzwerkadresse</h3>
Eine IPv4-Netzwerkadresse ist eine IPv4-Adresse, bei der alle Host-Bits auf gesetzt sind 0. Die IPv4-Netzwerkadresse kann bitweise ANDaus den jeweiligen Bits in der binären Darstellung der IPv4-Adresse und der IPv4-Netzwerkmaske berechnet werden . Richten Sie die Bits in beiden Adressen aus und führen Sie ANDfür jedes Bitpaar eine bitweise Verarbeitung durch. Konvertieren Sie dann die einzelnen Oktette des Ergebnisses zurück in Dezimalzahlen.
Für unser Beispiel IPv4-Adresse 198.51.100.223und Netzwerkmaske 255.255.248.0:
<pre><code>Decimal address: 198.51.100.223/21
Binary address octets: 11000110 00110011 01100100 11011111
Binary mask octets: 11111111 11111111 11111000 00000000 AND
-----------------------------------
Binary network octets: 11000110 00110011 01100000 00000000
Decimal network octets: 198 51 96 0
Dotted-decimal network: 198.51.96.0</code></pre>
Wie Sie sehen können, 198.51.100.223/21lautet die Netzwerkadresse von 198.51.96.0. Beachten Sie, dass Sie sich nicht darauf verlassen können, dass Ihnen die Oktette mitteilen, welcher Teil der Adresse das Netzwerk ist und welcher Teil der Adresse für die Hosts bestimmt ist.
Mit dieser Methode können Sie ermitteln, ob sich zwei Adressen in demselben oder in verschiedenen Netzwerken befinden *. Wenn Sie beispielsweise sehen möchten, ob sich Ihre 198.51.100.223/21Adresse in demselben IPv4-Netzwerk befindet, dem ein Host die 198.51.102.57Adresse zugewiesen hat , ermitteln Sie Ihre IPv4-Netzwerkadresse (wie oben). Bestimmen Sie als Nächstes die IPv4-Netzwerkadresse des betreffenden Hosts mithilfe Ihrer IPv4-Netzwerkmaske (Hosts im selben Netzwerk verwenden dieselbe Netzwerkmaske, und Sie haben möglicherweise nicht die Maske, sondern nur die Adresse des Zielhosts):
<pre><code>Decimal address: 198.51.102.57/21
Binary address octets: 11000110 00110011 01100110 00111001
Binary mask octets: 11111111 11111111 11111000 00000000 AND
-----------------------------------
Binary network octets: 11000110 00110011 01100000 00000000
Decimal network octets: 198 51 96 0
Dotted-decimal network: 198.51.96.0</code></pre>
Vergleichen Sie die resultierende IPv4-Netzwerkadresse mit der ursprünglichen IPv4-Netzwerkadresse, und beachten Sie, dass die Netzwerkadressen identisch sind, sodass sich die Hostadressen im selben Netzwerk befinden.
Nun wollen wir sehen, ob Sie sich im selben Netzwerk wie die 74.125.69.100Google-Adresse befinden:
<pre><code>Decimal address: 74.125.69.100/21
Binary address octets: 01001010 01111101 01000101 01100100
Binary mask octets: 11111111 11111111 11111000 00000000 AND
-----------------------------------
Binary network octets: 01001010 01111101 01000000 00000000
Decimal network octets: 74 125 64 0
Dotted-decimal network: 74.125.64.0</code></pre>
Vergleichen Sie die resultierende IPv4-Netzwerkadresse mit der ursprünglichen IPv4-Netzwerkadresse, und beachten Sie, dass sich die Netzwerkadressen unterscheiden, sodass sich die Hostadressen in verschiedenen Netzwerken befinden.
* Dies ist die Methode, mit der ein Quellhost ermittelt, ob es sich um einen Zielhost im selben Netzwerk wie der Quellhost handelt.
</li>
<li><h3>IPv4-Hostmaske</h3>
Ein nützlicher, oft übersehener Wert, der bei der IPv4-Adressierung hilfreich ist, ist die IPv4-Hostmaske. Eine IPv4-Hostmaske ist einfach die Umkehrung der IPv4-Netzwerkmaske. Sie können eine binäre Hostmaske aus einer binären Netzwerkmaske oder eine binäre Netzwerkmaske aus einer binären Hostmaske erstellen, indem Sie einfach das 1s und 0s der Startmaske invertieren :
<pre><code>Dotted-decimal network mask: 255.255.248.0
Decimal network mask octets: 255 255 248 0
Binary network mask octets: 11111111 11111111 11111000 00000000 invert
-----------------------------------
Binary host mask octets: 00000000 00000000 00000111 11111111
Decimal host mask octets: 0 0 7 255
Dotted-decimal host mask: 0.0.7.255</code></pre>
Es ist möglich, mathematisch eine Hostmaske aus der Netzwerkmaske oder die Netzwerkmaske aus der Hostmaske zu erstellen, indem die Startmaske von der längsten Maske ( /32oder der Maske mit allen Einsen) subtrahiert wird .
Das geht in binärer Form:
<pre><code>Binary all-ones mask octets: 11111111 11111111 11111111 11111111
Binary network mask octets: 11111111 11111111 11111000 00000000 -
-----------------------------------
Binary host mask octets: 00000000 00000000 00000111 11111111
Decimal host mask octets: 0 0 7 255
Dotted-decimal host mask: 0.0.7.255</code></pre>
Dies kann auch dezimal erfolgen (ein All-Ones-Oktett ist das 255), aber stellen Sie sicher, dass Sie es in binär konvertieren, bevor Sie tatsächlich versuchen, es für die Adressmanipulation zu verwenden:
<pre><code>Decimal all-ones mask octets: 255 255 255 255
Decimal network mask octets: 255 255 248 0 -
---------------
Decimal host mask octets: 0 0 7 255
Dotted-decimal host mask: 0.0.7.255</code></pre>
</li>
<li><h3>IPv4-Netzwerk-Broadcast-Adresse</h3>
Eine IPv4-Netzwerk-Broadcast-Adresse ist die IPv4-Netzwerkadresse, bei der alle Host-Bits auf gesetzt sind 1. Es gibt verschiedene Möglichkeiten, die IPv4-Netzwerk-Broadcast-Adresse zu berechnen.
In unserem Beispiel IPv4-Adresse 198.51.100.223und Netzwerkmaske 255.255.248.0.
Sie können eine bitweise OREingabe mit der IPv4-Adresse oder der Netzwerkadresse mit der Hostmaske durchführen:
<pre><code>Decimal address octets: 198 51 100 223
Binary address octets: 11000110 00110011 01100100 11011111
Binary host mask octets: 00000000 00000000 00000111 11111111 OR
-----------------------------------
Binary broadcast octets: 11000110 00110011 01100111 11111111
Decimal broadcast octets: 198 51 103 255
Dotted-decimal broadcast: 198.51.103.255</code></pre>
Sie können einfach den Wert der IPv4-Hostmaske zum Wert der IPv4-Netzwerkadresse hinzufügen:
<pre><code>Binary network octets: 11000110 00110011 01100000 00000000
Binary host mask octets: 00000000 00000000 00000111 11111111 +
-----------------------------------
Binary broadcast octets: 11000110 00110011 01100111 11111111
Decimal broadcast octets: 198 51 103 255
Dotted-decimal broadcast: 198.51.103.255</code></pre>
Dies können Sie auch dezimal tun:
<pre><code>Decimal network octets: 198 51 96 0
Decimal host mask octets: 0 0 7 255 +
---------------
Decimal broadcast octets: 198 51 103 255
Dotted-decimal broadcast: 198.51.103.255</code></pre>
</li>
<li><h3>Gesamtzahl der IPv4-Netzwerkhostadressen</h3>
Die Gesamtzahl der IPv4-Hostadressen für ein Netzwerk ergibt 2sich aus der Anzahl der Hostbits 32abzüglich der Anzahl der Netzwerkbits. Für unser Beispiel eines /21(Netzwerkmasken- 255.255.248.0) Netzwerks gibt es 11Host-Bits ( 32 address bits − 21 network bits = 11 host bits). Das heißt, 2048in einem /21IPv4-Netzwerk gibt es insgesamt Hostadressen ( 2^11 = 2048).
</li>
<li><h3>Insgesamt verwendbare IPv4-Netzwerkhostadressen</h3>
Mit Ausnahme von /31Netzwerken (Netzwerkmaske 255.255.255.254) und /32(Netzwerkmaske 255.255.255.255) entspricht die Anzahl der verwendbaren Hostadressen in einem IPv4-Netzwerk der Gesamtanzahl der Netzwerkhostadressen abzüglich 2(da die IPv4-Netzwerk- und Broadcastadressen für Hostadressen im Netzwerk nicht verwendbar sind) müssen sie von der Anzahl der verwendbaren Hostadressen subtrahieren). Für unser Beispiel eines /21( 255.255.248.0) Netzwerks gibt es 2046verwendbare Hostadressen ( 2^11 - 2 = 2046).
</li>
<li><h3>Erste verwendbare IPv4-Netzwerkhostadresse</h3>
Mit Ausnahme von /31Netzwerken (Netzwerkmaske 255.255.255.254) und /32(Netzwerkmaske 255.255.255.255) ist die erste verwendbare IPv4-Netzwerkhostadresse die IPv4-Netzwerkadresse plus 1(die IPv4-Netzwerkadresse kann nicht für eine Netzwerkhostadresse verwendet werden). In unserem Beispielnetzwerk von 198.51.96.0/21ist die erste verwendbare Netzwerkhostadresse 198.51.96.1( 198.51.96.0 + 1 = 198.51.96.1). Setzen Sie einfach das niederwertige Bit der binären IPv4-Netzwerkadresse auf 1:
<pre><code>Decimal network octets: 198 51 96 0
Binary network octets: 11000110 00110011 01100000 00000000
-----------------------------------
Binary address octets: 11000110 00110011 01100000 00000001
Decimal address octets: 198 51 96 1
Dotted-decimal address: 198.51.96.1</code></pre>
</li>
<li><h3>Letzte verwendbare IPv4-Netzwerkhostadresse</h3>
Mit Ausnahme von /31(Netzwerkmaske 255.255.255.254) und /32(Netzwerkmaske 255.255.255.255) Netzwerken ist die letzte verwendbare IPv4-Netzwerkhostadresse die IPv4-Netzwerk-Broadcast-Adresse minus 1(die IPv4-Netzwerk-Broadcast-Adresse ist für eine Netzwerkhostadresse nicht verwendbar). Für unser Beispielnetzwerk von 198.61.96.0/21ist die letzte verwendbare Netzwerkhostadresse 198.51.103.254( 198.51.103.255 - 1 = 198.51.103.254). Setzen Sie einfach das niederwertige Bit der binären IPv4-Netzwerk-Broadcast-Adresse auf 0:
<pre><code>Decimal broadcast octets: 198 51 103 255
Binary broadcast octets: 11000110 00110011 01100111 11111111
-----------------------------------
Binary address octets: 11000110 00110011 01100111 11111110
Decimal address octets: 198 51 103 254
Dotted-decimal address: 198.51.103.254</code></pre>
</li>
<li><h3>Zusammenführen der IPv4-Netzwerkadressierung</h3>
Für unsere IPv4-Beispielnetzwerkadresse 198.51.100.223 und -maske 255.255.248.0 (oder 198.51.100.223/21) können wir viele Netzwerkinformationen berechnen:
<pre><code>Host address: 198.51.100.223
Network mask: 255.255.248.0
Network mask length: 21
Host mask: 0.0.7.255
Host mask length: 11
*Network address: 198.51.96.0
*First usable network host address: 198.51.100.1
*Last usable network host address: 198.51.103.254
*Network Broadcast address: 198.51.103.255
Total network host addresses: 2048
Usable network host addresses: 2046</code></pre>
* Bei Prüfungen und Zertifizierungstests für Network Education Classes müssen Sie in der Lage sein, diese für ein IPv4-Netzwerk schnell zu berechnen, wenn Sie eine Hostadresse und eine Maske (oder eine Maskenlänge) angeben. Mithilfe der folgenden Hinweise können Sie Ihre Antworten schnell überprüfen:
<ul>
<li>Netzwerkadresse (Hinweis: eine gerade Zahl)</li>
<li>Erste verwendbare Hostadresse (Hinweis: Netzwerkadresse plus 1, ungerade Zahl)</li>
<li>Letzte verwendbare Host-Adresse (Hinweis: Broadcast-Adresse minus 1, gerade Zahl)</li>
<li>Broadcast-Adresse (Hinweis: Netzwerkadresse plus Host-Maske, eine ungerade Zahl)</li>
</ul>
Die obigen Hinweise gelten nicht für /31(Netzwerkmaske 255.255.255.254) oder /32(Netzwerkmaske 255.255.255.255) Netzwerke.
Wenn Sie genügend Zeit für Ihre Prüfung haben und ein Problem mit mehreren Methoden vorliegt, um eine Antwort zu erhalten, sollten Sie die Antwort mit mehreren Methoden überprüfen.
Fortsetzung in der nächsten Antwort ...
‐ Ron Maupin
Fortsetzung von der vorherigen Antwort ...
</li>
<li><h3>Teil 2 von 2 :: Auswählen einer IPv4-Netzwerk-Gateway-Adresse (Router)</h3>
Ein Gateway ist ein Host im Netzwerk, der Pakete an andere Netzwerke weiterleiten kann, und ihm kann jede verwendbare Netzwerk-Host-Adresse zugewiesen werden. Einige Personen weisen einer verwendbaren Netzwerk-Host-Adresse zufällig Gateway-Adressen zu, andere weisen einem Gateway immer die erste verwendbare Netzwerk-Host-Adresse zu und andere weisen einem Gateway immer die letzte verwendbare Netzwerk-Host-Adresse zu. Es ist eigentlich egal, welche verwendbare Host-Netzwerkadresse Sie einem Gateway zuweisen, aber Sie sollten versuchen, konsistent zu sein.
</li>
<li><h3>IPv4- /31Netzwerke (Netzwerkmaske 255.255.255.254)</h3>
Ursprünglich waren /31(Netzwerkmasken- 255.255.255.254) Netzwerke unbrauchbar, weil es nur ein Hostbit gibt, wodurch Sie zwei Netzwerkhostadressen erhalten, aber die Anzahl der verwendbaren Netzwerkhostadressen ist die Gesamtzahl der Netzwerkhostadressen minus 2( 2 total host addresses - 2 = 0 usable host addresses).
Punkt-zu-Punkt-Verbindungen benötigen nur zwei Hostadressen (eine für jedes Ende der Verbindung). Die herkömmliche Art der Zuweisung von IPv4-Netzwerken erforderte die Verwendung von /30(Netzwerkmasken- 255.255.255.252) Netzwerken für Punkt-zu-Punkt-Verbindungen. Dies verschwendet jedoch die Hälfte der Netzwerkhostadressen, da ein /30Netzwerk insgesamt vier Netzwerkhostadressen aufweist, aber nur zwei verwendbare Netzwerkhostadressen sind ( 2^2 − 2 = 2).
Aufgrund des kritischen IPv4-Adressengpasses wurde ein Standard erstellt, der die Verwendung von /31Netzwerken für Punkt-zu-Punkt-Verbindungen ermöglicht. Dies ist sinnvoll, da in solchen Netzwerken kein Broadcast erforderlich ist: Alle von einem Host im Netzwerk gesendeten Pakete sind für den einzigen anderen Host im Netzwerk bestimmt und werden effektiv rundgesendet. In einem /31Netzwerk ist die Netzwerkadresse die erste verwendbare Hostadresse und die Broadcast-Adresse die letzte verwendbare Hostadresse.
Leider unterstützen nicht alle Anbieter (insbesondere Microsoft) den Standard für die Verwendung von /31Netzwerken auf Punkt-zu-Punkt-Verbindungen, und Sie werden am häufigsten Punkt-zu-Punkt-Verbindungen unter Verwendung von /30Netzwerken sehen.
</li>
<li><h3>IPv4- /32 Netzwerke (Netzwerkmaske 255.255.255.255)</h3>
Ein /32(Netzwerkmasken- 255.255.255.255) Netzwerk ist sowohl ein Netzwerk ohne Hostadressen als auch eine Hostadresse an sich. Es gibt nur eine Adresse im Netzwerk, und das ist die Netzwerkadresse. Da sich keine anderen Hosts im Netzwerk befinden, muss der Datenverkehr zur und von der Netzwerkadresse geleitet werden.
Diese Adressen werden häufig auf virtuellen Netzwerkschnittstellen verwendet, die in einem Gerät definiert sind, das Pakete zwischen seinen virtuellen und physischen Schnittstellen weiterleiten kann. Ein Beispiel hierfür ist das Erstellen einer virtuellen Schnittstelle in einem Netzwerkgerät, die als Quelle oder Ziel für das Gerät selbst verwendet wird. Eine virtuelle Schnittstelle kann aufgrund eines physischen Problems nicht gelöscht werden, z. B. wenn das Kabel abgezogen wurde. Wenn das Gerät über mehrere Pfade verfügt, können andere Geräte mit der Adresse der virtuellen Schnittstelle weiterhin mit dem Gerät kommunizieren, wenn eine physische Schnittstelle des Geräts aus irgendeinem Grund nicht funktionsfähig ist .
</li>
<li><h3>IPv4-Netzwerke unterteilen</h3>
Durch die Untervernetzung eines Netzwerks werden mehrere, längere Netzwerke aus einer Netzwerkadresse und -maske erstellt. Die Grundidee ist, dass Sie höherwertige Bits vom Host-Teil des ursprünglichen Netzwerks ausleihen. Angenommen, Sie möchten aus unserem ursprünglichen 198.51.96.0/21Netzwerk 14 gleich große Subnetze erstellen . Da Sie höherwertige Bits vom Host-Teil des ursprünglichen Netzwerks ausleihen, erhalten Sie eine Zahl, die eine Potenz von 2, aber 14keine Potenz von 2ist. Sie müssen also die nächsthöhere Potenz von erhalten 2, die zufällig 16( 16 = 2^4). Die Stärke von 2ist in diesem Fall 4die Anzahl der Host-Bits höherer Ordnung, die zum Ausleihen für die Anzahl der zu erstellenden Subnetze erforderlich sind. Sie können auch eine mathematische Formel verwenden, um die Anzahl der erforderlichen Bits zu bestimmen:Log2(X subnets) = Y borrowed bitsauf den nächsten ganzzahligen Wert aufgerundet:
Log2(14 subnets) = 3.807354922, rounded up = 4 borrowed bits
Für unser Beispiel, in dem 14 gleich große Subnetze des ursprünglichen 198.51.96.0/21Netzwerks benötigt werden, beginnend mit allen 0s * für das erste Subnetz, fügen Sie 1dem Subnetzteil Folgendes hinzu, um das nächste Subnetz zu erhalten:
<pre><code> ----------------------------------------------
Original: | 21 network bits | 11 host bits |
----------------------------------------------
Network: | 110001100011001101100 | 0000 | 0000000 | = 198.51.96.0/21
Subnet 1: | 110001100011001101100 | 0000 | 0000000 | = 198.51.96.0/25
Subnet 2: | 110001100011001101100 | 0001 | 0000000 | = 198.51.96.128/25
Subnet 3: | 110001100011001101100 | 0010 | 0000000 | = 198.51.97.0/25
Subnet 4: | 110001100011001101100 | 0011 | 0000000 | = 198.51.97.128/25
Subnet 5: | 110001100011001101100 | 0100 | 0000000 | = 198.51.97.128/25
Subnet 6: | 110001100011001101100 | 0101 | 0000000 | = 198.51.98.128/25
Subnet 7: | 110001100011001101100 | 0110 | 0000000 | = 198.51.99.0/25
Subnet 8: | 110001100011001101100 | 0111 | 0000000 | = 198.51.99.128/25
Subnet 9: | 110001100011001101100 | 1000 | 0000000 | = 198.51.100.0/25
Subnet 10: | 110001100011001101100 | 1001 | 0000000 | = 198.51.100.128/25
Subnet 11: | 110001100011001101100 | 1010 | 0000000 | = 198.51.101.0/25
Subnet 12: | 110001100011001101100 | 1011 | 0000000 | = 198.51.101.128/25
Subnet 13: | 110001100011001101100 | 1100 | 0000000 | = 198.51.102.0/25
Subnet 14: | 110001100011001101100 | 1101 | 0000000 | = 198.51.102.128/25
----------------------------------------------
Subnetted: | 25 network bits | 7 host bits |
----------------------------------------------
----------------------------------------------
Unused: | 110001100011001101100 | 111 | 00000000 | = 198.51.103.0/24
----------------------------------------------</code></pre>
* Es gibt einen anhaltenden Mythos, dass für Subnetze wie für Hostadressen die Subnetze mit allen Nullen und mit allen Einsen nicht verwendet werden können, aber dieser Mythos wurde vor vielen Jahren durch einen Standard explizit beseitigt. Leider erstreckt sich dieser Mythos auch auf einige Netzwerkunterrichtsklassen, und die richtige Antwort für diese (falschen) Klassen wäre die Verwendung des 2. bis 15. Subnetzes.
Es ist möglich, ein Netzwerk in Subnetze unterschiedlicher Größe zu unterteilen (jedes IPv4-Netzwerk ist ein Subnetz der 0.0.0.0/0Netzwerkadresse), wie in unserem obigen Beispiel, wobei das nicht verwendete Subnetz ein /24Subnetz ist. Dies erfordert jedoch eine sorgfältige Planung, damit die resultierenden Subnetze beginnen das richtige Bit.
Nehmen wir zum Beispiel an, wir benötigen sowohl ein /26‐ als auch ein /27‐Subnetz aus unserem 198.51.96.0/21‐Netzwerk. Dazu gibt es zwei Möglichkeiten: Beginnen Sie mit dem /26‐Subnetz oder mit dem /27‐Subnetz.
Beginnend mit dem /26‐Subnetz:
<pre><code>Original: | 110001100011001101100 | 00000000000 | /21
Subnet 1: | 110001100011001101100 | 00000 | 000000 | /26</code></pre>
Fügen Sie 1 dem Subnetzteil Folgendes hinzu, um die Startposition des nächsten Subnetzes zu ermitteln:
<pre><code>Subnet 2: | 110001100011001101100 | 00001 | 000000 | /26</code></pre>
Dann erweitern Sie das zweite Subnetz auf /27:
<pre><code>Subnet 2: | 110001100011001101100 | 000010 | 00000 | /27</code></pre>
Beachten Sie, dass wir das zweite /26Subnetz tatsächlich in ein /27Subnetz unterteilen, und das funktioniert gut, weil 27es größer als ist 26.
Beginnend mit dem /27Subnetz:
<pre><code>Original: | 110001100011001101100 | 00000000000 | /21
Subnet 1: | 110001100011001101100 | 000000 | 00000 | /27</code></pre>
Fügen Sie 1dem Subnetzteil Folgendes hinzu, um die Startposition des nächsten Subnetzes zu ermitteln:
<pre><code>Subnet 2: | 110001100011001101100 | 000001 | 00000 | /27</code></pre>
Beachten Sie, dass im Host-Bereich nicht mehr genügend Bits (fünf Host-Bits) vorhanden sind, um ein /26Netzwerk zu unterstützen , für das sechs Host-Bits ( 32 address bits − 26 network bits = 6 host bits) erforderlich sind . Wenn wir dies als Ausgangsposition für das /26Subnetz verwenden, überlappen wir tatsächlich das vorherige und das nächste /26Netzwerk. Wir müssen eine Lücke von der Größe eines /27Netzwerks für die Startposition des /26Netzwerks lassen:
<pre><code>Original: | 110001100011001101100 | 00000000000 | /21
Subnet 1: | 110001100011001101100 | 000000 | 00000 | /27
Unused: | 110001100011001101100 | 000001 | 00000 | /27
Subnet 2: | 110001100011001101100 | 00001 | 000000 | /26</code></pre>
Ein /26Subnetz muss immer an einer /26Grenze beginnen: jede 2. /27Subnetzgrenze, jede 4. /28Grenze, jede 8. /29Grenze usw. Diese Regel gilt für jede Subnetzgröße: Ein Subnetz muss an einer Grenze eines längeren Subnetzes beginnen, 2die der Leistung entspricht der längeren Subnetzgröße abzüglich der Subnetzgröße. Beispielsweise /23muss in jedem vierten /25Netzwerk ein Subnetz gestartet werden ( 2^(25 - 23) = 2^2 = 4).
Der Versuch, ein Gerät mit einer Netzwerkadresse zu konfigurieren, die an der falschen Bitgrenze beginnt, führt entweder zu seltsamen Problemen, die sich nur schwer beheben lassen, oder das Gerät gibt einen Fehler über überlappende Netzwerke aus. Einige Leute versuchen dies mit Punkt-Dezimal zu tun, und dies kann zu Fehlern führen. Beispielsweise sind die 198.51.96.0/27Netzwerkhostadressen 198.51.96.0durch 198.51.96.31. Wenn Sie dies wissen und versuchen, das 198.51.96.32/26Netzwerk zu verwenden , treten Probleme auf, da das Netzwerk an der falschen Bitgrenze beginnt und das /27Netzwerk überlappt (prüfen Sie dies, indem Sie bitweise ANDAdressen und Netzwerkmasken verwenden). Es ist offensichtlich in binär, aber es ist nicht so offensichtlich in Punkt-Dezimal. Sie können lernen, dass /26Netzwerke mit einem Vielfachen der Dezimalzahl beginnen müssen64 Grenze, aber es in binären sehen kann Ihnen sicher sagen, ob Sie einen Fehler gemacht haben oder nicht.
</li>
<li><h3>Subnetzgröße basierend auf der Anzahl der Hosts</h3>
Bei allgemeinen Prüfungsfragen erhalten Sie ein Netzwerk und werden aufgefordert, mehrere unterschiedlich große Subnetze zu erstellen, die auf der Anzahl der Hosts für jedes Subnetz basieren. Wenn möglich, müssen Sie klären, ob die Anzahl der Hosts auf der Gesamtzahl der Hostadressen im Netzwerk oder auf der Anzahl der verwendbaren Hosts im Netzwerk basiert. (Wenn in der Frage beispielsweise nach einem Subnetz mit 256oder 255Hosts gefragt /24wird, erhalten Sie von einem Netzwerk die 256Gesamtzahl der Hostadressen, jedoch nur die 254verwendbaren Hostadressen. Eine solche Frage kann eine Trickfrage sein, und die richtige Antwort hängt davon ab, ob die Frage bedeutet Gesamt-Host-Adressen oder verwendbare Host-Adressen.)
<u>Beispielfrage:</u><br />
<br />
Given the 198.51.96.0/21 network, subnet it for the following departments:
<ul>
<li> Department 1: 500 hosts</li>
<li> Department 2: 100 hosts</li>
<li> Department 3: 200 hosts</li>
<li>Department 4: 1000 hosts</li>
</ul>
Wie wir im Abschnitt IPv4-Subnetze gesehen haben, besteht die einfachste Möglichkeit darin, die Abteilungen zunächst nach der größten bis zur kleinsten Anzahl von Hosts zu sortieren, da keine Netzwerklücken entstehen:
<ul>
<li>Department 4: 1000 hosts</li>
<li>Department 1: 500 hosts</li>
<li>Department 3: 200 hosts</li>
<li>Department 2: 100 hosts</li>
</ul>
Sie können jedes auf die nächsthöhere Potenz von 2 aufrunden, um die Anzahl der erforderlichen Gesamt-Hostadressen für jedes Subnetz zu erhalten, und dann die Anzahl der erforderlichen Hostbits aus dem Exponenten der Potenz von ableiten 2:
<ul>
<li>Department 4: 1024 total host addresses = 2^10 = 10 host bits</li>
<li>Department 1: 512 total host addresses = 2^9 = 9 host bits</li>
<li>Department 3: 256 total host addresses = 2^8 = 8 host bits</li>
<li>Department 2: 128 total host addresses = 2^7 = 7 host bits</li>
</ul>
Sie können auch die vorherige Formel zum Ermitteln der für eine bestimmte Anzahl gleichgroßer Subnetze erforderlichen Anzahl von Bits ändern, um die Anzahl der für jedes Subnetz erforderlichen Hostbits zu ermitteln: Log2(X hosts) = Y host bitsAuf den nächsten ganzzahligen Wert aufgerundet:
<ul>
<li>Department 4: Log2(1000 hosts) = 9.96578428466209, rounded up = 10 host bits</li>
<li>Department 1: Log2( 500 hosts) = 8.96578428466209, rounded up = 9 host bits</li>
<li>Department 3: Log2( 200 hosts) = 7.64385618977472, rounded up = 8 host bits</li>
<li>Department 2: Log2( 100 hosts) = 6.64385618977473, rounded up = 7 host bits</li>
</ul>
Sobald Sie die Anzahl der für jedes Subnetz erforderlichen Host-Bits haben, führen Sie die Binärberechnung durch, um das spezifische Subnetz für jede Abteilung zu ermitteln. Denken Sie daran, 1zu einem Subnetz hinzuzufügen , um die Startadresse des nächsten Subnetzes zu erhalten:
<pre><code>Original: | 110001100011001101100 | 00000000000 | = 198.51.96.0/21
Department 4: | 110001100011001101100 | 0 | 0000000000 | = 198.51.96.0/22
Department 1: | 110001100011001101100 | 10 | 000000000 | = 198.51.100.0/23
Department 3: | 110001100011001101100 | 110 | 00000000 | = 198.51.102.0/24
Department 2: | 110001100011001101100 | 1110 | 0000000 | = 198.51.103.0/25
Unused: | 110001100011001101100 | 1111 | 0000000 | = 198.51.103.128/25</code></pre>
</li>
<li><h3>Ein bestimmtes Subnetz finden</h3>
Möglicherweise werden Sie aufgefordert, die Netzwerkinformationen für ein bestimmtes Subnetz eines bestimmten Netzwerks anzugeben. Beispielsweise werden Sie möglicherweise aufgefordert, die Netzwerkinformationen für das 23. /26Subnetz des 198.51.96.0/21Netzwerks anzugeben . Da Sie das 23. Subnetz benötigen, können Sie konvertieren 22(denken Sie daran, dass 0es das erste Subnetz ist, das 23. Subnetz wäre also 22*) nach binär: Dezimal 22= Binär 10110. Verwenden Sie die konvertierte Binärzahl im Teilnetz der Adresse:
Original:
<pre><code> | 110001100011001101100 | 00000000000 | = 198.51.96.0/21</code></pre>
Subnet 23:
<pre><code>| 110001100011001101100 | 10110 | 000000 | = 198.51.101.128/26</code></pre>
Nachdem Sie die 23. Netzwerkadresse identifiziert haben, 198.51.101.128/26können Sie die anderen Netzwerkinformationen berechnen (wie in den vorherigen Abschnitten beschrieben):
<pre><code>Network address: 198.51.101.128
Network mask length: 26
Network mask: 255.255.255.192
Host mask length: 6
Host mask: 0.0.0.63
First usable network host address: 198.51.101.1
Last usable network host address: 198.51.101.62
Broadcast address: 198.51.101.63
Total network host addresses: 64
Usable network host addresses: 62</code></pre>
* Es gibt einen anhaltenden Mythos, dass für Subnetze wie für Hostadressen die Subnetze mit allen Nullen und mit allen Einsen nicht verwendet werden können, aber dieser Mythos wurde vor vielen Jahren durch einen Standard explizit beseitigt. Leider erstreckt sich dieser Mythos auch auf einige Netzwerkunterrichtsklassen, und die richtige Antwort für diese (falschen) Klassen wäre die Verwendung des 24. ( 23dezimalen, 10111binären) Subnetzes in unserem Beispiel für gleich große Subnetze anstelle des tatsächlichen 23. ( 22dezimalen, binären) Subnetzes. 10110binäres Subnetz.
</li>
<li><h3>Einen bestimmten Netzwerkhost finden</h3>
Möglicherweise werden Sie aufgefordert, die Hostadresse für einen bestimmten Host eines bestimmten Netzwerks zu ermitteln. Beispielsweise werden Sie möglicherweise aufgefordert, die Hostadresse für den 923. Host des 198.51.96.0/21Netzwerks anzugeben . Da Sie den 923. Host benötigen, können Sie 923in Binär umwandeln : Dezimal 923= Binär 1110011011. Fügen Sie die konvertierte Binärzahl zur Netzwerkadresse hinzu:
<pre><code>Binary network: | 110001100011001101100 | 00000000000 |
Binary 923: | 000000000000000000000 | 01110011011 | +
-----------------------------------
Host address: | 110001100011001101100 | 01110011011 | = 198.51.99.155</code></pre>
</li>
<li><h3>Größtes gemeinsames Netzwerk für zwei Hosts *</h3>
Möglicherweise erhalten Sie zwei (oder mehr) verschiedene Hostadressen und werden aufgefordert, das größte Netzwerk (die kleinste Anzahl von Hosts) anzugeben, das beide Hostadressen enthält. Finden Sie zum Beispiel das größte gemeinsame Netzwerk von 198.51.100.223und 198.51.101.76.
Konvertieren Sie zuerst die punktierten Dezimaladressen in Binär:
<pre><code>198.51.100.223 = 11000110001100110110010011011111
198.51.101.76 = 11000110001100110110010101001100</code></pre>
Beginnen Sie mit dem höchstwertigen Bit (ganz links) und vergleichen Sie die Binäradressen an jeder Bitposition, bis die Bits an derselben Position nicht mehr übereinstimmen:
<pre><code>198.51.100.223 = | 11000110001100110110010 | 011011111 |
198.51.101.76 = | 11000110001100110110010 | 101001100 |</code></pre>
Zählen Sie 23in diesem Fall die Anzahl der übereinstimmenden Bits, um die Maskenlänge zu erhalten. Sie können dann eine der Adressen nehmen und bitweise ANDmit der Netzwerkmaske arbeiten, um das gemeinsame Netzwerk zu erhalten. Wenn Sie dies für beide Adressen tun, sollte dies zu demselben Netzwerk führen. Wenn dies nicht der Fall ist, haben Sie entweder eine Fehlzählung durchgeführt oder eine nicht übereinstimmende Bitposition verpasst.
<pre><code>198.51.100.223 = 11000110001100110110010011011111
/23 mask length = 11111111111111111111111000000000 AND
--------------------------------
Binary network: 11000110001100110110010000000000 = 198.51.100.0/23
198.51.101.76 = 11000110001100110110010111011111
/23 mask length = 11111111111111111111111000000000 AND
--------------------------------
Binary network: 11000110001100110110010000000000 = 198.51.100.0/23</code></pre>
Beachten Sie, dass die beiden Netzwerkadressen übereinstimmen. Das heißt, das größte gemeinsame Netzwerk für die beiden Hostadressen ist 198.51.100.0/23(CIDR-Notation) oder (traditionell) 198.51.100.0mit einer Maske von 255.255.254.0.
* Möglicherweise wird dies als das kleinste gemeinsame Netzwerk (oder eine Variante, z. B. minimales Netzwerk oder Maske) bezeichnet. Das kleinste Netzwerk ist tatsächlich 0.0.0.0/0( 0Netzwerkbits), und es ist das gemeinsame Netzwerk für alle IPv4-Adressen, sodass es das kleinste gemeinsame Netzwerk aller IPv4-Adressen ist. Die Verwirrung entsteht, weil viele Leute den Host-Teil der Adresse betrachten und dessen Größe als die Netzwerkgröße und nicht als die Größe des Netzwerk-Teils der Adresse ansehen.
</li>
<li><h3>Öffentliche oder private Adressierung</h3>
IPv4 selbst kennt weder das Konzept noch die Unterscheidung zwischen öffentlicher und privater Adressierung. Die private IPv4-Adressierung wurde willkürlich gewählt, und die ISPs leiten nach Vereinbarung keine Pakete im öffentlichen Internet unter Verwendung von Adressen im privaten Adressraum weiter, aber Netzwerkgeräte und Hosts wissen nicht, ob eine Adresse öffentlich oder privat ist.
Für eine private IPv4-Adressierung sind drei Adressbereiche definiert:
<pre><code> 10.0.0.0/8
172.16.0.0/12
192.168.0.0/16</code></pre>
</li>
<li><h3>Classful Network Addressing</h3>
Ursprünglich wurden IPv4-Adressen in Netzwerkklassen unterteilt. Die klassische Adressierung war vor Jahrzehnten veraltet, und moderne Netzwerke basieren auf CIDR (Classless Inter-Domain Routing). Leider bestehen jedoch viele Netzwerkschulungskurse und Zertifizierungsprüfungen darauf, Ihr Wissen über die klassische Adressierung zu testen. Machen Sie sich mit allen bisherigen IPv4-Berechnungen in diesem Dokument vertraut, bevor Sie sich mit klassischer Adressierung befassen.
Die IPv4-Adressklassen basieren alle auf den ersten Bits der Adresse:
<table>
<tr>
<th>Class</th><th>Address Starts With</th><th>Address Range</th><th>Default Size*
</tr>
<tr>
<td> A</td><td>First one bit = 0</td><td>0.0.0.0 to 127.255.255.255</td><td>/8</td>
</tr>
<tr>
<td>B</td><td>First two bits = 10</td><td>128.0.0.0 to 191.255.255.255</td><td>/16</td>
</tr>
<tr>
<td>C</td><td>First three bits = 110</td><td>192.0.0.0 to 223.255.255.255</td><td>/24</td>
</tr>
<tr>
<td>D</td><td>First four bits = 1110</td><td>224.0.0.0 to 239.255.255.255</td><td>N/A</td>
</tr>
<tr>
<td>E</td><td>First four bits = 1111</td><td>240.0.0.0 to 255.255.255.255</td><td>N/A</td>
</tr>
</table>
<ul>
<li>Klasse-A-Netzwerke haben eine Standardnetzwerkmaske von 255.0.0.0( /8) und eine Standardhostmaske von 0.255.255.255, wodurch Sie die 16,777,216Gesamtzahl der Hostadressen pro Netzwerk erhalten.</li>
<li>Netzwerke der Klasse B haben eine Standardnetzwerkmaske von 255.255.0.0( /16) und eine Standardhostmaske von 0.0.255.255, wodurch Sie die 65,536Gesamtzahl der Hostadressen pro Netzwerk erhalten.</li>
<li>Netzwerke der Klasse C haben eine Standardnetzwerkmaske von 255.255.255.0( /24) und eine Standardhostmaske von 0.0.0.255, wodurch Sie die 256Gesamtzahl der Hostadressen pro Netzwerk erhalten.</li>
<li>Class D-Adressen werden für Multicast verwendet, wobei jede Adresse einzeln verwendet wird, um eine Gruppe von Hosts darzustellen, die eine Multicast-Adresse abonnieren. Dies bedeutet, dass Adressen der Klasse D normalerweise nicht das Konzept einer Netzwerkmaske haben.</li>
<li>Adressen der Klasse E sind reserviert und können für nichts verwendet werden. Es gibt eine Ausnahme, nämlich die Limited Broadcast-Adresse von. Hierbei 255.255.255.255handelt es sich um eine individuelle Adresse, die jeder Host in einem Netzwerk als seine eigene behandelt. Das bedeutet, dass alles, was an gesendet 255.255.255.255wird, von jedem Host im Netzwerk empfangen und verarbeitet wird.</li>
</ul>
Da jede Klasse eine Standardnetzwerkgröße hat, wird bei einigen Fragen die Standardmaske für eine bestimmte Adresse vorausgesetzt, sodass alle Berechnungen auf der Basis der Standardnetzwerkmaske durchgeführt werden müssen. Für unsere Beispieladresse 198.51.100.223:
<pre><code>Binary: 11000110 00110011 01100100 11011111</code></pre>
Beachten Sie, dass die ersten drei Adressbits sind 110, was bedeutet, dass es sich um eine Adresse der Klasse C handelt. Wenn keine Maske oder Maskenlänge vorhanden ist, wird angenommen , dass die Netzwerkmaske 255.255.255.0( /24) ist und die Netzwerkadresse ergibt 198.51.100.0.
* Machen Sie nicht den üblichen Fehler zu glauben, dass die Netzwerkmaske die Netzwerkklasse diktiert, sondern umgekehrt. Zum Beispiel betrachten viele Leute ein /24 Netzwerk als ein Klasse-C-Netzwerk, aber das ist nicht einmal im entferntesten wahr. Wenn zum Beispiel ein 10.11.12.0/24Netzwerk verwendet wird, wird dieses Netzwerk aufgrund der Netzwerkmaske fälschlicherweise von vielen Personen als Klasse-C-Netzwerk bezeichnet, obwohl das erste Bit der Adresse 0ein Klasse-A-Netzwerk ist, obwohl die Netzwerkmaske länger ist als die Standardmaske Klasse-A-Netzwerkmaske, dh es handelt sich um ein Teilnetz eines Klasse-A-Netzwerks, nicht um ein Klasse-C-Netzwerk.
‐ Ron Maupin
(In dem Versuch, alle Netzmasken-Antworten an einem Ort zu speichern, habe ich nach den anderen ausgezeichneten Antworten eine visuelle Methode hinzugefügt.)
<h4>Subnetzgröße basierend auf der Anzahl der Hosts</h4<
Dies ist die häufig gestellte Frage: "Wie schneide ich eine bestimmte Netzwerkgröße in n Teile, sodass x 1 Hosts in Netzwerk 1, x 2 Hosts in Netzwerk 2 usw. zulässig sind?" kann absolut gelöst werden, indem man die Methoden durcharbeitet, die in den anderen ausgezeichneten Antworten beschrieben werden.
Einige mögen jedoch eine visuellere Methode und einige allgemeine Tipps.
<h4>Visuelle "Glasscutter" -Methode</h4>
Die Art und Weise, wie ich dies oft visuell verstehe, ist mit der folgenden Methode:
Stellen Sie sich zunächst eine Papier-Guillotine wie diese vor:
Schiebepapier Guillotine
( Bild aus Wikipedia Von Nathan CC BY-SA 3.0)
Die Eigenschaften dieser Art von Schneideplotter bestehen darin, dass sie nur gerade Linien schneidet, immer den ganzen Weg über das Papier schneidet und senkrecht zu einer Seite schneidet. Unsere besondere Guillotine ist pingelig: Sie schneidet Papier nur in zwei Hälften, und wir können keinen Schnitt näher als 1 cm an der Kante ausführen.
<ul>
<li>Wie viele Adressen stehen insgesamt für Ihren Startblock zur Verfügung?
Angenommen, eine / 22 hat 1024 Adressen
Holen Sie sich ein Stück Papier mit so vielen Quadratzentimetern (und Quadrat oder 2x1 Verhältnis)
Deshalb bekomme ich ein Stück 32 x 32 cm, das 1024 <math><msup><mrow><mi>c</mi><mi>m</mi></mrow><mn>2</mn></msup></math> hat
Wiederholt
Wähle ein Stück (wenn es mehr als ein Stück gibt)
Schneiden Sie es in zwei Hälften (unter Einschränkungen: nur rechteckige Schnitte, in zwei Hälften, nichts unter 1 cm)
Oft gibt es verschiedene Schnitte, die man machen kann und man muss eine Wahl treffen
Um n Netzwerke zu erhalten, müssen Sie n-1 Schnitte ausführen
Manchmal kommt es vor, dass Sie zusätzliche Teile haben (je nachdem, wie Sie den "Müll" verteilen möchten).
</ul>
Hier ist eine Illustration des Prozesses. Sie sehen, dass bei Schnitt 1 und Schnitt 2 nur eine Art von Schnitt möglich ist, aber bei Schnitt 3 treffen wir eine Auswahl: Schneiden Sie das kleine Stück (rot) oder das große Stück (blau) und geben Sie zwei verschiedene Möglichkeiten.<br />
<br />
<img src="./pictures/HVub0.png" height=367 width=500 /> <!-- height=1468 width=2001 --><br />
<br />
Das ist, was oft als das Guillotine-Problem bezeichnet wird , das ich als das "Glasschneider" -Problem lernte, da Glasscheiben wirklich vollständig durchgeschnitten werden müssen, und dieses spezielle Problem kann als "binärer Glasschneider" bezeichnet werden, da es immer in Hälften geschnitten wird.
Wenn ich das im wirklichen Leben mache, mache ich mental die Halbierungen, während ich das Gitter so betrachte. Ich kann mich erinnern, dass / 26 mit 0, .64, 128 oder .192 beginnen muss. Ich weiß vielleicht, dass die siebte Standleitung die siebte / 30 im oberen Quartal benötigt, aber ich kann mich nicht erinnern, dass das .216 ist.
Das Raster kann natürlich auch zur Darstellung des dritten Oktetts verwendet werden, und jedes Quadrat steht für a / 24. Jetzt heißt es, dass a / 18 mit .0, .64, .128 oder .192 beginnt.<br />
<img src="./pictures/JYqVb.png" height=413 width=785 /> <!-- height=551 width=1046 -->
<h4>Allgemeine Techniktipps</h4>
Das allgemeine Verfahren ist:
<ul>
<li>Runden Sie jede benötigte Größe in den kleinsten Block auf, der groß genug ist</li>
<li>Stellen Sie sicher, dass Sie die globalen Regeln einhalten (häufig "Maximieren der verfügbaren Adressierung", manchmal "Verdoppeln für Wachstum zulassen" oder "Routing vereinfachen").</li>
<li>Ordnen Sie die Subnetze Adressen zu, die MIT DEM GRÖSSTEN BEGINNEN und bis zum Kleinsten gehen ( dies ist der Teil, den sie normalerweise vergessen, Ihnen mitzuteilen ).</li>
<li>Befolgen Sie bestimmte Regeln (Testfragen enthalten häufig zusätzliche Regeln, manchmal so abweichend wie "Keine Netzwerkadresse darf eine 7 enthalten").</li>
<li>Überprüfen Sie, ob Platz für implizite Adressen (Broadcasts, Router) vorhanden ist.</li>
<li>Wenn ein Netzwerk klein ist (/ 30, / 31 oder / 32), achten Sie besonders darauf, da es einige Randfälle für Netzwerke mit 4, 2 und 1 Hosts gibt und die Details davon abhängen, welches genaue Problem Sie lösen</li>
</ul>
‐ Jonathanjo
Beispiel:
IP: 128.42.5.4
In binärer Form: 10000000 00101010 00000101 00000100
Subnetz: 255.255.248.0
Wie können Sie die Präfix-, Netzwerk-, Subnetz- und Hostnummern ermitteln?
<pre><code> 32768 16384 8192 4096 2048 1024 512 256 ----> Binary
128 192 224 240 248 252 254 255 ----> Sunet Mask
/17 /18 /19 /20 /21 /22 /23 /24 ----> CIDR
32766 16382 8190 3094 2046 1022 510 254 ----> Host
128 64 32 16 8 4 2 1 ----> Binary
128 192 224 240 248 252 254 255 ----> Sunet Mask
/25 /26 /27 /28 /29 /30 /31 /32 ----> CIDR
126 62 30 14 6 2 * - ----> Host
128 64 32 16 8 4 2 1
10000000 01000000 00100000 00010000 00001000 00000100 00000010 00000001</code></pre>
<b>Example</b>
<ul>
<li>Network=192.168.1.0 /24;</li>
<li>Network Address with Subnet mask = 192.168.1.0 subnet 255.255.255.0 </li>
<li>IP address range 192.168.1.0----192.168.1.255</li>
<li>Fist available ip address 192.168.1.1; </li>
<li>Last available ip address 192.168.1.254; </li>
<li>Broadcast address = 192.168.1.255;</li>
<li>254 Host</li>
<br />
<li>Network=192.168.1.0 /25;</li>
<li>Network Address with Subnet mask = 192.168.1.0 subnet 255.255.255.128</li>
<li>Ip address range 192.168.1.0----192.168.1.128</li>
<li>Fist available ip address 192.168.1.1; </li>
<li>Last available ip address 192.168.1.126;</li>
<li>Broadcast address = 192.168.1.127; </li>
<li>126 Hosts</li>
</ul>
When the CIDR increased ex. /24. /25. the network will divided by the
binary number.
/25 increase network 0-128| 128- 256 | you will have 2 Networks
/26 increase network 0-64 | 64 - 128 | 128-192 | 192-256 you will have 4 Networks
.
.
.
/32......
</li>
</ul>
</body>
<footer>
<h3>Links:</h3>
<ul>
<li><a href="https://networkengineering.stackexchange.com/questions/7106/how-do-you-calculate-the-prefix-network-subnet-and-host-numbers/7117"
target="_blank" rel="noreferrer noopener">
Stackexchange Network Engineering ‐ How to calculate the prefix, network, subnet and host numbers? [Original]</a>
</li>
<li><a href="https://qastack.com.de/networkengineering/7106/how-do-you-calculate-the-prefix-network-subnet-and-host-numbers"
target="_blank" rel="noreferrer noopener">
QAStack :: Network Engineering ‐ How to calculate the prefix, network, subnet and host numbers</a>
</li>
<li><a href="https://www.calculator.net/ip-subnet-calculator.html"
target="_blank" rel="noreferrer noopener">
IP Subnet Calculator</a>
</li>
</ul>
<br /><br /><br /><br />
</footer>
</html>
<html>
<ul>
<li><em>Packet Tracer Network Simulation Model</em><br />
von Cisco;
</li>
<br />
<li>A PKT file contains a simulation of a <br />
network setup for Cisco Packet Tra–<br />
cer, a network monitoring program;
</li>
<li>It stores information about a network<br />
configuration, which includes text in–<br />
structions and the components of the<br />
network;
</li>
<li>PKT files typically save simulation con–<br />
figurations related to networks, program–<br />
ming, IoT, and cybersecurity;
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://fileinfo.com/extension/pkt"
target="_blank" rel="noreferrer noopener">
File Info :: .PKT File Extension </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li><h3>“Picard“ (Laptop)</h3>
<ul>
<li>ip-Adresse: 192.168.2.31
</li>
<li>Netzmaske: 255.255.255.0
</li>
</ul>
</li>
<li><h3>GeekCommPC</h3>
<ul>
<li>ip-Adresse: 192.168.56.1
</li>
<li>Netzmaske: 255.255.255.0
</li>
</ul>
</li>
<li><h3>Windows XP-Notebook</h3>
ip-Adresse:
</li>
<li><h3>HP-Notebook</h3>
ip-Adresse: 192.168.2.44/24
</li>
<li><h3>OPPO-Find-X3-Lite-5G <em>(Smartphone)</em></h3>
ip-Adresse: 192.168.2.30
</li>
</ul>
</html>
<html>
<ul>
<li><h3>mittels Befehl “<em>nslookup</em>“:</h3>
<code><pre>
$ nslookup 192.168.2.31
31.2.168.192.in-addr.arpa name = Debian-Laptop.
</pre></code>
<code><pre>
$ nslookup 192.168.2.33
33.2.168.192.in-addr.arpa name = Galaxy-Tab-S4.
</pre></code>
</li>
<li><h3>mittels Befehl “<em>traceroute</em>“:</h3>
<code><pre>
$ traceroute 192.168.2.33
traceroute to 192.168.2.33 (192.168.2.33), 30 hops max, 60 byte packets
1 Galaxy-Tab-S4 (192.168.2.33) 188.103 ms 188.000 ms *
</pre></code>
<code><pre>
$ traceroute 192.168.2.44
traceroute to 192.168.2.44 (192.168.2.44), 30 hops max, 60 byte packets
1 . (192.168.2.44) 10.031 ms 9.660 ms 9.610 ms
</pre></code>
<em>Anmerkung:</em><br />
Das ist mein HP-Laptop, er hat bisher noch keinen eigenen<br />
Hostnamen erhalten.
</li>
<li>
<h3>Weitere Infos:</h3>
<ul>
<li><h4>NetBIOS</h4>
Windows (and Linux devices with Samba) use NetBIOS to 'publish' their addresses. This is what NBTSTAT uses to look up the IP address.
To find a hostname in your local network by IP address you can use:
<code><pre>
nmblookup -A <ip>
</pre></code>
Or you can install nbtscan by running:
<code><pre>
sudo apt-get install nbtscan
</pre></code>
And use:
<code><pre>
nbtscan <ip>
</pre></code>
<li><h4>Multicast DNS</h4>
If systems publish their address via Multicast DNS (OS X, Windows 10 and Linux devices with a running avahi-daemon do this), do a lookup using avahi-resolve (requires installing avahi-utils):
<code><pre>
avahi-resolve -a <ip>
</pre></code>
</li>
<li><h4>Reverse DNS</h4>
If the host has a public IP-address and a working reverse DNS entry, use the dig (requires installing dnsutils) or host (requires installing bind9-host) programs:
<code><pre>
dig -x <ip>
host <ip>
</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://askubuntu.com/questions/205063/command-to-get-the-hostname-of-remote-server-using-ip-address"
target="_blank" rel="noreferrer noopener">
Ask Ubuntu :: Command to get the hostname of remote server using IP address</a>
</li>
<li><a href="https://stackoverflow.com/questions/2409345/what-is-the-best-way-to-get-the-computer-name-remotely-based-on-an-ip-address"
target="_blank" rel="noreferrer noopener">
Stackoverflow :: What is the best way to get the computer name remotely based on an IP address?</a>
</li>
</ul>
</html>
<html>
<h1>IP-Adressen meines Routers (speedport.io)</h1>
<ul>
<li><pre><code><b>IPv4-Adressinformationen</b>
<b>-----------------------------------</b>
Öffentliche WAN-IP: 217.252.193.252
Gateway-Adresse: 62.155.242.203
Primärer DNS-Server: 217.237.149.142
Sekundärer DNS-Server: 217.237.150.205</code></pre>
</li>
<li><pre><code><b>IPv6-Adressinformationen</b>
<b>-----------------------------------</b>
Zugewies. Adressbereich / Präfix: 2003:e4:4f3a:ef00::/56
Nutzbarer Adressbereich für LAN: 2003:e4:4f3a:ef3e::/64
IPv6-Adresse (GUA): 2003:e4:4fff:3b5b:32b1:b5ff:fe3b:77bd
Gateway-Adresse: fe80::224e:71ff:fe68:1881
Primärer DNS-Server: 2003:180:2:4000::53
Sekundärer DNS-Server: 2003:180:2:3000::53</pre></code>
</li>
</ul>
<ul>
<li>30:b1:b5:3b:77:bf :: Firma Arcadyan <br />
https://de.wikipedia.org/wiki/Arcadyan <br />
lt. Wikipedia stellt A. u.a. Router für u.a. die Dt. Telekom her; <br />
</li>
<li>Vendor zur MAC-Adresse finden: <br />
https://maclookup.app/search
</li>
</ul>
</html>
<html>
<ul>
<li>OCSP :=: Online Certificate Status Protocol
</li>
<li>ist ein Netzwerk‐Protokoll;
</li>
<li>ist ein Internet‐Standard;
</li>
<li>es ermöglicht Clients, den Status von X.509‐Zertifikaten<br />
bei einem Validierungsdienst abzufragen.
</li>
<li>Benötigt wird dies z. B. bei:<br />
<ul>
<li>der Prüfung digitaler Signaturen</li>
<li>der Authentisierung in Kommunikationsprotokollen (z. B. bei TLS)</li>
<li>der Verschlüsselung von E‐Mails,</li>
</ul>
um jeweils zu überprüfen, ob die verwendeten Zertifikate<br />
evtl. gesperrt und damit bereits vor Ende ihres regulären<br />
Gültigkeitszeitraums ungültig wurden. <br />
</li>
<li>OCSP besitzt <b>kein</b> eigenes Transport-Protokoll, zum <br />
Transport wird in der Regel <em>http</em> oder <em>https</em> verwendet. <br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Online_Certificate_Status_Protocol"
target="_blank" rel="noreferrer noopener">
Wikipedia :: Online Certificate Status Protocol</a>
</li>
</ul>
</html>
<html>
Zum Ermitteln des Hostnamens eines Remote-Servers stehen<br />
folgende Befehle zur Verfügung:<br />
<ul>
<li><pre><code>traceroute <em>ip address</em></code></pre>
</li>
<li><pre><code>smbclient –L <em>ip address</em></code></pre>
</li>
<li><pre><code>nslookup <em>ip address</em></code></pre>
This depends on whether you have a working DNS<br />
server set up on your LAN that has the necessary<br />
information.<br />
</li>
<li><pre><code>host <em>ip address</em></code></pre>
</li>
<li><pre><code>arp –a</code></pre>
</li>
<li><pre><code>dig –x <em>ip address</em></code></pre>
Beispiel:
<code><pre>dig -x 192.168.2.31</code></pre>
Ausgabe:
<code><pre>; <<>> DiG 9.18.19-1~deb12u1-Debian <<>> -x 192.168.2.31
;; global options: +cmd
;; Got answer:
;; –<<HEADER>>– opcode: QUERY, status: NOERROR, id: 59137
;; flags: qr aa rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;31.2.168.192.in-addr.arpa. IN PTR
;; ANSWER SECTION:
31.2.168.192.in-addr.arpa. 3600 IN PTR Debian-Laptop.
;; Query time: 0 msec
;; SERVER: 192.168.2.1#53(192.168.2.1) (UDP)
;; WHEN: Sun Dec 10 16:43:16 CET 2023
;; MSG SIZE rcvd: 81</code></pre>
</li>
<li><pre><code>avahi–resolve –a <em>ip address</em></code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://superuser.com/questions/565746/how-to-remotely-find-out-a-linux-hostname-without-the-use-of-dns"
target="_blank" rel="noreferrer noopener">
StackExchange :: SuperUser – How to remotely find out a linux hostname without the use of DNS?</a>
</li>
<li><a href="https://askubuntu.com/questions/205063/command-to-get-the-hostname-of-remote-server-using-ip-address"
target="_blank" rel="noreferrer noopener">
Ask Ubuntu :: Command to get the hostname of remote server using IP address</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>ein Verfahren zur Steigerung der Verfügbarkeit wichtiger<br />
Gateways in lokalen Netzen durch redundante Router.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Virtual_Router_Redundancy_Protocol" target=_blank>Wikipedia</a></li>
</ul>
</html>
<html>
<code><pre>
#! /bin/sh
# generalinventur.sh
# Das Skript braucht Root-Rechte und
# die Netzadresse als Aufrufparameter.
#
if [ -z $1 ];
then
echo "NETZADRESSE/CIDR muss beim Aufruf angegeben werden"
exit
fi
echo "Übersicht aktiver Netzwerkteilnehmer"
echo "------------------------------------"
datum=$(date +%d.%m.%Y-%H:%M:%S)
echo $datum
# Beginn Ergebnisdatei
echo "Netzwerkbestand $datum" > lanliste.txt
echo "------------------------------------" >> lanliste.txt
echo "------------------------------------"
# Scannen des Netzes und Ablage in Ergebnisdatei
for k in $(fping -aq -g $1)
do
echo "wird untersucht: $k"
echo "Aktiv: $k" >> lanliste.txt
nmap $k | grep -B1 open >> lanliste.txt
echo "------------------------------------" >> lanliste.txt
done
echo "------------------------------------"
echo " E N D E" >> lanliste.txt
datum=$(date +%d.%m.%Y-%H:%M:%S)
echo $datum >> lanliste.txt
echo "------------------------------------" >> lanliste.txt
# Anzeige der Ergebnisdatei
less lanliste.txt
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://www.linux-community.de/ausgaben/linuxuser/2023/10/netzwerkueberwachung-auf-der-konsole/"
target="_blank" rel="noreferrer noopener">
Linux User 10.2023 :: Burgwächter – Netzwerküberwachung auf der Konsole, S. 21ff</a>
</li>
<li><a href="https://download.linux-user.de/48534"
target="_blank" rel="noreferrer noopener">
Dateien zum Artikel</a>
</li>
</ul>
</html>
<html>
<ul>
The mobile apps generate secure 2 step verification codes to protect your online accounts from hackers. You get an additional layer of security. In addition to your password, you need to input 2FA codes for each login. This page explains how to use oathtool OTPs (one-time password) on Linux to secure your Gmail and other online accounts. Instead of waiting for text messages, get verification codes for free from the oathtool Linux command.
<h2>How to install oathtool Linux command line tool</h2>
oathtool is a command line tool for generating and validating OTPs and gpg2 is an OpenPGP encryption and signing tool for encrypting private keys used by oathtool. Type the commands as per your Linux distro to install the same.
<h3>Fedora Linux install oathtool</h3>
Open the terminal application and type the following dnf command:
<code><pre>$ sudo dnf install oathtool gnupg2</pre></code>
<h3>CentOS Linux/RHEL install oathtool</h3>
First enable EPEL repo on RHEL or CentOS 7 and run the following yum command:
<code><pre>$ sudo yum install oathtool gnupg2</pre></code>
<h3>Debian/Ubuntu Linux install oathtool</h3>
Simply use the apt command or apt-get command to install the same:
<code><pre>$ sudo apt update
$ sudo apt upgrade
$ sudo apt install oathtool gnupg2</pre></code>
<h3>SUSE/OpenSUSE Linux install oathtool</h3>
Simply run the following [nixcmd name=“zypper“
<code><pre>$ sudo zypper ref
$ sudo zypper in oath-toolkit gpg2</pre></code>
<h3>Linux 2 step verification (2FA) using oathtool</h3>
The syntax to generate totp is as follows:
<code><pre>oathtool -b --totp 'private_key'</pre></code>
Typically private_key only displayed once when you enable 2FA with online services such as Google/Gmail, Twitter, Facebook, Amazon, PayPal, Bank accounts and so on. You must keep private_key secrete and never share with anyone. Here is a sample session that creates code for my Twitter account.
<code><pre>$ oathtool -b --totp 'N3V3R G0nn4 G1v3 Y0u Up'</pre></code>
Sample outputs:
944092
<h3>How to generate Two-Factor authentication code from your Linux CLI</h3>
Generate a new key pair for encryption if you don't have a gpg key, run:
<code><pre>$ gpg2 --full-gen-key</pre></code>
Generate two-factor authentication code from your Linux CLI
Next, create some directories and helper scripts:
<code><pre>$ mkdir ~/.2fa/
$ cd ~/.2fa/</pre></code>
You can list GPG keys including GnuPG user id and key id, run:
<code><pre>$ gpg --list-secret-keys --keyid-format LONG</pre></code>
<h3>Shell script helper script to encrypt the totp secret (keys)</h3>
Create a shell script named <details>
<summary><b>encrypt.key.sh</b> :</summary>
<code><pre>
#!/bin/bash
# Purpose: Encrypt the totp secret stored in $dir/$service/.key file
# Author: Vivek Gite {https://www.cyberciti.biz/} under GPL v 2.x or above
# --------------------------------------------------------------------------
# Path to gpg2 binary
_gpg2="/usr/bin/gpg2"
## run: gpg --list-secret-keys --keyid-format LONG to get uid and kid ##
# GnuPG user id
uid="YOUR-EMAIL-ID"
# GnuPG key id
kid="YOUR-KEY"
# Directory that stores encrypted key for each service
dir="$HOME/.2fa"
# Now build CLI args
s="$1"
k="${dir}/${s}/.key"
kg="${k}.gpg"
# failsafe stuff
[ "$1" == "" ] && { echo "Usage: $0 service"; exit 1; }
[ ! -f "$k" ] && { echo "$0 - Error: $k file not found."; exit 2; }
[ -f "$kg" ] && { echo "$0 - Error: Encrypted file \"$kg\" exists."; exit 3; }
# Encrypt your service .key file
$_gpg2 -u "${kid}" -r "${uid}" --encrypt "$k" && rm -i "$k"
</pre></code>
</details>
<h3>Shell script helper script to decrypt the totp secret and generate 2FA code</h3>
Create a shell script named <details> <summary><b>decrypt.key.sh</b> :</summary>
<code><pre>
#!/bin/bash
# Purpose: Display 2FA code on screen
# Author: Vivek Gite {https://www.cyberciti.biz/} under GPL v 2.x or above
# --------------------------------------------------------------------------
# Path to gpg2 binary
_gpg2="/usr/bin/gpg2"
_oathtool="/usr/bin/oathtool"
## run: gpg --list-secret-keys --keyid-format LONG to get uid and kid ##
# GnuPG user id
uid="YOUR-EMAIL-ID"
# GnuPG key id
kid="YOUR-KEY"
# Directory
dir="$HOME/.2fa"
# Build CLI arg
s="$1"
k="${dir}/${s}/.key"
kg="${k}.gpg"
# failsafe stuff
[ "$1" == "" ] && { echo "Usage: $0 service"; exit 1; }
[ ! -f "$kg" ] && { echo "Error: Encrypted file \"$kg\" not found."; exit 2; }
# Get totp secret for given service
totp=$($_gpg2 --quiet -u "${kid}" -r "${uid}" --decrypt "$kg")
# Generate 2FA totp code and display on screen
echo "Your code for $s is ..."
code=$($_oathtool -b --totp "$totp")
## Copy to clipboard too ##
## if xclip command found on Linux system ##
type -a xclip &>/dev/null
[ $? -eq 0 ] && { echo $code | xclip -sel clip; echo "*** Code copied to clipboard too ***"; }
echo "$code"
# Make sure we don't have .key file in plain text format ever #
[ -f "$k" ] && echo "Warning - Plain text key file \"$k\" found."
</pre></code>
</details>
<h3>2FA using oathtool in the Linux command line for Gmail account</h3>
Let us see a complete example for Google/Gmail account. To enable 2FA visit and login:<br />
<a href="https://www.google.com/landing/2step/" target=_blank>https://www.google.com/landing/2step/</a><br />
<br />
Visit 2-Step Verification > Get Started:<br />
<img src="./pictures/Gmail-2-Step-Verification.png" heigt=599 width=594 title="Gmail 2-Step Verification" /><br />
<br />
You may have to verify your mobile phone number. Once verified, scroll down and choose Authenticator app:<br />
<img src="./pictures/Set-up-Authenticator-app.png" heigt=694 width=599 title="Set up Authenticator app" /><br />
<br />
What kind of phone do you have? Choose iPhone or Android as we are going to use our CLI app and click Next:<br />
<img src="./pictures/Get-codes-from-the-Linux-authenticator-cli-app.png" heigt=599 width=627 title="Get codes from the Linux authenticator cli app" /><br />
<br />
Make sure you click on “CAN'T SCAN IT“ to see totp secret key and copy it:<br />
<img src="./pictures/Cant-scan-the-barcode-for-Linux-2FA-app.png" heigt=584 width=599 title="Can't scan the barcode for Linux 2FA app" /><br />
<br />
Cd into ~/.2fa/ directory and run the following commands:
<code><pre>cd ~/.2fa/
### Step 1. create service directory ###
### vivek@gmail.com also act as service name for encrypt.key.sh ###
mkdir vivek@gmail.com
### Step 2. Store totp secret key ###
echo -n 'hilp zs6i c5qu bx7z akiz q75e wk5z z66b' > ~/.2fa/vivek@gmail.com/.key
</pre></code>
Encrypt the totp secret key file named ~/.2fa/vivek@gmail.com/.key with gpg and password protect it for security and privacy reasons using our encrypt.key.sh helper script:
<code><pre>
### Step 3. Secure totp secret key for service named vivek@gmail.com ###
./encrypt.key.sh vivek@gmail.com
</pre></code>
<br />
<img src="./pictures/Linux-2-step-verification-2FA-totp-key-file.png" heigt=61 width=599 title="Linux 2 step verification 2FA totp key file" /><br />
<br />
Finally click on the Next button:<br />
<img src="./pictures/Set-up-Linux-oathtool-as-authenticator-app.png" heigt=436 width=476 title="Set up Linux oathtool as authenticator app" /><br />
<br />
It is time to create your first 6-digit code using oathtool command. However, we automated this process using decrypt.key.sh shell script that decrypts the totp secret and generates the 6-digit 2FA code. Simply run:<br />
<code><pre>./decrypt.key.sh vivek@gmail.com</pre></code><br />
<br />
You need to type the gpg passphrase to unlock the secrete key for service named vivek@gmail.com:<br />
<img src="./pictures/oathtool-Linux-command-line-with-shell-script-helper.png" heigt=363 width=522 title="oathtool Linux command line with shell script helper" /><br />
<br />
Finally you will see the 6-digit code as follows on screen:<br />
<img src="./pictures/Generate-Two-Factor-Authentication-Codes-on-Linux.png" heigt=184 width=599 title="Generate Two-Factor Authentication Codes on Linux" /><br />
<br />
Withing 30 seconds you need to type the 330197 code and click on the verify button:<br />
<img src="./pictures/Enter-6-digit-code-for-Gmail-from-Linux-command-line.png" heigt=184 width=599 title="Enter 6-digit code for Gmail from Linux command line" /><br />
<br />
And you are done:<br />
<img src="./pictures/totp-linux-set-up.png" heigt=431 width=476 title="totp linux set up" /><br />
<h3>How to add another service</h3>
The syntax is pretty simple:<br />
<code>
<ol>
<li>Log in to online service such as Twitter, Facebook, Bank account and look for Authenticator 2FA app. For example, let us set up Twitter account 2FA using Linux command line app.
<li>Copy the totp secret from Twitter account.
<li>Create a new service directory: mkdir ~/.2fa/twitter.com/
<li>Make a new .key file: echo -n 'your-twitter-totp-secret-key' > ~/.2fa/twitter.com/.key
<li>Generate a new PGP encrypted file for security and privacy reasons: ~/.2fa/encrypt.key.sh twitter.com
<li>Decrypts the totp secret and generates the 6-digit 2FA code when you need to log in into Twitter: ~/.2fa/decrypt.key.sh twitter.com
</ol>
</code></br />
You can repeat the above process for any services that display the totp secret along with QR code.
<h3>Conclusion</h3>
The main advantage of Linux command line is that you can easily backup your ~/.2fa/ directory and keys. Your totp secrets/keys are always encrypted and password protected by gpg2. Mobile apps such as Google Authenticator usually do not allow you to sync or copy secrets/keys for security reasons. So if you lost phone or switch phone, you wouldn&apost be able to login into the account. This set up is simple and easy to backup/restore as long as you remember your gpg2 passphrase. I strongly recommend that you enable full disk encryption (FDE) too. Next time I will show you how to use GUI apps for the same purpose. See oathtool man page for more information here.
</ul>
<h2>Link:</h2>
<a href="https://www.cyberciti.biz/faq/use-oathtool-linux-command-line-for-2-step-verification-2fa/" target=_blank>NixCraft :: oathtool CmdLine</a>
</html>
The normal mistake in a fit of quick
panic often by users is to be looking
at the /etc/passwd file and see that
there is "READ" access to the world
or "644" on the file.
Time and time again when they first
discover having root access they
change the permissions to:
chmod 000 /etc/passwd
D O N O T D O T H I S ! ! !
chmod 644 /etc/passwd
Is just fine!
<html>
<ul>
<li><h3>Starten: </h3>
<code><pre>cd ~/programming/node.js/bin<br />./node</pre></code></l>
<li><h3>Beenden: </h3>
Die Konsole kann beendet werden mittels: <ol><li> <code>Strg + C</code></li>oder<li>Eingabe von <code>.exit</code></li></ol>
</li>
<br />
<li>Die Node.js-Konsole realisiert eine sogenannte <b>Read‐Eval‐Print-Loop (REPL)</b>.<br />
Das bedeutet, solange die Node.js-Konsole läuft, führt sie immer wieder folgende<br />
drei Befehle resp. Aktionen aus:<br /><br />
<ul>
<li><b>Read:</b> Einlesen, Parsen und Übersetzen der Benutzereingabe.</li>
<li><b>Eval:</b> Ausführen (“evaluate“) des übersetzten Codes.</li>
<li><b>Print:</b> Ausgeben des Ergebnises auf der Konsole.</li>
</ul><br />
Falls ein Befehl kein Ergebnis liefert, wird </i>undefined</i> als Ergebnis zurückgegeben.<br />
Das ist z.B. bei der Definition und Initialisierung der Variablen “benutzer“ der Fall.</li>
<li><h3>Befehl “console.log()“</h3>
Mit Hilfe des Befehls <b>console.log()</b> ist es möglich, Informationen schon während<br />
der Eval-Phase auf der Konsole auszugeben.<br />
<br />
Die erste Ausgabe erfolgt während der <u>Eval-Phase</u>, <br />
die zweite Ausgabe erfolgt während der <u>Print-Phase</u> und zeigt das Ergebnis <br />
des Aufrufs der Funktion console.log an.</li>
</ul>
<h3>Links:</h3>
<a href="https://glossar.hs-augsburg.de/Node.js-Tutorium:_Hello_World:_Konsole" target=_blank>HS Augsburg :: Node.js-Tutorium</a>
</html>
<html>
<ul>
<li>Für die Realisierung von Node.js-Projekten benötigt man<br />
auf jeden Fall eine Konsole, am Besten eine Unix-Konsole <br />
wie die Bash. <br />
<ul>
<li>Unter Linux und Mac gibt es eine derartige Konsole bereits</li>
<li>Unter Window kann man die “Git BASH“ verwenden: <a href="http://msysgit.github.io/" target=_blank>MsysGit</a></li>
</ul>
</li><br />
<li>Download of file “node-v8.11.4-linux-x64.tar.xz“ from <br />
the homepage <a href="https://nodejs.org/en/download/" target=_blank>node.js - Homepage</a></li>
<br />
<li>Aufruf von:<code><pre>sudo tar -C /home/mueller/programming/node.js/ --strip-components 1 -xJf node-v8.11.4-linux-x64.tar.xz</pre></code><br />
wobei “-J“ die tar-Option für xz-komprimierte Files ist;</li>
</ul>
</html>
<html>
<ul>
<li><h3>Zoomen / Textgröße ändern</h3>
→ View → Zoom:<br />
<ol>
<li>→ Zoom in: <br />
<ul>
<li><code>Ctrl + Wheel up</code></li>
<li><code>Ctrl + "Num +"</code></li>
</ul></li>
<li>→ Zoom out:
<ul>
<li><code>Ctrl + Wheel down</code></li>
<li><code>Ctrl + "Num -"</code></li>
</ul></li>
<li>→ Restore Default:
<ul>
<li><code>Ctrl + "Num /"</code></li>
</ul></li>
</ol>
</li>
<li><h3>“Pretty print“ für XMLs</h3>
→ Plugins → XML Tools:<br />
→ Pretty Print (XML only - with line breaks): <code>Ctrl + Alt + Shift + B</code>
</li>
<li></li><br />
</ul>
</html>
<html>
<ul>
<li>im Menü “Einstellungen“ anklicken</li>
<li>den Menüpunkt “Einstellungen“ auswählen</li>
<li>“Autovervollständigung“ auswählen</li>
<li>im Listenbereich “Autovervollständigung“ anklicken</li>
<li>→ Tick bei “Autovervollständigung aktivieren“ entfernen
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://praxistipps.chip.de/notepad-autocomplete-aktivieren-und-deaktivieren-so-gehts_96177"
target="_blank" rel="noreferrer noopener">
CHIP Praxistipps :: Notepad++: Autocomplete aktivieren und deaktivieren - so geht's</a>
</li>
</ul>
</html>
<html>
<ul>
<li><b>Zeileneinzug verkleinern (<em>Decrease Line Indent</em>):</b>
<pre><code>Shift + Tab</code></pre>
</li>
<li><b>Zeileneinzug vergrößern (<em>Increase Line Indent</em>):</b>
<pre><code>Tab</code></pre>
</li>
<li><b>Block (ent–)kommentieren <em>(To do a Block Comment or Uncomment (Toggle) </em>) :</b>
<pre><code>Ctrl + Q</code></pre>
</li>
<!--
<li><b></b>
<pre><code></code></pre>
</li>
<li><b></b>
<pre><code></code></pre>
</li>
-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://code2care.org/pages/97-notpad-plus-plus-keyboard-shortcuts-key-list/"
target="_blank" rel="noreferrer noopener">
Code2care :: 97 Useful Notepad++ Keyboard Shortcuts </a>
</li>
<li><a href="file:///media/mueller/INT-256GB/TiddlyWiki/Notepad++_Cheat_Sheet.pdf"
target="_blank" rel="noreferrer noopener">
Notepad++ Cheat Sheet (PDF)</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
Unter Novation (lateinisch novatio, (Er-)Neuerung, Neuerungsvertrag) versteht man<br />
im deutschen Schuldrecht die Aufhebung eines bestehenden Schuldverhältnisses<br />
durch Schaffung eines neuen Schuldverhältnisses. Ihre praktische Bedeutung ist<br />
heute gering.
<h3>Links:</h3
<a href="https://de.wikipedia.org/wiki/Novation" target=_blank>Wikipedia</a>
</html>
<html>
<h3>Build Automation with Nuke</h3>
<ul>
<li><b>Nuke</b> ist ein Build-Automatisierungssystem mit einer C# DSL;<br />
(“Cross-platform build automation system“)</li>
<br />
<li>Mit <b>Nuke</b> können Prozesse wie beispielsweise <br />
<ul><li>das Kompilieren einer Solution,</li>
<li>das Verpacken von Artefakten</li>
oder
<li>das Kopieren von Dateien</li>
automatisiert werden.
</ul></li>
<br />
<li>Im Gegensatz zu existierenden Tools, integriert sich <b>Nuke</b> als <br />
normales C# Projekt, und ermöglicht dadurch den Einsatz aller <br />
bekannten IDE Unterstützungen wie Autovervollständigung, <br />
Navigation, Debugging und Refaktorierungen. </li>
<br />
<li>Hatte man bislang nur wenige oder gar nur eine Person im Team, <br />
die den Build verwalten konnte, so öffnet <b>Nuke</b> die Tore wieder<br />
für alle Entwickler im Team. </li>
<br />
<li>Großer Wert wurde ebenfalls auf die Erweiterung gelegt, sodass<br />
<b>Nuke</b> einen neuen, generativen Ansatz zur Unterstützung von <br />
Command-Line Tools verfolgt. </li>
</ul>
<h4>Links:</h4>
<ul>
<li><a href="https://nuke.build/" target=_blank>nuke.build :: Homepage</a></li>
<li><a href="https://github.com/nuke-build" target=_blank>nuke.build :: GitHub</a></li>
</ul>
</html>
<html>
Here is the fastest way to truncate a file to zero<br />
bytes in a bourne or korn shell.<br />
<code><pre>
$ > /var/log/messages
</pre></code>
This is a good method, if the file has to be truncated,<br />
but is opened by another process. For example, if you<br />
want to truncate /var/log/messages, which is held<br />
open by syslogd …<br />
<br />
This tip generously supported <br />
by: ulli@ucrc.org<br />
</html>
As admins We never forget the root password,
RIGHT?
Although sometimes we do inherit machines in
which we don't know the root password.
Here is a way to null the root password from
the password file.
It comes a time in every admins life that we
will have to go into mini-root and change the
password file without the use of vi.
The following example shows how to achieve this
on the /etc/shadow file, but the same basic
commands can be achieved on the /etc/passwd file
for those platforms that don't support shadow
passwords.
Use "ed" - and the 13 dots method
---------------------------------
# cp /etc/shadow /etc/shadow.bak
# ed /etc/shadow
1p
s/:.............:/::/
1p
w
q
<html>
Ever want line numbers appended to a file. Here<br />
is a short script.<br />
<br /><code>
awk '{no=no+1; printf"%d : %s", no, $0}' filename > filename.out<br />
</code><br />
Another shorter but not necessary elegant method is:<br />
<br /><code>
grep -n . filename > filename.out<br />
</code><br />
filename is the original file filename.out is the file with<br />
line numbers appended at the beginning of each line.<br />
<br />
This tip generously supported <br />
by: pradeep@unixguru.zzn.com<br />
</html>
<html>
<meta "Alice" "alice" />
<h3>Diese Eingaben funktionieren:</h3>
<ul>
<li>20 Juli, 2021</li>
<li>15 Jan., 2021</li>
<li>20 Dez., 2021</li>
<li>15 Nov., 2021</li>
<li>15 Okt., 2021</li>
<li>15 März, 2021</li>
<li>15 Apr., 2021</li>
<li>15 Mai, 2021</li>
<li>15 Juni, 2021</li>
<li>15 Aug., 2021</li>
</ul>
<h3>Diese Eingaben funktionierten nicht:</h3>
<ul>
<li>15 Sep., 2021</li>
<li>01 Feb., 2021</li>
</ul>
</html>
<html>
<ul>
<li>Programmierparadigmen:
<ul>
<li>funktional
</li>
<li>imperativ
</li>
<li>objektorientiert
</li>
</ul>
</li>
<li>auf der ML (Meta Language)-Sprachfamilie basierende <br />
Programmiersprache.
</li>
<li>Zu den mächtigsten Merkmalen dieser Sprache gehören:
<ul>
<li>statische Typisierung (in Verbindung mit Typinferenz),
</li>
<li>parametrische Polymorphie,
</li>
<li>Pattern Matching,
</li>
<li>ein Mechanismus zur Ausnahmebehandlung
</li>
<li>automatische Speicherbereinigung.
</li>
</ul>
</li>
<!--
<li>
</li>
<li>
</li>
<li>
</li>
<li>
</li>
<li>
</li>
-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/OCaml"
target="_blank" rel="noreferrer noopener">
Wikipedia :: OCaml</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
</ul>
</html>
<html>
<b>OFAC</b> := Office of Foreign Assets Control<br />
• US-Staatsministerium<br />
Sanktionsliste (s.a. Dt. Forfait)<br />
</html>
<html>
OLK, Open Link Kernel <br>
Vorläufer von MxML Exchange <br>
<br>
Murex Session <br>
--> Menuepunkt Kopfzeile "Links" <br>
--> OLK <br>
--> Monitor <br>
</html>
<html>
<ul>
<li>Testtool, automatisiert</li>
<li>Report-Vergleichstool</li>
<br />
<li><u>Windows-Version:</u><br />
Problem mit Virenscanner
</li>
<li><u>Test / Vergleich vorbereiten:</u><br />
in Envs Reports "extrahieren"<br />
selektieren<br />
in tarfile zusammenfassen<br />
tarfile auf Windows-Server kopieren<br />
</li>
<li></li>
<li></li>
</ul>
</html>
<html>
<meta "Verzeichnis Voice-Recorder" />
<ul>
<li><h3>Model:</h3>
<ul>
<li>OPPO FIND X3 LITE 5G, Schwarz<br />
</li>
<br />
<li>CPH2145<br />
</li>
<br />
<li>IMEI 1-Nr: 864129056084835<br />
</li>
<li>IMEI 2-Nr: 864129056084827<br />
<em>(International Mobile Station Equipment Identity)</em><br />
</li>
<br />
<li>IMEI SV-Nr: 77
</li>
<br />
<li>Bluetooth-Adresse: fc:04:1c:da:aa:72
</li>
</ul>
</li>
<li><h3>Installierte Apps:</h3>
<table border="3">
<tr>
<td>Sportschau</td><td>HVB Online Banking App</td><td>Keepass</td>
</tr>
<tr>
<td>NDR Info</td><td>Radio Bob!</td><td>Radioplayer</td>
</tr>
<tr>
<td>Einkaufszettel-App</td><td>Adesso OWAD</td><td>English OWAD</td>
</tr>
<tr>
<td>Business English OWAD</td><td>Ecoute OWAD</td><td>GVH</td>
</tr>
<tr>
<td>Voice Recorder</td><td>AOK app</td><td>PostIIdent app</td>
</tr>
<tr>
<td>DB Bahnhof Live</td><td>n‐tv</td><td></td>
</tr>
<!--
<tr>
<td></td><td></td><td></td>
</tr>
<tr>
<td></td><td></td><td></td>
-->
</tr>
</table>
</li>
<li><h3>Verzeichnis, in dem die Files vom Voice‐Recorder abgelegt werden:</h3>
<code><pre>
/media/OPPO/Interner\ gemeinsamer\ Speicher/Android/data/me.jlabs.voicerecorder/files/Music/voice_recorder/
</pre></code>
</li>
</ul>
</html>
<html>
<ul>
<li><b>help</b>, Syntax: help <Fkt-Name></li>
<li><b>lookfor</b>, Syntax: lookfor <Fkt-Name></li>
<li><b>helpwin</b></li>
<li><b>helpdesk</b></li>
</ul>
Link:<br />
http://www-docs.tu-cottbus.de/fsr-mathe/public/manual/matlab.pdf<br />
<br />
</html>
<html>
<h3>quiver</h3>
Funktion;<br />
Zeichnet ein 2D-Vektor‐Feld mit Pfeilen ⇒ Richtungsfeld & Isokline<br />
<br />
</html>
<html>
<pre><code>
>> chdir '/home/mueller/works'
>> binbaum1()
parse error near line 23 of file /home/mueller/works/binbaum1.m
invalid left hand side of assignment
> for j:N+1
^
</code></pre>
--> hier ist die for-Loop falsch definiert;<br />
es muss heissen: "for j=1:N+1"
<pre><code>
>> chdir '/home/mueller/works'
>> binbaum1()
error: unterminated character string constant
parse error near line 36 of file /home/mueller/works/binbaum1.m
syntax error
> fprintf('V(%f,0) = %f\n, S0, V(1,1))
</code></pre>
---> hier fehlt das Apostrophe für die Ausgabe des Strings;<br />
der Apostrophe ist hier hinter "%f\n" zu setzen.
<pre><code>
>> chdir '/home/mueller/works'
>> binbaum1()
error: invalid use of script /home/mueller/works/binbaum1.m in index expression
</code></pre>
---> in erster Linie habe ich den Code, das m-File mittels F6, "Debug"-->"Run Script" auf-<br />
gerufen. Als ich den Code über das "Files"-Window (RMT --> Run Script) aufrief, brach <br />
das Programm mit mehreren Fehlern ab, wie z.B. dass die Fkt. expt (statt exp) nicht existiert,<br />
oder die Variable "SO" (statt "S0") unbekannt sei. <br />
Nach der Korrektur lief das Programm durch.
</html>
<html>
<h3>Aufruf auf Laptop:</h3>
<p>
‐ mit der GUI:
<code><pre>
octave ‐‐force-gui
</pre></code>
Startup-File: ~/.octaverc<br />
→ <i>http://wiki.octave.org/.octaverc</i><br />
bzw. https://www.gnu.org/software/octave/doc/interpreter/Manipulating-the-Load-Path.html
</p>
<h3>Befehlsfortsetzungszeichen (<em>ellipsis</em>)</h3>
Mit
<code><pre> … </pre></code>
ist es möglich, einen Ausdruck in der nächsten Zeile fortzusetzen:
<code><pre>
>> 3 + 55 ‐ 62 + 4 ‐ 5 …
+ 22 ‐ 1
ans =
16
</pre></code>
<h3>Variablenzuweisungen</h3>
<ul>
<li>ohne Semikolon:
<code><pre>x=2</pre></code>
Der Variablen x wird der Wert “2“ zugewiesen und <br />
das Statement wird nochmal ausgegeben;</li>
<br />
<li>mit Semikolon:
<code><pre>x=2;</pre></code>
Durch das Semikolon wird Octave angewiesen, <br />
der Variablen x den Wert “2“ zuzuweisen, aber<br />
das Statement wird <b>nicht</b> ein weiteres Mal aus‐<br />
gegeben;</li>
</ul>
<h3>Auflisten der aktuell verwendeten Variablen</h3>
<ul>
<li>in Kurzform:
<code><pre>who</pre></code></li>
<li>in Langform:
<code><pre>whos</pre></code></li>
</ul>
<br />
Neben dem Variablennamen werden auch, falls zugewiesen,<br />
auch deren aktuelle Belegung gezeigt.<br />
<h3>Löschen …</h3>
<table border="1">
<tr><td>… einer Variablen: </td><td>clear <i>varName</i></td></tr>
<tr><td>… sämtlicher Variablen:</td><td>clear</td></tr>
<tr><td>… des Figures-Fensters: </td><td>clf, "Clear figure"</td></tr>
<tr><td>… der Ausgabe des Command Line‐Bereichs: </td><td>clc, “Clear Command Line“</td></tr>
<br />
<tr><td>… clear the next word1 </td><td>Meta-D </td></tr>
<tr><td>… bis zum Zeilenende: </td><td>Ctrl-K</td></tr>
<tr><td>… der gesamten Zeile: </td><td>Ctrl-U </td></tr>
<tr><td>… der gesamten Zeile und des Fensters: </td><td> Ctrl-L </td></tr>
</table>
<h3>Packages beim Starten automatisch aktivieren</h3>
<p>
Dies erfolgt über einen Eintrag im File <b>~/.octaverc</b>.<br />
Dabei ist der komplette Pfad in der Variablen "addpath" anzugeben:<br />
<code>
## Begin savepath auto-created section, do not edit<br />
addpath ('/home/mueller/octave/odepkg-0.8.5/x86_64-pc-linux-gnu-api-v49+:/home/mueller/octave/io-2.4.3/x86_64-pc-linux-gnu-api-v49+:/home/mueller/works', '-begin');<br />
## End savepath auto-created section
</code>
</p>
<h3>Einen Kommentar angeben</h3>
<p>
<b><code><pre>#</pre></code></b>
d.h. der Kommentar beginnt mit dem Hashmark. Always use # to write comments.<br />
<br />
Absolutely do not use %# or mix % and # in the same file.
<h4>Block and Inline comment</h4>
Use a single # for inline comments. Use double ## for block comments.
Comments that start with a single sharp-sign, #, are used to explain the code on the same line as the comment itself. These comments should all be aligned to the same column to the right of the source code. In the Emacs mode for Octave, the M-; (@code{indent-for-comment}) command automatically inserts such a # in the right place, or aligns such a comment if it is already present. Example:
<code><pre>
C = 2 * pi * r; # formula for circumference of a circle
</pre></code>
Comments that start with a double sharp-sign, ##, are stand-alone comments that occupy an entire line. These comments should be aligned to the same level of indentation as the code. Such comments usually describe the purpose of the following lines or the state of the program at that point. Example:
<code><pre>
## Calculate area and volume of a sphere
A = 4 * pi * r^2;
V = 4/3 * pi * r^3;
</pre></code>
<h4>Commenting out code</h4>
Do not comment code out. If the code is no longer used, remove it. We use version control, we can always bring it back.
<h4>%! for test and demo blocks</h4>
Any demos or Built-In Self Tests (BIST) using the %!demo or %!test syntax should begin two lines after the endfunction keyword. Demo blocks should be listed before test blocks.
See the section Writing tests on the Tests page.
</p>
<h3>Text ausgeben</h3>
<p>
<ul>
<li><code><pre>disp (“<em><TEXT></em>“)</pre></code>
</li>
<br />
<li><code><pre>printf ( … )</pre></code>
erlaubt im Vergleich zu disp eine strukturiertere, <br />
insbesondere aus mehreren Teilen zusammen‐ <br />
gesetzte Ausgabe.
</li>
</ul>
</p>
<h3>Einrückung <em>(Indentation)</em></h3>
Use only spaces, and indent 2 spaces at a time.<br />
<br />
We use spaces for indentation. Absolutely do <b>not</b> use tabs in your code.<br />
You should probably set your editor to emit spaces when you hit the tab key.
<h3>Bestimmung der Nullstellen eines Polynoms:</h3>
<p>
Funktion <i>roots(...)</i><br />
Bsp:
<code><pre>roots([1,-2,-3])</pre></code>
steht für die Funktion
<code><pre><math>
f(x= x^2 - 2x -3)
</math></pre></code>
</p>
<h3>Schnittpunkt zweier Funktionen</h3>
<p>
a) Funktion <i>fzero(...)</i><br />
Bsp:
<code><pre>x = fzero(f1(x)-f2(x),x0,'TolX',1e-9) </pre></code>
findet den x-Wert eines Schnittpunktes zweier Funktionen. Wenn die Funktionen mehrere Schnittpunkte haben, wird
(wahrscheinlich) der Punkt gefunden, der am nächsten zu x0 ist. 1e-9 in dem Beispiel sagt, wie genau der
Schnittpunkt (in x-Richtung) gefunden werden soll.<br />
<br />
b) Funktion <i>intersection</i><br />
</p>
<h3>Grafische Darstellung von Polynomen</h3>
<p>
Funktion <i>polyval(x,y)</i>
</p>
</p>
<h3>Eine Legende erstellen:</h3>
<p>
legend
</p>
<h3>Definition der Stoppuhr fü eine Zeitmessung</h3>
<p>
<i>tic</i>; <cmds>; <i>toc</i><br />
</p>
<h3>Daten einlesen & speichern</h3>
<p>
<ul>
<li><u>Einlesen:</u> </br>
Octave‐Befehle können in einem File gespeichert werden und<br />
mit Hilfe des Befehls
<code><pre>source <em>SOURCE‐FILE</em></pre></code>
eingelesen werden.<br />
<br />
Ein Skript‐File braucht nicht notwendigerweise die Endung <b>.m</b> haben.
</li>
<br />
<li><u>Speichern:</u> </br>
<code><pre>save file.dat x y</pre></code>
→ Die Vektoren x und y werden in der Datei <b>file.dat</b> abgespeichert.<br />
Die Variableninhalte werden im binären Format abgespeichert.
<code><pre># Created by Octave 4.4.1, Sat Aug 07 14:12:08 2021 CEST <mueller@Debian-Laptop>
# name: x
# type: scalar
2
</pre></code>
Um die Daten in lesbarer Form (Text) abzuspeichern, ist die Option <i>-ascii</i> zu<br />
verwenden:<br />
<i>save</i> file.dat x y -ascii</li>
</ul>
</p>
<h3>Programm aufrufen</h3>
Neben dem <code><b>source</b></code> ‐ Befehl, der das Programm “nur“<br />
in den Interpreter lädt, kann das Programm auch einfach mittels<br />
Eingabe des Filenamens aufgerufen und ausgeführt werden.
<h3>Bemerkung bzgl. Skriptdateien und Kompatibilität zwischen Octave und MATLAB</h3>
<p>
In <b>Octave</b> kann man -- sinnvollerweise -- <u>beliebig viele</u> Funktionen in einer Skriptdatei definieren. <br />
<b>Matlab</b> hingegen lässt strikt <u>nur eine</u> Funktion pro .m Datei zu, und der Funktionsname muss <br />
mit dem Dateinamen übereinstimmen. Falls Kompatibilität mit Matlab wichtig ist, sollte diese Einschränkung<br />
auch auf Octave-Programme angewandt werden.
</p>
<h3>DomainMath-IDE: </h3>
<p>
<b>• Console-Window leeren:</b>Strg + W<br />
</p>
<h3> Unterschied zu MATLAB: </h3>
<p>
Für Aufgaben der numerischen Mathematik kann man an Stelle des kostspieligen Matlab auch das quelloffene Octave nutzen. Zwar muss man für das eine Paket verfasste Programme an die jeweils andere Umgebung meist noch ein wenig anpassen, zum Beispiel, weil sich in Octave keine anwenderdefinierten Funktionen ineinander verschachteln lassen. Insgesamt verhält sich das GNU-Paket jedoch weitgehend kompatibel zu seinem kommerziellen Vorbild. Die Eingabe der Rechenaufgaben erfolgt per Kommandozeile und über Textdateien. Für den Fall, dass einmal eine Grafik zu erstellen ist, liegt dem Paket das Zeichenprogramm Gnuplot bei.
(<a href="http://www.heise.de/download/product/octave-24489" target="_blank">Heise ‐ Download</a>)
</p>
<ul>
<li><p><b>OpenSource-Variante von Mathlab</b><br />
</p></li>
<li><p><b>Software-Paket / ~-System zur numerischen Berechnung und der Visualisierung der Daten</b><br />
</p></li>
<li><p><b>Besonders entwickelt für Matrix-Berechnungen:</b><br />
- Lösen von Gleichungen <br />
- Berechnung von Eigenvektoren, Eigenwerte u.a.<br />
</p></li>
<li><p><b>Eigene Programmiersprache:</b><br />
- m-Files
</p>
<li><p><b>Eine explizite Angabe des Multiplikator-Zeichens ist in Gleichungen immer erforderlich.</b><br />
</p></li>
<li><p><b>Die trigonometrischen Funktionen (z.B. sin) arbeiten im Bogenmaß(engl. in radians)</b><br />
Der Faktor pi/180 kann zur Umrechnung von Grad ("degree") in Bogenmaß verwendet werden.<br />
</p></li>
<li><p><b>Octave arbeitet Interpreter-basiert. </b>
</p></li>
<li><p><b>Variablendeklaration & -zuweisung:</b><br />
degree = π/180<br />
</p></li>
<li><p><b>!! alle Variablen in Octave sind vom Typ "Floating point numbers" </b><br />
→ die Ausgabe‐“Genauigkeit“ beträgt i.d.R. fünf Zeichen, <br />
intern rechnet Octave mit einer höheren Genauigkeit (z.B. 15stellig)<br />
<br />
→ Sollen mehr als die fünf defaultmäßig ausgegebenen Nach-<br />
kommastellen angegeben werden, so gibt man <code><pre>format long</pre></code>
ein. Octave gibt dann die Zahlen 15- und mehr-stellig aus.<br />
<br />
Beispiel:
<code><pre>
octave:9> pi
ans = 3.1416
octave:10> format long
octave:11> pi
ans = 3.141592653589793
</pre></code>
→ Um in die normale Einstellung zu gelangen, gibt man <b>format short</b> ein.<br />
</p></li>
<li><p><b>Variablennamen sind case-sensitiv !! </b>
</p></li>
<li><p><b>Octave hindert einen nicht daran, vordefinierte Werte zu "überschreiben!!!</b><br />
→ so wie es aussieht, wird der User auch nicht darüber informiert;<br />
<br />
→ wird eine Variable überschrieben, so kommt es aber zu Verwirrungen auf beiden Seiten.<br />
</p></li>
</ul>
<h3>Links:</h3>
<ul>
<li>www.gnu.org/software/octave/doc/interpreter</li>
<li>Haftmann_Aufgabensammlung.pdf</li>
<li>Octave-Manual: http://www.gnu.org/software/octave/doc/octave-4.0.3.pdf</li>
<li><a href="https://wiki.octave.org/Octave_style_guide" target="_blank">Octave ‐ Wiki :: Octave Style Guide</a></li>
<li><a href="https://de.m.wikiversity.org/wiki/Octave-Tutorial" target="_blank">Wikiversity :: Octave‐Tutorial</a></li>
<li><b>Plotting:</b>
<ul>
<li><a href="https://en.wikibooks.org/wiki/Octave_Programming_Tutorial" target="_blank">Wikibooks :: Tutorial Octave‐Programming</a></li>
<li><a href="http://math.jacobs-university.de/oliver/teaching/tuebingen/octave/octave/octave.html" target="_blank">Jacobs‐University :: Octave</a></li>
</ul>
</li>
</ul>
</html>
<html>
<ol>
<li>Basis‐Installation:
<code><pre>
sudo apt‐get install octave
</pre></code></li>
<li>In Debian and Ubuntu the "complete" GNU Octave software is split over multiple packages. To obtain the complete features of Octave, install additionally
<ul>
<li>octave-doc, octave-info, and octave-htmldoc for the documentation;</li>
<li>liboctave-dev for the octave development header files and mkoctfile (required to install Octave Forge packages); and</li>
<li>octave-dbg for the debugging symbols.</li>
</ul>
</li>
<li>Many Octave packages are also distributed by Debian and Ubuntu. These are tested to work the best with the respective Octave version. Install them via:
<code><pre>
sudo apt-get install octave-control octave-image octave-io octave-optim octave-signal octave-statistics
</pre></code>
</li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.octave.org/Octave_for_Debian_systems" target="_blank">Octave ‐ Wiki :: Octave for Debian systems</a></li>
<li><a href="https://linuxhint.com/install_gnu_octave_debian_10/" target="_blank">Linux Hint :: Install GNU Octave on Debian 10</a></li>
<li><a href="https://opensofty.com/de/2019/11/21/so-installieren-sie-gnu-octave-unter-debian-10/" target="_blank">Opensofty :: Installation von GNU Octave unter Debian 10</a></li>
<li><a href="https://debianforum.de/forum/viewtopic.php?t=163143" target="_blank">Debian Forum</a></li>
</ul>
</html>
<html>
<ul>
<li><h3>ending blocks</h3>
Always use a specific end-of-block statement (like endif, endswitch) rather than the generic end.<br />
<br />
Enclose the condition of an if, while, until, or switch statement in parentheses, as in C:
<code><pre>
if (isvector (a))
s = sum (a);
endif
</pre></code>
Do not do this, however, with the iteration counter portion of a for statement. Write:
<code><pre>
for i = 1:n
b(i) = sum (a(:,i));
endfor
</pre></code>
</li>
<li><h3>if-[elseif-]else-endif</h3>
Beispiel:
<code><pre>
x = 1;
if (x == 1)
disp ("one");
elseif (x == 2)
disp ("two");
else
disp ("not one or two");
endif
</pre></code>
</li>
<li><h3>for-Schleife</h3>
<code><pre>
for j = 1:N+1
S(j,N+1) = S0*u^(j-1)*d^(N-j+1);
endfor
</pre></code>
</li>
</ul>
</html>
<html>
<ul>
<li>Bei der manuellen Installation (Befehl: "./configure") von <br />
Octave 4.2.1 wurde folgende Meldung ausgegeben:<br />
<code><pre>configure: error: to build Octave, you must have the PCRE library and header files installed</pre></code></li>
<br />
</ul>
</html>
<html>
<ul>
<li><b>Eingabe Matrizen:</b><br />
<ul>
<li><u>im Cmd-Window:</u><br />
Möglichkeiten:
<ol>
<li><code>>> A=[1 2 3; 1 2 3;1 2 3]</code>
<li><code>>> A = [ 1:3; 1:3; 1:3 ]</code>
</ol>
<br />
Als Trennzeichen reichen Blanks;<br />
Darstellung: <code><pre>A =
1 2 3
1 2 3
1 2 3</pre></code>
Es ist auch möglich, die Zeilen zeilenweise einzugeben.<br />
<br />
</li>
</ul></li>
<li><b>Transponierte Matrix:</b><br />
auch: gespiegelte Matrix<br />
Spalten werden zu Zeilen, Zeilen werden zu Spalten.<br />
<br />
Ausgangsmatrix:
<code><pre>A =
1 2 3
1 2 3
1 2 3</pre></code>
⇒ die transponierte Matrix A':
<code><pre>A' =
1 1 1
2 2 2
3 3 3
</pre></code>
</li>
<br />
<li><b>Matrizen horizontal konkatenieren:</b><br />
For horizontal concatenation, that is joining two block matrices column-wise;<br />
Befehl:
<code><pre>horzcat(…)</pre></code>
Beispiel:
<code><pre>A= [1,2;3,4];
B=[4,3;2,1];
C=horzcat(A,B);
disp(C)
# C=
#
# 1 2 4 3
# 3 4 2 1
</pre></code>
</li>
</ul>
</html>
<html>
<ul>
<li><h3> Quelle: </h3>
<i>http://www.octave.org/packages.html</i><br />
</li>
<li><h3> Installieren:</h3>
auf Octave-Prompt: <code><pre>pgk install -forge <i><PackageName></i></pre></code>
</li>
<li><h3> Installierte Pakete auflisten:</h3>
auf Octave-Prompt: <code><b>pkg list</b></code><br />
→ Das Symbol '*' neben dem Package-Namen zeigt an,<br />
dass das Package geladen ist und benutzt werden kann.<br />
</li>
<li><h3> Package laden:</h3>
auf Octave-Prompt: <code><b>pkg load <i><PackageName></i></b></code><br />
→ fügt das Package in den Workspace<br />
<br />
auf Octave-Prompt: <code><b>pkg load all</b></code><br />
→ lädt alle zur Verfügung stehenden Packages <br />
in den Workspace<br />
</li>
<li><h3> Package deaktivieren:</h3>
auf Octave-Prompt: <code><b>pkg unload <i><PackageName></i></b></code><br />
→ entfernt das Package aus dem Workspace<br />
<br />
auf Octave-Prompt: <code><b>pkg unload all</b></code><br />
→ entfernt alle geladenen Packages aus dem Workspace<br />
</li>
</ul>
</html>
<html>
<ul>
<li><h3>Befehl <em>plot</em></h3>
<ol>
<li>Zeichnen des Punktes (x, y).<br />
<br />
Syntax: <code><b><i>plot(x,y)</i></b></code>
</li>
<br />
<li>Zeichnen des Punktes (x, y) in einer gewünschten Farbe.<br />
<br />
Syntax: <code><b><i>plot(x,y,“<em>Farbe</em>“)</i></b></code>
<br />
Die Farbe wird durch einen Buchstaben der gewünschten Farbe<br />
angegeben (z.B. “r“ für die Farbe Rot)<br />
<br />
Weitere Einstellungen sind möglich.</li>
</ol>
</li>
<li><h3>Befehl <em>grid</em></h3>
Damit kann ein Liniengitter angegeben werden.<br />
<br />
Syntax: <code><b><i>grid [ on | off ] </i></b></code><br />
<br />
wird nur “grid“ aufgerufen, so wird der Zustand umgeschaltet<br />
(von “on“ nach “off“ u.umgekehrt., analog zu diary)<br />
<br />
<b>nach</b> dem Berechnen der Werte und <b>vor</b> dem Zeichnen muß der Befehl stehen.<br />
</p>
</li>
<li><h3>Befehl <em>meshgrid</em></h3>
[xx,yy] = meshgrid(x,y) erzeugt aus den Vektoren x und y Gitterdaten.
</li>
<!--
<li><h3></h3></li>
-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.yanivplan.com/files/tutorial5plot.pdf" target="_blank">Yaniv Plan :: Octave Tutorial 5: How to plot data in Octave</a></li>
</ul>
</html>
<html>
<ul>
<li><h3>Protokollierung der Aktionen: </h3>
<code><pre>diary [ on | off | <filename> ]</pre></code>
Record a list of all commands and the output they produce, <br />
mixed together just as they appear on the terminal.<br />
<br />
Valid options are:
<table border="0">
<tr><td><center>on</center></td><td>Start recording a session in a file called „diary“ in the current working directory.</td></tr>
<tr><td><center>off</center></td><td>Stop recording the session in the diary file.</td></tr>
<tr><td><center>filename</center></td><td>Record the session in the file named filename.</td></tr>
<tr><td></td><td>With no arguments, <b>diary</b> toggles the current diary state.</td></tr>
<table>
</li>
<li><h3>Graphische Ausgabe (<em>plotting</em>)</h3>
<code><pre>hold [ on | off | <filename> ]</pre></code>
????<br />
<br />
Valid options are:
<table border="0">
<tr><td><center>on</center></td><td>Retain plot data and settings so that subsequent plot commands are displayed<br />
on a single graph. Line color and line style are advanced for each new plot added.</td></tr>
<tr><td><center>off</center></td><td>(Default)<br />
Restore default graphics settings which clear the graph<br />
and reset axes properties before each new plot command.</td></tr>
<tr><td><center>HAX, …</center></td><td>When given the additional argument HAX, the hold state is modified for this<br />
axes rather than the current axes returned by 'gca'.</td></tr>
<tr><td></td><td>With no arguments, <b>diary</b> toggles the current diary state.</td></tr>
<table>
Der aktuelle Stand kann mit der Funktion
<code><pre>
ishold
</pre></code>
abgefragt werden.
</li>
</ul>
</html>
<html>
<b>Eingabe Vektoren:</b><br />
Für die beiden Arten von Vektoren, Spaltenvektor <br />
und Zeilenvektor, sind folgende zwei Eingaben<br />
notwendig resp. möglich:<br />
<ol>
<li><b>Spaltenvektor:</b>
<code><pre>>> A=[1; 2; 3]</pre></code>
wird zu:
<math style="display:block">
<mrow>
<mo>(</mo>
<mtable>
<mtr>
<mtd><mn>1</mn></mtd>
</mtr>
<mtr>
<mtd><mn>2</mn></mtd>
</mtr>
<mtr>
<mtd><mn>3</mn></mtd>
</mtr>
</mtable>
<mo>)</mo>
</mrow>
</math>
</li>
<br />
<li><b>Zeilenvektor: </b>
<code><pre>>> A=[1, 2, 3]</pre></code> bzw.
<code><pre>>> A=[1 2 3]</pre></code>
wird zu:
<math>
<mrow>
<mo>(</mo>
<mtable>
<mtr>
<mtd><mn>1</mn></mtd><mtd><mn>2</mn></mtd><mtd><mn>3</mn></mtd>
</mtr>
</mtable>
<mo>)</mo>
</mrow>
</math>
</li>
</ol>
</html>
<html>
<ul>
<li><b>ones</b><br />
Return a matrix or N-dimensional array whose elements are all 1.<br />
<br />
If invoked with a single scalar integer argument N, return a square<br />
NxN matrix.
</li>
<br />
<li><b>zeros</b><br />
Return a matrix or N-dimensional array whose elements are all 0.<br />
<br />
If invoked with a single scalar integer argument, return a square<br />
NxN matrix.</li>
<br />
<li><b>eye</b><br />
erzeugt eine Einheitsmatrix;</li>
<br />
<li><b>rand</b><br />
Return a matrix with random elements uniformly distributed on the<br />
interval (0, 1).</li>
<br />
<li><b>diag</b><br />
Return a diagonal matrix with vector V on diagonal K.<br />
<br />
The second argument is optional. If it is positive, the vector is<br />
placed on the K‐th superdiagonal. If it is negative, it is placed<br />
on the −K‐th subdiagonal. The default value of K is 0, and the<br />
vector is placed on the main diagonal.<br />
<br />
For example:
<code><pre>diag ([1, 2, 3], 1)</pre></code>
<math style="display:block">
<mo>⇒</mo>
<mrow>
<mo>(</mo>
<mtable>
<mtr>
<mtd><mi>0</mi></mtd>
<mtd><mi>1</mi></mtd>
<mtd><mi>0</mi></mtd>
<mtd><mi>0</mi></mtd>
</mtr>
<mtr>
<mtd><mi>0</mi></mtd>
<mtd><mi>0</mi></mtd>
<mtd><mi>2</mi></mtd>
<mtd><mi>0</mi></mtd>
</mtr>
<mtr>
<mtd><mi>0</mi></mtd>
<mtd><mi>0</mi></mtd>
<mtd><mi>0</mi></mtd>
<mtd><mi>3</mi></mtd>
</mtr>
<mtr>
<mtd><mi>0</mi></mtd>
<mtd><mi>0</mi></mtd>
<mtd><mi>0</mi></mtd>
<mtd><mi>0</mi></mtd>
</mtr>
</mtable>
<mo>)</mo>
</mrow>
</math>
</li>
<br />
…
</ul>
</html>
<html>
<h3>Die Größe einer Formel ändern</h3>
Es kann vorkommen, dass einem eine Formel zu klein ist:<br />
<img src="./pictures/OpenOffice_Formel_small.png" height=32 width=134 /><br />
<br />
Um die Größe zu ändern, muss der ge-<br />
wünschte Formelteil in geschweiften <br />
Klammern stehen und davor der Befehl <br />
<code><b>size</b></code> mit einer Größenangabe:<br />
<br />
Mit <code><pre>
<u><b>size 20 {</b></u><em>(x_1 * y_1) + (x_2 * y_2)</em><u><b>}</b></u>
</pre></code>
wird die Formel zu<br />
<img src="./pictures/OpenOffice_Formel_big.png" height=49 width=209 />
</html>
<html>
<ul>
<li>von Red Hat entwickelt;</li>
<br />
<li>Containervirtualisierung, ähnlich Kubernetes;<br />
container-based software deployment and management;</li>
<br />
<li>build around a core of Docker container packaging<br />
and Kubernetes container cluster management;</li>
<br />
<li>Verschiedene Ausführungsvarianten:
<ol>
<li>OpenShift Origin</li>
<li>OpenShift Container Platform<br />
(früher: OpenShift Enterprise)</li>
<li>OpenShift Dedicated</li>
<li>OpenShift Online</li>
</ol></li>
<br />
<li></li>
<br />
</ul>
<h4>Link:</h4>
<a href="https://en.wikipedia.org/wiki/OpenShift" target=_blank>Wikipedia (engl.)</a>
</html>
<html>
<ul>
<li>Check Openssl version on Windows:<br />
<code><pre>openssl version</pre></code>
</li>
</ul>
</html>
<html>
Have you ever felt the need to perform a<br />
set of operations on multiple files<br />
simultaneously???<br />
<br />
Here is a solution for that.<br />
<br />
For instance, if it is required to perform<br />
multiple operations like searching a string<br />
(using grep), and executing an awk or perl<br />
script etc, etc. on not just one file but a<br />
set of files, use the following commands at<br />
the unix prompt:<br />
<br />
<code>
$<: foreach i (<file_list>)<br />
? echo $i<br />
? grep <search_pattern> $i > tmp<br />
? awk -f awk_script tmp >> report<br />
? ....<br />
? ....<br />
? end<br />
$<:<br />
</code>
<br />
The files list in the brackets can be either<br />
<br />
* Specifically mentioned<br />
<br />
* A unix variable which contains a list of<br />
file names. For instance, the variable<br />
"p" can be assigned all the files starting<br />
with string "data" as follows:<br />
set p = (data*)<br />
Other examples are:<br />
set g = `grep -l "Startpoint" * `<br />
or<br />
set all = *<br />
(This assigns all file names in the current<br />
directory to the variable "all" )<br />
<br />
And its usage with the "foreach" command will<br />
be as follows:<br />
<br />
<code>
$<: foreach i ($all)<br />
.....<br />
.....<br />
end<br />
</code>
<br />
This tip generously supported by: lakshmi@virtualipgroup.com<br />
<br />
</html>
<html>
<h2>7 Steps to Create New Oracle Database from Command Line</h2>
Oracle Create DBEven if you are a Linux sysadmin or developer, sometimes you might end-up managing Oracle database that is running in your environment.
In that case, it is essential to understand certain basic Oracle DBA activities.
In this tutorial, we'll explain how to create an Oracle
database from command line.
When you install Oracle software, it will give you an option to create a new database from the UI.
At that time, if you decide not to create a new database, and install only the Oracle software, later you can create the database separately.
To create an Oracle database, you have two options:
<ul>
<li>Use Database Configuration Assistant (DBCA) and create new database by using the GUI. This is fairly straight forward.</li>
<li>Use the „Create Database“ command to create
a brand new oracle database from the command line. This method is helpful
when you don't have console access to the server to
launch the DBCA. Or, when your server doesn't have
Xterm setup properly, use this method.</li>
</ul>
<h3>1. Setup Appropriate Oracle Environment Variables</h3>
First, you should setup appropriate oracle environment variable on your server.
In this example, it assumes that oracle is installed under /u01/app/oracle/product directory. Change this value according to your environment.
<code><pre>
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0
</pre></code>
The most important variable is ORACLE_SID, which will have the name of the new
oracle database that you like to create. In this example, the name of the new
database is set to „dev“ as shown below.
<code><pre>
export ORACLE_SID=dev
</pre></code>
<h3>2. Create an Ini File ‐ initdev.ora</h3>
Next, create a ora.ini file for your new database. This is the initialization file for the new database.
Depending on the version of your Oracle, you might see a sample init.ora file under $ORACLE_HOME. If you have one, use that as a baseline and edit the values accordingly.
<code><pre>
cd $ORACLE_HOME/dbs
cp init.ora initdev.ora
</pre></code>
Note: As shown above, the init file for this new database should be of this format: init{ORACLE_SID}.ora ...
So, in this case, the filename will be: initdev.ora
If you don't see a default <b>init.ora</b> template in your
<b>$ORACLE_HOME/dbs</b>, use the following sample.
<code><pre>
*.db_name='dev'
*.db_domain=''
*.audit_file_dest='/u01/app/oracle/admin/dev/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.memory_target=1G
*.control_files='/u01/app/oracle/oradata/dev/control01.ctl', \
'/home/oracle/u02/oradata/dev/control02.ctl'
*.db_block_size=8192
*.diagnostic_dest='/u01/app/oracle/admin/dev'
*.open_cursors=250
*.processes=100
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTS'
</pre></code>
Few points to consider in the above file:
<ul>
<li>In the above file, make sure you set the db_name to the ORACLE_SID
name that you set in the previous step</li>
<li>Whatever the name of the undo_tablespace that we specify here, we
have to use the exact name during the CREATE DATABASE command.</li>
<li>Change the directory location appropriately based on your system.
Don't forget to change „dev“ in the above directory
location to your ORACLE_SID name.</li>
</ul>
<h3>3. Create Serve Parameter file (spfile)</h3>
SP file stands for Server Parameter file. Unlike the init file sp file is a
binary file, and you can't edit the spfile manually.
SP file is created from the text based ini file. The advantage of SP file is
that, you can change the initialization parameter values after you start the
database using the ALTER SYSTEM command.
In other words, when you use „ALTER
SYSTEM“ command to change any of the
parameter's value, it stores them in the SP file.
Then, when the oracle database is started, it first looks for the SP file for
the parameter value. If it can't find any SP file, then
it will use the text based Ini file.
To create a SP file for our new database, use the following command.
First, use sqlplus command and get the oracle sysdba prompt, from where
we'll create a new database.
<code><pre>
$ sqlplus / as sysdba
Connected to an idle instance.
SQL>
</pre></code>
If you notice in the above output, it says „Connected to an idle instance.“. This is because our current ORACLE_SID is set
to dev, which is a new database, which we have not yet created.
So, the first step is to create a new SP file based on our Ini file. PFILE stands for Ini file. The following command will create a new SPFILE.
<code><pre>
SQL> CREATE SPFILE FROM PFILE;
File created.
</pre></code>
As you see below, the above command has created the spfiledev.ora automatically.
<code><pre>
$ ls -1 $ORACLE_HOME/dbs/
initdev.ora
spfiledev.ora
</pre></code>
<h3>4. Start the Idle Instance</h3>
Before we create the database, we should start the instance for
„dev“ database using STARTUP
NOMOUNT command. As you might've guessed, this command will not MOUNT any
database. This is simply starting the empty new idle instance with the
ORACLE_SID name „dev“.
<code><pre>
SQL> STARTUP NOMOUNT;
ORACLE instance started.
Total System Global Area 1258291200 bytes
Fixed Size 1261564 bytes
Variable Size 520093700 bytes
Database Buffers 721420288 bytes
Redo Buffers 15515648 bytes
</pre></code>
During the above command, it will read the default spfile with the name spfile{ORACLE_SID}.ora from the default spfile location $ORACLE_HOME/dbs. If the spfile is not there, it will use the default init file init{ORACLE_SID}.ora
For some reason, if you want to specify the location of the pfile yourself, you can do that by passing PFILE parameter as shown below.
<code><pre>
SQL> STARTUP NOMOUNT PFILE=/tmp/initdev.ora
</pre></code>
Also, you might get the following ORA-01078 and LRM-00109, if the spfile, or the init file is missing in the default location.
<code><pre>
SQL> STARTUP NOMOUNT
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/dbs/initdev.ora'
</pre></code>
<h3>5. Create New Oracle Database</h3>
Use the following CREATE DATABASE command to create an empty database.
<code><pre>
SQL> CREATE DATABASE dev
USER SYS IDENTIFIED BY DevSysPass
USER SYSTEM IDENTIFIED BY DevSystemPass
LOGFILE GROUP 1 ('/home/oracle/u02/oradata/dev/redomed_01.log') SIZE 50M,
GROUP 2 ('/home/oracle/u02/oradata/dev/redomed_02.log') SIZE 50M,
MAXLOGFILES 5
MAXLOGHISTORY 10
MAXDATAFILES 50
CHARACTER SET US7ASCII
NATIONAL CHARACTER SET AL16UTF16
DATAFILE '/home/oracle/u02/oradata/dev/system01.dbf' SIZE 100M REUSE
SYSAUX DATAFILE '/home/oracle/u02/oradata/dev/sysaux01.dbf' SIZE 100M REUSE
DEFAULT TABLESPACE USERS
DATAFILE '/home/oracle/u02/oradata/dev/users01.dbf'
SIZE 50M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
DEFAULT TEMPORARY TABLESPACE TEMPTS
TEMPFILE '/home/oracle/u02/oradata/dev/tempts01.dbf'
SIZE 30M REUSE
UNDO TABLESPACE UNDOTS
DATAFILE '/home/oracle/u02/oradata/dev/undots01.dbf'
SIZE 100M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
</pre></code>
In the above command:
<ul>
<li>Create database command will create an oracle database with name
„dev“</li>
<li>The password specified in the 2nd line will be assigned to SYS
user</li>
<li>The password specified in the 3rd line will be assigned to SYSTEM
user</li>
<li>We are creating two redo logfiles with size 100MB each.</li>
<li>MAXLOGFILES ‐ The maximum number of redo log files is set to 5</li>
<li>MAXDATAFILES ‐ This indicates that maximum number of oracle data files that can be created for this database.</li>
<li>DATAFILE ‐ This specify the datafile that will be used by the SYSTEM tablespace</li>
<li>SYSAUX DATAFILE ‐ This indicates the datafile that will be used by the SYSAUX tablespace</li>
<li>The default tablespace for this database is set to USERS</li>
<li>The default temporary tablespace is set to TEMPTS</li>
<li>The undo tablespace is set to UNDOTS</li>
</ul>
If you want to create additional tablespace after the DB is created, use this: 15 Oracle Tablespace and Datafile Command Examples
Note: If you specify DB_CREATE_FILE_DEST in your init file to a directory
location, then you don't need to specify the exact location and filenames
for all the datafiles, oracle will take care of those for you.
For example, if you've specified this in your initdev.ora file.
<code><pre>
# vi initdev.ora
DB_CREATE_FILE_DEST='/home/oracle/u02/oradata/dev'
</pre></code>
In this case, you can simplify your CREATE DATBASE command as shown below.
<code><pre>
SQL> CREATE DATABASE dev
USER SYS IDENTIFIED BY DevSysPass
USER SYSTEM IDENTIFIED BY DevSystemPass
MAXLOGFILES 5
MAXLOGHISTORY 10
MAXDATAFILES 50
CHARACTER SET US7ASCII
NATIONAL CHARACTER SET AL16UTF16
DEFAULT TABLESPACE USERS
DEFAULT TEMPORARY TABLESPACE TEMPTS
UNDO TABLESPACE UNDOTS
</pre></code>
The above will create the appropriate datafiles required for all the tablespaces (undo, temporary, etc) under the location specified in the DB_CREATE_FILE_DEST directory.
To understand more about UNDO tablespace, this should help: 10 Oracle UNDO Tablespace Management Examples
<h3>6. Build Data Dictionary Views</h3>
As a last step, execute the catalog.sql and catproc.sql. catalog script will create all the dictionary tables, performance related views, required public synonyms. This will also grant appropriate access to all the synonyms that was created. catproc script executes all the scripts that are required for PL/SQL functionalities.
<code><pre>
SQL> @?/rdbms/admin/catalog.sql;
SQL> @?/rdbms/admin/catproc.sql
</pre></code>
Partial output of the above commands.
<code><pre>
SQL> @?/rdbms/admin/catalog.sql;
DOC>######################################################################
DOC>######################################################################
DOC> The following statement will cause an "ORA-01722: invalid number"
DOC> error and terminate the SQLPLUS session if the user is not SYS.
DOC> Disconnect and reconnect with AS SYSDBA.
DOC>######################################################################
DOC>######################################################################
DOC>#
no rows selected
Package created.
Package body created.
..
..
Synonym created.
Grant succeeded.
PL/SQL procedure successfully completed.
SQL> @?/rdbms/admin/catproc.sql
..
..
Comment created.
Synonym created.
Grant succeeded.
PL/SQL procedure successfully completed.
</pre></code>
If you are curious, you can look at the catalog and catproc script to understand what exactly it does.
<code><pre>
vi $ORACLE_HOME/rdbms/admin/catalog.sql;
vi $ORACLE_HOME/rdbms/admin/catproc.sql
</pre></code>
<h3>7. Verify ‐ Shutdown and Startup</h3>
Finally, perform a regular shutdown and startup to make sure everything works as expected on this new database.
<code><pre>
$ sqlplus / as sysdba
SQL> SHUTDOWN IMMEDIATE;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> STARTUP;
ORACLE instance started.
Total System Global Area 1258291200 bytes
Fixed Size 1261564 bytes
Variable Size 520093700 bytes
Database Buffers 721420288 bytes
Redo Buffers 15515648 bytes
Database mounted.
</pre></code>
<h3>Anmerkungen</h3>
<ul>
<li> From Oracle 11g R2 onwards it is required to execute an additional script after catproc.sql. According to Oracle Administrator Guide:<br />
<br />
In SQL*Plus, connect to your Oracle Database instance as SYSTEM user:<br />
<code><pre>
@?/sqlplus/admin/pupbld.sql
</pre></code>
You may want to change SYSTEM user password first ...<br />
</li>
</ul>
<br />
Link:<br />
http://www.thegeekstuff.com/2017/01/create-database-oracle/<br />
<br />
</html>
<html>
<ul>
<li><h5>Top Ten most CPU TIME Queries</h5>
<pre><code>
SELECT sql_text,ROUND (CPU_TIME/1000000) "CPU_TIME in Seconds"
FROM (SELECT sql_text, CPU_TIME,rank() over ( order by CPU_TIME DESC) rank_desc
FROM v$sql)
WHERE
rank_desc>10;
</code></pre>
</li><br />
<li><h5>Query to get user etc. consuming high CPU</h5>
<pre><code>
SELECT se.username, se.sid, se.MACHINE, se.TERMINAL, se.STATUS, ROUND (value/100) "CPU Usage"
FROM v$session se, v$sesstat ss, v$statname st
WHERE ss.statistic# = st.statistic#
AND name LIKE '%CPU used by this session%'
AND se.sid = ss.SID
AND se.username IS NOT NULL
ORDER BY value DESC
</code></pre>
</li><br />
<li><h5>Query to get Full Sql and other info with the help of Unix PID:</h5>
<pre><code>
select ss.USERNAME,ss.sid, ss.MACHINE, ss.TERMINAL, ss.STATUS,sa.sql_fulltext
from v$session ss, v$sqlarea sa, v$process p
where sa.HASH_VALUE=ss.PREV_HASH_VALUE
and p.addr = ss.paddr
and p.spid = &unix_pid;
</code></pre>
</li><br />
<li><h5>Query to get Full Sql and other info with the help of session SID:</h5>
<pre><code>
SELECT B.USERNAME, B.MACHINE, B.TERMINAL, B.STATUS, A.SQL_FULLTEXT, A.SQL_TEXT
FROM V$SQLAREA A, V$SESSION B
WHERE A.HASH_VALUE=B.PREV_HASH_VALUE
AND B.SID= &oracle_sid;
</code></pre>
</li><br />
<li><h5>Top Most execution associated with SQL</h5>
<pre><code>
SELECT sql_text, executions
FROM (SELECT sql_text, executions, rank() over ( order by executions DESC) rank_desc
FROM v$sql)
WHERE
rank_desc >10
</code></pre>
</li><br />
<li><h5>Top Most Fetch associated with SQL </h5>
<pre><code>
SELECT sql_text, fetches
FROM (SELECT sql_text, fetches, rank() over ( order by fetches DESC) rank_desc
FROM v$sql)
WHERE
rank_desc >10;
</code></pre>
</li><br />
<li><h5>Locks that are currently imposed on library cache objects</h5>
<pre><code>
SELECT a.object,a.type,a.sid,s.username,s.osuser,s.program
FROM v$access a, v$session s
WHERE a.sid = s.sid
AND a.owner = UPPER('&ENTER_SCHEMA_NAME')
AND a.sid = &enter_session_id
ORDER BY a.object
</code></pre>
</li><br />
<li><h5>SQL's running in current transaction:</h5>
<pre><code>
select ss.sid,ss.serial#,ss.username,ss.status,t.start_time,sq.sql_id,sq.sql_FULLTEXT,
ss.osuser,ss.process,ss.machine,ss.terminal,ss.program,ss.module,to_char(ss.logon_time,'DD/MON/YY HH24:MI:SS') logon_time
from v$session ss,v$transaction t, v$sql sq
where t.ses_addr = ss.saddr
– and ss.prev_hash_value=sq.hash_value
and ss.sql_id = sq.sql_id
order by start_time;
</code></pre>
</li><br />
<li><h5>Get SID on locked table </h5>
– Lock on Table
<pre><code>
select a.sid, a.serial#
from v$session ss, v$locked_object lo, dba_objects do
where lo.object_id = do.object_id
and ss.sid = lo.session_id
and OBJECT_NAME='<object name>'
and username='<user name>';
SELECT * FROM v$access WHERE OBJECT ='OBJECT_NAME';
</code></pre>
</p>
<br />
Link:<br />
<a href="http://oracledbahub.com/2016/02/dba-troubleshoot-queries/">http://oracledbahub.com/2016/02/dba-troubleshoot-queries/</a>
</html>
<html>
Sie moechten Datenbank-Optionen Ihrer Oracle-DB ermitteln? <br />
Das folgende Skript unterstützt dabei:<br />
<br /><code>
SET pages 3000<br />
COL parameter FORMAT A60<br />
COL value FORMAT a10<br />
<br />
SELECT *<br />
FROM v$option<br />
ORDER BY 1;</code> <------ Alphabetische Auflistung!<br />
<br />
Die Ausgabe kann beispielsweise wie folgt aussehen:<br />
<code>
PARAMETER VALUE<br />
------------------------------------------------------------ ----------<br />
Advanced replication TRUE<br />
Application Role TRUE<br />
Backup Encryption TRUE<br />
Bit-mapped indexes TRUE<br />
Block Change Tracking TRUE<br />
Block Media Recovery TRUE<br />
Change Data Capture TRUE<br />
Coalesce Index TRUE<br />
Connection multiplexing TRUE<br />
Connection pooling TRUE<br />
...</code><br />
</html>
<html>
<ul>
<li>KonfigFile: login.sql</li>
<li> Kommentare: /* ... */</li>
<li> spool [on | off]</li>
<li> Variable SQLPROMPT</li>
<li> Beispiel für eine login.sql:
<code><pre>
-- begin
set echo off
set feedback on
set message on
define _EDITOR=vim
set lines 1000
set pages 10000
set colsep ';'
set termout off
col user_name new_value user_name
col db_name new_value db_name
select lower(user) user_name, ltrim(rtrim(lower(global_name))) db_name from global_name;
set sqlprompt "&user_name@&db_name> "
set termout on
set trimspool on
set trimout on
set serveroutput on
-- end
</pre></code>
</li>
<li> <h3>Ändern der letzten Eingabe:</h3>
Falls man sich vertippt hat, kann man den in SQL-*Plus <br />
eingebauten Zeilen-Editor benutzen, da die letzte SQL-<br />
Anweisung in einem Puffer zwischengespeichert wird:
<ul>
<li> "l" (list) zeigt den aktuellen Pufferinhalt an (und setzt die aktuelle Zeile, welche durch "*" markiert ist, auf die letzte Pufferzeilen.</li>
<li>"l (Zeilennummer)"</li>
<li> "c/(alterString)/(neuerString)/" (change)</li>
<li> "a (Text)" (append) hängt (Text) an die aktuelle Zeile an.</li>
<li> "i" (input) fügt mehrere Zeilen Text nach der aktuellen Zeile in den Puffer ein, der Pufferinhalt wird nach Eingabe eines Semikolons ausgeführt.</li>
<li> "del" (delete) löscht die aktuelle Pufferzeile.</li>
<li> "r" (run) führt den aktuellen Pufferinhalt aus.</li>
<li> "/" führt auch den aktuellen Pufferinahlt aus (zeigt ihn aber vorher nicht an).</li>
<li> "get (Filename)" liest den Inhalt der Datei (Filename) in den Puffer.</li>
<li> "save (Filename)" schreibt den Inhalt des Puffers in die Datei namens (Filename).</li>
<li>Mit <b>edit</b> kann man einen richtigen Editor aufrufen, dem der Pufferinhalt in der
Datei <b>afiedt.buf</b> übergeben wird. Nach Abschlus der Editor-Sitzung kann man das Ergebnis mit "r" ausführen. Der verwendete Editor kann mit "define editor = (Programm)" ausgewählt werden. Insbesondere kann man also auch den emacs, jove oder vi verwenden.</ul></li>
</ul>
<h3>Links:</h3>
<a href="https://de.wikibooks.org/wiki/Oracle:_SQL*PLUS" target=_blank>Wiki-Books :: Oracle - SQL*Plus</a>
</html>
http://www.thegeekstuff.com/2016/02/oracle-exp-examples/
http://www.thegeekstuff.com/2016/09/oracle-sql-developer-install/
http://www.thegeekstuff.com/2012/06/oracle-sqlldr
http://www.thegeekstuff.com/2014/11/oracle-rman-restore
http://www.thegeekstuff.com/2015/01/delete-oracle-rman-backup
http://www.claus-ebert.de/howto/howto_oracle/howto_oracle.html
<html>
http://www.datenbank-plsql.de/packages.htm <br />
http://www.datenbank-plsql.de/index.htm
</html>
<html>
<ul>
<li>in SQL (+ PL/SQL) stehen folgende vier Funktionen<br>
und eine Bedingung für die Arbeit mit regulären Aus‐<br />
drücken zur Verfügung:<br>
<br>
(1) <b>REGEXP_LIKE</b> # Suchen von Zeichenketten<br>
<br>
(2) <b>REGEXP_INSTR</b> # Rückgabe der Position innerhalb der
Zeichenkette<br>
<br>
(3) <b>REGEXP_COUNT</b> # Rückgabe der Anzahl der Treffer<br>
<br>
(4) <b>REGEXP_SUBSTR</b> # Zu suchenden Teilstring aus
Zeichenkette
holen<br>
<br>
(5) <b>REGEXP_REPLACE</b> # Ersetzen der zu suchenden
Teilstrings in der Zeichenkette
</li>
<br>
<li>eingeführt in Version 10g<br>
</li>
<br>
<li><b>REGEXP_LIKE</b><br>
<br>
Syntax:<code><pre>
REGEXP_LIKE (
source, # Zeichenkette, die durchsucht wird
regexp, # der reguläre Ausdruck
modes # [optional] modifiziert die Inter‐
# pretation des regulären Ausdrucks (i,c,n,m)
)
</pre></code>
</li>
<br>
<li><b>REGEXP_INSTR ("In STRing")</b><br>
<br>
Syntax:<code><pre>
REGEXP_INSTR (
source, # s. REGEXP_LIKE
regexp, # s. REGEXP_LIKE
position, # die Stelle in der Zeichenkette, an der die Suche beginnen soll
occurrence, # Angabe des relevanten Auftretens des Musters bei mehrfachem Treffen in der Zeichenkette
return_option, # ob die Position des ersten Zeichens des Treffens (0) oder des ersten
# Zeichen nach dem Treffer zurückgeliefert werden soll (1)
modes # s. REGEXP_LIKE
)</pre></code>
</li>
<br>
<li><b>REGEXP_COUNT</b><br>
<br>
Syntax:<code><pre>
REGEXP_COUNT (
source, # s. REGEXP_LIKE
regexp, # s. REGEXP_LIKE
position, # Position in der Zeichenkette, an der die Suche beginnen soll
modes # s. REGEXP_LIKE
)</pre></code>
</li>
<br>
<li><b>REGEXP_SUBSTR</b><br>
<br>
Syntax.<code><pre>
REGEXP_SUBSTR (
source, # s. REGEXP_LIKE
regexp, # s. REGEXP_LIKE
position, # Position in der Zeichenkette, an der die Suche beginnen soll
occurrence, # Angabe des relevanten Auftretens des Musters bei mehrfachen Treffens in der Zeichenkette
modes # s. REGEXP_LIKE
)</pre></code>
</li>
<br>
<li><b>REGEXP_REPLACE</b><br>
<br />
Syntax:<code><pre>
REGEXP_REPLACE (
source, # s. REGEXP_LIKE
regexp, # s. REGEXP_LIKE
replacement, # die Zeichenfolge, durch die der in source gefundene Teilstring ersetzt werden soll
position, # Position in der Zeichenkette, an der die Suche beginnen soll
occurrence, # Angabe des relevanten Auftretens des Musters bei mehrfachen Treffens in der Zeichenkette
modes # s. REGEXP_LIKE
)</pre></code>
</li>
</ul>
<h3>Links / Quellen:</h3>
<ul>
<li>database pro, 5/10, S. 102ff
</li>
</ul>
</html>
<html>
Ein regulärer Ausdruck beschreibt mit Literalen und Platzhaltern die Eigenschaften einer gesuchten Zeichenkette.<br />
<br />
Mit der Einführung von SQL-Funktionen für reguläre Ausdrücke beendete Oracle das dunkle Zeitalter der Textmustersuche, in welchem der Datenbank mit LIKE nur eine nebulöse Vorstellung gesuchter Zeichenketten vermittelt werden konnte.<br />
<br />
Es war schon immer eine Strafarbeit, Zeichenketten oder ganze Textfiles nach irgendwelchen Mustern zu durchsuchen, wenn keine regulären Ausdrücke zur Verfügung stehen. Wohl dem, der sich auf (U|Li)n[i|u]x tummelt, und mit (s)ed, vi, awk und Perl verwöhnt wird.<br />
<br />
Wie suchte man damals mit SQL nach einer Zeichenkette, deren genaue Schreibweise man nicht kennt? Nehmen wir beispielsweise den Namen Meier mit seinen vielen Ausprägungen. Ohne reguläre Ausdrücke könnte man alle bekannten Schreibweisen mit OR verknüpfen:<br />
<code><pre>
SELECT * FROM meierei
WHERE name = 'Maier'
OR name = 'Meier'
OR name = 'Mayr'
...
</pre></code>
Natürlich wird man mindestens eine Schreibweise übersehen, die dann im Ergebnis fehlt. Man könnte auch mit LIKE und der reichhaltigen Auswahl von zwei Metazeichen ("%"=beliebig viele Zeichen, "_" = ein Zeichen) diverse Suchmuster erstellen und verknüpfen:<br />
<code><pre>
SELECT * FROM meierei
WHERE name LIKE 'Me%r'
OR name LIKE 'Ma_er'
...
</pre></code>
Das ist jetzt zu unpräzise und liefert Ergebnisse, die man gar nicht haben will. <code><b>Me%r</b></code> könnte auch eine Metapher sein. Die Präzision eines regulären Ausdrucks kann nur durch intensiven Gebrauch der Funktion substr() zusammen mit AND und OR erreicht werden. Das musste viele Oracle-Jahre lang ausreichen.
<h3>Was lange währt …</h3>
Die Verwendung regulärer Ausdrücke zur Verarbeitung von Zeichenketten ist auf allen Unix- und ähnlichen Systemen seit den 70er Jahren etabliert, beginnend mit dem legendären ed. Aber erst der POSIX-Spezifikation der IEEE und der Open Group gelang es in den 90er Jahren, die unterschiedlichen Dialekte verschiedener Tools wieder einzufangen und eine einheitliche Grundlage zu schaffen. Eine Auswahl häufig genutzter Ausdrücke finden Sie in Tabelle 1. Oracle führte mit der Version 10g im Jahr 2003 die regulären Ausdrücke in SQL ein.
<h3>… wird endlich gut</h3>
Die Oracle-Datenbank stellt in SQL (und PL/SQL) fünf Funktionen für die Arbeit mit regulären Ausdrücken zur Verfügung. Diese können auf die Datentypen CHAR, NCHAR, VARCHAR2, NVARCHAR2, CLOB und NCLOB angewendet werden. Damit können also nicht nur Zeichenketten, sondern auch ganze in (N)CLOBS abgelegte Texte mit regulären Ausdrücken durchsucht werden. Auch die Auswahl der in Oracle implementierten regulären Ausdrücke ist reichhaltig. Der POSIX-Standard IEEE Std 1003.1 ist mit Notation und Regeln für Basic und Extended Regular Expressions vollständig implementiert, und noch zusätzlich um mehrsprachliche Unterstützung erweitert. Perl-erfahrene Entwickler kommen auch auf ihre Kosten, da die gängigen Perl-Erweiterungen zu regulären Ausdrücken ebenfalls zur Verfügung stehen, solange sie dem POSIX-Standard nicht widersprechen.
<h3>Aufbau eines regulären Ausdrucks</h3>
Ein regulärer Ausdruck beschreibt mit Literalen und Platzhaltern die Eigenschaften einer gesuchten Zeichenkette. Ein normaler Buchstabe steht für genau diesen Buchstaben an dieser Stelle. Der einfache reguläre Ausdruck abc steht für diese drei Buchstaben in genau dieser Reihenfolge irgendwo in der durchsuchten Zeichenkette. Der wichtigste Unterschied zu LIKE ist hier, dass ein LIKE-Suchmuster sich immer auf das gesamte durchsuchte Textfeld bezieht, während ein regulärer Ausdruck nur an irgendeiner Stelle im Textfeld vorkommen muss, um ein Ergebnis zu liefern. Soll der Ausdruck dem gesamten Textfeld entsprechen, muss das spezifiziert werden.<br />
<br />
Für eine Auswahl verschiedener Zeichen an einer Position werden diese Zeichen mit eckigen Klammern zusammengefasst. Der reguläre Ausdruck [abc]xyz bedeutet "a oder b oder c, gefolgt von xyz". Die POSIX-Zeichenklassen, erkennbar an der Klammerung aus eckigen Klammern und Doppelpunkten, beschreiben ebenfalls genau ein Zeichen.<br />
<br />
In Tabelle 1 finden Sie eine beispielhafte Auswahl, mit der Sie auf der Datenbank mit den nachfolgend beschriebenen Funktionen sofort loslegen können.
Tabelle 1: Beispielhafte Suchmuster und Zeichenklassen
<table>
<tr><th>Ausdruck</th><th>Bedeutung (für ein Zeichen)</th></tr>
<tr><td>a</td><td>Buchstabe a an genau dieser Stelle</td></tr>
<tr><td>[abc] </td><td>a oder b oder c an dieser Stelle</td></tr>
<tr><td>[a-z] </td><td>Ein Kleinbuchstabe</td></tr>
<tr><td>[A-Z,a-z] </td><td>Ein Buchstabe</td></tr>
<tr><td>[0-9] </td><td>Eine Ziffer</td></tr>
<tr><td>. </td><td>Ein beliebiges Zeichen</td></tr>
<tr><td>[[:digit:]] </td><td>Die Ziffern 0-9, entspricht [0-9]</td></tr>
<tr><td>[[:upper:]] </td><td>Großbuchstaben (je nach Ländereinstellung mit Umlauten etc.), entspricht [A-Z]</td></tr>
<tr><td>[[:lower:]] </td><td>Kleinbuchstaben (je nach Ländereinstellung mit Umlauten etc.), entspricht [a-z]</td></tr>
<tr><td>[[:alpha:]] </td><td>Alle Groß- und Kleinbuchstaben, also [:upper:] und [:lower:] , entspricht [A-Z,a-z]</td></tr>
<tr><td>[[:alnum:]] </td><td>Alle Groß- und Kleinbuchstaben sowie alle Ziffern, also [:alpha:] und [:digit:] , entspricht [A-Z,a-z,0-9]</td></tr>
<tr><td>[[:punct:]] </td><td>Satzzeichen wie: . , " ' ? ! ; : # $ % & ( ) * + - / < > = @ [ ] \ ^ _ { } ~</td></tr>
<tr><td>[[:print:]] </td><td>Alle druckbaren Zeichen, also [:alnum:] , [:punct:] und SPACE</td></tr>
<tr><td>[[:graph:]] </td><td>Alle druckbaren Zeichen ohne SPACE, also [:alnum:] und [:punct:]</td></tr>
<tr><td>[[:blank:]] </td><td>SPACE und TAB</td></tr>
<tr><td>[[:space:]] </td><td>Alle whitespace Characters ( SPACE, TAB, VT, CR, NL, FF)</td></tr>
<tr><td>[[:cntrl:]] </td><td>Steuerzeichen ( NL CR LF TAB VT FF NUL SOH STX EXT EOT ENQ ACK SO SI DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC IS1 IS2 IS3 IS4 DEL)</td></tr>
<tr><td>[[:xdigit:]] </td><td>Hexadezimale Ziffern (0-9, A-F, a-f)</td></tr>
<tr><td>[[=a=]]</td><td>Äquivalenzklasse. Alle Buchstaben, deren Basis a ist, also â, á ä etc.</td></tr>
</table>
Das reicht aber erst, um ein Suchmuster für ein einziges Zeichen zu definieren. Wenn mehrere Zeichen nacheinander dem beschriebenen Muster entsprechen sollen, können wir Wiederholungsfaktoren einsetzen (s. Tabelle 2).
Tabelle 2: Wiederholungsfaktoren werden nach Zeichen oder Zeichenklassen eingefügt
Ausdruck Bedeutung
* 0- bis n-mal
? 0- bis 1-mal
+ 1- bis n-mal
{n} genau n-mal
{n,} mindestens n-mal
{n,m} n- bis m-mal
Beispiel: Der Ausdruck [0-9]{5} beschreibt eine Folge aus 5 Ziffern, die in einer Zeichenkette enthalten ist. Für eine Postleitzahl reicht das noch nicht, denn vor oder nach der Ziffernfolge könnte noch jede Menge Unsinn stehen. Um das auszuschließen, können wir den regulären Ausdruck am Anfang und am Ende der durchsuchten Zeichenkette verankern (s. Tabelle 3).
Tabelle 3: Verankern des regulären Ausdrucks
Anker Bedeutung
^ (vor dem Ausdruck) Beginn der untersuchten Zeichenkette
$ (nach dem Ausdruck) Ende der untersuchten Zeichenkette
Der vollständige reguläre Ausdruck für eine Inlands-Postleitzahl ist ^[0-9]{5}$. Er beschreibt eine Zeichenkette, die von Anfang (^) bis Ende ($) aus 5 Ziffern besteht.
<h3>Regex-Funktionen</h3>
Oracle stellt für den Einsatz regulärer Ausdrücke die folgenden Funktionen zur Verfügung.
<ol>
<li>REGEXP_LIKE</li>
<li>REGEXP_INSTR</li>
<li>REGEXP_COUNT</li>
<li>REGEXP_SUBSTR</li>
<li>REGEXP_REPLACE</li>
</ol>
<h5>REGEXP_LIKE</h5>
Die Funktion liefert, wie das altbekannte LIKE, als Ergebnis TRUE oder FALSE zurück.
Ein
<code><pre>
WHERE spalte LIKE '%qwertz%'
</pre></code>
wird einfach zu
<code><pre>
WHERE regexp_like(spalte, 'qwertz')
</pre></code>
Die genaue Syntax ist:
<code><pre>
REGEXP_LIKE( source
, regexp
, modes )
</pre></code>
Source ist die Zeichenkette, die durchsucht werden soll, regexp enthält den reguläAusdruck, modes ist optional und modifiziert die Interpretation des regulären Ausdrucks. Hierzu stehen 4 Optionen zur Verfügung, von denen bis zu 3 kombiniert werden können:
i: Case insensitive.
c: Case sensitive. Der Defaultwert für c und i, die sich naturgemäß gegenseitig ausschließen, ist im Datenbankparameter NLS_SORT festgelegt. Nur wenn dieser auf _CI endet, wird case insensitive gesucht. (z. B.: GERMAN_CI).
n: Punkt = beliebiges Zeichen inklusive Newline. Der Punkt in einem regulären Ausdruck steht für jedes Zeichen ohne Newline, wenn n nicht gesetzt wird.
m: ^ vor dem regulären Ausdruck = Zeilenanfang, $ nach dem Ausdruck = Zeilenende. ^ und $ verankern einen regulären Ausdruck normalerweise am Anfang bzw. am Ende der gesamten untersuchten Zeichenkette, auch wenn diese viele Zeilen enthält, wie z. B. in einem CLOB.
REGEXP_LIKE kann selbstverständlich auch in Check Constraints verwendet werden, um die Einhaltung eines bestimmten Feldformats zu erzwingen. Das folgende Beispiel überprüft die Einhaltung des Formats der Spalte phone_number in der Tabelle hr.employees:
<code><pre>
ALTER TABLE hr.employees
ADD CONSTRAINT c_phone_number
CHECK (REGEXP_LIKE(phone_number, '[[:digit:]]{3}\.[[:digit:]]{3}\.[[:digit:]]{4}')) NOVALIDATE;
</pre></code>
Und schon können wir die Telefonnummer nur noch im vorgegebenen Format in der Tabelle employees ablegen (Beispiel: 212.555.4240).
<h5>REGEXP_INSTR</h5>
Die Funktion REGEXP_INSTR liefert die Position innerhalb einer Zeichenkette, auf die der reguläre Ausdruck passt. Die genaue Syntax ist:
<code><pre>
REGEXP_INSTR
( source
, regexp
, position
, occurrence
, return_option
, modes )
</pre></code>
Source ist die Zeichenkette, die durchsucht werden soll, regexp enthält den regulären Ausdruck, position kennzeichnet die Stelle in der Zeichenkette, an der die Suche starten soll, occurrence das relevante Auftreten des Musters (bei mehrfachen Treffern in der Zeichenkette). Mit return_option lässt sich einstellen, ob die Position des 1. Zeichens des Treffers (0), oder des 1. Zeichens nach dem Treffer zurückgeliefert werden soll (1). Der Parameter modes funktioniert bei alllen Regex-Funktionen wie bei REGEXP_LIKE beschrieben. Das folgende Beispiel liefert die Position einer gängigen E-Mail-Adresse in einer Zeichenkette:
<code><pre>
SELECT REGEXP_INSTR('Email: MOS.C6502@quantentunnel.de','[[:alnum:],_\-\.]+@[[:alnum:]]+\.[[:alpha:]]{1,6}')
FROM DUAL;
</pre></code>
<h5>REGEXP_COUNT</h5>
Die Funktion REGEXP_COUNT liefert die Anzahl der Treffer, die mit einem regulären Ausdruck in einer Zeichenkette gefunden werden. Die genaue Syntax ist:
<code><pre>
REGEXP_COUNT
( source
, regexp
, position
, modes )
</pre></code>
Source ist die Zeichenkette, die durchsucht werden soll, regexp enthält den reguläAusdruck, position kennzeichnet die Stelle in der Zeichenkette, an der die Suche starten soll, modes siehe oben. Das folgende Beispiel liefert die Anzahl der Ziffern in einer Zeichenkette:
</code><pre>
SELECT REGEXP_COUNT ('Abc123dEf456', '[0-9]') FROM dual
</pre></code>
<h5>REGEXP_SUBSTR</h5>
Mit Hilfe dieser Funktion lässt sich der gesuchte Teil, der dem regulären Ausdruck entspricht, aus der durchsuchten Zeichenkette heraussuchen. Die genaue Syntax ist:
<code><pre>
REGEXP_SUBSTR
( source
, regexp
, position
, occurrence
, modes )
</pre></code>
Die Parameter entsprechen den gleichlautenden Parametern bei REGEXP_INSTR. Das folgende Beispiel liefert eine im Text enthaltene E-Mail-Adresse zurück:
<code><pre>
SELECT REGEXP_SUBSTR ('Mail: MOS.C6502@quantentunnel.de Mobile: 0178/12345678',
'[A-Z,a-z,0-9]+[A-Z,a-z,0-9,\.]*@[A-Z,a-z,0-9]+\.[A-Z,a-z]{1,4}' )
FROM dual
</pre></code>
<h5>REGEXP_REPLACE</h5>
Mit REGEXP_REPLACE kö nnen die dem regulären Ausdruck entsprechenden Textstellen gezielt ersetzt werden. Die genaue Syntax:
<code><pre>
REGEXP_REPLACE
( source
, regexp
, replacement
, position
, occurrence
, modes )
</pre></code>
Der Parameter replacement kennzeichnet die Zeichenfolge, durch die der in source gefundene Teilstring ersetzt wird. Die anderen Parameter verhalten sich wie bei den anderen Funktionen. Zusätzlich können bis zu 9 Rückbezüge (Backreferences) auf den regulären Ausdruck verwendet werden. So kennzeichnet \1 den ersten gefundenen Ausdruck, \2 den Zweiten. Die Ersetzung findet nur statt, wenn der gesamte reguläre Ausdruck gefunden wird. Die gesuchten Teilstrings müssen im regulären Ausdruck mit runden Klammern gruppiert werden, um mittels Rückbezug adressiert zu werden.
<code><pre>
SELECT regexp_replace('50321,Brühl','([0-9]*),([[:alpha:]]*)', '\1 ist die PLZ von \2')
FROM dual
⇒ Ergebnis: "50321 ist die PLZ von Brühl"
</pre></code>
<h3>Praktischer Nutzen</h3>
Der größte Nutzen für die meisten Datenbankanwendungen düfte in der Validierung von Eingabe- und Importdaten liegen. Durch die Formatprüfung vor oder während eines Imports oder einer Eingabe können Sie verhindern, dass Datenschrott es bis in die Verarbeitung schafft. Wer hat sich nicht schon mal so etwas banales wie eine Funktion gewünscht, die testet, ob ein VARCHAR2-Feld rein numerischen Inhalt hat?
<h3>ORA-01722: invalid number</h3>
Wenn Sie externe Daten in eine Oracle-Datenbank laden oder Nutzereingaben automatisch weiterprozessieren, dann ist der Kontakt mit dieser Fehlermeldung fast unvermeidlich. Das mag auch daran liegen, dass über eine Schnittstelle angelieferte Daten selten der vorangegangenen Beschreibung entsprechen. Die Übertragung eines numerisch erwarteten Inhalts einer Zeichenkette in ein echtes numerisches Feld ist die Stunde der Wahrheit. Auch ein Join mit einer NUMBER-Spalte auf der einen und einer hoffentlich numerischen VARCHAR2-Spalte auf der anderen Seite ist eine solche Sollbruchstelle. Eine Püfung der "numerischen" Zeichenketten auf korrektes Zahlenformat ohne Verwendung regulärer Ausdrücke erfordert eine kreativ geschachtelte Konstruktion aus SQL-Funktionen wie translate(), replace() und instr(), um nur einige zu nennen. Mit regexp_like kein Problem mehr:
<code><pre>
regexp_like(spaltenname,'^[0-9]+$')
</pre></code>
Dieser Ausdruck lässt nur noch die rein numerischen Werte durch. Der reguläre Ausdruck beschreibt eine Zeichenkette, die von Anfang (^) bis Ende ($) aus 1-n (+) numerischen Zeichen (Menge [0-9]) besteht. (s. auch Tabelle 3). Die Verneinung der gesamten Bedingung mit einem vorangestellten NOT liefert genau die Einträge, die nicht nur aus Ziffern bestehen. Die Verneinung des regulären Ausdrucks selbst müsste eine Zeichenkette beschreiben, die wenigstens ein (+) nichtnumerisches Zeichen (Menge [^0-9]) enthält: [^0-9]+. Das ^innerhalb der Klammer verneint die angegebene Zeichenmenge.
Reguläre Ausdrücke sind auch dann sehr hilfreich, wenn Sie nach Zeichenketten suchen, die aus silben- oder lautorientierten Sprachen mit anderen Schriftsystemen stammen, und in unserem Alphabet nur ungenau abgebildet werden können. Um reguläre Ausdrücke leicht zu erstellen, formulieren Sie das gesuchte Muster zuerst als präzise sprachliche Beschreibung, wie oben bei der Postleitzahl: "Eine Zeichenkette, die von Anfang bis Ende aus 5 Ziffern besteht".
Alle gängigen Meiers von Meier bis Mayr finden Sie übrigens mit:
<code><pre>
regexp_like(name,'^M[a,e][i,y]e?r$')
</pre></code>
<h3>Weiterführende Literatur</h3>
<ul>
<li> M. Fitzgerald, 2012: Einstieg in Reguläre Ausdrücke, Verlag O'Reilly</li>
<li> J. Goyvaerts, S. Levithan, 2009: Reguläre Ausdrücke Kochbuch, Verlag O'Reilly</li>
<li> J. E. F. Friedl, 2007: Reguläre Ausdrücke, Verlag O'Reilly</li>
<li><a href="https://docs.oracle.com/en/database/" target=_blank>Oracle-Dokumentation</a></li>
</ul>
<h3>Weiterführende Links</h3>
<ul>
<li><a href="https://www.regular-expressions.info/" target=_blank>Regular-Expressions.info</a></li>
<li><a href="https://regex101.com/" target=_blank>Test-Tool: regex101.com</a></li>
</ul>
<h3>Quelle:</h3>
<a href="https://www.informatik-aktuell.de/betrieb/datenbanken/oracle-regular-expressions.html" target=_blank>Informatik-Aktuell :: Oracle - Reguläre Ausdrücke</a>
</html>
<html>
Die Steuerdatei beinhaltet statische Informationen über den Aufbau der<br />
Datenbank. Dies sind u.a.<br />
<ul>
<li>Name und ID der Datenbank</li>
<li>die Namen aller Redologdateien sowie deren Nummern und Gruppen-ID's</li>
<li>die Namen aller Datendateien</li>
<li>der Status (ONLINE/OFFLINE) der einzelnen Dateien</li>
<li>die Redolog Sequenz Nummer (im ARCHIVELOG Modus)</li>
<li>die Nummer der aktiven Redologdatei</li>
<li>Informationen über die ausgefürten Checkpoints</li>
<li>ARCHIVELOG Status der Datenbank</li>
<li>Backup-Informationen bei Sicherung mittels RMAN</li>
</ul>
Eine intakte Steuerdatei ist zwingende Vorraussetzung f\u00fcr den Betrieb einer\n\
Datenbank und sollte deshalb auch immer mehrfach vorhanden sein. Diese\n\
Spiegelung kann bei der Erzeugung einer Datenbank sehr einfach \u00fcber den\n\
CONTROL_FILES Parameter in der INIT.ORA Datei erreicht werden.\n\
\n\
Beispiel:\n\
\n\
control_files = (/u1/ORCL/ctl2ORCL.ctl, /u2/ORCL/ctl2ORCL.ctl)\n\
\n\
Um im Fehlerfall eine Datenbank wieder rekonstruieren zu k\u00f6nnen, sollten Sie\n\
nach Struktur\u00e4nderungen (z.B. neuer Tablespace oder neue Datei) immer eine Kopie\n\
der aktuellen Steuerdatei erstellen. Sie k\u00f6nnen w\u00e4hrend des laufenden Betriebes\n\
eine bin\u00e4re oder eine les- und editierbare Kopie davon erzeugen.\n\
\n\
Beispiel f\u00fcr eine bin\u00e4re Kopie:\n\
\n\
ALTER DATABASE BACKUP CONTROLFILE TO \x3CDateiname\x3E;\n\
\n\
Beispiel f\u00fcr eine lesbare Kopie - diese wird im Verzeichnis BACKGROUND_DUMP_DEST\n\
angelegt:\n\
\n\
ALTER DATABASE BACKUP CONTROLFILE TO TRACE; \n\
\n\
Data Dictionary Views: V$CONTROLFILE, V$DBFILE, V$LOGFILE\n\
\n\
</html>
<html>
<ul>
<li>Dies ist eine Art "Hilfstabelle", um SQL-Statements wie:<br />
<code>SELECT 1+1 FROM DUAL;</code><br />
ausführen zu können</li><br />
<li>Sie hat nur eine Zeile und hat nur einen Wert X</li>
</ul>
</html>
<html>
<b>Start/stop listener</b><br>
<br>
ORACLE_HOME/bin/lsnrctl start<br>
ORACLE_HOME/bin/lsnrctl status<br>
ORACLE_HOME/bin/lsnrctl stop<br>
<br>
<b>Start/stop database</b><br>
<br>
$ sqlplus /nolog<br>
SQL> connect / as sysdba<br>
Connected to an idle instance.<br>
SQL> startup<br>
ORACLE instance started.<br>
<br>
$ sqlplus /nolog<br>
SQL> connect sys/password@alias as sysdba;<br>
SQL> shutdown immediate<br>
<br>
<b>Start/stop Windows services</b><br>
<br>
C:\> net start OracleServiceDBNAME<br>
C:\> net start OracleOraHome90TNSListener<br>
<br>
C:\> net stop OracleOraHome90TNSListener<br>
C:\> net stop OracleServiceDBNAME<br>
<br>
<b>Client configuration</b><br>
<br>
ORACLE_HOME/network/admin/tnsnames.ora<br>
<br>
netdbname =<br>
(DESCRIPTION =<br>
(ADDRESS_LIST =<br>
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))<br>
)<br>
(CONNECT_DATA = (SERVICE_NAME = dbname))<br>
)<br>
<br>
<b>Connectivity test</b><br>
$ tnsping netdbname<br>
<br>
<b>Export data</b><br>
<br>
Set right NLS_LANG setting first.<br>
<br>
ORACLE_HOME/bin/exp help=y<br>
ORACLE_HOME/bin/exp user/password<br>
ORACLE_HOME/bin/exp user/password file=data20080717.dmp tables=(tablea, tableb)<br>
<br>
Following error message most likely means that there is wrong NLS_LANG setting.<br>
EXP-00091: Exporting questionable statistics.<br>
<br>
<b>Import data</b><br>
<br>
ORACLE_HOME/bin/imp help=y<br>
ORACLE_HOME/bin/imp user/password file=data20080717.dmp full=yes<br>
SQL*Plus<br>
<br>
<b>Connect/disconnect</b><br>
<br>
$ sqlplus username/password@db<br>
<br>
$ sqlplus "username/password@(DESCRIPTION = (ADDRESS_LIST = ( ... ))"<br>
<br>
SQL> conn usename/password@db<br>
SQL> disc<br>
<br>
SQL> exit<br>
<br>
<b>System settings</b><br>
<br>
SQL> set pages 1000<br>
SQL> set lines 120<br>
<br>
SQL> show long<br>
SQL> set long 2000<br>
<br>
<b>Environment variable & NLS settings</b><br>
<br>
NLS_LANG = language_territory.charset<br>
NLS_LANG = finnish_finland.WE8PC850 (Command Prompt)<br>
NLS_LANG = finnish_finland.WE8MSWIN1252<br>
<br>
SQL> HOST ECHO %NLS_LANG% -- win<br>
SQL> HOST ECHO $NLS_LAN -- unix<br>
<br>
SQL> SELECT USERENV('language') FROM DUAL;<br>
<br>
USERENV('LANGUAGE')<br>
----------------------------------------------------<br>
AMERICAN_AMERICA.AL32UTF8<br>
<br>
SQL> SELECT * FROM NLS_SESSION_PARAMETERS;<br>
<br>
C:\>set NLS_LANG=FINNISH_FINLAND.AL32UTF8<br>
<br>
<b>Spool writing</b><br>
<br>
SQL> spool out.txt<br>
<br>
SQL> spool off<br>
<br>
<b>Database user and schema</b><br>
<br>
User data can be viewed from DBA_USERS, ALL_USERS and USER_USERS views.<br>
<br>
create user TEST identified by TESTPWD;<br>
grant connect, resource to TEST;<br>
<br>
alter user TEST identified by NEWPWD;<br>
<br>
User privileges can be viewed from USER_ROLE_PRIVS and USER_SYS_PRIVS. All users from DBA_ views.<br>
<br>
User tablespaces can be viewed from USER_TABLESPACES.<br>
<br>
User's all objects (table, index, view, sequence, trigger, package etc.) can be viewed from USER_OBJECTS.<br>
<br>
<b>Kill session</b><br>
<br>
select sid, serial#, username ,program from v$session;<br>
<br>
alter system kill session 'sid,serial#';<br>
<br>
<b>To force kill, add immediate.</b><br>
BLOB column<br>
<br>
select length(testcolumn) from testtable;<br>
<br>
select utl_raw.cast_to_varchar2(dbms_lob.substr(testcolumn, 2000, 1)) from testtable;<br>
<br>
<b>Epoch time</b><br>
<br>
Current epoch time (Unix time) in seconds<br>
<br>
select (sysdate - to_date('1970-01-01', 'YYYY-MM-DD')) * 24 * 60 * 60 from dual;<br>
<br>
Epoch time in seconds to date string. epoch here is variable.<br>
<br>
select to_char((to_date('1970-01-01', 'YYYY-MM-DD') + :epoch / 24 / 60 / 60), 'YYYY-MM-DD HH24:MI:SS') from dual;<br>
<br>
<b>Variables</b><br>
<br>
Bind variable and use it<br>
<br>
variable val number<br>
exec :val := 1234<br>
select :val from dual;<br>
<br>
<b>DUAL table</b><br>
<br>
Dual is dummy table with one row. It can be used e.g. to select pseudo column sysdate or user.<br>
<br>
select sysdate from dual;<br>
<br>
select user from dual;<br>
<br>
<b>Connection strings</b><br>
<br>
URL:<br>
jdbc:oracle:thin:[<user>/<password>]@<host>[:<port>]/<service><br>
jdbc:oracle:oci:[<user>/<password>]@<host>[:<port>]/<service><br>
<br>
Default port is 1521.<br>
<br>
jdbc/lib/classes12.jar<br>
jdbc/lib/ojdbc14.jar<br>
<br>
oracle.jdbc.OracleDriver<br>
oracle.jdbc.pool.OracleDataSource<br>
<br>
<b>Schedule job</b><br>
<br>
Interval is one hour. Starting from the next hour.<br>
<br>
declare<br>
jobnr number;<br>
begin<br>
dbms_job.submit(<br>
job => jobnr,<br>
what => 'proc_1(1);', <br>
next_date => trunc(sysdate,'HH24') + 1/24,<br>
interval => 'trunc(sysdate,''HH24'') + 1/24');<br>
commit;<br>
end;<br>
/<br>
<br>
(http://teemu.wikidot.com/oracle)
</html>
<html>
<h2>How to Backup Oracle Database using RMAN (with Examples)</h2>
Even if you are not an Oracle DBA, you'll still encounter a situation<br />
where you may have to take a backup of an Oracle database.<br />
<br />
Using Oracle RMAN, you can take a hot backup for your database, which<br />
will take a consistent backup even when your DB is up and running.<br />
<br />
This tutorial gives you an introduction on how to perform Oracle DB backup<br />
using RMAN.<br />
<br />
For the impatient, here is the quick snippet, that takes RMAN backup <br />
of both database and archive logs.<br />
<br />
RMAN> BACKUP AS BACKUPSET DATABASE PLUS ARCHIVELOG;
<h3>1. View Current RMAN Configuration</h3>
Before we take the backup, we have to configure certain RMAN <br />
parameters. For example, how long you want to reatain the RMAN backup, etc.<br />
<br />
Before we modify any configuration, execute the following command <br />
to view all current RMAN configuration settings.<br />
<br />
To connect to RMAN, do the following from command line. This will<br />
take you to RMAN> command prompt, from here you can execute all<br />
RMAN commands.<br />
<br /><code>
$ rman target /<br />
Recovery Manager: Release 10.2.0.3.0 - Production on Sat Aug 10 11:21:29 2013<br />
Copyright (c) 1982, 2005, Oracle. All rights reserved.<br />
connected to target database: DEVDB (DBID=821773)<br />
RMAN><br />
</code><br />
To view current RMAN configurations, execute „show all&ldquo.<br />
<br /><code>
RMAN> SHOW ALL;<br />
using target database control file instead of recovery catalog<br />
RMAN configuration parameters are:<br />
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 2 DAYS;<br />
CONFIGURE BACKUP OPTIMIZATION ON;<br />
CONFIGURE DEFAULT DEVICE TYPE TO DISK;<br />
CONFIGURE CONTROLFILE AUTOBACKUP ON;<br />
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO "/backup/rman/ctl_%F";<br />
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 2;<br />
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;<br />
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1;<br />
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT "/backup/rman/full_%u_%s_%p" MAXPIECESIZE 2048 M;<br />
CONFIGURE MAXSETSIZE TO UNLIMITED;<br />
CONFIGURE ENCRYPTION FOR DATABASE OFF;<br />
CONFIGURE ENCRYPTION ALGORITHM 'AES128';<br />
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;<br />
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/10.2.0/dbs/snapcf_devdb.f'; # default<br />
</code><br />
As you see above, it displays various RMAN parameters and their current values.<br />
<h3>2. Change Few RMAN Configuration Parameters</h3>
Location: One of the important configuration parameters to set will be, where you want to save the RMAN backup. In the following example, I'm settting the RMAN backup loacation as „/backup/rman/“
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backup/rman/full_%u_%s_%p';
Retention Period: Next, you should specify how long you want to retain the backup for. When RMAN takes a backup, it automatically deletes all the old backups that are older than the retention period. In the following example, I/apos;m setting the retention period as 7 days, which will keep the DB backup for a week.
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
Verify that the above two changes are done.
RMAN> SHOW ALL;
..
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backup/rman/full_%u_%s_%p';
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
..
Clear a Parameter: If you want to clear a parameter and set its value to default, use CLEAR at the end of the configuration as shown below.
RMAN> CONFIGURE RETENTION POLICY CLEAR;
In this example, since we cleared the retention policy's value, it was set to the default value, which is 1. So, the retention policy is set to 1 day as shown below.
RMAN> SHOW ALL;
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
<h3>3. Backup Oracle Database</h3>
Make sure the directory mentioned in the CHANNEK DEVICE TYPE DISK FORMAT is created. i.e /backup/rman/
$ mkdir -p /backup/rman
Currently this directory is empty. We'll see what this has after the backup is taken.
$ ls -l /backup/rman
total 0
We can take a backup using image copy or in backup set. It is strongly recommended to use RMAN backup sets to backup the database.
RMAN stores the backup in backup sets, which are nothing but whole bunch of files which contains the backed-up data. Only RMAN understands the format of these files. So, if you backup an Oracle DB using RMAN, only RMAN knows how to read the backup and restore it.
Typically we'll use „BACKUP AS BACKUPSET“ to backup a database. So, to take a full backup of the database without the archive logs, do the following.
RMAN> BACKUP AS BACKUPSET DATABASE
To take a full backup of the database with the archive logs, do the following:
RMAN> BACKUP AS BACKUPSET DATABASE PLUS ARCHIVELOG;
You can also take a backup of only a specific table space. The following example takes backup of only PRD01 tablespace.
RMAN> BACKUP AS BACKUPSET TABLESPACE PRD01;
The RMAN backup output will be something similar to the following:
RMAN> BACKUP AS BACKUPSET DATABASE
Starting backup at 10-AUG-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=193 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=192 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00025 name=/u03/oradata/devdb/devuser07.dbf
input datafile fno=00003 name=/u02/oradata/devdb/temp01.dbf
channel ORA_DISK_1: starting piece 1 at 10-AUG-13
channel ORA_DISK_2: starting full datafile backupset
channel ORA_DISK_2: specifying datafile(s) in backupset
input datafile fno=00008 name=/u03/oradata/devdb/devusers05.dbf
channel ORA_DISK_2: starting piece 1 at 10-AUG-13
...
..
piece handle=/backup/rman/full_4dogpd0u_4237_1 tag=TAG20130808T114846 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 10-AUG-13
...
Starting Control File and SPFILE Autobackup at 10-AUG-13
piece handle=/backup/rman/ctl_c-758818131-20130808-00 comment=NONE
Finished Control File and SPFILE Autobackup at 10-AUG-13
Once the backup is completed, do an ls on the /backup/rman directory, you'll now see RMAN backup files.
$ ls -l /backup/rman
total 14588
-rw-r----- 1 oracle dba 14585856 Aug 8 11:48 ctl_c-758818131-20130808-00
-rw-r----- 1 oracle dba 327680 Aug 8 11:48 full_4dogpd0u_4237_1
Note: Once a backup is taken, to view all available database backups from RMAN, you need to use „list“ command that is shown further down in one of the examples.
While this may be obvious, it is worth repeating again: Since we are taking hotbackup, the Oracle database can be up and running. Make sure your Oracle database is running before you execute any of the above RMAN backup commands.
<h3>4. Assign Backup TAG Name for Quick Identification</h3>
If you are taking lot of backups, it will be easier to assign a tag to a particular backup, which we'll later use during Oracle recovery (or while using list command to view it).
The following example assign a backup tag called „WEEEKLY_PRD01_TBLS_BK_ONLY“ to this particular backup.
RMAN> BACKUP AS BACKUPSET TAG 'WEEEKLY_PRD01_TBLS_BK_ONLY' TABLESPACE PRD01;
Starting backup at 10-AUG-13
using channel ORA_DISK_1
using channel ORA_DISK_2
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00002 name=/u03/oradata/devdb/PRD01_1.dbf
channel ORA_DISK_1: starting piece 1 at 10-AUG-13
channel ORA_DISK_1: finished piece 1 at 10-AUG-13
piece handle=/backup/rman/full_4fogpdb3_4239_1 tag=WEEEKLY_PRD01_TBLS_BK_ONLY comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 10-AUG-13
Starting Control File and SPFILE Autobackup at 10-AUG-13
piece handle=/backup/rman/ctl_c-758818131-20130808-01 comment=NONE
Finished Control File and SPFILE Autobackup at 10-AUG-13
Once the backup is finished, if you view the files from rman directory, you'll not see the tag name here. Tag name is used only from RMAN repositories to view and restore backups. So, now you see there are more files in this directory, as we've taken couple of backups.
$ ls -l /backup/rman/
total 29176
-rw-r----- 1 oracle dba 14585856 Aug 8 11:48 ctl_c-758818131-20130808-00
-rw-r----- 1 oracle dba 14585856 Aug 8 11:54 ctl_c-758818131-20130808-01
-rw-r----- 1 oracle dba 327680 Aug 8 11:48 full_4dogpd0u_4237_1
-rw-r----- 1 oracle dba 327680 Aug 8 11:54 full_4fogpdb3_4239_1
<h3>5. Change Oracle RMAN Backup File Name Format</h3>
If you want the backup files itself will be in a specific format, you need to change the format in the RMAN configuration as shown below. In this example, we've appended the tag „full_devdb_bk_“ prefix to all our backup files.
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT "/backup/rman/full_devdb_bk_%u_%s_%p" MAXPIECESIZE 2048 M;
Now, let us take another backup with this modified configuration.
RMAN> BACKUP AS BACKUPSET TAG 'WEEEKLY_PRD01_TBLS_BK_ONLY' TABLESPACE PRD01;
Now when you view the RMAN files, you'll see the new RMAN backup file has this new file name format for the files. This is easier to identify certain information about the backup just by looking at the file names.
$ ls -l /backup/rman/
total 43764
-rw-r----- 1 oracle dba 14585856 Aug 8 11:48 ctl_c-758818131-20130808-00
-rw-r----- 1 oracle dba 14585856 Aug 8 11:54 ctl_c-758818131-20130808-01
-rw-r----- 1 oracle dba 14585856 Aug 8 11:56 ctl_c-758818131-20130808-02
-rw-r----- 1 oracle dba 327680 Aug 8 11:48 full_4dogpd0u_4237_1
-rw-r----- 1 oracle dba 327680 Aug 8 11:54 full_4fogpdb3_4239_1
-rw-r----- 1 oracle dba 327680 Aug 8 11:55 full_devdb_bk_4hogpdef_4241_1
<h3>6. Compress a RMAN Backup</h3>
If you are taking a backup of a big database, you'll notice that the RMAN backup files are bigger (almost same size as the database itself).
So, for most situation, you should always tak ea compressed backup of the database.
The following example take a compressed backup of the tablepsace PRD01.
RMAN> BACKUP AS COMPRESSED BACKUPSET TAG 'WEEEKLY_PRD01_TBLS_BK_ONLY' TABLESPACE PRD01;
When you view the backup files from the file system level, you will not see any .gz (or .zip, or .bz2) to indicate that the RMAN has taken a compressed backup. The file naming convention will still follow the same as a non-compressed backup.
$ ls -l /backup/rman/
total 58352
-rw-r----- 1 oracle dba 14585856 Aug 8 11:48 ctl_c-758818131-20130808-00
-rw-r----- 1 oracle dba 14585856 Aug 8 11:54 ctl_c-758818131-20130808-01
-rw-r----- 1 oracle dba 14585856 Aug 8 11:56 ctl_c-758818131-20130808-02
-rw-r----- 1 oracle dba 14585856 Aug 8 11:59 ctl_c-758818131-20130808-03
-rw-r----- 1 oracle dba 327680 Aug 8 11:48 full_4dogpd0u_4237_1
-rw-r----- 1 oracle dba 327680 Aug 8 11:54 full_4fogpdb3_4239_1
-rw-r----- 1 oracle dba 327680 Aug 8 11:55 full_devdb_bk_4hogpdef_4241_1
-rw-r----- 1 oracle dba 127680 Aug 8 11:59 full_devdb_bk_4jogpdl0_4243_1
Note: The way to tell whether RMAN has take a compressed backup or not, it by looking at the size, and by looking at the output of the RMAN „list“ command which is shown in one of the section below.
<h3>7. View all RMAN Backups</h3>
To view all the RMAN backups, execute „list backup summary“ as shown below.
RMAN> LIST BACKUP SUMMARY;
using target database control file instead of recovery catalog
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
..
4215 B F A DISK 10-AUG-13 1 1 NO TAG20130808T114846
4216 B F A DISK 10-AUG-13 1 1 NO TAG20130808T114849
4217 B F A DISK 10-AUG-13 1 1 NO WEEEKLY_PRD01_TBLS_BK_ONLY
4218 B F A DISK 10-AUG-13 1 1 NO TAG20130808T115413
4219 B F A DISK 10-AUG-13 1 1 NO WEEEKLY_PRD01_TBLS_BK_ONLY
4220 B F A DISK 10-AUG-13 1 1 NO TAG20130808T115600
4221 B F A DISK 10-AUG-13 1 1 YES WEEEKLY_PRD01_TBLS_BK_ONLY
As you see above, it displays various information about the backups. In the above output, it show 7 RMAN backups. The last column shows the „Tag“ that we specified when we took a backup. If we didn't specify any TAG, RMAN creates a default tag with the prefix „TAG“ followed by some numbers. You can also see that under the column „Compressed“, the last RMAN backup shows „YES“, which indicates that out of all the 7 RMAN backups, only the last one was compressed.
Also, when the RMAN backup is running, if you want to see the proress, you can query the V$RMAN_STATUS table from sql*plus as shown below.
SQL> SELECT OPERATION, STATUS, MBYTES_PROCESSED, START_TIME, END_TIME from V$RMAN_STATUS;
OPERATION STATUS MBYTES_PROCESSED START_TIM END_TIME
--------------------------------- ----------------------- ---------------- --------- ---------
CONTROL FILE AND SPFILE AUTOBACK COMPLETED 14 07-NOV-12 07-NOV-12
RMAN COMPLETED 0 07-NOV-12 07-NOV-12
RESTORE VALIDATE COMPLETED 0 07-NOV-12 07-NOV-12
RMAN COMPLETED WITH ERRORS 0 07-NOV-12 07-NOV-12
DELETE COMPLETED 0 08-NOV-12 08-NOV-12
BACKUP COMPLETED 0 10-AUG-13 10-AUG-13
CONTROL FILE AND SPFILE AUTOBACK COMPLETED 14 10-AUG-13 10-AUG-13
RMAN COMPLETED WITH ERRORS 1832 10-AUG-13 10-AUG-13
RMAN COMPLETED 0 10-AUG-13 10-AUG-13
...
There you have it!. That is how you take an Oracle RMAN backup and sleep peacefully.
<br />
<b>Link:</b><br />
http://www.thegeekstuff.com/2013/08/oracle-rman-backup/
</html>
<html>
<h2>Oracle Database Startup and Shutdown Procedure</h2>
For a DBA, starting up and shutting down of oracle database <br />
is a routine and basic operation. Sometimes Linux administrator <br />
or programmer may end-up doing some basic DBA operations <br />
on development database. So, it is important for non-DBAs to<br />
understand some basic database administration activities.<br />
<img src="./pictures/Oracle-Start-Shutdown.jpg" height=377 width=409 /> <!-- height=754 width=818 -->
<h3>How To Startup Oracle Database</h3>
<h4>1. Login to the system with oracle username</h4>
Typical oracle installation will have oracle as username and <br />
dba as group. On Linux, do su to oracle as shown below.<br />
<br />
<code>
$ su - oracle<br />
</code>
<h4>2. Connect to oracle sysdba</h4>
Make sure ORACLE_SID and ORACLE_HOME are set properly<br />
as shown below.<br />
<br />
<code>
$ env | grep ORA<br />
ORACLE_SID=DEVDB<br />
ORACLE_HOME=/u01/app/oracle/product/10.2.0<br />
</code>
<br />
You can connect using either ''/ as sysdba'' or an oracle <br />
account that has DBA privilege.<br />
<br />
<code>
$ sqlplus '/ as sysdba'<br />
SQL*Plus: Release 10.2.0.3.0 - Production on Sun Jan 18 11:11:28 2009<br />
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.<br />
<br />
Connected to:<br />
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production<br />
With the Partitioning and Data Mining options<br />
SQL><br />
</code>
<br />
<h4>3. Start Oracle Database</h4>
The default SPFILE (server parameter file) is located under <br />
$ORACLE_HOME/dbs. Oracle will use this SPFILE during <br />
startup, if you don't specify PFILE.<br />
<br />
Oracle will look for the parameter file in the following order <br />
under $ORACLE_HOME/dbs. If any one of them exist, it will<br />
use that particular parameter file.<br />
<ul>
<li>spfile$ORACLE_SID.ora</li>
<li>spfile.ora</li>
<li>init$ORACLE_SID.ora</li>
</ul>
Type ''startup'' at the SQL command prompt to startup the <br />
database as shown below.<br />
<br />
<code>
SQL> startup<br />
ORACLE instance started.<br />
<br />
Total System Global Area 812529152 bytes<br />
Fixed Size 2264280 bytes<br />
Variable Size 960781800 bytes<br />
Database Buffers 54654432 bytes<br />
Redo Buffers 3498640 bytes<br />
Database mounted.<br />
Database opened.<br />
SQL><br />
</code>
<br />
If you want to startup Oracle with PFILE, pass it as a <br />
parameter as shown below.<br />
<br />
<code>
SQL> STARTUP PFILE=/u01/app/oracle/product/10.2.0/dbs/init.ora<br />
</code>
<br />
<h3>How To Shutdown Oracle Database</h3>
<h4>1. Normal Shutdown</h4>
During normal shutdown, before the oracle database is <br />
shut down, oracle will wait for all active users to disconnect<br />
their sessions. As the parameter name (normal) suggest, <br />
use this option to shutdown the database under normal <br />
conditions.<br />
<br />
<code>
SQL> shutdown<br />
Database closed.<br />
Database dismounted.<br />
ORACLE instance shut down.<br />
SQL><br />
</code>
<h4>2. Shutdown Immediate</h4>
During immediate shutdown, before the oracle database is <br />
shut down, oracle will rollback active transaction and dis-<br />
connect all active users. Use this option when there is a <br />
problem with your database and you don't have enough time <br />
to request users to log-off.<br />
<br />
<code>
SQL> shutdown immediate;<br />
Database closed.<br />
Database dismounted.<br />
ORACLE instance shut down.<br />
SQL><br />
</code>
<h4>3. Shutdown Abort</h4>
During shutdown abort, before the oracle database is shut-<br />
down, all user sessions will be terminated immediately. Un-<br />
comitted transactions will not be rolled back. Use this <br />
option only during emergency situations when the ''shutdown''<br />
and ''shutdown immediate'' doesn't work.<br />
<br />
<code>
$ sqlplus '/ as sysdba'<br />
SQL*Plus: Release 10.2.0.3.0 - Production on Sun Jan 18 11:11:33 2009<br />
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.<br />
Connected to an idle instance.<br />
<br />
SQL> shutdown abort<br />
ORACLE instance shut down.<br />
SQL><br />
</code>
<br />
<h3>Links:</h3>
<ul>
<li><a href="http://www.thegeekstuff.com/2009/01/oracle-database-startup-and-shutdown-procedure/" target="_blank" rel="noreferrer noopener">The Geek Stuff :: Oracle ‐ Startup & Shutdown procedure</a></li>
</ul>
</html>
<html>
<h2>15 Oracle Tablespace and Datafile Command Examples</h2>
Even if you are a developer, or Linux sysadmin, sometimes you might <br />
still end-up dealing with Oracle database in your organization.<br />
<br />
One of the essential Oracle DBA task is to manage the tablespace.<br />
<br />
This tutorial covers everything that you need to know to effectively <br />
manage both your tablespaces and datafiles in an Oracle database.<br />
<br />
<h3>1. Create Tablespace Basic Example</h3>
The following command will create a new tablespace called <br />
„thegeekstuff“ with /u02/oradata/tgs/thegeekstuff01.dbf as <br />
the datafile. The initial size of the datafile will be 100M.<br />
<br />
<code>
CREATE TABLESPACE thegeekstuff
DATAFILE '/u02/oradata/tgs/thegeekstuff01.dbf'
SIZE 100M;
</code>
<br />
Note: It is recommended that you keep the name of your datafile <br />
the same as the tablespace name. Since this is the first datafile <br />
in this table, it is called as thegeekstuff01.dbf. When you add a <br />
2nd file to this tablespace, call that as thegeekstuff02.dbf, etc.<br />
<br />
<h3>2. Create Tablespace with Extra Parameters</h3>
The following command will create a new tablespace but this <br />
specifies some additional storage related parameters.<br />
<br />
<code>
CREATE TABLESPACE thegeekstuff
DATAFILE '/u02/oradata/tgs/thegeekstuff01.dbf'
SIZE 100M REUSE
AUTOEXTEND ON
NEXT 1M MAXSIZE 2G;
</code>
<br />
In the above command:<br />
<br />
Datafile – The above creates thegeekstuff tablespace with thegeekstuff01.dbf as the datafile.<br />
Size 100M –The initial size of this dbf file will be 100M.<br />
AUTOEXTEND ON NEXT 1M – When it runs out of space, it will automatically extend this dbf file by 1M whenever required.<br />
MAXSIZE 2G – This will keep extending the size of this particular dbf file until it reaches 2GB.<br />
<br />
<h3>3. Add New Datafile to Increase the Size of a Tablespace</h3>
After a tablespace is created, you can also add more datafile using ALTER TABLESPACE command as shown below.
<code>
ALTER TABLESPACE thegeekstuff
ADD DATAFILE '/u02/oradata/tgs/thegeekstuff02.dbf'
SIZE 100M;
</code>
The above command will add a 2nd datafile called thegeekstuff02.dbf to the existing thegeekstuff tablespace. The initial size of this tablespace will be 100M.
<br />
Some of the commands explained here can be modified slightly modified to work with other types oracle tablespace like undo tablespace, temp tablespace, system tablespace, etc.
<h3>4. Add New Datafile with Extra Parameters</h3>
You can enable or disable automatic file extension for existing datafiles, or manually resize a datafile, using the ALTER DATABASE statement. For a bigfile tablespace, you are able to perform these operations using the ALTER TABLESPACE statement.
<br />
The following example enables automatic extension for a datafile added to the users tablespace. The value of NEXT is the minimum size of the increments added to the file when it extends. The value of MAXSIZE is the maximum size to which the file can automatically extend.
<br />
The following command will add a new datafile to an existing tablespace with some additional storage related parameters.
<code>
ALTER TABLESPACE thegeekstuff
ADD DATAFILE '/u02/oradata/tgs/thegeekstuff02.dbf'
SIZE 100M
AUTOEXTEND ON
NEXT 512K
MAXSIZE 2G;
</code>
In the above:<br />
<br />
ADD DATAFILE – thegeekstuff02.dbf file will be added to the existing tablespace<br />
SIZE 100M – Initial size of this datafile will be 100M<br />
AUTOEXTEND ON – The automatic extension for this datafile is enabled. This will keep extending this datafile whenever space is required.<br />
NEXT 512K – When it runs out of space, this will extend the size by 512K<br />
MAXSIZE 2G – thegeekstuff02.dbf file will keep growing upto maximum of 2GB in size.<br />
<h3>5. Increase Size of an Existing Datafile</h3>
When you don't have the autoextend on, you can also increase the size of a particular datafile as shown below.
<code>
ALTER DATABASE
DATAFILE '/u02/oradata/tgs/thegeekstuff01.dbf'
RESIZE 200M;
</code>
The above command will resize thegeekstuff01.dbf file to 200MB.
<br />
If the dbf file is currently only 100MB in size, then the above command will increase the size.
<br />
If the dbf file is currently 500MB (or anything more than 200MB), then the above command will decrease the size if possible. It will decrease the size of the dbf file only if the existing content is less than 200MB.
<h3>6. View Tablespace and datafile Information</h3>
You can view all the tablespace in your system from the dba_tablespace as shown below.
<code>
SELECT * from DBA_TABLESPACES;
</code>
To view all the datafiles of a particular tablespace, execute the following command.
<br />
This command will display all the datafiles that as currently associated with thegeekstuff tablespace. This will also display the size of the datafiles in MB.
column file_name format A50;
<code>
SELECT file_id, file_name, bytes/1024/1024 size_mb
FROM dba_data_files
WHERE tablespace_name = 'THEGEEKSTUFF';
</code>
The following is the output:
<br />
FILE_ID FILE_NAME SIZE_MB
------- ------------------------------------- -------
4 /u02/oradata/tgs/thegeekstuff01.dbf 200
5 /u02/oradata/tgs/thegeekstuff02.dbf 100
<br />
Also, you'll see these two dbf files physically on your filesystem as shown below:
<br />
$ ls -l /u02/oradata/tgs/*
-rw-r----- 1 oracle dba 209719296 Oct 15 11:43 /u02/oradata/tgs/thegeekstuff01.dbf
-rw-r----- 1 oracle dba 104861696 Oct 15 11:39 /u02/oradata/tgs/thegeekstuff02.dbf
<br />
Both the dba_tablespaces and dba_data_files have lot of additional columns that can give you more useful information about your tablespace and datafiles
<br />
DESC dba_tablespaces;
DESC dba_data_files;
<h3>7. Tablespace Extent Management</h3>
The following are two methods that tablespace uses to manage their extents. Extents are nothing but the unit in which a tablespace allocates space.
<br />
Locally managed Tablespaces – In this method, extents are automatically managed by the tablespace itself.
Dictionary managed tablespace – In this method, extents are managed by the data dictionary.
<br />
In the latest version of oracle, when you create a tablespace, by default, it will use locally managed tablespace, which is highly recommended. Don't use dictionary managed, unless you know what you are doing.
<br />
Use the following query to identify whether your tablespace is using dictionary or locally managed.
<br />
SELECT extent_management, segment_space_management
FROM dba_tablespaces
WHERE tablespace_name = 'THEGEEKSTUFF'
<br />
The following is the output:
<br />
EXTENT_MAN SEGMEN
---------- ------
LOCAL AUTO
<br />
As you see above, in this example, thegeekstuff tablespace is using locally managed tablespace for extent management.
<br />
In the older version of Oracle, by default it might create a tablespace in dictionary managed. In that case, if you want to specify the extent management during the tablespace create command, you can use „EXTENT MANAGEMENT LOCAL“ in the create tablespace command as shown below.
<br />
CREATE TABLESPACE thegeekstuff
DATAFILE '/u02/oradata/tgs/thegeekstuff01.dbf'
SIZE 100M
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO;
<br />
Note: The Segment space management can either be AUTO or MANUAL. AUTO is the recommended method.
<br />
You can also specify uniform size for locally managed tablespace as shown below. The following will create thegeekstuff tablespace with locally managed tablespace with a uniform extent size of 128k.
<br />
CREATE TABLESPACE thegeekstuff
DATAFILE '/u02/oradata/tgs/thegeekstuff01.dbf'
SIZE 100M
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K;
<br />
Note: You can see this in the ALLOCATION_TYPE column on dba_tablespaces. The value can be either UNIFORM or SYSTEM (which is default)
<br />
Note: Typically you don't have to worry about specifying any of these extra options. Just create the tablespace with default option, and let the database do the locally managed tablespace with all default values.
<h3>8. Calculate the Size of Tablespace (Both Total Space and Free Space Available)</h3>
The following command will display the total space used, and the free space available in your tablespace.
<br />
select
a.tablespace_name,
sum(a.bytes)/(1024*1024) total_space_MB,
round(b.free,2) Free_space_MB,
round(b.free/(sum(a.bytes)/(1024*1024))* 100,2) percent_free
from dba_data_files a,
(select tablespace_name,sum(bytes)/(1024*1024) free from dba_free_space
group by tablespace_name) b
where a.tablespace_name = b.tablespace_name(+)
group by a.tablespace_name,b.free
<br />
The following output indicates that this particular tablespace still have 34% of free space (i.e around 867MB free space is available for new data)
<br />
TABLESPACE_NAME TOTAL_SPACE_MB FREE_SPACE_MB PERCENT_FREE
--------------- -------------- ------------- ------------
THEGEEKSTUFF 2547 867.69 34.07
<h3>9. Bigfile Tablespace Management</h3>
Typically you can add as many datafiles you want to a specific tablespace.
<br />
But, in a bigfile tablespace will have only one datafile.
<br />
An oracle bigfile tablespace will allow you to create a tablespace with a single datafile that can grow really large.
<br />
The advantage is that you don't have to worry about managing datafiles, you'll simply manage the bigfile tablespace.
<br />
Use create bigfile tablespace command as shown below to create a bigfile tablespace.
<br />
CREATE BIGFILE TABLESPACE thegeekstuffbig
DATAFILE '/u02/oradata/tgs/thegeekstuffbig.dbf'
SIZE 50G;
<br />
In the above example, there will be only one datafile called thegeekstuffbig.dbf, with initial size of 50GB.
<br />
For size, you can also specify K (for kilobytes), or M (for megabytes), or G (for gigabytes), or T (for terabytes).
<br />
The following query will display whether a particular tablespace is a bigfile tablespace or not.
<br />
SELECT tablespace_name, bigfile FROM dba_tablespaces;
<br />
The following is the output:
<br />
TABLESPACE_NAME BIG
---------------- ---
THEGEEKSTUFF NO
THEGEEKSTUFFBIG YES
<br />
Later if you want to extent the size of the bigfile tablespace even further, all you have to do is, use alter tablespace command as shown below. This will resize the single datafile thegeekstuffbig.dbf from 50G to 100G
<br />
ALTER TABLESPACE thegeekstuffbig RESIZE 100G;
<br />
You can also use the autoextend on and specify the next next as shown below. This will automatically extent that single datafile by 10G whenever more space is required.
<br />
ALTER TABLESPACE thegeekstuff AUTOEXTEND ON NEXT 10G;
<br />
While this is obvious, it is worth mentioning, you cannot add more datafile to the bigfile tablespace. It will display the following error message.
<br />
ALTER TABLESPACE thegeekstuffbig
ADD DATAFILE '/u02/oradata/tgs/thegeekstuffbig02.dbf'
SIZE 50G;
<br />
The following is the output:
<br />
ERROR at line 1:
ORA-32771: cannot add file to bigfile tablespace
<br />
If the default tablespace type was set to BIGFILE at database creation, but you want to create a traditional (smallfile) tablespace, then specify a CREATE SMALLFILE TABLESPACE statement to override the default tablespace type for the tablespace that you are creating.
<br />
You can also set the default tablespace type in your database to BIGFILE, in which case, you can simply use „CREATE TABLESPACE“ command instead of „CREATE BIGFILE TABLESPACE“.
<br />
In that case (when your default tablespace type is BIGFILE), and if you want to create the traditional tablespace, when you have to use „CREATE SMALLFILE TABLESPACE“ as shown below.
<br />
CREATE SMALLFILE TABLESPACE thegeekstuff
DATAFILE '/u02/oradata/tgs/thegeekstuff01.dbf'
SIZE 100M;
<h3>10. Rename Tablespace</h3>
Using the RENAME TO clause of the ALTER TABLESPACE, you can rename a permanent or temporary tablespace. For example, the following statement renames the users tablespace:
<br />
You can change the name of an existing tablespace using alter tablespace command as shown below.
<br />
This will change the tablespace name from thegeekstuff to tgs.
<br />
ALTER TABLESPACE thegeekstuff RENAME TO TGS;
<br />
Now, the tablespce is renamed:
<br />
TABLESPACE_NAME STATUS
--------------- ------
TGS ONLINE
<br />
Just like renaming a regular tablespace, you an also rename SYSTEM tablespace, or SYSAUX tablespace, or temporary tablespace, or an undo tablespace.
<h3>11. Drop Tablespace</h3>
To drop a tablespace, you should have DROP TABLESPACE privilege.
<br />
The following command will drop (delete) thegeekstuff tablespace.
<br />
DROP TABLESPACE thegeekstuff;
<br />
Keep in mind that the above command will work only if the tablespace that is getting deleted is empty. If the tablespace has something, it will thrown the following error message.
<br />
SQL> DROP TABLESPACE thegeekstuff;
<br />
The following is the error message:
<br />
ERROR at line 1:
ORA-01549: tablespace not empty, use INCLUDING CONTENTS option
<br />
So, if you want to drop the tablespace along with all the objects (tables, indexes, etc) in it, then use the following DROP command with „INCLUDING CONTENTS“.
<br />
SQL> DROP TABLESPACE thegeekstuff INCLUDING CONTENTS;
Tablespace dropped.
<br />
When you drop a tablespace, the datafiles will still be there. You have to remove them manually using rm command from the command line.
<br />
$ ls -l /u02/oradata/tgs/
-rw-r----- 1 oracle dba 209719296 Oct 12 13:02 thegeekstuff01.dbf
-rw-r----- 1 oracle dba 104861696 Oct 12 13:02 thegeekstuff02.dbf
<br />
Or, the following command will drop the tablespace along with all the objects AND will automatically remove the associated datafiles form the operating system.
<br />
DROP TABLESPACE thegeekstuff
INCLUDING CONTENTS AND DATAFILES;
<br />
Warning: Needless to say, be extra careful with drop tablespace command. You don't want to use the „INCLUDING“ clause unless you are absolutely sure that you don't want anything from that particular tablespace.
<h3>12. Drop a Specific datafaile from a Tablespace</h3>
Instead of deleting the whole tablespace, you also have the option of deleting a specific datafile using the drop datafile as shown below.
<br />
This command will drop thegeekstuff02.dbf file (both from the tablespace and from the operating system level).
<br />
ALTER TABLESPACE thegeekstuff
DROP DATAFILE '/u02/oradata/tgs/thegeekstuff02.dbf';
<br />
The above command will thrown an error message, if that particular datafile has any data in it.
<h3>13. Bring Tablespace Online or Offline</h3>
The following will make thegeekstuff tablespace unavailable for all the users. Every other tablespace in the database will be operational except this one. When successful, you'll get „Tablespace altered.“ message.
<br />
ALTER TABLESPACE thegeekstuff OFFLINE;
<br />
The status for this tablespace will now be OFFLINE as shown below.
<br />
TABLESPACE_NAME STATUS
--------------- ---------
THEGEEKSTUFF OFFLINE
<br />
Sometimes this is helpful when you want to just backup a tablespace using rman command.
<br />
Note: when you don't specify a clause, it will use the normal offline mode. The following command is same as the above command.
<br />
ALTER TABLESPACE users OFFLINE NORMAL;
<br />
The following are three offline modes for tablespace:
<br />
NORMAL – This is the default. This will take the tablespace offline only when none of the datafile has any errors associated with it.
TEMPORARY – This will take the tablespace offline even if there are any errors associated with any of the datafiles for this tablespace.
IMMEDIATE – This will take the tablespace offline immediately even when there are errors, and even without anything any checkpoint of the datafiles. Don't use this unless you know exactly what you are doing.
<br />
To bring a tablespace back online, execute the following command.
<br />
ALTER TABLESPACE thegeekstuff ONLINE;
<br />
Similar to taking the whole database offline, you can also take a specific datafile offline and later bring it back online as shown below.
<br />
ALTER DATABASE DATAFILE '/u02/oradata/tgs/thegeekstuff02.dbf' offline;
<br />
ALTER DATABASE DATAFILE '/u02/oradata/tgs/thegeekstuff02.dbf' online;
<h3>14. Set a Tablespace as Read-Only Temporarily</h3>
All tablespaces are initially created as read/write. Use the READ ONLY clause in the ALTER TABLESPACE statement to change a tablespace to read-only. You must have the ALTER TABLESPACE or MANAGE TABLESPACE system privilege.
<br />
By default, you can both read and write to a tablespace. This means that you can create any new objects (tables, etc) on the tablespace, insert data to it, and also select from the table, etc.
<br />
But, you can also make an existing tablespace read only. This means that you cannot create new object, or insert/delete/update/etc on the existing object. The only thing you can do is read the data.
<br />
The following will put thegeekstuff tablespace in read only mode.
<br />
ALTER TABLESPACE THEGEEKSTUFF READ ONLY;
<br />
Now, the status of this tablespace will be read only as shown below.
<br />
TABLESPACE_NAME STATUS
--------------- ---------
THEGEEKSTUFF READ ONLY
<br />
The following command will put the database back to the regular read write mode.
<br />
ALTER TABLESPACE THEGEEKSTUFF READ WRITE;
<br />
Note: When it is in read/write mode, the status will simply say „ONLINE“.
<br />
TABLESPACE_NAME STATUS
--------------- ---------
THEGEEKSTUFF ONLINE
<h3>15. Rename or Move Datafile to a Different Folder</h3>
Use the rename datafile as shown below, to simply rename a particular data file.
<br />
In this example, we are simply rename the file from thegeekstuff02.dbf to tgs02.dbf
<br />
ALTER TABLESPACE thegeekstuff
RENAME DATAFILE '/u02/oradata/tgs/thegeekstuff02.dbf'
TO '/u02/oradata/tgs/tgs02.dbf';
<br />
Note: If the file is currently in use, you'll get the following error message:
<br />
ORA-01525: error in renaming data files
ORA-01121: cannot rename database file 35 - file is in use or recovery
ORA-01110: data file 35: '/u02/oradata/tgs/thegeekstuff02.dbf'
<br />
If you want to physically move the location of the datafile from one folder to another folder, do the following:
<br />
First, take the tablespace offline as shown below:
<br />
ALTER TABLESPACE thegeekstuff OFFLINE NORMAL;
<br />
Next, copy the files to the new location manually at the operating system level:
<br />
cp /u02/oradata/tgs/thegeekstuff02.dbf /u03/oradata/tgs/thegeekstuff02.dbf
<br />
Finally, execute the rename datafile command with the new location in the „TO“ as shown below.
<br />
In this example, the file is getting moved from u02 to u03 mount point.
<br />
ALTER TABLESPACE thegeekstuff
RENAME DATAFILE '/u02/oradata/tgs/thegeekstuff02.dbf'
TO '/u03/oradata/tgs/thegeekstuff02.dbf';
<br />
<b>Link:</b><br />
http://www.thegeekstuff.com/2016/10/oracle-tablespace-datafile/
</html>
<html>
<h2>10 Oracle UNDO Tablespace Management Examples</h2>
If you have Oracle database running on your environment, even <br />
if you are a developer or linux sysadmin, you might end-up doing<br />
some basic DBA tasks on development instance.<br />
<br />
One of the essential DBA task is to manage UNDO on your Oracle database.<br />
<br />
Oracle will temporarily store the data manipulation transactions <br />
in the UNDO area until those transactions are permanently committed.<br />
<br />
In Oracle DB, UNDO are used for various purpose including the following:<br />
<ul>
<li> Rollback a particular transaction</li>
<li> Recover database from crash</li>
<li> Provide read consistency</li>
<li> For Flashback feature in Oracle DB</li>
<li> etc.</li>
</ul>
<h3>1. View all UNDO Tablespace</h3>
To view all UNDO tablespaces that are on your system, execute <br />
the following command:<br />
<br />
<code>
SQL> select tablespace_name, contents from dba_tablespaces where contents = 'UNDO'<br />
<br />
TABLESPACE_NAME CONTENTS<br />
----------------- ---------<br />
UNDOTBS UNDO<br />
UNDOTBS1 UNDO<br />
</code>
<br />
In the above example, we have two UNDO tablespace listed. <br />
But only one of them can be active and used by the system. <br />
The other one is currently not used.<br />
<br />
So, the best way to view the current valid UNDO tablespace <br />
is by using ''show parameter'' as shown below.<br />
<br />
<code>
SQL> show parameter undo_tablespace<br />
<br />
NAME TYPE VALUE<br />
----------------- --------------<br />
undo_tablespace string UNDOTBS<br />
</code>
<br />
From the above output, look for undo_tablespace. In this <br />
example, the current undo tablespace used by the oracle <br />
database is UNDOTBS.<br />
<br />
Execute the following command to view all the datafiles <br />
that are currently used by the UNDOTBS tablespace.<br />
<br />
<code>
SQL> select substr(file_name,1,60) from dba_data_files where tablespace_name = 'UNDOTBS' order by 1;<br />
<br />
SUBSTR(FILE_NAME,1,60)<br />
--------------------------------<br />
/u01/oradata/devdb/undotbs_01.dbf<br />
/u01/oradata/devdb/undotbs_02.dbf<br />
/u01/oradata/devdb/undotbs_03.dbf<br />
</code>
<br />
As we see from this output, this tablespace has only one <br />
datafile for the undo tablespace.<br />
<h3>2. View UNDO Total Space and Available Free Space</h3>
The following command will give you the total space used, and <br />
the free space still available in the undo tablespace.<br />
<br />
<code>
select<br />
a.tablespace_name,<br />
sum(a.bytes)/(1024*1024) total_space_MB,<br />
round(b.free,2) Free_space_MB,<br />
round(b.free/(sum(a.bytes)/(1024*1024))* 100,2) percent_free<br />
from dba_data_files a,<br />
(select tablespace_name,sum(bytes)/(1024*1024) free from dba_free_space<br />
group by tablespace_name) b<br />
where a.tablespace_name = b.tablespace_name(+)<br />
group by a.tablespace_name,b.free<br />
</code><br />
Output:<br />
<br /><code>
TABLESPACE_NAME TOTAL_SPACE_MB FREE_SPACE_MB PERCENT_FREE<br />
---------------- -------------- ------------- ------------<br />
UNDOTBS 2047 1809.44 88.39<br />
</code>
<br />
The above command will display all the tablespace available in <br />
your system. Just look for your undo tablespace from the list. <br />
The value displayed are in MB. The last column PERCENT_FREE <br />
displays the total percentage of free space available currently <br />
in UNDO tablespace.<br />
<h3>3. Create New UNDO Tablespace</h3>
Creating an UNDO tablespace is similar to creating a regular tablespace.<br />
<br />
The following example creates a new UNDO tablespace called UNDOTBS1.<br />
<br />
<code>
CREATE UNDO TABLESPACE UNDOTBS1<br />
DATAFILE '/u01/oradata/devdb/undotbs1_01.dbf' <br />
SIZE 1024M AUTOEXTEND ON NEXT 100M MAXSIZE 2048M;<br />
</code>
<br />
In the above example:<br />
<ul>
<li><b>/u01/oradata/devdb/undotbs1_01.dbf</b> is the datafile that will be created and used by the UNDOTBS1 tablespace</li>
<li>The datafile will be created with initial <b>SIZE</b> of 1024M (1GB)</li>
<li><b>Autoextend</b> is set to ON. This means that when the tablespace size goes beyond the initial size of 1024M, it will increase the size of the datafile automatically.</li>
<li><b>NEXT 100M</b> indicates that the datafile will be extended in 100MB increments.</li>
<li><b>MAXSIZE 2047M</b> indicates that the maximum size the datafile can grow will be 2048MB (2GB)</li>
</ul>
<h3>4. Swap UNDO Tablespace</h3>
After we created the above new tablespace for UNDO, we need to <br />
set this as the active UNDO tablespace.<br />
<br />
As we see from this output, the current UNDO tablespace is UNDOTBS<br />
<br />
<code>
SQL> show parameter undo_tablespace;<br />
<br />
NAME TYPE VALUE<br />
---------------- ----------- --------<br />
undo_tablespace string UNDOTBS<br />
</code>
<br />
To swap the UNDO tablespace, use the alter system set undo_tablespace<br />
as shown below.<br />
<br />
This will set the current UNDO tablespace as UNDOTBS1 (The new table-<br />
space that we created above):<br />
<br />
<code>
ALTER SYSTEM SET UNDO_TABLESPACE = UNDOTBS1;<br />
</code>
<br />
Verify that the UNDO tablespace is set properly.<br />
<br />
<code>
SQL> show parameter undo_tablespace;<br />
NAME TYPE VALUE<br />
---------------- ----------- --------<br />
undo_tablespace string UNDOTBS<br />
</code>
<h3>5. Drop Unused UNDO Tablespace</h3>
In the above example, since we made UNDOTBS1 as new UNDO <br />
tablespace, we can go-ahead and delete the old UNDOTBS tablespace.<br />
<br />
Deleting an unused oracle UNDO tablespace is similar to dropping<br />
any other tablespace. If you have multiple datafiles associated with <br />
an UNDO tablespace, delete those first.<br />
<br />
First, get a list of all the datafile for your UNDO tablespace.<br />
<br />
<code>
select file_name from dba_data_files where tablespace_name = 'UNDOTBS';<br />
</code>
<br />
Next, drop those data files one by one using alter tablespace drop <br />
datafile command as shown below.<br />
<br />
<code>
ALTER TABLESPACE UNDOTBS DROP DATAFILE '/u01/oradata/devdb/undotbs_02.dbf';<br />
<br />
ALTER TABLESPACE UNDOTBS DROP DATAFILE '/u01/oradata/devdb/undotbs_03.dbf';<br />
</code>
<br />
Please note that you cannot drop the 1st datafile that was used <br />
while creating the tablespace. In this example, you can't use drop <br />
datafile for undotbs_01.dbf<br />
<br />
Now, drop the UNDO tablespace.<br />
<br />
<code>
DROP TABLESPACE UNDOTBS;<br />
</code>
<br />
Finally, delete the 1st datafile that was associated with the<br />
UNDOTBS manually from the filesystem.<br />
<br />
<code>
rm /u01/oradata/devdb/undotbs_01.dbf<br />
</code>
<h3>6. Display UNDO Tablespace Activities and Statistics</h3>
When your database is performing some heavy activities that require<br />
UNDO, you can see the status of the current UNDO activities from the <br />
dba_undo_extents table as shown below.<br />
<br />
The following command will display the current UNDO activities in <br />
the system.<br />
<br />
<code>
select count(segment_name),sum(bytes/1024/1024),status from dba_undo_extents group by status;<br />
</code>
<br />
Output:<br />
<code>
COUNT(SEGMENT_NAME) SUM(BYTES/1024/1024) STATUS<br />
------------------- -------------------- ---------<br />
18 1.125 UNEXPIRED<br />
4 .25 EXPIRED<br />
293 2045.5625 ACTIVE<br />
</code>
<br />
In the above:<br />
<br />
<code>
There are lot of ACTIVE undo blocks indicating that there are some heavy UNDO activities currently happening.<br />
Also, there is not much of UNEXPIRED or EXPIRED UNDO blocks.<br />
</code>
<br />
On this particular system, after the heavy UNDO activity in the <br />
system has reduced, you'll see something similar to the following:<br />
<br />
<code>
COUNT(SEGMENT_NAME) SUM(BYTES/1024/1024) STATUS<br />
------------------- -------------------- ---------<br />
478 2046.6875 UNEXPIRED<br />
4 .25 EXPIRED<br />
</code>
<br />
In the above:<br />
<br />
<code>
There is no ACTIVE undo blocks anymore. So, no UNDO activities currently happening.<br />
Also, we see a heavy UNEXPIRED blocks which are from the previous UNDO activities.<br />
These UNEXPIRED undo blocks will automatically become EXPIRED based on the undo retention that you've set on your system.<br />
</code>
<br />
Note: If you don't have AUTOEXTEND on for your UNDO tablespace, <br />
you'll notice that the UNEXPIRED blocks don't expire based on the <br />
retention policy. This is because Oracle will use a different internal <br />
method to decide when to expire those blocks. So, as a best practice,<br />
it is always recommended that you set AUTOEXTEND to ON for your<br />
UNDO tablespace.<br />
<br />
Also, you can use v$UNDOSTAT system table to view the details of <br />
the UNDO activities that happened in the past.<br />
<br />
<code>
set linesize 100;<br />
<br />
SELECT TO_CHAR(BEGIN_TIME, 'MM/DD/YYYY HH24:MI:SS') BEGIN_TIME,<br />
TO_CHAR(END_TIME, 'MM/DD/YYYY HH24:MI:SS') END_TIME,<br />
UNDOTSN, UNDOBLKS, TXNCOUNT, MAXCONCURRENCY AS "MAXCON"<br />
FROM v$UNDOSTAT WHERE rownum <= 100;<br />
</code>
<br />
The following is a sample output:<br />
<br />
<code>
BEGIN_TIME END_TIME UNDOTSN UNDOBLKS TXNCOUNT MAXCON<br />
------------------- ------------------- ---------- ---------- ---------- ----------<br />
04/16/2016 07:41:47 04/17/2016 07:51:47 59 8762 29185 6<br />
04/16/2016 07:31:47 04/17/2016 07:41:47 59 9110 32103 8<br />
04/16/2016 07:21:47 04/17/2016 07:31:47 59 11850 62273 7<br />
04/16/2016 07:11:47 04/17/2016 07:21:47 59 8801 39262 7<br />
04/16/2016 07:01:47 04/17/2016 07:11:47 59 7711 28932 8<br />
04/16/2016 06:51:47 04/17/2016 07:01:47 59 9872 45748 8<br />
04/16/2016 06:41:47 04/17/2016 06:51:47 59 7898 26967 7<br />
04/16/2016 06:31:47 04/17/2016 06:41:47 59 8811 30417 6<br />
</code>
<br />
In the above:<br />
<ul>
<li> BEGIN_TIME is the beginning time of the UNDO transaction for this particular entry</li>
<li> END_TIME is the end time of the UNDO transaction for this particular entry</li>
<li> In this example, the duration of each entry is 10 minutes</li>
<li> UNDOTSN -- Number of undo transaction happened during that time period</li>
<li> UNDOBLKS -- Number of undo blocks that were active/used during that time period</li>
<li> TXNCOUNT -- Total number of transactions</li>
<li> MAXCON -- Maximum number of connections to the database that used this many number of UNDOs</li>
</ul>
<h3>7. Migrate from Rollback to Automatic UNDO</h3>
The following will display what type of undo management you are using on your database.
SQL> show parameter undo_management;
NAME TYPE VALUE
----------------- ----------- ------
undo_management string AUTO
It is strongly recommended that you use Automatic UNDO management as shown above.
If you are still using ROLLBACK segments to manage your UNDO, you should consider migrating it to Automatic UNDO management.
You can use this undo advisory package to which will give you some estimate on how much UNDO space you need to use when you are converting from Rollback to UNDO: DBMS_UNDO_ADV.RBU_MIGRATION
<h3>8. Change UNDO Retention Policy</h3>
By default UNDO retention is set to 900 seconds. This means that the database will retain UNDO blocks for at least 900 seconds.
SQL> show parameter undo_retention;
NAME TYPE VALUE
---------------- ----------- ------
undo_retention integer 1800
If you want to change the undo retention values, you can change it using following alter system command.
In this example, we are changing the undo retention from the default 900 seconds to 1800 seconds.
ALTER SYSTEM SET UNDO_RETENTION = 1800
You have to be careful in setting this value. Don't set it too high if you don't have enough space in your UNDO tablespace to handle that much amount of UNDO generated by your system activities.
If a running transaction in your database required undo space and if the undo tablespace doesn't have enough space, then database will start reusing the UNEXPIRED undo blocks. This means that you might get the 'snapshot too old' error messages from some of your SQL statements.
<h3>9. Add Space to UNDO Tablespace</h3>
If your system generated lot of UNDO activities, and if you need to add more space to handle those (and to avoid the snapshot too old message), you can add more space to your UNDO tablespace.
The following example will add a 2nd datafile to the UNDOTBS1 with initial size of 1024MB and increases as required in the increment of 100MB. The maximum this particular datafile can grow is 2048MB.
ALTER TABLESPACE UNDOTBS1
ADD DATAFILE '/u01/oradata/devdb/undotbs1_02.dbf'
SIZE 1024M AUTOEXTEND ON NEXT 100M MAXSIZE 2048M;
Note: You can also set 'MAXSIZE UNLIMITED', which means that this particular undo datafile will keep growing in size as and when needed, and there is no upper limit to how big this file can grow. I tried to avoid setting UNLIMIED as much as possible, as I don't want this file size to grow crazy when a rouge SQL statements gets executed by mistake by a developer which required lot of UNDO space.
Now, execute the following command to see the total space (and the free space available) for the UNDOTBS1 tablespace.
select
a.tablespace_name,
sum(a.bytes)/(1024*1024) total_space_MB,
round(b.free,2) Free_space_MB,
round(b.free/(sum(a.bytes)/(1024*1024))* 100,2) percent_free
from dba_data_files a,
(select tablespace_name,sum(bytes)/(1024*1024) free from dba_free_space
group by tablespace_name) b
where a.tablespace_name = b.tablespace_name(+)
group by a.tablespace_name,b.free
<h3>10. UNDO System Tables</h3>
The following are some of UNDO related system tables that will give you lot of useful information about UNDO tablespace:
V$UNDOSTAT As we saw from one of the previous example, this table contains several useful past statistics about your UNDO activities which can help you calculate the amount of UNDO space required by your system.
V$ROLLSTAT This table contains activities of the UNDO segments from the UNDO tablespace.
V$TRANSACTION For additional UNDO segment details
DBA_UNDO_EXTENTS This provides details of each extend in your UNDO tablespace along with their current status.
WRH$_UNDOSTAT Contains statistical snapshot of V$UNDOSTAT table information
WRH$_ROLLSTAT Contains statistical snapshot of V$ROLLSTAT table information
<br />
<b>Link</b><br />
http://www.thegeekstuff.com/2016/04/oracle-undo-tablespace/
</html>
<html>
<h3>MCollective</h3>
<br />
Link:<br />
<a href="http://www.linuxjournal.com/content/orchestration-mcollective">http://www.linuxjournal.com/content/orchestration-mcollective</a><br />
<br />
</html>
Ever wanted to execute an
Oracle Procedure which contains
an out parameter, and use the
value returned from the out
parameter in the shell variable.
Try out this. The procedure
test1 adds two nos. and returns
output into the out parameter.
export ORACLE_HOME=< type in your Oracle Home Path >
export ORACLE_SID=< Mention the Oracle SID >
export PATH=$ORACLE_HOME:$ORACLE_HOME/bin:$PATH # This Path
is set to access the sqlplus executable
dummyvar=`sqlplus -s tcon4iqalib/tcon4iqalib <<end
set pagesize 0 feedback off ver off heading off echo off
serverout on
variable verr_mesg number
exec test1(4,5,:VERR_MESG)
print verr_mesg
exit;
end`
echo " Error is " $dummyvar
echo " Result is " $dummyvar
echo $dummyvar
#end of shell script
This tip generously supported
by: ranjan.tridipta@citicorp.com
<html>
<ul>
<li><h3>Inhaltsverzeichnis</h3>
<ul>
<li>Schritt 1: Wechseln Sie in Ihrem Kalender zur Listenansicht</li>
<li>Schritt 2: Aktivieren Sie Erinnerungen für mehrere Elemente</li>
<li>Schritt 3: Ändern Sie mehrere Zeitangaben für die Gruppierung “Vorher erinnern“</li>
<li>Schritt 4: Wechseln Sie wieder zur Tages‐/Wochen‐/Monatsansicht zurück</li>
</ul></li>
<br />
<li><h4>Schritt 1: Wechseln Sie in Ihrem Kalender zur Listenansicht</h4>
<p>
Zunächst werden wir von Outlooks Kalenderansicht auf die Listenansicht wechseln
</p>
<p>
• Outlook 2007
Ansicht-> Aktuelle Ansicht-> Alle Termine
</p>
<p>
• Outlook 2010 ‐ Outlook 2019 und Microsoft 365
Ansicht-> Ändern ändern-> Liste
</p>
</li>
<li><h4>Schritt 2: Aktivieren Sie Erinnerungen für mehrere Elemente</h4>
In diesem Schritt werden wir alle Elemente ohne Erinnerung finden, indem wir mithilfe des Feldes “Erinnerungen“ gruppieren und anschließend alle Erinnerungen durch die Verwendung von Drag and Drop aktivieren:
1. Öffnen Sie das Dialogfeld “Ansichtseinstellungen“
• Outlook 2007
Ansicht-> Aktuelle Ansicht-> Aktuelle Ansicht anpassen
• Outlook 2010 ‐ Outlook 2019 und Microsoft 365
Ansicht-> Ansichtseinstellungen
2. Klicken Sie auf: Gruppieren
In der ersten Dropdown-Liste wählen Sie: Erinnerung.
Erinnerung-outlook
4. Drücken Sie auf OK und anschließend erneut auf OK, um zu Ihrem Kalender zurückzukehren.
5. Sie werden nun bemerken, dass Ihre Kalendereinträge in 2 Gruppen unterteilt sind:
• Erinnerung: Ja
• Erinnerung: Nein
6. Wählen Sie nun alle Elemente, für die Sie eine Erinnerung aktivieren möchten, aus der “Erinnerung: Nein“ Gruppe und verschieben diese per Drag and Drop in die “Erinnerung: Ja“ Gruppe.
• Wenn Sie Erinnerungen für alle Elemente der “Erinnerung: Nein“ Gruppe aktivieren möchten, dann können Sie per Drag and Drop die Gruppenkopfzeile “Erinnerung: Nein“ in die “Erinnerung: Ja“ Gruppe verschieben.
</li>
<br />
<li><h4>Schritt 3: Ändern Sie mehrere Zeitangaben für die Gruppierung “Vorher erinnern“</li>
Um zu überprüfen und/oder einzustellen, wie lange vor einem Termin oder einer Besprechung Sie eine Erinnerung erhalten, können wir etwas Vergleichbares mit dem Feld “Vorher erinnern“ (engl. “<em>Remind beforehand</em>“) durchführen.
1. Öffnen Sie das Dialogfeld “Ansichtseinstellungen“
• Outlook 2007
Ansicht-> Aktuelle Ansicht-> Aktuelle Ansicht anpassen
• Outlook 2010 ‐ Outlook 2019 und Microsoft 365
Ansicht-> Ansichtseinstellungen
2. Klicken Sie auf: Gruppieren
3. Legen Sie dann am unteren Rand des Dialogfensters die Drop-Down-Liste “Verfügbare Felder auswählen aus“ auf das folgende fest: Alle Terminfelder.
4. Aus der ersten Dropdown-Liste wählen Sie dann: Vorher erinnern / Remind beforehand.
outlook-vorher-erinnern
5. Drücken Sie auf OK und anschließend erneut auf OK, um zu Ihrem Kalender zurückzukehren.
6. Sie werden jetzt wahrscheinlich feststellen, dass Ihre Kalenderelemente in mehrere Gruppen aufgeteilt wurden, die angeben, wie viele Minuten vorher Sie eine Erinnerung erhalten werden.
Beispielsweise:
Vorher erinnern: 0
Vorher erinnern: 15
Vorher erinnern: 30
Vorher erinnern: 720
7. Wählen Sie nun alle Elemente, für welche Sie die “Vorher erinnern“ Zeit ändern möchten, aus ihrer Gruppe und verschieben diese durch Drag and Drop in diejenige Gruppe, welche mit der Zeit übereinstimmt, zu der Sie im Voraus erinnert werden möchten.
• Wenn Sie alle Erinnerungen für eine bestimmte Gruppe in den gleichen Wert umändern möchten, dann können Sie per Drag and Drop die “Vorher erinnern“ Gruppenkopfzeile in eine andere “Vorher erinnern“ Gruppe verschieben.
• Wenn eine bestimmte “Vorher erinnern“ Gruppe nicht verfügbar ist, wie zum Beispiel “45“, dann können Sie manuell einen einzelnen Termin anpassen und dessen Erinnerung so einstellen, dass diese Gruppe automatisch kreiert wird. Danach können Sie per Drag and Drop die anderen Elemente in diese Gruppe verschieben.
</li>
<br />
<li><h4>Schritt 4: Wechseln Sie wieder zur Tages‐/Wochen‐/Monatsansicht zurück</li>
Sobald Sie alle Erinnerungseinstellungen nach Ihren Wünschen geändert haben, dann können Sie in Ihrem Kalender wieder zur Tages-/Wochen-/Monatsansicht wechseln, indem Sie die folgenden Menüpfade verwenden:
• Outlook 2007
Ansicht> Aktuelle Ansicht-> Tag/Woche/Monat (Ansicht mit Autovorschau)
• Outlook 2010 ‐ Outlook 2019 und Microsoft 365
Ansicht-> Ansicht ändern-> Kalender
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.mailhilfe.de/das-hinzufuegen-oder-aendern-von-erinnerungen-fuer-mehrere-termin-und-besprechungselemente" target="_blank" rel="noreferrer noopener">Mailhilfe.de :: Das Hinzufügen oder Ändern von Erinnerungen für mehrere Termin- und Besprechungselemente</a></li>
</ul>
</html>
<html>
Menü / Icon-Leiste<br />
→ To–Do–Bar<br />
→ Untermenü<br />
→ Eintrag “<em>Calendar</em> “ anklicken<br />
</html>
<html>
<h3>Überprüfung, ob es bei einem Cpty einen Overdraft /
Überziehung gibt</h3>
Aufruf MLC<br />
BO-Session<br>
--> "Monitors" auswählen<br>
--> "Limits" auswählen<br>
--> "Monitor" auswählen<br>
--> "File" <br>
--> "Bind engine" <br>
--> Engine (RTLIM oder EOD) auswählen, i.d.R. die aktuellste<br>
--> Kriterium (obere Zeile, z.B. "Replacement" in "Risks & Groups" eintragen, alles andere löschen) auswählen<br>
--> Ctrl-F, um Cpty zu suchen<br>
--> carriage return<br>
--> im rechten Fenster erscheinen Tabellen, Zeilen mit roten Balken ermitteln/raussuchen<br>
</html>
<html>
Config-Session <br>
--> Data extraction <br>
--> Datamart <br>
--> View execution jobs<br>
=> dann erscheint folgende View:<br>
<br>
<img src="./pictures/Murex_JobsList.png" alt=""><br>
</html>
<html>
<ul>
<li>PCA, “Principal Component Analysis“</li><br />
<li>ein Verfahren der multivariaten Statistik</li><br />
<li>Sie dient dazu, umfangreiche Datensätze zu strukturieren, <br />
zu vereinfachen und zu veranschaulichen, indem eine Viel-<br />
zahl statistischer Variablen durch eine geringere Zahl <br />
möglichst aussagekräftiger Linearkombinationen (die <br />
'Hauptkomponenten') genähert wird.</li><br />
<li>Pyhton-Code:
<code><pre>from sklearn.<b>decomposition</b> import <b>PCA</b>
pca = PCA(n_components=2)
pca.fit(X)
</pre></code></li>
</ul>
<h3></h3>
<a href="https://de.wikipedia.org/wiki/Hauptkomponentenanalyse" target=_blank>Wikipedia :: Hauptkomponentenanalyse</a>
</html>
<html>
<ol>
<li><pre><code>pnmtops <em><FILE></em>.pnm > <em><FILE></em>.ps</code></pre>
</li>
<li><pre><code>epstopdf <em><FILE></em>.ps</code></pre>
</li>
</ol>
</html>
<html>
<a href="https://tools.pdf24.org/de/">https://tools.pdf24.org/de/</a>
</html>
<html>
<ul>
<li>Für die Grundrechenarten <br />
<b>Addition, Subtraktion, Multiplikation, Division</b> und <b>Modulo</b><br />
stehen in PHP die folgenden arithmetischen Operatoren zur Verfügung:
<table border="1">
<tr><th>Name</th><th>Operator</th><th>Beispiel</th></tr>
<tr><td>Addition</td><td><center>+</center></td><td>$x = $a + $b + 1;</td></tr>
<tr><td>Subtraktion</td><td><center>-</center></td><td>$z = $x - 5;</td></tr>
<tr><td>Multiplikation</td><td><center>*</center></td><td>$z = $x * $y;</td></tr>
<tr><td>Division</td><td><center>/</center></td><td>$y = $x / 5;</td></tr>
<tr><td>Modulo</td><td><center>%</center></td><td>$x = 10%3;<br />
Das Ergebnis in $x ist 1, denn 10 geteilt durch 3 ist 3 Rest 1.</td></tr>
</table></li>
<li><b>Hinweis</b><br />
Zu beachten ist, dass eine <b>Division durch Null</b> <u>nicht</u> möglich ist <br />
und daher zu einer Warnung führt:<br /><br />
z.B. <code>
Warning: Division by zero in ?/kapitel_2/basic/divnull.php on line 5<br />
</code> <br />
Schwerwiegender als die Fehlermeldung ist die Tatsache, dass<br />
das Skript u.U. trotzdem weiterläuft. Dies kann weitreichende <br />
Konsequenzen haben, wenn bspw. für eine Kundenbestellung ein<br />
Rechnungsbetrag gespeichert wird.</li>
<br />
<li><u>Zwei Gründe führen regelmäßig zu Divisionen durch Null:</u><br />
<ul>
<li>Der Programmierer hat diesen Fall in seinem Algorithmus nicht berücksichtigt.</li>
<li>Ein Nutzer der Webseite hat in einem Eingabefeld eines Webformulars einen <br />
Wert eingegeben, der indirekt zu einer Division durch Null führt.</li>
</ul><br />
Beide Situationen lassen sich vermeiden, wenn man die Algorithmen und <br />
Quelltexte regelmäßig überprüft und schon bei der Entwicklung <br />
kritisch hinterfragt. Zu bedenken ist dabei, dass zur Programmierung auch gehört,<br />
Fehleingaben durch den Benutzer zu vermeiden.<br />
<br />Im besten Fall ist die Benutzerschnittstelle so aufgebaut, dass gar kein <br />
Fehler passieren kann. Falls dies nicht möglich ist, liegt es in der Verantwortung<br />
des Programmierers, mögliche Fehleingaben vorauszuplanen.<br />
<br />
Also:<br />
Stelle daher grundsätzlich sicher, dass <b>keine Division durch Null</b> passieren kann.<br />
⇒ s. “Steueranweisungen - Schleife fortführen mit continue“</li>
</ul>
</html>
<html>
<h3>Arrays - Begriffserklärung</h3>
<ul>
<li>Die Datentypen, die bisher erklä wurden, haben eines gemeinsam: Man kann <br />
darin immer nur jeweils einen Wert ablegen. Es gibt aber durchaus Situationen, in denen <br />
man mehrere Werte in der gleichen Variablen speichern möchte. So kann beispielsweise<br />
das Ergebnis einer Datenbankabfrage aus mehreren Werten bestehen, die zusammen eine<br />
Einheit bilden.</li>
<br />
<li><b>Definition</b><br />
Arrays zählen zu den zusammengesetzten bzw. komplexen Datentypen. Mit einem <br />
Array kann man mehrere Werte in einer gemeinsamen Variablen abspeichern. Der Zugriff<br />
auf die einzelnen Array-Elemente erfolgt über einen Index.</li>
<br />
<li><b>Hinweis</b><br />
Die meisten anderen Programmiersprachen schreiben vor, dass die Werte in einem Array<br />
alle den gleichen Datentyp haben. PHP ist da wesentlich flexibler. Man kann hier in einem<br />
Array alle Datentypen beliebig nebeneinander verwenden.</li>
<br />
<li>Arrays kann man mit einem Regallager vergleichen. Das Lager selbst hat einen Namen<br />
(beispielsweise eine eindeutige Adresse oder eine Hallennummer), aber wenn man ein be‐<br />
stimmtes Objekt, das dort gelagert ist, auffinden will, benötigt man zusätzlich noch Angaben<br />
über das Regal bzw. über das Regalfach, in dem das gesuchte Objekt abgelegt ist. Ähnlich <br />
gestaltet sich der Zugriff auf ein Array. Dort werden die Fächer als Felder bezeichnet. Daher <br />
benutze man, wenn man auf ein Array zugreifen will, nicht nur dessen Namen, sondern füge<br />
eine Feldnummer, den sogenannten Index, hinzu.</li>
<br />
<li>In PHP sind Arrays besonders flexibel. Während andere Programmiersprachen <br />
üblicherweise nur eine Durchnummerierung der einzelnen Array-Felder erlauben, kann man <br />
in PHP bei Bedarf jedem gespeicherten Wert eine eigene Kennzeichnung geben</li>
<br />
<li><b>Hinweis</b><br />
Selbstverständlich kann man in PHP die Arrays so erzeugen, wie man es möglicher‐<br />
weise aus anderen Programmiersprachen kennt. Der Vorteil in PHP ist, dass man es nicht muss.</li>
</ul>
<h3>Indizierte Arrays</h3>
<ul>
<li><b>Definition</b><br />
Ein indiziertes Array besteht aus Feldern, die aufsteigend durchnummeriert sind: <br />
Das erste Feld hat den Index 0, das zweite den Index 1 usw. Dies ist die Standard‐<br />
form eines Arrays.</li>
<br />
<li>Ein indiziertes Array kann man durch einfache Zuweisung erzeugen.</li>
<br />
<li>Man beachte, dass der Index - wie in der Informatik üblich - bei 0 beginnt.</li>
<br />
<li>Das Auslesen erfolgt genauso wie das Schreiben von Werten in das Array. <br />
Man gibt den Namen des Arrays an und lassen dahinter in eckigen Klammern den Index folgen.</li>
<br />
<li><b>Hinweis</b><br />
Wenn man einfach nur mehrere Werte hintereinander in das Array schreiben will,<br />
muss man nicht jedes Mal den Index angeben. Man trägt bei der Zuweisung in <br />
den eckigen Klammern gar keinen Index ein, wird der Wert am Ende des Arrays<br />
hinzugefügt. Will man einen bereits gespeicherten Wert allerdings verändern oder <br />
auslesen, dann muss man weiterhin einen Index angeben.<br />
<br />
<b>Beispiel</b><code><pre>
1.<?php
2. $buecher[]="Winnetou I";
3. $buecher[]="Jagd auf Roter Oktober";
4. $buecher[]="Faust";
5.
6. echo $buecher[0] . "<BR />\n";
7. echo $buecher[1] . "<BR />\n";
8. echo $buecher[2] . "<BR />\n";
9.?></pre></code>
</li>
</ul>
<h3>Assoziative Arrays</h3>
<ul>
<li><b>Definition</b><br />
Als assoziative Arrays bezeichnet man Arrays, bei denen jedes Feld einen <br />
“sprechenden“ Namen hat.</li>
<br />
<li>Assoziative Arrays erlauben Ihnen nun, jedem Feld einen Namen zu geben:<br />
<code><pre>
1.<?php
2. $daten ["Vorname"]="Max";
3. $daten ["Nachname"]="Mustermann";
4. $daten ["Strasse"]="Winkelgasse";
5. $daten ["Hausnummer"]="44a";
6.
7. echo $daten["Vorname"] . " " . $daten["Nachname"] . "<BR />\n";
8. echo $daten["Strasse"] . " " . $daten["Hausnummer"] . "<BR />\n";
9.?> </pre></code></li>
<br />
<li>Man bekommt viele Daten, wie beispielsweise verschiedene PHP-Konfi‐<br />
gurationsdaten, nur als assoziatives Array geliefert, sodass sich eine Aus‐<br />
einandersetzung damit auf jeden Fall lohnt.</li>
</ul>
<h3>Arrays mit selbstgewählten Indizes</h3>
<ul>
<li>Intern legt PHP alle Arrays so an, dass sie sowohl indiziert als auch assoziativ<br />
verwendet werden können. Daraus ergeben sich einige praktische Varianten im <br />
Umgang mit indizierten Arrays, die in anderen Programmiersprachen nicht so einfach<br />
möglich sind.</li>
<br />
<li>Man kann zum Beispiel festlegen, dass der Index <b>nicht</b> bei 0, sondern an anderer<br />
Stelle beginnt. Man spricht deshalb von einem <b>wahlfreien Index</b>. </li>
<br />
<li>Man kann auch <b>negative</b> Indizes verwenden, selbst <b>Flie&slig;kommazahlen</b> sind<br />
möglich. Diese Vielfalt im Umgang mit Arrays ist unter den Programmiersprachen<br />
einzigartig.</li>
<br />
<li><b>Hinweis</b><br />
Die Freiheit im Umgang mit Arrays kann dazu verleiten, assoziative und indizierte Arrays<br />
miteinander zu vermischen, also Elemente sowohl mit Index als auch mit Bezeichnung in<br />
einem Array hinzuzufügen. Allerdings verliert man dabei schnell den Überblick, sodass es <br />
<u>besser ist, sich für eine Variante zu entscheiden und diese konsequent zu verwenden</u>.</li>
</ul>
<h3>Die Funktion array()</h3>
<ul>
<li>PHP bietet die Möglichkeit, ein Array “im Stück“, also mit <br />
mehreren Elementen in einem Schritt anzulegen. Dazu dient die Funktion <b>array()</b>, der<br />
als Argumente die einzelnen Elemente des Arrays übergeben werden können.<br />
<br />
<code><pre>
1. <?php
2. $buecher =array ("Winnetou I","Jagd auf Roter Oktober","Faust");
3.
4. echo "$buecher[0]<BR />\n";
5. echo "$buecher[1]<BR />\n";
6. echo "$buecher[2]<BR />\n";
7. ?></pre></code>
</li>
<br />
<li>Diese Schreibweise ist merklich kompakter als die, die man bereits auf den<br />
Seiten zuvor kennengelernt haben. Selbstverständlich kann man im Nachhinein<br />
noch wie gewohnt weitere Elemente zum Array hinzufügen.</li>
<br />
<li>Auch bei dieser Methode kann man für jedes Element einen Index angeben.<br />
Dazu schreibt man vor den eigentlichen Wert den gewünschten Index und <br />
einen Doppelpfeil (=>), wie das Beispiel zeigt:<br />
<code><pre>
1. <?php
2. $buecher =array (20 => "Winnetou I","Jagd auf Roter Oktober",30 => "Faust");
3.
4. echo "$buecher[20]<BR />\n";
5. echo "$buecher[21]<BR />\n";
6. echo "$buecher[30]<BR />\n";
7. ?>
</pre></code></li>
<br />
<li>Diese Technik funktioniert auch mit assoziativen Arrays. Statt des Indexes wird <br />
in dem folgenden Beispiel der gewünschten Name des Elements in doppelten An‐<br />
führungszeichen notiert:<br />
<code><pre>
1. <?php
2. $daten = array("Vorname"=>"Max", "Nachname"=>"Mustermann",
"Strasse"=>"Winkelgasse","Hausnummer"=>"44a");
3.
4. echo $daten["Vorname"] . " " . $daten["Nachname"] ."<BR>\n";
5. echo $daten["Strasse"] . " " . $daten["Hausnummer"] ."<BR>\n";
6. ?>
</pre></code>
<br />
<li>Wie man erkennen kann, bringt die kompakte Form dieser Funktion einen Nachteil<br />
mit sich: Die Codezeilen werden bei mehreren Werten sehr lang und unübersichtlich. <br />
Um Fehler zu vermeiden, bietet es sich an, die Werte zeilenweise zu gruppieren:
<code><pre>
1. <?php
2. $daten = array(
3. "Vorname"=>"Max",
4. "Nachname"=>"Mustermann",
5. "Strasse"=>"Winkelgasse",
6. "Hausnummer"=>"44a"
7. );
8.
9. echo $daten["Vorname"] . " " . $daten["Nachname"] . "<BR>\n";
10. echo $daten["Strasse"] . " " . $daten["Hausnummer"] . "<BR>\n";
11. ?></pre></code>
</li>
<br />
<li>Wenn man sich diese Schreibweise angewöhnt (die sich übrigens inhaltlich<br />
nicht von der vorherigen Darstellung unterscheidet), wird man auch größere <br />
Datenmengen immer gut im Blick haben.</li>
</ul>
<h3>Arrays löschen</h3>
<ul>
<li>Da Arrays mehrere Werte speichern können, nehmen sie auch mehr Speicherplatz<br />
in Anspruch als elementare Datentypen. Da ein PHP-Skript üblicherweise mit sehr<br />
wenig Speicher auskommen muss, kann es sinnvoll sein, ein Array vollst&aouml;ndig zu<br />
leeren, wenn dessen Inhalt nicht mehr benötigt wird, oder zu löschen.</li>
<br />
<li>Die Funktion <b>array()</b> legt ein leeres Array an, wenn keine Argumente öbergeben werden.<br />
Die Werte, die beispielsweise in der Variablen $buecher gestanden haben, sind jetzt <br />
“vergessen“ und werden aus dem Speicher gelöscht - sofern nicht noch eine andere<br />
Variable den gleichen Speicherbereich verwendet (siehe Referenzzuweisung).</li>
<br />
<li>Bei der folgenden Variante existiert das Array noch, es ist aber leer:
<code><pre>
$buecher = array();
</pre></code>
<li>Wenn man das Array vollständig löschen will, kann man die Funktion <b>unset()</b> ver‐<br />
wenden, die als Parameter die Variable erhält, die man löschen will.
<code><pre>
unset($buecher);
</code></pre>
<br />
<li><b>Hinweis</b><br />
Das Löschen funktioniert übrigens nicht nur mit Arrays, sondern mit allen Datentypen. <br />
Man kann also jede Variable löschen, indem man die Funktion <b>unset()</b> verwendet.</li>
<br />
<li>In der praktischen Anwendung haben die beiden Varianten für Sie die gleiche Auswirkung:<br />
Die Werte des Arrays sind gelöscht. Wenn man neue Werte hinzufügt, fängt der<br />
Index wieder bei 0 an zu zählen. Intern unterscheiden sich die beiden Varianten <br />
nur dadurch, dass bei der ersten Variante die Variable noch existiert, bei der zweiten nicht.</li>
</ul>
<h3>Erste Funktionen rund um Arrays </h3>
<ul>
<li>In PHP gibt es bereits eine große Anzahl von Funktionen, die den Umgang <br />
mit Arrays erleichtern. Im Folgenden wird eine kleine Auswahl wichtiger Array-<br />
Funktionen und deren Anwendung vorgestellt:
<table border="1">
<tr><th>Funktion</th><th>Bedeutung</th></tr>
<tr><td>count() </td><td>liefert die Größe des Arrays zurück.</td></tr>
<tr><td>sizeof() </td><td>liefert die Größe des Arrays zurück.</td></tr>
<tr><td>current() </td><td>liefert das Element, auf das die interne Laufvariable zeigt, zur%uuml;ck.</td></tr>
<tr><td>next()</td><td>zählt die interne Laufvariable um 1 hoch.</td></tr>
<tr><td>prev() </td><td>zählt die interne Laufvariable um 1 herunter.</td></tr>
<tr><td>reset() </td><td>setzt die interne Laufvariable auf den Ursprungszustand zurück.</td></tr>
</table>
<br />
<li>Die Funktionen count()und sizeof() geben Auskunft über die Größe eines Arrays, <br />
d.h. man erhält als Ergebnis die Anzahl der Felder im Array, die einen Wert ge‐<br />
speichert haben. Als Argument übergibt man das Array.</li>
<br />
<li><b>Hinweis</b><br />
Die Funktion sizeof() ist ein Verweis auf die Funktion count(). Wenn man also sizeof()<br />
benutzt, startet PHP tatsächlich die Funktion count().</li>
<br />
<li>In <b>indizierten Arrays</b>, deren Index mit 0 beginnt und fortläuft, ist es vergleichsweise<br />
einfach, alle Felder des Arrays zu durchlaufen. Man lässt eine for-Schleife von 0 bis<br />
zur Größe des Arrays durchlaufen und indiziert jedes Feld direkt.</li>
<br />
<li>Dieses Vorgehen klappt prima, wenn man mit indizierten Arrays arbeitet, deren <br />
Index fortlaufend ist. Bei <b>assoziativen Arrays</b> funktioniert diese Herangehensweise<br />
leider nicht. Deshalb speichert PHP in jedem Array - ohne fremdes Zutun - eine<br />
eigene interne Laufvariable ab, die zu Beginn auf das erste Feld des Arrays verweist.<br />
Auf diese Laufvariable kann man nicht direkt zugreifen, aber PHP stellt die Funktion<br />
<b>current()</b> zur Verfügung, die das Feld, auf das die versteckte Laufvariable zeigt, <br />
zurückliefert. Diese Funktion erwartet als Parameter den Variablennamen des Arrays,<br />
auf das man gerade zugreifen will.
</li>
<br />
<li>Hat man das aktuelle Feld verarbeitet, kann man die Funktion <b>next()</b> aufrufen. <br />
Als Parameter übergibt man wieder die Array-Variable. Diese Funktion sorgt <br />
dafür, dass die interne Laufvariable um 1 hochgez¨hlt wird und damit auf das<br />
nächste Feld des Array zeigt. Ein erneuter Aufruf der Funktion current() gibt <br />
dann nicht mehr das erste, sondern das zweite Feld des Arrays zurück. So <br />
kann man sich durch das gesamte Array durcharbeiten.</li>
<br />
<li>Ähnlich wie next() funktioniert die Funktion <b>prev()</b>, nur dass diese Funktion die<br />
interne Indexvariable wieder um 1 herunterzählt und damit auf das vorherige<br />
Element im Array zeigt. Man kann sein Array also in beide Richtungen durch-<br />
wandern. Wenn man den internen Zähler wieder in seinen Ursprungszustand <br />
zurückversetzen will, ruft man die Funktion <b>reset()</b> auf.</li>
<br />
<li><b>Hinweis</b><br />
Weitere hilfreiche Array-Funktionen findet man im Internet beispielsweise unter <br />
der folgenden URL:<br />
<a href="http://php.net/manual/de/ref.array.php" target="_blank">http://php.net/manual/de/ref.array.php</a></li>
</ul>
</html>
<html>
<ul>
<li>Werden mehrere, verschiedene Operatoren in einem Ausdruck verwendet, <br />
entscheidet deren Rangfolge und Assoziativität die Abarbeitung.</li>
<br />
<li><b>Definition:</b><br />
Die Rangfolge regelt, welche Operatoren Vorrang vor anderen haben und damit <br />
zuerst ausgeführt werden. So hat eine Multiplikation Vorrang vor einer Addition,<br />
weil die Regel “Punkt- vor Strichrechnung“ gilt.<br />
<br />
Haben zwei Operatoren die gleiche Rangfolge, so entscheidet die <b>Assoziativität</b>.
<ul>
<li><u>Links-assoziativ</u> sind Operatoren, die von links nach rechts abgearbeitet werden. </li>
<li><u>Rechts-assoziativ</u> sind dementsprechend Operatoren, die von rechts nach links verarbeitet werden.</li>
</ul>
</li>
<br />
<li><b>Beispiele:</b><br />
<ol>
<li>Die <u>Zuweisung</u> ist rechts-assoziativ, es wird zuerst die rechte Seite verarbeitet,<br />
bevor das Ergebnis der Variablen auf der linken zugewiesen wird. Eine links-assoziative<br />
Zuweisung wäre nicht sinnvoll, weil auf der linken Seite ja die Variable steht, die das <br />
Ergebnis des Ausdrucks auf der rechten Seite speichern soll. Damit dies funktioniert, muss<br />
zwangsläufig erst die rechte Seite ausgewertet werden. </li>
<li>Die <u>Subtraktion</u> ist beispielsweise links-assoziativ: Sie wird von links nach rechts<br />
“abgearbeitet“ </li>
</ol>
<br />
<li><b>Tabelle</b><br />
Die folgende Tabelle gibt eine vollständige Übersicht über alle Operatoren, <br />
deren Rangfolge (von oben nach unten abnehmend) und Assoziativität.<br />
<table border="1">
<tr><th>Operator</th><th>Assoziativität</th></tr>
<tr><td>new </td><td>keine Richtung</td></tr>
<tr><td>[ ] </td><td>rechts</td></tr>
<tr><td>+ </td><td>rechts</td></tr>
<tr><td>- </td><td> rechts</td></tr>
<tr><td>~ </td><td>rechts</td></tr>
<tr><td>! </td><td>rechts</td></tr>
<tr><td>++ </td><td>rechts</td></tr>
<tr><td>-- </td><td>rechts</td></tr>
<tr><td>( ) </td><td>rechts</td></tr>
<tr><td>++ </td><td>rechts</td></tr>
<tr><td>-- </td><td>rechts</td></tr>
<tr><td>* </td><td>links</td></tr>
<tr><td>/ </td><td>links</td></tr>
<tr><td>% </td><td>links</td></tr>
<tr><td>. </td><td>links</td></tr>
<tr><td>+ </td><td>rechts</td></tr>
<tr><td>- </td><td>rechts</td></tr>
<tr><td><< </td><td>links</td></tr>
<tr><td>>> </td><td>links</td></tr>
<tr><td>< </td><td>keine Richtung</td></tr>
<tr><td><= </td><td>keine Richtung</td></tr>
<tr><td>> </td><td>keine Richtung</td></tr>
<tr><td>>= </td><td>keine Richtung</td></tr>
<tr><td>== </td><td>keine Richtung</td></tr>
<tr><td>!= </td><td>keine Richtung</td></tr>
<tr><td>=== </td><td>keine Richtung</td></tr>
<tr><td>& </td><td>links</td></tr>
<tr><td>^ </td><td>links</td></tr>
<tr><td>| </td><td>links</td></tr>
<tr><td>&& </td><td>links</td></tr>
<tr><td>|| </td><td>links</td></tr>
<tr><td>?: </td><td>links</td></tr>
<tr><td>= </td><td>rechts</td></tr>
<tr><td>*=, /=, %=, +=, -=, &=,<br />
|=, ?=, ~=, <<=, >>= </td><td>rechts</td></tr>
<tr><td>and </td><td>links</td></tr>
<tr><td>xor </td><td>links</td></tr>
<tr><td>or </td><td>links</td></tr>
<tr><td>, </td><td>links</td></tr>
</table>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>Notwendigkeit der Bit-Operatoren</h3>
“Exkurs - Bits als Schalter“</li>
<br />
<li></li>
<br />
<li></li>
<br />
<li></li>
<br />
<li>
<table border="1">
<tr><th>Name </th><th>Operator</th><th>Bedeutung</th></tr>
<tr><td>Linksverschiebung</td><td><center><<</center></td><td>verschiebt alle Bits einer Zahl <br />um die angegebene Anzahl von Stellen nach links.</td></tr>
<tr><td>Rechtsverschiebung </td><td><center>>> </center></td><td>verschiebt alle Bits einer Zahl<br /> um die angegebene Anzahl von Stellen nach rechts.</td></tr>
<tr><td>UND</td><td><center>&</center> </td><td>liefert bitweise eine 1 als Ergebnis, <br />wenn die Ausgangszahlen an der entsprechenden Stelle beide gesetzt sind.</td></tr>
<tr><td>ODER </td><td><center>|</center> </td><td>liefert bitweise eine 1 als Ergebnis, <br />wenn mindestens eine der Ausgangszahlen an der entsprechenden Stelle gesetzt ist.</td></tr>
<tr><td>Entweder-ODER</td><td><center>?</center></td><td>liefert bitweise eine 1 als Ergebnis, <br />wenn genau eine der Ausgangszahlen an der entsprechenden Stelle gesetzt ist.</td></tr>
<tr><td>NICHT </td><td><center>~</center> </td><td>kehrt alle Stellen der Zahl um.</td></tr>
</table>
</li>
<br />
<li><h3>Hinweis</h3>
Bei den Bit-Operatoren <b>UND</b>, <b>ODER</b>, <b>Entweder ODER</b> und <b>NICHT</b> <br />
spricht man auch von bitweisen Verknüpfungen, auch binäre Verknüpfungen genannt.
</li>
<br />
<li><h3>Definition</h3>
<ol>
<li><b>Die Linksverschiebung (<<) :: </b><br />
verschiebt alle Bits einer Zahl um die angegebene Anzahl von Stellen nach <b>links</b>. <br />
Die von rechts freiwerdenden Stellen werden mit Nullen aufgefüllt.<br />
Letztendlich bedeutet die Linksverschiebung also, dass Nullen angehängt werden.<br />
Im Dezimalsystem würde jede angehängte Null einer Multiplikation mit 10 entsprechen, <br />
im Binärsystem entspricht es einer Multiplikation mit 2.</li>
<br />
<li><b>Die Rechtsverschiebung (>>) :: </b><br />
verschiebt analog die Bits einer Zahl in Binärdarstellung nach <b>rechts</b>. <br />
Die Stellen ganz rechts werden dabei abgeschnitten, fallen also weg. <br />
Von links werden Nullen nachgeschoben, sodass eine einzelne Rechtsverschiebung <br />
einer ganzzahligen Division durch 2 entspricht. <br />
Eine doppelte Rechtsverschiebung dividiert demnach durch 4, eine dreifache durch 8 usw.</li>
</ol>
<li><h3>Beispielcode:</h3>
<code>
1. <?php<br />
2. $zahl1 = 10;<br />
3. $zahl2 = $zahl1 << 3;<br />
4. $zahl3 = $zahl1 >> 3;<br />
5. echo "Zahl2: $zahl2<BR />\n";<br />
6. echo "Zahl3: $zahl3<BR />\n";<br />
7. ?> </code><br />
<br />
→ Erklärung:<br />
<ul>
<li>Die dreifache Linksverschiebung in Zeile 3 entspricht einer Multiplikation mit 8.</li>
<li>Die Rechtsverschiebung in Zeile 4 führt zu einer Division durch 8, der Rest der Division geht verloren.</li>
<li>Im Browser werden erwartungsgemäszlig; die Zahlen 80 und 1 ausgegeben</li>
</ul>
<br />
<li><h3>Hinweis</h3>
In PHP werden für Ganzzahlen <b>immer nur 32 Bit</b> verwendet. <br />
Wenn durch die Linksverschiebung eine Zahl mit mehr als 32 Binärstellen entsteht, dann <br />
werden die führenden Stellen abgeschnitten. Da die vorderste Binärstelle als Vorzeichenbit fungiert<br />
und daher nur 31 Stellen für die eigentliche Zahl zur Verfügung stehen, kann es außerdem passieren, <br />
dass durch Linksverschiebung einer positiven Zahl eine negative Zahl entsteht und umgekehrt.
</li>
<br />
<li><h3>Hinweis</h3>
In diesem Zusammenhang ist außerdem zu beachten, dass die Rechtsverschiebung <br />
<b>nur bei positiven Zahlen</b> einer Division durch 2 entspricht. Bei negativen Zahlen wird <br />
das 32ste Bit (also das Vorzeichen) ebenfalls verschoben und von links mit Nullen auf-<br />
gefüllt, sodass das Ergebnis der Verschiebung nicht mehr negativ ist und auch rechnerisch <br />
nicht mehr den Erwartungen entspricht.
</li>
<br />
</ul>
</html>
<html>
<ul>
<li><h3>Bitweise Verknüpfungen</h3>
Da ein Bit ebenfalls genau zwei Werte haben kann (1 oder 0), liegt es nahe, dass <br />
die logischen Operationen auch als binäre (also Bit-)Operationen funktionieren können.<br />
Dazu stehen die folgenden Bit-Operatoren zur Verfügung:
<table border="1">
<tr><th>Bit-Operator</th><th>Zeichen</th><th>Beschreibung</th></tr>
<tr><td>UND</td><td><center>&</center></td><td>liefert genau dann eine 1, wenn beide beteiligten Bits ebenfalls den Wert 1 haben. Ebenso liefert das logische UND (&&) genau dann den Wert true, wenn beide Operanden den Wert true haben. Der Vorteil der binären Variante ist, dass der Prozessor nicht nur ein einzelnes Bit, sondern gleich alle Bits zweier Zahlen auf diese Art und Weise miteinander verknüpfen kann. Dazu werden - bildlich gesprochen - einfach beide Operanden in ihrer Binärdarstellung übereinander geschrieben und dann jeweils die direkt untereinander stehenden Bits miteinander verknüpft.</td></tr>
<tr><td>ODER</td><td><center>|</center></td><td>liefert analog zum logischen ODER (||) eine 1, wenn mindestens einer der beiden Operanden an der betreffenden Stelle eine 1 hat. Im Umkehrschluss gibt es also nur dann eine 0 als Ergebnis, wenn beide Operanden an der Stelle eine 0 haben. In gewissem Sinne ist die ODER-Verknüpfung also der Gegenpart zur UND-Verknüpfung, man spricht daher auch von der Dualität der beiden Operationen.</td></tr>
<tr><td>Entweder-ODER</td><td><center>?</center></td><td>auch XOR (engl.: exclusive-or, deutsch: exklusives Oder) genannt, liefert ebenso wie das logische xor das Ergebnis 1, wenn genau einer der beiden Operanden an der Stelle eine 1 hat. Haben beide Operanden eine 0 oder beide eine 1, ist das Ergebnis 0.</td></tr>
<tr><td>NICHT <br />Negation </td><td><center>~</center></td><td>kehrt alle Bits einer Zahl um und benötigt daher nur einen Operanden. Dies entspricht wiederum dem logischen not. Auch wenn die Negation das Vorzeichen einer Zahl umkehrt, entspricht sie doch nicht der Multiplikation mit -1.</td></tr>
</table></li>
<br />
<li>Für alle binären Operationen gilt, dass sie in der Dezimalschreibweise keinen wirklichen Sinn machen.</li>
<br />
<li><h3>Anwendungen für bitweise Verknüpfungen</h3>
<ul>
<li><b>UND-Verknüpfung ("&")</b><br /></li>
→ <u>um gezielt einzelne Bits zu löschen;</u><br />
→ der erste Operand wird mit einer sog. Bitmaske (auch: Maske) verknüpft;<br />
→ diese Maske ist eine Zahl, die folgenden Aufbau hat:
<ol>
<li>alle diejenigen Bits sind auf "1" gesetzt, die im ersten <br />
Operanden erhalten bleiben sollen</li>
<li>alle diejenigen Bits sind auf "0" gesetzt, die gelöscht werden sollen</li>
</ol>
<img src="./pictures/Bit_UND_Verknuepfung.jpg" width=120 height=130>
<br />
<li><b>ODER-Verknüpfung ("|")</b><br />
→ <u>um gezielt Bits zusätzlich zu setzen</u><br />
→ der erste Operand wird mit einer (Bit-)Maske verknüpft;<br />
→ die Maske ist eine Zahl, die folgenden Aufbau hat:
<ol>
<li>alle diejenigen Bits sind auf "1" gesetzt, die im Ergebnis zusätzlich<br />
gesetzt sein sollen;</li>
<li>alle anderen Stellen der Maske haben den Wert "0"</li>
</ol>
<img src="./pictures/Bit_ODER_Verknuepfung.jpg" width=120 height=130>
</li>
<br />
<li><b>Entweder-ODER-Verknüpfung ("ˆ")</b><br />
→ Die binäre Entwerder-ODER-Verknüpfung findet Anwendung <br />
bspw. in der Kryptographie bei der Bildung von binären Quersummen (Paritäten).<br />
→Eine verblüffende Eigenschaft der Entweder-ODER-Verknüpfung soll <br />
hier allerdings benannt werden:<br />
Verknüpft man eine Zahl mit sich selbst, kommt immer 0 dabei heraus. <br />
→Diese Eigenschaft machen sich manche Compiler zu Nutze, die besonders <br />
schnellen Maschinencode produzieren wollen. Statt ein Register per Zuweisung auf 0<br />
zu setzen, verknüpfen sie es einfach per Entweder-ODER mit sich selbst, was<br />
ein kleines bisschen schneller ist. In PHP besteht dazu aber keine Notwendigkeit. <br />
<img src="./pictures/Bit_Entweder-ODER_Verknuepfung.jpg" width=120 height=130></li>
</ul>
</ul>
</html>
<html>
<ol>
<li><h3>Cookie-Einstellungen - MS Internet Explorer (ab Version 8)</h3>
Öffnen Sie im Browsermenü “<b>Extras</b>“ den Menüpunkt “<b>Internetoptionen“</b>. <br />
Wählen Sie die Registerkarte “<b>Datenschutz“</b> aus.<br />
<br />
Abbildung: Internetoptionen im MS Internet Explorer
Beschreibung der Abbildung
Abbildung: Internetoptionen im MS Internet Explorer
Klicken Sie auf Erweitert um das Fenster Erweiterte Datenschutzeinstellungen zu öffnen.
Abbildung: Erweiterte Datenschutzeinstellungen
Beschreibung der Abbildung
Abbildung: Erweiterte Datenschutzeinstellungen
Aktivieren Sie die Option Automatische Cookiebehandlung aufheben, um die Cookie-Einstellungen manuell vorzunehmen: Erstanbieter sind die Betreiber der Website, deren Adresse Sie im Browser aufgerufen haben. Drittanbieter sind Anbieter einer anderen Domain, beispielsweise Werbepartner. Für beide können Sie die Annahme von Cookies:
grundsätzlich erlauben, wenn Sie Annehmen wählen.
grundsätzlich verbieten, wenn Sie Blocken wählen.
von der Zustimmung im Einzelfall abhängig machen, wenn Sie Bestätigen wählen.
Wir empfehlen Ihnen, Cookies von Drittanbietern grundsätzlich zu blocken. Außerdem können Sie den Browser anweisen, Sitzungscookies, wie wir sie im Verlauf des Kapitels 3.3 erläutern werden, immer zuzulassen. Bestätigen Sie Ihre Einstellungen jeweils mit OK.
</li>
<li><h3>Cookie-Einstellungen - Mozilla Firefox (ab Version 3.5.x)</h3>
Öffnen Sie im Browsermenü “<b>Extras</b>“ unter “<b>Einstellungen</b>“ das Fenster “<b>Datenschutz & Sicherheit“</b>. <br />
<br />
Abbildung: Einstellungen - Mozilla Firefox<br />
Beschreibung der Abbildung<br />
<br />
Erstanbieter sind die Betreiber der Website, deren Adresse Sie im Browser <br />
aufgerufen haben.<br />
Drittanbieter sind Anbieter einer anderen Domain, beispielsweise Werbe‐<br />
partner. Durch Auswahl von “<b>Cookies akzeptieren</b>“ erlauben Sie die Cookies <br />
von Erstanbietern. Cookies von Drittanbietern erlauben Sie durch Auswahl<br />
von Cookies von “<b>Drittanbietern akzeptieren</b>“. Wir empfehlen Ihnen,<br />
Cookies von Drittanbietern <b>grundsätzlich nicht</b> zu erlauben.<br />
<br />
Sie können entscheiden, wie lange die Cookies gespeichert werden. Klicken<br />
Sie dazu auf das Auswahlmenü neben “<b>Behalten bis</b>“, und wählen Sie: <br />
<br />
<ul>
<li> Firefox geschlossen wird, <br />
um die Cookies bei Beendigung von Firefox zu löschen (empfohlen).</li>
<li> sie nicht mehr gültig sind, <br />
um die Cookies bis zum Ende ihrer Gültigkeit zu behalten.</li>
<li> jedes Mal nachfragen, <br />
um beim Beenden von Firefox gefragt zu werden, was mit den Cookies geschehen soll.</li>
</ul>
<br />
Bestätigen Sie Ihre Einstellungen mit OK.<br />
</li>
</ol>
<h3>Link:</h3>
<a href="https://praxistipps.chip.de/cookies-aktivieren-im-firefox_7982" target=_blank>Chip :: Cookies im FireFox aktivieren </a>
</html>
<html>
<h3>Kontrollierter Abbruch eines Skripts</h3>
<ul>
</ul>
<h3>Dateien</h3>
<ul>
</ul>
<h3>Dateien auslesen</h3>
<ul>
</ul>
<h3>Dateien öffnen und schließen</h3>
<ul>
</ul>
<h3>Inhalte aus Dateien auslesen</h3>
<ul>
</ul>
<h3>Inhalte in Dateien schreiben</h3>
<ul>
</ul>
<h3>Datei in ein Array auslesen</h3>
<ul>
</ul>
<h3>Umgang mit Zeilenwechseln beim Auslesen</h3>
<ul>
</ul>
<h3>Fehler bei Dateioperationen</h3>
<ul>
</ul>
<h3>Praxis: Zeilen in einer Datei ersetzen</h3>
<ul>
</ul>
<h3>Praxis: Seitenaufrufzähler </h3>
<ul>
</ul>
</html>
<html>
<h3>Die Kommunikation zwischen Webbrowser und Webserver</h3>
<ul>
<li>
<b>Definition</b><br />
Wann immer Rechner miteinander Daten austauschen wollen, muss die dafür<br />
notwendige Kommunikation nach vorab definierten Regeln ablaufen. Diese <br />
Regeln geben vor, wie eine Anfrage gestellt werden muss und wie eine pas‐<br />
sende Antwort auszusehen hat. Außerdem wird festgelegt, in welcher Reihen‐<br />
folge Anfragen möglich sind. Diese Kommunikationsregeln werden zusammen‐<br />
fassend als <b>Protokoll</b> bezeichnet.</li>
<br />
<li>Die Kommunikation zwischen Webbrowser und Webserver wird von ver‐<br />
schiedenen Protokollen geregelt.</li>
<br />
<li> Das HTTP-Protokoll wird benutzt, sobald der Webbrowser eine Verbindung <br />
zum Webserver aufgebaut hat. HTTP regelt nun, wie der Webbrowser die<br />
vom Nutzer gewünschte Datei vom Webserver anfordern kann. Die Initiative<br />
geht also immer vom Webbrowser aus und damit letztendlich vom User, der<br />
den Browser bedient.</li>
<br />
<li></li>
<br />
<li></li>
<br />
<li></li>
</ul>
<h3>HTTP - Ein Beispiel</h3>
<ul>
</ul>
<h3>HTTP - Anfragen und Antworten</h3>
<ul>
<li>Der Nachrichtenaustausch in HTTP richtet sich immer nach dem gleichen Muster:<br />
<ul>
<li> <b>Request:</b> Der Client (= Webbrowser) stellt eine Anfrage an den Server (= Webserver).</li>
<li> <b>Response:</b> Der Server beantwortet die Anfrage des Clients.</li>
</ul></li>
<br />
<li>Jede Nachricht besteht aus zwei Teilen:<br />
<ul>
<li>Zuerst wird der Nachrichtenkopf (engl.: Header) gesendet. Er enthält bei <u>Anfragen</u><br />
(Requests) den Anfragetyp und die Version des zu verwendenden Protokolls. Bei <u>Antworten</u><br />
(Responses) des HTTP-Servers enthält der Header neben der Protokollversion und dem <br />
Response-Code weitere Informationen.</li>
<br />
<li>Die eigentlichen Inhalte werden im Nachrichtenkörper (engl.: Body) verschickt. <br />
HTTP-Requests senden im Body beispielsweise die Eingaben, die ein Benutzer in <br />
einem Formular gemacht hat und die nun an den Server gesendet werden. In den<br />
Antworten des Servers beinhaltet der Nachrichtenkörper meist die angeforderten <br />
Inhalte, also beispielsweise HTML-Quelltext</li></ul>
<br />
<li>Der Client kann zwischen acht verschiedenen Anfragetypen (Request-Typen) auswählen:
<table border="1">
<tr><th>Anfragetyp </th><th>Bedeutung</th></tr>
<tr><td>GET </td><td>fordert Inhalte/Dateien an.</th></tr>
<tr><td>POST </td><td>fordert ebenfalls Inhalte/Dateien an, überträgt aber eventuelle Parameter anders als GET.</th></tr>
<tr><td>HEAD </td><td>Der Server beantwortet die Anfrage wie gewohnt, sendet aber die eigentliche Datei nicht mit.</th></tr>
<tr><td>PUT </td><td>lädt Datei auf den Server hoch.</th></tr>
<tr><td>DELETE </td><td>löscht Datei auf dem Server.</th></tr>
<tr><td>TRACE </td><td>Der Server sendet die Anfrage so zurück, wie er sie bekommen hat. <br />
So kann festgestellt werden, ob die Anfrage unterwegs verändert wurde.</th></tr>
<tr><td>OPTIONS </td><td>fragt eine Liste zusätzlich angebotener Funktionalität des Servers an.</th></tr>
<tr><td>CONNECT </td><td>baut eine verschlüsselte Verbindung über einen Proxy-Server auf.</th></tr>
</table>
Von diesen Anfragetypen sind heutzutage nur noch <b>GET</b> und <b>POST</b> in der<br />
Praxis von Bedeutung. Beide Varianten fordern eine Datei vom Server an, <br />
unterscheiden sich dabei allerdings ein wenig in der Handhabung. </li>
<br />
<li>Der Server antwortet auf Anfragen immer mit einem sogenannten <b>Response-Code</b>.<br />
Durch ihn kann der Server mitteilen, ob die Anfrage erfolgreich bearbeitet werden konnte <br />
oder ob Probleme aufgetaucht sind. Die wichtigsten Response-Codes lauten:
<table borde="1">
<tr><th>Response-Code </th><th>Bedeutung</th></tr>
<tr><td>200 OK </td><td>Die Anfrage wurde erfolgreich bearbeitet.</td></tr>
<tr><td>301 Moved Permanently</td><td> Die Datei ist unter der angegebenen Adresse <br />
nicht mehr erreichbar, die neue Adresse der Datei <br />
ist in der Serverantwort enthalten.</td></tr>
<tr><td>400 Bad Request</td><td>Die vom Client gestellte Anfrage ist nicht gültig.</td></tr>
<tr><td>404 Not Found </td><td>Die angeforderte Datei konnte nicht gefunden werden.</td></tr>
</table></li>
</ul>
<h3>Cookies</h3>
<ul>
<li>HTTP ist ein zustandsloses Protokoll. Das bedeutet, dass ein Webserver sich normaler‐<br />
weise nicht merkt, mit welchen Clients er kommuniziert. Manchmal kann es aber sinnvoll sein,<br />
wenn ein Webserver einen Client bei einer erneuten Anfrage wiedererkennt. Dazu bietet HTTP<br />
die Möglichkeit an, kleine Informationspakete, die sogenannten Cookies, auf dem Client<br />
zu hinterlassen.</li>
<br />
<li><b>Definition</b><br />
Der Begriff <b>Cookie</b> (deutsch: Keks) bezeichnet in HTTP einen Wert, der vom Webserver<br />
zum Speichern an den Client (Webbrowser) gesendet wird. Bei nachfolgenden Anfragen, die der <br />
Client an den Webserver schickt, wird der Inhalt des Cookies im HTTP-Header übertragen.</li>
<br />
<li>Der Einsatz von Cookies ist vielfältig:<br />
<ul>
<li>Mit Hilfe von Cookies können Webseiten ihren Benutzern die Möglichkeit anbieten,<br />
Einstellungen zu speichern, ohne dass dieser daför ein personalisiertes Login benötigt.</li>
<li> Cookies werden außerdem verwendet, um die Verwaltung von Sessions zu vereinfachen.</li>
<li> Viele Anbieter nutzen Cookies allerdings, um implizit mehr Informationen über die Surf‐<br />
gewohnheiten des Benutzers zu erhalten. Daher konfigurieren viele Anwender ihren Browser so, <br />
dass die Annahme von Cookies verweigert wird oder dass alle Cookies gelöscht werden, sobald<br />
der Browser geschlossen wird. </li>
</ul></li>
<br />
<li>Wenn man in seinen PHP-Skripten den Webbrowser des Benutzers auffordern will, einen <br />
Cookie zu speichern, kann man dazu die Funktion <b>setcookie()</b> verwenden,<br />
<br />
Die <b>setcookie()</b>-Funktion muss verwendet werden, bevor irgendwelche anderen<br />
Ausgaben an den Browser des Benutzers gesendet wurden: Das Skript darf also vor der <br />
Verwendung von setcookie() <b>keine</b> der folgenden Elemente bzw. Zeichen enthalten:
<ul>
<li> HTML-Tags</li>
<li> Leerzeilen oder Einrückungen außerhalb der Umgebung <?php ... ?></li>
<li> echo()-Anweisungen</li>
</ul>
Ist dies doch der Fall, gibt setcookie() den Wert “false“ zurück und der Cookie <br />
wird nicht an den Benutzer gesendet.</li>
<br />
<li>
Für den Zugriff auf den Wert eines Cookies bietet PHP Ihnen das globale assoziative <br />
Array $_COOKIES an. Dieses Array wird von PHP automatisch bereitgestellt. Als Index für den <br />
Zugriff auf das Array wird der Name des Cookies verwendet, auf den man zugreifen will.</li>
</ul>
<h3>Parameter der Funktion setcookie( ) </h3>
<ul>
Die Funktion setcookie()erlaubt bis zu sieben Parameter, von denen nur der Name, also der<br />
erste Parameter, verpflichtend angegeben werden muss.
<table border="1">
<tr><th>Name </th><th>Typ</th><th>Beschreibung</th></tr>
<tr><td>Name </td><td>string </td><td>Name des Cookies</td></tr>
<tr><td>Wert</td><td>string</td><td>Inhalt (Wert) des Cookies
<b>Vorgabewert:</b> Nicht gesetzt</td></tr>
<tr><td>Ablaufzeit</td><td>int </td><td>Zeit (in Sekunden seit 01.01.1970), zu der der Cookie abläuft. Ist der Wert 0, läuft der Cookie ab, sobald der Browser geschlossen wird.<br />
<b>Vorgabewert:</b> 0</td></tr>
<tr><td>Pfad </td><td>string </td><td>Gibt die Erreichbarkeit des Cookies auf dem Server an; Wird der Pfad mit einem Slash (/) angegeben, können alle Skripte, die sich auf dem Server befinden, den Cookie lesen. Ist der Pfad mit beispielsweise kapitel_3 angegeben, können nur Skripte im Verzeichnis kapitel_3 und dessen Unterverzeichnissen den Cookie lesen.<br />
<b>Vorgabewert:</b> Verzeichnis, aus dem setcookie() aufgerufen wird</td></tr>
<tr><td>Domäne </td><td>string </td><td>Domänenname (z. B. meinedomain.de), für den der Cookie zur Verfügung stehen soll. Alle Server, die Teil der angegebenen Domäne sind, können den Cookie lesen und werden dem Browser bei einer Anfrage übermittelt.<br />
<b>Vorgabewert:</b> Der vollständige Domänenname des Servers, der setcookie() aufgerufen hat, also beispielsweise www.meinedomain.de</td></tr>
<tr><td>Erzwinge HTTPS </td><td>boolean </td><td>Wenn true, wird der Cookie nur gesendet, wenn eine sichere (HTTPS-) Verbindung besteht.<br />
<b>Vorgabewert:</b> false</td></tr>
<tr><td>Nur HTTP(S) </td><td>boolean </td><td>Wenn true, dann können Cookies nur über das HTTP- oder HTTPS-Protokoll und nicht beispielsweise per JavaScript gelesen und verändert werden.<br />
<b>Vorgabewert:</b> false<br />
Ab PHP-Version 5.2.0 verfügbar</td></tr>
</table>
Die Tabelle zeigt von oben nach unten die Reihenfolge, in der die Parameter an setcookie<br />
übergeben werden müssen. Der erste Parameter ist demnach der Name, <br />
der zweite der Wert usw. Wenn man für einen Parameter keinen Wert angibt, so <br />
wird der Standardwert genommen. Zwingend erforderlich ist nur die Angabe des Namens,<br />
alle anderen Parameter sind optional. Man beachte, dass nicht einzelne Parameter <br />
"übersprungen" werden können. Wenn man also beispielsweise auf die <br />
Pfadangabe verzichtet, können auch keine Angaben zur Domäne, “Erzwinge HTTPS“ und “nur HTTP(S)“ gemacht werden.<br />
Die Angabe der Ablaufzeit erfolgt seit dem 01.01.1970 (Epoch) in Sekunden. Zur Erleichterung<br />
dieser Berechnung bietet PHP die Funktion <b>time()</b> an, die die Anzahl an Sekunden<br />
zurückliefert, die bis zum jetzigen Zeitpunkt seit Epoch vergangen sind. Auf diesen <br />
Wert kann man die gewünschte Gültigkeitsdauer in Sekunden (beispielsweise <br />
3600 für eine Stunde) addieren. Liegt die Ablaufzeit in der Vergangenheit, so wird der<br />
Cookie ungültig und beim nächsten Aufruf nicht mehr durch den Browser übermittelt. <br />
Diese Technik macht man sich bei der Beendigung einer Session zunutze.</li>
<br />
<li><b>Hinweis</b></br>
Man bedenke, dass es keine Garantie gibt, dass der Browser des Benutzers <br />
den Cookie akzeptiert oder bei der nächsten Anfrage mitsendet. Man sollte<br />
also immer darauf achten, dass die Skripte auch ohne Cookies ordnungsge‐<br />
mäß funktionieren.</li>
</ul>
</html>
<html>
<ul>
<li>In PHP (und anderen Sprachen) gibt es den speziellen Daten-<br />
typ NULL gibt. Dieser Datentyp kann ausschließlich den gleich-<br />
namigen Wert <b>NULL</b> beinhalten. Er besagt, dass eine Variable<br />
keinen Wert gespeichert hat.</li>
<br />
<li>Eine Variable hat den Wert NULL, wenn:
<ul>
<li>keine Wertzuweisung stattgefunden hat,</li>
<li>sie mit der Funktion <b>unset()</b> gelöscht wurde,</li>
<li>der zugewiesene Wert NULL ist.</li>
</ul>
</li>
<br />
<li><b>Hinweis</b><br />
In einigen Programmiersprachen wie beispielsweise C/C++ ist der Wert <br />
<b>NULL</b> identisch mit der Zahl 0. In PHP ist dies <b>nicht</b> der Fall.
</li>
</ul>
</html>
<html>
<ul>
<li> Nicht nur der Platz, auch die <b>Art der Speicherung</b> unterscheidet sich <br />
je nach Datentyp:<br />
<br />
<ul><li> <u>Ganzzahlen</u> werden in ihrer Binärdarstellung gespeichert; </li>
<li> <u>Fließkommazahlen</u> nach der Norm IEEE754;</li>
<li> <u>Zeichenketten</u> in ASCII-Code</li>
</ul></li>
<br />
<li> <u>In PHP gibt es insgesamt 8 Datentypen:</u><br />
<br />
<b>Skalarer Datentyp:</b><br />
wird im Speicher als Zahl abgelegt.<br />
• <u>Ganzzahl</u> (integer)<br />
• <u>Fließkommazahl</u> (float / double)<br />
• <u>Zeichenketten</u> (string)<br />
• <u>Wahrheitswert</u> (boolean) <br />
<br />
<b>Zusammengesetzter Datentyp:</b><br />
besteht aus mehreren Einzelwerten, die unterschiedlichen Typs sein können.<br />
• <u>Array</u><br />
• <u>Object</u><br />
<br />
<b>Spezieller Datentyp:</b><br />
• <i>resource</i><br />
⇒ verweist auf Daten aus anderen Quellen, wie z. B. Dateien, Bilder und Datenbanken<br />
• <u>NULL</u><br />
⇒ Der Datentyp NULL nimmt eine Sonderrolle ein, wird später behandelt;
</li>
<br />
<li> Der Datentyp einer Variablen wird bei der Zuweisung automatisch festgelegt. <br />
Mit Hilfe der Funktion <b>gettype()</b> kann man sich den Datentyp anzeigen lassen.</li>
</ul>
</html>
<html>
<h3>Zeitstempel</h3>
<ul>
</ul>
<h3>Zeitstempel erstellen</h3>
<ul>
</ul>
<h3>Zeitstempel auswerten</h3>
<ul>
</ul>
<h3>Datums- und Zeitangaben formatiert ausgeben</h3>
<ul>
</ul>
<h3>Datumsangaben prüfen</h3>
<ul>
</ul>
<h3>Differenzen von Zeitpunkten bilden</h3>
<ul>
</ul>
<h3>Praxis: Das Alter einer Person bestimmen</h3>
<ul>
</ul>
<h3>Praxis: Datum der letzten Aktualisierung </h3>
<ul>
</ul>
</html>
<html>
<ul><li><table border="1">
<tr><th>Name</th><th> Operator </th><th>Bedeutung</th></tr>
<tr><td>Inkrement</td><td><center> ++</center></td> <td>Der Wert einer Variablen wird um 1 erhöht.</td></tr>
<tr><td>Dekrement</td><td><center> --</center> </td><td>Der Wert einer Variablen wird um 1 erniedrigt</td></tr>
</table>
</li>
<li>Der Inkrementoperator verändert immer den Wert der Variablen, <br />
egal, ob er nur Teil eines Ausdrucks ist oder alleine eine Anweisung <br />
bildet. Dies gilt entsprechend auch für den Dekrementoperator.</li>
<br />
<li>Bei der Verwendung der Inkrement- und Dekrementoperatoren innerhalb <br />
eines Ausdrucks ist von entscheidender Bedeutung, ob der Operator vor oder <br />
nach der Variablen steht:<br />
<ul>
<li><b>Prä-Inkrement und Prä-Dekrement: </b><br />
Steht der Operator vor der Variablen, wird diese erst erhöht<br />
bzw. erniedrigt und dann der Ausdruck ausgewertet.</li>
<li><b>Post-Inkrement bzw. Post-Dekrement:</b> <br />
Steht der Operator nach der Variablen, wird erst der Ausdruck<br />
ausgewertet und danach der Variablenwert erhöht bzw. erniedrigt.</li></ul></li>
<br />
<li>Wird der Inkrement- oder Dekrementoperator vor den Variablennamen <br />
geschrieben (<b>Prä-Schreibweise</b>), so wird zuerst die Variable verändert <br />
und dann ausgewertet. <br />
Wird der Operator hinter den Variablennamen (<b>Post-Schreibweise</b>) geschrieben, <br />
so wird zuerst die Variable ausgewertet und dann verändert.</li>
<br />
<li><b>Ein Tipp für den Anfang:</b> <br />
Die Prä- und Post-Schreibweise kann zwar recht nützlich sein, man sollte sie<br />
aber besser nur sparsam einsetzten, denn die Lesbarkeit des Codes wird dadurch erheblich<br />
verschlechtert. Es ist üblich, die Post-Schreibweise zu verwenden, wenn man in einer Anweisung<br />
nichts anderes machen möchte, als den Wert einer Variablen hochzuzählen. Ebenso ist diese<br />
Schreibweise in Zählschleifen weit verbreitet. Die meisten (auch erfahrenen)<br />
Programmierer verzichten aber aus gutem Grund darauf, in komplexeren Ausdrücken den Inkrement- oder<br />
Dekrementoperator zu benutzen. Die Fehleranfälligkeit ist in den meisten Fällen deutlich größer als<br />
der Nutzen. </li>
</ul>
</html>
<html>
<ul>
<li><b>Definition:</b><br />
Formal betrachtet sind Operatoren mathematische Vorschriften, durch <br />
die aus einem oder mehreren Eingangswerten (den Operanden) ein <br />
Ausgangswert (Ergebnis) gebildet wird. In der Praxis bedeutet dies, dass <br />
man mit Hilfe von Operatoren Berechnungen durchführen kann.
</li>
<br />
<li><h3>Zusammenfassung der wichtigsten PHP-Operatoren</h3>
<table border="1">
<tr><th>Operator</th><th>Beschreibung</th></tr>
<tr><td>Zuweisung </td><td>Speicherung von Werten in Variablen</td></tr>
<tr><td>Arithmetische Operatoren </td><td>Grundrechenarten: Addition, Subtraktion, Multiplikation, Division, Modulo</td></tr>
<tr><td>Dekrement- und Inkrementoperatoren</td><td>Spezielle Operatoren zum Auf- und Abwärtszählen</td></tr>
<tr><td>Klammeroperator </td><td>Festlegen der Reihenfolge bei mehreren Operatoren</td></tr>
<tr><td>Logische Operatoren </td><td>Verknüpfung von Wahrheitswerten</td></tr>
<tr><td>Vergleichsoperatoren </td><td>Vergleich von Werten</td></tr>
<tr><td>Bit-Operatoren </td><td>Verknüpfung von einzelnen Bits</td></tr>
<tr><td>Zeichenkettenoperator </td><td>Zusammenfügen mehrerer Zeichenketten</td></tr>
<tr><td>Operatoren für zusammengesetzte Zuweisung </td><td>Zusammenfassung einer Berechnung und einer Zuweisung in einem Operator</td></tr>
</table>
</li>
<br />
</ul>
</html>
<html>
Wenn man wissen möchten, wie groß die größte Ganzzahl ist, die auf dem Rechner <br />
in PHP dargestellt werden kann, verwendet man die Konstante <b>PHP_INT_MAX</b>, <br />
die genau diesen Zahlenwert beinhaltet. <br />
<br />
Die kleinste (negative) speicherbare Zahl ist <b>PHP_INT_MAX + 1</b> mit negativem Vorzeichen, <br />
also -2.147.483.648. <br />
<br />
Die Konstante <b>PHP_INT_SIZE</b> speichert die Anzahl der Bytes, die für jede <br />
Ganzzahl zur Verfügung gestellt wird, im Regelfall sind es 4 Bytes (32 Bit).<br />
<br />
<b>Beispiel</b><pre><code>
1.<?php
2. echo PHP_INT_MAX ."<BR />n ";
3. echo PHP_INT_SIZE ."<BR />n ";
4.?>
</code></pre>
</html>
<html>
<ul>
<li><b>Doppelte Anführungszeichen ( <i>"</i> ) </b><br />
- Variablen werden berücksichtigt und deren <br />
Inhalt ausgegeben;<br />
- Der Inhalt zwischen den Anführungszeichen wird <br />
von PHP ausgeführt</li>
<br />
<li><b>Einfache Anführungszeichen ( <i>' </i> )</b><br />
- Es wird im Browser exakt das ausgegeben, was zwischen<br />
den einfachen Anführungszeichen steht, ohne auf vor-<br />
handene Variablen zu achten</li>
</ul>
</ul>
</html>
<html>
Eine Datei mit folgendem Inhalt in dem Verzeichnis <b>${Document-Root-Dir}</b> anlegen:<br/>
<br /><code>
<?php <br />
phpinfo()<br />
?><br />
</code><br />
Im Webbrowser die URL <br />
<br /><code>
http://localhost/<b><FileName></b>.php
</code><br /><br />
aufrufen.<br />
"FileName" z.B. phpinfo.php
</html>
<html>
<h2>PHP Fatal error: Call to undefined function gzinflate()</h2>
<code><pre>
I have a php script and whenever I run it, I get the following error message in my log file:
2017/02/05 23:25:46 [error] 9696#9696: *10 FastCGI sent in stderr:
„PHP message: PHP Fatal error: Call to undefined
function gzinflate() in /home/xxxx/http/includes/functions.php(1) :
eval()'d code on line 1“ while reading response
header from upstream, client: 10.218.105.1, server:
newsletter.cyberciti.biz, request: „GET /a/
HTTP/1.0“, upstream:
„fastcgi://127.0.0.1:9000“,
host: „server1.cyberciti.biz“
How do I fix this problem on Alpine Linux or Unix operating systems?
</pre></code>
You need to use Zlib. The Zlib support in PHP is <b>not</b> enabled </br />
by default. You will need to configure PHP ‐with-zlib[=DIR]. The Win-</br />
dows version of PHP has built-in support for this extension. You do not </br />
need to load any additional extensions in order to use these functions. </br />
However, on Linux or Unix you need to install php5-zlib or php7-zlib as</br />
per your distro.</br />
<h3>Install php5-zlib or php7-zlib on Alpine Linux:</h3>
<code><pre>
# apk add php5-zlib
</pre></code>
OR
<code><pre>
# apk add php7-zlib
</pre></code>
You must restart php-fpm or apache/lighttpd process:</br />
<code><pre>
# rc-service php-fpm restart
</pre></code>
OR
<code><pre>
# /etc/init.d/php-fpm restart
</pre></code>
<h3>Install php56-zlib on FreeBSD</h3>
Type the following command:</br />
<code><pre>
# pkg install php56-zlib
</pre></code>
OR</br />
<code><pre>
# pkg install php70-zlib
</pre></code>
Make sure you restart the php-fpm:</br />
<code><pre>
# service php-fpm restart
</pre></code>
<br />
Link:<br />
https://www.cyberciti.biz/faq/php-fatal-error-call-to-undefined-function-gzinflate/<br />
<br />
</html>
<html>
<ol>
<li><b>vergessenes Semikolon ( <i>;</i> )</b><br />
Parse error: ... expecting "," or ";" mit Angabe der Zeilennummer <i>N</i><br />
⇒ der Fehler ist aber in einer der Zeilen vor der angegebenen Zeile</li><br />
<li><b>vergessenes zweites Anführungszeichen ( <i>"</i> )</b><br />
Parse error: ... unexpected T_STRING, ...<br />
Dies tritt auch auf, wenn ein Anführungszeichen "zviel" ist: <br />
<code>$a = "Er sagte: "Hallo!"";</code><br />
Hier sollte der String "Hallo!" im String "Er ..." eingeschlossen werden.</li>
<br />
<li><b>vergessene Abschlußklammer ( <i>)</i> )</b><br />
⇒ am besten einen Editor verwenden, der das unterstützt;<br />
z.B. der Editor <i>Scripty</i> setzt automatisch die Klammern und die<br />
doppelten Anführungszeichen (Einstellbar unter: Optionen → Ersetzen → ( durch ()</li>
</ol>
<ul>
<li><b>Farbiger Quellcode hilft bei der Orientierung im Code:</b><br />
Falls dies nicht vorhanden ist, kann man dass selber programmieren:<br />
einfach folgendes PHP-Programm erstellen:
<pre><code>show_source('<i>FileName.php</i>');</code></pre>
⇒ Die Angabe des Quellcodes der Datei erfolgt dann mit hervorgehobener Syntax</li>
</ul>
</html>
<html>
<h2>ErrorMsg - PHP Fatal error: Call to undefined function curl_init() in /home/httpd/a/includes/functions.php(1)</h2>
You need to install the CURL module for PHP 5 or 7. <br />
<br />
CURL is a library that lets you make HTTP requests in PHP. <br />
In order to use PHP's cURL functions you need to install the <br />
libcurl package. <br />
<br />
To solve this problem install php-curl as per your Linux / Unix <br />
distro and restart the web-server or php-fpm service.<br />
<br />
<h3>Install CURL module for PHP on Ubuntu / Debian Linux</h3>
Type the following apt-get command or apt command to install <br />
CURL module for PHP 5.x:
<code><pre>
$ sudo apt-get install php-curl
</pre></code>
Type the following apt-get command or apt command to install<br />
CURL module for PHP 7.x:
<code><pre>
$ sudo apt-get install php7.0-curl
</pre></code>
<h3>Install CURL module for PHP on RHEL/CentOS/Scientific Linux</h3>
Type the following yum command:
<code><pre>
$ sudo yum install php-curl
</pre></code>
OR
<code><pre>
$ sudo yum install php-common
</pre></code>
The above should install php-common to enable curl support.
<h3>Install CURL module for PHP on Alpine Linux</h3>
Type the following apk command:
<code><pre>
# apk add php5-curl
</pre></code>
OR
<code><pre>
# apk add php7-curl
</pre></code>
<h3>Install CURL module for PHP on FreeBSD Unix</h3>
To install the port for PHP 5.x:
<code><pre>
# cd /usr/ports/ftp/php56-curl/ && make install clean
</pre></code>
Or To add the package for PHP 5.x use the pkg command:
<code><pre>
# pkg install php56-curl
</pre></code>
To install the port for PHP 7.x:
<code><pre>
# cd /usr/ports/ftp/php70-curl/ && make install clean
</pre></code>
Or To add the package for PHP 7.x:
<code><pre>
# pkg install php70-curl
</pre></code>
<h3>Restart Apache/Nginx or PHP-FPM service</h3>
Type the following command to restart nginx:
<code><pre>
$ sudo service nginx restart
</pre></code>
OR
<code><pre>
$ sudo /etc/init.d/nginx restart
</pre></code>
OR
<code><pre>
$ sudo systemctl restart nginx
</pre></code>
OR
<code><pre>
# rc-service nginx restart
</pre></code>
If you are using php-fpm, enter:
<code><pre>
# rc-service php-fpm restart
</pre></code>
OR
<code><pre>
# /etc/init.d/php7.0-fpm restart
</pre></code>
OR
<code><pre>
# /etc/init.d/php5.0-fpm restart
</pre></code>
OR
<code><pre>
$ sudo systemctl restart php7.0-fpm.service
</pre></code>
<br />
Link:<br />
https://www.cyberciti.biz/faq/php-fatal-error-call-to-undefined-function-curl_init-in-homehttpdaincludesfunctions-php1/</br />
</html>
<html>
<h2>Warnhinweis!</h2>
<ul>
<li><b>Verwechsle nicht den Vergleich (==) mit der Zuweisung (=).</b><br />
Im Deutschen werden beide Operationen umgangssprachlich mit <br />
dem Wort "gleich" beschrieben, sind aber völlig unterschiedlich.</li>
<br />
<li>Die Tücke liegt darin, dass auch die Zuweisung (=) einen Wert zurückliefert <br />
(nämlich genau den Wert, der auf der rechten Seite der Zuweisung steht), der sich als<br />
<b>Wahrheitswert</b> interpretieren lässt. </li>
<br />
<li>Durch automatische Typumwandlung wird beispielsweise die Zahl 0 als <b>false</b><br />
interpretiert, alle anderen Zahlen als <b>true</b>.</li>
<br />
<li>
<b>Hinweis</b><br />
Achte also bei der Programmierung immer darauf, ob Du gerade <br />
einen Vergleich oder eine Zuweisung meinst. Am besten ist es, in <br />
regelmäßigen Abständen die Funktionalität zu testen, sodass solche <br />
Fehler früh auffallen und keinen weiteren Schaden anrichten können.
</li>
</ul>
</html>
<html>
<code><pre>
<head>
<?php
$fileWrite = '';
$myFile = "testFile.txt";
if(isset($_POST['fileWrite']) && !empty($_POST['fileWrite'])) {
$fileWrite = $_POST['fileWrite'].PHP_EOL;
}
if($fileWrite) {
$fh = fopen($myFile, 'a') or die("can't open file"); //Make sure you have permission
fwrite($fh, $fileWrite);
fclose($fh);
}
?>
</head>
<body>
<form id=“some“ name=“someName“ method=“post“>
<input type=“text“ id=“some1“ class=“someClass“ value=““ name=“fileWrite“/>
<input type=“submit“ value=“submit“ class=“submitClass“/>
</form>
</body>
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://administrator.de/forum/html-formular-user-eingabe-in-txt-datei-speichern-350734.html" target="_blank">Administrator :: Forum </a></li>
<li><a href="https://stackoverflow.com/questions/16870876/writing-html-form-data-to-a-txt-file-without-the-use-of-a-webserver" target="_blank">StackOverflow (hier mit JavaScript stattt mit PHP)</li>
</ul>
</html>
<html>
<ul>
<li>Um Nachkommastellen abzubilden, gibt es die <b>Fließkommazahlen (float)</b>.</li>
<br />
<li>In früheren PHP-Versionen existiert noch der Begriff double, der für doppelte <br />
Genauigkeit steht. Da heute alle Fließkommazahlen in PHP mit doppelter <br />
Genauigkeit abgelegt werden, wird nur noch der Begriff <b>float</b> verwendet.</li>
<br />
<li>Da PHP wie alle Programmiersprachen seinen Ursprung im englischsprachigen <br />
Raum hat, wird statt des Kommas ein Punkt benutzt, also 1.24 statt 1,24 für die <br />
Zahl "eins Komma zwei vier".</li>
<br />
<li>Wenn die Anzahl der Nullen vor oder hinter dem Komma zu groß wird, kann man<br />
auch die <b>wissenschaftliche Schreibweise</b> verwenden. Die Zahl "eine Milliarde <br />
und zweihundert Millionen" kann man entweder als <b>1200000000</b> oder als <b>1.2E9</b><br />
(also eine 1.2, bei der das Komma um 9 Stellen nach rechts gerückt wird) schreiben.</li>
<br />
<li>PHP interpretiert folgende Werte als Fließkommazahl:<br />
<ul>
<li>eine Ganzzahl, die aufgrund ihrer Größe nicht als integer gespeichert werden kann,</li>
<li>einen Zahlenwert mit genau einem Dezimalpunkt,</li>
<li>einen Zahlenwert mit hinten angestelltem e (oder E), gefolgt von einer Ganzzahl <br />
zwischen -308 und +308.</li>
</ul>
<br />
<li>Das hinten angestellte e (oder E) mit Zahl ist der <b>Exponent</b>. Er besagt, dass<br />
bei der Zahl vor dem e (oder E), die sogenannte <b>Mantisse</b>, das Komma um die <br />
hinter dem e (oder E) angegebene Anzahl von Stellen (dem Exponenten) nach rechts <br />
(bei positivem Exponenten) oder links (bei negativem Exponenten) verschoben wird.</li>
<br />
<li>Eine Fließkommazahl wird intern grundsätzlich in der wissenschaftlichen <br />
Schreibweise mit Mantisse und Exponent abgelegt. Für Exponent, Mantisse und Vor-<br />
zeichen stehen auf den meisten Systemen insgesamt 64 Bit zur Verfügung.</li>
<br />
<li><b>Hinweis</b><br />
Es können zwar Zahlen mit bis zu 308 Stellen abgespeichert werden, aber diese <br />
Zahlen sind <b>nicht</b> bis auf die letzte Nachkommastelle genau. Im Gegenteil, <br />
sie sind aufgrund ihrer Speicherung immer nur auf etwa 11-12 Stellen genau. Wenn <br />
man also eine besonders große Zahl wie beispielsweise 123 Trillionen abspeichert,<br />
stimmen nur die ersten 11 bis 12 Ziffern. </li>
<br />
<li>Im Browser erhält man eine Ausgabe, in der die letzten 3 Ziffern (345) durch <br />
000 ersetzt wurden (ggf. in der Exponentialschreibweise). PHP kann die Zahl also nicht <br />
in voller Genauigkeit abspeichern, nur die ersten 12 Stellen stimmen mit dem geforderten <br />
Wert überein.</li>
<br />
<li>Die Genauigkeit der Zahlen wird außerdem dadurch beeinflusst, dass sich Nachkomma-<br />
stellen nicht immer exakt in eine binäre Darstellung umrechnen lassen. Auch hierbei passieren<br />
Fehler in den hinteren Nachkommastellen, sodass Berechnungen, die eigentlich glatt aufgehen<br />
sollten, ein klein wenig ungenau werden.</li>
<br />
<li><b>Hinweis</b><br />
Man muß sich also im Klaren darüber sein, dass begrenzter Speicher auch immer<br />
begrenzte Genauigkeit bedeutet. Daher mu&slig; man insbesondere bei Vergleichen mit <br />
float darauf achten, einen kleinen Fehler zu berücksichtigen.</li>
<br />
<li>Für Berechnungen mit höherer Genauigkeit gibt es <b>GMP-Funktionen</b>, mit denen <br />
man im Prinzip jede Genauigkeit erreichen kann. Der Umgang mit diesen Funktionen ist aber <br />
umständlicher als der Umgang mit float, sodass man gegebenenfalls abwägen muß, was<br />
für Ihre konkrete Anwendung wichtiger ist. Wahrscheinlich wird man aber in der alltäglichen <br />
Arbeit mit der durch float bereitgestellten Genauigkeit auskommen.</li>
<br />
<li><b>Hinweis</b><<br />
Für weiterführende Informationen zu den GMP-Funktionen: http://de.php.net/manual/de/book.gmp.php</li>
</html>
<html>
<h3>Formulare</h3>
<ul></ul>
<h3>Formulardaten in PHP auswerten</h3>
<ul></ul>
<h3>Listen in Formularen</h3>
<ul>
</ul>
<h3>Mehrfachauswahl in Formularen</h3>
<ul>
</ul>
<h3>Existenz von Werten prüfen</h3>
<ul>
</ul>
<h3>Checkboxen</h3>
<ul>
</ul>
<h3>Das Affenformular</h3>
<ul>
</ul>
<h3>Die GET-Methode</h3>
<ul>
</ul>
<h3>Die POST-Methode</h3>
<ul>
</ul>
<h3>Praxis: Passwortschutz</h3>
<ul>
</ul>
<h3>Praxis: Mehr Sicherheit bei Passwortabfragen </h3>
<ul>
</ul>
</html>
<html>
<h3>Funktionen und ihre Arbeitsweise</h3>
<ul>
<li><b>Definition</b><br />
Eine <u>Funktion</u> ist eine wiederverwendbare Zusammenfassung von mehreren <br />
Anweisungen unter einem Namen. <br />
<br />Wann immer man den Funktionsnamen in dem Programm verwendet, werden <br />
die zur Funktion gehörenden Anweisungen ausgeführt. Man kann einer Funktion<br />
Werte übergeben, sog. <u>Parameter</u>, mit denen sie weiterarbeiten kann. Die<br />
Funktion kann einen Rückgabewert liefern, der das Ergebnis der Funktion darstellt.</li>
<br />
<li> PHP wird aber genau da eingesetzt, wo ein Webauftritt aus vielen unterschiedlichen,<br />
dynamisch erzeugten Einzelseiten besteht. </li>
<br />
<li><b>Beispiel:</b><br />
<code><pre>
1.<?php
2. function footer ($name) { ## Definition
3. $text = "<HR WIDTH="90%">\n";
4. $text .= "<CENTER>Erstellt von <I>$name</I></CENTER>";
5. return $text;
6. }
7.
8. echo footer ("Max Muster"); ## Aufruf resp. Verwendung
9.?>
</pre></code>
</ul>
<h3>Definition einer Funktion</h3>
<ul>
<li>Bevor eine Funktion verwendet werden kann, muss sie zunächst definiert werden.<br />
Diese Definition teilt dem PHP-Interpreter genau mit, was geschehen soll, wenn die Funktion<br />
im Quelltext verwendet wird.</li>
<br />
<li>Eine Funktion besteht mindestens aus:<br />
<ul>
<li> dem Schlüsselwort function,</li>
<li> einem Funktionsnamen,</li>
<li> runden Klammern, in denen Parameter stehen (können),</li>
<li> geschweifte Klammern, zwischen denen die Anweisungen der Funktion stehen.</li>
</ul></li>
<br />
<li><b>Definition</b><br />
Die erste Zeile einer Funktion, also alles bis zur ersten geschweiften Klammer, <br />
wird als <u>Funktionskopf</u> bezeichnet.
</li>
<br />
<li><b>Hinweis</b></br>
Viele Funktionen lassen sich an ganz unterschiedlichen Stellen verwenden. <br />
Deswegen bietet es sich an, PHP-Dateien anzulegen, die ausschließlich Funktionen <br />
enthalten. Diese sogenannten <b>Bibliotheken</b> können in verschiedenen Projekten<br />
eingebunden werden und sparen so eine Menge Entwicklungsarbeit. Man sollte daher<br />
versuchen, Funktionen so allgemein wie möglich zu schreiben. Der anfängliche <br />
Zeiteinsatz macht sich schnell bezahlt.</li>
<br />
<li><b>Schreibkonventionen für Funktionsnamen</b><br />
Den Funktionsnamen sollte man nach den gleichen Schreibkonventionen wählen, <br />
die man bereits von Variablen kenn (“Camel-Case“). Besteht der Funktionsname<br />
aus mehreren Teilwörtern, so beginne man jedes Teilwort (außer dem ersten) mit<br />
einem Großbuchstaben. Leerzeichen sind in Funktionsnahmen <b>nicht</b> erlaubt, auf <br />
Unterstriche (_) sollte man möglichst verzichten.</li>
</ul>
<h3>Parameter</h3>
<ul>
<li>Kaum eine Funktion kommt ohne Informationen aus, mit deren Hilfe sie ihre Arbeit <br />
verrichten kann. Diese zusätzlichen Informationen nennt man <b>Parameter der Funktion</b>.</li>
<br />
<li>Man kann auch mehrere Parameter angeben. Dazu muß man die Namen der<br />
einzelnen Parameter durch Kommata voneinander trennen.</li>
<br />
<li><b>Definition :: “Parameter“</b><br />
Als <u>Parameter</u> bezeichnet man die Variablen, die im Funktionskopf angegeben sind <br />
und in der Funktion selbst verwendet werden. Ein Parameter ist der Platzhalter, in dem Argu-<br />
mente gespeichert werden.</li>
<br />
<li><b>Definition :: “Argumente“</b><br />
Füllt man einen Parameter durch Aufruf der Funktion mit konkreten Werten, werden diese Werte <br />
<u>Argumente</u> genannt. Ein Argument ist immer ein konkreter Wert, wie bspw. <i>Max</i> oder <i>100</i>.
</li>
<br />
</ul>
<h3>Rückgabewerte</h3>
<ul>
<li>
Die <b>return</b>-Anweisung bewirkt, dass:
<ul>
<li> die Funktion umgehend beendet wird,</li>
<li> im Funktionsaufruf an Stelle des Aufrufs der Wert geschrieben wird, <br />
der hinter return steht </li>
</ul></li>
<br />
<li><b>Hinweis</b><br />
Eine Funktion muss <u>nicht</u> unbedingt einen Wert zurückliefern und dementsprechend<br />
auch <u>nicht</u> unbedingt eine return-Anweisung enthalten. In anderen Programmiersprachen<br />
werden Funktionen, die keinen Wert zurückgeben, als <b>Prozeduren</b> bezeichnet. <br />
In PHP gibt es diese Unterscheidung nicht.<br />
<br />
Die <b>return</b>-Anweisung gibt einen ganz konkreten Wert zurück, keine Variable. <br />
Wenn man diesen Wert danach weiter verarbeiten will, muss man ihn in einer <br />
Variablen speichern:<br />
<code><pre>
// Speichert das Ergebnis des Funktionsaufrufes
// der Funktion flaeche in der Variablen <u>$grundflaeche</u>
$grundflaeche = flaeche ($breite, $hoehe);
</pre></code></li>
<br />
</ul>
<h3>Sichtbarkeit von Variablen und Parametern</h3>
<ul>
<li><b>Hinweis</b><br />
Variablen und Parameter, die in einer Funktion definiert werden, sind nur <br />
innerhalb dieser Funktion sichtbar (<b>lokale Variablen</b>). Das bedeutet, <br />
dass sie außerhalb der Funktion <u>nicht</u> existieren und auf ihren Wert nicht <br />
zugegriffen werden kann. Umgekehrt kann innerhalb einer Funktion nicht direkt <br />
auf Variablen außerhalb der Funktion (<b>globale Variablen</b>) zugegriffen werden.</li>
<br />
<li>Was passiert aber, wenn außerhalb einer Funktion bereits eine <br />
Variable desselben Namens existiert wie innerhalb? Die Antwort ist konsequent: <br />
Innerhalb der Funktion wird sie ignoriert, denn dort sind die Variablen von <br />
außerhalb nicht sichtbar. </li>
</ul>
<h3>Zugriff auf globale Variablen</h3>
<ul>
<li>Aus der Perspektive eines guten Programmierstils sollte eine Funktion <u>nicht</u>
auf Variablen außerhalb zugreifen müssen. Alle Informationen, die die Funktion<br />
benötigt, sollten sich aus Parametern und gegebenenfalls Konstanten ergeben. Nur so<br />
kann man sicherstellen, dass die Funktion vielseitig und in unterschiedlichen Projekten einsetzbar ist.</li>
<br />
<li>In einigen besonderen Fällen kann aber die Notwendigkeit bestehen, aus <br />
einer Funktion heraus auf globale Variablen zuzugreifen, zum Beispiel dann, wenn man <br />
auf gemeinsame Konfigurationseinstellungen mehrerer Skripte zugreifen will. Mit Hilfe <br />
des Schlüsselworts <b><code>global</code></b> kann man PHP dazu auffordern, eine Variable nicht <br />
lokal (also innerhalb der Funktion) anzulegen, sondern stattdessen nach einer globalen<br />
Variablen zu suchen, die den entsprechenden Namen trägt.</li>
<br />
<li><b>Hinweis</b><br />
Aber wie eingangs schon erwähnt, sollte man den Einsatz von <b>globals</b> vermeiden.<br />
Wenn man mit globalen Variablen arbeitet, geht man immer das Risiko ein, dass eine Änderung<br />
der Variablen innerhalb einer Funktion unerwartete Auswirkungen an ganz anderer Stelle haben kann.<br />
Dieses Problem wird nahezu unlösbar, wenn man mit mehreren Programmierern gemeinsam an<br />
einem Projekt arbeitet. Viel besser ist es, stattdessen vor dem Beginn der eigentlichen Implementierung<br />
ein durchgängiges Konzept zu erstellen, dass <b>nicht</b> von globalen Variablen abhängig ist.
</li>
</ul>
<h3>Veränderbare Parameter</h3>
</ul>
<li>Beim Aufruf einer Funktion kann man für die Argumente selbstverständlich auch<br />
Variablen einsetzen. Es wird dann der aktuelle Wert der Variablen an die Funktion übergeben.<br />
Daraus ergibt sich, dass der Inhalt der Variablen innerhalb der Funktion nicht geändert werden kann.</li>
<br />
Normalerweise sollen Funktionen auch gar nicht die Inhalte übergebener Variablen ändern.<br />
In manchen Situationen kann es aber durchaus sinnvoll sein, beispielsweise dann, wenn:
<ul>
<li> die Funktion mehrere Rückgabewerte haben soll,</li>
<li> Arrays untereinander kopiert werden sollen.</li>
</ul></li>
<br />
<li>ähnlich dem Unterschied zwischen <u>Wert einer Variablen</u> und </u>Referenz <br />
auf den Wert</u> kann man einer Funktion als Parameter einen Verweis (also eine Referenz)<br />
auf eine Variable übergeben. So kann innerhalb der Funktion der Wert dieser Variablen verändert<br />
werden. Jede Veränderung des Parameters hat somit auch eine Veränderung der Variablen <br />
selbst zur Folge. Für diese Übergabe des Parameters <u>by-reference</u> muss man <br />
im Funktionskopf vor den Namen des Parameters ein Kaufmanns-Und (&) stellen:<br />
Beispiel: <code>function byreference (&$a) { … </code>.</li>
<br />
<li><b>Hinweis</b><br />
Bei dieser Art von Übergabe kann man allerdings als Argument <b>nicht</b> mehr <br />
einen konkreten Wert nehmen. Die Übergabe <i>by-reference</i> <b>erwartet immer eine<br />
Variable</b>, ansonsten erhält man eine Fehlermeldung.</li>
</ul>
<h3>Vorgabewerte für Parameter </h3>
<ul>
<li>PHP bietet die Möglichkeit, Vorgabewerte für Parameter festzulegen, in dem man<br />
nach dem Parameternamen eine Zuweisung des Vorgabewerts vornimmt. So kann beim<br />
Aufruf der Funktion auf die Angabe eines Werts für den jeweiligen Parameter verzichtet werden.<br />
Beispiel: <code> function f($parameter=value) { … </code></li>
<br />
<li>Wird beim Aufruf der Funktion kein Wert angegeben, benutzt PHP den Vorgabewert. <br />
Ist dieser nicht definiert, wird der Wert <u>NULL</u> angenommen. Ist beim Aufruf ein Wert<br />
angegeben, hat dieser Vorrang und wird verwendet.<br />
Beispiel:<code>function kaufe($anzahl=1) { … </code></li>
<br />
<li>Bei mehreren Parametern dürfen die Werte beim Aufruf nur von rechts beginnend<br />
weggelassen werden, weil PHP die übergebenen Werte immer von links beginnend den <br />
Parametern zuweist. Der erste übergebene Wert wird also immer dem ersten Parameter zugeordnet:<br />
Beispiel: <code>function f($param1=1, $param2=0, $param3) { … </code></li>
<br />
<li>Am besten Parameter, die keinen Default haben, z.B. $param3, als ersten Parameter<br />
im Funktionskopf angeben. Dann ist ein Funktionsaufruf mit nur diesem Parameter fehlerfrei<br />
möglich.</li>
</ul>
</html>
<html>
<h2>How to test PHP 7 and WordPress MySQL/MariaDB Database connectivity using a PHP script</h2>
<h3>Question:</h3>
I wanted to test if my PHP 7 and MySQL/MariaDB for WordPress are working. If not I wanted to see some error on screen or for my monitoring system. How to write a script for a quick PHP MySQL DB connection test for WordPress or any other database and send an email or text when site is down?
<h3>A PHP 7 + MySQL/MariaDB script for WordPress</h3>
The following script will use database/password info from WordPress config file itself. Create a script named db-mysql-test.php and put in wordpress directory where you will find a file named wp-config.php:
<code><pre>
<?php
define('WEB_ID','l-cbz01');
require('wp-config.php');
$link = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
// failed
// die with an error
if (!$link) {
// send HTTP/500 status code first
header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500);
echo "<html><head><title>Failed at " .WEB_ID. "</title></head><body><pre>";
echo "Web server: ". WEB_ID . PHP_EOL;
echo "Error: Unable to connect to MySQL." . PHP_EOL;
echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL;
echo "Debugging error: " . mysqli_connect_error() . PHP_EOL;
exit;
}
// succeeded and show message
echo "<html><head><title>Success at " .WEB_ID. "</title></head><body><pre>";
echo "Success: A proper connection to MySQL was made! The my_db database is great." . PHP_EOL;
echo "Host information: " . mysqli_get_host_info($link) . PHP_EOL;
mysqli_close($link);
?>
</pre></code>
Upload the script using sftp/ftp client to your web server, run:
<code><pre>
$ scp db-mysql-test.php vivek@server1.cyberciti.biz:/var/www/html/cms/
</pre></code>
Fire a browser and test it:
<code><pre>
https://www.cyberciti.biz/cms/db-mysql-test.php
</pre></code>
Sample outputs when there is no error:
Fig.01: Success test output
Fig.01: Success test output
Sample outputs when there is an error like PHP 7 process not running or MySQL server is down:
Fig.02: Error: Unable to connect to MySQL status page
Fig.02: Error: Unable to connect to MySQL status page
<h3>A PHP 7 + MySQL/MariaDB script for custom database (any cms)</h3>
If you are not using WordPress or using something else, try the following script. You must set DB_HOST, DB_USER, DB_PASSWORD, and DB_NAME:
<code><pre>
<?php
// set me
define('WEB_ID','l-cbz01');
define('DB_HOST', 'localhost');
define('DB_USER', 'vivek');
define('DB_PASSWORD', 'myPasswordHere');
define('DB_NAME', 'myDBNameHere');
$link = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
// failed
// die with an error
if (!$link) {
// send HTTP/500 status code first
header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500);
echo "<html><head><title>Failed at " .WEB_ID. "</title></head><body><pre>";
echo "Web server: ". WEB_ID . PHP_EOL;
echo "Error: Unable to connect to MySQL." . PHP_EOL;
echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL;
echo "Debugging error: " . mysqli_connect_error() . PHP_EOL;
exit;
}
// succeeded and show message
echo "<html><head><title>Success at " .WEB_ID. "</title></head><body><pre>";
echo "Success: A proper connection to MySQL was made! The my_db database is great." . PHP_EOL;
echo "Host information: " . mysqli_get_host_info($link) . PHP_EOL;
mysqli_close($link);
?>
</pre></code>
Save and upload the script using either ftp command or sftp command:
<code><pre>
$ scp db-mysql-test.php vivek@server1.cyberciti.biz:/var/www/html/
</pre></code>
Test it with your favorite web browser:
<code><pre>
https://www.cyberciti.biz/cms/db-mysql-test.php
</pre></code>
A note about sending a text/sms/email when script fails (optional)
You need to use third party monitoring service such as Pingdom or others. For example, you can edit your Pingdom test as follows:
Fig.03: Pingdom test
Fig.03: Pingdom test
I set 'Check for string' to 'Should not contain' to 'Error: Unable to connect to MySQL' and click on Modify test button. A text string that must not be present (e.g. 'Error: Unable to connect to MySQL') in the HTML code of the page. If this text is found from the page, the site will be considered as down and you will an alert via text/sms or email as follows:
Fig.04: Pingdom DOWN alert email
Fig.04: Pingdom DOWN alert email
<br />
Link:
<a href="https://www.cyberciti.biz/faq/script-for-a-quick-php7-mysql-mariadb-wordpress-connection-test/">How to test PHP 7 and WordPress MySQL/MariaDB Database connectivity using a PHP script</a>
</html>
<html>
Kommentare können auf drei Arten geschrieben werden:<br />
<ul>
<li><b>#</b> oder <b>//</b></li>
dieser Kommentar geht bis zum Ende der aktuellen Zeile<br /><br />
<li><b>/* ... */</b></li>
dieser Kommentar kann sich über mehrere Zeilen erstrecken<br /><br />
<li>Kommentieren Sie bitte immer so, dass Quelltext und Kommentar sich gegenseitig ergänzen.<br />
Schreiben Sie im Kommentar also <b>nicht</b> auf, was Sie machen, sondern <b>warum</b> Sie es machen. <br />
Ihre Programmzeilen sollten so gestaltet sein, dass immer ersichtlich ist, was in jeder einzelnen Zeile passiert.<br />
<br />
⇒ Kommentare liefern also Aufschluss über die Konzepte und Methoden, <br />die Sie verwenden, um zu dem gewünschten Ergebnis zu kommen.</li><br /><br />
</ul>
</html>
<html>
<ul>
<li><b>Definition</b><br />
Konstanten sind Variablen, die ihren Wert nicht mehr ändern können.<br />
<br />
Um sie von Variablen zu unterscheiden, haben ihre Namen <b>kein</b> vorangestelltes<br />
Dollarzeichen ($). <br />
<br />
Die Werte einer Konstanten müssen einen der vier skalaren Datentypen haben, <br />
also boolean, integer, float oder string.
</li>
<br />
<li><b>Hinweis</b><br />
Üblicherweise werden Konstanten in Großbuchstaben notiert. So sind sie leichter von <br />
Variablen und PHP-Schlüsselwörtern zu unterscheiden. Eine Benennung in Klein-<br />
buchstaben ist zwar möglich, aber nicht empfehlenswert. Denk daran, dass in solchen <br />
Konventionen jahrelange Erfahrung von vielen Entwicklern steckt. Man verstehen sie also nicht <br />
als Vorschrift, sondern als Rat von Experten, der einem die Arbeit erleichtern soll.
</li>
</br >
<li><b>Funktion define():</b><br />
Eine Konstante kann nur mit der Funktion define() erzeugt und mit einem Wert belegt werden. <br />
Der Name der Konstanten kann - abgesehen von dem Dollarzeichen ($) - nach den gleichen <br />
Regeln gewählt werden, wie der von Variablen.<br />
<br />
<b>Beispiel:</b>
<code><pre>
1.<?php
2. define(KONSTANTE, 10);
3. echo KONSTANTE;
4.?>
</pre></code>
<li>
Konstanten bieten den Vorteil, dass sie, wenn sie einmal definiert wurden, von überall aus<br />
erreichbar sind. Damit eignen sie sich hervorragend dazu, Grundeinstellungen des Programms zu <br />
speichern.
</li>
</ul>
</html>
<html>
<ul>
<li><b>Bedingte Anweisungen:</b><br />
<ul>
<li><b>if - Anweisung</b><br />
Syntax: <br />
Ein Codeabschnitt wird nur dann ausgeführt, wenn eine bestimmte Bedingung vorliegt.<br />
<code><pre><?php
$button = "pressed";
if ($button == "pressed") {
echo "I am alive and will now ...";
}
?></code></pre></li>
<li><b>if ... else - Anweisung</b><br />
Syntax: <br />
Ein Codeabschnitt wird nur dann ausgeführt, wenn eine bestimmte Bedingung erfüllt ist.<br />
Ansonsten wird ein anderer Codeabschnitt ausgeführt.<br />
<code><pre><?php
$button = "pressed";
if ($button == "pressed") {
echo "I am alive and will now ...";
}
elseif ($button == "broken") {
echo "Malfunction!";
}
else {
echo "Nobody pressed my button.";
}
?></code></pre></li>
<li><b>switch ... case-Anweisung</b>
Syntax: <br />
Aus einer Mehrzahl möglicher Codeabschnitte wird an Hand einer Auswahl‐<br />
bedingung ein bestimmter ausgewählt.<br />
<br /></li>
</ul>
<br />
</li>
<li><b>Schleife:</b><br />
<ul>
<li><b>for-Schleife</b><br />
Syntax: <br />
wiederholt einen bestimmten Codeabschnitt solange, bis für einen Zähler ein <br />
definierter Zielwert erreicht ist.<br />
<br /></li>
<li><b>while-Anweisung</b><br />
Syntax: <br />
wiederholt einen Codeabschnitt solange, bis eine Bedingung erfüllt ist. Ist die <br />
Bedingung zu Beginn nicht erfüllt, wird der Codeabschnitt nicht ausgeführt.<br />
<br /></li>
<li><b>do ... while - Anweisung</b><br />
Syntax: <br />
wiederholt einen Codeabschnitt solange, bis eine Bedingung erfüllt ist. <br />
Ist die Bedingung zu Beginn nicht erfüllt, wird der Codeabschnitt trotzdem <br />
einmal ausgeführt.<br />
<br /></li>
<li><b>foreach-Schleife (für Arrays)</b><br />
Syntax: <br />
<br /></li>
</ul>
</li>
</ul<
</html>
<html>
<ul>
<li><a href="http://www.selfphp.de/" target=_blank>SelfPHP</a></li>
<li><a href="https://www.php-einfach.de/" target=_blank>PHP-einfach.de</a></li>
<!--li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li-->
<br />
</ul>
</html>
<html>
PHP offers a simple but effective solution to log all errors to a log file. On all production web server, you must turn off displaying an error to end users via a web browser. Remember PHP gives out lots of information about the path, database schema and all other sorts of sensitive information. You are strongly advised to use error logging in place of error displaying on production web sites. The idea is quite simple only developer should able to see PHP error log.
Find out path to php.ini
The default paths are as follows for popular unix like system:
<table border="1">
<tr>
<td>CentOS Linux/RHEL v5.x/6.x/7.x </td><td>/etc/php.ini</td>
</tr>
<tr>
<td>Ubuntu / Debian Linux (PHP 7 fpm)</td><td>/etc/php/7.0/fpm/php.ini</td>
</tr>
<tr>
<td>Ubuntu / Debian Linux (PHP 5.6 fpm) </td><td> /etc/php/5.6/fpm/php.ini</td>
</tr>
<tr>
<td>Ubuntu / Debian Linux (PHP 7 with Apache 2) </td><td> /etc/php/5.6/apache2/php.ini</td>
</tr>
<tr>
<td>Ubuntu / Debian Linux (PHP 5.6 with Apache 2) </td><td>/etc/php/7/apache2/php.ini</td>
</tr>
<tr>
<td>FreeBSD unix server v9.x/10.x/11.x+</td><td> /usr/local/etc/php.ini</td>
</tr>
</table>
You can use the following command to find out path to php.ini:
# php5-cgi -i | grep php.ini
Sample outputs:
<tr><td class="e">Loaded Configuration File </td><td class="v">/etc/php5/cgi/php.ini </td></tr>
# php-fpm5.0 -i | grep php.ini
# php-fpm7.0 -i | grep php.ini
Sample outputs:
Configuration File (php.ini) Path => /etc/php/7.0/fpm
Loaded Configuration File => /etc/php/7.0/fpm/php.ini
How do I log all php errors to a log fiie?
Just add following line to /etc/php.ini to log errors to specified file, say /var/log/php-scripts.log or /var/log/httpd/php-error.log:
# vi /etc/php.ini
Find and modify the error_log directive as follows:
error_log = /var/log/php-scripts.log
Make sure display_errors set to Off (no errors to end users):
display_errors = Off
Save and close the file. Restart the Apache web server or restart php7-fpm/php5-fpm service as follows:
# /etc/init.d/httpd restart
OR
# systemctl restart httpd
OR
$ sudo systemctl restart php7.0-fpm.service
OR
$ sudo systemctl restart php-fpm
How do I log errors to syslog or Windows Server Event Log?
Modify error_log as follows :
error_log = syslog
How do I see logs?
Login using ssh or download a log file /var/log/php-scripts.log using sftp client:
$ sudo tail -f /var/log/php-scripts.log
Sample outputs:
Fig.01: PHP error log output
<br />
Link:<br />
<a href="https://www.cyberciti.biz/tips/php-howto-turn-on-error-log-file.html" target="_blank">https://www.cyberciti.biz/tips/php-howto-turn-on-error-log-file.html</a><br />
<br />
<h3>Comments</h3>
Anjanesh says:
July 30, 2007 at 3:22 am
It would be much better to have a single config php-file and define them there instead.
ini_set("log_errors" , "1");
ini_set("error_log" , "Errors.log.txt");
ini_set("display_errors" , "0");
Philipp says:
July 30, 2007 at 7:26 am
You have to watch, that the logfile is writeable by the web-server process!
nixCraft says:
July 30, 2007 at 9:27 pm
@Anjanesh, good point, user can set those from a php script itself.
@Philipp, yes I did assumed that Apache or lighttpd has a write permissions
Appreciate your posts!
Alekc says:
January 22, 2008 at 11:48 am
Small misspelling in title: “log fiie“
China Landscape says:
May 9, 2008 at 9:19 am
I have ligttpd (PHP FastCGI) and I cannot see the log.
How can I get it in this case ?
Carl says:
October 9, 2008 at 3:06 pm
“es I did assumed that Apache or lighttpd has a write permissions“
In the case that it doesn't, how can this be changed?
nixCraft says:
October 9, 2008 at 3:13 pm
Carl,
Use chmod and chown command to set permissions.
Kurt says:
October 24, 2008 at 7:31 am
Hellow,
Is it possible to log errors of diffrent websites in different errorfiles?
I have a server that's hosting different websites and I want that all of the php-errors are logged in different file. For each website a file.
Is that possible and how do I do it?
tnx in advance
nixCraft says:
October 24, 2008 at 11:28 am
Kurt,
You need to setup php as FastCGI which allows the -c option. With this option you can provide custom php.ini file and error log file for each user. See this article for more info. This is lighttpd specific but you should able to setup with Apache or any other server with mod_fastcgi.
HTH
Carl says:
October 24, 2008 at 7:37 pm
@Kurt
You might try ini_set() as well if you have trouble getting custom php.ini files to work
Svetainiu Kurimas says:
October 19, 2009 at 4:24 pm
Hi, does the init_set solution also work with Apache installed on Windows? It doe snot seem to be working for me.
Liju says:
December 23, 2009 at 5:08 am
I think it would need to enable this tag (log_errors = On) php.ini to get this complete.
But I suggest it's not a good Idea to enable on the main configuration file where a server hosted multiple sites. Just add this entries on .htaccess make sense on such case to trouble shoot.
Dhanesh Mane says:
June 14, 2010 at 7:12 am
Hey ,
I think if you are error_log directive is set to syslog, then logs are save at /var/log/message.
On my server its set to syslog and the file /var/log/message is also updated but I am not able to find any php log data in this file.
any hint wat's happening?
pawel says:
August 12, 2010 at 10:21 am
what i read was enough to solve my issue, why im writing is to see if i get one nice picture with no.16 on the right
yuri says:
December 30, 2010 at 1:31 am
I followed the steps above and its still not working, what should I do?
jyoti says:
February 13, 2012 at 9:33 am
i am using php 5.3 with xamp server and get error “cannot write to file(../debug.log)“ please help me becaz i am new for php. thanks in advance
jyoti says:
February 13, 2012 at 9:34 am
i am using php 5.3 with xamp server and get error “cannot write to file(../debug.log)“ please help me becaz i am new for php ..thanks in advance
Alexander says:
April 10, 2012 at 7:10 am
It seems, user, under which you run php, does not have write permissions on specified file/directory. Check parent directory permissions, if is it writable.
I also had the same issue. I had path and settings for logging error file, but saw no file created till I set normal permissions.
Pavarti Izdelava says:
July 19, 2012 at 7:52 am
Thank you for that post, it is working on my server.
I have additional question, how do you display friendly error to user, when fatal error occur.
Divya says:
October 4, 2012 at 9:58 am
What can we do in case we need to delete log file entries older than 60 days or clean up logs older than 60 days in php?
Dmitry Pashkevich says:
April 26, 2013 at 10:33 pm
If you redirect error output to a custom file, you'd have to care about log rotation yourself or it'll grow infinitely.
If error logging is handled by the web server (default), then your web server will likely take care of that.
Ashish Kumar Laxkar says:
July 26, 2013 at 10:05 am
Really helpful i have that problem from past 2 days now i resolve that ... Thanks 4 support.. any update please mail. ashish.laxkar16@gmail.com
Heidi says:
April 2, 2014 at 2:36 pm
No matter if some one searches for his vital thing, thus he/she needs to be available that in detail, therefore that thing is maintained over here.
Neeke says:
June 6, 2014 at 3:57 pm
error_log : no errors, no fixed format.
My advice is SeasLog. https://github.com/Neeke/SeasLog
</html>
<html>
<ul>
<li>In PHP gibt es den Datentyp des <b>Wahrheitswertes</b>.<br />
<br />
In PHP gibt es drei Operatoren, die jeweils <b>zwei Wahrheitswerte</b><br />
miteinander <b>verknöpfen</b> k'önnen und als Ergebnis wiederum<br />
einen Wahrheitswert liefern, und es gibt einen Operator, der den <b>Wahrheitswert umkehrt</b>:
<table border="1">
<tr><th>Name</th><th>Operator</th><th>Bedeutung</th></tr>
<tr><td>UND</td><td><center>&&</center></td><td>liefert genau dann den Wert <i>true</i>, wenn die Teilausdrücke ebenfalls den Wert <i>true</i> haben, <br />ansonsten liefert es den Wert <i>false</i>.<br />
Alternative Schreibweise: <b>and</b></td></tr>
<tr><td>ODER</td><td><center>||</center></td><td>liefert genau dann den Wert <i>true</i>, <br />
wenn mindestens ein Wert den Wert <i>true</i> hat.<br />
Alternative Schreibweise: <b>or</b> </td></tr>
<tr><td>Entweder-ODER</td><td><center>xor</center></td><td>liefert genau dann den Wert <i>true</i>,<br />
wenn genau einer der beiden Teilausdrücke wahr ist - nicht aber, wenn beide wahr sind.</td></tr>
<tr><td>NICHT<br />(Negation)</td><td><center>!</center></td><td>kehrt einen gegebenen Wahrheitswert um, <br />
aus <i>true</i> wird <i>false</i> und umgekehrt.<br />
Alternative Schreibweise: <b>not</b></td></tr>
</table>
</li>
<li><h4>Wahrheitstabellen</h4>
<ul><li><b>UND-Verknüpfung</b>
<table border="1">
<tr><th> $x1</th><th>$x2</th><th>$x1 and $x2</th></tr>
<tr><td>false </td><td>false </td><td><center>false</center></td></tr>
<tr><td>false </td><td>true</td><td><center>false</center></td></tr>
<tr><td>true </td><td>false </td><td><center>false</center></td></tr>
<tr><td>true </td><td>true </td><td><center>true</center></td></tr>
</table></li>
<li><b>ODER-Verknüpfung </b>
<table border="1">
<tr><th>$x1</th><th>$x2</th><th>$x1 or $x2</th></tr>
<tr><td>false </td><td>false </td><td><center>false</center></td></tr>
<tr><td>false </td><td>true </td><td><center>true</center></td></tr>
<tr><td>true </td><td>false </td><td><center>true</center></td></tr>
<tr><td>true </td><td>true </td><td><center>true</center></td></tr>
</table></li>
<li><b>Entweder-ODER-Verknüpfung</b>
<table border="1">
<tr><th> $x1</th><th>$x2</th><th>$x1 xor $x2</th></tr>
<tr><td>false </td><td>false </td><td><center>false</center></td></tr>
<tr><td>false </td><td>true </td><td><center>true</center></td></tr>
<tr><td>true </td><td>false </td><td><center>true</center></td></tr>
<tr><td>true </td><td>true </td><td><center>false</center></td></tr>
</table></li>
<li><b>Negation</b>
<table border="1">
<tr><th> $x</th><th>not $x</th></tr>
<tr><td>false </td><td><center>true</center></td></tr>
<tr><td>true </td><td><center>false</center></td></tr>
</table></li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><b>Maskierung mittels Backslash ( <i>\</i> )</b></li>
<pre><code>echo "Dies ist ein \"PHP-Kurs\"";</code></pre>
⇒ Ausgabe: <pre><code>Dies ist ein "PHP-Kurs"</pre></code>
</ul>
</html>
<html>
Bei der Namensgebung von Variablen müssen folgende Regeln beachtet werden: <br />
<ul>
<li> Variablennamen beginnen grundsätzlich mit einem <b>Dollarzeichen ($)</b>, <br /> z.B. $var;</li>
<br />
<li> Der Name darf nur aus <b>Buchstaben</b>, <b>Ziffern</b> und <b>Unterstrichen</b> bestehen, <br /> z.B. $var_23</li>
<br />
<li> <b>Sonderzeichen</b> wie Doppelpunkt (:), Komma (,) sowie <b>Umlaute</b> (ä, ü, ö) <br />
und das ß dürfen <b>nicht</b> verwendet werden;</li>
<br />
<li> Der Name muß in einer Zeile Platz finden und sollte nicht länger als <br />255 Zeichen sein;</li>
<br />
<li> Einige Wörter, die in PHP grundsätziche Bedeutung haben, sog. <b>Schlüsselwörter</b>, <br />dürfen <b>nicht</b> verwendet werden;</li>
<br />
<li> PHP <b>unterscheidet</b> zwischen <b>Groß- und Kleinschreibung</b> ("case-sensitiv"):<br />
$name, $NAME, $Name und $nAme werden von PHP als verschiedene Variablen interpretiert;</li>
<br />
<li> Am besten "sprechende Variablennamen" verwenden, die bereits darüber informieren, <br />
welche Werte in ihnen gespeichert sind; z.B. $summe, $preis verwenden als $x, $y </li>
<br />
<li> Die Variablennamen sollten der "CamelCase"-Schreibweise entsprechen: <br />
der erste Buchstabe ist immer klein; z.B. $preis;<br />
bei mehreren zusammengesetzten Variablennamen sind die ersten Buchstaben der Strings groß zu schreiben; <br />
z.B. $preisProStück; </li>
</ul>
</html>
<html>
<ul>
<li>Man kann Ganzzahlen auch hexadezimal (zur Basis 16) <br />
oder oktal (zur Basis 8) angeben. Dies ist gerade im Umgang <br />
mit Webfarben und Bitmasken sehr praktisch. </li>
<br />
<li>Bei der oktalen Schreibweise stellt man der Zahl eine 0 voran, <br />
bei Hexadezimalzahlen die Zeichen 0x.</li>
<br />
<li><b>Warnhinweis</b><br />
Die Oktalschreibweise birgt eine gewisse Fehlergefahr. Will man <br />
beispielsweise aus Gründen der Übersicht vor einer Ganzzahl<br />
eine oder mehrere Nullen schreiben, um den Code besser zu ordnen, <br />
muss man Folgendes beachten: <br />
0100 ist in PHP nicht die Dezimalzahl 100, sondern die Oktalzahl 1008, <br />
die dem dezimalen Wert 64 entspricht.</li>
</ul>
</html>
<html>
<b>PHP</b> : "Personal Hypertext Preprocessor" bzw. "PHP: Hypertext Processor"<br />
<br />
PHP ist:<ul>
<li>eine <b>Script-Sprache</b></li>
<br />
<li><b>interpretiert</b></li>
der Programmcode wird zur Laufzeit übersetzt (und nicht vorher in ein Executable) <br />
<br />
<li><b>schwach typisiert</b></li>
(auch: <b>typfrei</b>)<br />
die Variablen haben keinen festen Datentyp, der Interpreter entscheidet, von <br />
welchem Datentyp eine Variable ist<br />
<br />
<li>ermöglicht es, Webseiten dynamisch zu erstellen</li>
</ul><br />
PHP-Code wird direkt im HTML-Code eingebettet:
<table border="1">
<tr>
<th>empfohlene Dar-<br />stellung</th><th>SGML-Kurzform<br /> (sog. Short Tag)</th><th>Ausführlichste Form: <br />SCRIPT-Tags </th>
</tr>
<tr>
<td><code><?php <br />... <br />?><br /></code></td>
<td><code><?<br />... <br />?><br /></code></td>
<td><code><SCRIPT LANGUAGE=<i>"PHP"</i>> <br />... <br /></SCRIPT></code></td>
</tr>
</table>
<h4>Sonstiges</h4>
<ul>
<li> in den echo-Anweisungen können auch HTML-Tags zur Formatierung der Ausgabe verwendet werden.<br />
(File: hallohtml.php (Kap. 2))</li>
<br />
<li>Eine Anweisung ist eine ganz konkrete Handlungsaufforderung an den<br />
Rechner.</li>
<br />
<li> Jede (PHP-)Anweisung wird grundsätzlich mit einem Semikolon abge-<br />
schlossen. (Damit der PHP-Interpreter das Ende einer Anweisung vom Beginn der <br />
nächsten trennen kann.)</li>
<br />
<li> Formale Definition: Anweisung<br />
Eine Anweisung ist ein Ausdruck, der durch ein Semikolon abgeschlossen wird.</li>
<br />
<li> Eine Variable ist ein Stellvertreter für eine Speicherzelle (manchmal<br />
auch für mehrere) und hat einen eindeutigen Namen.</li>
<br />
<li> Zahlen, Texte und Wahrheitswerte sind elementare Ausdrücke. <br >
Der Inhalt einer Variablen ist ebenfalls ein Ausdruck. Elementare <br />
Ausdrücke können mit Hilfe von Operatoren, also z.B. Rechen- <br />
zeichen, zu komplexeren Ausdrücken zusammengesetzt werden.
</li>
<br />
<li><ul>Begriff -- Bedeutung
<li><b>PHP-Interpreter</b>:: führt PHP-Skripte aus.
<li><b>Apache-Webserver</b>:: nimmt Anfragen vom Browser des Nutzers entgegen.
<li><b>Eclipse</b>:: dient zum Erstellen von PHP-Skripten.
<li><b>MySQL-Server</b>:: speichert große Datenmengen und kann diese über standardisierte Schnittstellen zur Verfügung stellen.
</ul>
</li>
<br />
<li>Formale Definition: Ausdrücke</li>
</ul>
</html>
<html>
<ul>
<li><b>im Firefox / Iceweasel:</b><br />
Cursor in Webseite <br />
⇒ RMT <br />
⇒ Menü-Fenster erscheint<br />
⇒ Eintrag "Seitenquelltext anzeigen" auswählen</li>
<br />
<li> Immer darauf achten, daß der PHP-Code einen Quelltext erzeugt,<br />
der auch von Menschen lesbar ist.</li>
<br />
<li> PHP hat auch (vordefinierte) Escape-Sequenzen für Zeilenumbruch,<br />
Tabulator, Dollarzeichen etc. </li>
<br />
<li> Die Escape-Sequenz ("\n") am Ende jeder echo-Anweisung dient der <br />
Lesbarkeit des Quelltextes (z.B. wenn der Quelltext HTML-Anweisungen enthält).</li>
<br />
<li> Maskiere den Backslash <u>grundsätzlich</u> mit einer Escape-<br />
quenz ("\\"), damit keine Probleme auftreten.</li>
<br />
</ul>
</html>
<html>
<ul>
<li><b>Definition:</b><br />
Normalerweise wird für jede Variable, die man verwendet, ein eigener Bereich im Speicher reserviert.<br />
Selbst wenn man eine Zuweisung benutzt wie beispielsweise $a = $b, wird zwar der Wert von $b nach<br />
$a kopiert, aber es ist eben nur eine Kopie. Wenn man die Kopie verändert, ändert sich das Original <br /> selbstverständlich <b>nicht</b>. <br />
Diese, Art der Zuweisung wird auch <b>Wertzuweisung (engl.: by-value)</b> genannt.
</li>
<br />
<li><b>Definition:.</b><br />
Manchmal kann es sinnvoll sein, zwei (oder mehr) Variablen zu haben, die zwar unterschiedlich heißen,<br />
aber doch ein und denselben Speicherbereich verwenden. Ändert man also den Wert der einen Variablen,<br />
ändern sich alle anderen, die auf den gleichen Speicherbereich verweisen, automatisch mit.<br />
Diese Art der Zuweisung wird als <b>Referenzzuweisung (engl.: by-reference)</b> bezeichnet. <br />
Dazu stellt man vor den Namen der Variablen, die man zuweisen wll, ein <b>Kaufmanns-Und (&)</b>.</li>
<br />
</ul>
</html>
<html>
<table>
<tr><td>abstract <br />(ab PHP 5) </td><td>and</td><td>array() </td><td>as</td><td>break</td></tr>
<tr><td>case</td><td>catch <br />(ab PHP 5) </td><td>cfunction <br />(nur PHP 4) </td><td>class </td><td>clone <br />(ab PHP 5)</td></tr>
<tr><td>const </td><td>continue </td><td>declare </td><td>default </td><td>do</td></tr>
<tr><td>else </td><td>elseif </td><td>enddeclare </td><td>endfor </td><td>endforeach</td></tr>
<tr><td>endif</td><td>endswitch</td><td>endwhile </td><td>extends </td><td>final <br />(ab PHP 5)</td></tr>
<tr><td>for </td><td>foreach</td><td>function </td><td>global</td><td>goto <br />(ab PHP 5.3)</td></tr>
<tr><td>if </td><td>implements <br />(ab PHP 5) </td><td>interface <br />(ab PHP 5) </td><td>instanceof <br />(ab PHP 5)</td> </tr>
<tr><td>namespace <br />(ab PHP 5.3) </td><td>new </td><td>old_function <br />(nur PHP 4) </td><td>or </td><td>private <br />(ab PHP 5)</td></tr>
<tr><td>protected <br />(ab PHP 5) </td><td>public <br />(ab PHP 5) </td><td>static </td><td>switch </td><td>throw <br />(ab PHP 5)</td></tr>
<tr><td>tdy <br />(ab PHP 5) </td><td>use </td><td>var </td><td>while </td><td>xor</td></tr>
</table>
Link:<br />
Quelle: http://de.php.net/manual/de/reserved.keywords.php<br />
<br />
</html>
<html>
<h2>25 PHP Security Best Practices For Sys Admins</h2>
PHP is an open-source server-side scripting language, <br />
and it is a widely used. The Apache/Nginx/Lighttpd web <br />
server provides access to files and content via the HTTP <br />
OR HTTPS protocol. <br />
<br />
A misconfigured server-side scripting language can create <br />
all sorts of problems. So, PHP should be used with caution.<br />
Here are twenty-five php security best practices for sysad‐<br />
mins for configuring PHP securely.
<h3>Our Sample Setup For PHP Security Tips</h3>
<ul>
<li>DocumentRoot: /var/www/html</li>
<li>Default Web server: Apache<br /> ( you can use Lighttpd or Nginx instead of Apache)</li>
<li>Default PHP configuration file: /etc/php.ini</li>
<li>Default PHP extensions config directory: /etc/php.d/</li>
<li>Our sample php security config file: /etc/php.d/security.ini <br />
(you need to create this file using a text editor)</li>
<li>Operating systems: RHEL / CentOS / Fedora Linux <br />
(the instructions should work with any other Linux distributions <br />
such as Debian / Ubuntu or other Unix like operating systems<br />
such as OpenBSD/FreeBSD/HP-UX).</li>
<li>Default PHP server TCP/UDP ports: none</li>
</ul>
Most of the actions listed in this post are written with the assumption<br />
that they will be executed by the root user running the bash or any <br />
other modern shell:
<code><pre>
$ php -v
</pre></code>
Sample outputs:
<code><pre>
PHP 5.3.3 (cli) (built: Oct 24 2011 08:35:41)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
</pre></code>
For demonstration purpose I'm going to use the following operating system:
<code><pre>
$ cat /etc/redhat-release
</pre></code>
Sample outputs:
<code><pre>
Red Hat Enterprise Linux Server release 6.1 (Santiago)
</pre></code>
<h3>#1: Know Your Enemy</h3>
PHP based apps can face the different types of attacks. I have noticed the
different types of attacks:
<ul>
<li> <b>XSS</b> ‐ Cross-site scripting is a vulnerability in php web applications,
which attackers may exploit to steal users' information. You can
configure Apache and write more secure PHP scripts (validating all user
input) to avoid xss attacks.</li>
<li> <b> SQL injection</b> ‐ It is a vulnerability in the database layer of an php
application. When user input is incorrectly filtered any SQL statements can
be executed by the application. You can configure Apache and write secure
code (validating and escaping all user input) to avoid SQL injection
attacks. A common practice in PHP is to escape parameters using the function
called mysql_real_escape_string() before sending the SQL query.
Spoofing</li>
<li> <b> File uploads</b>‐ It allows your visitor to place files (upload files) on
your server. This can result into various security problems such as delete
your files, delete database, get user details and much more. You can disable
file uploads using php or write secure code (like validating user input and
only allow image file type such as png or gif).</li>
<li> <b> Including local and remote files</b> ‐ An attacker can open files from
remote server and execute any PHP code. This allows them to upload file,
delete file and install backdoors. You can configure php to disable remote
file execution.</li>
<li> <b> eval()</b> ‐ Evaluate a string as PHP code. This is often used by an
attacker to hide their code and tools on the server itself. You can
configure php to disable eval().</li>
<li> <b> Sea-surf Attack (Cross-site request forgery ‐ CSRF) </b>‐ This attack
forces an end user to execute unwanted actions on a web application in which
he/she is currently authenticated. A successful CSRF exploit can compromise
end user data and operation in case of normal user. If the targeted end user
is the administrator account, this can compromise the entire web
application.</li>
</ul>
<h3>#2: Find Built-in PHP Modules</h3>
To see the set of compiled-in PHP modules type the following command:
<code><pre>
# php -m
</pre></code>
Sample outputs:
<code><pre>
[PHP Modules]
apc
bcmath
bz2
calendar
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
imap
json
libxml
mbstring
memcache
mysql
mysqli
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
sqlite3
standard
suhosin
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib
[Zend Modules]
Suhosin
</pre></code>
I recommends that you use PHP with a reduced modules for performance and
security. For example, you can disable sqlite3 module by deleting (removing)
configuration file , OR renaming (moving) a file called /etc/php.d/sqlite3.ini
as follows:
<code><pre>
# rm /etc/php.d/sqlite3.ini
</pre></code>
OR
<code><pre>
# mv /etc/php.d/sqlite3.ini /etc/php.d/sqlite3.disable
</pre></code>
Other compiled-in modules can only be removed by reinstallating PHP with a
reduced configuration. You can download php source code from php.net and compile
it as follows with GD, fastcgi, and MySQL support:
<code><pre>
./configure --with-libdir=lib64 --with-gd --with-mysql --prefix=/usr --exec-prefix=/usr \
--bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share \
--includedir=/usr/include --libexecdir=/usr/libexec --localstatedir=/var \
--sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info \
--cache-file=../config.cache --with-config-file-path=/etc \
--with-config-file-scan-dir=/etc/php.d --enable-fastcgi \
--enable-force-cgi-redirect
</pre></code>
See how to compile and reinstall php on Unix like operating system for more information.
<h3>#3: Restrict PHP Information Leakage</h3>
To restrict PHP information leakage disable expose_php. Edit /etc/php.d/secutity.ini and set the following directive:
<code><pre>
expose_php=Off
</pre></code>
When enabled, expose_php reports to the world that PHP is installed on the
server, which includes the PHP version within the HTTP header (e.g., X-Powered-
By: PHP/5.3.3). The PHP logo guids (see example) are also exposed, thus
appending them to the URL of a PHP enabled site will display the appropriate
logo. When expose_php enabled you can see php version using the following
command:
<code><pre>
$ curl -I http://www.cyberciti.biz/index.php
</pre></code>
Sample outputs:
<code><pre>
HTTP/1.1 200 OK
X-Powered-By: PHP/5.3.3
Content-type: text/html; charset=UTF-8
Vary: Accept-Encoding, Cookie
X-Vary-Options: Accept-Encoding;list-contains=gzip,Cookie;string-contains=wikiToken;string-contains=wikiLoggedOut;string-contains=wiki_session
Last-Modified: Thu, 03 Nov 2011 22:32:55 GMT
…
</pre></code>
I also recommend that you setup the ServerTokens and ServerSignature directives
in httpd.conf to hide Apache version and other information.
<h3>#4: Minimize Loadable PHP Modules (Dynamic Extensions)</h3>
PHP supports <b>Dynamic Extensions</b>. By default, RHEL loads all the extension
modules found in /etc/php.d/ directory. To enable or disable a particular
module, just find the configuration file in /etc/php.d/ directory and comment
the module name. You can also rename or delete module configuration file. For
best PHP performance and security, you should only enable the extensions your
webapps requires. For example, to disable gd extension, type the following
commands:
<code><pre>
# cd /etc/php.d/
# mv gd.{ini,disable}
# /sbin/service httpd restart
</pre></code>
To enable php module called gd, enter:
<code><pre>
# mv gd.{disable,ini}
# /sbin/service httpd restart
</pre></code>
<h3>#5: Log All PHP Errors</h3>
Do not expose PHP error messages to all site visitors. Edit
/etc/php.d/security.ini and set the following directive:
<code><pre>
display_errors=Off
</pre></code>
Make sure you log all php errors to a log file:
<code><pre>
log_errors=On
error_log=/var/log/httpd/php_scripts_error.log
</pre></code>
<h3>#6: Disallow Uploading Files</h3>
Edit /etc/php.d/security.ini and set the following directive to disable file
uploads for security reasons:
<code><pre>
file_uploads=Off
</pre></code>
If users of your application need to upload files, turn this feature on by
setting upload_max_filesize limits the maximum size of files that PHP will
accept through uploads:
<code><pre>
file_uploads=On
# user can only upload upto 1MB via php
upload_max_filesize=1M
</pre></code>
<h3>#7: Turn Off Remote Code Execution</h3>
If enabled, allow_url_fopen allows PHP's file functions ‐ such as
file_get_contents() and the include and require statements ‐ can retrieve
data from remote locations, like an FTP or web site.
The allow_url_fopen option allows PHP's file functions ‐ such as
file_get_contents() and the include and require statements ‐ can retrieve
data from remote locations using ftp or http protocols. Programmers frequently
forget this and don't do proper input filtering when passing user-provided
data to these functions, opening them up to code injection vulnerabilities. A
large number of code injection vulnerabilities reported in PHP-based web
applications are caused by the combination of enabling allow_url_fopen and bad
input filtering. Edit /etc/php.d/security.ini and set the following directive:
<code><pre>
allow_url_fopen=Off
</pre></code>
I also recommend to disable allow_url_include for security reasons:
<code><pre>
allow_url_include=Off
</pre></code>
<h3>#8: Enable SQL Safe Mode</h3>
Edit /etc/php.d/security.ini and set the following directive:
<code><pre>
sql.safe_mode=On
</pre></code>
If turned On, mysql_connect() and mysql_pconnect() ignore any arguments passed
to them. Please note that you may have to make some changes to your code. Third
party and open source application such as WordPress, and others may not work at
all when sql.safe_mode enabled. I also recommend that you turn off
magic_quotes_gpc for all php 5.3.x installations as the filtering by it is
ineffective and not very robust. mysql_escape_string() and custom filtering
functions serve a better purpose (hat tip to Eric Hansen):
<code><pre>
magic_quotes_gpc=Off
</pre></code>
<h3>#9: Control POST Size</h3>
The HTTP POST request method is used when the client (browser or user) needs to
send data to the Apache web server as part of the request, such as when
uploading a file or submitting a completed form. Attackers may attempt to send
oversized POST requests to eat your system resources. You can limit the maximum
size POST request that PHP will process. Edit /etc/php.d/security.ini and set
the following directive:
<code><pre>
; Set a realistic value here
post_max_size=1K
</pre></code>
The 1K sets max size of post data allowed by php apps. This setting also affects
file upload. To upload large files, this value must be larger than
upload_max_filesize. I also suggest that you limit available methods using
Apache web server. Edit, httpd.conf and set the following directive for
DocumentRoot /var/www/html:
<code><pre>
<Directory /var/www/html>
<LimitExcept GET POST>
Order allow,deny
</LimitExcept>
## Add rest of the config goes here... ##
</Directory>
</pre></code>
<h3>#10: Resource Control (DoS Control)</h3>
You can set maximum execution time of each php script, in seconds. Another
recommend option is to set maximum amount of time each script may spend parsing
request data, and maximum amount of memory a script may consume. Edit
/etc/php.d/security.ini and set the following directives:
<code><pre>
# set in seconds
max_execution_time = 30
max_input_time = 30
memory_limit = 40M
</pre></code>
<h3>#11: Install Suhosin Advanced Protection System for PHP</h3>
From the project page:
<p>
Suhosin is an advanced protection system for PHP installations. It was
designed to protect servers and users from known and unknown flaws in PHP
applications and the PHP core. Suhosin comes in two independent parts, that
can be used separately or in combination. The first part is a small patch
against the PHP core, that implements a few low-level protections against
bufferoverflows or format string vulnerabilities and the second part is a
powerful PHP extension that implements all the other protections.
</p>
See how to install and configure suhosin under Linux operating systems.
<h3>#12 Disabling Dangerous PHP Functions</h3>
PHP has a lot of functions which can be used to crack your server if not used
properly. You can set list of functions in /etc/php.d/security.ini using
disable_functions directive:
<code><pre>
disable_functions =exec,passthru,shell_exec,system,proc_open,popen,curl_exec,
curl_multi_exec,parse_ini_file,show_source
</pre></code>
<h3>#13 PHP Fastcgi / CGI ‐ cgi.force_redirect Directive</h3>
PHP work with FastCGI. Fascgi reduces the memory footprint of your web server,
but still gives you the speed and power of the entire PHP language. You can
configure Apache2+PHP+FastCGI or cgi as described here. The configuration
directive cgi.force_redirect prevents anyone from calling PHP directly with a
URL like http://www.cyberciti.biz/cgi-bin/php/hackerdir/backdoor.php. Turn on
cgi.force_redirect for security reasons. Edit /etc/php.d/security.ini and set
the following directive:
<code><pre>
; Enable cgi.force_redirect for security reasons in a typical *Apache+PHP-CGI/FastCGI* setup
cgi.force_redirect=On
</pre></code>
<h3>#14 PHP User and Group ID</h3>
mod_fastcgi is a cgi-module for Apache web server. It can connect to an external
FASTCGI server. You need to make sure php run as non-root user. If PHP executes
as a root or UID under 100, it may access and/or manipulate system files. You
must execute PHP CGIs as a non-privileged user using Apache's suEXEC or
mod_suPHP. The suEXEC feature provides Apache users the ability to run CGI
programs under user IDs different from the user ID of the calling web server. In
this example, my php-cgi is running as phpcgi user and apache is running as
apache user:
<code><pre>
# ps aux | grep php-cgi
</pre></code>
Sample outputs:
<code><pre>
phpcgi 6012 0.0 0.4 225036 60140 ? S Nov22 0:12 /usr/bin/php-cgi
phpcgi 6054 0.0 0.5 229928 62820 ? S Nov22 0:11 /usr/bin/php-cgi
phpcgi 6055 0.1 0.4 224944 53260 ? S Nov22 0:18 /usr/bin/php-cgi
phpcgi 6085 0.0 0.4 224680 56948 ? S Nov22 0:11 /usr/bin/php-cgi
phpcgi 6103 0.0 0.4 224564 57956 ? S Nov22 0:11 /usr/bin/php-cgi
phpcgi 6815 0.4 0.5 228556 61220 ? S 00:52 0:19 /usr/bin/php-cgi
phpcgi 6821 0.3 0.5 228008 61252 ? S 00:55 0:12 /usr/bin/php-cgi
phpcgi 6823 0.3 0.4 225536 58536 ? S 00:57 0:13 /usr/bin/php-cgi
</pre></code>
You can use tool such as spawn-fcgi to spawn remote and local FastCGI processes
as phpcgi user (first, add phpcgi user to the system):
<code><pre>
# spawn-fcgi -a 127.0.0.1 -p 9000 -u phpcgi -g phpcgi -f /usr/bin/php-cgi
</pre></code>
Now, you can configure Apache, Lighttpd, and Nginx web server to use external
php FastCGI running on port 9000 at 127.0.0.1 IP address.
<h3>#15 Limit PHP Access To File System</h3>
The open_basedir directive set the directories from which PHP is allowed to
access files using functions like fopen(), and others. If a file is outside of
the paths defined by open_basdir, PHP will refuse to open it. You cannot use a
symbolic link as a workaround. For example only allow access to /var/www/html
directory and not to /var/www, or /tmp or /etc directories:
<code><pre>
; Limits the PHP process from accessing files outside
; of specifically designated directories such as /var/www/html/
open_basedir="/var/www/html/"
; ------------------------------------
; Multiple dirs example
; open_basedir="/home/httpd/vhost/cyberciti.biz/html/:/home/httpd/vhost/nixcraft.com/html/:/home/httpd/vhost/theos.in/html/"
; ------------------------------------
</pre></code>
<h3>#16 Session Path</h3>
Session support in PHP consists of a way to preserve certain data across
subsequent accesses. This enables you to build more customized applications and
increase the appeal of your web site. This path is defined in /etc/php.ini file
and all data related to a particular session will be stored in a file in the
directory specified by the session.save_path option. The default is as follows
under RHEL/CentOS/Fedora Linux:
<code><pre>
session.save_path="/var/lib/php/session"
; Set the temporary directory used for storing files when doing file upload
upload_tmp_dir="/var/lib/php/session"
</pre></code>
Make sure path is outside /var/www/html and not readable or writeable by any other system users:
<code><pre>
# ls -Z /var/lib/php/
</pre></code>
Sample outputs:
<code><pre>
drwxrwx---. root apache system_u:object_r:httpd_var_run_t:s0 session
</pre></code>
Note: The -Z option to the ls command display SELinux security context such as
file mode, user, group, security context and file name.
<h3>#17 Keep PHP, Software, And OS Up to Date</h3>
Applying security patches is an important part of maintaining Linux, Apache,
PHP, and MySQL server. All php security update should be reviewed and applied
as soon as possible using any one of the following tool (if you're
installing PHP via a package manager):
<code><pre>
# yum update
</pre></code>
OR
<code><pre>
# apt-get update && apt-get upgrade
</pre></code>
You can configure Red hat / CentOS / Fedora Linux to send yum package update
notification via email. Another option is to apply all security updates via a
cron job. Under Debian / Ubuntu Linux you can use apticron to send security
notifications.
Note: Check php.net for the most recent release for source code installations.
<h3>#18: Restrict File and Directory Access</h3>
Make sure you run Apache as a non-root user such as Apache or www. All files
and directory should be owned by non-root user (or apache user) under
/var/www/html:
<code><pre>
# chown -R apache:apache /var/www/html/
</pre></code>
/var/www/html/ is a subdirectory and DocumentRoot which is modifiable by other
users since root never executes any files out of there, and shouldn‐t be
creating files in there.
Make sure file permissions are set to 0444 (read-only) under /var/www/html/:
<code><pre>
# chmod -R 0444 /var/www/html/
</pre></code>
Make sure all directories permissions are set to 0445 under /var/www/html/:
<code><pre>
# find /var/www/html/ -type d -print0 | xargs -0 -I {} chmod 0445 {}
</pre></code>
A Note About Setting Up Correct File Permissions
The chown and chmod command make sures that under no circumstances DocumentRoot
or files contained in DocumentRoot are writable by the Web server user apache.
Please note that you need to set permissions that makes the most sense for the
development model of your website, so feel free to adjust the chown and chmod
command as per your requirements. In this example, the Apache server run as
apache user. This is configured with the User and Group directives in your
httpd.conf file. The apache user needs to have read access to everything under
DocumentRoot but should not have write access to anything.
Make sure httpd.conf has the following directives for restrictive configuration:
<code><pre>
<Directory />
Options None
AllowOverride None
Order allow,deny
</Directory>
</pre></code>
You should only grant write access when required. Some web applications such as
wordpress and others may need a caching directory. You can grant a write access
to caching directory using the following commands:
<code><pre>
# chmod a+w /var/www/html/blog/wp-content/cache
### block access to all ###
# echo 'deny from all' > /var/www/html/blog/wp-content/cache/.htaccess
</pre></code>
<h3>#19: Write Protect Apache, PHP, and, MySQL Configuration Files</h3>
Use the chattr command to write protect configuration files:
<code><pre>
# chattr +i /etc/php.ini
# chattr +i /etc/php.d/*
# chattr +i /etc/my.ini
# chattr +i /etc/httpd/conf/httpd.conf
# chattr +i /etc/
</pre></code>
The chattr command can write protect your php file or files in /var/www/html directory too:
<code><pre>
# chattr +i /var/www/html/file1.php
# chattr +i /var/www/html/
</pre></code>
<h3>#20: Use Linux Security Extensions (such as SELinux)</h3>
Linux comes with various security patches which can be used to guard against
misconfigured or compromised server programs. If possible use SELinux and other
Linux security extensions to enforce limitations on network and other programs.
For example, SELinux provides a variety of security policies for Linux kernel
and Apache web server. To list all Apache SELinux protection variables, enter:
<code><pre>
# getsebool -a | grep httpd
</pre></code>
Sample outputs:
<code><pre>
allow_httpd_anon_write --> off
allow_httpd_mod_auth_ntlm_winbind --> off
allow_httpd_mod_auth_pam --> off
allow_httpd_sys_script_anon_write --> off
httpd_builtin_scripting --> on
httpd_can_check_spam --> off
httpd_can_network_connect --> off
httpd_can_network_connect_cobbler --> off
httpd_can_network_connect_db --> off
httpd_can_network_memcache --> off
httpd_can_network_relay --> off
httpd_can_sendmail --> off
httpd_dbus_avahi --> on
httpd_enable_cgi --> on
httpd_enable_ftp_server --> off
httpd_enable_homedirs --> off
httpd_execmem --> off
httpd_read_user_content --> off
httpd_setrlimit --> off
httpd_ssi_exec --> off
httpd_tmp_exec --> off
httpd_tty_comm --> on
httpd_unified --> on
httpd_use_cifs --> off
httpd_use_gpg --> off
httpd_use_nfs --> off
</pre></code>
To disable Apache cgi support, enter:
<code><pre>
# setsebool -P httpd_enable_cgi off
</pre></code>
See Red Hat SELinux guide for more information.
<h3>#21 Install Mod_security</h3>
ModSecurity is an open source intrusion detection and prevention engine for web
applications. You can easily install mod_security under Linux and protect apache
and php based apps from xss and various other attacks:
<code><pre>
## A few Examples ##
# Do not allow to open files in /etc/
SecFilter /etc/
# Stop SQL injection
SecFilter "delete[[:space:]]+from"
SecFilter "select.+from"
</pre></code>
<h3>#22 Run Apache / PHP In a Chroot Jail If Possible</h3>
Putting PHP and/or Apache in a chroot jail minimizes the damage done by a
potential break-in by isolating the web server to a small section of the
filesystem. You can use traditional chroot kind of setup with Apache. However, I
recommend FreeBSD jails, XEN virtulization, KVM virtulization, or OpenVZ
virtualization which uses the concept of containers.
<h3>#23 Use Firewall To Restrict Outgoing Connections</h3>
The attacker will download file locally on your web-server using tools such as
wget. Use iptables to block outgoing connections from apache user. The ipt_owner
module attempts to match various characteristics of the packet creator, for
locally generated packets. It is only valid in the OUTPUT chain. In this
example, allow vivek user to connect outside using port 80 (useful for RHN or
centos repo access):
<code><pre>
/sbin/iptables -A OUTPUT -o eth0 -m owner --uid-owner vivek -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT
</pre></code>
Here is another example that blocks all outgoing connections from apache user
except to our own smtp server, and spam validation API service:
<code><pre>
# …
/sbin/iptables --new-chain apache_user
/sbin/iptables --append OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
/sbin/iptables --append OUTPUT -m owner --uid-owner apache -j apache_user
# allow apache user to connec to our smtp server
/sbin/iptables --append apache_user -p tcp --syn -d 192.168.1.100 --dport 25 -j RETURN
# Allow apache user to connec to api server for spam validation
/sbin/iptables --append apache_user -p tcp --syn -d 66.135.58.62 --dport 80 -j RETURN
/sbin/iptables --append apache_user -p tcp --syn -d 66.135.58.61 --dport 80 -j RETURN
/sbin/iptables --append apache_user -p tcp --syn -d 72.233.69.89 --dport 80 -j RETURN
/sbin/iptables --append apache_user -p tcp --syn -d 72.233.69.88 --dport 80 -j RETURN
#########################
## Add more rules here ##
#########################
# No editing below
# Drop everything for apache outgoing connection
/sbin/iptables --append apache_user -j REJECT
</pre></code>
<h3>#24 Watch Your Logs & Auditing</h3>
Check the apache log file:
<code><pre>
# tail -f /var/log/httpd/error_log
# grep 'login.php' /var/log/httpd/error_log
# egrep -i "denied|error|warn" /var/log/httpd/error_log
</pre></code>
Check the php log file:
<code><pre>
# tail -f /var/log/httpd/php_scripts_error.log
# grep "…etc/passwd" /var/log/httpd/php_scripts_error.log
</pre></code>
Log files will give you some understanding of what attacks is thrown against the
server and allow you to check if the necessary level of security is present or
not. The auditd service is provided for system auditing. Turn it on to audit
SELinux events, authetication events, file modifications, account modification
and so on. I also recommend using standard 'Linux System Monitoring
Tools' for monitoring your web-server.
<h3>#25 Run Service Per System or VM Instance</h3>
For large installations it is recommended that you run, database, static, and
dynamic content from different servers.
<code><pre>
///////////////
/ ISP/Router /
//////////////
\
|
Firewall
\
|
+------------+
| LB01 |
+------------+ +--------------------------+
| | static.lan.cyberciti.biz |
+-----------------+--------------------------+
| phpcgi1.lan.cyberciti.biz|
+--------------------------+
| phpcgi2.lan.cyberciti.biz|
+--------------------------+
| mysql1.lan.cyberciti.biz |
+--------------------------+
| mcache1.lan.cyberciti.biz|
+--------------------------+
</pre></code>
(Fig.01: Running Services On Separate Servers)
Run different network services on separate servers or VM instances. This limits
the number of other services that can be compromised. For example, if an
attacker able to successfully exploit a software such as Apache flow, he / she
will get an access to entire server including other services running on the same
server (such as MySQL, e-mail server and so on). But, in the above example
content are served as follows:
<code><pre>
static.lan.cyberciti.biz ‐ Use lighttpd or nginx server for static
assets such as js/css/images.
phpcgi1.lan.cyberciti.biz and phpcgi2.lan.cyberciti.biz ‐ Apache web-
server with php used for generating dynamic content.
mysql1.lan.cyberciti.biz ‐ MySQL database server.
mcache1.lan.cyberciti.biz ‐ Memcached server is very fast caching
system for MySQL. It uses libevent or epoll (Linux runtime) to scale to any
number of open connections and uses non-blocking network I/O.
LB01 ‐ A nginx web and reverse proxy server in front of Apache Web
servers. All connections coming from the Internet addressed to one of the
Web servers are routed through the nginx proxy server, which may either deal
with the request itself or pass the request wholly or partially to the main
web servers. LB01 provides simple load-balancing.
</pre></code>
<h3>#26 Additional Tools</h3>
From the project page:
<p>
PHPIDS (PHP-Intrusion Detection System) is a simple to use, well structured,
fast and state-of-the-art security layer for your PHP based web application.
The IDS neither strips, sanitizes nor filters any malicious input, it simply
recognizes when an attacker tries to break your site and reacts in exactly
the way you want it to.
</p>
You can use PHPIDS to detect malicious users, and log any attacks detected for
later review. Please note that I've personally not used this tool.
From the project page:
<p>
PhpSecInfo provides an equivalent to the phpinfo() function that reports
security information about the PHP environment, and offers suggestions for
improvement. It is not a replacement for secure development techniques, and
does not do any kind of code or app auditing, but can be a useful tool in a
multilayered security approach.
</p>
Security Information About PHP Application
Fig.01: Security Information About PHP Application
See Linux security hardening tips which can reduce available vectors of attack on the system.
<h3>A Note About PHP Backdoors</h3>
You may come across php scripts or so called common backdoors such as c99,
c99madshell, r57 and so on. A backdoor php script is nothing but a hidden
script for bypassing all authentication and access your server on demand. It is
installed by an attackers to access your server while attempting to remain
undetected. Typically a PHP (or any other CGI script) script by mistake allows
inclusion of code exploiting vulnerabilities in the web browser. An attacker can
use such exploiting vulnerabilities to upload backdoor shells which can give him
or her a number of capabilities such as:
<ul>
<li>Download files</li>
<li>Upload files</li>
<li>Install rootkits</li>
<li>Set a spam mail servers / relay server</li>
<li>Set a proxy server to hide tracks</li>
<li>Take control of server</li>
<li>Take control of database server</li>
<li>Steal all information</li>
<li>Delete all information and database</li>
<li>Open TCP / UDP ports and much more</li>
</ul>
Tip: How Do I Search PHP Backdoors?
Use Unix / Linux grep command to search c99 or r57 shell:
<code><pre>
# grep -iR 'c99' /var/www/html/
# grep -iR 'r57' /var/www/html/
# find /var/www/html/ -name \*.php -type f -print0 | xargs -0 grep c99
# grep -RPn "(passthru|shell_exec|system|base64_decode|fopen|fclose|eval)" /var/www/html/
</pre></code>
<h3>Conclusion</h3>
Your PHP based server is now properly harden and ready to show dynamic webpages.
However, vulnerabilities are caused mostly by not following best practice
programming rules. You should be consulted further resources for your web
applications security needs especially php programming which is beyond the scope
of sys admin work.
References:
PHP security ‐ from the official php project.
PHP security guide ‐ from the PHP security consortium project.
Apache suseexec ‐ documentation from the Apache project.
Apache 2.2 ‐ security tips from the Apache project.
The Open Web Application Security Project ‐ Common types of application security attacks.
Recommended readings:
PHP Security Guide: This guide aims to familiarise you with some of the
basic concepts of online security and teach you how to write more secure
PHP scripts. It's aimed squarely at beginners, but I hope that it still
has something to offer more advanced users.
Essential PHP Security (kindle edition): A book about web application
security written specifically for PHP developers. It covers 30 of the most
common and dangerous exploits as well as simple and effective safeguards
that protect your PHP applications.
SQL Injection Attacks and Defense This book covers sql injection and web-
related attacks. It explains SQL injection. How to find, confirm, and
automate SQL injection discovery. It has tips and tricks for finding SQL
injection within the code. You can create exploits using SQL injection and
design to avoid the dangers of these attacks.
Please add your favorite php security tool or tip in the comments.
Updated for accuracy!
<h3>Anmerkungen</h3>
<details>
<summary>Liste der Anmerkungen</summary>
Peter Molnar November 23, 2011, 6:22 am
You forget one of the most powerful tips: open_basedir. In this case, using
/var/www is not the best solution, it would be better as:
/var/www/website1
and
/var/www/website1/www
/var/www/website1/tmp
Into apache config:
php_admin_value open_basedir /var/www/website1
php_admin_value upload_tmp_dir /var/www/website1/tmp
So no PHP execution outside the /var/www/website1 directory.
Reply Link
nixCraft November 23, 2011, 10:14 am
Heh, you read the post before it was finished. It was my fault. I
accidentally pressed the Publish button. I appreciate your feedback.
Reply Link
Peter Molnar November 25, 2011, 6:53 am
I see, it has become „25“ instead of „20“ that was in my RSS title :)
Reply Link
KJBweb November 23, 2011, 10:31 am
Awesome, I too caught a bit of the post before it was finished but this is
a very useful post; posted right whilst I was in the middle of developing an
application too, so doubly useful.
Thanks!
Reply Link
TryMe November 23, 2011, 10:55 am
All php backdoor shell are large in size. Use the following to find it
find / -name "*.php" -type f -size +10000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
find /var/www -name "*.php" -type f -size +10000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
Reply Link
Yunus November 26, 2011, 6:24 am
I use http://www.rfxn.com/projects/linux-malware-detect/ which is very
useful for detecting PHP backdoors
Reply Link
mauri November 23, 2011, 12:00 pm
What about the use of suPHP ?
Reply Link
Gopihere November 23, 2011, 2:22 pm
Ya. suPHP is also very useful and helpful for securing PHP websites.
Reply Link
deady November 23, 2011, 2:34 pm
apache-itk ++
Reply Link
Fred November 23, 2011, 2:36 pm
This is an outstanding post. One of the best resource I have ever seen regarding PHP security.
Keep up the good work.!
Reply Link
Chaudhary November 23, 2011, 3:41 pm
awesome, thank you for sharing.
Reply Link
Fredrik November 23, 2011, 4:58 pm
I agree, good post, keep em coming!
Reply Link
Firas November 23, 2011, 10:49 pm
Vivek, what the great VPSs control panel (Secure) works under FreeBSD you prefer?
Thanks for your post, great job.
^F.B
Reply Link
nixCraft November 24, 2011, 7:02 am
I do not use any control panel under FreeBSD or CentOS/RHEL based systems. Appreciate your post.
Reply Link
Umid November 24, 2011, 5:11 am
I like post very much!!! Thank you!
Reply Link
slapper November 24, 2011, 8:30 am
As usual excellent job !!!
Reply Link
Robert Gilaard November 24, 2011, 11:37 am
Very well written and informative post.
Do you know what the effect will be on PostgreSQL if you enable SQL safe mode in PHP with the directive:
sql.safe_mode=On
Reply Link
Tru November 24, 2011, 11:46 am
This only affects mysql_connect() which is MySQL specific function.
Reply Link
Tru November 24, 2011, 11:46 am
How do you set and use sql.safe_mode? You need to set mysql db setting in httpd.conf:
php_admin_value mysql.default_host "192.168.1.5"
php_admin_value mysql.default_user "DB_USER_LOGIN"
php_admin_value mysql.default_password "DB_USER_PASSWORD"
In php.ini or security.ini:
sql.safe_mode=On
You app is not aware of the database settings, it consequently cannot
disclose them through a bug or a backdoor, unless code injection is
possible. In fact, you can enforce that only an ini-based authentication
procedure is used by enabling SQL safe mode in PHP via the sql.safe_mode
directive. PHP then rejects any database connection attempts that use
anything other than ini values for specifying authentication data.
Source
Reply Link
Andres Mujica November 24, 2011, 7:43 pm
Excellent post, really really good
thanks for sharing
Reply Link
Steve A November 25, 2011, 2:54 pm
Use PDO.
With proper bind variables, SQL injection becomes far less of a problem.
Reply Link
mario November 26, 2011, 2:07 pm
Wow, this list has some exceptionally clueless points. There are some good
recommendations at the end, but I was expecting magic_quotes halfway in
between.
For example: eval() is not a security issue per se. It's just another
name for include(). Randomly disabling modules is as unproductive as
disabling file uploads. Mysql_real_escape_string is no longer state of the
art; which makes it a bad advise (much less the mysql_escape_string as
mentioned later).
The list in disabling „dangerous functions“ is also quite
retarded. Not everything with an „exec“ in the name does
actually call system commands. Disabling „curl_exec“ for example
will be a pain in the butt if you also disabled
„allow_url_fopen“. The author knew about
„allow_url_include“ but bemusingly got the purpose confused
here. ‐ Anyway, that's exactly the kind of cursorily security
recommendations that makes unacquainted shared hosters go overbroad with
limited reasoning.
Reply Link
Jonathan Cremin November 27, 2011, 5:04 pm
eval() is not another name for include(). eval() is often used by trojan
shells, and rarely used wisely or legitimately.
Reply Link
bish November 26, 2011, 7:08 pm
On RHEL/CentOS/Fedora, *never* rebuild an app by hand like php. The version
you will end up will be un-tuned, unsupported and very different in features
from what the distro offers. It will also within a week need to be built
again, tested against the OS and updated! You don't have the time.
Having said that, don't delete ini files within the php.d ini pool.
Don't rename them. Open them up and comment out the parts you like
(yes, even if it's everything) and save them back. The reason why has
to do with RPM update behaviour when files are missing vs when config files
are changed but exist on the system.
In #23, be careful that you don't take this trick too far. It works
because it targets what the apache user can't do. Users who've
gained root of course don't have any problem opening their own firewall
holes, but you may not have thought as much in the afterglow of reading such
a great suggestion.
It's a nice post. I can see a few things I can definitely use, myself,
at home and at work.
Reply Link
Jonathan Cremin November 27, 2011, 5:56 pm
A year and a half of security fixes since 5.3.3, and you think building
it by hand is something you should never do? The *first* thing a
responsible sysadmin should do is run a current version of PHP.
Reply Link
bish March 25, 2012, 2:05 am
I ran into this exact problem not so long ago. Apparently, some
people believe that RH and others just compile a 5.3.3. and just
leave it. How naive!
The customer in question had to ' HAD TO ' have a
'new' PHP 5.3.11, as it was the most secure
and up-to-date one around, guaranteed. A quick perusal of mitre
showed the version in question ' not sure now if it was
5.3.11 ' had about a half-dozen exploits. The user was
completely oblivious to this.
You know who wasn't? The team paid full-time to patch and test
around the exploits on the packages they support. The PHP version
available from the distro was fully-patched for all applicable
exploits affecting that version. It even covered the half-dozen ones
that would have laid the 'new, thus more
secure' version wide open.
I think the first thing a responsible sysadmin should do is to not
randomly compile in this week's code, breaking natural upgrade
potential from professionals and compatibility with the OS, and
maybe trust that a team of people whose job it is to keep their
stuff secure may be more proficient at it. But, YMMV if you happen
to have a large team dedicated to security alerts and code rebuilds
in response.
Old base-releases of software aren't just for sadistic sport;
they're for compatibility and certification for ISVs, or
at least those who can code toward a firm target. „Did
the brochure mention it was certified on that OS?“ is a
question we need to ask more often.
Reply Link
Elton Lockhart August 21, 2012, 10:02 am
This is a great comment! Other readers should take heed of what is said here.
Packages in a distro are patched for exploits and administration
of your own compiled PHP version takes a lot of time.
Reply Link
Cody October 31, 2012, 2:32 am
Exactly. bish is spot on. That goes even for removing files
instead of commenting out the related parts. If you remove the
file or rename it without having a file with the original name,
there's potential for a completely new configuration file
on an update. Look up rpmnew files (google or whatever). That
new files could be installed would be bad in many ways including
services being broken and also security issues. And if you want
to comment out every line entirely, you could simply do
something like this (assume comment char is # which most often
is):
sed -i 's/^/#/g' filename
Jonathan: it's called a backport. Note how CentOS 6.3 has
php 5.3.3. But do you actually think that means the source is
only of php 5.3.3? Not at all. Since you posted that
there's been more than 9 updates and 9 of those
include one (often more than one) fix(es) to security flaws
(yes, I am referring to php in CentOS). Your suggestion is
therefore quite invalid. Check this:
https://access.redhat.com/security/updates/backporting/?sc_cid=3093
Note also that your thinking would also mean that if someone
changes a banner to show something different than what the
program is, then it must be so. And even disabling software
version display doesn't necessarily mean the version is
completely hidden.
Besides taking more time updating things, there's other
reasons compiling is not at all appealing for production
servers.
As I said earlier, package based distros will typically backport
the fixes, anyway. A perfect example is one that is mentioned in
this article: CentOS. Observe how CentOS 6.x is still in the
2.6.x kernel tree and the current kernel tree is 3.6 and current
stable is 3.6.4. Guess what though? CentOS still update the
packages when there is a need (and there's often enough
security fixes included). If you want the absolute latest then
go for a distro that has newer versions but observe that newer
versions can equate to : new bugs, new compatibility issues, new
problems in general. Also, as for, say Fedora versus CentOS,
CentOS end of life time (10 years) is much longer than Fedora (2
years if I recall) and that means updates are applied longer,
too.
The fact there's package based distros is a blessing and I
not only love programming, I have used the distros that were
built entirely from source and similar (as in Linux from scratch
and Gentoo). I even had at one point worked on my own distro
(and I don't mean rebranding) and while fun it would
be insane to take on my own if I were to keep it updated and
stable. And that last point is why binary distros are
beneficial. Compatibility, (programs built for one version of a
library may very well be useless if the library is not that
version), stability (and what is the point of a server if it is
unstable?) and much more.
And another thing that I don't think was said (if so I
didn't read it as such). Why would anyone consider
unpackaged programs along with packaged programs? Sure, there is
'prefix and such, but that can lead to other issues
as well as more to maintain and update. Yes it's
possible and yes there's alternatives, but if you
don't consider those alternatives it equates to more
complication which leads to more issues. Package based distros
help with integrity and also file clashes.
Think about this, too: humans are not perfect and no matter what you do, you will at times make mistakes. That means programmers do too, including nasty bugs that effect stability and also security (and other things). This happens a lot. I myself am guilty of making very stupid mistakes in a project of mine that caused stability issues. It was a time I should not have been working on any programming (way too tired) but did not even realize that. End result: heap corruption which is a real pain to track down. Thankfully I did get it sorted quickly but it was still ugly.
Reply Link
Admir Trakic November 29, 2011, 1:53 pm
I would not trust any of mentioned commands for tracing phpbackdoors, since scripts can be also created within phpencoders and thus hard to be identifyed.
As allways, I surely would trust outbound/indbound monotor or intrustion system of any kind no matter what.
Reply Link
Blagomir Ivanov November 30, 2011, 2:18 pm
This is very useful post. But what about securing the users in chroot environment, not VPS as OpenVZ? Does this mean that I must have separate php process running for every one of the websites hosted on the same server?
I mean, if I start php-cgi process with spawn-fcgi, it will be started with
user „website1“. But this user does not have access to
files in website2, so it can not read/write/execute php files from website2.
Am I right?
Reply Link
Thomas December 6, 2011, 8:15 pm
I'm also looking forward for a good sendmail wrapper (with logging
capabilites).
All i tryed skip the attachment files when using PHP mail function and a
wrapper (php or sh). Any idea please ?
Reply Link
Jack Wade December 7, 2011, 6:10 pm
The best way of securing PHP is to use suPHP or Apache-mod-itk (requires apache to run as root, so it can fork/setuid to the website user to run the scripts) to run the scripts as the user who owns the specific website, rather than the web server user and also to disable allow_url_include (this makes it impossible to use include() or require() to execute external sources yet still allows file_get_contents()/readfile() and others to grab external legitimate files, like RSS feeds and so on)
Additionally, 99% of PHP vulnerabilities are the result of bad
„programmers“, not server security issues.
Reply Link
Aziz December 11, 2011, 2:01 am
Nice writeup Vivek. Whats your opinion on running an apache server on fastcgi/fpm/suhosin. From a security standpoint, is suexec necessary, or applicable, in this kind of setup? Or is it sufficient to create a separate fpm pool with a non-priveleged user for each vhost?
Reply Link
Guido Iaquinti December 21, 2011, 8:22 pm
Very good job, thanks for sharing!
Reply Link
Balaji December 22, 2011, 11:55 am
Excellent sharing. Thanks. Expecting more. :)
Reply Link
JIEM February 23, 2012, 5:34 am
Hello,
Somebody, can tell me how to disable eval() on php?
I have add this functionson disable_functions but not working ...
Reply Link
Yunus February 23, 2012, 5:45 am
Make sure you have disabled it in proper php.ini file for instance Debian/Ubuntu have different ini files for cli, cgi and apache.
Reply Link
JIEM February 23, 2012, 9:08 am
Dear Yunus,
I have add on disable_functions in php.ini but not working..
i'm using centos + cpanel.. can you help me?
Reply Link
Yunus February 23, 2012, 9:21 am
sure I will try to help, pls contact me at yunus[at] bridgeinfomatics.com
Reply Link
Dhanu March 24, 2012, 1:07 pm
#5: Log All PHP Errors .
Thanks for the source code :D
Reply Link
iyrag May 21, 2012, 5:02 pm
mysql_escape_string() will be deprecated; PDO is suggested instead :)
Reply Link
Lukasz June 13, 2012, 12:58 pm
thx man
Reply Link
Satheesh July 17, 2012, 7:11 am
it is very useful information.. thanks for cyberciti.biz
Reply Link
Just a user July 25, 2012, 7:33 pm
Thank you.
you have no idea how much you helped me !
cyberciti.biz is now in my top bookmarks
btw for SQL mysql_escape_string() is not so good.
we should all use parameter binding(for sql) and htmlpurifier for filtering user input
Reply Link
zingerx August 26, 2012, 12:00 pm
I've found the article GREAT. I have just a question. Which user should
be used to deploy files to the site, where the deployer doesn't
have root access? Should I „su apache“ or is it better
to add my user to apache group and have 775 in the whole tree?
Reply Link
James Rhys November 30, 2012, 5:33 pm
Ideally you'll have a „deployer“ user
(I've seen installations that use Jenkins or plain bash use
other usernames to obfuscate the deployment user) that has write access
on the directories you wish to update (/var/www/*) but only has firewall
access from within your VPN/Lan (e.g ‐ 10.10.10.101).
They'll need read and write (but not execute!) permissions on
the directories they deploy to.
Reply Link
olashile October 19, 2012, 11:36 pm
do you sell shell php uploaded/hosted to upload bank script& page.
Reply Link
zZz December 7, 2012, 8:38 pm
*eval() ‐ Evaluate a string as PHP code. This is often used by an
attacker
to hide their code and tools on the server itself. You can configure php to
disable eval().*
eval() is PHP language construction.Not a PHP function.
You can't disable it using standart disable_functions directive in
your php.ini
Use suhosin it has:
suhosin.executor.disable_eval = On
directive.
Thanks very nice material.Keep up.
Reply Link
Gustavo December 14, 2012, 7:21 pm
Disable .htaccess support and use apache rules directly in virtual host, you obtain better performance. Set error pages.
Disable Directory Listing
Options -Indexes
Error Pages
http://httpd.apache.org/docs/2.2/custom-error.html
Reply Link
ramiro April 3, 2013, 8:07 pm
Wonderful information you share. Thanks, this has been very useful to me.
Reply Link
Chris December 13, 2013, 2:30 pm
I've also come up with a tool that checks the php.ini configuration
currently
in use and returns warnings/errors it finds:
Iniscan ‐ https://github.com/psecio/iniscan
Could be helpful to some out there.
Reply Link
Caspel December 19, 2013, 8:13 am
Why parse_ini_file() should be disabled?
I can't find any security issue usind this function.
Can you explain me why?
Reply Link
Mark Finzel February 16, 2014, 5:32 am
What would your recommendation be for the open_basedir setting? I have seen conflicting reports. Do you want to do /home/user/public_html
or just /home/user
I have also seen mention of /home/tmp
I have not seen a clear explanation of how to set it to avoid issues down the road.
(I am using FastCGI so have to set in each user's php.ini file)
Reply Link
Chris Cornutt February 17, 2014, 12:33 am
Personally, I'd suggest two things when it comes to
open_basedir:
1. Keep it inside the base of the application. This isn't the
same thing as the document root as you could have files outside of that
that relate to the application. I'd *never* allow access to a
user's home directory though.
2. Keep it as limited as possible. Don't specify something like
„/var/www“ when „/var/www/site-name/public“
will work.
Reply Link
Mk February 22, 2014, 1:09 pm
1)I'm confused with open_base_dir and upload_tmp_dir. I think that
upload_tmp_dir should not be inside open_basedir. Why code execution should
happen in the upload directory? Currently I have set it outside open_basedir
and I have only a warning when uploading images in an installation of
wordpress because it tries to determine the type of file inside the upload
directory which I think it shouldn't try to do this in the first
place. I'm still studying that though. Everything else works
correctly including file upload plugins etc ...
2)I have the same question about session.save_path. Should code execution in session.save_path be allowed?
3)Also Is it correct for session.save_path and upload_tmp_dir to share the same directory?
4) And finally does anybody know what folder permmisions should the
session.save_path and upload_tmp_dir directories have? I think that the
answer on this is 600 but I would like to know what others think.
Reply Link
Chris Cornutt February 23, 2014, 7:47 pm
Some answers ...
1) The way that PHP operates, upload_tmp_dir *has* to be inside the
open_basdedir if it's set. Otherwise it cannot write to the
directory when a user uploads the file. Keep in mind, though, that you
should be immediately moving the temporary file once the user uploads
it. Also remember, you can have multiple directories for open_basedir
seperated with a colon (:).
2) Not sure what you mean by „code execution“ but I
assume by your first question, you mean the open_basedir setting. As far
as I know, session save path is influenced by open_basedir so
it'd need to be included in the open_basedir list as well.
3) Personally, I'd recommend against the save_path and
upload_tmp_dir sharing the same path. It'd be better for a
separation of concerns to have them in different places.
4) The permissions depend on who owns the directory, really. If you set
the owner to the web server user, then 600 should be fine (you might
need 700, not sure).
Reply Link
Cody March 13, 2014, 5:57 pm
And to elaborate on point 4 (not that I think Chris did any thing
incorrect or wrong here ' I just feel there's no such
thing as too much information on the subject of permissions). Also,
apologies if I went overboard with some of this but I got carried away
with explaining modes and didn't realise how far I went until
after the fact. Anyway:
As Chris wrote it depends on who owns the directory and more so what
permission is needed. But ' and here's the important bit
(pardon thepun ... permission bits and all) ' use
the most restrictive permission as possible, always (okay, obviously you
shouldn't mess around with most of your directories,
binaries, libraries, etc., and you should never blindly change ownership
of these without knowing what you're doing ' chmod
and chown can be very dangerous especially when recursively operating
but for /var/www or wherever you have your web directory you should be
fine, especially if you don't recursively chmod [in general
the -R option is something you need to be careful of, for chmod and
chown]). So if you can get away with 400 then by all means do so (I
doubt you'd be OK with that since then you'd have
to be root to write to the files, but ... the point remains the
same: restrict where you can as much as you can, as long as it is safe).
On the subject of whether read is sufficient, there's also
the possibility that ' for example ' you have a
user (regular) for editing files in the web directory (as a virtual
host, say) and the apache user is the group of the directory (for
example it has a CMS that might update a file) or alternatively, if you
don't have a CMS, you have the group also be the same as the
owner and only allow read/execute for the rest of the world (so that
apache can open and serve files to viewers of the website(s)). Then, you
can just grant rwx to the user and apache (or just others) can get away
with rx (so can read files and can open directory). Others (world)
should never include write on a website. If there were any files that
the site itself (let's say a CMS) needs to edit (say on
update of the CMS) then you can grant those files write access to the
apache user (or however you have apache set up). In short:
you're restricting it as much as possible but not breaking
anything either.
An important elaboration on permissions is it also goes for database
permissions. Example: wordpress documentation insists you need to GRANT
ALL to the user on the database that wordpress uses. However, that is
complete and utter nonsense. I know because I use much more restricted
on my wordpress installs and there has never been a problem related to
this (mod_security2 and other things can cause issues but that's
nothing to do with the database itself and mod_security2 is actually
well worth any hassle getting it to function correctly [false positives,
certain rules needing modifications for your site, whatever it is]).
Furthermore, and I seem to remember wordpress documentation is guilty
here too, when people suggest that to fix (or make sure it
isn't a permissions issue) read/write permissions you should
(even if temporarily) set 777, don't do it. For your own sake
and for your system's sake (why on earth would anyone think a
directory should be world read/write/execute to make sure there is no
permission issues, is to this day something that bewilders and bemuses
me). The only directories that should be 777 (which are actually 1777
‐ restricted delete; 1777 on a file would be sticky bit with
read/write/execute) are directories like /var/tmp and /tmp
If you ever do need write and read permission, then 6 (or rw) should
suffice. If you only need read then 4 suffices. Likewise, if you only
need read and execute, then 5 suffices. Also, as for execute bit (1=x,
2=w, 4=r, and its bits so binary which is why 7 = rwx, 6 = rw, 5 = rx,
etc. Note: the modes itself, that is 0-7, is in fact not binary but
octal [hence 0-7] but they add up like binary [observe that 8 is
divisible by 2 just like 16 is, which is why octal and hexadecimal are
often used in programming ‐ much more convenient than
binary), it depends on if the file is a directory or a regular file as
to what it is used for. For regular files it allows execution. For
directories it allows: changing to the directory (you'll need +r
for viewing files in it and +w for writing to the directory).
Any way, hopefully that is of value to _someone_ (and hopefully the fact
I am still trying to wake up did not allow me to make any stupid
mistakes/errors
but if I did I am sure someone will correct me ‐? I hope so
anyway)!
Reply Link
Donald December 31, 2014, 3:16 am
why no mention of suphp?
Reply Link
Bhumi March 5, 2015, 12:18 pm
Useful. Thanks.
Reply Link
nathan October 15, 2015, 7:47 pm
great article. i have a quick question.
in section 18 you recommend setting directory permissions to 0445
why give world read and execute, given owner and group only have read, am I missing something?
thanks
Reply Link
Abhay February 7, 2016, 7:33 am
Oh my Tux!
How could you forget to mention OWASP?
Please, forget any other database connection different from PDO.
https://www.owasp.org/index.php/PHP_Security_Cheat_Sheet
Reply Link
Markus May 11, 2016, 12:54 pm
Thanks for the great article.
I also add the pcntl_* stuff to disabled_functions, to avoid things like double forking.
Reply Link
kapil Prabhudesai June 30, 2016, 12:22 pm
Very Informative
Reply Link
Dejay Clayton July 1, 2016, 7:01 pm
Setting the upload directory to point to the sessions directory seems like
it would be a very dangerous thing to suggest. Maybe you can fix that?
Reply Link
dimon August 4, 2016, 1:25 pm
I like to use cloudflare and don't worry about exposing ip or php,
apache versions
Reply Link
</details>
<br />
<h3>Link:</h3>
<a href="https://www.cyberciti.biz/tips/php-security-best-practices-tutorial.html" target=_blank>nixCraft :: Linux: 25 PHP Security Best Practices For Sys Admins</a><br />
<br />
</html>
<html>
<h3>Sessions (Sitzungen)</h3>
<ul>
</ul>
<h3>Weiterleitung auf eine andere Seite</h3>
<ul>
</ul>
<h3>Einbinden von Dateien in ein Skript</h3>
<ul>
</ul>
<h3>Sessions starten und fortführen</h3>
<ul>
</ul>
<h3>Die Übergabe der Session-ID</h3>
<ul>
</ul>
<h3>Session-ID ohne Cookies</h3>
<ul>
</ul>
<h3>Sessions beenden</h3>
<ul>
</ul>
<h3>Lebensdauer einer Session</h3>
<ul>
</ul>
<h3>Praxis: Passwortschutz für mehrere Seiten</h3>
<ul>
</ul>
<h3>Sicherheit in Sessions </h3>
<ul>
</ul>
</html>
<html>
<h3>Sicherheitsbewusster Programmierstil</h3>
<ul>
</ul>
<h3>Schutz vor Cross-Site Scripting</h3>
<ul>
</ul>
<h3>Schutz vor manipulierten Formularen</h3>
<ul>
</ul>
<h3>Dispatcher-Skripte </h3>
<ul>
</ul>
</html>
<html>
<table border="1">
<tr>
<th>Escape‐<br />Sequenz</th><th>Bedeutung</th>
</tr>
<tr><td><center>\n</center></td><td>Zeilenumbruch</td></tr>
<tr><td><center>\r</center></td><td>Wagenrücklauf</td></tr>
<tr><td><center>\t</center></td><td>Tabulator</td></tr>
<tr><td><center>\"</center></td><td>Doppelte Anführungszeichen</td></tr>
<tr><td><center>\$</center></td><td>Dollarzeichen</td></tr>
<tr><td><center>\\</center></td><td>Backslash</td></tr>
</table>
<br />
<h3>Fallstricke bei Escape-Sequenzen</h3>
<ul>
<li>Hinweis:<br />
Verwechseln Sie Escape-Sequenzen nicht mit HTML-Tags. <br />
Dieser Punkt führt selbst bei erfahreneren PHP-Programmierern </br />
immer wieder zu langwierigen Suchen nach Fehlern, die gar keine sind.</li>
</ul>
</html>
<html>
<h3>Steueranweisungen - Übersicht</h3>
<ul>
<li>Programme sollen - in begrenztem Umfang - in der Lage sein, “Entscheidungen“ zu treffen,<br />
um auf unterschiedliche Situationen adäquat zu reagieren. In der Webprogrammierung sollten sie<br />
beispielsweise:<ul>
<li> eine Hinweisseite ausgeben, wenn der Benutzer eine Fehleingabe macht,</li>
<li> ein Anmeldefenster so lange anzeigen, bis der Benutzer seinen Benutzernamen <br />
und sein Passwort korrekt angegeben hat,</li>
<li> eine vorher unbekannte Anzahl von Datensätzen einlesen, bis der Benutzer die Eingabe beendet.
</ul></li>
<br />
<li><b>Definition</b><br />
Um derartige “Entscheidungen“ in PHP formulieren zu können, werden sogenannte <br /> Steueranweisungen, die auch als <b>Kontrollstrukturen</b> bezeichnet werden, benötigt. <br />
Diese speziellen Anweisungen werden dazu verwendet, um den Ablauf des Skripts <br />
an Hand der während der Ausführung gegebenen Situation zu steuern.<br />
<br />
Kontrollstrukturen lassen sich in zwei Kategorien unterteilen:
<ul>
<li> Bedingte Anweisungen führen Anweisungen nur dann aus, <br />
wenn eine oder mehrere vorab definierter Bedingungen erfüllt sind.</li>
<li> Schleifen wiederholen einen Codeabschnitt solange, bis eine bestimmte Bedingung erfüllt ist.</li>
</ul></li>
<br />
<li>Die folgende Tabelle gibt einen Überblick über die in PHP definierten Kontrollstrukturen:
<table border="1">
<tr><th>Kontrollstruktur </th><th>Name</th><th>Erläuterung</th></tr>
<tr><td><b>Bedingte Anweisung</b> </td><td> if</td><td>Ein Codeabschnitt wird nur dann ausgeführt, <br />wenn eine bestimmte Bedingung vorliegt.</td></tr>
<tr><td></td><td>if..else </td><td>Ein Codeabschnitt wird nur dann ausgeführt, <br />wenn eine bestimmte Bedingung erfüllt ist. <br />Ansonsten wird ein anderer Codeabschnitt ausgeführt.</td></tr>
<tr><td></td><td>switch..case</td><td>Aus einer Mehrzahl möglicher Codeabschnitte <br />wird an Hand einer Auswahlbedingung ein bestimmter ausgewählt.</td></tr>
<tr><td><b>Schleife</b></td><td>while</td><td>wiederholt einen Codeabschnitt solange, <br />bis eine Bedingung erfüllt ist. <br />Ist die Bedingung zu Beginn nicht erfüllt, <br />wird der Codeabschnitt nicht ausgeführt.</td></tr>
<tr><td></td><td>do..while </td><td>wiederholt einen Codeabschnitt solange, <br />bis eine Bedingung erfüllt ist. <br />Ist die Bedingung zu Beginn nicht erfüllt, <br />wird der Codeabschnitt trotzdem einmal ausgeführt.</td></tr>
<tr><td></td><td>for</td><td>wiederholt einen bestimmten Codeabschnitt solange, <br />bis für einen Zähler ein definierter Zielwert erreicht ist.</td></tr>
</table></li>
</ul>
<h3>Anweisungsblock</h3>
<ul>
<li><b>Definition</b><br />
Für Steueranweisungen ist es praktisch und häufig auch unverzichtbar, dass man<br />
mehrere Anweisungen zu einer Gruppe von Anweisungen, dem sogenannten <br />
Anweisungsblock, auch Codeblock genannt, zusammenfasst. Er steht immer in <br />
geschweiften Klammern und muss nicht mit einem Semikolon abgeschlossen <br />
werden. PHP erkennt selbst, dass eine neue Anweisung beginnt (bei der öffnenden<br />
Klammer) bzw. endet (bei der schließenden Klammer).</li>
<br />
<li>Ein Anweisungsblock wird üblicherweise eingerückt, das bedeutet, dass jede <br />
Anweisung zwischen den geschweiften Klammern ein oder zwei Leerzeichen <br />
nach rechts verschoben wird. Diese Einrückung ist zwar nicht Pflicht, erhöht <br />
aber die Lesbarkeitü des Quelltextes und hilft, Fehler in den Kontrollstrukturen<br />
leichter zu erkennen. Statt Leerzeichen kann man auch Tabulatoren verwenden.<br />
Da Tabulatoren aber vergleichsweise große Einrückungen vornehmen, ist <br />
deren Verwendung bei tief verschachtelten Strukturen nicht ratsam.</li>
<br />
<li><b>Hinweis</b><br />
Für die Position der öffnenden geschweiften Klammer gibt es zwei gleichwertige Varianten: <br />
<ul>
<li>zum einen im Anschluss an den PHP-Code</li>
oder
<li> allein stehend in der nächsten Zeile</li>
</ul></li>
<br />
<li>Beide Varianten sind inhaltlich gleichwertig, <br />
Man kann sich also für diejenige entscheiden, die einem lieber ist. Der Autor bevorzugt <br />
die erste Variante, weil die Darstellung so kompakter ist. <br />
Die zweite Variante hat den Vorteil, dass sie den Code etwas “entzerrt“ und so mehr <br />
Übersichtlichkeit bringen kann.<br />
Wichtig aber ist: Man sollte sich für <b>eine Schreibweise</b> entscheiden.</li>
</ul>
<h3>Bedingte Anweisung - if-Anweisung</h3>
<ul>
<li><b>Definition</b><br />
Mit der bedingten Anweisung wird ein Anweisungsblock nur dann ausgeführt, <br />
wenn eine bestimmte Bedingung vorliegt. Die Bedingung kann ein beliebiger <br />
Ausdruck sein, solange dessen endgültiger Wert ein Wahrheitswert ist.</li>
<br />
<li>In PHP wird die <b>bedingte Anweisung</b> mit der if-Anweisung ausgeführt.<br />
Diese Anweisung besteht aus:
<ul>
<li> dem Schlüsselwort <b>if</b>, der Bedingung, die zu prüfen ist,</li>
<li> einem Codeblock (Anweisungsblock), der ausgeführt wird, wenn die Bedingung erfüllt ist,</li>
<li> runden Klammern, in denen die Bedingung steht,</li>
<li> geschweiften Klammern, in denen der Codeblock notiert wird.</li>
</ul></li><br />
<li>Die formale Schreibweise lautet:
<code><pre>if (Bedingung) {
<i>Anweisungs- bzw. Codeblock;</i>
}</pre></code>
</li>
</ul>
<h3>Bedingte Anweisung - Verzweigung</h3>
<ul>
<li><b>Definition</b><br />
Eine Erweiterung der bedingten Anweisung ist die Verzweigung. Mit ihr kann man zusätzlich <br />
einen Codeblock angeben, der dann ausgeführt wird, wenn die geforderte Bedingung <u>nicht</u> erfüllt ist.
</li>
<br />
<li>Die Verzweigung wird genau so formuliert wie die bedingte Anweisung:<br />
Hinter die schließende Klammer des bedingten Codeblocks wird jedoch noch das Schlüsselwort <b>else</b><br />
mit einem weiteren Codeblock angefügt. Die formale Schreibweise lautet:
<code><pre>if(<i>Bedingung</i>){
<i>Anweisungsblock1;</i>
}
else{
<i>Anweisungsblock2;</i>
}</pre></code>
</li>
</ul>
<h3>Bedingte Anweisung - Sonderfall: Bedingte Zuweisung</h3>
<ul>
<li><b>Definition</b><br />
Ein Sonderfall der Verzweigung ist die <b>bedingte Zuweisung</b>, die auch <br />
<b>ternäre Zuweisung</b> genannt wird. Hierbei handelt es sich um eine Verzweigung,<br />
bei der einer Variablen einer von zwei möglichen Werten zugewiesen wird. <br />
Ist die Verzweigungsbedingung erfüllt, wird der Variablen der erste Wert zugewiesen,<br />
ansonsten der zweite.</li>
<br />
<li>Beispiel:<br />
<code><pre>
Beispiel
1.<?php
2. $a = 10;
3. $b = 20;
4.
5. if ($a > $b) {
6. $max = $a;
7. }
8. else {
9. $max = $b;
10. }
11.
12. echo "Das Maximum lautet $max";
13.?>
</pre></code></li>
<li>Für die bedingte Zuweisung gibt es auch eine Kurzschreibweise:
<code><pre>$variable = (Bedingung)? wert1 : wert2;</pre></code></li>
<br />
<li>Auf der linken Seite der Zuweisung steht der Name der Variablen, die einen <br />
Wert erhalten soll. Auf der rechten Seite stehen (von links nach rechts):
<ul>
<li> die Bedingung in Klammern,</li>
<li> ein Fragezeichen (?),</li>
<li> der Wert der Variablen, wenn die Bedingung erfüllt ist (wert1),</li>
<li> ein Doppelpunkt (:),</li>
<li> der Wert der Variablen, wenn die Bedingung nicht erfüllt ist (wert2).</li>
</ul></li>
<li>Der <b>Nachteil</b> solch kompakter Schreibweisen ist häufig, dass sie bei <br />
späterem Durchlesen des eigenen Quelltextes schwerer zu verstehen sind. In den <br />
meisten Fällen ist die inhaltlich gleichwertige Verzweigung besser zu überschauen.<br />
Man muss im Einzelfall genau abwä und man sollte der Lesbarkeit den Vorrang geben.</li>
</ul>
<h3>Bedingte Anweisung - Mehrfachverzweigung und Fallauswahl</h3>
<ul>
<li><b>Definition</b><br />
In einer <b>Mehrfachverzweigung</b> können mehrere Bedingungen nacheinander<br />
geprüft werden. Wenn diese Bedingungen sich gegenseitig ausschließen, das <br />
heißt, wenn immer nur eine der Bedingungen zutreffen kann, spricht man von einer <br />
<b>Fallauswahl</b> oder <b>Fallunterscheidung</b>.</li>
<br />
<li>Das Schlösselwort ist <b>elseif</b>, dem ‐ wie bei der if-Anweisung ‐ eine <br />
Bedingung und ein Codeblock folgen. Ein <b>elseif</b> kann immer nur direkt nach dem Codeblock<br />
einer if-Anweisung stehen. Man kann mehrere elseif-Blocks hintereinander verwenden und einen <br />
abschließenden else-Block hinzufügen, der all die Fälle abdeckt, die durch die vorherigen<br />
Bedingungen nicht erfüllt wurden. </li>
<br />
<li>Die formale Schreibweise lautet:
<code><pre>
if (<i>Bedingung1</i>){
<i>Anweisungsblock1</i>;
}
elseif (<i>Bedingung2</i>){
<i>Anweisungsblock2</i>;
}
else {
<i>Anweisungsblock3</i>;
}</pre></code></li>
<br />
<li>Für die Fallunterscheidung gibt es noch eine besondere Struktur, die kompakter<br />
in der Darstellung ist als die Verwendung von elseif. Diese Struktur wird als <br />
<b>switch-case-Anweisung</b> bezeichnet, </li>
</ul>
<h3>Bedingte Anweisung - Fallauswahl mit der switch-case-Anweisung</h3>
<ul>
<li>Wenn Sie eine Variable auf einen von mehreren Werten testen wollen, können Sie<br />
alternativ zu mehreren elseif-Blöcken auch die (etwas übersichtlichere) <b>switch-case</b>-<br />
Anweisung verwenden.</li>
<br />
Die formale Schreibweise lautet:
<code><pre>
switch (<i>Ausdruck</i>) {
case <i>wert1</i>:
<i>Anweisungsblock1</i>;
case <i>wert2</i>:
<i>Anweisungsblock2</i>;
case <i>wert3</i>:
<i>Anweisungsblock3</i>;
default:
<i>Alternative</i>;
}
</pre></code>
<br />
<li>Durch die <b>switch-Anweisung</b> macht man deutlich, dass nun eine Fallauswahl<br />
für den in den Klammern stehenden Ausdruck getroffen werden soll. Dieser Ausdruck<br />
ist im Regelfall eine Variable, sodass man letztendlich den Inhalt einer Variablen auf <br />
verschiedene mögliche Alternativen prüft. Der Anweisungsblock nach dem switch<br />
enthält nun eine beliebige Anzahl von case-Blöcken, die jeweils für einen möglichen<br />
Wert zuständig sind.</li>
<br />
<li>Jeder case-Block besteht aus dem Schlüsselwort case, einem Wert (mit dem <br />
die Variable aus dem switch verglichen wird) und einem Doppelpunkt. Hinter dem <br />
Doppelpunkt stehen die Anweisungen, die ausgeführt werden sollen, wenn der Aus‐<br />
druck aus dem switch mit dem Wert hinter dem aktuellen case übereinstimmt.</li>
<br />
<li>Der abschlie&stlig;ende default-Block (engl. für Voreinstellung, Vorgabe) wird ausgeführt,<br />
wenn mit keinem der darüber stehenden Werte ein Treffer gelandet wurde.</li>
<br />
<li><b>Hinweis</b><br />
Eine kleine Eigenart hat die switch-case Anweisung allerdings: Sobald ein zutreffender Wert<br />
gefunden wurde, werden alle Anweisungen ab diesem Wert ausgeführt - auch die der nach&hyphen<br />
folgenden case-Blöcke und des default-Blocks. Wenn man dieses Verhalten vermeiden will,<br />
muss man am Ende jedes case-Blocks die break-Anweisung benutzen.</li>
</ul>
<h3>Schleifen - Wiederholschleife: Variante 1 :: Kopfschleife</h3>
<ul>
<li><b>Definition</b><br />
<b>Schleifen</b>, auch Wiederholschleifen genannt, sind Steueranweisungen, die es<br />
ermöglichen, einen Codeblock mehrfach auszuführen, solange eine Bedingung <br />
erfüllt ist.</li>
<br />
<li>Eine Schleife hat große &Auuml;hnlichkeit mit der bedingten Anweisung. Das <br />
Schlüsselwort ist <b>while</b> (deutsch: solange).</li>
<br />
<li>Die formale Schreibweise lautet:
<code><pre>
while(<i>Bedingung</i>) {
<i>Anweisungsblock</i>;
}
</pre></code>
<ul>
<li>Die erste Zeile bildet den Kopf der Schleife. Wie bei der if-Anweisung steht die Bedingung, <br />
die zu prüfen ist, in Klammern hinter while.</li>
<li>Ist diese Bedingung erfüllt, wird der Anweisungsblock zwischen den beiden geschweiften<br />
Klammern ausgeführt.</li>
</ul>
</li>
<br />
<li>Im Prinzip kann die Schleife immer weiterlaufen - es sei denn, im Anweisungsblock <br />
geschieht etwas, das dafür sorgt, dass die Bedingung nicht mehr erfüllt ist. </li>
<br />
<li><b>Definition</b><br />
Die while-Schleife ist eine sogenannte <b>Kopfschleife</b>, d.h. es wird auf jeden Fall zuerst<br />
die Bedingung geprüft. Ist die Bedingung nicht erfüllt, wird der Anweisungsblock nicht ausgeführt.
</li>
</ul>
<h3>Schleifen - Wiederholschleife: Variante 2 :: Fußschleife</h3>
<ul>
<li><b>Definition</b><br />
Wird eine Schleife mindestens einmal durchlaufen und erst dann geprüft, ob eine<br />
Wiederholungsbedingung erfüllt ist, handelt es sich um eine <b>Fußschleife</b>, auch <b>nicht‐<br />
abweisende Schleife</b> genannt.</li>
<br />
<li>Die formale Schreibweise lautet:
<code><pre>
do {
<i>Anweisungsblock</i>;
} while(<i>Bedingung</i>);
</pre></code>
<ul>
<li> In PHP wird der Beginn dieser Schleife mit dem Schlüsselwort <b>do</b><br /> gekennzeichnet.
<li> Es folgt der Anweisungsblock, der wiederholt werden soll.
<li> Hinter der schließenden Klammer des Anweisungsblocks folgt die Bedingung<br />mit einem voranstehenden while.
</ul></li>
<br />
<li><b>Hinweis</b>
Zu beachten ist, dass hinter der while-Bedingung ein <b>Semikolon</b> stehen muss.<br />
Anders als bei der Kopfschleife wird hier die Schleife nicht mit einer geschweiften <br />
Klammer beendet, sodass der Interpreter ein Semikolon erwartet.</li>
<br />
<li><b>Hinweis</b><br />
Die große Mehrzahl von Schleifen sind Kopfschleifen. Fußschleifen werden nur<br />
in sehr speziellen Situationen benötigt.</li>
</ul>
<h3>Schleifen - Zählschleife :: for </h3>
<ul>
<li><b>Definition</b><br />
Ein besonderer Fall der Schleifen sind die Zählschleifen. Darunter versteht<br />
man Schleifen, in denen man eine Zählvariable (eine gewöhnliche Variable vom Typ<br />
Integer) von einem Startwert schrittweise zu einem Zielwert hoch- oder herunterzählt. Solange<br />
der Zielwert nicht erreicht ist, wird ein Anweisungsblock wiederholt.</li>
<br />
<li>Zählschleifen sind also ein Spezialfall der Schleifen. </li>
<br />
<li>Mit der Zählschleife hat man nun die Möglichkeit, Startwert, Zielwert und <br />
Schrittrichtung in einer Zeile zu schreiben. Die formale Schreibweise lautet:
<code><pre>
for(<i>Startwert</i>; <i>Bedingung</i>; <i>Aenderungsanweisung</i>) {
<i>Anweisungsblock</i>;
}
</pre></code>
<li>Hinter dem Schlüsselwort <b>for</b> stehen in Klammern und durch <br />
Semikolon getrennt:
<ul>
<li> Name und Startwert der Zählvariablen als Zuweisung</li>
<li> Zielwert als Bedingung</li>
<li> Art der Änderung als Anweisung</li>
</ul>
Dahinter folgt der (zu wiederholende) Anweisungsblock.</li>
<br />
<li>Man sieht, dass eine for-Schleife wesentlich kompakter ist als eine while-Schleife.<br />
Auch der Anweisungsblock ist übersichtlicher.</li>
<br />
<li><b>Hinweis</b><br />
Es ist auf jeden Fall lohnenswert, sich mit der zunächst ungewöhnlichen Schreibweise<br />
der for-Schleife vertraut zu machen. Sie erspart eine Menge Tipparbeit und ermöglicht durch ihre<br />
Flexibilität eine Menge verblüffender Tricks in der fortgeschrittenen Programmierung.</li>
</ul>
<h3>Vorzeitiger Schleifenabbruch mit break</h3>
<ul>
<li>Manchmal kann es sinnvoll sein, eine Schleife vorzeitig zu verlassen, also die Abarbeitung<br />
der Schleife zu beenden, obwohl die Schleifenbedingung noch erfüllt ist. Dies kann zum Beispiel<br />
der Fall sein, wenn innerhalb der Schleife ein Fehler aufgetreten ist und die weitere Bearbeitung<br />
keinen Sinn mehr hat.</li>
<br />
<li>break kann man auch in jeder Schleife verwenden, um die Schleife vorzeitig zu beenden.</li>
<br />
<li><b>Hinweis</b><br />
Man benutze die break-Anweisung mit Bedacht. Je versteckter die möglichen Austritte aus<br />
der Schleife sind, desto schwerer wird im Falle eines Falles die Fehlerkorrektur, wenn etwas <br />
nicht richtig funktioniert. break sollte nur verwendet werden, wenn außergewöhnliche <br >/
Bedingungen zum Abbruch der Schleife führen.</li>
</ul>
<h3>Schleife fortführen mit continue </h3>
<ul>
<li>Häufiger noch als der vorzeitige Abbruch einer Schleife kann die Situation <br />
auftreten, dass der Anweisungsblock vorzeitig beendet werden soll. Die Schleife<br />
selbst soll aber weiterlaufen, d.h. es soll wieder die Schleifenbedingung geprüft werden <br />
und danach gegebenenfalls der Anweisungsblock gestartet werden.</li>
<br />
<li>Dies kännte beispielsweise sinnvoll sein, wenn in einer Schleife ein einzelner,<br />
besonderer Fall eintreten kann, für den der Anweisungsblock nicht sinnvoll ist. </li>
<br />
<li><b>Hinweis</b><br />
Die continue-Anweisung hat den Nachteil, dass sie die Lesbarkeit des Quelltextes verschlechtert,<br />
sodass Fehler schwerer zu entdecken sind. Man muss auch hier im Einzelfall gut abwä, ob sich <br />
die gewünschte Funktionalität nicht auch mit anderen Mitteln erreichen lässt.</li>
</ul>
</html>
<html>
<ul>
<li>
Bei allen bisher genannten Vergleichen versucht PHP, eine Typumwandlung durchzuführen,<br />
wenn der linke und der rechte Operand unterschiedlichen Typs sind. </li>
<br />
<li>Wenn also eine Zahl und eine Zeichenkette verglichen werden, so wird PHP die Zeichenkette in<br />
eine Zahl umwandeln und dann den Vergleich durchführen.</li>
<br />
<li>Wenn dieser implizite Eingriff nicht gewünscht ist, kann man die Operatoren <br />
<ol><li><b>strikte Gleichheit</b> (===)</li> und <li><b>strikte Ungleichheit</b> (!==) </li></ol>verwenden.<br />
In diesem Fall werden zwei Werte unterschiedlichen Typs grundsätzlich als ungleich angesehen:
</li>
<br />
<li>Wenn man nicht will, dass PHP den Versuch unternimmt, Äpfel und Birnen zu vergleichen,<br />
dann sind die <b>strikten Vergleichsoperatoren</b>zu verwenden.</li>
</ul>
</html>
<html>
Für die Darstellung tabellarischer Daten im Browser müssen die <br />
entsprechenden HTML-Tags verwendet werden. Eine Möglichkeit ist<br />
beispielsweise die Verwendung des TABLE-Tags.<br />
</html>
<html>
<h3> Automatische Typumwandlung</h3>
<ul>
<li><b>PHP ist eine typfreie Sprache.</b> Das bedeutet, dass in einer Variablen<br />
nacheinander Werte von ganz unterschiedlichem Typ gespeichert <br />
werden können.<br />
In anderen Programmiersprachen muss man sich zu Beginn auf einen <br />
Datentypen für die Variable festlegen, der danach nicht mehr ge-<br />
ändert werden kann.</li>
<br />
<li>Typfreie Sprachen haben den Vorteil, dass sie viel flexibler und ein-<br />
facher als typisierte Sprachen sind. Allerdings hat dieses Vorgehen auch <br />
<b>Nachteile</b>: <br />
Fehler, die daraus resultieren, dass Werte verarbeitet werden, die gar nicht <br />
zueinander passen, können in PHP nicht so leicht vorab erkannt werden.</li>
</ul>
<h3> Manuelle Typumwandlung</h3>
<ul>
<li>Man kann eine Typumwandlung, auch <b>Typkonvertierung</b> oder <b>Casting</b><br />
genannt, bewusst herbeiführen, indem man vor die Variable, deren Inhalt <br />
man konvertieren will, in runden Klammern den Namen des Zieltyps schreibt.<br />
<b>Beispiel:</b><br />
Mit folgender Anweisung wandelt man eine Zeichenkette in eine Zahl (integer, Kurzform: int) um:<br />
<code><pre>
1.<?php
2. $a = "50 Häuser";
3. $b = (int) $a;
4. echo "aus \"$a\" wird \"$b\"";
5.?>
</pre></code>
</li>
<br />
<li> Eine Zeichenkette wird von PHP von links beginnend in eine Zahl umgewandelt. <br />
Stößt PHP dabei auf Zeichen, die sich nicht sinnvoll umwandeln lassen, bricht <br />
der PHP-Interpreter ab und liefert den Wert zurück, der bis dahin ermittelt wurde.
</li>
<br />
<li><b>Hinweis:</b><br />
Wenn man eine Fließkommazahl in eine Ganzzahl casten will, wird der Nachkomma-<br />
teil abgeschnitten, ohne dass eine Rundung erfolgt: aus 4.99 wird also 4.
</li>
<br />
<li>Wenn man Zahlen in <b>Wahrheitswerte</b> casten will, wird die 0 als „false“ <br />
und jeder andere Wert als „true“ interpretiert. <br />
<br />
Strings (Zeichenketten) können ebenfalls in Wahrheitswerte umgewandelt werden. <br />
Dabei wird jede Zeichenkette, die mindestens ein Zeichen enthält, als true interpretiert,<br />
nur die leere Zeichenkette ergibt false.
</li>
<br />
<li>In der folgenden Tabelle ist aufgelistet, welche Umwandlungen sinnvoll möglich sind:
<table border="1">
<tr><th>Quelltyp</th><th>Zieltyp</th></tr>
<tr><td>string</td><td>integer bzw. int <br /> double, float, real</td></tr>
<tr><td>integer <br />bzw. int</td><td> double, float, real<br />string</td></tr>
<tr><td>double</td><td>integer bzw. int<br />string</td></tr>
</table>
</li>
<br />
<li><b>Hinweis</b><br />
Statt <u>integer</u> kann man auch die Kurzform <b>int</b> verwenden. <br />
Für Fließkommazahlen kann man zwischen <b>double , float und real</b> wählen.<br />
Die Umwandlung erfolgt bei allen drei Varianten auf genau die gleiche Art und <br />
Weise. Die unterschiedlichen Begriffe existieren nur aus historischen Gründen.
</li>
<br />
<li><b>Funktion settype(): </b><br />
Wenn man den Typ einer Variablen ändern oder explizit setzen will, kann man<br />
auch die Funktion <u>settype()</u> verwenden. Man teilt der Funktion einfach mit, <br />
für welche Variable man den Typ setzen will und wie der Zieltyp lauten soll. Der<br />
Zieltyp <b>muss in doppelten Anführungszeichen</b> angegeben werden. Der <br />
Wert der Variablen wird entsprechend konvertiert und gleich wieder in der Variablen <br />
gespeichert.<br />
<br />
Mit Hilfe der <b>Funktion gettype()</b> kann der Typ der Variablen ermittelt werden.
.</li>
<br />
<li> </li>
</ul>
</html>
<html>
<ul>
<li>
Technisch betrachtet sind Vergleiche <b>Operatoren</b>, denn sie haben einen Wert. <br />
Dieser ist genau dann <b>true</b>, wenn der Vergleich richtig ist, ansonsten ist er <b>false</b>.<br />
<br />
Insgesamt gibt es acht Vergleichsoperatoren, die in der folgenden Tabelle aufgelistet sind:
<table border="1">
<tr><th>Name</th><th>Operator</th><th>Bedeutung</th></tr>
<tr><td>kleiner als</td><td><center><</center></td><td>liefert genau dann true, <br />wenn der linke Operand kleiner ist als der rechte.</td></tr>
<tr><td>größer als</td><td><center>></center></td><td>liefert genau dann true, <br />wenn der linke Operand größer ist als der rechte.</td></tr>
<tr><td>kleiner oder <br />gleich</td><td><center><=</center></td><td>liefert genau dann true, <br />wenn der linke Operand kleiner oder gleich dem rechten Operand ist.</td></tr>
<tr><td>größer oder <br /> gleich</td><td><center>>=</center></td><td>liefert genau dann true, <br />wenn der linke Operand grö%szlih;er oder gleich dem rechten Operand ist.</td></tr>
<tr><td>gleich</td><td><center>==</center></td><td>liefert genau dann true, <br />wenn linke und rechte Seite des Gleichheitszeichens in ihren Werten übereinstimmen.</td></tr>
<tr><td>nicht gleich</td><td><center>!=</center></td><td>liefert genau dann true, <br />wenn linke und rechte Seite des Gleichheitszeichens in ihren Werten <u>nicht</u> übereinstimmen.<br />
Alternative Schreibweise: <></td></tr>
<tr><td>strikt gleich / <br /> identisch</td><td><center>===</center></td><td>liefert genau dann true, <br />wenn linke und rechte Seite des Gleichheitszeichens in ihren Werten identisch und vom gleichen Typ sind.</td></tr>
<tr><td>strikt ungleich / <br />nicht identisch</td><td><center>!===</center></td><td>liefert genau dann true, <br />wenn linke und rechte Seite des Gleichheitszeichens in ihren Werten <b>nicht</b> identisch sind, <br />oder wenn beide <b>nicht</b> vom gleichen Typ sind.</td></tr>
</table>
</li>
</ul>
</html>
<html>
<h3>Pfadangaben</h3>
<ul>
</ul>
<h3>Verzeichnisse auslesen</h3>
<ul>
</ul>
<h3>Weitere Verzeichnisoperationen</h3>
<ul>
</ul>
<h3>Dateien sperren - Locking</h3>
<ul>
</ul>
<h3>Berechtigungen</h3>
<ul>
</ul>
<h3>Berechtigungen unter Windows</h3>
<ul>
</ul>
<h3>Dateisystemrechte unter Linux</h3>
<ul>
</ul>
<h3>Praxis: Bildergalerie - Variante 1 </h3>
<ul>
</ul>
</html>
<html>
<ul>
<li>Viele Konstanten werden in der PHP-Umgebung bereits mitgeliefert. Einige <br />
vordefinierte Konstanten, die bei der Entwicklung überaus praktisch sein <br />
können, sind in der folgenden Tabelle aufgelistet:
<table border="1">
<tr><th>Konstante</th><th>Beschreibung</th></tr>
<tr><td>TRUE <br />
FALSE </td><td>Wahrheitswerte werden intern wie Zahlen behandelt. <br />Sie beinhalten die Werte 1 (TRUE) und 0 (FALSE).</td></tr>
<tr><td>PHP_VERSION </td><td>gibt Auskunft, welche PHP-Version auf Ihrem System installiert ist.</td></tr>
<tr><td>PHP_OS </td><td>gibt Auskunft über das Betriebssystem.</td></tr>
<tr><td>__FILE__ </td><td>gibt den Namen der Datei aus, in der die Konstante gerade benutzt wird.</td></tr>
<tr><td>__LINE__ </td><td>gibt die Zeilennummer der Zeile (im Skript) aus, <br />in der die Konstante benutzt wird.</td></tr>
<tr><td>__CLASS__</td><td></td></tr>
<tr><td>__DIR__ (ab PHP 5.3)</td><td></td></tr>
<tr><td>__FUNCTION__</td><td></td></tr>
<tr><td>__METHOD__</td><td></td></tr>
<tr><td>__NAMESPACE__ (ab PHP 5.3)</td><td></td></tr>
</table>
</li>
<li><b>Hinweis</b><br />
Man kann zu Recht einwenden, dass eine Konstante, die in unterschiedlichen <br />
Zeilen oder Dateien unterschiedliche Werte annimmt, keine Konstante ist. <br />
<br />
Formal werden <b>__FILE__</b> und <b>__LINE__</b> trotzdem als Konstanten gewertet,<br />
weil man als Programmierer den Wert nicht verändern kann. Unabhängig davon<br />
sind diese Konstanten überaus praktisch für die Fehlersuche oder für die<br />
Protokollierung.
</li>
</ul>
</html>
<html>
<ul>
<li>Werte, die entweder wahr (true) oder falsch (false) sein können, <br />
werden <b>Wahrheitswerte</b> genannt. Zu Ehren des Mathematikers George <br />
Boole (1815-1864) bezeichnet man sie auch als <b>Boolesche Werte</b> (engl: <b>boolean</b>).</li>
<br />
<li>Man kann die Wahrheitswerte true und false auch direkt in einer Variablen <br />
speichern. Dabei wird zwischen Groß- und Kleinschreibung <b>nicht</b> <br />
unterschieden, TRUE und true sind also identisch. </li>
<br />
<li>Obwohl ein Wahrheitswert eigentlich nur ein einzelnes Bit benötigt, wird <br />
bei der Speicherung ein ganzes Byte verwendet, weil der logistische Aufwand für<br />
die bitweise Speicherung zu groß wäre.</li>
</ul>
</html>
<html>
<ul>
<li>In einer Zeichenkette, auch String genannt, kann man beliebige Zeichen <br />
wie Buchstaben, Ziffern und Sonderzeichen speichern. In der Regel werden<br />
Zeichenketten dazu verwendet, um Texte zu speichern. </li>
<br />
<li>Wenn man einen Text in doppelte Anführungszeichen setzt, dann <br />
darf man innerhalb des Textes <b>keine</b> doppelten Anführungszeichen mehr <br />
verwenden. Umgehen kann man dieses Problem, indem mann einfache An-<br />
führungszeichen verwendet.</li>
<br />
<li>Als Alternative kann man die Anführungszeichen im Text mit <b>Escape-<br />
Sequenzen</b> maskieren.</li>
<br />
<li>Ein wichtiger Unterschied in der Verwendung der einfachen und doppelten <br />
Anführungszeichen besteht bei Variablen. Sie werden <b>nicht</b> ausgewertet, <br />
wenn ihr Wert innerhalb einfacher Anführungszeichen steht. </li>
<br />
<li><b>Hinweis</b><br />
Zeichenketten in <b>einfachen</b> Anführungszeichen werden also ohne Veränderung <br />
übernommen. <br />
<br />
Zeichenketten in <b>doppelten</b> Anführungszeichen bieten die Möglichkeit, Escape-<br />
Sequenzen und Variablen zu benutzen. <u>Daher sollte man deshalb in der Regel <br />
die doppelten Anführungszeichen verwenden, weil diese im Programmieralltag <br />
wesentlich praktischer sind.</u></li>
</ul>
</html>
<html>
<ul>
<li><b>Definition</b><br />
Der <b>Zeichenkettenoperator (.)</b>, auch <b>String-Operator</b>oder <br />
Vereinigungsoperator genannt, wird dazu verwendet, um eine Zeichenkette<br />
aus mehreren Teilstücken zusammenzusetzen. Er wird sehr häufig im <br />
Zusammenhang mit echo-Anweisungen eingesetzt, um in einer Zeile mehrere <br />
Werte ausgeben zu können.
</li>
<br />
<li>Beispiel:<br />
<code>
1.<?php<br />
2. $text1 = “Hallo “;<br />
3. $text2 = “Welt“;<br />
4. echo $text1 . $text2 . “<BR />\n“;<br />
5.?>
</code>
</li>
<br />
<li>Die <b>automatische Typumwandlung</b> wandelt zunächst die Zahlen <br />
in Zeichenketten um. Danach werden die vier Zeichenketten durch den Zeichenketten- <br />
operator miteinander verbunden und von der echo-Anweisung ausgegeben:</li>
<br />
</ul>
</html>
<html>
<ul>
<li><table border="1">
<tr><th>Operator</th><th>Funktion</th></tr>
<tr><td><center>+=</center></td><td>addiert und weist zu.</td></tr>
<tr><td><center>-= </center></td><td>subtrahiert und weist zu.</td></tr>
<tr><td><center>*= </center></td><td>multipliziert und weist zu.</td></tr>
<tr><td><center>/= </center></td><td>dividiert und weist zu.</td></tr>
<tr><td><center>%= </center></td><td>bestimmt den ganzzahligen Rest der Division und weist zu.</td></tr>
<tr><td><center>.= </center></td><td>hängt die rechts stehende Zeichenkette an den Inhalt der Variablen an.</td></tr>
</table>
</li>
<br />
</ul>
</html>
<html>
<ul>
<li>Der wohl am häufigsten verwendete Operator :: die Zuweisung, "=";</li>
<br />
<li>Sie bewirkt, dass der Inhalt einer Variablen mit einem neuen Wert belegt wird. <br />
Dieser Wert kann ein beliebiger gültiger Ausdruck sein, solange das Ergebnis <br />
des Ausdrucks mit dem Datentyp der Variablen, deren Wert verändert werden soll, <br />
übereinstimmt.</li>
<br />
<li>Syntax:<br />
<code>$variable = ausdruck;</code></li>
<br />
<li><b>Aufgepasst!</b><br />
Ein Vergleich wird in PHP durch das doppelte Gleichheitszeichen (==) beschrieben</li>
<br />
<li>Die Lesart der Zuweisung ist immer von rechts nach links.<br />
Das bedeutet, dass zunächst der Ausdruck auf der rechten Seite ausgewertet wird <br />
und dann die Zuweisung erfolgt. So ist es auch möglich, in einem Schritt mehreren <br />
Variablen den gleichen Wert zuzuweisen:</li>
<br />
<li>Der Wert des Zuweisungsoperators bzw. der Zuweisung entspricht dem Wert <br />
des rechtsseitigen Ausdrucks der Zuweisung. </li>
</ul>
</html>
<html>
weiter mit Kap. 3, <br />
"Datenaustausch zwischen Client ..."
</html>
<html>
• "percentage in point", Preiseinheit<br />
<br />
• definiert die kleinste Preiseinheit im Devisenhandel<br />
</html>
<html>
<ul>
<li><b>Launchpad</b> ist eine Webanwendung und Seite der Firma <b>Canonical</b>.<br />
Ursprünglich für Ubuntu entwickelt, dient es heute vielen weiteren<br />
Projekten als Bugtracker.<br />
</li>
<li>Das Ziel von Launchpad war es, ein System zu schaffen, welches<br />
Querverweise zwischen den Bugs einzelner Projekte erlaubt, um<br />
Probleme, die ihre Ursache in verschiedenen Projekten zugleich<br />
haben, besser lösen zu können.<br />
</li>
<li>Außer dem bekannten Bugtracker bietet Launchpad noch zahl‐<br />
eiche andere Features wie einen Online Entwicklungsplan für <br />
die eigene Software, die Übersetzungsanwendung Rosetta, die<br />
es erlaubt, die Sprachpakete der eigenen Software anderen zum<br />
Übersetzen leicht zugänglich zu machen und Supportforen für<br />
eigene Projekte.<br />
</li>
<li>Mit einem Personal Package Archive (PPA) können Entwickler<br />
unabhängige inoffizielle dpkg‐Paketquellen für Ubuntu‐Distribu‐<br />
tionen in verschiedenen Prozessorarchitekturen und Versionen<br />
anbieten.<br />
</li>
<li>Die Verwendung dort bereitgestellter Pakete erfolgt vom Down‐<br />
load über die Installation und Aktualisierung (Update/Upgrade)<br />
bis zur Paket‐Entfernung identisch zu den offiziellen Quellen ü‐<br />
ber die Standard‐Paketverwaltungswerkzeuge wie APT und da‐<br />
rauf aufbauende anwenderfreundliche Oberflächen, beispiels‐<br />
weise Aptitude oder Synaptic oder eine in den grafischen Desk‐<br />
top integrierte Aktualisierungsverwaltung, sowie durch automa‐<br />
tisierte Hintergrund‐Updates des Systems. <br />
</li>
<li>
Vor einem Distributions‐Upgrade auf eine neue Hauptversion<br />
empfiehlt es sich, PPAs als Paketquelle vorübergehend zu ent‐<br />
fernen und dann durch ein reguläres Update zuerst auf die<br />
aktuelle Anwendungsversionen offizieller Paketquellen zu<br />
wechseln und PPAs erst nach erfolgreichem Abschluss des<br />
Distributions‐Upgrades bei Bedarf wieder hinzuzufügen. <br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Launchpad#Code"
target="_blank" rel="noreferrer noopener">
Wikipedia :: Launpad </a>
</li>
<li><a href="https://wiki.ubuntuusers.de/Launchpad/"
target="_blank" rel="noreferrer noopener">
Ubuntu‐Users :: Wiki ‐ Launchpad</a>
</li>
</ul>
</html>
<html>
<ul>
<li>die GNU FSF-Version von SPSS, ein Klon</li>
<li>SPSS stand früher für “ Statistical Package for the Social Science“</li>
<li>2009 von IBM aufgekauft</li>
<!-- li></li -->
<!-- li></li -->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.gnu.org/software/pspp" target=_blank>GNU FSF :: PSPP</a></li>
</ul>
</html>
<html>
SAP Adaptive Server Enterprise 16.0 > Transact-SQL Users Guide 16.0
<h3>Partition Tables and Indexes</h3>
<p>Use partitioning to manage large tables and indexes by dividing them into smaller, more manageable pieces. Partitions, like a large-scale index, provide faster and easier access to data.</p>
<p>Each partition can reside on a separate segment. Partitions are database objects and can be managed independently. You can, for example, load data and create indexes at the partition level. Yet partitions are transparent to the end user, who can select, insert, and delete data using the same DML commands whether the table is partitioned or not.</p>
<p>SAP ASE supports horizontal partitioning, in which a selection of table rows can be distributed among disk devices. Individual table or index rows are assigned to a partition according to a partitioning strategy.</p>
<p>Partitioning is the basis for parallel processing, which can significantly improve performance.</p>
<p>Note: Semantics-based partitioning is licensed separately. To enable semantic partitioning at a licensed site, set the value of the enable semantic partitioning configuration parameter to 1. See, Setting Configuration Parameters, in the System Administration Guide: Volume 1.</p>
Partitioning:
Improves scalability.
Improves performance – concurrent multiple I/O on different partitions, and multiple threads on multiple CPUs working concurrently on multiple partitions.
Provides faster response time.
Provides partition transparency to applications.
Supports very large database (VLDB) – concurrent scanning of multiple partitions of very large tables.
Provides range partitioning to manage historical data.
<p>Note: By default, SAP ASE creates tables with a single partition and uses a round-robin partitioning strategy. These tables are described as 'unpartitioned'to distinguish between tables created or modified without partitioning syntax (the default) and those created with partitioning syntax.</p>
<h3>Data Partitions</h3>
<p>A data partition is an independent database object with a unique partition ID. It is a subset of a table, and shares the column definitions and referential and integrity constraints of the base table.</p>
<p>To maximize I/O parallelism, SAP recommends that you bind each partition to a different segment, and bind each segment to a different storage device.</p>
<h3>Partition Keys</h3>
<p>Each semantically partitioned table has a partition key that determines how individual data rows are distributed to different partitions. The partition key may consist of a single partition-key column or multiple key columns. The values in the key columns determine the actual partition distribution.</p>
<p>Range- and hash-partitioned tables can have as many as 31 key columns in the partition key. List partitions can have one key column in the partition key. Round-robin partitioned tables do not have a partition key.</p>
You can specify partitioning-key columns of any type except:
text, image, and unitext
bit
Java classes
Computed columns
You can partition tables containing columns of these datatypes, but the partitioning key columns must be of supported datatypes.
<h3>Index Partitions</h3>
Indexes, like tables, can be partitioned. You can create local as well as global indexes.
An index partition is an independent database object identified with a unique combination of index ID and partition ID; it is a subset of an index, and resides on a segment or other storage device.
<h3>SAP ASE supports local and global indexes.</h3>
A local index – spans data in exactly one data partition. For semantically partitioned tables, a local index has partitions that are equipartitioned with their base table; that is, the table and index share the same partitioning key and partitioning type.
For all partitioned tables with local indexes, each local index partition has one and only one corresponding data partition.
A global index – spans all data partitions in a table. SAP supports only unpartitioned global indexes. All unpartitioned indexes on unpartitioned tables are global.
You can mix partitioned and unpartitioned indexes with partitioned tables:
A partitioned table can have partitioned and unpartitioned indexes.
An unpartitioned table can have only unpartitioned, global indexes.
<h3>Partition IDs</h3>
A partition ID is a pseudorandom number similar to object ID. Partition IDs and object IDs are allocated from the same number space. An index or data partition is identified with a unique combination of index ID and partition ID.
<h3>Locks and Partitions</h3>
Partition locks increases data availability by creating finer locking granularity, which allows access to other partitions for concurrent DDL and DML statements.
See Performance and Tuning Series: Locking and Concurrency Control.
Partitioning Types
SAP ASE supports range partitioning, hash partitioning, list partitioning, and round-robin partitioning.
Partition Pruning
Partition pruning, or partition elimination, can save considerable time and resources during execution.
Composite Partitioning Keys
Semantically partitioned tables have one partition key per table or index. For range- or hash-partitioned tables, the partition key can be a composite key with as many as 31 key columns.
Indexes and Partitions
Indexes speed data retrieval by pointing to the location of a table column's data on disk. You can create global indexes and local indexes, each of which can also be clustered or nonclustered.
Create and Manage Partitions
The sp_configure option enable semantic paritioning turns on semantic paritioning. Round-robin partitioning is always available, and is unaffected by the value of enable semantic partitioning.
Change Data Partitions
The alter table alters data partitions.
Configure Partitions
You can configure partitions to improve performance.
update, delete, and insert in Partitioned Tables
The syntax to update, insert, and delete data in partitioned tables is the same as for unpartitioned tables. You cannot specify a partition in update, insert, and delete statements.
Update Values in Partition-Key Columns
For semantically partitioned tables, updating the value in a partition-key column can move the data row from one partition to another.
Display Information About Partitions
Use sp_helpartition to view information about partitions.
Truncate a Partition
You can delete all the information in a partition without affecting information in other partitions.
Using Partitions to Load Table Data
You can use partitioning to expedite loading large amounts of table data, even if the table will eventually be used as an unpartitioned table.
Update Partition Statistics
The SAP ASE query processor uses statistics about the tables, indexes, partitions, and columns in a query to estimate query costs. The query processor chooses the access method that it determines to be the least expensive. But to do so, it must have accurate statistics.
Improved Concurrency for Partition-Level Online Operations
Certain partition-level operations can concurrently operate on different partitions of a table. DML can also concurrently operate on the table while the partition-level online operation is running.
<br />
Link:<br />
<a href="http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc32300.1600/doc/html/san1390612300205.html" target="_blank">Sybase Infocenter :: Partition tables and indexes</a><br />
</html>
<html>
<ul>
<li><h3>Syntax:</h3>
Aufbau eines Pascal‐Programms;
<ol>
<li>Angaben über die Art der verwendeten Daten;</li>
<li>der eigentliche Anweisungsteil;</li>
</ol></li>
<br />
<li></li>
</ul>
<!--
<h3>Links:</h3>
<ul>
<li></li>
<li></li>
</ul>
-->
</html>
<html>
- das Monit-Tool befindet sich auf dem Client,<br>
im Verzeichnis vom mxg2000-Client;<br>
<p>
- Aufruf:<br>
monit.cmd --> Tools --> Password generator<br>
<br>
- Eingabe des Password in die Felder "Password" und "Confirmation"<br>
--> Drücken des Buttons "Generate"<br>
--> im Feld "Encrypted password" erscheint dann die verschlüsselte
Ausgabe des Passwords;<br>
</p>
- Das so erzeugte Passwort kann jetzt in den Files verwendet werden, die ein
Password benötigen,<br>
um ihre Aufgaben zu erfüllen, wie z.B. die Files dbsource.mxres,
mxservercredentials.mxres;<br>
<br>
- Achtung!<br>
Standardmässig sollen die verschlüsselten Passwörter
in Grossbuchstaben sein, so dass<br>
stets die Checkbox "Always use uppercase" angetickt sein muss<br>
</html>
<html>
Am I the only one who finds the<br />
<br /><code>
% echo $PATH<br />
<br /></code>
and<br />
<br /><code>
% echo $LD_LIBRARY_PATH<br />
</code><br />
unreadable? Try this to make<br />
for something thats much easier<br />
to read:<br />
<br /><code>
echo $PATH | tr ":" "\n"<br />
</code><br />
This tip generously supported <br />
by: ng@clubgeek.net<br />
</html>
<html>
A good tip for getting better performance in crond tasks<br />
is choosing a better time for launching them.<br />
<br />
If the process that we want to launch needs few time,<br />
but can overload the system easily, you can launch<br />
the task in hours that the work is busy and -and HERE<br />
is the tip- in strange minutes. That's why lots of<br />
people launch their crons at midnight, but<br />
nobody uses to do it at 00:13, in example.<br />
<br />
That tip can obtain his best in hourly-launched<br />
tasks. If that kind of tasks are launched all at<br />
the same time, the system will overload without<br />
any use. You can delay that kind of tasks (one<br />
at 13th minute, other at 17th minute,other at<br />
27th minute...) and obtain better performance<br />
without work. That will avoid overloading caused<br />
by launching several tasks at the same time.<br />
<br />
The best is that administration tasks do<br />
not overlap, but this is not always possible.<br />
If you can do it, it's better you do it.<br />
<br />
Using nice is also a good idea.<br />
<br />
But the best is making a log of the uptime during<br />
a week. You can be surprise, because all the staff<br />
of a department of a firm use to do the coffee-break<br />
at the same time; it's the perfect time for making<br />
some administrative tasks. :-)<br />
But do not clear the forbidden extensions -the famous<br />
find /home -name core -exec \{\} \; and other stuff<br />
like tmps, ~s and so on- of the system<br />
at work time, or you will have a queue of staff people<br />
very, very angry knocking at your door.<br />
<br />
This tip generously supported <br />
by: irbis@activanet.es<br />
</html>
<html>
<h3>push</h3>
push treats the supplied parameters as individual entities and pushes them onto the original array without flattening them.
Both when we push one array:
examples/push_array.pl6
<code><pre>
use v6;
my @a = 'foo', 'bar';
say @a.perl; # ["foo", "bar"]
my @b;
@b.push: @a;
say @b.perl; # [["foo", "bar"],]
@b.push: @a;
say @b.perl; # [["foo", "bar"], ["foo", "bar"]]
</pre></code>
and when we push multiple arrays:
examples/push_2_arrays.pl6
<code><pre>
use v6;
my @a = 'foo', 'bar';
my @x = 'abc', 'def';
my @d;
@d.push: @a, @x;
say @d.perl; # [["foo", "bar"], ["abc", "def"]]
</pre></code>
<h3>append</h3>
append will flatten the supplied array if there was only one array supplied.
examples/append_array.pl6
<code><pre>
use v6;
my @a = 'foo', 'bar';
say @a.perl; # ["foo", "bar"]
my @c;
@c.append: @a;
say @c.perl; # ["foo", "bar"]
@c.append: @a;
say @c.perl; # ["foo", "bar", "foo", "bar"]
</pre></code>
It will treat them as individual entities if more than one arrays are supplied:
examples/append_2_arrays.pl6
<code><pre>
use v6;
my @a = 'foo', 'bar';
my @x = 'abc', 'def';
my @e;
@e.append: @a, @x;
say @e.perl; # [["foo", "bar"], ["abc", "def"]]
</pre></code>
<h3>push and append of scalars</h3>
If we push or append individual elements to an array, they will be used as elements of that array:
examples/push_array_scalars.pl6
<code><pre>
use v6;
my @a;
@a.push: "abc";
say @a.perl; # ["abc"]
my @b;
@b.append: "abc";
say @b.perl; # ["abc"]
@a.push: "def", "ghi";
say @a.perl; # ["abc", "def", "ghi"]
@b.append: "def", "ghi";
say @b.perl; # ["abc", "def", "ghi"]
</pre></code>
Link:<br />
<a href="http://perl6maven.com/push-vs-append-on-arrays-in-perl6">http://perl6maven.com/push-vs-append-on-arrays-in-perl6</a>
</html>
<html>
<ul>
<li> Variable names of arrays in Perl start with the at mark: <code>@</code>.</li>
<br />
<li>Due to our insistence on using strict you have to declare these <br />
variables using the <b><code>my</code></b> keyword before the first usage. </li>
<li><h3> Declare an array</h3>
<code><pre>my @names;</pre></code>
</li>
<li><h3>Declare and assign values:</h3>
<code><pre>my @names = ("Foo", "Bar", "Baz");</pre></code>
</li>
<li><h3>Debugging of an array</h3>
<code><pre>
use Data::Dumper qw(Dumper);
my @names = ("Foo", "Bar", "Baz");
say Dumper \@names;
</pre></code>
The output is:
<code><pre>
$VAR1 = [
'Foo',
'Bar',
'Baz'
];
</pre></code>
</li>
<li><h3>foreach loop and perl arrays</h3>
<code><pre>
my @names = ("Foo", "Bar", "Baz");
foreach my $n (@names) {
say $n;
}
</pre></code>
will print:
<code><pre>
Foo
Bar
Baz
</pre></code>
</li>
<li><h3>Accessing an element of an array</h3>
<code><pre>
my @names = ("Foo", "Bar", "Baz");
say $names[0];
</pre></code>
Note, when accessing a single element of an array the leading sigil changes from @ to $. This might cause confusion to some people, but if you think about it, it is quite obvious why.
@ marks plural and $ marks singular. When accessing a single element of an array it behaves just as a regular scalar variable.
</li>
<li><h3>Indexing array</h3>
The indexes of an array start from 0. The largest index is always in the variable called $#name_of_the_array. So
<code><pre>
my @names = ("Foo", "Bar", "Baz");
say $#names;
</pre></code>
Will print 2 because the indexes are 0,1 and 2.
</li>
<li><h3>Length or size of an array</h3>
In Perl there is no special function to fetch the size of an array, but there are several ways to obtain that value. For one, the size of the array is one more than the largest index. In the above case $#names+1 is the size or length of the array.
In addition the scalar function can be used to to obtain the size of an array:
<code><pre>
my @names = ("Foo", "Bar", "Baz");
say scalar @names;
</pre></code>
Will print 3.
The scalar function is sort of a casting function that - among other things - converts an array to a scalar. Due to an arbitrary, but clever decision this conversion yields the size of the array.
</li>
<li><h3>Loop on the indexes of an array</h3>
There are cases when looping over the values of an array is not enough. We might need both the value and the index of that value. In that case we need to loop over the indexes, and obtain the values using the indexes:
<code><pre>
my @names = ("Foo", "Bar", "Baz");
foreach my $i (0 .. $#names) {
say "$i - $names[$i]";
}
</pre></code>
prints:
<code><pre>
0 - Foo
1 - Bar
2 - Baz
</pre></code>
</li>
<li><h3>Push on Perl array</h3>
push appends a new value to the end of the array, extending it:
<code><pre>
my @names = ("Foo", "Bar", "Baz");
push @names, 'Moo';
say Dumper \@names;
</pre></code>
The result is:
<code><pre>
$VAR1 = [
'Foo',
'Bar',
'Baz',
'Moo'
];
</pre></code>
</li>
<li><h3>Pop from Perl array</h3>
pop fetches the last element from the array:
<code><pre>
my @names = ("Foo", "Bar", "Baz");
my $last_value = pop @names;
say "Last: $last_value";
say Dumper \@names;
</pre></code>
The result is:
<code><pre>
Last: Baz
$VAR1 = [
'Foo',
'Bar',
];
</pre></code>
</li>
<li><h3>shift the Perl array</h3>
shift will return the left most element of an array and move all the other elements to the left.
<code><pre>
my @names = ("Foo", "Bar", "Baz");
my $first_value = shift @names;
say "First: $first_value";
say Dumper \@names;
</pre></code>
The result is:
<code><pre>
First: Foo
$VAR1 = [
'Bar',
'Baz',
];
</pre></code>
</ul>
<h3>Links:</h3>
<a href="https://perlmaven.com/perl-arrays" target=_blank>Perl Maven :: Arrays</a><br />
<a href="https://perlmaven.com/multi-dimensional-arrays-in-perl" target=_blank>Perl Maven :: Multi dimensional arrays in Perl</a><br />
</html>
<html>
<ul>
<li><h3>Empfehlung von Gabor (<i>perlmaven.com</i>):</h3>
Immer folgende einleitende Statements im Code verwenden:
<code><pre>use srict,
use warning;</pre></code></li>
<br />
</ul>
</html>
<html>
<ul>
<li>CPAN can be configured differently for each user, and can <br />
install modules to custom areas on a system.</li>
<li><h4>Ausgabe von <code>perl -MCPAN -e shell</code></h4>
(beim allerersten Mal oder falls die MyConfig.pm nicht vorhanden ist):<br />
<code><pre>mueller@Debian-Laptop:~$ perl -MCPAN -e shell
CPAN.pm requires configuration, but most of it can be done automatically.
If you answer 'no' below, you will enter an interactive dialog for each
configuration option instead.
Would you like to configure as much as possible automatically? [yes]
Autoconfiguration complete.
commit: wrote '/home/mueller/.cpan/CPAN/MyConfig.pm'
You can re-run configuration any time with 'o conf init' in the CPAN shell
Terminal does not support AddHistory.
</pre></code></li>
<li><h4>Konfiguration überprüfen:</h4>
<code><pre>perl -c MyConfig.pm</pre></code>
⇒ positive Ausgabe: <code><pre>MyConfig.pm syntax OK</pre></code>
</ul>
<h3>Link:</h3>
<a href="http://perl-begin.org/topics/cpan/life-with-cpan/non-root/" target=_blank>Using CPAN with a non-root account</a>
</html>
<html>
<ul>
<li><b>-c</b><br />
causes perl to check the syntax of the script and then exit without executing it. </li>
<li><b>-d</b><br />
runs the script under the perl debugger. See the section on Debugging.</li>
<li><b>-D<i>number</i></b><br >
sets debugging flags. <br />
<ul>
<li>To watch how it executes your script, use <code><b>-D14</b></code>. <br />
(This only works if debugging is compiled into your perl.) </li>
<li>Another nice value is <code><b>-D1024</b></code>, which lists your compiled syntax tree.</li>
<li>And <code><b>-D512</b></code> displays compiled regular expressions. </li></ul></li>
</ul>
<h3>Link:</h3>
<a href="http://www.cs.cmu.edu/afs/cs.cmu.edu/Web/People/rgs/pl-opt.html" target=_blank>cs.cmu.edu :: Perl</a>
</html>
<html>
<table>
<tr><td>-v</td><td>to get the Perl version: <code>perl -v</code></td></tr>
<tr><td>-V</td><td>to get compiler details: <code>perl -V</code></td></tr>
<tr><td>-e</td><td>execute code on the command trne: <code>perl -e 'print qq{Hello World\n}'</code></td></tr>
<tr><td>-E</td><td>execute code on the command trne<br />with all the latest features enabled: <code>perl -E 'say q{Hello World}'</code></td></tr>
<tr><td>-n</td><td>wrap the -e/-E code in a while loop: <code>perl -n -E 'say if /code/' file.txt</code><br />
is the same as <br /><code>
while (<>) {<br />
say if /code/;<br />
}</code></td></tr>
<tr><td>-p</td><td>is like -n with print $_: <code>perl -p -E 's/code/foobar/' file.txt</code></td></tr>
<tr><td>-i</td><td>for in-place editing: <code>perl -i -p -E 's/code/foobar/' file.txt</code></td></tr>
<tr><td>----------</td><td>-----------------</td></tr>
<tr><td>-c</td><td>check syntax: <code><pre>% perl -c your_program.pl
your_program.pl syntax OK</pre></code></td></tr>
<tr><td>-M</td><td> loads a module</td></tr>
</table>
<h3>trnks:</h3>
<a href="https://www.perl.com/pub/2004/08/09/commandtrne.html/" target=_blank>Perl.com :: Perl Command-trne Options</a><br />
<a href="https://perlmaven.com/perl-command-trne-options" target=_blank>Perl Maven :: 7 of the most useful Perl command trne options</a><br />
<a href="https://www.learning-perl.com/2018/08/powerful-command-trne-options/" target=_blank>Learning Perl :: Powerful command-trne options</a><br />
<br />
</html>
<html>
<ul>
<li> Ein Perl-Framework für Webanwedungen und Web Services</li>
<br />
<li> Hat einen eigenen Webserver</li>
<br />
<li>Homepage: <a href="www.perldancer.org" target="_blank">perldancer.org</a> </li>
<br />
</ul>
</html>
<html>
<ul>
<li>This simple, elegant module lets you include Perl <br />
code for debugging or development-only environments,<br />
but hide it for production.</li>
<br />
<li>he module utilizes Keyword::Simple and the pluggable keyword architecture introduced in Perl 5.012 to create a new keyword: DEVELOPMENT. It uses the value of the PERL_KEYWORD_DEVELOPMENT environment variable to determine whether or not a block of code is to be executed.</li>
<br />
<li><b>Beispiel:</b><br />
<code><pre>
use Keyword::DEVELOPMENT;
sub doing_my_big_loop {
my $self = shift;
DEVELOPMENT {
# insert expensive debugging code here!
}
}
</pre></code>
<br />
<li>At compile time, the code inside the DEVELOPMENT block is optimized away and simply doesn't exist.<br />Set up the PERL_KEYWORD_DEVELOPMENT environment variable to be true on your sandbox and false on your production environment, and valuable debugging tools can be committed to your code repo, always there when you need them.</li>
<br />
</ul>
<h3>Link:</h3>
<a href="https://opensource.com/article/18/4/perl-module-debugging-code" target=_blank>Holloway :: A Perl module for better debugging</a>
</html>
<html>
<b>Wenn ich ein Modul installiert habe, wo finde ich <br />
dann die Dokumentation dazu?</b><br />
<br />
Einfach auf der Shell
<code><pre>perldoc Some::Module</pre></code>
aufrufen.
</html>
Mom always sed, "eat your Perl pie"!
A common task is to substitute
text strings within one or
more files. The sed string
substitution command is often
used to accomplish this, where
sed is passed a file name, the
string substitutions are written
to another file, and then that
file is copied over the first
file to effect the changes
desired in the original.
This approach has some inherent
problems. The command syntax is
lengthy and cumbersome, a
secondary file is created
which involves additional disk
I/O, and when that file is
copied or moved back over the
first one, permissions problems
and file ownership problems can
be created. If your umask
doesn't match the permissions of
the original file, then the
permissions of the final modified
file will be different than those
of the original. Likewise,
default ownerships and group
names are imposed on the temporary
copy, and if one is not careful,
when the temporary copy is written
back to the original file, these
can destroy the original file's
ownership and group information.
A much better way to accomplish
text substitution within a file or
group of files is to use the
"perl pie" approach, as shown here
on file foo:
perl -p -i -e 's/original text string/replacement string' foo
The above command will replace the
first instance of "original text
string" with "replacement string"
in file foo. If you want to
perform this globally within the
file, add the /g global specifier
at the back end, as follows:
perl -p -i -e 's/original text string/replacementstring/g' foo
To act on several files in the
same directory, change the file
specification as needed, by
specifying foo*, *, or whatever
you need.
Note that perl uses the exact
same syntax for the actual string
substitution portion of the command
as sed does, which makes the command
syntax easy to remember. However,
perl performs the entire operation
on the file without the use of any
secondary files needing to be
created, which eliminates the extra
disk I/O and the potential
permissions and ownership issues.
This tip generously supported
by: jem@postfive.rose.hp.com
<html>
Always use
<code><pre>open my $fh, '<:encoding(utf8)', $filename or die ... </pre></code>, the 3-argument version of open, and never the old way.<br />
<br />
Note the open call has 3 parameters:
<ul>
<li>The holder of the file-handle which has been just created. open will assign the file-handle to it.</li>
<li> The mode of open. (to read, to write, to append, etc.)</li>
<li> Supply the encoding (utf8 in our case).</li>
<li> Path to the file.</li>
</ul>
<h3>Link:</h3>
<a href="https://perlmaven.com/always-use-3-argument-open" target=_blank>Perl Maven :: Filehandle - 3-argument-open</a><br />
<a href="https://perlmaven.com/open-and-read-from-files" target=_blank>Perl Maven :: Open and read from text files</a>
</html>
<html>
<ul>
<li>Some times called associative arrays, dictionaries, or maps; <br />
hashes are one of the data structures available in Perl. </li>
<li> A hash is an un-ordered group of key-value pairs.<br />
The keys are unique strings.<br />
The values are scalar values. Each value can be either a number, <br />
a string, or a reference. </li>
<li>Hashes are declared using the <b><code>my</code></b> keyword. <br />
The variable name is preceded by the percentage (%) sign.</li>
<li>It's a little mnemonic trick to help you remind about the key-value structure.</li>
<li>Some people think that hashes are like arrays (the old name 'associative array' also indicates this, and in some other languages, such as PHP, there is no difference between arrays and hashes.), but there are two major differences between arrays and hashes. Arrays are ordered, and you access an element of an array using its numerical index. Hashes are un-ordered and you access a value using a key which is a string.</li>
<li> Each hash key is associated with a single value and the keys are all unique inside a single hash structure. That means no repetitive keys are allowed. (If you really, really want to have more than one values for a key, you'll will need to wait a bit till we reach the references.)</li>
<li><h3>Create an empty hash</h3>
<code><pre> my %color_of;</pre></code>
</li>
<li><h3>Insert a key-value pair into a hash</h3>
In this case 'apple' is the key and 'red' is the associated value.
<code><pre>
$color_of{'apple'} = 'red';
</pre></code>
You can also use a variable instead of the key and then you don't need to put the variable in quotes:
<code><pre>
my $fruit = 'apple';
$color_of{$fruit} = 'red';
</pre></code>
Actually, if the key is a simple string, you could leave out the quotes even when you use the string directly:
<code><pre>
$color_of{apple} = 'red';
</pre></code>
As you can see above, when accessing a specific key-value pair, we used the $ sign (and not the % sign) because we are accessing a single value which is a scalar. The key is placed in curly braces.
</li>
<li><h3>Fetch an element of a hash</h3>
Quite similar to the way we inserted an element, we can also fetch the value of an element.
<code><pre>
print $color_of{apple};
</pre></code>
If the key does not exist, the hash will return an undef, and if warnings are enabled, as they should be, then we'll get a warning about uninitialized value.
<code><pre>
print $color_of{orange};
</pre></code>
Let's a few more key-value pairs to the hash:
<code><pre>
$color_of{orange} = "orange";
$color_of{grape} = "purple";
</pre></code>
</li>
<li><h3>Initialize a hash with values</h3>
We could have instantiated the variable with the key-value pairs simultaneous passing to the hash a list of key-value pairs:
<code><pre>
my %color_of = (
"apple" => "red",
"orange" => "orange",
"grape" => "purple",
);
</pre></code>
=> is called the fat arrow or fat comma, and it is used to indicate pairs of elements. The first name, fat arrow, will be clear once we see the the other, thinner arrow (->) used in Perl. The name fat comma comes from the fact that these arrows are basically the same as commas. So we could have written this too:
<code><pre>
my %color_of = (
"apple", "red",
"orange", "orange",
"grape", "purple",
);
</pre></code>
Actually, the fat comma allows you to leave out the quotes on the left-hand side making the code cleaner and more readable.
<code><pre>
my %color_of = (
apple => "red",
orange => "orange",
grape => "purple",
);
</pre></code>
</li>
<li><h3>Assignment to a hash element</h3>
Let's see what happens when we assign another value to an existing key:
<code><pre>
$color_of{apple} = "green";
print $color_of{apple}; # green
</pre></code>
The assignment changed the value associated with the apple key. Remember, keys are unique and each key has a single value.
</li>
<li><h3>Iterating over hashes</h3>
In order to access a value in a hash you need to know the key. When the keys of a hash are not pre-defined values you can use the keys function to get the list of keys. Then you can iterate over those keys:
<code><pre>
my @fruits = keys %color_of;
for my $fruit (@fruits) {
print "The color of '$fruit' is $color_of{$fruit}\n";
}
</pre></code>
You don't even need to use the temporary variable @fruits, you can iterate over directly the return values of the keys function:
<code><pre>
for my $fruit (keys %color_of) {
print "The color of '$fruit' is $color_of{$fruit}\n";
}
</pre></code>
</li>
<li><h3>The size of a hash</h3>
When we say the size of a hash, usually we mean the number of key-value pairs. You can get it by placing the keys function in scalar context.
<code><pre>
print scalar keys %hash;
</pre></code>
</li>
<li><h3>Using empty values in a hash</h3>
A value cannot be "empty" but it can contain undef which what people usually mean when they say "empty".
We can assign undef to a key (new or existing):
$color_of{water} = undef;
or when we create the hash:
my %color_of = (
apple => "red",
orange => "orange",
water => undef,
grape => "purple",
);
Make sure you use the word undef and don't put them in quotes as in "undef". That would insert the string "undef" which is not what you want.
</li>
</ul>
<h3>Link:</h3>
<a href="https://perlmaven.com/perl-hashes" target=_blank>Perl Maven :: Hashes in Perl</a><br />
</html>
<html>
<code>use strict; </code> is basically a <b>compiler flag</b> that tells the<br />
Perl compiler to change its behaviour in 3 important ways.<br />
<br />
You can turn on and off the three areas separately, <br />
but if you just write <code>use strict;</code> at the top of each<br />
perl file (both scripts and modules), then you turn on<br />
all 3 of them.
<h3>The 3 parts of use strict</h3>
<ul>
<li><code>use strict 'vars';</code><br />
generates a compile-time error if you access a variable without declaration.</li>
<li><code>use strict 'refs';</code><br />
generates a runtime error if you use symbolic references.</li>
<li><code>use strict 'subs';</code><br />
compile-time error if you try to use a bareword identifier in an improper way. </li>
</ul>
<h3>Link:</h3>
<a href="https://perlmaven.com/strict" target=_blank>Perlmaven :: Always use strict!</a>
</html>
<html>
<ul>
<li>aus dem Perl Cookbook, Kap. 12.19, <br />
um einen Überblick über bereits <br />
installierte Module zu erhalten</li>
<li><code><pre>
#!/usr/bin/perl -w
# pmdesc - describe pm files
# tchrist@perl.com
use strict;
use File::Find qw(find);
use Getopt::Std qw(getopts);
use Carp;
use vars (
q!$opt_v!, # give debug info
q!$opt_w!, # warn about missing descs on modules
q!$opt_a!, # include relative paths
q!$opt_s!, # sort output within each directory
);
$| = 1;
getopts('wvas') or die "bad usage";
@ARGV = @INC unless @ARGV;
# Globals. wish I didn't really have to do this.
use vars (
q!$Start_Dir!, # The top directory find was called with
q!%Future!, # topdirs find will handle later
);
my $Module;
# install an output filter to sort my module list, if wanted.
if ($opt_s) {
if (open(ME, "-|")) {
$/ = '';
while (<ME>) {
chomp;
print join("\n", sort split /\n/), "\n";
}
exit;
}
}
MAIN: {
my %visited;
my ($dev,$ino);
@Future{@ARGV} = (1) x @ARGV;
foreach $Start_Dir (@ARGV) {
delete $Future{$Start_Dir};
print "\n<<Modules from $Start_Dir>>\n\n"
if $opt_v;
next unless ($dev,$ino) = stat($Start_Dir);
next if $visited{$dev,$ino}++;
next unless $opt_a || $Start_Dir =~ m!^/!;
find(\&wanted, $Start_Dir);
}
exit;
}
# calculate module name from file and directory
sub modname {
local $_ = $File::Find::name;
if (index($_, $Start_Dir . '/') == 0) {
substr($_, 0, 1+length($Start_Dir)) = '';
}
s { / } {::}gx;
s { \.p(m|od)$ } {}x;
return $_;
}
# decide if this is a module we want
sub wanted {
if ( $Future{$File::Find::name} ) {
warn "\t(Skipping $File::Find::name, qui venit in futuro.)\n"
if 0 and $opt_v;
$File::Find::prune = 1;
return;
}
return unless /\.pm$/ && -f;
$Module = &modname;
# skip obnoxious modules
if ($Module =~ /^CPAN(\Z|::)/) {
warn("$Module -- skipping because it misbehaves\n");
return;
}
my $file = $_;
unless (open(POD, "< $file")) {
warn "\tcannot open $file: $!";
# if $opt_w;
return 0;
}
$: = " -:";
local $/ = '';
local $_;
while (<POD>) {
if (/=head\d\s+NAME/) {
chomp($_ = <POD>);
s/^.*?-\s+//s;
s/\n/ /g;
#write;
my $v;
if (defined ($v = getversion($Module))) {
print "$Module ($v) ";
} else {
print "$Module ";
}
print "- $_\n";
return 1;
}
}
warn "\t(MISSING DESC FOR $File::Find::name)\n"
if $opt_w;
return 0;
}
# run Perl to load the module and print its verson number, redirecting
# errors to /dev/null
sub getversion {
my $mod = shift;
my $vers = `$^X -m$mod -e 'print \$${mod}::VERSION' 2>/dev/null`;
$vers =~ s/^\s*(.*?)\s*$/$1/; # remove stray whitespace
return ($vers || undef);
}
format =
^<<<<<<<<<<<<<<<<<~~^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$Module, $_
.
</pre></code>
</li>
</ul>
<h3>Link:</h3>
<a href="http://www.cis.uni-muenchen.de/~micha/kurse/perlII-WS0809/begleitmaterial/module/pmdesc_perl.html" target=_blank>Uni München :: Skript pmdesc.pl</a>
</html>
<html>
<ul>
<li>Aufrufsyntax:
<code><pre>perl -MO=Deparse[,-u PACKAGE][,-p][,-q][,-l][,-s LETTERS] <<i>prog.pl</i>></pre></code></li>
<li>Beispiel:
<code><pre>perl -MO=Deparse, -p <<i>file</i>></pre></code></li>
<br />
<li>Backend module für den Perl-Compiler<br />
(deswegen vielleicht das "B::" als Namensbereich)</li>
<br />
<li>Parameter:
<ol><li><b>-p</b> :: "print paranthesis", gibt Klammern mit aus, um anzuzeigen, wie die Verarbeitung <br /> vom Perl-Compiler verstanden wurde (z.B. bei Vorrangregeln von Operatoren)</li></ol></li>
</ul>
<h3>Links:</h3>
<a href="http://perldoc.perl.org/B/Deparse.html" target=_blank>PerlDoc :: B::Deparse</a><br />
<a href="http://www.mathematik.uni-kassel.de/Manuals/perl/nmanual/ext/B/B/Deparse.html" target=_blank>Uni Kassel - Mathematik :: Perl-Modul B::Deparse</a>
</html>
<html>
<h3>Aufruf:</h3>
<code><pre>
use Data::Dumper qw(Dumper);
my @names = ("Foo", "Bar", "Baz");
print Dumper \@names;
</pre></code>
</html>
<html>
<ul>
<li><b>CPAN</b> := Comprehensive Perl Archive Network</li>
<li>wichtige Variable: <b>@INC</b><br />sie enthält alle Verzeichnisse, in denen sich Perl-Module befinden (sollen); <br />Befehl, um den Inhalt von @INC anzeigen zu lassen: <code><pre>perl –e 'for (@INC) {print "$_\n"}'</pre></code></li>
<li> Before embarking on any installation, download the module, <br />
unzip it and check out the documentation. Most modules are <br />
installed using the same method.</li>
<li><h3>Activate the CPAN Module</h3>
The simplest way to install Perl modules is to use the CPAN <br />
module itself.<br />
<br />
If you are the system administrator and want to install the module <br />
systemwide, you'll need to switch to your root user. To fire up the<br />
CPAN module, just get to your command line and run this:
<code><pre>
perl -MCPAN -e shell
</pre></code>
If this is the first time you've run CPAN, it's going to ask you a series<br />
of questions – in most cases, the default answer is fine. Once you<br />
find yourself staring at the <code>cpan></code> command prompt, installing a <br />
module is as easy as <code>install MODULE::NAME</code>. For example, to <br />
install the <b>HTML::Template</b> module you'd type:
<code><pre>
cpan> install HTML::Template
</pre></code>
CPAN should take it from there, and you'll wind up with the module<br />
installed in your Perl library.<br />
<br />
Damit die CPAN-Shell richtig funktioniert, muss in <code><pre>~/.cpan/CPAN/</pre></code> eine Konfigurationsdatei namens <b>MyConfig.pm</b> vorhanden sein. <br />
Sie sollte normalerweise schon dort liegen; ansonsten findet man<br />
auch Muster-Vorlagen im Web (z.B. <a href="http://perl-begin.org/topics/cpan/life-with-cpan/non-root/" target=_blank>Using CPAN with a non-root account</a>).<br />
[s.a. den Tiddler "Perl :: CPAN-Konfiguration von MyConfig.pm]<br />
<br />
Den Wert zu <code>makepl_arg</code> sollte man in jedem Fall auf <code>q[LIB=$PERL5LIB]</code> setzen:
<code><pre>makepl_arg = q[LIB=$PERL5LIB]</pre></code>
Dann kann man die CPAN-Shell wie folgt aufrufen: <code>perl -MCPAN -e shell</code><br />
(einzugeben in der Unix-Kommandozeile; nebenbei sieht man hier, <br />
wie man Module auch als Kommandozeilenargument aufrufen kann: <br />
<code> -M<Modulname></code> bindet das Modul ein).<br />
<br />
Sofern die Konfiguration einwandfrei funktioniert hat, kann man auf <br />
wirklich sehr bequeme Art alle möglichen CPAN-Module installieren, es <br />
reicht der Befehl <code><pre>install <Modulname></pre></code>
innerhalb der CPAN-Shell, um das entsprechende Modul zu installieren <br />
inklusive aller eventuell dafür benötigten weiteren Module. <br />
<br />
Eine Übersicht über die möglichen Kommandos erhält man <br />
mit <code>help</code>, verlassen kann man die CPAN-Shell mit <code>exit</code>. <br />
<br />
Infos über installierte und verfügbare Versionen eines Moduls erhät <br />
man mit <code>m <Modulname></code>. </li>
</ul>
<h3>Link:</h3>
<a href="http://www.cis.uni-muenchen.de/~micha/kurse/perlII-WS0809/begleitmaterial/module_installieren.html" target=_blank>Uni München</a><br />
<a href="https://www.thoughtco.com/installing-perl-modules-from-cpan-2641120" target=_blank>ThoughtCo :: Installing Perl Modules From CPAN </a><br />
<a href="https://perlmaven.com/how-to-install-a-perl-module-from-cpan" target=_blank>Perl Maven :: How to install a perl module from cpan</a><br />
<a href="http://perl-begin.org/topics/cpan/life-with-cpan/non-root/" target=_blank>Using CPAN with a non-root account</a>
</html>
<html>
<ul>
<li>CPAN := Comprehensive Perl Archive Network</li>
<li>wichtige Variable: @INC<br />sie enthält alle Verzeichnisse, in denen sich Perl-Module befinden (sollen);<br />die Pragmen “use“ und “require“<br />Befehl, um den Inhalt von @INC anzeigen zu lassen: <code><pre>perl ‐e 'for (@INC) {print "$_\n"}'</pre></code></li>
<li> Before embarking on any installation, download the module, <br />
unzip it and check out the documentation. Most modules are <br />
installed using the same method.</li>
<li><h3>Installing From the Command Line</h3>
Let's say you're on your system command line and you just want to install a module as quickly as possible; you can run the Perl CPAN module via command line Perl and install it in a single line:
<code><pre>
perl -MCPAN -e 'install HTML::Template'
</pre></code>
It's always advisable to download a module yourself, especially if you're having problems installing with CPAN. If you're on the command line, you can use something like wget to grab the file. Next, you'll want to unzip it with something like:
<code><pre>
tar -zxvf HTML-Template-2.8.tar.gz
</pre></code>
This unzips the module into a directory and then you can go in and poke around .<br />
<br />
Look for the README or INSTALL files. In most cases, installing a module by hand is still pretty easy, though, although not as easy as CPAN. Once you've switched into the base directory for the module, you should be able to install it by typing:
<code><pre>
perl Makefile.PL
make
make test
make install
</pre></code>
manuell:
Herunterladen des Moduls von www.cpan.org (am besten dirket auf www.cpan.org/modules gehen, oder über www.perl.com/CPAN/); dann
<code><pre>
tar xvzf Some_Module_4.54
cd Some_Module_4.54
perl Makefile.PL LIB=$PERL5LIB # falls $PERL5LIB nicht gesetzt ist: LIB=~/perllib o.ä.
make
make test
make install
</pre></code>
Oft erfährt man dann aber bei der Installation eines Moduls, dass dieses Modul wiederum das Vorhandensein anderer Module voraussetzt, die aber noch nicht installiert sind. Also muss man erst diese anderen Module installieren, die sich aber dann eventuell wiederum über fehlende Module beschweren. Dieser Prozess kann sehr lästig werden.
</ul>
<h3>Link:</h3>
<a href="http://www.cis.uni-muenchen.de/~micha/kurse/perlII-WS0809/begleitmaterial/module_installieren.html" target=_blank>Uni München</a><br />
<a href="https://www.thoughtco.com/installing-perl-modules-from-cpan-2641120" target=_blank>ThoughtCo :: Installing Perl Modules From CPAN </a><br />
<a href="https://perlmaven.com/how-to-install-a-perl-module-from-cpan" target=_blank>Perl Maven :: How to install a perl module from cpan</a>
</html>
<html>
<ul>
<li><h2>Arrays</h2></li>
<br />
<li><h2>Hashes</h2></li>
<br />
</ul>
<h3>Link:</h3>
<a href="https://opensource.com/article/18/2/perl-hashes-and-arrays-basics" target=_blank></a>
</html>
<html>
<ul>
<li>immer “<u>use warnings</u>“ verwenden!</li>
<br />
<li>Beispiel-Code:
<code><pre>use strict;
#use warnings;
my $filename = '/tmp/application.conf';
open(F, "<$filename");
while(<F>) {
# do something with $_
}
close F;</pre></code>
⇒ es wird ein Filehandle erstellt (while-statement), aber<br />
es wird <b>nicht</b> überprüft, ob das Filehandle überhaupt<br />
erstellt wurde resp. vorhanden ist!</li>
<br />
<li> Das wirkliche Problem des obigen Codes ist, das der<br />
Return-Code vom open-Statement nicht geprüft wird.
</li><br />
Der empfohlene Weg, ein File zu öffnen ist entweder:
<code><pre>open ... or die ...</pre></code>
oder
<code><pre>if (open ...) {
}</pre></code>
Anmerkung:<br />
Hier wurde die Überprüfung auf Vorhandensein des <br />
benötigten Files weggelassen. Also das nicht vergessen!
</li><br />
</ul>
<h3>Link:</h3>
<a href="https://perlmaven.com/readline-on-closed-filehandle" target=_blank>Perl Maven :: Readline on closed filehandle</a>
</html>
<html>
A easy way to retrieve random lines from a text file:<br />
<code><pre>
perl -e '$count = 10;
@line = <>;
for (1..$count) { print $line[int rand @line] }'
</pre></code><br />
example:<br />
<br /><code>
% cat /etc/passwd | perl -e '$count = 10; @line = <>; for (1..$count) { print $line[int rand @line] }'<br />
</code><br />
<br />
This tip generously supported <br />
by: abend@110.net<br />
</html>
<html>
<h2>Perl Maven :: String-eval in Perl</h2>
The eval keyword in Perl has two very different meanings depending<br />
on the syntax around it. If it is followed by a block as in
<code><pre>
eval {
...
}
</pre></code>
then it is plain exception handling, which is usually called try in other<br />
languages. That is the <b>"nice eval"</b>.<br />
<br />
In this article we are going to discuss the <b>evil eval</b>. The one where <br />
the eval keywords is followed by a string as in this expression:
<code><pre>
eval "...";
</pre></code>
<h3>String eval</h3>
The common term used for this expression is string-eval, though some people call it evil eval.<br />
<br />
It is extremely powerful, and with that great power comes a great risk.<br />
<br />
In a nutshell string-eval allows us to compile and execute arbitrary code loaded while our program is already running.<br />
<br />
It can be quite useful in postponing loading of modules. It can help us if we would like to load a module whose name is constructed while the program is running. It can also open up our system to major attacks.
<h3>Compile- and run-time</h3>
Normally all the code in your Perl file is first compiled by Perl resulting in an internal data structure that describes what needs to be executed. Once the compilation has finished the interpreter part of Perl takes over and executes (interprets) the already compiled code.<br />
<br />
String-eval allows use to pause the execution (or run-time) phase, ask the compiler to compile some more code, then execute that code, and then go back where the main code was paused and keep running from there.
<h3>Calculator with eval</h3>
This is a simple implementation of the calculator exercise a very simple use of the string-eval.
<code><pre>
examples/eval/calc.pl
use 5.010;
use strict;
use warnings;
print "First number: ";
my $x = <STDIN>;
print "Second number: ";
my $y = <STDIN>;
print "Operator [+-*/]: ";
my $op = <STDIN>;
my $z = eval "$x $op $y";
say $z;
</pre></code>
The user is expected to input two numbers followed by an operator (+-*/) and then the script calculates the results.<br />
<br />
It calculates the result by creating a small perl expression including the two numbers and the operator between them and the eval-ing it.<br />
<br />
While this is just a simple expression, this illustrates the point. Perl can take any arbitrary Perl snippet, even if it is itself a 10,000-line long program, compile it and run it even if that snippet was not available when the program started to run.
<h3>Delayed loading of module</h3>
One of the most valuable use-case of the string-eval is delaying the loading of modules. Take for example the case of a large application such as an IDE written in Perl. It has tons of features but any user will only use a subset of the features. If we load everything every time a user launches the IDE, it will waste a lot of memory for unused features and it will take a long time to load.<br />
<br />
Instead of that, with some additional code, we can delay the loading of most of the code and only load the module implementing a feature when it is really needed.<br />
<br />
Another case is when you write an application that needs to run on multiple operating systems. You might have a module called App::Win32 that implements the Windows specific code, an App::Linux for the Linux specific code and App::OSX to run on Apple OSX.<br />
<br />
In this case you might not be able to load all the modules, heck, you might not be able to install the modules except on the designated operating systems.<br />
<br />
For that case you can write code like this:
<code><pre>
examples/eval/load_on_os.pl
use strict;
use warnings;
my %module = (
'darwin' => 'App::OSX',
'linux' => 'App::Linux',
'Win32' => 'App::Win32',
);
if ($module{ $^O }) {
eval $module{ $^O };
}
</pre></code>
<h3Evil eval</h3>
So why did I call it evil eval?<br />
<br />
What if the user who provide the input to the calculator above, instead of typing in 2 numbers and an operator, types in the following:
<code><pre>
system 'rm -rf /'
</pre></code>
The perl script will happily eval it, meaning it will try to remove all the files from your hard disk and if you have other disk mounted then from there too. Not something you'll like.<br />
With very strong input validation you can of course avoid such problems, but if there is a bug in the input validation ....<br />
<h3>Conclusion</h3>
String-eval is very powerful and its use should be minimal and should be preceded by strong input validation.<br />
<br />
Written by Gabor Szabo<br />
<br />
Link:<br />
<a href="https://perlmaven.com/string-eval" target="_blank">https://perlmaven.com/string-eval</a>
</html>
<html>
<ul>
<li>zeigt einen Fehler an;</li>
<br />
<li>
Among the many warnings of Perl that might, <br />
or might not indicate a bug, this certainly points<br />
to code that was written incorrectly.<br />
<br />
If we run this script:
<h3>examples/hash_with_or.pl</h3>
<code><pre>
use strict;
use warnings;
my %h = (
a => 1,
b => 2,
);
my $r = $h{a} or $h{b};
</pre></code>
We get: <code>Useless use of hash element in void context</code><br />
<br />
The same is true if we use HASH references:
<h3>examples/hashref_with_or.pl</h3>
<code><pre>
use strict;
use warnings;
my $x = {
a => 1,
b => 2,
};
my $r = $x->{a} or $x->{b};
</pre></code>
The problem was probably created when the <br />
author of this code wanted to set a default value. <br />
That is the author wanted to set $r to be equal to <br />
$h{a}, but if that key did not exist, or if its value was<br />
undef then she wanted to set $r to be $h{b}.<br />
<br />
Unfortunately the snippet to set default value <br />
uses <code>||</code> and <b>not</b> <code>or</code>.<br />
<br />
The reason for that is that <code>||</code> is higher in the precedence<br />
table than <code>=</code> which is higher than <code>or</code>. So the correct code<br />
would have been:
<code><pre>
my $r = ($h{a} or $h{b}); # <i>Klammerung des Ausdrucks</i>
</pre></code>
or in a more idiomatic way:
<code><pre>
my $r = $h{a} || $h{b}; # <i>'idiomatischer' Oder-Operator</i>
</pre></code>
Probably even better to use the defined-or operator:
<code><pre>
my $r = $h{a} // $h{b}; # <i>defined-or Operator</i>
</pre></code>
that was introduced in Perl 5.10.
<h2>B::Deparse</h2>
If you did not know the above and could not <br />
find an article explaining it, you could always<br />
ask Perl to tell you what does it think about <br />
a piece of code. For this you can usually use<br />
B::Deparse with the -p flag to add extra parentheses.<br />
<br />
In our case this is what we get:
<code><pre>
perl -MO=Deparse,-p examples/hash_with_or.pl
Useless use of hash element in void context at examples/hash_with_or.pl line 9.
use warnings;
use strict;
(my(%h) = ('a', 1, 'b', 2));
((my $r = $h{'a'}) or $h{'b'}); # <i>zeigt an, wie der
Perl-Interpreter die
Zeile versteht</i>
</pre></code>
Here you can see that B::Deparse added paren-<br />
theses around the assignment (<code>my $r = $h{'a'}</code>)<br />
which means that will be executed first and then<br />
there is a dangling extra code: <code>or $h{'b'}</code> that has<br />
no impact on anything. That's why Perl warns you<br />
about useless use.<br />
<br />
The correct way to write this would be to write this:
<h3>examples/hash_with_or_fixed.pl</h3>
<code><pre>
use strict;
use warnings;
my %h = (
a => 1,
b => 2,
);
my $r = $h{a} // $h{b};
</pre></code>
<b>Link:</b><br />
<a href="https://perlmaven.com/useless-use-of-hash-element-in-void-context" target=_blank>perl maven.com</a></li>
</ul>
</html>
<html>
Yet another file reversal<br />
(I don't know many apps<br />
that need this, though!):
<code><pre>
perl -e 'print reverse <>' filename
</pre></code>
This tip generously supported <br />
by: madhu@usa.alcatel.com<br />
</html>
<html>
The following table lists all operators from highest precedence to lowest.
<table><border="1">
<tr><td>left</td><td>terms and list operators (leftward)</td></tr>
<tr><td>left</td><td>-></td></tr>
<tr><td>nonassoc</td><td>++ --</td></tr>
<tr><td>right</td><td>**</td></tr>
<tr><td>right</td><td>! ~ \ and unary + and -</td></tr>
<tr><td>left</td><td>=~ !~</td></tr>
<tr><td>left</td><td>* / % x</td></tr>
<tr><td>left</td><td>+ - .</td></tr>
<tr><td>left</td><td><< >></td></tr>
<tr><td>nonassoc</td><td>named unary operators</td></tr>
<tr><td>nonassoc</td><td>< > <= >= lt gt le ge</td></tr>
<tr><td>nonassoc</td><td>== != <=> eq ne cmp ~~</td></tr>
<tr><td>left</td><td>&</td></tr>
<tr><td>left</td><td>| ^</td></tr>
<tr><td>left</td><td>&&</td></tr>
<tr><td>left</td><td>|| //</td></tr>
<tr><td>nonassoc</td><td>.. ...</td></tr>
<tr><td>right</td><td>?:</td></tr>
<tr><td>right</td><td>= += -= *= etc.</td></tr>
<tr><td>left</td><td>, =></td></tr>
<tr><td>nonassoc</td><td>list operators (rightward)</td></tr>
<tr><td>right</td><td>not</td></tr>
<tr><td>left</td><td>and</td></tr>
<tr><td>left</td><td>or xor</td></tr>
</table>
<h3>Links:</h3>
<a href="https://www.tutorialspoint.com/perl/operators_precedence_example.htm" target=_blank>Tutorialspoint :: Perl Operators Precedence Example</a><br />
<a href="http://perldoc.perl.org/perlop.html" target=_blank>PerlDoc :: perlop</a>
</html>
<html>
<pre><code>
#!/usr/bin/perl
use XML::Twig;
my ($XMLFile, $OutFile) = @ARGV;
# XMLRPC-Request
# Normale Einrueckung
my $twig = XML::Twig->new(pretty_print => 'indented');
# Streamformat
# my $twig = XML::Twig->new(pretty_print => 'none');
$twig->parsefile($XMLFile);
if (not defined($OutFile)) {
$OutFile = $XMLFile;
};
$twig->print_to_file($OutFile);
</code></pre>
</html>
<html>
In UNIX environment, the following combination of perl<br />
and find will search for a particular file and replace<br />
the occurence of a particular string with another string in<br />
that file. This will also work for multiple files and<br />
directories. The find command finds the file and<br />
the perl script replaces old string with the new one.<br />
<br />
At the command prompt give this command:<br />
<br /><code>
# perl -pi -e 's/<old string>/<new string>' `find . -name "<file name>"`<br />
</code><br />
NB: Perl should be in the path and the general regular<br />
expression rules apply while using special characters<br />
for eg / or .<br />
<br />
This tip generously supported <br />
by: pandpr@dh.cit.alcatel.fr<br />
</html>
<html>
<a href="http://www.springer.com/us/book/9781484228982" target="_blank">Perl 6 Fundamentals </a>
</html>
Pfandbriefe sind verzinste Schuldverschreibungen, die jedoch strengen
gesetzlichen Anforderungen bezüglich der zu hinterlegenden Sicherheiten
unterliegen. Diese werden in ein Deckungsregister eingetragen und ergeben in
Summe den Deckungsstock. Im Hypothekargeschäft, dem ursprünglichen
Kerngeschäft der Pfandbriefbanken, dient die Grundschuld als Sicherheit.
Später kauften Pfandbriefbanken verstärkt Staatstitel. Gerade inter-
nationale Papiere boten oft eine höhere Rendite. Gemäß dem Pfand-
briefgesetz gelten neben den Papieren von Bund, Ländern und Gemeinden auch
Staatstitel aus den Vereinigten Staaten, Japan, der Schweiz, Kanada und dem Euro-Raum als
deckungsstockfähig, also auch die Staatstitel der PIIGS-Länder.
Bei allen anderen Banken würde die Überdeckung - also der über das gesetzliche
Mindestmaß hinausgehende Deckungsstock - ausreichen, um eine solche
Wertminderung zu kompensieren.
Reicht die Deckung nicht aus, sorgt dies nicht unmittelbar für den Ausfall von Pfand-
briefen. Vielmehr muss eine betroffene Pfandbriefbank in diesem Fall ihren Deckungsstock
wieder entsprechend erhöhen. Zudem können die Pfandbriefbanken ihren
Deckungsstock jederzeit von gefährdeten Papieren befreien, da die
Europäische Zentralbank im Rahmen des Rettungspakets derzeit
Euro-Staatsanleihen kauft.
("Frankfurter Allgemeine Zeitung" Nr. 136 vom 16.06.2010 Seite: 18)
<html>
- Entwicklungsumgebung & Laufzeitsystem in einem<br>
<br>
- As you work in Pharo, the image and changes files are modified, so you<br>
need to make sure that they are writeable. Always keep these two files
together.<br>
Never edit them directly with a text editor, as Pharo uses them to store
the<br>
objects you work with and to log the changes you make to the source code.
It<br>
is a good idea to keep a backup copy of the downloaded image and changes<br>
files so you can always start from a fresh image and reload your code.<br>
<br>
* <u>Keyboard shortcuts</u><br>
<table border="1">
<tr>
<th> Befehl </th>
<th> </th>
</tr>
<tr>
<td>Ctrl - p </td>
<td><i>"Print it"</i><br> der Ausdruck wird ausgewertet & der Wert wird
ausgegeben;<br>it actually compiles the expression, executes it, <br>sends the
message "printString" to the result, and displays the resulting string</td>
</tr>
<tr>
<td>Ctrl - d </td>
<td><i>"Do it"</i><br>der Ausdruck wird <b>nur</b> ausgewertet</td>
</tr>
<tr>
<td>Ctrl - i </td>
<td><i>"Inspect it"</i><br>der
"Inspector"<br>
ermöglicht es, auch komplexere
Rückgabewerte anzusehen & zu
verändern;<br>macht ein separates Fenster auf</td>
</tr>
<tr>
<td>Ctrl - I </td>
<td><i>"Explore it"</i><br>(grosses i) der
"Explorer"<br>
ähnlich dem "Inspector"
ermöglicht es, eine Baum-Ansicht eines komplexen Objekts anzusehen &
zu verändern;<br>macht ein separates Fenster auf</td>
</tr>
<tr>
<td>Ctrl - s </td>
<td><i>"Accept it" / "Save"</i><br>gemachte Änderungen z.B.
Systembrowser-Pane abspeichern<br>
</tr>
<tr>
<td>Ctrl - b </td>
<td><i>"Browse it"</i><br> Aufruf des System-Browsers </td>
</tr>
<tr>
<td>Ctrl - f </td>
<td><i>"Find class
..:"</i><br>
Öffnet das "Find Class ..."-Fenster </td>
</tr>
</table>
<br>
* Syntaxfehler werden in Smalltalk durch eine
Einfügung direkt im Quelltext gekennzeichnet,<br>
wobei die Einfügung einen Hinweis auf den Fehler gibt.<br>
<br>
* Um das den Fehler verursachende Objekt (bzw. die Stelle im Quelltext) zu
finden,<br>
drückt man die
Schaltfläche "Debug" im Fenster der Fehlermeldung. Im nun
erscheinen-<br>
den Fenster sucht man im Aufrufstack (links oben) nach "UndefinedObject>>DoIt.
Hier<br>
wählt man den Eintrag aus und im unteren Fenster erscheint sofort der
Quelltext, der den<br>
Fehler verursacht hat.<br>
<br>
Die Smalltalk-Umgebungen versuchen den Fehler soweit wie
möglich einzugrenzen, und<br>
markieren
hierfür die betreffende Stelle.<br>
<br>
* Falls die Ursache in einer Methode liegt, ist es
möglich, im Debugger selbst den Fehler direkt zu beheben!<br>
<br>
* Definieren von temporären Variablen: <code>| count1 count2 |</code><br>
<br>
* <u>Aufruf des (Standard-) Klassenbrowsers:</u> <b> World --> System Browser
</b><br>
Der Klassenbrowser ist gewissermassen das Herz der
Smalltalk-Programmierung.<br>
Für jede Smalltalk-Implementierung gibt es eine Vielzahl verschiedener
Klassenbrowser.<br>
<br>
<img src="./pictures/ClassBrowser_SystemBrowser.png" alt=""><br>
<br>
* <u>Helfer bei "Katastrophen":</u><b> change log </b><br>
Häufig ist ja nicht alles, was man gemacht hat, schlecht. In dem Fall
wäre es
schön,<br>
wenn man die Teile, die gut waren, behalten und nur die fatalen Fehler
vergessen<br>
machen
könnte. <br>
Zu diesem Zweck gibt es in Smalltalk das Change log. Dank seiner
können Sie zum<br>
letzten gespeicherten Zustand (Image)
zurückkehren und darauf aufbauend
Änderungen<br>
geziehlt wiederholen.<br>
<i>Vorgehensweise:</i><br>
1. Smalltalk öffnen<br>
2. Change log öffnen<br>
3. Auswahl "World --> Tools --> Recover lost changes ...<br>
--> im erscheinenden Dialog
auswählen, wie weit man das Change log
zurück betrachten will<br>
4. Change log wiederholen<br>
--> aus der Liste einen Bereich
auswählen und dann "File in selections"
drücken<br>
<br>
* <u>verschiedene Tasten- & Maustasten-Kombinationen:</u><br>
<Shift> + RMT ==><br>
<img src="./pictures/morphic_halo_01.png" alt=""><br>
<br>
<Strg> + RMT ==> <br>
<img src="./pictures/pasteUpMorph_01.png" alt=""><br>
<br>
--> hier kann man den Punkt "add halo"
auswählen, was dazu
führt, dass um das verwendete<br>
Fenster mehrere verschieden farbige Icons, sog. <i>handles</i>, erscheinen.
Mit denen lässt<br>
sich z.B. die
Fenstergröße ändern.<br>
<img src="./pictures/workspace_halo_01.png" alt=""><br>
<br>
* <u>Transcript - Fenster</u><br>
dieses Fenster ist ein Objekt, das oft
für die Ausgabe von System-Meldungen verwendet wird;<br>
es ist eine Art "system console"<br>
<br>
* Class browser ≡ Systembrowser<br>
<br>
* <u>Eine Klasse finden </u><br>
- Senden einer "browse"-Nachricht an die Klasse, um sie aufzufordern, einen
Browser auf sich selbst zu öffnen<br>
<br>
- alternativ
über den Shortcut Strg-b (browse) (Klassennamen markieren,
über
Shift - RMT, folgendes Fenster erscheint:<br>
<img src="./pictures/findClass_01.png" alt=""><br>
<br>
- mit Hilfe des Klassen-Namens: Strg - f bzw. "find class ... (f)" im
package-Bereich des Systembrowsers<br>
--> es erscheint folgendes Fenster:<br>
<img src="./pictures/findClass_02.png" alt=""><br>
<br>
oder über Cursor in package-Bereich und RMT<br>
--> es erscheint folgendes Fenster:<br>
<img src="./pictures/findClass_03.png" alt=""><br>
<br>
und dann den
Menue-Eintrag "find class ... (f)"
auswählen,<br>
es erscheint das "Find Class"-Fenster.<br>
<br>
* <u>Eine Methode finden</u><br>
- Cursor auf GUI, RMT --> World --> Tools --> Finder,<br>
dann die zusuchende Methode (links oben) eingeben und CR<br>
<br>
* <u>Eine (neue) Methode definieren</u><br>
- Verwendung des TDD, Test Driven Development<br>
--> zuerst eine Test-Routine schreiben, die die zu schreibende Methode<br>
verwendet und somit testet.<br>
<br>
--> dann die Methode schreiben:<br>
first, we have to decide which class the method should belong to. In this<br>
case, the "shout" method that we are testing will go in class "String", so<br>
the corresponding test will, by convention, go in a class called
"StringTest".<br>
<br>
- the comma is the string concatenation operation<br>
<br>
- "^" (caret) tells Pharo that the expression that follows is the answer to
be returned from the method<br>
<br>
* <u>Testlauf starten </u><br>
- open the SUnit "TestRunner" from the "World"-Menue<br>
--> es erscheint folgendes Fenster:<br>
<img src="./pictures/testRunner_01.png" alt="">
<br>
*<u>Neues Package anlegen</u><br>
- System-Browser (Nautilus) aufrufen<br>
--> Cursor in Package-Bereich und RMT<br>
--> Auswählen von "Add package ..."<br>
<br>
*<u>Unterschied zwischen "Categories" & "Packages</u><br>
- Historically, Smalltalk only knows about <s>categories</s>, not
packages.<br>
- The difference is:<br>
A category is simply a collection of related classes in a Smalltalk image.<br>
A <i>package</i> is a collection of related classed <s>and extension
methods</s> <br>that may be versioned using the Monticello versioning
tool.<br>
- By convention, package names and category names are the same.<br>
<br>
- The third pane in the System browser lets us categorize methods so that<br>
we are not overwhelmed by a very long list of method names in the fourth<br>
pane.<br>
<br>
*<u>Eine neue Klasse erzeugen</u><br>
- Modify the class creation template<br>
<br>
*<u>Methoden einer Klasse hinzufügen</u><br>
- Select the protocol "--all--" in the protocol pane<br>
or Cursor im Protocol-Bereich --> RMT --> "Add method ..."<br>
- <b>Methode: initialize</b><br>
By convention, if a class defines a method named "initialize", it will be<br>
called right after the object is created. So, when the new message is<br>
evaluated, the message "initialize" will be sent automatically to the newly
created object.<br>
<br>
Initialize methods are used to set up the state of objects, typically to
set<br>
their instance variables<br>
<br>
*<u>Setter-& Getter-Methoden</u><br>
- Any method that <i>changes</i> the value of an instance variable in this
way<br>
is called a <i>setter method</i>; <br>
a method that <i>answers</i> the current value of an instance variable is
called a <br>
<i>getter method</i><br>
- A getter method always has the same name as the variable it gets, and a
setter<br>
method is named similarly, but with a trailing ":" (e.g. hence
<b>mouseAction</b> and<br>
<b>mouseAction:</b><br>
- Collectively, setters and getters are called <i>accessor</i> methods, and
by<br>
convention they should be placed in the <b>accessing</b> protocol. In
Smalltalk,<br>
<i>all</i> instance variables are private to the object that owns them, so the
only<br>
way for another object to read or write those variables in the Smalltalk
language<br>
is through accessor methods like this one.<br>
<br>
- by default, a method returns "self"<br>
--> falls nicht gewünscht, return-Statement einfügen: ^ c<br>
<br>
- eine Programmzeile wird (i. d. R.) mit einem Punkt "." abgeschlossen<br>
<br>
- Halo für ein Fenster aufrufen:<br>
scheint am einfachsten zu sein, da es wahrscheinlich so immer
funktioniert:<br>
Cursor auf fensterlosen Bereich <br>
--> Shift-Taste & RMT <br>
--> Menue erscheint, listet die aktuell verfügbaren Fenster auf <br>
--> Fenster auswählen <br>
--> Halo um ausgewählten Fenster erscheint<br>
<br>
*<u>Filing out the code</u><br>
- the action-clik menu in the Package pane will give you the option to
"various<br>
--> file out" the whole of package <i>PBE-LightsOut</i><br>
- the resulting file is more or lesshuman readable, but is really intended<br>
for computers, not human<br>
- you should find a file called "PBE-LightsOut.st" in the same folder<br>
on disk where your image is saved<br>
<br>
*<u> Monticello packages</u><br>
<img src="./pictures/monticelloBrowser_01.png" alt=""><br>
<br>
- die "Filing out"-Methode ist "old school"<br>
- Pharo programmers find it more convenient to manage their code using
Menticello packages<br>
- these packages are represented as files with names ending in <b>.mcz</b>
- they are actually zip-compressed bundles that contain the complete code<br>
of your package<br>
- using the Monticello package browser, you can save packages to
repositories<br>
on various types of server, including FTP and HTTP servers<br>
- you can also just write the packages to a repository in a local file<br>
system directory<br>
- a copy of your package is also always cached on your local hard-disk<br>
in the <i>package-cache</i> folder<br>
- Monticello lets you save multiple versions of your program, merge
versions,<br>
go back to an old version, and browse the differences between version<br>
- in fact, Monticello is a distributed revision control system,<br>
i.e. it allows developers to save their work on different places, not on<br>
a single repository as it is the case with CVS or Subversion<br>
- you can also send a .mcz file by email;<br>
the recipient will have to place it in her <i>package-cache</i> folder;<br>
she/he will then be able to use Monticello to browse and load it<br>
<br>
- a new class is created by sending a message to its superclass.<br>
<br>
* Building blocks for expressions:<br>
(i) Keywords in Smalltalk:<br>
self, super, nil, true, false, thisContext<br>
- self: always refers to the receiver of the currently executing method<br>
<br>
- super: also refers to the reciever of the current method, but when you<br>
send a message to super, the method-lookup changes so that it start from
the<br>
superclass of the class containing the method that uses super<br>
<br>
- nil: is the undefined object<br>
<br>
(ii) constant expressions for literal objects<br>
<br>
(iii) variable declaration<br>
<br>
(iv) assignments<br>
<br>
(v) block closures<br>
<br>
(vi) messages<br>
<br>
* Characters:<br>
- a dollar sign $ introduces a literal character:<br>
$a is the literal for 'a'.<br>
- space --> Character space<br>
- tab --> Character tab<br>
<br>
* Compile-time &tilde & Run-time arrays:<br>
- #(): Compile-time arrays<br>
- #{}: (dynamic) array at run-time<br>
<br>
* Comments:<br>
- are enclosed in double quotes;<br>
- "hello" is a comment, not a string, and is ignored by the Pharo compiler<br>
- comments may span multiple lines<br>
<br>
* Assignment:<br>
- := assigns an object to a variable<br>
<br>
* Blocks:<br>
- square brackets [] define a block, also known as a <i>block closure</i>
or<br>
a <i>lexical closure</i>
<br>
* Sequences of statements:<br>
- a period or full-stop (.) is the <i>statement separator</i><br>
<br>
<h3>Links:</h3>
https://www.heise.de/developer/meldung/Smalltalk-Pharo-4-mit-neuen-Tools-veroeffentlicht-2609550.html<br />
https://en.wikipedia.org/wiki/Pharo<br />
http://www.linux-magazin.de/ausgaben/2004/04/nachrichten-zustellung/<br />
https://pharo.org/<br />
<br />
</html>
<html>
Here is a quick way to ping all the hosts in your host table.<br>
<br>
NOTE: Just make sure that there are no blank lines in it, and<br>
verify the ping command on your system exist after one ping. Your<br>
mileage may differ slightly.<br>
<br>
<code>
$ grep -v "#" /etc/hosts | awk '{print $1}' | while read host<br>
> do<br>
> ping -c 1 $host<br>
> done<br>
</code><br>
Or script it:<br>
<br>
<code>
#!/bin/sh<br>
grep -v "#" /etc/hosts | awk '{print $1}' | while read host<br>
do<br>
ping -c 1 $host<br>
done<br>
</code>
</html>
<html>
There's no need to grep and pipe the output into awk<br />
(you can "grep" with awk.)<br />
<br /><code>
awk '/^[0-9]/{print $1}' /etc/hosts |xargs -l ping -c 1 $1<br />
</code><br />
This tip generously supported <br />
by: bmaclean@silverplatter.com<br />
<br />
And another:<br />
<br /><code>
awk '/^[^#]/ {system("ping -c 1 "$1)}' < /etc/hosts<br />
</code><br />
This tip generously supported <br />
by: maddox@xmission.com<br />
</html>
<html>
<h2>8 PostgreSQL Examples to Install, Create DB & Table, Insert & Select Records</h2>
This is one of the most reliable, robust, feature-rich, and <br />
powerful relational database system.<br />
<br />
Most importantly, PostgreSQL is well known for its ability <br />
to handle heavy load, and deliver high performance. This <br />
supports pretty much all the features that you would ever <br />
need from a RDBMS system.<br />
<br />
If you are new to PostgreSQL, this tutorial will give you an <br />
excellent jump-start.<br />
<br />
The following are covered in this tutorial:
<ol>
<li>How to Install PostgreSQL</li>
<li>Initialize the DB using initdb</li>
<li>Create a new Custom Postgres Database</li>
<li>Create a New Table</li>
<li>View All Objects (including Tables)</li>
<li>View Table Details (Describe PostgreSQL Table)</li>
<li>Insert Records into Table</li>
<li>View the table Records (Select from Table)</li>
</ol>
<h3>1. Install and PostgreSQL</h3>
There are two ways you can install PostgreSQL database:
Install from yum Repository
Install from Source Code
To install it from yum, use the following command:
yum install postgresql-server
To install it from source code, follow these steps: 9 Steps to Install and Configure PostgreSQL from Source on Linux
<h3>2. Initialize the DB using initdb</h3>
Next, you should initialize the PostgreSQL database using initdb, and start the postgresql server.
If you are on CentOS 6 (or RedHat), use the following:
service postgresql initdb
service postgresql start
If you are on CentOS 7 (or RHEL 7), Fedora 23+ do the following:
postgresql-setup initdb
systemctl start postgresql.service
When you initialize the database using itdb command, this will create a new PostgreSQL db cluster. A cluster in this context is nothing but a bunch of postgreSQL databases managed on a single node by a single postgreSQL server.
The initdb will do the following:
Create appropriate directories required for the database files
Create catalog tables which are kind of system tables that will be shared with all the databases on the cluster
This will also create a template1 database, which will act as a baseline for all the new databases that will be created on this particular postgres cluster
<h3>3. Create a new Custom Postgres Database</h3>
To create a new postgres database, use createdb command as shown below.
The following will create a new custom PostgreSQL database called
„thegeekstuff“.
# createdb thegeekstuff
If createdb command is not on your system, then something went wrong during your installation. Or, you might not be have this in your PATH environment.
When you install using yum, this command will be under /usr/pgsql-X.Y/bin/createdb (X.Y is the version number), with appropriate link for this in /usr/bin. So, you will not have the problem here.
But, if you've installed from source, then you might want to make sure
/usr/local/pgsql/bin/ directory is in your PATH variable.
Also, make sure you are creating the database from a user who has privileges to
create the database. If you are new to the user/role concepts in PostgreSQL, for
now, go-ahead and login as root (assuming you've installed postgreSQL as
root), and execute the createdb command from there.
In the following example, I created the database from Linux username called
„jason“, who doesn't have the
appropriate privilege to create a new database.
$ createdb thegeekstuff
createdb: could not connect to database template1: FATAL: role "jason" does not exist
Finally, when you are creating a new database, and if your postgreSQL server is
not running, then you'll get the following „could not connect to database template1“ error message.
# createdb thegeekstuff
createdb: could not connect to database template1: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Note: If you've created a database by mistake, you can delete the database
using the „dropdb“ command as
shown below.
# dropdb thegeekstuff
<h3>4. Create a New Table</h3>
Once you've created a new database, then it is time to create a new table
under this database.
First, you should connect to the newly created „thegeekstuff“ database using the psql command as
shown below.
$ psql thegeekstuff
psql (9.6.1)
Type "help" for help.
thegeekstuff=#
Note: The above command will take you to the postgreSQL prompt „=#“. In front of this prompt,
you'll see the database name. From this prompt, you can execute all your PostgreSQL DB commands.
For this example, let us create employee table with the following 4 fields:
CREATE TABLE employee (
id SERIAL, --emp id; auto-increment when empty
name varchar(20), --emp name
dept varchar(10), --department
salary int --employee's salary
);
When you execute the above command at the postgresql prompt, you'll see the
following out. i.e If the table is created successfully, it will display
„CREATE TABLE“ as the message as
shown below.
thegeekstuff=# CREATE TABLE employee (
thegeekstuff(# id SERIAL, --emp id; auto-increment when empty
thegeekstuff(# name varchar(20), --emp name
thegeekstuff(# dept varchar(10), --department
thegeekstuff(# salary int --employee's salary
thegeekstuff(# );
CREATE TABLE
thegeekstuff=#
Few things to keep in mind:
The double dash (- followed by another -) means comment entry. Anything that follows a double-dash is comment, as you see from the above command.
Varchar is for string fields, specify the maximum length of the string field inside parenthesis. So, varchar(20) for name field specifies that the employee name can be maximum of 20 characters.
int field is for numbers
SERIAL datatype is specified for id. We could've specified int also
here. But, what SERIAL does is that, when you don't
specify an employee id during your insert command, it will create one
automatically and increment it accordingly from auto-created sequence.
The following are some other database supported by PostgreSQL:
char(X)
int
smallint
real
double precision
date
time
timestamp
interval
etc.
<h3>5. View All Objects (including Tables)</h3>
After we executed the create table command, we should verify to make sure that the table is created successfully.
For this use the \d option as shown below.
„d“ in this context is display. This will list all
the tables, views and sequences available.
As you see from the following output, we see the newly created employee table.
thegeekstuff-# \d
List of relations
Schema | Name | Type | Owner
--------+-----------------+----------+----------
public | employee | table | postgres
public | employee_id_seq | sequence | postgres
(2 rows)
Apart from the employee table, we also see a sequence which we didn't
create. This is because we specified SERIAL as datatype for the id field,
postgres has automatically created this employee_id_seq, which it will in-turn
use it when you don't specify a value during your insert
for the employee id field.
Also, use the „\d+“ command, will display couple of
extra columns about the objects; size and description as shown below.
thegeekstuff-# \d+
List of relations
Schema | Name | Type | Owner | Size | Description
--------+-----------------+----------+----------+------------+-------------
public | employee | table | postgres | 0 bytes |
public | employee_id_seq | sequence | postgres | 8192 bytes |
(2 rows)
The size of our employee table is „0 bytes“ as we
have not yet inserted new records.
<h3>6. View Table Details (Describe PostgreSQL Table)</h3>
If you've used other database like Oracle, or MySQL, etc, you are familiar
with „desc“ command, which will
display all the details about the tables including the columns and its
datatypes.
In PostgreSQL, the equivalent of „desc“ command is
„\d followed by the table name.
„d“ in this context is „describe“.
As you see below, this describes the details of the employee table.
thegeekstuff-# \d employee
Table "public.employee"
Column | Type | Modifiers
--------+-----------------------+-------------------------------------------------------
id | integer | not null default nextval('employee_id_seq'::regclass)
name | character varying(20) |
dept | character varying(10) |
salary | integer |
When you use „\d+“ as shown below, this will
display additional information about the table columns; stroage, stats target
and description.
thegeekstuff-# \d+ employee
Table "public.employee"
Column | Type | Modifiers | Storage | Stats target | Description
--------+-----------------------+-------------------------------------------------------+----------+--------------+-------------
id | integer | not null default nextval('employee_id_seq'::regclass) | plain | |
name | character varying(20) | | extended | |
dept | character varying(10) | | extended | |
salary | integer | | plain | |
<h3>7. Insert Records into Table</h3>
Next step is to insert some employee records into employee table.
The syntax is exactly same as any standard SQL insert syntax.
The following will insert 5 records to the employee table with the given values for all the fields.
INSERT INTO employee VALUES (100,'Thomas','Sales',5000);
INSERT INTO employee VALUES (200,'Jason','Technology',5500);
INSERT INTO employee VALUES (300,'Mayla','Technology',7000);
INSERT INTO employee VALUES (400,'Nisha','Marketing',9500);
INSERT INTO employee VALUES (500,'Randy','Technology',6000);
The order of the values should match the order of the column names that you see
in the output of the „\d employee“ command. i.e In
the same order as how you created the table.
Note: In the above insert, even-though id can be auto-generated, we specified the value of employee id (for the id column).
In the following example, we can insert values only to specific columns of employee table by specifying the column name within parenthesis as shown below.
The following example will insert a new employee record only with values for name and dept columns.
thegeekstuff=# INSERT INTO employee (name,dept) VALUES ('Ritu', 'Accounting');
INSERT 0 1
If the insert command is successful, it will display the message „INSERT 0 1“ as shown above.
<h3>8. View the table Records (Select from Table)</h3>
Just like any typical SELECT sql command, you van view only the specific columns of a table by specifying the column names as shown below.
thegeekstuff=# SELECT name, dept FROM employee;
name | dept
--------+------------
Thomas | Sales
Jason | Technology
Mayla | Technology
Nisha | Marketing
Randy | Technology
Ritu | Accounting
(6 rows)
SELECT * will display all the columns from the specified table as shown below.
thegeekstuff=# SELECT * FROM employee;
id | name | dept | salary
-----+--------+------------+--------
100 | Thomas | Sales | 5000
200 | Jason | Technology | 5500
300 | Mayla | Technology | 7000
400 | Nisha | Marketing | 9500
500 | Randy | Technology | 6000
1 | Ritu | Accounting |
(6 rows)
In the above output, the value of the id column for the 6th record is 1.
This is because we never specified the id value, and it automatically took the value of 1 from its own sequence. The next time you create a record with an id value, it will use 2 as emp id.<br />
<br />
Link:<br />
http://www.thegeekstuff.com/2017/02/postgresql-basics/<br />
<br />
</html>
<html>
<a href="http://www.postgresqltutorial.com/" target="_blank">PostgreSQL Tutorial</a>
</html>
<html>
Backquotes are the most powerful things in Unix. <br />
More than one Unix commands can be run simul-<br />
taneously on the prompt.<br />
<br />
In csh,<br />
<br /><code>
% find . -name "*.txt" -print<br />
</code><br />
gives the path & names of the files with extension ".txt" in<br />
current directory and its subdirectories. If you want to open<br />
these files in vi together then<br />
<br /><code>
% vi `find . -name "*.txt" -print`<br />
</code><br />
Similarly,<br />
<br /><code>
% find . -name "*.txt" -print<br />
<listing of all txt files. in current directory/sub-dirs><br />
% vi `!!`<br />
</code><br />
this will open all those files in vi listed by find command.<br />
<br />
This tip generously supported <br />
by: dhruvm@duettech.com<br />
</html>
<html>
<h3>Grundlagen</h3>
In der Regel gibt die PowerShell die Ergebnisse auf dem Bildschirm aus. Möchte man die Ausgabe in eine Textdatei speichern, reicht es, wenn man das Cmdlet out-file verwendet. Aber es funktioniert ebenso, wenn man den Weiterleitungsoperator > benützt. Möchte man die Ergebnisse jedoch als CSV, XML oder HTML speichern, so bietet die Powershell die drei folgenden Cmdlets. Export-CSV ,Export-CliXML und Convertto-html. Natürlich gibt es neben dem Export auch einen Import. Man kann also genauso gut Inhalte aus CSV oder XML in die PowerShell einlesen.
In den folgenden Beispielen wird für die Weitergabe der Ergebnisse die Pipeline verwendet. Wie man die bei einer Befehlskette anwendet könnt ihr hier nachlesen.
<h3>Beispiel für TXT, CSV und XML</h3>
Ein kleines Beispiel soll die Funktionsweise erläutern. Zunächst lassen wir uns die ersten 6 Prozesse anzeigen, welche am meisten CPU Zeit verbrauchen. Das Ergebnis speichern wir anschließend in eine Variable $P. Anschließend speichern wir die Inhalte einmal als Prozesse.txt, Prozesse.csv und Prozesse.xml Datei ab.
<code><pre>
$P = get-process | Sort-Object CPU -Descending | Select-Object -First 6
$P > f:\Prozesse.txt
$P | Export-Csv f:Prozesse.csv
$P | Export-Clixml f:Prozesse.xml
</pre></code>
<img src="./pictures/Ausgabe-Prozess.jpg" height=185 width=693 title="Ausgabe der Datei in unterschiedlichen Formaten" /> <!-- height=246 width=924 -->
<h3>Beispiel für HTML</h3>
Relativ einfach geht auch das speichern in eine HTML Datei. Man verwendet hierzu das Cmdlet convertto-html.
<code><pre>
$P | ConvertTo-Html > f:\Prozesse.html
</pre></code>
Da dies eine sehr unübersichtliche Anordnung aller Eigenschaften der Prozesse ist, wäre es sinnvoll nur bestimmte Parameter auszugeben. In unserem Fall lassen wir nur den Namen, Path und CPU ausgeben bzw. in ein HTML Dokument speichern.
<code><pre>
$P | ConvertTo-Html -Property Name, Path, CPU > f:\Prozesse.html
</pre></code>
<img src="./pictures/Ausgabe-Prozesse-HTML.jpg" height=187 width=1052 title="Prozesse mit den drei Eigenschaft: Name, Path und CPU als HTML" /> <!-- height=249 width=1403 -->
<br />
Das Speichern der Ausgabe als HTML bietet sehr schöne Möglichkeiten. Man könnte sich z.B. alle Dienste nach deren Status in unterschiedlichen Farben ausgeben lassen. Für den Einsatz von Farben muss man lediglich den <tr> ‐Tag ersetzen und ihn mit einer Farbe belegen. Für die Fallunterscheidung ob der Status nun läuft oder nicht, kann man ‐like verwenden. Wer noch eine paar Grundlagen Informationen zu Schleifen und Bedingungen benötigt, kann diese hier nachlesen.
<code><pre>
get-service | ConvertTo-Html -Property Name,Status | foreach { if ($_ -like "*<td>Running</td>*") {$_ -replace "<tr>", "<tr bgcolor=green >"} else {$_ -replace "<tr>", "<tr bgcolor=red>"}} > f:\get-service.html
</pre></code>
<img src="./pictures/Dienste-als-html.jpg" height=302 width=1051 title="Dienste als HTML-Tabelle" /> <!-- height=403 width=1401 -->
<h3>Links:</h3>
<ul>
<li><a href="https://it-learner.de/powershell-ausgaben-als-csv-xml-oder-html-speichern/" target="_blank" rel="noreferrer noopener">IT‐Learner :: Powershell‐Ausgaben als csv, xml oder html speichern</li>
</ul>
</html>
<html>
<p>
Ein Dialog ist für diese Anpassung nicht vorgesehen. Man muß sie<br />
vielmehr über den Befehl
code><pre>Set-PSReadLineOption</pre></code>
vornehmen. Der Aufruf sieht für diesen Zweck so aus:
<code><pre>
Set-PSReadLineOption -Colors @{<em><Kategorie></em> = '<em><Farbe></em>'}
</pre></code>
Dabei ist <em><Kategorie></em> durch eines der in der Microsoft‐Doku‐<br />
mentation genannten Schlüsselwörter zu ersetzen, beispiels‐<br />
weise Command für den Befehlsnamen oder String für Zei‐<br />
chenketten in Anführungszeichen. Die <em><Farbe></em> können Sie<br />
auf zwei verschiedene Arten definieren:<br />
<ul>
<li>Wenn es eine der vordefinierten Farben sein soll, können<br />
Sie deren Namen verwenden, etwa Black für Schwarz <br />
oder DarkGreen für ein dunkles Grün ‐ eine Liste liefert<br />
<code><b>[ConsoleColor].GetEnumNames()</b></code>.
</li>
<li>Alternativ können Sie statt der Farbe selbst einen ANSI‐<br />
Escape‐Code einsetzen, der diese einstellt. Beispiele<br />
listet ein Wikipedia‐Artikel zum Thema. So zeigt die<br />
PowerShell nach der Eingabe
<code><pre>
Set-PSReadLineOption -Colors @{Variable = "$([char]0x1b)[38;2;255;224;255m"}
</pre></code>
Variablennamen in einem hellen Rosa (RGB: 255,<br />
224, 255) an.
</li>
</ul>
</p><p>
Damit die passende Farbe immer beim Öffnen eines neuen<br />
Power‐Shell‐Fensters eingestellt wird, schreiben Sie den<br />
Aufruf zweckmässigerweise in Ihre Profile-Datei ‐ deren<br />
Name steht in der Systemvariablen $profile. (hos)
</p>
<h3>Links:</h3>
<ul>
<li><a href="https://www.heise.de/ct/artikel/Textfarben-der-PowerShell-aendern-4668765.html" target="_blank"
rel="noreferrer noopener">c't :: Textfarben der PowerShell ändern </a></li>
<li><a href="https://www.der-windows-papst.de/2015/06/15/powershell-konsole-farbe-anpassen/" target="_blank" rel="noreferrer noopener">Der Windows Papst ‐ IT Blog Walter :: Powershell Konsole Farbe anpassen</a></li>
</ul>
</html>
<html>
<ul>
<li><b>Winget</b>, der Windows‐Paket‐Manager, ist ein Befehlszeilen‐<br />
tool, mit dem Benutzer Anwendungen auf Windows Client-<br />
Computern auffinden, installieren, aktualisieren, entfernen<br />
und konfigurieren können. Dieses Tool ist die Clientschnitt‐<br />
stelle für den Windows‐Paket‐Manager‐Dienst. Das Befehls‐<br />
zeilentool winget ist standardmäßig im Paket mit Windows<br />
1 und modernen Versionen von Windows 10 als App-In‐<br />
staller enthalten.
</li>
<li><h3>Hinweis:</h3>
Eine Liste der Systemanforderungen und Installationsan‐<br />
weisungen finden Sie in der Dokumentation zu winget. <br />
Winget kann derzeit <b>nicht</b> auf Windows‐Servern ausge‐<br />
führt werden.
</li>
<br />
<li>Die folgenden Befehle können verwendet werden, um<br />
PowerShell mithilfe der veröffentlichten winget‐Pakete<br />
zu installieren:
<ul>
<li><h3>Suchen nach der neuesten Version von PowerShell</h3>
<code><pre>winget search Microsoft.PowerShell</pre></code>
⇒ Ausgabe:
<code><pre>
Name Id Version Source
--------------------------------------------------------------
PowerShell Microsoft.PowerShell 7.3.4.0 winget
PowerShell Preview Microsoft.PowerShell.Preview 7.4.1.0 winget
</pre></code>
</li>
<li><h3>Installieren von PowerShell oder der PowerShell-Vorschau mit dem Parameter id</h3>
<code><pre>
winget install ‐‐id Microsoft.Powershell ‐‐source winget
winget install ‐‐id Microsoft.Powershell.Preview ‐‐source winget
</pre></code>
Die Installation erfordert eine Administrator-Shell. Die Protokoll‐Files werden unter
<code><pre>
C:\Users\mueller\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir\WinGet-Microsoft.PowerShell.7.3.4.0-2023-06-28-21-31-42.599.log
</pre></code>
abgespeichert.
</li>
</ul>
<li><h3>Hinweis:</h3>
<ul>
<li>Auf Windows-Systemen mit X86- oder X64-Prozessor wird durch winget das MSI-Paket installiert.
</li>
<li>Auf Systemen, die den Arm64-Prozessor verwenden, wird durch winget das Microsoft Store-Paket (MSIX) installiert.
</li>
</ul>
<br />
Weitere Informationen findet man unter “Installieren“ über den Microsoft Store.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://learn.microsoft.com/de-de/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.3#winget"
target="_blank" rel="noreferrer noopener">
Microsoft :: Installieren von PowerShell mit Winget (empfohlen)</a>
</li>
</ul>
</html>
<html>
<ul>
<li><h4>MD5 Hash berechnen</h4>
Möchte man z.B. den MD5 Hash einer ISO-Datei errechnet haben,<br />
so verwendet man folgenden Befehl:
<code><pre>
Get–FileHash –Path C:<em>PfadzurDatei.exe</em> –Algorithm MD5
</pre></code>
Aus Sicherheitsgründen sollten MD5 und SHA1, die nicht mehr als sicher<br />
betrachtet werden, nur für eine einfache Änderungsvalidierung verwendet<br />
werden und sollten nicht verwendet werden, um Hashwerte für Dateien zu<br >
erzeugen, die Schutz vor Angriffen oder Manipulationen erfordern. <br />
</li>
<li><h4>Hash berechnen</h4>
Möchte man den Hash–Wert einer Datei berechen, kann man<br />
folgenden Befehl benutzen:
<code><pre>
Get–FileHash –Path C:<en>PfadzurDatei.exe</em> | Format–List
</pre></code>
</li>
<li><h4>Prüfsummen vergleichen</h4>
Möchte man den errechneten Hash–Wert mit einem<br />
vorhanden Hash überprüfen, kann man folgenden<br />
Befehl verwenden:
<code><pre>
Get–FileHash –Path C:<em>PfadzurDatei.exe</em> | ComparevObject –ReferenceObject "Hash-Wert"–DifferenceObject {$_.Hash}
</pre></code>
</li>
<li>The default hash algorithm used is <b>SHA256</b>. Accepted values<br />
are:
<ul>
<li>SHA1
</li>
<li>SHA384
</li>
<li>SHA512
</li>
<li>MD5
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>
<a href="https://wiki.falkner.info/wiki/Pr%C3%BCfsumme_von_Dateien_mit_PowerShell_ermitteln"
target="_blank" rel="noreferrer noopener">
Falkner's Computer Wiki :: Prüfsumme von Dateien mit PowerShell ermitteln
</a>
</li>
<li>
<a href="https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-filehash?view=powershell-7.3"
target="_blank" rel="noreferrer noopener">
Microsoft :: Learn / PowerShell / Reference / Microsoft.PowerShell.Utility – Get-FileHash
</a>
</ul>
</html>
<html>
<ul>
<li><h3>Gesuchte Verzeichnisse auflisten:</h3>
<code><pre>
dir <em>GesuchtesDIr</em>
</pre></code>
Beispiel:
<code><pre>
dir Fern*
</pre></code></li>
</ul>
</html>
<html>
<code><pre>Invoke-WebRequest ‐Uri <em><source></em> ‐OutFile <em><destination></em></pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://adamtheautomator.com/powershell-download-file/"
target="_blank" rel="noreferrer noopener">
Adam, the Automator :: PowerShell wget : Awesome Way to Download a File</a>
</li>
</ul>
</html>
<html>
<ul>
<li>mittels Windows Management Instrumentation Console (WMIC):<br />
<code><pre>wmic logicaldisk get [ name | caption ]</pre></code>
für weitere Infos:<br />
<code><pre>wmic logicaldisk get deviceid, volumename, description</pre></code></li>
<li>weitere Möglichkeit:
<code><pre>get-psdrive -psprovider filesystem</pre></code></li>
<li></li>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://play-and-more.com/9739-list-drives-using-command-prompt-powershell-windows" target="_blank"
rel="noreferrer noopener">Play and more :: List drives using command prompt & powershell</li>
</ul>
</html>
<html>
<ul>
<li>
<table>
<tr>
<th>Alias</th><th>Full PowerShell Command</th><th>Explanation</th><th>Bash Equivalent</th>
</tr>
<tr>
<td>ls </td><td>Get-ChildItem</td><td>List the contents of the current working directory</td><td>ls</td>
</tr>
<tr>
<td>cd</td><td>Set-Location</td><td>Change your current working directory</td><td>cd</td>
</tr>
<tr>
<td>rm</td><td>Remove-Item</td><td>Delete an item</td><td>rm</td>
</tr>
<tr>
<td>rm -recurse -fo</td><td>Remove-Item -Recurse -Force</td><td>Delete a folder recursively</td><td>rm -rf</td>
</tr>
<tr>
<td>mkdir</td><td>New-Item -ItemType Directory</td><td>Create a new directory</td><td>mkdir</td>
</tr>
<tr>
<td>ni </td><td>New-Item -ItemType File </td><td>Create a new file</td><td>touch</td>
</tr>
<tr>
<td>cat</td><td>Get-Content</td><td>Print the contents of a file to the screen</td><td>cat</td>
</tr>
<tr>
<td></td>
<td>Get-ChildItem -Path D:
</td>
<td>alle Verzeichnisse auflisten, die im Stamm–<br />
verzeichnis eines bestimmten Laufwerks sind
</td>
<td></td>
</tr>
<tr>
<td></td>
<td>Get-ChildItem -Path *.exe
</td>
<td>Suche nach Dateien mit einer bestimmten <br />
Erweiterung
</td>
<td></td>
</tr>
<tr>
<td></td>
<td>Get-ChildItem -Path D: -Recurse</td>
<td>Rekursiv nach Dateien im Stammver–<br />
zeichnis des Laufwerks D suchen
</td>
<td></td>
</tr>
<tr>
<td></td>
<td>Get-ChildItem -Exclude *.txt -Recurse</td>
<td>Rekursiv nach Dateien suchen, die nicht<br />
mit einer angegebenen Erweiterung über–<br />
einstimmen
</td>
<td></td>
</tr>
<tr>
<td>history</td>
<td>Get-History</td>
<td>Get the current session history
</td>
<td>history</td>
</tr>
<tr>
<td>history -id 5</td>
<td>Get-History -id 5</td>
<td>Get the entry at the third position
<td>history ...</td>
</tr>
<tr>
<td>history -count 3</td>
<td>Get-History -count 3</td>
<td>Get the five most recent entries <br />
from the current session history
</td>
<td>history ...</td>
</tr>
</table>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://realpython.com/python-coding-setup-windows/#navigating-the-windows-command-line"
target="_blank" rel="noreferrer noopener">
Real Python :: Your Python Coding Environment on Windows: Setup Guide</a>
</li>
<li><a href="https://de.minitool.com/nachrichten/powershell-findet-datei.html"
target="_blank" rel="noreferrer noopener">
MiniTool :: PowerShell Dateien suchen: Dateien suchen PowerShell Windows 10/11</a>
</li>
</ul>
</html>
<html>
<ul>
<li><details><summary><b>1. ProRealTime - Erste Schritte</b></summary>
<ul>
<li>Aufgeteil in drei Windows:
<ol>
<li>Menü‐/Einstellungs‐/Werkzeugleiste:<br />
<img src="./pictures/ProRealTime_MenueLeiste.png" height=38 width=775 ></li> <!-- height=75 width=1550 -->
<li>Bereich mit der Watch‐Liste;</li>
<li>Anzeige der Charts & Indikatoren;</li>
</ol>
</li>
<br />
<li>jedes einzelne Fenster separat einstellbar (nicht alle drei auf einmal!);</li>
<br />
<li><b>Gemachte Anpassung / Einstellungen abspeichern:</b><br />
Menü → Datei <br />
→ Speichern “Ulrich Müller Wealth Academy“ [Strg + S]<br />
oder: Speichern unter [Strg + W]</li>
<br />
<li>Die in den einzelnen Vorlagen gemachten Anpassungen /Ein‐<br />
stellungen sind NUR in diesen Vorlagen zu sehen und <u>nicht</u> in<br />
den anderen;</li>
<br />
<li><b>Zeitraum verschieben:</b><br />
Dafür gibt es zwei Möglichkeiten:
<ol>
<li>mittels der Lupe, rechts unten</li>
<li>mittels Maus‐Rad</li>
</ol></li>
<br />
<li>Die Größe der Bereiche für die Indikatioren können<br />
angepasst werden (Verkleinern / Vergrößern möglich)</li>
<br />
<li>bzgl. der zwei Pfeile, rechts oben <img src="./pictures/TradingToolBar.png" height=38 width=48>:<br />
<br />
Beim Anklicken erscheint bzw. verschwindet die sog. Trading‐Tool‐Bar.<br />
Damit ist es möglich, aus ProRealTime heraus, Aktien zu handeln. </li>
<br />
<li>Einheiten der Kerzen aus einer Liste einstellbar bei “Einheiten“<br />
(so gilt für “1 Tag“ :: 1 Kerze :=: 1 Tag)<br /></li>
<br />
<li><b>Einheiten der historischen Daten:</b><br />
Standard‐Einstellungen: “1 Tag“ & “200 Einheiten“;<br />
als Zeitraum wird i.d.R. ein halbes Jahr angezeigt;</li>
<br />
<li><b>Chartfenster verschwunden?</b><br />
Dann auf einen beliebigen Eintrag in der Watchliste klicken. Dann erscheint<br />
das Chart‐Fenster (und es muß dann u.U. an den Bereich angepasst werden).<br />
</li>
<br />
<li><b>Watchliste verschwunden?</b><br />
Dann: Menüleiste → Ansicht → Listen → Neue Leiste [Strg + H]</li>
<!--
<li></li>
<li></li>
<li></li>
<li></li>
-->
</ul>
<br />
</details><br />
</li>
<li><details><summary><b>1.1. ProRealTime - Erste Schritte - Einstellungsmöglichkeiten</b></summary><br />
<ul>
<li>Cursor‐Details (Cursor zeigt im Chart einige Infos, wie Eröffnungs‐, <br />
Schlusskurs bzw. Werte von den Indikatoren wie EMA(200) an) an‐<br />
zeigen bzw. ausschalten:<br />
<code><pre>
Einstellungen → Plattform → Charts → Cursor‐Details anzeigen (Tick off / on)
</pre></code>
<li>Unter Einstellungen → Plattform → Interface: <br />
<ul>
<li>Fenster en block minimieren bzw. maximieren</li>
<li>Alle Fenster nach vorne bringen, wenn die Workstation den Fokus bekommt</li>
</ul>
beim Minimieren werden <b>alle</b> drei Fenster gleichzeitig minimiert;</li>
<li>Unter Einstellungen → Plattform → Interface → Hauptmenü:<br />
Suchfeld an‐ und ausschalten</li>
<li>Unter Einstellungen → Vorlagen:<br />
<ul>
<li>“Farben & Effekte“</li>
<li>“Schriftzeichen“:<br />
Setzen der Schriftart, des Stils und der Größe</li>
</ul>
<li>Indikator‐Fenster verschwunden?<br />
Zeile um unteren Fensterrand: Indikatorfenster‐Button<br />
→ Anklicken → neues Fenster, “Indikatoren & Handelssyteme“<br />
→ Doppelklick auf verschwundenen Indikator → neues Fenster erscheint, <br />
alle Indikatoren‐Fenster wunschgemäß anordnen resp. anpassen</lI>
</ul>
<br />
</details><br /></li>
<li><details><summary><b>2. ProRealTime - Wie kann ich die Aktien in der Watchlist von ProRealTime aktualisieren</b></summary><br />
<ul>
<li><b>Grund für die manuelle Pflege der Watchlist:</b><br />
eine Änderung der Liste hätte eine komplette Neu‐Installation der Applikation<br />
zur Folge, weil der Aufbau eine automatische Aktualisierung nicht zulässt.</li>
<li><b>Wert entfernen:</b><br />
betroffenen Wert markeren → RMT → ein neues Fenster erscheint<br />
→ auf Menüpunkt “Aus der Liste löschen“ mit Cursor draufgehen<br />
→ Untermenü erscheint, mit Listen, in denen der Eintrag zu finden ist<br />
→ betroffene Liste auswählen und anklicken<br />
→ Wert verschwindet aus der Liste.
</li>
<li><b>Wert hinzufügen:</b><br />
In der Kopfleiste vom Listen‐Fenster den Button “Rechteckt mit Plus‐<br />
Zeichen links oben“ anklicken → es erscheint ein neues Fenster mit<br />
Suchfeld<br />
→ Kürzel oder Name des gewünschten Unternehmens eingeben<br />
→ den gesuchten Wert in den Suchergebnissen ermitteln & auswählen</li>
<li><b>Einstellungen für die bzw. an den Listen machen:</b><br />
In der Kopfleiste des Listenfensters den Schraubenschlüssel-Button<br />
anklicken <br />
→ ein neues Fenster erscheint, mit dem man Listen:
<ol>
<li>anlegen,</li>
<li>umbenennen,</li>
<li>duplizieren</li>
und
<li>löschen</li>
</ol>kann.<br />
<br />
Mein Portfolio kann als “My List“ definiert werden.<br />
</li>
</ul>
<br />
</details><br /></li>
<li><details><summary><b>2.1. ProRealTime - Einstellungen Watchlist</b></summary>
<br />
</details><br /></li>
<li><details><summary><b>3. ProRealTime - Charttechnik Wie zeichne ich Widerstands- & Unterstützungs-Linien, Trendkanäle, etc.</b></summary>
<br />
</details><br /></li>
<li><details><summary><b>3.1 ProRealTime - Charttechnik - Einstellungen der Werkzeugleiste und Shortcuts</b></summary>
<br />
</details></li>
</ul>
</html>
<html>
If you want to do probe-scsi-all <br />
when the system is online, you<br />
can do it by running the following <br />
command:<br />
<br />
<code>
# iostat -En <br />
</code>
<br />
This is applicable for Solaris 2.6 on SPARC platform.<br />
<br />
This tip generously supported by: <br />
bkumar@wipro.co.in<br />
</html>
<html>
<ul>
<li>wurde am MIT begonnen</li>
<li>eine objektorientierte, stark typisierte Programmiersprache <br />
mit zugehöriger integrierter Entwicklungsumgebung. </li>
<li>ist fär die Einsatzbereiche Grafik, Simulation und Animation <br />
spezialisiert.</li>
<li>hat den Charakter einer stark vereinfachten Version der <br />
Programmiersprache Java</li>
<li>ermöglicht Interaktionen und visuelle Elemente zu program‐<br />
mieren</li>
<li>richtet sich vorwiegend an Gestalter, Künstler und Program‐<br />
mieranfänger</li>
<li>Die Klassenbibliotheken zielen vor allem auf das Einsatzgebiet<br />
von Processing und berücksichtigen die Themen Video, Grafik, <br />
Grafikformate, Sound, Animation, Typographie, 3D, Simulation,<br />
Datenzugriff und -transfer, sowie Netzwerkprotokolle. </li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://processing.org/" target=_blank>Processing :: Homepage</a></li>
<li><a href="https://lernprocessing.wordpress.com/2010/01/18/processing-links/" target=_blank>Lern Processing - Blog :: Tutorial</a></li>
<li><a href="https://de.wikipedia.org/wiki/Processing" target=_blank>Wikipedia</a></li>
</ul>
</html>
<html>
<ul>
<li>ein Desktop-File im Verzeichnis
<pre><code>~/.config/autostart</code></pre>
bereitstellen<br>
</li>
<li><h4>Beispiele für den Aufbau:</h4>
<ul>
<li><b>LXterminal.desktop:</b>
<pre><code>[Desktop Entry]
Exec=/usr/bin/lxterminal --geometry=155x40
Name=LXterminal
Type=Application
Version=1.0</code></pre>
</li>
<li><b>less qinternet.desktop:</b>
<pre><code>[Desktop Entry]
Categories=Network;Dialup;
Comment[de]=Starte oder stoppe Internet-Einwahlverbindungen
Comment=Starte oder stoppe Internet-Einwahlverbindungen
Exec=qinternet
GenericName[de]=Internet-Einwahl
GenericName=Internet-Einwahl
Icon=qinternet
MimeType=
Name[de]=qinternet
Name=qinternet
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=
X-SuSE-translate=true</code></pre>
<li>
</ul>
</li>
</ul>
</html>
<html>
geht anscheinend nur mit PHP ... ;-)
<ol>
<li>PHP installieren (XAMP?)</li>
<li>Verzeichnis-Inhalt anzeigen/lesen<br />
(den Einträgen sind “Buttons“ hinterlegt)</li>
<li>Jeden Eintrag im Verzeichnis mit “Buttons“ hinterlegen<br />
→ die dahinterliegende html-Datei wird angezeigt</li>
</ol>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://www.kubermatic.com/blog/opa-rego-in-a-nutshell/"
target="_blank" rel="noreferrer noopener">
Kubermatic :: Rego in a nutshell</a>
</li>
</ul>
</html>
SDLC := Software Development Life Cycle
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Clean_Code" target="_blank" rel="noreferrer noopener">Wikipedia :: Clean Code</a></li>
<li><a href="https://de.wikipedia.org/wiki/Kata_(Programmierung)" target="_blank" rel="noreferrer noopener">Wikipedia :: Kata</a></li>
<li><a href="http://csharpcode.de/" target="_blank" rel="noreferrer noopener">Csharp-Code</a> (Katas für verschiedene Prog-Sprachen)</li>
<li><a href="https://github.com/SoftwareDojo/Katas" target="_blank" rel="noreferrer noopener">Csharp-Code :: Kata‐Lösungen</a> <em>(downloaded: Dir D:\Python\CleanCode-Katas)</em></li>
<li><a href="https://www.informatik-aktuell.de/entwicklung/programmiersprachen/next-level-lesbarkeit.html" target="_blank" rel="noreferrer noopener">Robert Bräutigam :: Next Level Lesbarkeit</a> <em>(downloaded: informatik-aktuell.de-Next Level Lesbarkeit.pdf)</em></li>
</ul>
</html>
<html>
<meta Separations>
<p>
Unter <b>Separation of Concerns</b> (englisch für Trennung der Zuständigkeiten)<br />
versteht man in der Informatik das Prinzip, verschiedene Aufgaben einer An‐<br />
Anwendung in eigenen Teillösungen umzusetzen.</p>
<p>
Warum?
<ul>
<li>Wenn eine Codeeinheit <b>keine</b> klare Aufgabe hat, ist es schwer, <br />
sie zu verstehen, sie anzuwenden und sie ggf. zu korrigieren <br />
oder zu erweitern.</li>
<li>Es kann nicht Aufgabe einer allgemein Daten verarbeitenden <br />
Klasse sein, Methoden für alle möglichen Ausgabekontexte <br />
bereitzuhalten. Wenn du ein “und“ bei der Beschreibung<br />
dessen, was deine Klasse tut, verwenden musst, dann macht <br />
sie zu viel.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.selfhtml.org/wiki/Separation_of_concerns" target="_blank" rel="noreferrer noopener">SelfHTML :: Separation of concerns</a></li>
<li><a href="https://en.wikipedia.org/wiki/Separation_of_concerns" target="_blank" rel="noreferrer noopener">Wikipedia (engl.)</a></li>
</ul>
</html>
<html>
Sometimes it is handy to be able to show some <br />
information in the xterms title bar, for example<br />
if you download a set of large files (thereby <br />
producing lots of meaningless information on<br />
the terminal) and you want to know which file <br />
is actually beeing downloaded.<br />
<br />
For this purpose, I hacked a few lines of shell <br />
code that would put any information into the<br />
xterms title bar. I called the script <b>ttshow</b>.
<code><pre>
#!/bin/sh
# Script:: ttshow
#
if [ -z $DISPLAY ]; then
echo "ESC]0; $* ^G"
fi
</pre></code>
In this little script, the string ESC has to be replaced<br />
by one real escape character (ascii 0x1b), the <br />
string "^G" has to be replaced by a bel character <br />
(ascii 0x07).<br />
<br />
Now I can make my scripts like this:
<code><pre>
for file in in `cat filenames`; do
ttshow "downloading $file"
wget $file
done
</pre></code>
..and it will tell me on the first glance what it's doing.<br />
<br />
For more information about this, unpack the X distribution<br />
and search for the file ctlseqs.ms - this file belongs<br />
to the xterm distribution and contains all the escape<br />
sequences xterm knows about.<br />
<br />
This tip generously supported<br />
by: ulinzen+ugu@sendmail.com<br />
</html>
<html>
<ul>
<li><b>Starten:</b><code><pre>cd ~/programming/prolog/sicstus4.0.8/bin
./sicstus</pre></code></li>
<li><b>Verlassen / Stoppen:</b><br />
Möglichkeiten:<br />
1. Eingabe von “<code><b>halt.</b></code>“ + CR<br />
oder<br />
2. Eintippen von <code><b>Ctrl + d</b></code><br />
oder<br />
3. Eingabe von “<code><b>e</b></code>“ <code><b>(exit)</b></code>, gefolgt von ^C (Ctrl-C), danach CR</li>
</ul>
</html>
Here is a little extra guard that can be taken if
anyone attempts, or accidentally recursively removes
files inside a directory. If and when it occurs,
the person will constantly be prompted with the
question"are you sure?"
Here is how it works in a safe area:
% cd /usr/tmp
% mkdir foo
% touch /usr/tmp/foo/\-i
% chmod 000 /usr/tmp/foo/\-i
NOTE: Use the fully qualified path to create the
file when creating.
% cd foo
% touch fee fii foo fum
% rm -rf *
Every little bit helps!
<html>
One of the best things an admin can do is to <br />
have good public relations with the user community.<br />
<br />
Don't just be there when problems arise. Go out<br />
to the user community when things are working. <br />
High visibility is the key.<br />
<br />
If the users see you around and there are no <br />
problems they will believe that you care to take<br />
the time for them.<br />
<br />
Try not to let the users always go come to you.<br />
<br />
Go to those users that you never here from.<br />
The perfect users, the ones that leave you<br />
alone. Often the don't have an understanding<br />
of what you can do for them.<br />
<br />
I know many will say, "I don't have time!" Just a<br />
calm walk through a department is really all it<br />
takes, sometimes you never have to stop.<br />
</html>
<html>
Puppet is used to automate several routine sysadmin configuration tasks.<br />
<br />
Puppet in an enterprise grade configuration management system.<br />
<br />
It allows you to define the state of your IT infrastructure. Once it is defined,<br />
Puppet will automatically enforce the correct state on an on-going basis.
<h2>1. Puppet Architecture</h2>
Puppet typically has one server component and multiple agents. You <br />
have to designate a server on your network as puppet master, and <br />
each node on your network will have puppet agent installed on it.<br />
<br />
The most common way to apply puppet configuration to a client is <br />
to use the puppet master daemon (puppetmasterd) and puppet <br />
client daemon (<b>puppetd</b>). You can also manually apply the<br />
manifests using puppet tool.<br />
<br />
Configuration is defined on the puppet master, compiled and then<br />
pushed out to the puppet clients automatically when they connect.<br />
<br />
Puppet supports a wide range of different platforms and operating <br />
systems, and it will automatically run the appropriate commands to<br />
apply your manifest in each environment.<br />
<br />
A manifest is nothing but details about files, packages, configuration<br />
operations written in language that puppet can understand.<br />
<br />
Each Puppet node contacts the puppet master, by default every <br />
30 minutes, to confirm that its configuration is up to date. If the <br />
configuration is different or any new configuration is available, it is<br />
recompiled and then applied to the puppet node.<br />
<br />
In this tutorial, we will explain how to create some basic manifests<br />
and apply to the clients using puppet tool.<br />
<br />
Most of the system configuration can be viewed by using the puppet<br />
command line tool. All the configuration components are organized into<br />
resources. The resources are grouped into collections. Resources<br />
are made up of type, title and series of attributes.
<h2>2. Puppet Resource File Example</h2>
The following is a basic example on how to view a puppet resource. <br />
In this case, the puppet resource that we are viewing is a file (/etc/nsswitch).
<pre><code>
# puppet resource file /etc/nsswitch.conf
file { '/etc/nsswitch.conf':
ensure => 'file',
content => '{md5}0d6009cdfd12646d251e86303bc0c48c',
ctime => 'Sun May 18 13:20:02 -0400 2014',
group => '0',
mode => '644',
mtime => 'Tue May 04 15:22:21 -0400 2010',
owner => '0',
selrange => 's0',
selrole => 'object_r',
seltype => 'etc_t',
seluser => 'system_u',
type => 'file',
}
</code></pre>
Puppet comes with a number of resource types by default including<br />
types to manage files, services, packages, cron jobs, and filesystems,<br />
among others.<br />
<br />
In the above example, file is the resource type and the /etc/nsswitch.conf<br />
is title of the resource to be managed.<br />
<br />
Everything else is attributes of the resource type and values present<br />
on the attributes. You can also extend puppet to add your own resource<br />
types.<br />
<br />
To view all the resource types available use the following command:<br />
<pre><code>
# puppet resource --types
augeas
computer
cron
exec
file
filebucket
group
host
nagios_hostdepend
..
..
</code></pre>
<h2>3. Puppet Manifest File Example</h2>
Let us take a look how to create a simple manifest file and <br />
execute the puppet command to apply the configuration to<br />
the server.<br />
<br />
The following example creates a simple manifest file site.pp<br />
under /etc/puppet/manifests directory which will create a testfile<br />
under /var/tmp.<br />
<br />
Initially, as we see below, we don't have the test file.
<pre><code>
# ls -ld /var/tmp/testfile
ls: cannot access /var/tmp/testfile: No such file or directory
</code></pre>
The following is the resource declaration inside the manifest <br />
(site.pp) file:
<pre><code>
# cat site.pp
file { "/var/tmp/testfile":
ensure => "present",
owner => "root",
group => "root",
mode => "664",
content => "This is a test file created using puppet.
Puppet is really cool",
}
</code></pre>
For demo purposes, we are running the puppet master and<br />
agent on the same node.<br />
<br />
When you run the puppet apply command for first time with --noop option,<br />
this will do a dry-run without actually applying the configuration.<br />
<pre><code>
# puppet apply site.pp --noop
Notice: Compiled catalog for pemaster.mydomain.com in environment production in 0.06 seconds
Notice: /Stage[main]/Main/File[/var/tmp/testfile]/ensure: current_value absent, should be present (noop)
Notice: Class[Main]: Would have triggered 'refresh' from 1 events
Notice: Stage[main]: Would have triggered 'refresh' from 1 events
Notice: Finished catalog run in 0.03 seconds
</code></pre>
The above you to see what new configuration will do without <br />
actually making changes to the node.<br />
<br />
Now, execute the command without --noop option to really apply<br />
the configuration as shown below.
<pre><code>
# puppet apply site.pp
Notice: Compiled catalog for pemaster.mydomain.com in environment production in 0.07 seconds
Notice: /Stage[main]/Main/File[/var/tmp/testfile]/ensure: created
Notice: Finished catalog run in 0.05 seconds
</code></pre>
Once it is executed successfully, you will see the new temp file is<br />
created under /var/tmp/testfile with the contents defined in site.pp.
<pre><code>
# ls -ld /var/tmp/testfile
-rw-rw-r--. 1 root root 69 Jun 26 14:25 /var/tmp/testfile
# cat /var/tmp/testfile
This is a test file created using puppet.
Puppet is really cool
</code></pre>
<h2>4. Control a Service on a Remote Node using Puppet</h2>
Here is an example to change service from stopped state to<br />
running state on the agent nodes.<br />
<br />
When this configuration manifest is saved in the master server<br />
under a specific location under puppet configuration directory,<br />
the agent running on all the nodes contacts the master node and<br />
fetches the configuration and applies it on all the client nodes so<br />
this way the service would be started on all the agent nodes after<br />
the puppet configuration is executed successfully.
<pre><code>
# puppet resource service multipathd
service { 'multipathd':
ensure => 'stopped',
enable => 'false',
}
</code></pre>
In this example, we will control the service multipathd. You can use<br />
puppet to control any services that are running on the system. For<br />
example, httpd, mysqld, etc.
<pre><code>
# puppet resource service multipathd > site.pp
</code></pre>
Make sure the site.pp has the following values. If not, edit it accordingly.
<pre><code>
# vi site.pp
service { 'multipathd':
ensure => 'running',
enable => 'true',
}
</code></pre>
First do a dry-run to make sure it works as expected.
<pre><code>
# puppet apply site.pp --noop
Notice: Compiled catalog for pemaster.mydomain.com in environment production in 0.07 seconds
Notice: /Stage[main]/Main/Service[multipathd]/ensure: current_value stopped, should be running (noop)
Notice: Class[Main]: Would have triggered 'refresh' from 1 events
Notice: Stage[main]: Would have triggered 'refresh' from 1 events
Notice: Finished catalog run in 0.06 seconds
</code></pre>
Finally, apply the configuration file, which will start the service <br />
(in this example multipathd), if it is not already running.
<pre><code>
# puppet apply site.pp
Notice: Compiled catalog for pemaster.mydomain.com in environment production in 0.07 seconds
Notice: /Stage[main]/Main/Service[multipathd]/ensure: ensure changed 'stopped' to 'running'
Notice: Finished catalog run in 0.28 seconds
# puppet resource service multipathd
service { 'multipathd':
ensure => 'running',
enable => 'true',
}
# chkconfig --list | grep multipath
multipathd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
</code></pre>
<h2>5. Install a Package on a Remote Node using Puppet</h2>
You can do package installation on all the agent nodes remotely <br />
using puppet.<br />
<br />
The following is a sample manifest file for package installation.
<pre><code>
# cat site.pp
package { 'httpd':
ensure => 'present',
}
</code></pre>
In this example, it will install Apache package httpd if it is not <br />
present on the remote site. As you see below, it installed the<br />
package.
<pre><code>
# puppet apply site.pp
Notice: Compiled catalog for pemaster.mydomain.net in environment production in 0.70 seconds
Notice: /Stage[main]/Main/Package[httpd]/ensure: created
Notice: Finished catalog run in 79.97 seconds
</code></pre>
Verify that the package is installed properly using rpm command.
<pre><code>
# rpm -qa | grep -i httpd
httpd-2.2.15-39.el6.centos.x86_64
httpd-tools-2.2.15-39.el6.centos.x86_64
</code></pre>
<h2>6. Two Types of Puppet Collections</h2>
Resources can configure the characteristics of single configu-<br />
ration items on nodes. But, most services and applications are<br />
made up of multiple resources.<br />
<br />
For example, a web server consists of the software package, <br />
users to run the software, and a variety of configuration, log-<br />
ging, and other files.<br />
<br />
Resources collections allows you to gather the resources, <br />
assign them to collection and have the collection applied to<br />
the agent nodes.<br />
<br />
There are 2 types of resource collection:
<ul>
<li>Classes</li>
<li>Definitions</li>
</ul>
<h2>7. Puppet Class Collection Example</h2>
A class is a collection of resources that represents single <br />
configuration item on your node whereas definition is col-<br />
lection of configuration items that have multiple represen-<br />
tations on your node.<br />
<br />
In the previous example after the package installation the <br />
services are not started by default. We can create a simple<br />
manifest with class to install the package and start the <br />
service after installation.<br />
<br />
In the following example we specified the relationship between two resources using require attribute.
<code><pre>
# cat site.pp
class apache {
package { 'httpd':
ensure => 'present',
}
service {'httpd':
ensure => 'running',
require => Package["httpd"],
}
}
include apache
</code></pre>
This ensure that the condition is met before the resource <br />
changes gets applied. In this case service httpd requires the<br />
httpd package to be installed first before it can attempt to<br />
bring up the services.
<pre><code>
# puppet apply site.pp
Notice: Compiled catalog for pemaster.mydomain.net in environment production in 0.93 seconds
Notice: /Stage[main]/Apache/Package[httpd]/ensure: created
Notice: /Stage[main]/Apache/Service[httpd]/ensure: ensure changed 'stopped' to 'running'
Notice: Finished catalog run in 32.82 seconds
# chkconfig --list | grep http
httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
# rpm -qa | grep -i http
httpd-2.2.15-39.el6.centos.x86_64
httpd-tools-2.2.15-39.el6.centos.x86_64
</code></pre>
<h2>8. Puppet Definition Collection Example</h2>
A definition is a type of puppet resource collection.<br />
<br />
Definitions should be used for configuration items that<br />
have multiple instances on a node.<br />
<br />
For example, the httpd server may have multiple virtual<br />
hosts defined. You can create a definition to configure<br />
virtual hosts and pass in appropriate arguments to configure<br />
each. As long as each set of arguments was different, puppet<br />
would configure the new virtual host every time the definition<br />
was evaluated.<br />
<br />
The following is an example of a simple manifest with a class and definition.
<pre><code>
# cat site1.pp
class testdefine {
define testdefine ($data) {
file {"$title":
ensure => file,
content => $data,
}
}
testdefine {'/var/tmp/puppetfile1':
data => "The name of the file is puppetfile1 and it is created by puppet\n",
}
testdefine {'/var/tmp/puppetfile2':
data => "The name of the file is puppetfile2 and it is created by puppet\n",
}
testdefine {'/var/tmp/puppetfile3':
data => "The name of the file is puppetfile3 and it is created by puppet\n",
}
}
include testdefine
</code></pre>
Execute the above puppet class and definition manifest as shown below.
<pre><code>
# puppet apply site1.pp
Notice: Compiled catalog for pemaster.mydomain.net in environment production in 0.24 seconds
Notice: /Stage[main]/Testdefine/Testdefine::Testdefine[/var/tmp/puppetfile2]/File[/var/tmp/puppetfile2]/ensure: defined content as '{md5}9079bd9c7650ae7d503c7df1a68bb9f0'
Notice: /Stage[main]/Testdefine/Testdefine::Testdefine[/var/tmp/puppetfile3]/File[/var/tmp/puppetfile3]/ensure: defined content as '{md5}75d495f0d3180b1f2dd052ac208d81fe'
Notice: /Stage[main]/Testdefine/Testdefine::Testdefine[/var/tmp/puppetfile1]/File[/var/tmp/puppetfile1]/ensure: defined content as '{md5}1fa93f1f2b82f8358866d58b2cb2f0b4'
Notice: Finished catalog run in 0.19 seconds
# ls -l /var/tmp/puppetfile*
-rw-r--r--. 1 root root 64 Jun 26 19:11 /var/tmp/puppetfile1
-rw-r--r--. 1 root root 64 Jun 26 19:11 /var/tmp/puppetfile2
-rw-r--r--. 1 root root 64 Jun 26 19:11 /var/tmp/puppetfile3
# cat /var/tmp/puppetfile*
The name of the file is puppetfile1 and it is created by puppet
The name of the file is puppetfile2 and it is created by puppet
The name of the file is puppetfile3 and it is created by puppet
</code></pre>
<h2>9. Puppet Node Configuration File Example</h2>
So far we have seen defining resources and collections of <br />
resources in form of classes and definitions.<br />
<br />
Now the next step is how to assign these resources and <br />
collections to clients.<br />
<br />
Here is an example how the nodes are defined in node.pp.<br />
<br />
Puppet uses this file to determine which class(contains resources)<br />
should go to which server, for example, on client 1 you want to run<br />
the class httpd which contains resources like httpd package, httpd <br />
service & on client 2 you want to run the class ngnix which contains <br />
resources like ngnix package, ngnix service & other ngnix configuration<br />
files.<br />
<br />
The following sample nodes.pp file explains this:
<pre><code>
node 'puppetclient1.mydomain.net' {
include httpd_class
}
node 'puppetclient2.mydomain.net' {
include ngnix_class
}
node default {
package { "perl":
ensure => present }
}
</code></pre>
Inside your node definition, you can add resources, classes and <br />
definitions.<br />
<br />
Classes are added using the include function.<br />
<br />
In puppetclient1.mydomain.net we have included httpd_class and <br />
in puppetclient2.mydomain.net we have included ngnix_class.<br />
<br />
You can also include multiple class with a single include function. <br />
If no node definition is matched, then it takes the default values <br />
defined. In this case, if there is any other nodes it will just install<br />
perl packages if it is not present.
<h2>10. Import Puppet Manifest Files</h2>
The resources, classes, and definitions are stored in manifest files.<br />
<br />
A special manifest file, called the site manifest, is at the core of our<br />
configuration.<br />
<br />
When starting the Puppet master daemon, the site manifest file, by<br />
default located in /etc/puppet/manifests/site.pp, needs to be present.<br />
<br />
In the above examples, we used site.pp just to explain how to apply<br />
the manifests.<br />
<br />
In a real puppet environment your site.pp will have only the below <br />
contents and from this file the other files are imported for execution.
<pre><code>
# cat site.pp
import "templates.pp"
import "nodes.pp"
import "classes/*"
import "groups/*"
import "users/*"
import "os/*"
</code></pre>
The following is the puppet manifest directory structure:
<ul>
<li>/manifests/classes/ – Directory containing all classes</li>
<li>/manifests/site.pp – the primary manifest file</li>
<li>/manifests/templates.pp – Contains template nodes</li>
<li>/manifests/nodes.pp – Contains node definitions</li>
<li>/manifests/definitions/ – Contains all definitions</li>
<li>/manifests/groups/ – Contains manifests configuring groups</li>
<li>/manifests/os/ – Contains classes designed to configure nodes with particular operating systems</li>
<li>/manifests/users/ – Contains manifests configuring users</li>
<li>/manifest/files/ – Contains file server modules for Puppet distributable files</li>
</ul>
<br />
<h2>Anmerkung von Leser:</h2>
satan August 20, 2015, 4:06 am<br />
<br />
Hi,<br />
<br />
First of all, great tutorial, as usual. <br />
One thing, according to official manual using „import“ is deprecated:<br />
<code>
(root@puppet.test.local manifests)# puppet parser validate site.pp<br />
Warning: The use of „import“ is deprecated at /etc/puppet/manifests/site.pp:2. See here.<br />
(at /usr/lib/ruby/site_ruby/1.8/puppet/parser/parser_support.rb:110:in 'import')<br />
</code><br />
<br />
Regards!<br />
<br />
<h2>Hinweis</h2>
<ul>
<li>Die Heinlein-Akademie bietet mehrere aufeinander aufbauende Kurse / Seminare an.</li>
<li>Auf der Seite puppet.com gibt es eine VM zum Arbeiten/Lernen von Puppet.</li>
</ul>
Link:<br />
http://www.thegeekstuff.com/2015/07/puppet-configuration-examples<br />
<br />
</html>
<html>
Wenn der Key mit Openssh generiert wurde, <br />
muss man den mit <b>puttygen</b> in das Putty‐<br />
Format importieren.
<h3>Links:</h3>
<ul>
<li><a href="https://www.linuxforen.de/forums/showthread.php?229429-OpenSSH-Public-Keyfile-in-Putty-importieren" target=_blank>linuxforen.de :: OpenSSH-Public-Key in Putty importieren</a></li>
</ul>
</html>
<html>
<h2>10 PuTTY PLINK Examples to Automate Remote Linux Commands from Windows Batch Files</h2>
PuTTY PlinkPlink stands for PuTTY Link.
<p>
Plink is a companion command-line utility for PuTTY.
</p>
On a very high-level:
<ul>
<li> Use PuTTY for interactive SSH session from your Windows to Linux Servers</li>
<li> Use Plink for non-interactive SSH session to execute remote linux commands for automation purpose from your Windows</li>
</ul>
In this tutorial, we'll discuss the following:
<ol>
<li> Launch plink from Command Prompt</li>
<li> Plink Interactive SSH Session</li>
<li> Plink Non-Interactive SSH Session to execute a Remote Command</li>
<li> Execute Multiple Linux Commands from a Windows File</li>
<li> Specify Connection Protocol</li>
<li> Specify SSH Password as Plink Argument</li>
<li> Debug Plink Issues</li>
<li> Specify SSH Port as Plink Option</li>
<li> Plink Log Files for SSH Connections</li>
<li> Specify SSH Protocol (SSH-1 or SSH-2)</li>
<li> Specify IP Protocol (IPv4 or IPv6)</li>
<li> Use Private Key File for Authentication with Plink</li>
<li> Additional Enable and Disable Options for Plink SSH</li>
<li> Fingerprint and HostKey with Plink</li>
<li> Plink -batch option for Windows Batch Files</li>
</ol>
First, download plink executable from here.
If you don't have PuTTY already installed on your machine, make sure you also download putty executable along with plink.
If you have a 32-bit Windows laptop, make sure you download the 32-bit version of plink. If not, download the 64-bit version.
<h3>1. Launch plink from Command Prompt</h3>
You can't just double-click on plink.exe to launch it. Since this is a command-line only utility (Without GUI), you should first launch your Windows command prompt.
For this, click on start menu on your windows, and type “cmd.exe“ in the search box and press enter, this will launch the Windows command prompt.
Also, depending on where you have downloaded the plink.exe, you may have to modify the Windows's PATH variable accordingly.
Go to your “System properties“ windows, click on “Environment Variables“, select Path variable, and append the directory where the plink.exe is located here.
Or, you can just set your PATH variable as shown below. In the following example, I've downloaded the plink.exe to C:\Downloads directory.
set PATH=%PATH%;C:\Downloads
Next, type plink in the command prompt, this will display the various options available.
<h3>2. Plink Interactive SSH Session</h3>
The following is the basic syntax for plink:
plink [options] connection [command]
In the above syntax:
options – You can pass various options to plink. This is optional.
connection – This will have the connection information of the Linux server that you want to connect to. Various connection methods are explained in the examples below.
command – This is the command that should be executed on the remote Linux server. This is optional.
While the command is optional, when you don't give it, it will display a raw interactive session, which will have lot of non-printable non-readable character on the screen. As explained earlier, plink is not meant to be used as interactive session. Use putty for interactive session.
For now, let us see various methods to use the connection.
First, you can just give the ip-address of the remote-server. This will then ask for the username and password to login.
C:\>plink 192.168.101.1
login as: root
root@192.168.101.1's password:
Or, you can also use the username using @ symbol as shown below. This will ask only for the password, as we've specified the username.
C:\>plink root@192.168.101.1
Using username "root".
root@192.168.101.1's password:
You can also pass the username using -l option as shown below:
C:\>plink 192.168.101.1 -l mysql
You can also use the name of an existing putty session. In this example, I'm using the existing saved putty session called “devdb“. This is the recommended way of using, as you can bring all the configuration information from PuTTY to here for this particular “devdb“ session.
C:\>plink devdb
Using username "root".
root@192.168.101.1's password:
The following -load is exactly the same as above.
C:\>plink -load devdb
Using username "root".
root@192.168.101.1's password:
As you see below, once you login, you'll get a command-prompt. But, doing anything here will display some non user-friendly characters.
C:\>plink devdb
Using username "root".
root@192.168.101.1's password:
?]0;root@devdb:~[root@devdb ~]#
?]0;root@devdb:~[root@devdb ~]#
?]0;root@devdb:~[root@devdb ~]# ?[Kls -altr
total 326432
drwx------. 2 root root 4096 Jan 23 2016 ?[01;34m.ssh?[0m
drwxr-xr-x. 2 root root 4096 May 9 2016 ?[01;3Documents?[0m
drwxr-xr-x. 2 root root 4096 May 8 12:41 ?[01;3Downloads?[0m
?[m?]0;root@devdb:~[root@devdb ~]#
Again, for interactive SSH session, please use PuTTY.
On a related note, even if you've been using PuTTY for a while, you might find few tips from here helpful: 10 Awesome PuTTY Tips and Tricks You Probably Didn't Know
<h3>3. Plink Non-Interactive SSH Session to execute a Remote Command</h3>
Using plink, from windows, you can execute a command on the Linux server without any user interaction and just display the output.
For this, pass the command as the last argument to the plink as shown below.
In the following example, it will execute “crontab -l“ command on the remote server and display the output.
C:\>plink root@192.168.101.1 crontab -l
no crontab for root
If you want to execute multiple commands, then group them together as shown below.
C:\>plink root@192.168.101.1 (hostname;crontab -l)
devdb.thegeekstuff.com
no crontab for root
The following will execute the db-backup.sh shellscript on the remote Linux server. But, you are initiating this from your Windows machine.
plink mysql@192.168.101.1 /root/bin/db-backup.sh
Few points to keep in mind:
If the above command is asking for password, and if you don't want that to happen, you should setup the public-private key authentication appropriately so that remote Linux server doesn't ask for password.
You can also pass the password as a command-line option to plink as shown in one of the examples below.
Also, if the above displays an error message about invalid protocol, then you should pass the appropriate protocol as shown in the next example.
<h3>4. Execute Multiple Linux Commands from a Windows File</h3>
Instead of specifying all the commands to be executed on the remote Linux server in the plink command-line, you can also put them in a text file and specify the file as a parameter to the plink.
For example, create the following file called commands.txt on your Windows.
C:\>type commands.txt
hostname
service mysql stop
yum -y install httpd
service mysql start
service httpd start
crontab -l
Now to execute all of the above commands on the remote Linux server one-by-one in a sequence, execute the following plink command on your Windows laptop.
C:\>plink root@192.168.101.1 -m C:\commands.txt
<h3>5. Specify Connection Protocol</h3>
Plink allows the following protocols: SSH, Telnet, Remote Login (rlogin), Raw, Serial Connection
The most popular and the default is SSH. Use -ssh as shown below.
C:\>plink -ssh root@192.168.101.1
For Telnet:
C:\>plink -telnet root@192.168.101.1
For Remote Login using rlogin:
C:\>plink -rlogin root@192.168.101.1
For Raw:
C:\>plink -raw root@192.168.101.1
SSH-2.0-OpenSSH_5.3
If you are trying to specify a particular protocol, and if you are getting “FATAL ERROR: Network error: Connection refused“ error, it means that the remote server doesn't support the specified protocol.
If you don't want to specify the protocol on the command line:
You can use a saved PuTTY session which already has the protocol defined for that particular session.
Or, you can use Windows env variable called PLINK_PROTOCOL and set the value accordingly, which will be used by plink.
<h3>6. Specify SSH Password as Plink Argument</h3>
If you don't have the key based authentication setup, then you can pass the password as a parameter in the command-line. Needless to say this method is not recommended.
This will connect to the server as root using the password specified by the -pw option, and execute all the given Linux commands and display the output on your Windows command-prompt.
C:\>plink root@192.168.101.1 -pw SecretRootPwd (date;hostname;ls -l)
Of course, the easy method is to use a saved putty session (For example, devdb) instead of specifying the username and ip-address as shown below.
C:\>plink devdb -pw SecretRootPwd (date;hostname;ls -l)
<h3>7. Debug Plink Issues</h3>
First, make sure you have the latest version of plink. Use -V option (upper-case V) as shown below. The current stable release is 0.69
C:\>plink -V
plink: Release 0.69
Build platform: 64-bit Windows
Compiler: Visual Studio 2015 / MSVC++ 14.0 (_MSC_VER=1900)
Source commit: b1829b81b5c0d12dcc91f6b50b0b4d83c3df6a8e
Next, use -v option (lower-case v) as show below for more verbose output.
C:\>plink -v devdb service httpd restart
Connecting to 192.168.101.1 port 22
We claim version: SSH-2.0-PuTTY_Release_0.69
Server version: SSH-2.0-OpenSSH_5.3
We believe remote version has SSH-2 channel request bug
Using SSH protocol version 2
Doing Diffie-Hellman group exchange
Doing Diffie-Hellman key exchange with hash SHA-256
Server also has ssh-dss host key, but we don't know it
Host key fingerprint is:
ssh-rsa 2048 2f:d2:c1:7f:db:a1:16:21:d2:f4:31:f9:ae:96:be:89
Initialised AES-256 SDCTR client->server encryption
Initialised HMAC-SHA1 client->server MAC algorithm
Initialised AES-256 SDCTR server->client encryption
Initialised HMAC-SHA1 server->client MAC algorithm
Using username "root".
Using SSPI from SECUR32.DLL
Attempting GSSAPI authentication
GSSAPI authentication request refused
Sent password
Access granted
Opening session as main channel
Opened main channel
Started a shell/command
..
Server sent command exit status 0
Disconnected: All channels closed
<h3>8. Specify SSH Port as Plink Option</h3>
By default for SSH, it will connect to port 22. But, on your Linux server if SSH is configured to run on a different port, then use -P option in plink to specify the port.
In the following example, plink will connect to the remote Linux server on port 25.
C:\>plink root@192.168.101.1 -P 25 crontab -l
When you use a saved PuTTY session and -P option, instead of using the port from the saved session, it will use the given Port.
C:\>plink devdb -P 25 crontab -l
<h3>9. Plink Log Files for SSH Connections</h3>
For the SSH protocol in Plink, there are couple of useful logging options.
The following –sshlog option will save the logs in the given file (sshlog.txt).
C:\>plink devdb -sshlog sshlog.txt (date;hostname;ls -l)
This is the partial content of the sshlog.txt output
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2017.05.11 11:40:57 =~=~=~=~=~=~=~=~=~=~=~=
Event Log: Writing new session log (SSH packets mode) to file: sshlog.txt
Event Log: Connecting to 192.168.101.1 port 22
Event Log: We claim version: SSH-2.0-PuTTY_Release_0.69
Event Log: Server version: SSH-2.0-OpenSSH_5.3
Event Log: We believe remote version has SSH-2 channel request bug
Event Log: Using SSH protocol version 2
Outgoing packet #0x0, type 20 / 0x14 (SSH2_MSG_KEXINIT)
00000000 ed 8e ff c9 d3 67 cf 95 0e 8f 1a 4d 6d 65 6f 25 .....g.....Mmeo%
00000010 00 00 00 f0 63 75 72 76 65 32 35 35 31 39 2d 73 ....curve25519-s
......
Outgoing packet #0xc, type 96 / 0x60 (SSH2_MSG_CHANNEL_EOF)
00000000 00 00 00 00 ....
Outgoing packet #0xd, type 97 / 0x61 (SSH2_MSG_CHANNEL_CLOSE)
00000000 00 00 00 00 ....
Event Log: Disconnected: All channels closed
For more detailed log, use -sshrawlog option. Please note that the filesize of this will be larger than the above, as this will store lot more information in the log file.
Also, this will take longer to execute than the above command, as sshrawlog option collects more log information than regular sshlog option.
C:\>plink devdb -sshrawlog sshrawlog.txt (date;hostname;ls -l)
<h3>10. Specify SSH Protocol (SSH-1 or SSH-2)</h3>
By default, it will use SSH-2 protocol, which can also be specified using -2 option as shown below.
C:\>plink devdb -2 (hostname;ls -l)
devdb.thegeekstuff.com
total 326380
For SSH-1 protocol, use -1 option as shown below. If your server doesn't support it, you'll get the following error.
C:\>plink devdb -pw -1 (hostname;ls -l)
FATAL ERROR: SSH protocol version 1 required by our configuration but not provided by server
<h3>11. Specify IP Protocol (IPv4 or IPv6)</h3>
By default, it will use IPv4, which can also be specified using -4 option as shown below.
C:\>plink devdb -4 (hostname;ls -l)
To use IPv6, use-6 option as shown below.
C:\>plink devdb -6 (hostname;ls -l)
<h3>12. Use Private Key File for Authentication with Plink</h3>
Use -i option to specify the location of the private key file that should be used for authentication.
In the following example, it will use the devdb.ppk file from C:\Downloads directory.
C:\>plink -i "C:\Downloads\devdb.ppk" root@192.168.101.1 hostname
Note: You'll get “Server refused our key“, if the given key is not properly configured to be used with your Linux Server.
If the key file is not found (for example, when you give a wrong directory name), you'll get the following error:
C:\>plink -i "D:\Data\devdb.ppk" root@192.168.101.1 hostname
Unable to use key file "C:\Users\ramesh\Downloads\devdb.ppk" (unable to open file)
root@192.168.101.1's password:
If you specify a Key what is not of proper format, you'll get the following error message.
C:\>plink -i "C:\Downloads\devdb.key" root@192.168.101.1 hostname
Unable to use key file "C:\Downloads\devdb.key" (OpenSSH SSH-2 private key (old PEM format))
<h3>13. Additional Enable and Disable Options for Plink SSH</h3>
You can also use the following plink SSH options:
-X to enable X11 forwarding
-X to disable X11 forwarding
-A to enable agent forwarding
-a to disable agent forwarding
-t to enable pty allocation
-T to disable pty allocation
-noagent to disable use of Pageant
-agent to enable use of Pageant
-C to enable compression
<h3>14. Fingerprint and HostKey with Plink</h3>
Use -pgpfp option which will display the PGP fingerprint details for PuTTY. Typically you can use this to establish trust from plink.exe executable to another program or executable that you are trying to connect to.
C:\>plink -pgpfp
PuTTY Master Key as of 2015 (RSA, 4096-bit):
440D E3B5 B7A1 CA85 B3CC 1718 AB58 5DC6 0467 6F7C
Original PuTTY Master Key (RSA, 1024-bit):
8F 15 97 DA 25 30 AB 0D 88 D1 92 54 11 CF 0C 4C
Original PuTTY Master Key (DSA, 1024-bit):
313C 3E76 4B74 C2C5 F2AE 83A8 4F5E 6DF5 6A93 B34E
Also, you can use hostkey in the plink to connect to the remote server accordingly using -hostkey option.
C:\>plink devdb -hostkey aa:dd:b1:f1:f8:00:4c:36:63:ec:cf:92:16:e6:df:26 hostname
<h3>15. Plink -batch option for Windows Batch Files</h3>
If you are running plink inside a Windows batch file, then it is recommended that you use -batch option.
C:>plink -batch devdb [complex-linux-command]
In the above example, if the complex-linux-command fails, or asking for an input from the user, or hangs, etc, then your Windows Batch script will not be waiting. Instead, plink will just abandon the command, and the batch script will fail.
This is probably what you would expect to happen instead of your windows batch file job just waiting or hanging.
So, use -batch option in plink when you are writing Windows batch scripts using plink.
<p>
Link:<br />
<a href="http://www.thegeekstuff.com/2017/05/putty-plink-examples/">http://www.thegeekstuff.com/2017/05/putty-plink-examples/ </a>
</p>
</html>
<html>
<ul>
<li>Python ist ein eine “hybride“ Sprache (wie Java);</li>
<br />
<li>i.d.R. wird der Code interpretiert (im .py‐File);</li>
<br />
<li>Wird ein Code mehrfach benötigt und aufgerufen, so wird<br />
er kompiliert und in einem File mit der Endung “.pyc“ abgelegt;</li>
<br />
<li>In Python 3 werden diese .pyc-Files im Verzeichnis “__pycache__“<br />
abgespeichert</li>
<br />
<li>In Python 2 werden diese Files im Arbeitsverzeichnis abgelegt.</li>
<br />
<li>für gewöhnlich handelt es sich um Module;</li>
</ul>
</html>
<html>
<ol>
<li><details>
<summary><b>Ternärer Operator</b></summary>
Statt
<code><pre>
if condition:
x = 1
else:
x = 0</pre></code>
kann man auch schreiben:
<code><pre>x = 1 if condition else 0</pre></code></details></li>
<li><details>
<summary><b>Working with large numbers (1000er Trennzeichen)</b></summary>
(mit Python 3.6 eingeführt)<br />
Die Lesbarkeit großer Zahlen wie
<code><pre>num1 = 10000000000
num2 = 1000000</pre></code>
kann man durch ein Underscore an den 1000er Stellen verbessern:
<code><pre>num1 = 10_000_000_000
num2 = 1_000_000</pre></code>
Dies hat <b>keinen</b> Einfluß auf die Berechnung.<br />
Als Trennzeichen man kann <em>nur</em> das Underscore nehmen, der deutsche Punkt geht nicht.<br />
Die Position im String ist unerheblich, man könnte es auch so schreiben:
<code><pre>num1 = 100_00_00_00_00</pre></code>
<br />
Soll bei der Ausgabe ein 1000er Trennzeichen (z.B. ein Komma) mit ausgegeben werden, <br />
so muss der String dementsprechend formatiert werden:
<code><pre>
print(f'{num1: ,}')</pre></code>
Die deutsche Notation mit einem Punkt funktioniert nicht, da Python dann auf einen Fehler läft;</details></li>
<li><details>
<summary><b>Resource handling (mit einem Context Manager)</b></summary>
Statt<code><pre>
f = open('test.txt','r')
file_contents = f.read()
f.close()
</pre></code>
sollte man besser schreiben:
<code><pre>with open('test.txt','r') as f:
file_contents = f.read()
</pre></code></details></li>
<li><details>
<summary><b>enumerate()</b></summary>
<code><pre>
names = ['Christine', 'Susanne', 'Bettina', 'Anna']
for index, value in <b>enumerate</b>(names, start=1):
print (index, value)
</pre></code>
Der Rückgabewert von enumerate ist ein Tupel;<br />
Default-Startwert ist 0, mit “<code><b>start</b></code>“ kann ein anderer Start-Wert definiert werden;</details></li>
<li><details>
<summary><b>zip()</b></summary>
Damit lassen sich zwei Listen miteinander “verbinden“:
<code><pre>
names = ['Peter Parker', 'Clark Kent', 'Wade Wilson', 'Bruce Wayne']
superheros = ['Spiderman', 'Superman', 'Deadpool', 'Batman']
for name, hero in <b>zip</b>(names, heroes):
print(f'{name} is actually {hero}')
</pre></code>
Die Ausgabe ist dann:<code><pre>
Peter Parker is actually Spiderman
Clark Kent is actually Superman
Wade Wilson is actually Deadpool
Bruce Wayne is actually Batman
</pre></code>
Dies funktioniert auch mit mehr als zwei Listen;<br />
Hier sind die Listen gleich lang. Sind sie unterschiedlich lang, so endet “<code><b>zip()</b></code>“ mit der kürzesten der Listen;
</details></li>
<li><details>
<summary><b>Unpacking - Arbeitsweise</b></summary>
Unpackt man eine Liste oder ein Tupel, und benötigt aber nicht alle Werte,<br />
so kann man mit “<code><b>_</b></code>“ Python anweisen, diesen Wert zu ignorieren. <br />
Sind es mehr als ein Wert, so gibt man als Prefix<br />
zum Underscore den “<code><b>splat-Operater (*) </b></code>“ mit an;
<code><pre>
a, b, *_, d = (1, 2, 3, 4, 5, 6, 7)
</pre></code>
Danach haben die Variablen folgende Werte:
<code><pre>
a = 1
b = 2
*_ = [3, 4, 5, 6]
d = 7
</pre></code>
Die dazugehörigen Print-Statements sind nur für “<code><b>a</b></code>“, “<code><b>b</b></code>“ und “<code><b>d</b></code>“ möglich / notwendig;
</details></li>
<li><details>
<summary><b>Setting attributes for a certain object</b></summary>
In Python ist es möglich, dynamisch Werte und Attribute zu Objekten hinzuzufügen;
<code><pre>
class Person():
pass
p = Person()
p.first_name = 'Jens'
p.last_name = 'Mueller'
</pre></code>
Es werden folgende Methoden benötigt:
<code><pre>
settattr <em># Setzen eines Attributs einer Klasse</em>
getattr <em># Abfragen eines Attributs einer Klasse</em>
</pre></code></details></li>
<li><details>
<summary><b>Inputting secret information (“password“)</b></summary>
Python hat eine built-in function mit Namen “<code><b>getpass</b></code>“ (aus dem Modul <code><b>getpass</b></code>);
<br />
Mit dem nachfolgenden Code:<code><pre>
username = input('Username: ')
password = input('Password: ')
</pre></code>
ist jede Eingabe, und somit auch das Passwort, für jeden sichtbar.<br />
<br />
Mit der <code><b>getpass</b></code>-Funktion ist das sicherer:
<code><pre>
from getpass import getpass
username = input('Username: ')
password = getpass('Password: ')
</pre></code>
Bei der Eingabe werden Dots angezeigt, so daß das Password <b><em>nicht</em></b> angezeigt und mitgelesen werden kann.<br />
</details></li>
<li><details>
<summary><b>Pythons “<code><b>‐m</b></code>“ - Option</b></summary>
Aufruf-Beispiel:<code><pre>
python ‐m smtpd -c DebuggingServer -n localhost:1025
</pre></code>
Bei Aufruf mit der Option “<code><b>‐m</b></code>“ durchsucht Python die in der<br />
Variablen <b><code>sys.path</b></code> angegebenen Verzeichnisse nach dem<br />
angegebenen Modul (hier: smtpd). Da unser aktuelles Ver‐<br />
zeichnis (ebenfalls) in dieser Variablen hinterlegt ist, kann<br />
man selbstgeschriebene Programme (hier: password.py), <br />
die sich im aktuellen Verzeichnis befinden, ebenfalls auf‐<br />
rufen mit:
<code><pre>
python ‐m password
</pre></code>
</details></li>
<li><details>
<summary><b></b></summary>
<code><pre>Video Timestamp 33:30
</pre></code></details></li>
</ol>
<h3>Link:</h3>
<a href="https://www.youtube.com/watch?v=C-gEQdGVXbk" target=_blank>Corey Schaffer :: Youtube - 10 Python Tips and Tricks For Writing Better Code</a>
</html>
<html>
For loop is an essential aspect of any programming language.
In python, for loop is very flexible and powerful.
In this tutorial, we've explained the following Python for loop examples.
<ol>
<li><a href="#01">Python For Loop for Numbers</a></li>
<li><a href="#02">Python For Loop for Strings</a></li>
<li><a href="#03">Python For Loop Using Default Range Function</a></li>
<li><a href="#04">Python For Loop With Custom Start and End Numbers</a></li>
<li><a href="#05">Python For Loop With Incremental Numbers</a></li>
<li><a href="#06">Python For Loop Range with Negative Values</a></li>
<li><a href="#07">Continue Statement Inside Python For Loop</a></li>
<li><a href="#08">Break Statement Inside Python For Loop</a></li>
<li><a href="#09">Can a For Loop itself have an Else without If?</a></li>
<li><a href="#10">Else and Break Combination Behavior Inside Python For</a></li>
<li><a href="#11">Nested For Loops in Python</a></li>
<li><a href="#12">Handling List-of-Lists in Python For Loop</a></li>
</ol>
The following is the general syntax for the python for loop:
<code><pre>
for {variable} in {some-sequence-type}:
{python-statements}
else:
{python-statements}
</pre></code>
In python, the for loop can iterate through several sequence types such as lists, strings, tuples, etc.
<h3><a id="01">1. Python For Loop for Numbers</a></h3>
To loop through a list of numbers, we just have to create a list of numbers and pass it as an argument to the for loop as shown below.
<code><pre>
# cat for1.py
for i in [1, 2, 3, 4, 5]:
print(i)
</pre></code>
In the above example:
It will loop through all the numbers in the given list (i.e from 1 through 5) and then print them.
Here, we've directly given the list [1, 2, 3, 4, 5] as an argument to the for loop.
The individual items in the list should be separated by comma.
Don't forget to specify the colon [:] at the end of for loop line. This is part of the syntax.
You can also store the list into a variable, and pass that variable as an argument to the for loop.
For every for loop iteration, each value is picked-up from the list and stored in the variable given in the for loop. In this example, the variable is 'i'.
Inside the loop, we have only one statement, which is print, which takes the value from of the individual item from the variable i and prints it.
If you want to execute multiple statements for every iteration of the for loop, then indent them accordingly (i.e put them in the same level as the print command).
The following is the output of the above program:
<code><pre>
# python for1.py
1
2
3
4
5
</pre></code>
<h3><a id="02">2. Python For Loop for Strings</a></h3>
Just list the above list of numbers, you can also loop through list of strings as shown in the following example:
<code><pre>
# cat for2.py
names = ["john", "raj", "lisa"]
for i in names:
print(i)
</pre></code>
In the above example:
We are looping through the three names and printing them out one by one.
'names' ‐ This is the variable which has a list that in-turn contains three string items.
The individual items in the names list should be separated by comma.
Also, make sure you enclose the individual string values in double quotes.
Again, don't forget to put the colon at the end of the for loop statement. This colon is part of the for command syntax.
The following is the output of the above program:
<code><pre>
# python for2.py
john
raj
lisa
</pre></code>
<h3><a id="03">3. Python For Loop Using Default Range Function</a></h3>
In python, when you are dealing with looping through numbers, you can use range function, which is extremely handy.
Range function will produce a list of numbers based on the specified criteria.
In the following example, the argument to the range function is 5. Let us see how this behaves.
<code><pre>
# cat for3.py
for i in range(5):
print(i)
</pre></code>
The following output has printed 5 lines. But, as you see it starts from 0 (instead of 1).
<code><pre>
# python for3.py
0
1
2
3
4
</pre></code>
Note: Again, if you specify range(x), make sure you pay attention to the fact that range function by default will always start with number 0, and then generate 'x' number of numbers.
Note: You can also use xrange instead of range. For our practical purpose, both will behave exactly the same. But, when you are dealing with huge list with has 1000' of items, xrange is recommended, as it is faster. xrange function will generate the numbers that are required on-demand. But, range will generate all the numbers when it is called.
<h3><a id="04">4. Python For Loop With Custom Start and End Numbers</a></h3>
When you don't want to start the number sequence from 0, you can also specify the start-value and the end-value in the range function as shown in the example below.
<code><pre>
# cat for4.py
for i in range(1,6):
print(i)
</pre></code>
In the above example:
range(1,6) ‐ We've specified a start and end value in this range function.
One important thing to under here is the fact that, this will start with number '1'. But, the value the above will print will be only 5 (and not 6).
If you want a sequence of 1 .. n, then your range should be: range(1,n+1).
So, in this example, we wanted sequence from 1 .. 5 and we gave range as range(1,6). i.e the end value is n+1.
The following is the output of the above program. Again, notice how it starts from 1 and prints through 5 (not 6).
<code><pre>
# python for4.py
1
2
3
4
5
</pre></code>
<h3><a id="05">5. Python For Loop With Incremental Numbers</a></h3>
Apart from specifying a start-value and end-value, we can also specify an increment-value.
For example, if you want a sequence like this: 1, 3, 5, 7, 9, … , then the increment-value in this case would be 2, as we are incrementing the next number by 2.
In the following example, we are generating numbers from 1 through 6 with a increment of 2.
<code><pre>
# cat for5.py
for i in range(1,6,2):
print(i)
</pre></code>
The following is the output of the above program.
<code><pre>
# python for5.py
1
3
5
</pre></code>
Again, as you see here when we give 6 as the end-value, it will go only upto 5. In this case we are also incrementing by 2. Just to be clear:
range(1,6,2) ‐ will print 1,3 and 5
range(1,5,2) ‐ will print only 1 and 3
<h3><a id="06">6. Python For Loop Range with Negative Values</a></h3>
In range function inside for loop, we can also specify negative values.
In the example below, we are using negative numbers for end-value (-5) and increment-value (-2).
<code><pre>
# cat for6.py
for i in range(4,-5,-2):
print(i)
</pre></code>
The following is the output of the above program:
<code><pre>
# python for6.py
4
2
0
-2
-4
</pre></code>
As you see from the above output, it sequence started from the start-value (which is 4), and then increment the next number by the increment-value (which is -2), and keeps going all the way through end-value-1.
<h3><a id="07">7. Continue Statement Inside Python For Loop</a></h3>
You can use 'continue' statement inside python for loop. When a for loop encounters 'continue', it will not execute the rest of the statements in that particular for-loop-block, instead it will start the for-loop again for the next element in the list.
The following example shows how the continue statement works inside the for loop.
<code><pre>
# cat for7.py
names = ["john", "lisa", "raj", "lisa"]
for i in names:
if i != "lisa":
continue
print(i)
print("--end--")
</pre></code>
In the above example:
The for loop is looping through a list that has 4 names.
There are two statements in the for-loop-block (if statement, and print statement)
The if statement has 'continue' inside it, which will get executed only when the name is not equal to list.
So, in this case, whenever the name is equal to lisa, then it will execute the 2nd statement (i.e print statement).
But, whenever the name is not equal to lisa, it will go inside the if statement, which has 'continue' statement. This means that it will not execute the rest of the statements in the for loop. i.e It will not execute the print statement. But, this will continue to go to the top of the loop, and start the process for the next item in the list.
Please note that the last print statement is outside the for loop, which will get executed after all the items in the list are processed.
The following is the output of the above program:
<code><pre>
# python for7.py
lisa
lisa
--end--
</pre></code>
<h3><a id="08">8. Break Statement Inside Python For Loop</a></h3>
Just like continue statement, you can also specify 'break'statement inside your for loop in python.
As you can imagine, anytime for loop encounters 'break', then it will completely stop the for loop iteration and exit the for loop. i.e After the 'break' statement, it will not process the remaining items in the for loop list.
The following example shows how the break works.
<code><pre>
# cat for8.py
names = ["john", "lisa", "raj", "lisa"]
for i in names:
if i == "raj":
break
print(i)
print("--end--")
</pre></code>
As you see from the following output, the moment, the name is equal to 'raj', it will exit the for loop. In this case, 'raj' is the 3rd item in the list. So, our for loop printed only the 1st two names.
<code><pre>
# python for8.py
john
lisa
--end--
</pre></code>
<h3><a id="09">9. Can a For Loop itself have an Else without If?</a></h3>
This is a unique feature to Python.
We typically use 'else' only in conjunction with 'if' statement as we've explained earlier. Refer to this: 9 Python if, if else, if elif Command Examples
But, in Python, we can have 'else'in conjunction with 'for'statement also as explained in this example.
Anything inside the else-block for the for-loop will get executed when the for statement fails as shown below.
<code><pre>
# cat for9.py
names = ["john", "raj", "lisa"]
for i in names:
print(i)
else:
print("for loop condition failed!")
</pre></code>
In the above example:
We have used this simple example only to understand how the 'else' works with 'for'.
As you notice, there is no 'if' command here. So, the 'else' is really part of the 'for' command.
The 'else' should be the last line in the for-loop-block.
In this simple example, the for loop will fail only when it process all the items in the list, as it doesn't have any more to process. So, in that case, the 'else' will get executed.
So, whatever we have inside else will be executed after all the items are processed.
The following is the output of the above example:
<code><pre>
# python for9.py
john
raj
lisa
for loop condition failed!
</pre></code>
It might sound like, we might not really need a 'else' inside 'for' if it only gets executed at the end of for loop iteration.
But, the next example will clarify bit more on what is the advantage of 'else' inside for-loop.
<h3><a id="10">10. Else and Break Combination Behavior Inside Python For</a></h3>
In the previous example, we explained how the 'else'inside a for-loop works, which is unique to Python.
One important thing to understand is that when you have a 'break' statement inside your for-loop-block, then the 'else' part will not be executed.
The following example explains the behavior of break and else combination inside a for loop.
<code><pre>
# cat for10.py
names = ["john", "lisa", "raj", "lisa"]
for i in names:
if i == "raj":
break
print(i)
else:
print("for loop condition failed!")
print("--end--")
</pre></code>
As you see from the following ouput, the print command inside the 'else' did not get executed this time, because the for loop encounterd a 'break' and came-out of the loop in-between.
<code><pre>
# python for10.py
john
lisa
--end--
</pre></code>
Note: As you can imagine, 'continue' statement has no impact on 'else' in for-loop. Else will still behave exactly how it is supposed to when the for loop condition fails.
<h3><a id="11">11. Nested For Loops in Python</a></h3>
Just like any other programming languages, in python also you can have nested for loops.
When you combine multiple for loops, it can become very effective.
The following example shows how a nested for loop works.
<code><pre>
# cat for11.py
distros = ["centos", "redhat", "ubuntu"]
arch = ["32-bit", "64-bit"]
for i in distros:
for j in arch:
print(i + " " + j)
print("-----------")
</pre></code>
In the above example:
We have two lists here (i.e distros and arch).
The outer for loop is for distros. So, it will loop through every item in the 'distros' list.
The inner for loop is for 'arch'. So, for every item in the distro list, this inner loop will loop through every item in the 'arch' list.
The individual element in the outer loop is stored in the variable i
The individual element in the inner loop is stored in the variable j
The following is the output of the above example:
<code><pre>
# python for11.py
centos 32-bit
centos 64-bit
-----------
redhat 32-bit
redhat 64-bit
-----------
ubuntu 32-bit
ubuntu 64-bit
-----------
</pre></code>
<h3><a id="12">12. Handling List-of-Lists in Python For Loop</a></h3>
The following example shows how you can use list of lists inside for loop.
<code><pre>
# cat for12.py
multiple_state_lists = [ ["CA","NV","UT"], ["NJ","NY","DE"]]
for state_list in multiple_state_lists:
for state in state_list:
print state
</pre></code>
In the above example:
The outer for-loop is looping through the main list-of-lists (which contain two lists in this example).
The inner for-loop is looping through the individual list themselves.
The following is the output of the above example:
<code><pre>
# python for12.py
CA
NV
UT
NJ
NY
DE
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://www.thegeekstuff.com/2017/07/python-for-loop-examples/" target="_blank" rel="noreferrer noopener">The Geek Stuff :: 12 Essential Python For Loop Command Examples</a></li>
</ul>
</html>
<html>
<p>
Sets are basically collection of certain items that are unordered. There is <br />
no specific order in which they are stored. In Python sets are same, but<br />
there are few differences with basic sets.</p>
<p>
The elements in python sets are unique, there can' be duplicate items<br />
in python sets. If duplicate items entered, it will be ignored and final set <br />
will always contain unique elements.</p>
<p>
Python sets are <b>mutable</b>. But, its elements are <b>immutable</b>. Once<br />
entered items cannot be modified.</p>
<p>
Python set's item cannot be accessed using indexes. There is no index<br />
attached to set items.</p>
This tutorial explains the following examples in Python set:
<ol>
<li><A HREF="#Example_01">Create a Simple Set</A></li>
<li><A HREF="#Example_02">Create a Set with Constructor</A></li>
<li><A HREF="#Example_03">Create an Empty Set</A></li>
<li><A HREF="#Example_04">Create a Set from List</A></li>
<li><A HREF="#Example_05">Create a Set from Tuple</A></li>
<li><A HREF="#Example_06">Access a Specific Value in Set</A></li>
<li><A HREF="#Example_07">Add Items to a Set ‐ ‐ Using Add Method</A></li>
<li><A HREF="#Example_08">Add Items to a Set ‐ ‐ Using Update Method</A></li>
<li><A HREF="#Example_09">Remove Items from Set ‐ ‐ Using Discard Method</A></li>
<li><A HREF="#Example_10">Remove Items from Set ‐ ‐ Using Remove Method</A></li>
<li><A HREF="#Example_11">Union Operation on Sets</A></li>
<li><A HREF="#Example_12">Intersection Operation on Sets</A></li>
<li><A HREF="#Example_13">Difference Operation on Sets</A></li>
<li><A HREF="#Example_14">Symmetric Difference of Two Sets</A></li>
<li><A HREF="#Example_15">Compare two Sets</A></li>
<li><A HREF="#Example_16">Membership Test on Sets</A></li>
<li><A HREF="#Example_17">Iterating on Set</A></li>
<li><A HREF="#Example_18">Clearing a Set</A></li>
<li><A HREF="#Example_19">Interesting Problem Solved using Sets</A></li>
<li><A HREF="#Example_20">Full Example Code of Sets ‐ ‐ sets.py</A></li>
</ol>
<h3><A NAME="Example_01">1. Create a Simple Set</A></h3>
Python sets can be created by simply writing the items within curly braces.
<code><pre>
>>> primes={3,5,7,9,11,13}
>>> type(primes)
<class 'set'>
</pre></code>
<p>
Note: Keep in mind that Python dictionaries also uses {} in declaration. But, in the above example, we've created a set as indicated by the type command output.</p>
<p>
For Python dictionaries, refer to this: <br />
<a href="https://www.thegeekstuff.com/2013/05/python-dictionary/" target=_blank>Python Dictionary Examples ‐ ‐ Create, Update and Delete Elements</a>
<h3><A NAME="Example_02">2. Create a Set with Constructor</A></h3>
Use set as shown below and pass the initial string as constructor.
<p>
In the following example, we are purposefully adding another “s“ in front of “stuff“, which will be ignored by the set. It will take only one “s“ even when we gave more than one.</p>
<code><pre>
>>> unique=set("thegeeksstuff");
>>> unique
{'h', 't', 'u', 's', 'f', 'e', 'g', 'k'}
>>> type(unique)
<class 'set'>
</pre></code>
<h3><A NAME="Example_03">3. Create an Empty Set</A></h3>
The following is an incorrect way of creating an empty set. This will create an empty dictionary:
<code><pre>
>>> empty={}
>>> type(empty)
<class 'dict'>
</pre></code>
The correct way to create is shown below. To create an empty set, use the set method with empty constructor as shown below.
<pre><code>
>>> empty=set();
>>> type(empty)
<class 'set'>
</code></pre>
While trying to create empty set, use constructor method. Otherwise using 1st method will make an empty dictionary instead.
<h3><A NAME="Example_04">4. Create a Set from List</A></h3>
First create a list as shown below:
<code><pre>
>>> primesList=[3,5,7,11,13,17];
</pre></code>
To learn more about list, refer to this: <br />
<a href="https://www.thegeekstuff.com/2013/06/python-list/" target=_blank>Python List Examples ‐ ‐ Insert, Append, Length, Index, Remove, Pop</a><br />
<br />
Next, create a set using the above list:
<code><pre>
>>> primeSet=set(primesList)
>>> type(primeSet)
<class 'set'>
>>> primeSet
{3, 5, 7, 11, 13, 17}
</pre></code>
<h3><A NAME="Example_05">5. Create Set from Tuple</A></h3>
First, create a tuple as shown below.
<code><pre>
>>> p=(3,5,7,11,13);
>>> p
(3, 5, 7, 11, 13)
>>> type(p)
<class 'tuple'>
</pre></code>
To learn more about tuples, refer to this: <br />
<a href="https://www.thegeekstuff.com/2019/03/python-tuple-examples/" target=_blank>17 Practical Python Tuples Examples</a><br />
<br />
Next, create a set from the above tuple:
<code><pre>
>>> primes=set(p);
>>> p
(3, 5, 7, 11, 13)
>>> type(primes)
<class 'set'>
>>> primes
{3, 5, 7, 11, 13}
</pre></code>
<h3><A NAME="Example_06">6. Access a Specific Value in Set</A></h3>
Set elements cannot be accessed specifically, there is no index attached to it. We cannot access elements of set.
<code><pre>
>>> primes = {3, 5, 7, 11, 13}
>>> primes[1]
Traceback (most recent call last):
File "<pyshell#21>", line 1, in <module>
primes[1]
TypeError: 'set' object does not support indexing
</pre></code>
<h3><A NAME="Example_07">7. Add Items to a Set ‐‐ Using Add Method</A></h3>
<p>
Items can be added to set using two methods add and update. Add method can insert single element but update method can insert tuple, lists too.</p>
<code><pre>
>>> primes={3,5,7,11};
>>> primes
{11, 3, 5, 7}
>>> primes.add(19);
>>> primes
{3, 5, 7, 11, 19}
</pre></code>
<h3><A NAME="Example_08">8. Add Items to a Set ‐‐ Using Update Method</A></h3>
The following will add the items from the plist to the primes set.
<code><pre>
>>> plist=[12,14,15,16];
>>> primes.update(plist);
>>> primes
{3, 5, 7, 11, 12, 14, 15, 16, 19}
</pre></code>
<h3><A NAME="Example_09">9. Remove Items from Set ‐‐ Using Discard Method</A></h3>
Items can be removed from set using discard and remove method. While removing items, if item does not exist, remove reports and error while discard doesn't.
<code><pre>
>>> primes
{3, 5, 'santosh', 7, 11, 12, 14, 15, 16, 19}
>>> primes.discard("santosh")
>>> primes
{3, 5, 7, 11, 12, 14, 15, 16, 19}
>>> primes.discard("santosh");
</pre></code>
While trying to remove already removed item, discard does not report an error.
<h3><A NAME="Example_10">10. Remove Items from Set ‐‐ Using Remove Method</A></h3>
Currently primes set has the following values.
<code><pre>
>>> primes
{3, 5, 7, 11, 12, 14, 15, 16, 19}
</pre></code>
The following will remove the item with value 11 from the primes set.
<code><pre>
>>> primes.remove(11);
</pre></code>
As you see below, we don't see item with value 11 anymore in primes set.
<code><pre>
>>> primes
{3, 5, 7, 12, 14, 15, 16, 19}
>>> primes.remove(11);
Traceback (most recent call last):
File "<pyshell#23>", line 1, in <module>
primes.remove(11);
KeyError: 11
</pre></code>
Remove method reported error when trying to remove element which does not exist.
<h3><A NAME="Example_11">11. Union Operation on Sets</A></h3>
Union operation (|) will create a new set with distinct items from both the sets.
<code><pre>
>>> prime1={3,5,7,11};
>>> prime2={3,5,7,11,13,17,19}
>>> primes=prime1 | prime2
>>> primes
{3, 5, 7, 11, 13, 17, 19}
</pre></code>
<h3><A NAME="Example_12">12. Intersection Operation on Sets</A></h3>
Intersection operation (&) will create a new set with items common to both the sets.
<code><pre>
>>> prime1={3,5,7,11};
>>> prime2={3,5,7,11,13,17,19}
>>> primes=prime1 & prime2
>>> primes
{3, 11, 5, 7}
</pre></code>
<h3><A NAME="Example_13">13. Difference Operation on Sets</A></h3>
Difference operation will create a new set containing elements that are in first set but not in the second set
<code><pre>
>>> prime2={3,5,7,11,13,17,19}
>>> prime1={3,5,7,11};
>>> primes=prime2-prime1
>>> primes
{17, 19, 13}
</pre></code>
<h3><A NAME="Example_14">14. Symmetric Difference of Two Sets</A></h3>
Symmetric difference of two sets will create a new set containing elements from both the sets except common elements.
<code><pre>
>>> prime2={3,5,7,11,13,17,19}
>>> prime1={3,5,7,11,91,101};
>>> primes=prime2 ^ prime1
>>> primes
{17, 19, 101, 91, 13}
</pre></code>
<h3><A NAME="Example_15">15. Compare two Sets</A></h3>
Using comparison we can check if one set is superset or subset or equal to another set.
<code><pre>
>>> prime1={3,5,7,11,91,101};
>>> prime={3,5,7,11,91,101};
>>> test=prime==prime1
>>> test
True
>>> prime1={3,5,7,11,91,101};
>>> prime2={3,5,7,11,13,17,19}
>>> test=prime2<prime1
>>> test
False
>>> prime2={3,5,7,11,13,17,19}
>>> prime1={3,5,7,11,91,101};
>>> prime1={3,5,7,11};
>>> test=prime2<prime1
>>> test
False
>>> test=prime2>prime1
>>> test
True
</pre></code>
<h3><A NAME="Example_16">16. Membership Test on Sets</A></h3>
We can test if an element exist or not in specified set.
<code><pre>
>>> prime1={3,5,7,11,91,101};
>>> test= 3 in prime1
>>> test
True
>>> test=13 in prime1
>>> test
False
</pre></code>
<h3><A NAME="Example_17">17. Iterating on Set</A></h3>
Let us use the following primes set for this example.
<code><pre>
>>> primes={3,5,7,11,91,101};
</pre></code>
use for loop to loop through the set elements.
<code><pre>
>>> for prime in primes:
print(prime);
3
5
101
7
11
</pre></code>
To learn more about for loop, refer to this: <br />
<a href="" target=_blank>12 Essential Python For Loop Command Examples</a>
<h3><A NAME="Example_18">18. Clearing a Set</A></h3>
Using clear method, all the items of set can be deleted.
<code><pre>
>>> prime1
{3, 5, 101, 7, 11, 91}
>>> prime1.clear()
>>> prime1
set()
</pre></code>
<h3><A NAME="Example_19">19. Interesting Problem Solved using Sets</A></h3>
Problem statement: given a list of integers, print all the distinct elements.
Using sets we can solve this problem in single line of code.
<code><pre>
>>> number = [1,2,3,4,5,2,3,4,7,8,9,8,12,13,14,14,19]
>>> number
[1, 2, 3, 4, 5, 2, 3, 4, 7, 8, 9, 8, 12, 13, 14, 14, 19]
>>> print (set(number))
{1, 2, 3, 4, 5, 7, 8, 9, 12, 13, 14, 19}
</pre></code>
This was a use case, similarly sets can be useful in other scenarios.
<h3><A NAME="Example_20">20. Full Example Code of Sets ‐‐ sets.py</A></h3>
Create a sets.py file
<code><pre>
vi sets.py
</pre></code>
Copy/paste the following into sets.py and execute it for your testing.
<code><pre>
#1) Creating set
primes={3,5,7,9,11,13}
type(primes)
# 2) Creating set with constructor
unique=set("thegeeksstuff");
unique
# 3) Creating empty set
empty={}
type(empty)
empty=set();
type(empty)
#4) Creating set from List
primesList=[3,5,7,11,13,17];
primeSet=set(primesList)
type(primeSet)
primeSet
# 5) Creating set from tuple
p=(3,5,7,11,13);
primes=set(p);
type(primes)
primes
# 6) Accessing values in Set
Primes = {3, 5, 7, 11, 13};
#Primes[1]; # uncommenting this throw error
#7) Using Add method
primes={3,5,7,11};
primes.add(19);
primes
# 8) Using update method
plist=[12,14,15,16];
primes.update(plist);
primes
#9) Using discard
primes={3, 5, 'santosh', 7, 11, 12, 14, 15, 16, 19};
primes.discard("santosh")
# 10) Using remove
primes = {3, 5, 7, 11, 12, 14, 15, 16, 19}
primes.remove(11);
primes;
# 11) Union operation on sets
prime1={3,5,7,11};
prime2={3,5,7,11,13,17,19}
primes=prime1 | prime2
primes
# 12) Intersection operation on Sets
prime1={3,5,7,11};
prime2={3,5,7,11,13,17,19}
primes=prime1 & prime2
primes
# 13) Difference operation on sets
prime2={3,5,7,11,13,17,19}
prime1={3,5,7,11};
primes=prime2-prime1
primes
# 14) Symmetric difference
prime2={3,5,7,11,13,17,19}
prime1={3,5,7,11,91,101};
primes=prime2 ^ prime1
primes
# 15) Compare two sets
prime1={3,5,7,11,91,101};
prime={3,5,7,11,91,101};
test=prime==prime1
test
prime1={3,5,7,11,91,101};
prime1={3,5,7,11};
test=prime2<prime1
test
#16) Membership test on sets
prime1={3,5,7,11,91,101};
test= 3 in prime1
test
# 17) Iterating on set
primes={3,5,7,11,91,101};
for prime in primes:
print(prime);
# 18) Clearing a set
prime1
{3, 5, 101, 7, 11, 91}
prime1.clear()
#19) interesting problem
number = [1,2,3,4,5,2,3,4,7,8,9,8,12,13,14,14,19]
print (set(number))
</pre></code>
Executing the above sets.py will display the following output. <br />
Study the above code properly to understand why you are <br />
getting the following output.
<code><pre>
$ python sets.py
3
5
7
11
91
101
set([1, 2, 3, 4, 5, 7, 8, 9, 12, 13, 14, 19])
</pre></code>
<h3>Link:</h3>
<a href="https://www.thegeekstuff.com/2019/04/python-set-examples" target=_blank>The Geek Stuff :: 15 Practical Python Set Examples with a Sample Program</a>
</html>
<html>
Tuple is similar to List in python language, both are sequential, <br />
index based data structure.<br />
<br />
The main difference between tuples and list is that <b>tuples are <br />
immutable</b> i.e. we cannot modify a tuple's content but <b>List <br />
is mutable data structure</b>. Also, tuples uses parenthesis and <br />
list uses square brackets.<br />
<br />
This article will discuss about following in Tuples:
<ol>
<li> <A HREF="#Example_1">Create an Empty Tuple</A></li>
<li> <A HREF="#Example_2">Create Tuple with Homogeneous Elements</A></li>
<li> <A HREF="#Example_3">Create Tuple with Heterogeneous Elements</A></li>
<li> <A HREF="#Example_4">Create Tuple with Single Element</A></li>
<li> <A HREF="#Example_5">Modify Elements of Tuple</A></li>
<li> <A HREF="#Example_6">Accessing Elements of Tuple ‐ From the Front</A></li>
<li> <A HREF="#Example_7">Accessing Elements of Tuple ‐ From the Back</A></li>
<li> <A HREF="#Example_8">Search Within a Tuple</A></li>
<li> <A HREF="#Example_9">Add Elements to a Tuple</A></li>
<li> <A HREF="#Example_10">Delete an Element from a Tuple</A></li>
<li> <A HREF="#Example_11">Iterate Over a Tuple</A></li>
<li> <A HREF="#Example_12">Concatenation of Tuples</A></li>
<li> <A HREF="#Example_13">Identify Length of a Tuple</A></li>
<li> <A HREF="#Example_14">Slice a Tuple</A></li>
<li> <A HREF="#Example_15">Count the Number of Elements in a Tuple</A></li>
<li> <A HREF="#Example_16">Identify the Index of an Element in a Tuple</A></li>
<li> <A HREF="#Example_17">All Tuple Examples in one Example tuples.py Program</A></li>
</ol>
<h3><A NAME="Example_1">1. Create an Empty Tuple</A></h3>
Tuple can be created by simply writing elements of tuple, separated by comma “,“ <br />
enclosed by parenthesis. Parenthesis is optional, but it is good practice to enclose<br />
the elements with it.<br />
<br />
The following creates an empty tuple.
<code><pre>
>>> emptyTuple=();
>>> emptyTuple
()
</pre></code>
You can also create an empty tuple with constructor as shown below:
<code><pre>
>>> empty=tuple();
>>> empty
()
</pre></code>
Empty tuple can be useful in few algorithmic codes where empty structure is required in some cases.<br />
<h3><A NAME="Example_2">2. Create Tuple with Homogeneous Elements</A></h3>
The following tuple has all integer values for it's elements.
<code><pre>
>>> intTuple=(1,2,3,5,6);
>>> intTuple
(1, 2, 3, 5, 6)
</pre></code>
The following tuple has all string values for it's elements.
<code><pre>
>>> stringTuple=("geek1","geek2","geek3");
>>> stringTuple
('geek1', 'geek2', 'geek3')
</pre></code>
<h3><A NAME="Example_3">3. Create Tuple with Heterogeneous Elements</A></h3>
The following tuple has a combination of both integers and strings for it's elements.
<code><pre>
>>> mixTuple=(1,2,3,4,"geek1","geek2","geek3");
>>> mixTuple
(1, 2, 3, 4, 'geek1', 'geek2', 'geek3')
</pre></code>
<h3><A NAME="Example_4">4. Create Tuple with Single Element</A></h3>
You can also create a tuple just with one element. But, make sure you use a comma as shown below. Without comma, you are not creating a single element tuple.
<code><pre>
>>> t=(1,);
>>> t
(1,)
>>> t1=(2);
>>> t1
2
</pre></code>
Note: Without extra comma, t1 will be integer variable instead of tuple. So to create a tuple with single element always use comma after the element.
<h3><A NAME="Example_5">5. Modify Elements of Tuple</A></h3>
Tuples are immutable, we cannot change the tuple once it is initialized, and that is why they are best keys for dictionaries
<code><pre>
>>> primes=(3,5,7,11,13,17)
>>> primes
(3, 5, 7, 11, 13, 17)
>>> primes[0]
3
>>> primes[0]=19
Traceback (most recent call last):
File "<pyshell#14>", line 1, in <module>
primes[0]=19
TypeError: 'tuple' object does not support item assignment
>>>
</pre></code>
It will throw an error whenever code try to modify its elements.
<h3><A NAME="Example_6">6. Accessing Elements of Tuple ‐ From the Front</A></h3>
Tuple is an indexed data structure like array, in similar fashion we can access the elements of tuple using [] operator, index starts from “0“. And it will throw an error if code try to access tuple beyond its range
Element : 3 5 7 11 13 19
Index : 0 1 2 3 4 5
Accessing from front:
<code><pre>
>>> primes=(3,5,7,11,13,19)
>>> primes
(3, 5, 7, 11, 13, 19)
>>> primes[1]
5
>>> primes[6]
Traceback (most recent call last):
File "<pyshell#18>", line 1, in <module>
primes[6]
IndexError: tuple index out of range
</pre></code>
<h3><A NAME="Example_7">7. Accessing Elements of Tuple ‐ From the Back</A></h3>
Accessing from end: Using negative indexing, '-1' will point to last item and so on
<code><pre>
Element: 3 5 7 11 13 17
Index : -6 -5 -4 -3 -2 -1
>>> primes=(3,5,7,11,13,17);
>>> primes[-1]
17
>>> primes[-2]
13
</pre></code>
<h3><A NAME="Example_8">8. Search Within a Tuple</A></h3>
An element can be searched in tuple using tuple's membership test, 'in' keyword
<code><pre>
>>> primes=(3,5,7,11,13,17);
>>> primes
(3, 5, 7, 11, 13, 17)
>>> print (3 in primes)
True
>>> print (41 in primes)
False
</pre></code>
<h3><A NAME="Example_9">9. Add Elements to a Tuple</A></h3>
As already discussed Tuples are immutable so we cannot modify elements <br />
of a tuple, and addition of elements not supported, so append, add functions<br />
are not defined for tuple.
<code><pre>
>>> primes
(3, 5, 7, 11, 13, 17)
>>> primes.append(91)
Traceback (most recent call last):
File "<pyshell#13>", line 1, in <module>
primes.append(91)
AttributeError: 'tuple' object has no attribute 'append'
</pre></code>
<h3><A NAME="Example_10">10. Delete an Element from a Tuple</A></h3>
We cannot modify elements of tuple, cannot delete it. But we can delete whole tuple along with its elements using 'del' keyword
<code><pre>
>>> primes
(3, 5, 7, 11, 13, 17)
>>> del primes
>>> primes
Traceback (most recent call last):
File "<pyshell#18>", line 1, in <module>
primes
NameError: name 'primes' is not defined
</pre></code>
<h3><A NAME="Example_11">11. Iterate Over a Tuple using For Loop</A></h3>
You can loop through items in a tuple using for loop as shown below.
<code><pre>
>>> primes=(3,5,7,11,13,17);
>>> primes
(3, 5, 7, 11, 13, 17)
>>> for prime in primes:
print (prime);
3
5
7
11
13
17
</pre></code>
For more details on for loop, refer to: <a href="https://www.thegeekstuff.com/2017/07/python-for-loop-examples/" target="_blank" rel="noreferrer noopener">12 Essential Python For Loop Command Examples</a>
<h3><A NAME="Example_12">12. Concatenation of Tuples</A></h3>
You can add (concatenate) to tuples using plus (+) as shown below.
<code><pre>
>>> primes=(3,5,7,11,13);
>>> primes
(3, 5, 7, 11, 13)
>>> names=("c","c++","java","angular");
>>> names
('c', 'c++', 'java', 'angular')
>>> primes+names
(3, 5, 7, 11, 13, 'c', 'c++', 'java', 'angular')
</pre></code>
<h3><A NAME="Example_13">13. Identify Length of a Tuple</A></h3>
Use len function as shown below to identify the number of elements in a tuple.
<code><pre>
>>> primes+names
(3, 5, 7, 11, 13, 'c', 'c++', 'java', 'angular')
>>> len(names+primes)
9
</pre></code>
<h3><A NAME="Example_14">14. Slice a Tuple</A></h3>
':' can be used to get slice of a tuple, slice will start from first index and before the last index. And if one index is absent then all the items till that index.
<code><pre>
Element : 3 5 7 11 13
Index : 0 1 2 3 4
>>> primes
(3, 5, 7, 11, 13)
>>> primes[0:3]
(3, 5, 7)
>>> primes[1:2]
(5,)
>>> primes[:3]
(3, 5, 7)
>>> primes[:-2]
(3, 5, 7)
</pre></code>
<h3><A NAME="Example_15">15. Count the Number of Elements in a Tuple</A></h3>
This function will return the no of elements in the tuple those are equal to the input parameter
<code><pre>
>>> primes
(3, 5, 7, 11, 13)
>>> primes=(3,5,7,11,13,11,7);
>>> primes.count(3)
1
>>> primes.count(11)
2
>>> primes.count(101)
0
</pre></code>
<h3><A NAME="Example_16">16. Identify the Index of an Element in a Tuple</A></h3>
This function will return index of first element that is equal to input parameter
<code><pre>
>>> primes
(3, 5, 7, 11, 13, 11, 7)
>>> primes.index(3)
0
>>> primes.index(11)
3
>>> primes.index(7)
2
</pre></code>
If element doesn't exist in tuple, it will throw an error
<code><pre>
>>> primes.index(101)
Traceback (most recent call last):
File "<pyshell#34>", line 1, in <module>
primes.index(101)
ValueError: tuple.index(x): x not in tuple
</pre></code>
<h3><A NAME="Example_17">17. All Tuple Examples in one Sample Python Program</A></h3>
<code><pre>
vi tuples.py
</pre></code>
Copy/Paste the following to your tuples.py
<code><pre>
# Creating an empty tuple
emptyTuple=();
emptyTuple
# Creating tuple with constructor
empty=tuple();
empty
# Creating tuple with homogeneous elements
intTuple=(1,2,3,5,6);
intTuple
# Creating tuple with heterogeneous elements
mixTuple=(1,2,3,4,"geek1","geek2","gee3");
mixTuple
# Creating tuple with single element
t=(1,);
t
# Modifying elements of Tuple
primes=(3,5,7,11,13,17)
# The following line will give an error message.
#primes[0]=19
# Accessing tuple from front
primes=(3,5,7,11,13,19)
primes[1]
# Accessing tuple from end
primes[-1]
# Search within Tuple
primes=(3,5,7,11,13,17);
print (3 in primes)
print (43 in primes)
# Adding elements to tuple
# The following line will give an error message.
#primes.append(91)
# Deleting a Tuple
del primes
# Iterating over a tuple
primes=(3,5,7,11,13,17);
for prime in primes:
print (prime);
# Concatenation
primes=(3,5,7,11,13);
names=("c","c++","java","angular");
primes+names
# Length of tuple
len(names+primes)
# Slicing operator
primes[0:3]
# Count function
primes=(3,5,7,11,13,11,7);
primes.count(3)
# Index function
primes.index(3)
</pre></code>
<h3>Link:</h3>
<ul>
<li><a href="https://www.thegeekstuff.com/2019/03/python-tuple-examples/" target=_blank>The Geek Stuff :: Python - Tuple examples</a></li>
</ul>
</html>
<html>
<h2>20 Python libraries you can't live without</h2>
Stand: July 30, 2013
<ol>
<li><h4>Requests</h4> The most famous http library written by Kenneth Reitz. It's a must have for every python developer.</li>
<li><h4>Scrapy</h4> If you are involved in webscraping then this is a must have library for you. After using this library you won't use any other.</li>
<li><h4>wxPython</h4> gui toolkit for python. I have primarily used it in place of tkinter. You will really love it.</li>
<li><h4>Pillow</h4> A friendly fork of PIL (Python Imaging Library). It is more user friendly than PIL and is a must have for anyone who works with images.</li>
<li><h4>SQLAlchemy</h4> A database library. Many love it and many hate it. The choice is yours.</li>
<li><h4>BeautifulSoup</h4> I know it's slow but this xml and html parsing library is very useful for beginners.</li>
<li><h4>Twisted</h4> The most important tool for any network application developer. It has a very beautiful api and is used by a lot of famous python developers.</li>
<li><h4>NumPy</h4> How can we leave this very important library ? It provides some advance math functionalities to python.</li>
<li><h4>SciPy</h4> When we talk about NumPy then we have to talk about scipy. It is a library of algorithms and mathematical tools for python and has caused many scientists to switch from ruby to python.</li>
<li><h4>matplotlib</h4> A numerical plotting library. It is very useful for any data scientist or any data analyzer.</li>
<li><h4>Pygame</h4> Which developer does not like to play games and develop them ? This library will help you achieve your goal of 2d game development.</li>
<li><h4>Pyglet</h4> A 3d animation and game creation engine. This is the engine in which the famous python port of minecraft was made</li>
<li><h4>pyQT</h4> A GUI toolkit for python. It is my second choice after wxpython for developing GUI's for my python scripts.</li>
<li><h4>pyGtk</h4> Another python GUI library. It is the same library in which the famous Bittorrent client is created.</li>
<li><h4>Scapy</h4> A packet sniffer and analyzer for python made in python.</li>
<li><h4>pywin32</h4> A python library which provides some useful methods and classes for interacting with windows.</li>
<li><h4>nltk</h4> Natural Language Toolkit ‐ I realize most people won't be using this one, but it's generic enough. It is a very useful library if you want to manipulate strings. But it's capacity is beyond that. Do check it out.</li>
<li><h4>nose</h4> A testing framework for python. It is used by millions of python developers. It is a must have if you do test driven development.</li>
<li><h4>SymPy</h4> SymPy can do algebraic evaluation, differentiation, expansion, complex numbers, etc. It is contained in a pure Python distribution.</li>
<li><h4>IPython</h4> I just can't stress enough how useful this tool is. It is a python prompt on steroids. It has completion, history, shell capabilities, and a lot more. Make sure that you take a look at it.</li>
</ol>
<h3>Link:</h3>
<a href="https://yasoob.me/2013/07/30/20-python-libraries-you-cant-live-without/">Yasoob :: 20 Python Libraries</a>
</html>
<html>
<ol>
<li><details><summary><b>Apache Libcloud</b></summary>
Access multiple cloud providers through a single, consistent, unified API<br /><br />
</details></li>
<li><details><summary><b>Arrow</b></summary>
Cleaner handling of dates and times in Python<br /><br />
</details></li>
<li><details><summary><b>Behold</b></summary>
Robust support for print-style debugging in Python.<br /><br />
</details></li>
<li><details><summary><b>Black</b></summary>
Formats Python code according to a strict and almost totally immutable set of rules.<br /><br />
</details></li>
<li><details><summary><b>Bottle</b></b></summary>
Lightweight and fast web apps.<br /><br />
</details></li>
<li><details><summary><b>Click</b></summary>
Lets you quickly build command-line interfaces for Python apps.
</details></li>
<li><details><summary><b>EbookLib</b></summary>
Read and write .epub files.
</details></li>
<li><details><summary><b>Gooey</b></summary>
Give a console-based Python program a platform-native GUI.
</details></li>
<li><details><summary><b>Invoke</b></summary>
Pythonic remote execution ???? i.e., perform admin tasks using a Python library.
</details></li>
<li><details><summary><b>Nuitka</b></summary>
Compile Python into self-contained C executables.
</details></li>
<li><details><summary><b>Numba</b></summary>
Selectively speed up math-intensive functions.
</details></li>
<li><details><summary><b>Openpyxl</b></summary>
Reads, writes, and manipulates Excel files.
</details></li>
<li><details><summary><b>Peewee</b></summary>
A tiny ORM (object-relational mapper) that supports SQLite, MySQL, and PostgreSQL, with many extensions.
</details></li>
<li><details><summary><b>Pillow</b></summary>
Image processing without the pain.
</details></li>
<li><details><summary><b>Poetry</b></summary>
Manages dependencies and packaging for your Python projects in a high-level way.
</details></li>
<li><details><summary><b>PyFilesystem</b></summary>
A Pythonic interface to any file system ???? any file system.
</details></li>
<li><details><summary><b>Pygame</b></summary>
Create video games, or game-quality front-ends, in Python.
</details></li>
<li><details><summary><b>Pyglet</b></summary>
Cross-platform multimedia and window graphics in pure Python.
</details></li>
<li><details><summary><b>PyInstaller</b></summary>
Package a Python script as a stand-alone executable.
</details></li>
<li><details><summary><b>PySimpleGUI</b></summary>
Creating GUIs in Python with a minimum of fuss.<br />
<br />
Python ships with the Tkinter library for creating GUIs, but Tkinter<br />
is not known for being easy to work with. PySimpleGUI wraps <br />
Tkinter with APIs that are far less exasperating. Many common<br />
effects, like a simple dialog box or pop-up menu, can be accom–<br />
plished in a single line of code. The interfaces still have Tkinter's<br />
trademark look, though. If you want a more sophisticated look<br />
and feel you'll need to look elsewhere.<br />
</details></li>
<li><details><summary><b>Python-docx</b></summary>
Programmatically manipulate Microsoft Word .docx files.
</details></li>
<li><details><summary><b>Scrapy</b></summary>
Screen scraping and web crawling.
</details></li>
<li><details><summary><b>Sh</b></summary>
Call any external program, in a subprocess, and return the results to a Python program ??? using the same syntax as if the program in question were a native Python function.
</details></li>
<li><details><summary><b>Splinter</b></summary>
Test web applications by automating browser actions.
</details></li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://www.infoworld.com/article/3008915/24-python-libraries-for-every-python-developer.html" target=_blank>InfoWorld.com :: 24 Python libraries for every Python developer</a></li>
</ul>
</html>
<html>
Exceptions in Python are errors thrown by syntactically correct statements.<br />
<br />
They terminate the execution of the script. Some example of exceptions are<br />
NameError, TypeError, AssertionError, ConnectionAbortedError, etc.<br />
<br />
These abortions can be handled to prevent the script from terminating unpre‐<br />
dictable. Description of all python exceptions can be found <a href="https://docs.python.org/3/library/exceptions.html#bltin-exceptions" target=_blank>here</a>.<br />
<br />
This tutorial covers the following examples:
<ol>
<li><a href="#tw-href01">Python try-except Block</a></li>
<li><a href="#tw-href02">Multiple Exception Handling in Python</a></li>
<li><a href="#tw-href03">Python finally Block – When Exception Occurs</a></li>
<li><a href="#tw-href04">Python finally Block – When No Exception</a></li>
<li><a href="#tw-href05">Python Nested try-except Block</a></li>
</ol>
Have a look at the following code:
<code><pre>
t
a = 12
s = "hello"
print(a+s)
</pre></code>
Output:
<code><pre>
Traceback (most recent call last):
File "<stdin>", line 3, in <module>
TypeError: unsupported operand type(s) for +: 'int' and 'str'
</pre></code>
Here the print function syntax is correct, yet addition of an integer and a <br />
string is incorrect. Hence TypeError is raised by python interpreter.
<h3><a id="tw-href01">1. Python try-except Block</a></h3>
The keywords involved in handling of exceptions are try, except and finally.<br />
<br />
Try block must be followed by an except block. Addition of finally block is optional.<br />
<br />
The statements in the try block are executed line by line. If execution of any state‐<br />
ment throws an exception. The remaining statements in this block are skipped and execu‐<br />
tion of except block starts.<br />
<br />
Example:
<code><pre>
a = 12
s = "hello"
try:
print("inside try")
print(a + s) # will raise TypeError
print("Printed using original data types")
except TypeError: # will handle only TypeError
print("inside except")
print(str(a) + s)
print("Printed using type-casted data types")
</pre></code>
Output:
<code><pre>
inside try
inside except
12hello
Printed using type-casted data types
</pre></code>
Here TypeError was raised in the execution of line 2 inside try block. Hence <br />
execution of remaining statements was skipped and except block execution <br />
started. Note that the exceptions to be handled are mentioned along side the <br />
except keyword.<br />
<br />
If you are new to python, this might help you get a jumpstart: <br />
<a href="https://www.thegeekstuff.com/2019/03/python-oop-examples/" target=_blank>5 Examples to Jumpstart Object Oriented Programming in Python</a>
<h3><a id="tw-href02">2. Multiple Exception Handling in Python</a></h3>
Multiple exceptions can be handled using a single try-except block. This is <br />
done by mentioning the exception names, comma-separated inside paren‐<br />
theses, just after except keyword.
<code><pre>
try:
if (3 + 4 - 5) > 0:
a = 3
a.append("hello") # throws AttributeError
else:
print("hello" + 4) # throws TypeError
except (AttributeError, TypeError) as e:
print("Error occurred:", e)
</pre></code>
Output:
<code><pre>
Error occurred: 'int' object has no attribute 'append'
</pre></code>
For more details python if-else, refer to this: <a href="https://www.thegeekstuff.com/2017/06/python-if-else-elif-examples/" target=_blank>9 Python if, if else, if elif Command Examples</a>
<h3><a id="tw-href03">3. Python finally Block – When Exception Occurs</a></h3>
finally is the block that resides after except block. This block of statements<br />
is executed no matter whether an exception was encountered or not.<br />
<br />
Adding finally block to the previous example:
<code><pre>
try:
if (3 + 4 - 5) > 0:
a = 3
a.append("hello") # throws Attribute Error
else:
print("hello" + 4) # throws TypeError
except (AttributeError, TypeError) as e:
print("Error occurred:", e)
finally:
print("try except block successfully executed")
</pre></code>
Output:
<code><pre>
Error occurred: 'int' object has no attribute 'append'
try except block successfully executed
</pre></code>
Here the statements in try raised an exception, except block was executed<br />
and then the finally block.
<h3><a id="tw-href04">4. Python finally Block –When No Exception</a></h3>
Having a look at another example:
<code><pre>
try:
if (3 + 4 - 5) < 0:
a = 3
print(a + 5) # simple addition
else:
print("hello" + "4") # string concatenation
except (AttributeError, TypeError) as e:
print("Error occurred:", e)
finally:
print("try except block successfully executed")
</pre></code>
Output:
<code><pre>
8
try except block successfully executed
</pre></code>
Here we see that finally block was executed even if the except block was<br />
never executed.<br />
<br />
If statements inside except and finally block raises exception, the remaining<br />
script execution will terminate.
<h3><a id="tw-href05">5. Python Nested try-except Block</a></h3>
A try-except block can be surrounded by another try-except block.
<code><pre>
import json
import sys
try:
with open("hello.json") as fp:
try:
json_dict = json.load(fp)
except json.JSONDecodeError:
print("Json file does not exist")
print(json_dict)
except:
print("error occurred while parsing json:", sys.exc_info()[1])
</pre></code>
Output: if hello.json exists
<code><pre>
{'name': 'Aanisha', 'surname': 'Mishra'}
</pre></code>
Output: if hello.json does not exist
<code><pre>
error occurred while parsing json: [Errno 2] No such file or directory: 'hello.json'
</pre></code>
Output: if hello.json is not a valid json file
<code><pre>
Json file does not exist
error occurred while parsing json: name 'json_dict' is not defined
</pre></code>
This form of solution can handle exception raised inside except or finally block as well.
For additional reading, more detailed handling strategies can be found <a href="https://docs.python.org/3/tutorial/errors.html#handling-exceptions" target=_blank rel="noreferrer noopener">here</a>.
<h3>Link:</h3>
<ul>
<li><a href="https://www.thegeekstuff.com/2019/05/python-try-except-examples/" target=_blank rel="noreferrer noopener">The Geek Stuff :: 5 Python Examples to Handle Exceptions using try, except and finally</a></li>
</ul>
</html>
<html>
Similar to other programming languages, in Python, conditional <br />
situations can be handled using if command.<br />
<br />
In this tutorial, we've explained the following with examples:
<ol>
<li> Basic Python if Command Example for Numbers</li>
<li> Python if Command Operators</li>
<li> Basic Python if Command Example for String Comparison</li>
<li> Multiple Commands in If Condition Block using Indentation</li>
<li> Python if else Command Example</li>
<li> Python if else if Command Example</li>
<li> Python Compound If Statement Example</li>
<li> AND, OR, NOT in Python if Command</li>
<li> Python if Command Error Messages</li>
</ol>
This is the Python if statement syntax. The following examples will <br />
show how this syntax can be used properly.<br />
<code><pre>
if_stmt ::= "if" expression ":" suite
( "elif" expression ":" suite )*
["else" ":" suite]
</pre></code>
<h3>1. Basic Python if Command Example for Numbers</h3>
The following example illustrates how to use if command in python <br />
when we are doing a conditional testing using numbers.<br />
<code><pre>
# cat if1.py
days = int(input("How many days are in March?: "))
if days == 31:
print("You passed the test.")
print("Thank You!")
</pre></code>
In the above example:<br />
<ul>
<li> 1st line: Here, we are asking for user input. The input will be an integer, which will be stored in the variable days.</li>
<li> 2nd line: This is the if command, where we are comparing whether the value of the variable days is equal to the numerical value 31. The colon at the end is part of the if command syntax, which should be given.</li>
<li> 3rd line: This line starts with two space indent at the beginning. Any line (one or more) that follows the if statement, which has similar indentation at the beginning is considered part of the if statement block. In this example, we have only one line after if statement, which is this 3rd line, which has two spaces in the beginning for indent. So, this line will be executed when the condition of the if statement is true. i.e If the value of the variable days is equal to 31, this 3rd will get executed</li>
<li> 4th line: This line is outside the if statement block. So, this will get executed whether the if statement is true or false.</li>
</ul>
The following is the output of the above example, when the<br />
if statement condition is true.<br />
<code><pre>
# python if1.py
How many days are in March?: 31
You passed the test.
Thank You!
</pre></code>
The following is the output of the above example, when the<br />
if statement condition is false.<br />
<code><pre>
# python if1.py
How many days are in March?: 30
Thank You!
</pre></code>
If you are new to python, this will give you a excellent introduction <br />
to Python Variables, Strings and Functions.<br />
<h3>2. Python if Command Operators</h3>
The following are the various operators that you can use in the <br />
if command for conditional checks:
<table border="1">
<tr><th>Condition</th><th>Operator</th></tr>
<tr><td>Greater than</td><td><center> ></center></td></tr>
<tr><td>Greater than or equal </td><td><center>>=</center></td></tr>
<tr><td>Less than</td><td><center> <</center></td></tr>
<tr><td>Less than or equal to</td><td><center><=</center></td></tr>
<tr><td>Equal to</td><td><center> ==</center></td></tr>
<tr><td>Not equal to</td><td><center> !=</center></td></tr>
<tr><td>For object identity</td><td><center> is</center></td></tr>
<tr><td>For negated object identity</td><td><center>is not</center></td></tr>
</table>
<h3>3. Basic Python if Command Example for String Comparison</h3>
Similar to the previous example, we can also use Python if command <br />
for string comparison as shown in the example below.
<code><pre>
# cat if2.py
code = raw_input("What is the 2-letter state code for California?: ")
if code == 'CA':
print("You passed the test.")
print("Thank You!")
</pre></code>
In the above:
<ul>
<li> 1st line: Here we are getting the raw input from the user and storing it in the code variable. This will be stored as string.</li>
<li> 2nd line: In this if command, we are comparing whether the value of the code variable is equal to the string “CA„. Please note that we have enclosed the static string value in single quote (not double quote). The : at the end is part of the if command syntax.</li>
<li> 3rd line: As explained in the previous example, this line will get executed when the if command condition is true, as this line has indentation with spaces at the beginning.</li>
<li> 4th line: This will get executed whether the if command condition is true or false.</li>
</ul>
The following is the output of the above example code for both if condition true and false.
<code><pre>
# python if2.py
What is the 2-letter state code for California?: CA
You passed the test.
Thank You!
</pre></code>
<code><pre>
# python if2.py
What is the 2-letter state code for California?: NV
Thank You!
</pre></code>
<h3>4. Multiple Commands in If Condition Block using Indentation</h4>
In the previous example, we had only one statement to be executed when the if condition is true.
The following example shows where multiple lines will get executed when the if condition is true. This is done by doing proper indentation at the beginning of the statements that needs to be part of the if condition block as shown below.
<code><pre>
# cat if3.py
code = raw_input("What is the 2-letter state code for California?: ")
if code == 'CA':
print("You passed the test.")
print("State: California")
print("Capital: Sacramento")
print("Largest City: Los Angeles")
print("Thank You!")
</pre></code>
In the above:
1st line: Here we are getting the raw input from the user and storing it in the code variable. This will be stored as string.
2nd line: In this if command, we are comparing whether the value of the code variable is equal to the string “CA„. Please note that we have enclosed the static string value in single quote (not double quote). The : at the end is part of the if command syntax.
3rd line ‐ 6th line: All these lines have equal indentation at the beginning of the statement. In this example, all these 4 print statements have 2 spaces at the beginning. So, these statements will get executed then the if condition becomes true.
4th line: This print statement doesn't have similar indentation as the previous commands. So, this is not part of the if statement block. This line will get executed irrespective of whether the if command is true or false.
The following is the output of the above example, when the if statement condition is true. Here all those 4 print statements that are part of the if condition block gets executed.
<code><pre>
# python if3.py
What is the 2-letter state code for California?: CA
You passed the test.
State: California
Capital: Sacramento
Largest City: Los Angeles
Thank You!
</pre></code>
The following is the output of the above example, when the if statement condition is false.
<code><pre>
# python if3.py
What is the 2-letter state code for California?: NV
Thank You!
</pre></code>
<h3>5. Python if else Command Example</h3>
The following example shows how to use if..else command in Python.
<code><pre>
# cat if4.py
days = int(input("How many days are in March?: "))
if days == 31:
print("You passed the test.")
else:
print("You failed the test.")
print("Thank You!")
</pre></code>
In the above example:
1st line: Here, we are asking for user input. The input will be an integer, which will be stored in the variable days.
2nd line: This is the if command, where we are comparing whether the value of the variable days is equal to the numerical value 31. The colon at the end is part of the if command syntax, which should be given.
3rd line: This line starts with two space indent at the beginning. Any line (one or more) that follows the if statement, which has similar indentation at the beginning is considered part of the if statement block true condition.
4th line: This has the else keyword for this if block. The colon at the end is part of the if..else command syntax, which should be given.
5th line: This line starts with two space indent at the beginning. Any line (one or more) that follows the else statement, which has similar indentation at the beginning is considered part of the if statement block false condition.
6th line: This line is outside the if statement block. So, this will get executed whether the if statement is true or false.
The following example is also similar to above example, but this if..else uses string variable for comparision.
<code><pre>
# cat if5.py
code = raw_input("What is the 2-letter state code for California?: ")
if code == 'CA':
print("You passed the test.")
else:
print("You failed the test.")
print("Thank You!")
</pre></code>
The following is the output of the above examples, when the if statement condition is false. i.e The else block will get executed here.
<code><pre>
# python if4.py
How many days are in March?: 30
You failed the test.
Thank You!
</pre></code>
<code><pre>
# python if5.py
What is the 2-letter state code for California?: NV
You failed the test.
Thank You!
</pre></code>
<h3>6. Python if else if Command Example</h3>
In Python, if else if is handled using if elif else format.
The following example shows how to use if..elif..else command in Python.
<code><pre>
# cat if6.py
code = raw_input("Type a 2-letter state code that starts with letter C: ")
if code == 'CA':
print("CA is California")
elif code == 'CO':
print("CO is Colorado")
elif code == 'CT':
print("CT is Connecticut")
else:
print("Invalid. Please enter a valid state code that starts with letter C")
print("Thank You!")
</pre></code>
In the above:
When the first if code == „CO“ condition fails, then it goes to the next elif command.
When the elif code == “CO„ condition fails, then it goes to the next elif code command.
When the elif code == “CT„ condition fails, then it just executes whatever is available as part of the final else: block.
At any point when the 1st if condition becomes true, or any one of the remaining elif condition becomes true, then it executes the statement that is part of its block and stops checking further condition.
This also means that when any of the if condition or elif condition becomes true, the statement that is part of the else block will not get executed.
Also, just like previous example, the colon at the end of if, elif, else command is part of the Python syntax, which should be specified.
The following is the output when the first if condition becomes true.
<code><pre>
# python if6.py
Type a 2-letter state code that starts with letter C: CA
CA is California
Thank You!
</pre></code>
The following is the output when the first elif condition becomes true.
<code><pre>
# python if6.py
Type a 2-letter state code that starts with letter C: CO
CO is Colorado
Thank You!
</pre></code>
The following is the output when the second elif condition becomes true.
<code><pre>
# python if6.py
Type a 2-letter state code that starts with letter C: CT
CT is Connecticut
Thank You!
</pre></code>
The following is the output when the if condition is false, and all the remaining elif condition is also false. Here this, executes the else block.
<code><pre>
# python if6.py
Type a 2-letter state code that starts with letter C: NV
Invalid. Please enter a valid state code that starts with letter C
Thank You!
</pre></code>
<h3>7. Python Compound If Statement Example</h3>
The following example shows how you can use compound conditional commands in the if statement.
<code><pre>
# cat if7.py
a = int(input("Enter a: "))
b = int(input("Enter b: "))
c = int(input("Enter c: "))
if a < b < c:
print("Success. a < b < c")
</pre></code>
In the above:
The print block will get executed only when the if condition is true. Here, we are using a compound expression for the if statement where it will be true only when a is less than b and b is less than c.
The following is the output when if condition becomes true.
<code><pre>
# python if7.py
Enter a: 10
Enter b: 20
Enter c: 30
Success. a < b < c
</pre></code>
The following is the output when if condition becomes false.
<code><pre>
# python if7.py
Enter a: 10
Enter b: 10
Enter c: 20
</pre></code>
<h3>8. AND, OR, NOT in Python if Command</h3>
You can also use the following operators in the python if command expressions.
<table border="1">
<tr><th>Operator</th><th>Condition</th><th>Desc</th></tr>
<tr><td>and</td><td>x and y</td><td>True only when both x and y are true.</td></tr>
<tr><td>or</td><td>x or y</td><td>True if either x is true, or y is true.</td></tr>
<tr><td>not</td><td>not x</td><td>True if x is false. False if x is true.</td></tr>
</table>
The following example shows how we can use the keyword “and„ in python if condition.
<code><pre>
# cat if8.py
x = int(input("Enter a number > 10 and < 20: "))
if x > 10 and x < 20:
print("Success. x > 10 and x < 20")
else:
print("Please try again!")
</pre></code>
In the above:
The if statement will be true only when both the condition mentioned in the if statement will be true.
i.e x should be greater than 10 AND x should also be less than 20 for this condition to be true. So, basically the value of x should be in-between 10 and 20.
The following is the output when if condition becomes true. i.e When both the expressions mentioned in the if statement is true.
<code><pre>
# python if8.py
Enter a number > 10 and < 20: 15
Success. x > 10 and x < 20
</pre></code>
The following is the output when if condition becomes false. i.e Only one of the expression mentioned in the if statement is true. So, the whole if statement becomes false.
<code><pre>
# python if8.py
Enter a number > 10 and < 20: 5
Please try again!
</pre></code>
<h3>9. Python if Command Error Messages</h3>
The following are some of the error messages that you might see when using the if command.
This IndentationError error happens when you don't give proper indentation for the statement that is following the if command.
<code><pre>
# python if9.py
File "if3.py", line 4
print("State: California")
^
IndentationError: unindent does not match any outer indentation level
</pre></code>
The following SyntaxError happens when you don't specify the colon : at the end of the python if statement
<code><pre>
# python if9.py
File "if.py", line 2
if days == 31
^
SyntaxError: invalid syntax
</pre></code>
The same SyntaxError will happen when you specify an operator that is invalid. In this example, there is no operator called -eq in python. So, this if command fails with syntax error. You'll also get similar syntax error when you specify elseif instead of elif.
<code><pre>
# python if9.py
File "if.py", line 2
if days -eq 31:
^
SyntaxError: invalid syntax
</pre></code>
<br />
Link:<br />
<a href="www.thegeekstuff.com/2017/06/python-if-else-elif-examples/">www.thegeekstuff.com/2017/06/python-if-else-elif-examples/</a>
</html>
<html>
<ul>
<li>ABI :: “application binary interface“</l>
<br />
<li>cp35 :: “CPython Version 3.5“</li>
</ul>
</html>
<html>
<ol>
<li>Löschen des venv‐Verzeichnisses</li>
<li>Neu‐Installation der virtuellen Umgebung mit <br />
der neuen (Ziel‐)Python‐Version:
<code><pre>
<em><Pfad‐zur‐gewünschten‐Python‐Version></em>/python<em><Version></em> ‐m venv ./venv ‐‐prompt=<em>Name</em>
</pre></code><br />
Beispiel:<br />
<code><pre>
/usr/local/bin/python3.8 ‐m venv ./venv ‐‐prompt=Quant
</pre></code>
</li>
<!--
<li></li>
<li></li>
<li></li>
-->
</ol>
</html>
<html>
<ul>
<li>die nachfolgende Liste wurde <br />
mit dem Befehl “<code><b>conda list</b></code>“ erstellt</li>
</ul>
<h3>Aktuelle Package-Liste - Stand: 2018-09-12</h3>
<pre>
# packages in environment at /home/mueller/anaconda3:
#
# Name Version Build Channel
_ipyw_jlab_nb_ext_conf 0.1.0 py36he11e457_0
alabaster 0.7.10 py36h306e16b_0
anaconda custom py36hbbc8b67_0
anaconda-client 1.7.2 py36_0
anaconda-navigator 1.8.7 py36_0
anaconda-project 0.8.0 py36h29abdf5_0
asn1crypto 0.22.0 py36h265ca7c_1
astroid 1.5.3 py36hbdb9df2_0
astropy 2.0.2 py36ha51211e_4
babel 2.5.0 py36h7d14adf_0
backports 1.0 py36hfa02d7e_1
backports.shutil_get_terminal_size 1.0.0 py36hfea85ff_2
beautifulsoup4 4.6.0 py36h49b8c8c_1
bitarray 0.8.1 py36h5834eb8_0
bkcharts 0.2 py36h735825a_0
blas 1.0 mkl
blaze 0.11.3 py36h4e06776_0
bleach 2.0.0 py36h688b259_0
bokeh 0.12.10 py36hbb0e44a_0
boto 2.48.0 py36h6e4cd66_1
bottleneck 1.2.1 py36haac1ea0_0
bzip2 1.0.6 h0376d23_1
ca-certificates 2018.03.07 0
cachetools 2.1.0 <pip>
cairo 1.14.12 h8948797_3
certifi 2018.8.24 py36_1
cffi 1.10.0 py36had8d393_1
chardet 3.0.4 py36h0f667ec_1
click 6.7 py36h5253387_0
cloudpickle 0.4.0 py36h30f8c20_0
clyent 1.2.2 py36h7e57e65_1
colorama 0.3.9 py36h489cec4_0
conda 4.5.11 py36_0
conda-build 3.0.27 py36h940a66d_0
conda-env 2.6.0 h36134e3_1
conda-verify 2.0.0 py36h98955d8_0
contextlib2 0.5.5 py36h6c84a62_0
cryptography 2.0.3 py36ha225213_1
curl 7.55.1 hcb0b314_2
cycler 0.10.0 py36h93f1223_0
cymem 1.31.2 <pip>
cyrus-sasl 2.1.26 h1dd3434_1
cython 0.26.1 py36h21c49d0_0
cytoolz 0.9.0.1 py36h14c3975_1
dask 0.15.3 py36hdc2c8aa_0
dask-core 0.15.3 py36h10e6167_0
datashape 0.5.4 py36h3ad6b5c_0
dbus 1.13.2 h714fa37_1
decorator 4.1.2 py36hd076ac8_0
dill 0.2.8.2 <pip>
distributed 1.19.1 py36h25f3894_0
docutils 0.14 py36hb0f60f5_0
entrypoints 0.2.3 py36h1aec115_2
et_xmlfile 1.0.1 py36hd6bccc3_0
expat 2.2.5 he0dffb1_0
fastcache 1.0.2 py36h5b0c431_0
filelock 2.0.12 py36hacfa1f5_0
flask 0.12.2 py36hb24657c_0
flask-cors 3.0.3 py36h2d857d3_0
font-ttf-dejavu-sans-mono 2.37 h6964260_0
font-ttf-inconsolata 2.001 hcb22688_0
font-ttf-source-code-pro 2.030 h7457263_0
font-ttf-ubuntu 0.83 h8b1ccd4_0
fontconfig 2.13.0 h9420a91_0
fonts-anaconda 1 h8fa9717_0
freetype 2.9.1 h8a8886c_0
fribidi 1.0.4 h14c3975_0
ftfy 4.4.3 <pip>
funcy 1.10.3 <pip>
future 0.16.0 <pip>
fuzzywuzzy 0.17.0 <pip>
get_terminal_size 1.0.0 haa9412d_0
gevent 1.2.2 py36h2fe25dc_0
glib 2.56.1 h000015b_0
glob2 0.5 py36h2c1b292_1
gmp 6.1.2 hb3b607b_0
gmpy2 2.0.8 py36h55090d7_1
graphite2 1.3.11 h16798f4_2
greenlet 0.4.12 py36h2d503a6_0
gsl 2.2.1 h0c605f7_3
gst-plugins-base 1.14.0 hbbd80ab_1
gstreamer 1.14.0 hb453b48_1
h5py 2.7.0 py36he81ebca_1
harfbuzz 1.8.4 hec2c2bc_0
hdf5 1.10.1 hb0523eb_0
heapdict 1.0.0 py36h79797d7_0
html5lib 0.999999999 py36h2cfc398_0
icu 58.2 h211956c_0
idna 2.6 py36h82fb2a8_1
ijson 2.3 <pip>
imageio 2.2.0 py36he555465_0
imagesize 0.7.1 py36h52d8127_0
intel-openmp 2018.0.0 h15fc484_7
ipykernel 4.6.1 py36hbf841aa_0
ipython 6.1.0 py36hc72a948_1
ipython_genutils 0.2.0 py36hb52b0d5_0
ipywidgets 7.0.0 py36h7b55c3a_0
isort 4.2.15 py36had401c0_0
itsdangerous 0.24 py36h93cc618_1
jbig 2.1 hdba287a_0
jdcal 1.3 py36h4c697fb_0
jedi 0.10.2 py36h552def0_0
jeepney 0.3.1 py36_0
jinja2 2.9.6 py36h489bce4_1
joblib 0.12.4 <pip>
jpeg 9b habf39ab_1
jsonschema 2.6.0 py36h006f8b5_0
jupyter 1.0.0 py36h9896ce5_0
jupyter_client 5.1.0 py36h614e9ea_0
jupyter_console 5.2.0 py36he59e554_1
jupyter_core 4.3.0 py36h357a921_0
jupyterlab 0.27.0 py36h86377d0_2
jupyterlab_launcher 0.4.0 py36h4d8058d_0
keyring 13.2.1 py36_0
kiwisolver 1.0.1 py36hf484d3e_0
krb5 1.14.2 hcdc1b81_6
lazy-object-proxy 1.3.1 py36h10fcdad_0
libedit 3.1 heed3624_0
libffi 3.2.1 h4deb6c0_3
libgcc-ng 7.2.0 h7cc24e2_2
libgfortran-ng 7.2.0 h9f7466a_2
libntlm 1.4 h14c3975_2
libpng 1.6.34 hb9fc6fc_0
libsodium 1.0.13 h31c71d8_2
libssh2 1.8.0 h8c220ad_2
libstdcxx-ng 7.2.0 h7a57d05_2
libtiff 4.0.9 he85c1e1_1
libtool 2.4.6 hd50d1a6_0
libuuid 1.0.3 h1bed415_2
libxcb 1.13 h1bed415_1
libxml2 2.9.8 h26e45fe_1
libxslt 1.1.29 hcf9102b_5
llvmlite 0.20.0 py36_0
locket 0.2.0 py36h787c0ad_1
lxml 4.1.0 py36h5b66e50_0
lzo 2.10 h1bfc0ba_1
markupsafe 1.0 py36hd9260cd_1
matplotlib 2.2.3 py36hb69df0a_0
mccabe 0.6.1 py36h5ad9710_1
mistune 0.7.4 py36hbab8784_0
mkl 2018.0.3 1
mkl-service 1.1.2 py36h17a0993_4
mkl_fft 1.0.4 py36h4414c95_1
mkl_random 1.0.1 py36h4414c95_1
mpc 1.0.3 hf803216_4
mpfr 3.1.5 h12ff648_1
mpmath 0.19 py36h8cc018b_2
msgpack 0.5.6 <pip>
msgpack-numpy 0.4.3.1 <pip>
msgpack-python 0.4.8 py36hec4c5d1_0
multipledispatch 0.4.9 py36h41da3fb_0
murmurhash 0.28.0 <pip>
navigator-updater 0.1.0 py36h14770f7_0
nbconvert 5.3.1 py36hb41ffb7_0
nbformat 4.4.0 py36h31c9010_0
ncurses 6.0 h06874d7_1
networkx 2.0 py36h7e96fb8_0
nltk 3.2.4 py36h1a0979f_0
nose 1.3.7 py36hcdf7029_2
notebook 5.2.2 py36h40a37e6_0
numba 0.35.0 np113py36_10
numexpr 2.6.2 py36hdd3393f_1
numpy 1.15.0 py36h1b885b7_0
numpy-base 1.15.0 py36h3dfced4_0
numpydoc 0.7.0 py36h18f165f_0
odo 0.5.1 py36h90ed295_0
olefile 0.44 py36h79f9f78_0
openpyxl 2.4.8 py36h41dd2a8_1
openssl 1.0.2p h14c3975_0
packaging 16.8 py36ha668100_1
pandas 0.23.4 py36h04863e7_0
pandoc 1.19.2.1 hea2e7c5_1
pandocfilters 1.4.2 py36ha6701b7_1
pango 1.42.3 h8589676_0
partd 0.3.8 py36h36fd896_0
patchelf 0.9 hf79760b_2
path.py 10.3.1 py36he0c6f6d_0
pathlib2 2.3.0 py36h49efa8e_0
patsy 0.4.1 py36ha3be15e_0
pcre 8.42 h439df22_0
pep8 1.7.0 py36h26ade29_0
pexpect 4.2.1 py36h3b9d41b_0
pickleshare 0.7.4 py36h63277f8_0
pillow 5.2.0 py36heded4f4_0
pip 18.0 <pip>
pip 9.0.1 py36h8ec8b28_3
pixman 0.34.0 h83dc358_2
pkginfo 1.4.1 py36h215d178_1
plac 0.9.6 <pip>
ply 3.10 py36hed35086_0
preshed 1.0.1 <pip>
prompt_toolkit 1.0.15 py36h17d85b1_0
psutil 5.4.0 py36h84c53db_0
ptyprocess 0.5.2 py36h69acd42_0
py 1.4.34 py36h0712aa3_1
pycodestyle 2.3.1 py36hf609f19_0
pycosat 0.6.3 py36h0a5515d_0
pycparser 2.18 py36hf9f622e_1
pycrypto 2.6.1 py36h6998063_1
pycurl 7.43.0 py36h5e72054_3
pyemd 0.5.1 <pip>
pyflakes 1.6.0 py36h7bd6a15_0
pygments 2.2.0 py36h0d3125c_0
pyLDAvis 2.1.2 <pip>
pylint 1.7.4 py36hb9d4533_0
pyodbc 4.0.17 py36h999153c_0
pyopenssl 17.2.0 py36h5cc804b_0
pyparsing 2.2.0 py36hee85983_1
Pyphen 0.9.5 <pip>
pyqt 5.9.2 py36h22d08a2_0
pysocks 1.6.7 py36hd97a5b1_1
pytables 3.4.2 py36h3b5282a_2
pytest 3.2.1 py36h11ad3bb_1
python 3.6.3 hc9025b9_1
python-dateutil 2.6.1 py36h88d3b88_1
python-Levenshtein 0.12.0 <pip>
pytz 2017.2 py36hc2ccc2a_1
pywavelets 0.5.2 py36he602eb0_0
pyyaml 3.12 py36hafb9ca4_1
pyzmq 16.0.2 py36h3b0cf96_2
qt 5.9.6 h52aff34_0
qtawesome 0.4.4 py36h609ed8c_0
qtconsole 4.3.1 py36h8f73b5b_0
qtpy 1.5.0 py36_0
r-assertthat 0.2.0 r342h06193eb_0
r-backports 1.1.1 r342h9a9f1f2_0
r-base 3.4.2 haf99962_0
r-base64enc 0.1_3 r342h7c929ec_4
r-bh 1.65.0_1 r342h2d7c2ce_0
r-bindr 0.1 r342hdee8079_0
r-bindrcpp 0.2 r342h4ea5b31_0
r-bit 1.1_12 r342h7a05cba_0
r-bit64 0.9_7 r342hcc44603_0
r-bitops 1.0_6 r342hd891396_4
r-blob 1.1.0 r342hf606c5c_0
r-boot 1.3_20 r342ha5ac741_0
r-broom 0.4.2 r342h90c284a_0
r-caret 6.0_77 r342h201f268_0
r-catools 1.17.1 r342hf01772b_4
r-cellranger 1.1.0 r342h51baf57_0
r-class 7.3_14 r342h4797347_4
r-cluster 2.0.6 r342hcb72a25_0
r-codetools 0.2_15 r342hc9ffb9b_0
r-colorspace 1.3_2 r342h81b277d_0
r-config 0.2 r342hcf13b6a_0
r-crayon 1.3.4 r342h0ed458a_0
r-curl 3.0 r342hba591e3_0
r-cvst 0.2_1 r342h830f301_0
r-data.table 1.10.4_1 r342h3908b10_0
r-dbi 0.7 r342h835dbd3_0
r-dbplyr 1.1.0 r342h3750f00_0
r-ddalpha 1.3.1 r342hd2d3f94_0
r-deoptimr 1.0_8 r342h996e1ad_0
r-dichromat 2.0_0 r342h341c752_4
r-digest 0.6.12 r342hee14287_0
r-dimred 0.1.0 r342hb158d3e_0
r-dplyr 0.7.4 r342hee63e26_0
r-drr 0.0.2 r342h0fe108c_0
r-essentials 1.7.0 r342hf65ed6a_0
r-evaluate 0.10.1 r342hb679cc2_0
r-forcats 0.2.0 r342h5fcb364_0
r-foreach 1.4.3 r342h49221b0_4
r-foreign 0.8_69 r342hbd6b6bb_0
r-formatr 1.5 r342h0e06a18_0
r-ggplot2 2.2.1 r342h8b6cf70_0
r-gistr 0.4.0 r342h5cd5773_0
r-glmnet 2.0_13 r342h0aac7f1_0
r-glue 1.1.1 r342h3154e12_0
r-gower 0.1.2 r342h54e18f5_0
r-gtable 0.2.0 r342h8e3b2c8_0
r-haven 1.1.0 r342h8909e7d_0
r-hexbin 1.27.1 r342h72fd8d9_4
r-highr 0.6 r342h2351100_0
r-hms 0.3 r342ha729a9b_0
r-htmltools 0.3.6 r342h4080c21_0
r-htmlwidgets 0.9 r342h7fcc9b6_0
r-httpuv 1.3.5 r342ha5ddd88_0
r-httr 1.3.1 r342h7aba7de_0
r-ipred 0.9_6 r342h7d58d5b_0
r-irdisplay 0.4.4 r342hc31a1b2_0
r-irkernel 0.8.9 r342hfe3cb8f_0
r-iterators 1.0.8 r342h4caec00_4
r-jsonlite 1.5 r342hf92f79e_0
r-kernlab 0.9_25 r342hd770e69_0
r-kernsmooth 2.23_15 r342hdc3efa4_4
r-knitr 1.17 r342h6500ef9_0
r-labeling 0.3 r342h7c30189_4
r-lattice 0.20_35 r342h0f762c2_0
r-lava 1.5.1 r342h598eca9_0
r-lazyeval 0.2.0 r342h346dbdc_0
r-lubridate 1.6.0 r342h47739ec_0
r-magrittr 1.5 r342h895a831_4
r-maps 3.2.0 r342h79c810f_0
r-markdown 0.8 r342h4cc6e3e_0
r-mass 7.3_47 r342hd8605c9_0
r-matrix 1.2_11 r342h3a55fe1_0
r-mgcv 1.8_22 r342h176cc83_0
r-mime 0.5 r342h01856a9_0
r-miniui 0.1.1 r342h33c7739_0
r-mnormt 1.5_5 r342he1a489d_0
r-modelmetrics 1.1.0 r342h5a23eb1_0
r-modelr 0.1.1 r342heb933ea_0
r-mongolite 1.2 r342hdcf03d2_0
r-munsell 0.4.3 r342h79883fb_0
r-nlme 3.1_131 r342h7f704e8_0
r-nnet 7.3_12 r342ha98c111_0
r-numderiv 2016.8_1 r342h12eb246_0
r-odbc 1.1.2 r342hf7c7794_0
r-openssl 0.9.7 r342h1e3c16d_0
r-packrat 0.4.8_1 r342h7bab2f7_0
r-pbdzmq 0.2_6 r342h934a24f_0
r-pkgconfig 2.0.1 r342h5d9b92e_0
r-pki 0.1_5.1 r342hba91d42_0
r-plogr 0.1_1 r342h6d7f4c2_0
r-plyr 1.8.4 r342h876901b_0
r-prodlim 1.6.1 r342hd95c883_0
r-profvis 0.3.3 r342h36dbb6c_0
r-pryr 0.1.2 r342hf3bf84b_0
r-psych 1.7.8 r342h1e2dc86_0
r-purrr 0.2.3 r342h7916a1c_0
r-quantmod 0.4_11 r342h9c9c021_0
r-r6 2.2.2 r342hcc750b5_0
r-randomforest 4.6_12 r342h41e62a9_4
r-rappdirs 0.3.1 r342h03ed50e_0
r-rbokeh 0.5.0 r342h257354a_0
r-rcolorbrewer 1.1_2 r342h0dda8fb_0
r-rcpp 0.12.13 r342h9f83869_0
r-rcpproll 0.2.2 r342hdd0cc16_0
r-rcurl 1.95_4.8 r342hecb3894_0
r-readr 1.1.1 r342hb25467c_0
r-readxl 1.0.0 r342h1e5739b_0
r-recipes 0.1.0 r342h0924b81_0
r-recommended 3.4.2 h1751db4_0
r-rematch 1.0.1 r342he3f91f1_0
r-repr 0.12.0 r342hde08b23_0
r-reshape2 1.4.2 r342h2e254a0_0
r-rjava 0.9_9 r342h9890981_0
r-rjdbc 0.2_5 r342he0388cf_0
r-rjsonio 1.3_0 r342h5685322_4
r-rlang 0.1.2 r342hc878738_0
r-rmarkdown 1.6 r342hacd9e3e_2
r-robustbase 0.92_7 r342h6021a74_0
r-rpart 4.1_11 r342hd35cc14_0
r-rprojroot 1.2 r342hd69aa9e_0
r-rsconnect 0.8.5 r342h3a8d77b_0
r-rstudioapi 0.7 r342hedff9e9_0
r-rvest 0.3.2 r342h8e81af5_0
r-scales 0.5.0 r342h876bdd3_0
r-selectr 0.3_1 r342hd6c1ff9_0
r-sfsmisc 1.1_1 r342hadb04b4_0
r-shiny 1.0.5 r342hc0a01ce_0
r-sourcetools 0.1.6 r342h519fec0_0
r-sparklyr 0.6.3 r342hac80a45_0
r-spatial 7.3_11 r342hff2a1d0_4
r-stringi 1.1.5 r342h15434fd_0
r-stringr 1.2.0 r342h701d218_0
r-survival 2.41_3 r342hac888f2_0
r-tibble 1.3.4 r342h041fa31_0
r-tidyr 0.7.1 r342h1bc61e7_0
r-tidyselect 0.2.2 r342h04f720c_0
r-tidyverse 1.1.1 r342hf9e2102_0
r-timedate 3012.100 r342h48d2e88_4
r-ttr 0.23_2 r342hf82c04a_0
r-uuid 0.1_2 r342h1393287_4
r-viridislite 0.2.0 r342h3706391_0
r-withr 2.0.0 r342hfa1897f_0
r-xml2 1.1.1 r342h3ff9a91_0
r-xtable 1.8_2 r342hb75f6e7_0
r-xts 0.10_0 r342h17852d6_4
r-yaml 2.1.14 r342h72d8650_0
r-zoo 1.8_0 r342h9faeba2_0
readline 7.0 hac23ff0_3
regex 2017.4.5 <pip>
repoze.lru 0.7 <pip>
requests 2.18.4 py36he2e5f8d_1
rope 0.10.5 py36h1f8c17e_0
rstudio 1.1.383 h2c9cdda_2
ruamel_yaml 0.11.14 py36ha2fb22d_2
scikit-image 0.13.0 py36had3c07a_1
scikit-learn 0.19.1 py36h7aa7ec6_0
scipy 0.19.1 py36h9976243_3
seaborn 0.8.0 py36h197244f_0
secretstorage 3.1.0 py36_0
setuptools 36.5.0 py36he42e2e1_0
simplegeneric 0.8.1 py36h2cb9092_0
singledispatch 3.4.0.3 py36h7a266c3_0
sip 4.19.8 py36hf484d3e_0
six 1.11.0 py36h372c433_1
snowballstemmer 1.2.1 py36h6febd40_0
sortedcollections 0.5.3 py36h3c761f9_0
sortedcontainers 1.5.7 py36hdf89491_0
spacy 2.0.12 <pip>
sphinx 1.6.3 py36he5f0bdb_0
sphinxcontrib 1.0 py36h6d0f590_1
sphinxcontrib-websupport 1.0.1 py36hb5cb234_1
spyder 3.3.1 py36_1
spyder-kernels 0.2.4 py36_0
sqlalchemy 1.1.13 py36hfb5efd7_0
sqlite 3.23.1 he433501_0
statsmodels 0.8.0 py36h8533d0b_0
sympy 1.1.1 py36hc6d1c1c_0
tblib 1.3.2 py36h34cf8b6_0
terminado 0.6 py36ha25a19f_0
testpath 0.3.1 py36h8cadb63_0
textacy 0.6.2 <pip>
textstat 0.4.1 <pip>
thinc 6.10.3 <pip>
tk 8.6.7 h5979e9b_1
toolz 0.8.2 py36h81f2dff_0
tornado 4.5.2 py36h1283b2a_0
tqdm 4.26.0 <pip>
traitlets 4.3.2 py36h674d592_0
typing 3.6.2 py36h7da032a_0
ujson 1.35 <pip>
unicodecsv 0.14.1 py36ha668878_0
Unidecode 1.0.22 <pip>
unixodbc 2.3.4 hc36303a_1
urllib3 1.22 py36hbe7ace6_0
wcwidth 0.1.7 py36hdf4376a_0
webencodings 0.5.1 py36h800622e_1
werkzeug 0.12.2 py36hc703753_0
wheel 0.29.0 py36he7f4e38_1
widgetsnbextension 3.0.2 py36hd01bb71_1
wrapt 1.10.11 py36h28b7045_0
xlrd 1.1.0 py36h1db9f0c_1
xlsxwriter 1.0.2 py36h3de1aca_0
xlwt 1.3.0 py36h7b00a1f_0
xz 5.2.4 h14c3975_4
yaml 0.1.7 h96e3832_1
zeromq 4.2.2 hb0b69da_1
zict 0.1.3 py36h3a3bf81_0
zlib 1.2.11 hfbfcf68_1
</pre>
</html>
<html>
<code><pre>
python -c 'import locale; print(locale.getpreferredencoding())'
</pre></code>
</html>
<html>
<ul>
<li><h3>dir ‐ Funktion</h3>
<code><pre>print(dir(<<em>moduleName</em>>))</pre></code>
</li>
<li><h3>inspect ‐ Funktion</h3>
Vorher die benötigten Funktionen importieren:
<code><pre>from instpect import getmembers, isfunction</pre></code>
⇒ Aufruf:
<code><pre>print(getmembers(<<em>moduleName</em>>, isfunction))</pre></code>
Statt <code><b>isfunction</b></code> stehen noch folgende Funktionen zur Verfügung:<br />
<table>
<tr align="center"><th>Funktion</th><th> Bedeutung</th></tr>
<tr><td>ismodule()</td><td> Gibt True zurück, wenn das Objekt ein Modul ist.</td></tr>
<tr><td>isclass()</td><td> Gibt True zurück, wenn das Objekt eine Klasse ist.</td></tr>
<tr><td>istraceback()</td><td> Gibt True zurück, wenn das Objekt ein Traceback ist.</td></tr>
<tr><td>isgenerator()</td><td> Gibt True zurück, wenn das Objekt ein Generator ist.</td></tr>
<tr><td>iscode()</td><td> Gibt True zurück, wenn das Objekt ein Code ist.</td></tr>
<tr><td>isframe()</td><td> Gibt True zurück, wenn das Objekt ein Frame ist.</td></tr>
<tr><td>isabstract()</td><td> Gibt True zurück, wenn das Objekt eine abstrakte Basisklasse ist.</td></tr>
<tr><td>iscoroutine()</td><td> Gibt True zurück, wenn das Objekt eine Coroutine ist.</td></tr>
</table>
</li>
<li><h3>help ‐Funktion</h3>
<code><pre>help(<<em>moduleName</em>>)</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.delftstack.com/de/howto/python/python-list-functions-in-module/" target="_blank" rel="noreferrer noopener">
DelftStack :: Alle Methoden eines Python-Moduls auflisten</a></li>
</ul>
</html>
<html>
<ul>
<li>es gibt aktuell zwei Versionen, die <b>nicht</b> zueinander kompatibel sind: <br />
<ul>
<li>Vers. 2.x (genauer: 2.7)</li>
<li> Vers. 3.x (genauer: 3.2 und aufwärts)</li>
</ul></li></br>
<li>Jupyter (Notebook)</li>
<br />
<li>Cython</li>
<br />
<li><b>IPython :: </b><br />
<ul>
<li>Aufruf “Inline Pylab mode“ : <code><b>ipython notebook ‐‐pylab=inline</b></code><br />
⇒ dies ruft mit IPython Notebook eine PyLab-Umgebung auf, <br />
die u.a. einige nützliche Bibliotkeken (automatisch) importiert.<br />
⇒ ermöglicht “interactive data analysis“
</li>
</ul>
</li>
<br />
<li><a href="https://wiki.python.org/moin/EclipsePythonIntegration" target="_blank">Using Eclipse as a Python editor</a></li>
<br />
<li><a href="https://wiki.fernuni-hagen.de/eclipse/index.php/Python_in_Eclipse" target="_blank">FernUni Hagen :: Python in Eclipse</a></li>
</ul>
</html>
<html>
<h3>Installation von neuen Paketen</h3>
<h4>... über die GUI</h4>
<ul>
<li>Umgebung auswählen</li>
<li>im rechten Bereich, in der Paket-Liste <br />
das/die gewünschte(n) Paket(e) anklicken</li>
<li>zum Starten der Installation auf den “APPLY“-Button klicken</li>
</ul>
<h4>... über die CmdLine</h4>
<ul>
<li>Umgebung im Navigator auswählen, <br />
markieren & die RMT drücken <br />
Terminal-Fenster / Shell öffnen</li>
<li>Alternativ im Konsolen-/Terminalfenster:<br />
<code><b>source activate <i>environmnet</i></b></code></li>
<li>Prompt überprüfen (er muss die gewünschte Umgebung angeben)</li>
<li>Befehl eingeben:<br />
<code><b>conda install scipy [ = <i>Version</i> ]</b></code></li>
<li></li>
</ul>
<h3>Auflisten der installierten Packages:</h3>
<ul>
<li>Falls noch nicht getan: Die Umgebung (s.o.) aktivieren</li>
<li>In einem Shell-Fenster den Befehl<code><pre>$ conda list</pre></code> eingeben</li>
</ul>
<h3>Aktualisierung von Paketen / Packages:</h3>
<ul>
<li>Gewünschte Umgebung auswählen;</li>
<li>In einem Shell-Fenster den Befehl<code><pre>
$ conda update <i>Package-Namen</i>
</pre></code> eingeben</li>
</ul>
<h3>Liste der installierten Paketen / Packages sichern:</h3>
In einem Shell-Fenster den Befehl<code><pre>
$ conda list ‐‐export > package-list.txt
</pre></code> eingeben
<br />
<h3>Liste der verfügbaren Anaconda-Paketen / Packages anzeigen:</h3>
<a href="https://docs.anaconda.com/anaconda/packages/pkg-docs" target=_blank>Anaconda :: Package list</a>
<br />
</html>
<html>
<ul>
<li>a complete, open source data science package</li>
<li><h3>Aktivierung einer Umgebung:</h3>
Vor dem Starten des Anaconda-Navigators muß das ent-<br />
sprechende Conda-Environment aktiviert werden:<br />
<ul>
<li> in einem Terminal, auf Shell-Ebene:
<code><pre>
source /home/mueller/anaconda3/bin/activate root
</pre></code>dann ist der Anaconda-Prompt zu sehen, hier: (base)<br />
<img src="./pictures/anaconda_activating_env.png" height=60 width=615 /><br />
Gleichzeitig wird die Linux-Umgebungsvariable <code><b>$PATH</b></code> <br />
um den Pfad zum Anaconda-/bin‐Verzeichnis erweitert</li><br />
<li>dann der Aufruf des Navigators:<br />
<code><pre>./anaconda-navigator</pre></code></li>
</ul>
Um die Umgebung wieder zu de-aktivieren, einfach:
<code><pre>
source /home/mueller/anaconda3/bin/deactivate root
</pre></code>eingeben.
</li>
<li><h3>Aktualisierung von Anaconda:</h3>
In einem Shell-Fenster den Befehl<code><pre>
$ conda update -n base conda
</pre></code> eingeben</li><br />
<br />
<li>For more information please see the documentation at:<br />
<a href="https://docs.anaconda.com/anaconda/navigator/" target="_blank">Homepage Anaconda</a>
</li><br />
<li>Die Suche nach "Grammar of Graphics" ergab folgendes Ergebnis:<br />
<a href="https://ramnathv.github.io/pycon2014-r/" target="_blank">Introduction to R</a>
</li><br />
<li>
</li><br />
<li>
</li><br />
</ul>
</ul>
<h3>Links:</h3>
<a href="https://opensource.com/article/18/4/getting-started-anaconda-python" target=_blank>OpenSource.com :: Getting started with Anaconda Python for data science</a>
</html>
<html>
<h3>Erstellen einer Umgebung:</h3>
<ul>
<li>Aufruf “Anaconda-Navigator“</li>
<li>⇒ Menü links, Eintrag “Environment“ auswählen</li>
<li>⇒ drei Bereiche : <ol><li>Menü,</li><li>Environment-Liste und</li><li>die Liste der für das Environment installierten Pakete</li></ol></li>
<li>⇒ in der Environment-Liste (mittlerer Bereich) <br />unten den Button “Create“ anklicken</li>
<li>⇒ neues Fenster erscheint; <br />
hier den Namen eingeben und die gewünschte Version von z.B. Python anklcken</li>
</ul>
</html>
<html>
<ul>
<li>Das File wird beim Paket-Bau und der Installation des jeweiligen Pakets benötigt.<br />
Sein Zweck ist die korrekte Installation der Software.</li>
<br />
<li>The file “<code><b>setup.py</b></code>“ needs to be placed in the root dir<br />
of your package:
<code><pre>
setup.py
src/
__init__.py
app.py
view.py
...
tests/
test_app.py
test_view.py
...
</pre></code> </li><br />
<li>The minimum content must be as follows:
<code><pre>
from setuptools import setup, find_packages
setup(name="<i>PACKAGENAME</i>", packages=find_packages())
</pre></code>
Where <i>PACKAGENAME</i> is the name of your package.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://godatadriven.com/blog/a-practical-guide-to-using-setup-py/" target=_blank>GoDataDriven :: setup.py ‐ Practical guide</a></li>
<li><a href="https://codingcompiler.com/python-setup-py/" target=_blank>CodingCompiler :: setup.py</a></li>
</ul>
</html>
<html>
<ul>
<li>Files name __init__.py are used to mark directories <br />
on disk as Python package directories. </li><br />
<li>If you remove the __init__.py file, Python will no longer<br />
look for submodules inside that directory, so attempts to<br />
import the module will fail.</li><br />
<li>The __init__.py file is usually empty, but can be used <br />
to export selected portions of the package under more<br />
convenient name, hold convenience functions, etc. </li>
</ul>
<h3>Link:</h3>
<a href="https://pythontips.com/2013/07/28/what-is-__init__-py/" target=_blank>Python Tips :: What is __init__.py?</a>
</html>
<html>
<h2>Data Science</h2>
Finance professionals involved in data analytics and data science make <br />
use of R, Python and other programming languages to perform analysis<br />
on a variety of data sets. Python has been gathering a lot of interest and<br />
is becoming a language of choice for data analysis. Python also has a <br />
very active community which doesn't shy from contributing to the growth<br />
of python libraries. If you search on Github, a popular code hosting plat‐<br />
form, you will see that there is a python package to do almost anything‐<br />
you want.<br />
<br />
This article provides a list of the best python packages and libraries used<br />
by finance professionals, quants, and financial data scientists.
<h2>Numerical, Statistical & Data Structures</h2>
<ul>
<li><h3>numpy</h3>
NumPy is the fundamental package for scientific computing with Python. It<br />
is a first-rate library for numerical programming and is widely used in aca‐<br />
demia, finance, and industry. NumPy specializes in basic array operations.</li>
<li><h3>scipy</h3>
SciPy supplements the popular Numeric module, Numpy. It is a Python‐<br />
based ecosystem of open-source software for mathematics, science, and<br />
engineering. It is also used intensively for scientific and financial computation<br />
based on Python</li>
<li><h3>pandas</h3>The pandas library provides high-performance, easy-to-use data structures and data analysis tools for the Python programming language. Pandas focus is on the fundamental data types and their methods, leaving other packages to add more sophisticated statistical functionality</li>
<li><h3>quantdsl</h3>Quand DSL is domain specific language for quantitative analytics in finance and trading. Quant DSL is a functional programming language for modeling derivative instruments.</li>
<li><h3>statistics</h3>This is a built-in Python library for all basic statistical calculations</li>
</ul>
<h2>Financial Instruments</h2>
<ul>
<li><h3>pyfin</h3> Pyfin is a python library for performing basic options pricing in python</li>
<li><h3>vollib</h3> vollib is a python library for calculating option prices, implied volatility and greeks using Black, Black-Scholes, and Black-Scholes-Merton. vollib implements both analytical and numerical greeks for each of the three pricing formulae.</li>
<li><h3>QuantPy</h3>A framework for quantitative finance In python. Some current capabilities: Portfolio class that can import daily returns from Yahoo, Calculation of optimal weights for Sharpe ratio and efficient frontier, and event profiler</li>
<li><h3>ffn</h3>A financial function library for Python. ffn is a library that contains many useful functions for those who work in quantitative finance. It stands on the shoulders of giants (Pandas, Numpy, Scipy, etc.) and provides a vast array of utilities, from performance measurement and evaluation to graphing and common data transformations.</li>
<li><h3>pynance</h3>PyNance is open-source software for retrieving, analyzing and visualizing data from stock and derivatives markets. It includes tools for generating features and labels for machine learning algorithms.</li>
<li><h3>tia</h3>TIA is a toolkit that provides Bloomberg data access, easier pdf generation, backtesting functionality, technical analysis functionality, return analysis and few windows utils.</li>
</ul>
<h2>Trading & Backtesting</h2>
<ul>
<li><h3>TA-Lib</h3>TA-Lib is widely used by trading software developers requiring to perform technical analysis of financial market data. It has an open-source API for python.</li>
<li><h3>trade</h3>trade is a Python framework for the development of financial applications. A trade app works like a service. The user informs the items he has in stock and a series of subsequent occurrences (purchases, sales, whatsoever) with those or other items. trade then calculates the effects of those occurrences and gives back the new amounts and costs of the items in stock.</li>
<li><h3>zipline</h3>Zipline is a Pythonic algorithmic trading library. It is an event-driven system that supports both backtesting and live trading.</li>
<li><h3>QuantSoftware Toolkit</h3>Python-based open source software framework designed to support portfolio construction and management. It is built the QSToolKit primarily for finance students, computing students, and quantitative analysts with programming experience.</li>
<li><h3>quantitative</h3>Quantitative finance, and backtesting library. Quantitative is an event driven and versatile backtesting library.</li>
<li><h3>analyzer</h3>Python framework for real-time financial and backtesting trading strategies</li>
<li><h3>bt</h3>bt is a flexible backtesting framework for Python used to test quantitative trading strategies.</li>
<li><h3>backtrader</h3>Python Backtesting library for trading strategies</li>
<li><h3>pybacktest</h3>Vectorized backtesting framework in Python / pandas, designed to make your backtesting easier. It allows users to specify trading strategies using full power of pandas, at the same time hiding all boring things like manually calculating trades, equity, performance statistics and creating visualizations. Resulting strategy code is usable both in research and production setting.</li>
<li><h3>pyalgotrade</h3>PyAlgoTrade is an event driven algorithmic trading Python library. Although the initial focus was on backtesting, paper trading is now possible</li>
<li><h3>tradingWithPython</h3>A collection of functions and classes for Quantitative trading</li>
<li><h3>pandas_talib</h3>A Python Pandas implementation of technical analysis indicators</li>
<li><h3>algobroker</h3>This is an execution engine for algo trading. The idea is that this python server gets requests from clients and then forwards them to the broker API.</li>
<li><h3>finmarketpy</h3>finmarketpy is a Python based library that enables you to analyze market data and also to backtest trading strategies using a simple to use API, which has prebuilt templates for you to define backtest.</li>
</ul>
<h2>Risk Analysis</h2>
<ul>
<li><h3>pyfolio</h3>pyfolio is a Python library for performance and risk analysis of financial portfolios. It works well with the Zipline open source backtesting library.</li>
<li><h3>empyrical</h3>Common financial risk and performance metrics. Used by zipline and pyfolio.</li>
<li><h3>finance</h3>Financial Risk Calculations. Optimized for ease of use through class construction and operator overload.</li>
<li><h3>qfrm</h3>Quantitative Financial Risk Management: awesome OOP tools for measuring, managing and visualizing risk of financial instruments and portfolios.</li>
<li><h3>visualize-wealth</h3>A library built in Python to construct, backtest, analyze, and evaluate portfolios and their benchmarks.</li>
<li><h3>VisualPortfolio</h3>This tool is used to visualize the performance of a portfolio.</li>
</ul>
<h2>Time Series</h2>
<ul>
<li><h3>ARCH</h3>ARCH and other tools for financial econometrics in Python.</li>
<li><h3>statsmodels</h3>Python module that allows users to explore data, estimate statistical models, and perform statistical tests.</li>
<li><h3>dynts</h3>A statistic package for python with emphasis on time series analysis. Built around numpy, it provides several back-end time series classes including R-based objects via rpy2.</li>
</ul>
Stand: Juli 2020<br />
<br />
(<a href="https://financetrain.com/best-python-librariespackages-finance-financial-data-scientists/" target=_blank>FinanceTrain :: Python libraries</a>)<br />
<br />
</html>
<html>
<ul>
<li>Um überlange Zeilen umzubrechen, gibt es folgende Möglichkeiten:<br />
<br />
<ol>
<li>Klammern, <b>(…)</b><br />
<code><pre>s = ('Area: {0}, Estimated ({1}): {2}'
.format(area_of_circle, points, estimate(radius, points)))</pre></code></li>
<li>Zeilen-Fortsetzungs-Operator, <b>\</b><br />
<code><pre>s3 = x + x**2/2 + x**3/3 \
+ x**4/4 + x**5/5 \
+ x**6/6 + x**7/7 \
+ x**8/8
</pre></code>
</li></ol></li>
<li>Bei print-Statements ist darauf zu achten, den String in Einzelteile zu “zerlegen“:
<code><pre> print(f'Die {counter_nth_perfect_number}.te vollkommene',\
f' Zahl gefunden: {number_to_check}\n')
</pre></code></li>
<li>Ist in einem print-Statement ein Wert, dann ist darauf zu achten, den String nach dem Wert umzubrechen:
<code><pre>print('Mein Name ist Jens und ich bin', 56 , \
'Jahre alt. Im EDV-Sektor bin ich seit über', 35 , \
'Jahren und finde es immer noch interessant.')
</pre></code></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://doingmathwithpython.github.io/breaking-long-lines-in-python.html" target=_blank>Doing Math with Python :: Breaking long lines in Python</a></li>
<li><a href="https://www.interviewqs.com/ddi_code_snippets/break_long_line_python" target=_blank>InterviewQ.com :: Break long lines in Python</a></li>
</ul>
</html>
<html>
<h1><a href="https://www.pythoncheatsheet.org/" target=_blank>Python cheat sheet</a></h1>
</html>
<html>
<ol>
<li><b>Declutter the repo</b> (Das Repo entrümpeln!)</li>
<li><b>No passwords in the code</b></li>
<li><b></b></li>
<li><b></b></li>
<li><b></b></li>
<li><b></b></li>
<li><b></b></li>
<li><b></b></li>
<li><b></b></li>
<li><b></b></li>
<li><b></b></li>
<li><b></b></li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://imankulov.name/posts/python-cleanup/" target=_blank>Roman Imankulov :: Python code cleanup for beginners. 12 steps to readable and maintainable code.</a></li>
</ul>
</html>
<html>
<ul>
<li>für Python 3.6+</li>
<li><h3>Installation:</h3>
<code><pre>pip install black</pre></code></li>
<li><h3>Aufruf:</h3>
<code><pre>black <em>{source_file_or_directory}</em></pre></code>
bzw.
<code><pre>python -m black <em>{source_file_or_directory}</em></pre></code></li>
<li><h3>Liste der Optionen:</h3>
<details><summary><em>Usage & Optionen</em></summary>
<code><pre>Usage: black [OPTIONS] [SRC]...
The uncompromising code formatter.
Options:
-c, --code TEXT Format the code passed in as a string.
-l, --line-length INTEGER How many characters per line to allow.
[default: 88]
-t, --target-version [py27|py33|py34|py35|py36|py37|py38]
Python versions that should be supported by
Black's output. [default: per-file auto-
detection]
--pyi Format all input files like typing stubs
regardless of file extension (useful when
piping source on standard input).
-S, --skip-string-normalization
Don't normalize string quotes or prefixes.
--check Don't write the files back, just return the
status. Return code 0 means nothing would
change. Return code 1 means some files
would be reformatted. Return code 123 means
there was an internal error.
--diff Don't write the files back, just output a
diff for each file on stdout.
--color / --no-color Show colored diff. Only applies when
`--diff` is given.
--fast / --safe If --fast given, skip temporary sanity
checks. [default: --safe]
--include TEXT A regular expression that matches files and
directories that should be included on
recursive searches. An empty value means
all files are included regardless of the
name. Use forward slashes for directories
on all platforms (Windows, too). Exclusions
are calculated first, inclusions later.
[default: \.pyi?$]
--exclude TEXT A regular expression that matches files and
directories that should be excluded on
recursive searches. An empty value means no
paths are excluded. Use forward slashes for
directories on all platforms (Windows, too).
Exclusions are calculated first, inclusions
later. [default: /(\.eggs|\.git|\.hg|\.mypy
_cache|\.nox|\.tox|\.venv|\.svn|_build|buck-
out|build|dist)/]
--force-exclude TEXT Like --exclude, but files and directories
matching this regex will be excluded even
when they are passed explicitly as arguments
-q, --quiet Don't emit non-error messages to stderr.
Errors are still emitted; silence those with
2>/dev/null.
-v, --verbose Also emit messages to stderr about files
that were not changed or were ignored due to
--exclude=.
--version Show the version and exit.
--config FILE Read configuration from FILE path.
-h, --help Show this message and exit.</pre></code></details></li>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://black.readthedocs.io/en/stable/" target=_blank>black - Code formatter (Doku)</a></li>
<li>File "RomanImankulov_Python code cleanup for beginners-12 steps to readable and maintainable code.pdf"</li>
</ul>
</html>
<html>
<ul>
<li>ist optional, kann durch eine Schleife ersetzt werden</li>
<li>dann hilfreich, wenn die “Anweisung“ nicht länger als eine Zeile ist;</li>
<li>wenn es länger wird, dann besser was anderes (Schleife?) verwenden</li>
</ul>
<ul>
<li>Es gibt in Python vier Arten von “comprehensions“:
<ul>
<li><b><code>list comprehensions</code></b></li>
<li><b><code>set comprehensions</code></b></li>
<li><b><code>dictionary comprehensions</code></b></li>
<li><b><code>generator comprehensions</code></b></li>
</ul></li>
<br />
<li>Ziel ist es, auf einfache Weise, <b>Listen</b>, <br />
<b>Mengen / Sets</b> resp. <b>Dictionaries</b> zu erzeugen</li>
<br />
<li><b><code>list comprehensions</code></b>
<ul>
<li>können auch verschachtelt sein</li>
<li>Syntax:</br /><b><code>[ <Berechnung> <Wertebereich> ]</code></b></li>
<li>Beispiel:</br /><b><code>>>> [x for x in range(20) if 3 < x < 15]<br />
[4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]</code></b></li>
</ul>
<br />
<li><b><code>set comprehensions</code></b> :: Syntax</li>
<li><b><code>dictionary comprehensions</code></b> :: Syntax</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.geeksforgeeks.org/comprehensions-in-python/" target=_blank>GeeksForGeeks :: Comprehensions in Python</a></li>
</ul>
</html>
<html>
<ul>
<li><b>Python Standard Concurrency‐Libraries:</b><br />
<ol>
<li><code><b>threading</b></code></li>
<li><code><b>asyncio</b></code></li>
<li><code><b>multiprocessing</b></code></li>
</ol>
<br />
<li><code><b>asyncio</b></code> wurde mit Python 3.4 eingeführt, <br />
erfuhr mit Python 3.7 einen “face lift“;</li>
<br />
<li><b>GIL, “Global Interpreter Lock“ ::</b><br />
<ul>
<li>Mutex (thread lock) ensuring only one thread<br />
controls the interpreter at a time;</li>
<li>to prevent race conditions with memory and reference allocation<br />
(otherwise you end up in memory leaks);</li>
</ul></li>
<li><h4>Typen von Multitasking:</h4>
<ul>
<li><b>No multitasking:</b><br />
Beispiel: DOS operating system</li>
<li><b>Cooperative multitasking:</b><br />
- Program willing gives up CPU<br />
- Signals that it is going into a wait-state<br />
Beispiel: Windows 3.1
<li><b>Pre-emptive multitasking:</b><br />
- Program can be interrupted by the Operating System<br />
Beispiele: Mainframes, Unix based, Windows NT/95 and forward<br />
<br />
<a href="https://de.wikipedia.org/wiki/Multitasking#Präemptives_Multitasking" target="_blank"
rel="noreferrer noopener">Wikipedia :: Präemptives Multitasking</a></li>
</ul>
</li>
<li><h4>Typen von Concurrency:</h4>
- Not all algorithms can take full advantage of concurrency<br />
- <b>Trivial concurrency:</b><br />
Comprised of activities that are independent of each other<br />
No shared data<br />
Example: a web server handling multiple clients at a time<br />
- <b>Shared data concurrency:</b><br />
Software typically has three steps: input, compute, output<br />
Splitting up the compute portion means that co-ordination is required at the input and output stages<br />
May require co-ordination amongst compute nodes<br />
</li>
<br />
<li>verschiedene Python‐Interpreter:<br />
<oL>
<li>Cpython</li>
<li>PyPy</li>
<li>Jython</li>
<li>IronPython</li>
</ol></li>
<li><h4>Subinterpreters</h4>
soll mit PEP 554 als Bestandteil der Stdlib eingeführt werden;<br />
this <em><b>does not</b></em> fix the GIL!</li>
<li><h4>Threads in Python :: <code><b>threading</b></code> </h4></li>
<li><h4>Race conditions </h4></li>
<li><h4>Mulitprocessing mit dem Modul <code><b>multiprocessing</b></code> </h4></li>
<!--
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://realpython.com/courses/speed-python-concurrency/" target=_blank>RealPython :: Speed Up Python With Concurrency</a></li>
</ul>
<h3>Future Readings:</h3>
<ul>
<li>Latency:</li>
<ul>
<li><a href="https://colin-scott.github.io/personal_website/research/interactive_latency.html" target=_blank>Colin Scott :: Interactive latency</a></li>
<li><a href="http://norvig.com/21-days.html" target=_blank>Norvig.com</a></li>
</ul>
<li>Concurrency:</li>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Concurrency_(computer_science)" target=_blank>Wikipedia.en :: Concurrency</a></li>
</ul>
<li>Python GIL:</li>
<ul>
<li><a href="https://realpython.com/python-gil/" target=_blank>RealPython :: GIL</a></li>
<li><a href="https://wiki.python.org/moin/GlobalInterpreterLock" target=_blank>Python‐Wiki :: GIL</a></li>
</ul>
<li>Subinterpreters</li>
<ul>
<li><a href="https://www.python.org/dev/peps/pep-0554/" target=_blank>PEP 554 :: “Multiple Interpreters in the Stdlib“</a></li>
<li><a href="https://medium.com/@carreira.mktp/python-3-9-subinterpreters-and-c-extension-wars-f140f1460fd5" target=_blank>medium.com :: Python 3.9 ‐ Subinterpreters & C‐extension wars</a></li>
</ul>
<li>Old school threading:</li>
<ul>
<li><a href="https://docs.python.org/3/library/threading.html" target=_blank>Python‐Doc :: Threading</a></li>
<li><a href="https://realpython.com/intro-to-python-threading/" target=_blank>RealPython :: Introduction to threading</a></li>
</ul>
<li>Threads and Futures:</li>
<ul>
<li><a href="https://docs.python.org/3/library/concurrent.futures.html" target=_blank>Python‐Doc :: Library “concurrent.futures“</a></li>
</ul>
<li>asyncio:</li>
<ul>
<li><a href="https://realpython.com/async-io-python/" target=_blank>RealPython :: asyncio</a></li>
<li><a href="https://stackoverflow.com/questions/49005651/how-doesasyncio-actually-work/51116910#51116910" target=_blank>StackOverflow.com :: How does asyncio actually works</a></li>
</ul>
<li>Multi-processing:</li>
<ul>
<li><a href="https://docs.python.org/3/library/multiprocessing.html" target=_blank>Python‐Doc :: Library “multiprocessing“</a></li>
<li><a href="http://zetcode.com/python/multiprocessing/" target=_blank>ZetCode.com :: Multiprocessing</a></li>
</ul>
<li>Distributed computing:</li>
<ul>
<li>Amazon Web Services, Google Cloud Platform, and Azure</li>
<li><a href="https://wiki.python.org/moin/DistributedProgramming" target=_blank>Python‐Wiki :: Distributed programming</a></li>
<li><a href="https://distributed.dask.org/en/latest/" target=_blank>Distributed Dask</a></li>
<li><a href="https://celeryproject.org" target=_blank>Celery Project</a></li>
</ul>
</ul>
<!--
<li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li>
-->
</ul>
</html>
<html>
<h3>Conda basics</h3>
<table border="1">
<tr><th>issue</th><th>cmd</th></t>
<tr><td>Verify conda is installed, <br />check version number</td><td>conda info</td></t>
<tr><td>Update conda to the current version</td><td>conda update conda</td></t>
<tr><td></td><td></td></t>
<tr><td></td><td></td></t>
<tr><td></td><td></td></t>
<tr><td></td><td></td></t>
</table>
</html>
<html>
<ul>
<li>Context Manager werden bei der Arbeit mit Ressourcen (wie z.B.<br />
Files, DB-Verbindungen, Threads u.ä) verwendet;</li>
<br />
<li>Sie beginnen mit dem Befehl “<code><b>with</b></code>“:
<code><pre>
with open('data', 'w') as fobj:
…
</pre></code>
… und kümmern sich darum, daß die Verbindung zur Ressource<br />
korrekt geöffnet und geschlossen wird;</li>
</ul>
<h3>Links:</h3>
<a href="https://barcamptools.eu/pycamp201904" target=_blank>Mike Müller :: Context Managers - Eine Kürzeinführung </a>
<br />
MikeMueller_BarCamp-Vortrag_ContextManager.ipynb (im Python-Verzeichnis)
</html>
<html>
Kopiere den jeweiligen Buchstaben in die Zwischenablage und füge ihn mit Ctrl+V ein.<br />
<br />
Geht so:
<code><pre>
import pyautogui
import pyperclip
#Deine restlichen Bibliotheken
#Open, Input und das ganze Zeugs
for letter in f:
pyperclip.copy(letter)
pyautogui.hotkey("ctrl", "v")
sleep(zeitabstand)
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://www.gutefrage.net/frage/sonderzeichen-in-python" target=_blank>GuteFrage.net :: Sonderzeichen in Python</a></li>
</ul>
</html>
<html>
<ul>
<li>Daten‐Visualisierungsprogramm</li>
<li>der Code kann in Python, R oder Julia geschrieben sein</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Real Python</li>
<li>Dash Homepage</li>
</ul>
</html>
<html>
<ul>
<li>macht prinzipiell das Gleiche, wenn der Programmierer zur Fehlersuche <br />
<code><b>print</b></code>‐Anweisungen in den Programmcode einbaut<br />
→ Ist ein richtiger Debugger vorhanden, so sollte dieser “richtige“ Debugger genommen werden</li>
<br />
<li><b>Vorgehensweise</b><br />
Hinzufügen einer Decorator‐Zeile an die betreffende Funktion;<br />
→ <b>Ausgabe:</b><br />
ein play‐by‐play‐Logfile der Funktion, inklusive:<br />
‐ welche Zeilen liefen, und wann<br />
‐ wann welche lokale Variable geändert wurde</li>
<br />
<li><b>zu verwendender Decorator:</b><br />
<ul>
<li>Modul importieren:
<code><pre>import pysnooper</pre></code></li>
<li>über der betreffenden Funktion schreiben:
<code><pre>@pysnooper.snoop()
def …</pre></code></li>
<li><b>Alternativ:</b><br>
um die ganze Funktion zu tracen, den relevanten Programmteil in einem Block “umwickeln“:
<code><pre>…
with pysnooper.snoop():
…</pre></code></ul>
<br />
<li>Die Ausgabe kann in ein File umgeleitet werden:<br />
<code><pre>@pysnooper.snoop('/path/to/output/file.log')</pre></code></li>
<br />
<li>Angabe eines Präfix, um Zeilen zu “snoopen“:
<code><pre>@pysnooper.snoop(prefix = 'DEBUG')</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://pypi.org/project/PySnooper/" target=_blank>PyPI :: PySnooper</a></li>
<li><a href="https://www.newbedev.com/python/tutorials/using-pysnooper-for-python-debugging/" target=_blank>NewBeDev :: PySnooper ‐ Tutorial</a></li>
<li><a href="https://www.pythonpodcast.com/pysnooper-python-debugging-episode-241/" target=_blank>PythonPodcast :: PySnooper</a></li>
</ul>
</html>
<html>
<h3>Aus dem Vortrag "Youtube :: Reuven M. Lerner - Practical decorators - PyCon 2019":</h3>
<ul>
<li>in Python sind Funktionen und Klassen <b>Callables</b>;</li>
<br />
<li>bei einem Decorator sind folgend drei Callables aktiv:
<ol>
<li>the decorated function</li>
<li>the decorator itself</li>
<li>the return value from the decorator call assigned back to the function: <br />
<code><b>add = mydeco( add )</b></code></li>
</ol></li>
<br />
<li><b>Anwendungsmöglichkeiten:</b>
<ol>
<li>Example 1 : Timing (of a function)</li>
<li>Example 2 : Once per min</li>
<li>Example 3 : Once per n (seconds)</li>
<li>Example 4 : Memoization</li>
<li>Example 5 : Attributes</li>
</ol></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.youtube.com/watch?v=MjHpMCIvwsY&__s=wcwhzfwkm49ndrnttkud" target=_blank>Youtube :: Reuven M. Lerner - Practical decorators - PyCon 2019</a>
<li><a href="https://www.python-kurs.eu/python3_dekorateure.php" target=_blank>Python-Kurs :: Dekorateure</a></li>
<li><a href="https://www.thecodeship.com/patterns/guide-to-python-function-decorators/" target=_blank>TheCodeShip :: Guide to python function decorators</a></li>
<li><a href="https://www.learnpython.org/en/Decorators" target=_blank>LearnPython :: Decorators</a></li>
<li><a href="https://realpython.com/primer-on-python-decorators/" target=_blank>RealPython :: Primer</a></li>
<li><a href="https://www.csestack.org/python-decorators/" target=_blank>CSEStack.org :: [Step-by-step] Python Decorators Explained with Examples for Beginners</a>
</ul>
</html>
<html>
<ul>
<li><b>Package</b> - A folder/directory that contains <code><b>__init__.py</b></code> file.</li>
<li><b>Module</b> - A valid python file with <code><b>.py</b></code> extension.</li>
<li><b>Distribution</b> - How one package relates to other packages and modules. </li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://stackoverflow.com/questions/1471994/what-is-setup-py" target=_blank>StackOverflow :: What is setup.py? ‐ Antwort von kmario23</a></li>
</ul>
</html>
<html>
Das Abfragen von DocStrings o.a. von z.B. Modulen, oder Funktionen aus<br />
Modulen, geht wie folgt:
<ol>
<li>Aufruf des Python‐Interpreters:<br />
<code><pre>$ python
>>></pre></code></li>
<li>Das entsprechende File (Modul oder Funktion) importieren:<br />
<code><pre>>>> import <fileBaseName>
</pre></code></li>
<li>Ausgabe der <b>Help-Seite</b> mit Hilfe der <code><b>help()</b></code>‐Funktion:<br />
<code><pre>>>> help(<fileBaseName>)</pre></code><br />
oder<br />
<code><pre>>>> help(<fileBaseName>.</pre></code>
<em>Tab-Taste u.U. mehrmals drücken</em><br />
→ die Auto-Completion zeigt alle Funktionen, die im File / Modul sind, an<br />
→ den entsprechenden String auswählen, eingeben und die Returntaste drücken
</li><br />
<li>Den <b>DocString</b> ausgeben:
<code><pre>>>> print(<fileName>.<functionName>.__doc__)</pre></code></li>
</ol>
</html>
<html>
<h1>Heise-Workshop “Machine Learning“</h1>
Autoren :: Moustapha Karaki & Philipp Braunhart 2019</br />
</br />
Material is for private use only. For further distribution and</br />
commercial use, contact us:</br />
<ul>
<li>m-karaki@hotmail.com</li>
<li>philipp.braunhart@gmail.de</li>
</ul>
<h2>Introduction to PyData: The Python Scientific Stack</h2>
<ol>
<li>Preamble</li>
<li>Python Crashcourse:
<ul>
<li>Python is interpreted</li>
<li>Assignments versus equations</li>
<li>The type function</li>
<li>Null values</li>
<li>Converting values between types</li>
<li>Variables are not typed</li>
<li>Polymorphism</li>
<li>Conditional Statements and Indentation</li>
<li>Iteration</li>
<li>Collections</li>
<li>Lists</li>
<li>Tuples</li>
<li>Sets</li>
<li>References</li>
<li>State and identity</li>
<li>Reading Text Files</li>
<li>Classes in Python</li>
</ul></li>
<li>Scientific Computing</li>
<li>Custom Functions</li>
<li>Numpy: Arrays in Python</li>
<li>Matplotlib: Basic Plotting in Python</li>
<li>Pandas: Structured Data in Python</li>
<li>More</li>
</ul>
<li>DIY :
<ul>
Use Matplotlib to do the following.
<li>Read 01-pydata-intro.csv into a DataFrame and print first and last five rows.</li>
<li>Clean data and update the CSV file. Replace all column values which contain “n.a“ with NaN.</li>
<li>Find the most expensive car company name.</li>
<li>Print All Toyota Cars details.</li>
<li>Count total cars per company.</li>
<li>Find each company's Highest price car.</li>
<li>Find the average mileage of each car making company.</li>
<li>Sort all cars by Price column.</li>
<li>Merge two data frames using the following condition.</li>
</ul></li>
</ol>
<h2>Introduction to PyData: The Python Scientific Stack</h2>
Moustapha Karaki & Philipp Braunhart 2019
Material is for private use only. For further distribution and commercial use, contact us:
m-karaki@hotmail.com
philipp.braunhart@gmail.de
<h3>0. Preamble</h3>
<h3>1. Python Crashcourse</h3>
<ul>
<li>Python is interpreted
Python is an interpreted language, in contrast to Java and C which are compiled languages.
This means we can type statements into the interpreter and they are executed immediately.
</li>
<li>
Assignments versus equations
In Python when we write x = 5 this means something different from an equation x=5 x=5.
Unlike variables in mathematical models, variables in Python can refer to different things as more statements are interpreted.
</li>
<li>
The type function
We can query the type of a value using the type function.
</li>
<li>
Null values
</li>
<li>
Sometimes we represent "no data" or "not applicable".
In Python we use the special value None.
This corresponds to Null in Java or SQL.
When we fetch the value None in the interactive interpreter, no result is printed out.
We can check whether there is a result or not using the is operator:
</li>
<li>
Converting values between types
We can convert values between different types.
To convert an integer to a floating-point number use the float() function.
To convert a floating-point to an integer use the int() function.
</li>
<li>
Variables are not typed
Variables themselves, on the other hand, do not have a fixed type.
It is only the values that they refer to that have a type.
This means that the type referred to by a variable can change as more statements are interpreted.
</li>
<li>
Polymorphism
The meaning of an operator depends on the types we are applying it to.
</li>
<li>
Conditional Statements and Indentation
The syntax for control structures in Python use colons and indentation.
Beware that white-space affects the semantics of Python code.
Logical Operations: ==, !=, is, is not, &&, ||, or, <, >, >=, <=
</li>
<li>
Iteration
We can iterate over each element of a list in turn using a for loop.
We can use the function range() to count for us. As in Java and C, we count starting at 0.
</li>
<li>
Collections
Lists are an example of a collection.
A collection is a type of value that can contain other values.
There are other collection types in Python:
tuple
set
dict
</li>
<li>
Lists
We can use lists to hold an ordered sequence of values.
</li>
<li>
Tuples
Tuples are another way to combine different values.
The combined values can be of different types.
Like lists, they have a well-defined ordering and can be indexed.
To create a tuple in Python, use round brackets instead of square brackets
Unlike lists, tuples are immutable. Once we have created a tuple we cannot add values to it.
</li>
<li>
Sets
Lists can contain duplicate values.
A set, in contrast, contains no duplicates.
Sets can be created from lists using the set() function.
</li>
<li>
References
Whenever we bind a variable to a value in Python we create a reference.
A reference is distinct from the value that it refers to.
Variables are names for references.
</li>
<li>
State and identity
The state referred to by a variable is different from its identity.
To compare state use the == operator. When we compare state we check equality of values.
To compare identity use the is operator. When we compare identity we check equality of references.
</li>
<li>
Reading Text Files
To read an entire text file as a list of lines use the readlines() method of a file object.
</li>
<li>
Classes in Python
</li>
<h3>Scientific Computing</h3>
<li>Numpy: Arrays in Python
Python also has fixed-length arrays which contain a single type of value.
i.e. we cannot have different types of value within the same array.
Arrays are provided by a separate module called numpy. Modules correspond to packages in e.g. Java.
NumPy APIs can be found here.
Python normally works 64-bit precision. numpy allows us to specify the type when storing data in arrays.
We can import the module and then give it a shorter alias.
In contrast to lists:
arrays typically have a fixed length
they can be resized, but this involves an expensive copying process.
and all values in the array are of the same type.
typically we store floating-point values.
Like lists:
arrays are mutable;
we can change the elements of an existing array.
We can now use the functions defined in this package by prefixing them with np.
The function array() creates an array given a list.
We can index an array just like a list.
To populate an array with a range of values we use the np.arange() function.
When we use arithmetic operators and functions on arrays, we create a new array with the result of applying the operator to each element.
Note that not every function automatically works with arrays.
Functions that have been written to work with arrays of numbers are called vectorized functions.
Most of the functions in numpy are already vectorized.
We can create a vectorized version of any other function using the higher-order function numpy.vectorize().
Numpy arrays can hold multi-dimensional data.
To create a multi-dimensional array, we can pass a list of lists to the array() function.
A multi-dimensional array is an array of an arrays.
The outer array holds the rows.
Each row is itself an array.
Instead of using a for loop, we can use a numpy function sum().
This function is written in the C language, and is very fast.
When dealing with multi-dimensional data, the sum() function has a named-argument axis which allows us to specify whether to sum along, each rows or columns.
We can use np.mean() and np.var() in the same way as np.sum()
The nested module numpy.random contains functions for generating random numbers from different probability distributions.
Strictly speaking, these are not random numbers.
They rely on an initial state value called the seed.
If we know the seed, then we can predict with total accuracy the rest of the sequence, given any "random" number.
Nevertheless, statistically they behave like independently and identically-distributed values.
Statistical tests for correlation and auto-correlation give insignificant results.
For this reason they called pseudo-random numbers.
To reliably reproduce the same sequence, use the function seed() in the numpy.random module.
To generate more than number, we can specify the size parameter.
The function histogram() in the numpy module will count frequencies into bins and return the result as a 2-dimensional array.
</li>
<li>
Matplotlib: Basic Plotting in Python
We will use a module called matplotlib to plot some simple graphs.
Matplotlib APIs can be found here.
This module provides functions which are very similar to MATLAB plotting commands.
We can use the math functions in numpy to plot a sine curve.
We can use the hist() function in matplotlib to plot a histogram.
</li>
<li>
Pandas: Structured Data in Python
The pandas module provides a powerful data-structure called a data frame.
Pandas APIs can be found here.
It is similar, but not identical to:
A table in a relational database,
An Excel spreadsheet,
A dataframe in R.
Data frames can be read and written to/from:
Database queries, database tables
CSV files
Json files
Beware that data frames are memory resident:
If you read a large amount of data your PC might crash.
With big data, typically you would read a subset or summary of the data via e.g. a select statement.
Pandas is object-oriented.
The two most important classes are:
DataFrame
Series
A Series contains a one-dimensional array of data, and an associated sequence of labels called the index.
The index can contain numeric, string, or date/time values.
When the index is a time value, the series is a time series.
The index must be the same length as the data.
If no index is supplied it is automatically generated as range(len(data)).
We can access series just like arrays and dicts.
Arithmetic and vectorised functions work for series objects too.
A DataFrame has multiple columns, each of which can hold a different type of value.
Like a series, it has an index which provides a label for each and every row.
DataFrames can be constructed from:
Dict of arrays
Dict of lists
Dict of dict
Dict of Series
2-dimensional array
A single Series
Another DataFrame
When plotting a data frame, each column is plotted as its own series on the same graph.
The column names are used to label each series.
The row names (index) is used to label the x-axis.
The outer dimension is the column index.
When we retrieve a single column, the result is a Series
Data frames can be sliced just like series.
If we project a single column the result is a series.
When we include multiple columns in the project the result is a DataFrame.
Vectorized functions and operators work just as with series objects.
We can use logical indexing to retrieve a subset of the data.
To quickly obtain summary statistics on numerical values use the describe method.
The result is itself a DataFrame, so we can index a particular statistic.
The row labels (index) and column labels can be accessed.
Data frames have head() and tail() methods which behave analgously to the Unix commands of the same name.
We can summarise by first partitioning data into groups, and then reducing to a summary statistic.
Data frames have a relational aspect.
We can perform joins, unions etc..
</li>
<li>
More
Zero in Python
Infinity in Python
Not A Number (NaN) in Python
Some mathematical operations on real numbers do not map onto real numbers.
These results are represented using the special value to NaN which represents "not a (real) number".
NaN is not the same as None
None represents a missing value.
NaN represents an invalid floating-point value.
</li>
<h3>3. DIY</h3>
1. Use Matplotlib to do the following.
Generate data with np.arange().
Plot data.
Set axis labels.
Set axis limits.
Set legend.
Set plot title.
2. Read 01-pydata-intro.csv into a DataFrame and print first and last five rows.
3. Clean data and update the CSV file. Replace all column values which contain and n.a with NaN.
4. Find the most expensive car company name.
5. Print All Toyota Cars details.
6. Count total cars per company.
7. Find each company's Highest price car.
8. Find the average mileage of each car making company.
9. Sort all cars by Price column.
10. Merge two data frames using the following condition.
Create two data frames using the following two Dicts. Merge data frames by appending second data frame as a new column to the first data frame.
Laying out notebook...
</html>
<html>
Python is an object oriented language with can be <br />
used in both scripting and non scripting contexts. <br />
<br />
Python has clean and easy syntax that makes it easy<br />
to read. In this article, we will understand python <br />
language from scratch through examples. We will <br />
often compare Python programming features/syntax<br />
with some popular languages like C/C++. Also, we <br />
will be using Linux command line for all the examples.<br />
<br />
This is a new series. We'll be publishing several<br />
articles on Python on an on-going basis.<br />
<h3>1. Hello World Python Program</h3>
Here is the simple “Hello World“example in python:
<code><pre>
$ vi firstPYProgram.py
print "Hello World"
</pre></code>
Note that the “print“ in python does not require parenthesis.<br />
<br />
Now run the above python program on command line in the following way :
<code><pre>
$ python firstPYProgram.py
</pre></code>
Here is the output :
<code><pre>
Hello World
</pre></code>
So we see that the single “print“ statement executed and <br />
the string “Hello World“ was displayed in output.<br />
<br />
Now lets try adding another “print“ statement to the python script example:
<code><pre>
$ cat firstPYProgram.py
print "Hello World"
print "This is my first python program"
</pre></code>
Now when you run this again, here is the output:
<code><pre>
$ python firstPYProgram.py
Hello World
This is my first python program
</pre></code>
This output was expected but what I intended to show was that unlike <br />
C, or C++ hello world, python adds a newline implicitly after each print statement.
<h3>2. Variables and Strings in Python</h3>
Python supports integer numbers and floating point numbers. Though it<br />
also supports complex numbers but we will not go into much details of <br />
that in this basic tutorial.<br />
<br />
Here is how an integer can be used :
<code><pre>
myIntVar = 5
</pre></code>
Here is how a floating point numbers can be used :
<code><pre>
myFloatVar = 5.5
myFloatVar = float(8)
</pre></code>
Mathematical operations can be applied in the following way :
<code><pre>
var_a = 1
var_b = 4
var_c = var_a + var_b
</pre></code>
Note that the operator ** is used in python to make “ power of“ <br />
relationship between two numbers.<br />
<br />
The mathematical operation (like the one shown above) are pretty much <br />
like the way it's done in C/C++ but playing with strings is a bit different in python.<br />
<br />
Here is an example :
<code><pre>
str_a = "The"
str_b = "Geek"
str_c = "Stuff"
string = str_a + str_b +str_c
print string
</pre></code>
If you run the python script shown above, this output will be produced :
<code><pre>
$ python firstPYProgram.py
TheGeekStuff
</pre></code>
So we see that “+“ operator can be used in python to concatenate <br />
strings easily.<br />
<br />
Note that strings in python can be declared using both single and double quotes.<br />
Using double quotes is advised when the string contains apostrophes.<br />
<br />
For example :
<code><pre>
$ cat firstPYProgram.py
str_a = 'The'
str_b = "Geek's"
str_c = 'Stuff'
string = str_a + str_b +str_c
print string
</pre></code>
The code above produces the following output :
<code><pre>
$ python firstPYProgram.py
TheGeek'sStuff
</pre></code>
You can also make a string repeat 'n' number of times in python by <br />
multiplying the string with that number. Here is an example :
<code><pre>
$ cat firstPYProgram.py
print "5times " * 5
</pre></code>
Observe that the code above multiplies the string ' 5times' with <br />
the number 5. Here is the output when the above print statement is executed :
<code><pre>
$ python firstPYProgram.py
5times 5times 5times 5times 5times
</pre></code>
So we see that the string was repeated 5 times in the output.<br />
<br />
Though python differs significantly from C/C++ in terms of string manipulation,<br />
there is an area 'string formatting' which is not much different from <br />
the way it is done in C/C++.<br />
<br />
Here is an example :
<code><pre>
$ cat firstPYProgram.py
string = "[5times]"
num = 5
print "Observe that the string %s will be displayed %d times" % (string, num)
print "5times " * 5
</pre></code>
Here is the output of the code above :
<code><pre>
$ python firstPYProgram.py
Observe that the string [5times] will be displayed 5 times
5times 5times 5times 5times 5times
</pre></code>
So you see that same format specifiers like %s, %d etc can be used in <br />
python also.
<h3>3. How to Declare Functions in Python?</h3>
In python, the declaration of functions is very different when compared <br />
with the declaration of functions in C/C++. Here is how a function is <br />
declared in python :
<code><pre>
def myFirstFunction(param1, param2):
</pre></code>
If you try to understand the above specified declaration, you will find that<br />
in python the keyword 'def' is used to begin the declaration<br />
of a function. This is followed by the function name and comma separated<br />
arguments in the parenthesis.<br />
<br />
Note that functions in python do not specify return types. Each function <br />
returns either something specific or 'None' (equivalent to NULL in C/C++).<br />
Similarly, the arguments also do not specify the data-types.<br />
<br />
Here is an example of how a function is declared and called in a python script:
<code><pre>
def myFunc():
print "function called"
myFunc()
</pre></code>
Here is the output :
<code><pre>
$ python firstPYProgram.py
function called
</pre></code>
<h3>4. Summary – A Basic Python Example Program</h3>
Here is a program that will summarize all that we learnt about python in this article.
<code><pre>
$ vi firstPYProgram.py
def myFunc(param1, param2):
print "Observe that the string %s will be displayed %d times" % (param1, param2)
print "5times " * 5
string = "[5times]"
num = 5
myFunc(string, num)
</pre></code>
Here is the output :
<code><pre>
$ python firstPYProgram.py
Observe that the string [5times] will be displayed 5 times
5times 5times 5times 5times 5times
</pre></code>
In the next part of this series we will get into some new and complex aspects of python.
<h3>Link:</h3>
<a href="https://www.thegeekstuff.com/2013/04/python-introduction/" target="_blank">TheGeekStuff :: Python Introduction</a>
<h3>Comment</h3>
{ 13 comments &ndash: add one }
<ul>
<li> Sushanth Somayaji April 10, 2013, 9:11 am
The above commands are for Python 2.x, there are a few changes in Python 3.x–
One of those which I know of is that print statement should have the variable or the string inside parenthesis ()
e.g.
print ('Hello world')
instead of
print 'Hello World'
as in Pyhton 2.x
OR
str = 'Hello World'
pyhton (str)
instead of
print str</li>
<br />
<li> HBU April 11, 2013, 3:05 am
What is the purpose of defining num=5 if you specify that a string will be printed 5 times in the function definition itself? Or vice versa?
print '5times ' * 5 #this should be sufficient to print it 5 times, no?
Thanks and regards.</li>
<br />
<li> Mahesh April 13, 2013, 8:11 am
It was a great post.
I am in C programming, so i am not an experienced python programmer, but I think
the last line of the function myFunc(param1,param2) should be:-
print param1 * param2
rather than:
print '5times ' * 5
Please point out if I am wrong.</li>
<br />
<li> Richa Singh April 23, 2013, 1:16 am
Thanks lot !
Awesome precise piece of start-up.
Where can I access the advance version lesson of the same (dealing with some new and complex aspects of python as you said)?</li>
<br />
<li> lesniks May 2, 2013, 11:35 pm
Thanks lot !
Awesome precise piece of start-up.
Where can I access the advance version lesson of the same (dealing with some new and complex aspects of python as you said)?</li>
<br />
<li> Brian Zimmerman May 3, 2013, 12:07 am
If you put parenthesis around your print() statement, the above examples are good for both the latest Python 2 (optional for 2.7) and Python 3. It is a good start, please continue explaining Python and I will continue to return.
Link
Mustapha Oldache June 24, 2013, 10:56 am</li>
<br />
</ul>
</html>
<html>
<ul>
<li>Der Eingabestring des Benutzers wird von <code><b>input()</b></code> nicht<br />
interpretiert, d.h. <code><b>input(</b></code>) liefert immer einen String zurück.</li>
<br />
<li>Meistens wird auf den Ergebnisstring von input sofort der<br />
entsprechende cast-Operator angewendet, um den für die <br />
Weiterverarbeitung benötigten Datentyp zu erhalten: </li>
</ul>
<h3>Links:</h3>
<a href="https://www.python-kurs.eu/python3_eingabe.php" target=_blank>Python-Kurs :: Eingabe mit input</a>
</html>
<html>
You can execute the command in a subshell using <b>os.system()</b>. <br />
This will call the Standard C function <b>system()</b>. This function will return<br />
the exit status of the process or command. This method is considered as <br />
old and not recommended, but presented here for historical reasons only. <br />
The <b>subprocess</b> module is recommended and it provides more power–<br />
ful facilities for running command and retrieving their results.
<h3>os.system example (deprecated)</h3>
The syntax is:
<code><pre>
import os
os.system("command")
</pre></code>
In this example, execute the date command:
<code><pre>
import os
os.system("date")
</pre></code>
Sample outputs:
<code><pre>
Sat Nov 10 00:49:23 IST 2012
0
</pre></code>
In this example, execute the date command using os.popen() and <br />
store its output to the variable called now:
<code><pre>
import os
f = os.popen('date')
now = f.read()
print "Today is ", now
</pre></code>
Sample outputs:
<code><pre>
Today is Sat Nov 10 00:49:23 IST 2012
</pre></code>
<h3>Say hello to subprocess</h3>
The os.system has many problems and subprocess is a much better<br />
way to executing unix command. The syntax is:
<code><pre>
import subprocess
subprocess.call("command1")
subprocess.call(["command1", "arg1", "arg2"])
</pre></code>
In this example, execute the date command:
<code><pre>
import subprocess
subprocess.call("date")
</pre></code>
Sample outputs:
<code><pre>
Sat Nov 10 00:59:42 IST 2012
0
</pre></code>
You can pass the argument using the following syntax i.e run<br />
<code>ls -l /etc/resolv.conf</code> command:
<code><pre>
import subprocess
subprocess.call(["ls", "-l", "/etc/resolv.conf"])
</pre></code>
Sample outputs:
<code><pre>
<-rw-r--r-- 1 root root 157 Nov 7 15:06 /etc/resolv.conf
0
</pre></code>
To store output to the output variable, run:
<code><pre>
import subprocess
p = subprocess.Popen("date", stdout=subprocess.PIPE, shell=True)
(output, err) = p.communicate()
print "Today is", output
</pre></code>
Sample outputs:
<code><pre>
Today is Sat Nov 10 01:27:52 IST 2012
</pre></code>
Another example (passing command line args):
<code><pre>
import subprocess
p = subprocess.Popen(["ls", "-l", "/etc/resolv.conf"], stdout=subprocess.PIPE)
output, err = p.communicate()
print "*** Running ls -l command ***\n", output
</pre></code>
Sample outputs:
<code><pre>
*** Running ls -l command ***
-rw-r--r-- 1 root root 157 Nov 7 15:06 /etc/resolv.conf
</pre></code>
In this example, run ping command and display back its output:
<code><pre>
import subprocess
p = subprocess.Popen(["ping", "-c", "10", "www.cyberciti.biz"], stdout=subprocess.PIPE)
output, err = p.communicate()
print output
</pre></code>
The only problem with above code is that output, <code>err = p.communicate()</code> will <br />
block next statement till ping is completed i.e. you will not get real time output <br />
from the ping command. So you can use the following code to get real time output:
<code><pre>
import subprocess
cmdping = "ping -c4 www.cyberciti.biz"
p = subprocess.Popen(cmdping, shell=True, stderr=subprocess.PIPE)
while True:
out = p.stderr.read(1)
if out == '' and p.poll() != None:
break
if out != '':
sys.stdout.write(out)
sys.stdout.flush()
</pre></code>
Sample outputs:
<code><pre>
PING www.cyberciti.biz (75.126.153.206) 56(84) bytes of data.
64 bytes from www.cyberciti.biz (75.126.153.206): icmp_req=1 ttl=55 time=307 ms
64 bytes from www.cyberciti.biz (75.126.153.206): icmp_req=2 ttl=55 time=307 ms
64 bytes from www.cyberciti.biz (75.126.153.206): icmp_req=3 ttl=55 time=308 ms
64 bytes from www.cyberciti.biz (75.126.153.206): icmp_req=4 ttl=55 time=307 ms
--- www.cyberciti.biz ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3001ms
rtt min/avg/max/mdev = 307.280/307.613/308.264/0.783 ms
</pre></code>
<br />
<h3>Link:</h3>
<a href="https://www.cyberciti.biz/faq/python-execute-unix-linux-command-examples/" target="_blank">nixCraft :: Python Execute Unix / Linux Command Examples</a>
<br />
</html>
<html>
<ul>
<li>is a feature of a language where the type checker guarantees <br />
that the programmer has covered all cases</li>
<li>It can be super useful at catching pesky edge cases before they<br />
become bugs</li>
<!--
<li></li>
<li></li>
-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://hakibenita.com/python-mypy-exhaustive-checking" target=_blank>Haki Benita :: MyPy & exhaustive checking</a></li>
<li><a href="https://sorbet.org/docs/exhaustiveness" target=_blank>Sorbet :: Exhaustiveness</a></li>
</ul>
</html>
<html>
<code><pre>
<generator object <genexpr> at …>
</pre></code>
→ Grund für die Meldung ist, dass eine Generator comprehension<br />
ausgeführt worden ist und jetzt ein Generator‐Objekt ausge‐<br />
geben wurde (z.B. mittels print‐Statement)<br />
<br />
<b>Lösung:</b><br />
Mittels einer for‐Schleife die Werte einzelnd, nacheinander ausgeben.<br />
</html>
<html>
Grund scheint zu sein, dass ‐ in diesem Fall war es so ‐ einem<br />
Listenelement ein neuer Wert zugewiesen werden sollte, aber der <br />
angegebene Index existierte nicht.<br />
<code><pre>
>>> import copy
>>>
>>> li1 = [1, 2, [3,5], 4]
>>> print(li1)
[1, 2, [3, 5], 4]
>>> li3 = copy.copy(li1)
>>> print(li3)
[1, 2, [3, 5], 4]
>>> li1[1][0] = -9
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'int' object does not support item assignment
>>> li1[1] = -9
>>> print(li1)
[1, -9, [3, 5], 4]
</pre></code>
</html>
<html>
<ul>
<li><code><b>TabError: inconsistent use of tabs and spaces in indentation</b></code><br />
Statt Leerzeichen wurde zur Einrückung ein Tab-Zeichen verwendet. <br />
→ Tab-Zeichen löschen und durch Leerzeichen ersetzen.
</li>
<br />
<li><code><b>Syntaxfehler beim unerwarteten Symbol</b></code><br />
Bitte überprüfen, ob in der ersten Zeile "#!" steht;<br />
die Fehlermeldung kommt, wenn das Ausrufezeichen fehlt;
</li>
<!--
<li><code><b> </b></code>
</li>
--></ul>
</html>
<html>
<code><pre>#!/usr/bin/env python
# -*- encoding: utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
import io
import re
from glob import glob
from os.path import basename
from os.path import dirname
from os.path import join
from os.path import splitext
from setuptools import find_packages
from setuptools import setup
def read(*names, **kwargs):
with io.open(
join(dirname(__file__), *names),
encoding=kwargs.get('encoding', 'utf8')
) as fh:
return fh.read()
setup(
name='nameless',
version='1.694.10',
license='BSD-2-Clause',
description='An example package. Generated with cookiecutter-pylibrary.',
long_description='%s\n%s' % (
re.compile('^.. start-badges.*^.. end-badges', re.M | re.S).sub('', read('README.rst')),
re.sub(':[a-z]+:`~?(.*?)`', r'``\1``', read('CHANGELOG.rst'))
),
author='Ion\\"\'el Cristian M\\u0103rie\\u0219',
author_email='contact@ionelmc.ro',
url='https://github.com/ionelmc/python-nameless',
packages=find_packages('src'),
package_dir={'': 'src'},
py_modules=[splitext(basename(path))[0] for path in glob('src/*.py')],
include_package_data=True,
zip_safe=False,
classifiers=[
# complete classifier list: http://pypi.python.org/pypi?%3Aaction=list_classifiers
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: Unix',
'Operating System :: POSIX',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
# uncomment if you test on these interpreters:
# 'Programming Language :: Python :: Implementation :: IronPython',
# 'Programming Language :: Python :: Implementation :: Jython',
# 'Programming Language :: Python :: Implementation :: Stackless',
'Topic :: Utilities',
],
project_urls={
'Changelog': 'https://github.com/ionelmc/python-nameless/blob/master/CHANGELOG.rst',
'Issue Tracker': 'https://github.com/ionelmc/python-nameless/issues',
},
keywords=[
# eg: 'keyword1', 'keyword2', 'keyword3',
],
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
install_requires=[
# eg: 'aspectlib==1.1.1', 'six>=1.7',
],
extras_require={
# eg:
# 'rst': ['docutils>=0.11'],
# ':python_version=="2.6"': ['argparse'],
},
setup_requires=[
'pytest-runner',
],
entry_points={
'console_scripts': [
'nameless = nameless.cli:main',
]
},
)</pre></code>
</html>
<html>
<ol>
<li><h4>Show Current Directory</h4></li>
<br />
<li><h4>Make a New Directory</h4></li>
<br />
<li><h4>Delete Directories and Files</h4></li>
<br />
<li><h4>Get List of Files</h4></li>
<br />
<li><h4>Move and Copy Files</h4></li>
<br />
<li><h4>Check Directory/File</h4></li>
<br />
<li><h4>Get File Information</h4></li>
<br />
<li><h4>Read Files</h4></li>
<br />
<li><h4>Write Files</h4></li>
<br />
<li><h4>Zip and Unzip Files</h4></li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://medium.com/better-programming/the-top-10-file-handling-techniques-in-python-cf2330a16e7" target=_blank>Medium.com :: The top 10 file handling techniques (PDF vorhanden)</a></li>
</ul>
</html>
<html>
<h3>Das File “requirements.txt“</h3>
<ul>
<li>ein Konfig-File;</li>
<li>enthält die Liste aller installierten Python-Pakete;</li>
<li>eigentlich ist der Filename beliebig, aber es hat sich<br />
“requirements.txt“ etabliert;</li>
<li>das File wird mittels
<code><pre>pip freeze [options] > requirements.txt</pre></code>
erstellt;</li>
<li>Dieses File kann dazu verwendet werden, um:
<ol>
<li>auf einem anderen Server</li>
<li>in einem anderen Verzeichnis resp. <em>virtual environment</em></li>
</ol>
eine Kopie dieser Umgebung zu erstellen</li>
<li>Nachdem das requirements.txt‐File an seinen Zielort kopiert / gemoved wurde,<br />
dann am Zielort folgenden Befehl aufrufen:
<code><pre>pip install -r requirements.txt</pre></code></li>
</ul>
<h3>pip freeze [options]</h3>
<ul>
<li>der Befehl gibt eine Liste der installierte Python-Pakete<br />
im requirements-Format aus;</li>
<li>wichtige Optionen:<br />
‐‐all :: Auch folgende Pakete werden mit ausgegeben:<br />
<div style="text-indent:50px;">setuptools</div>
<div style="text-indent:50px;">distribute</div>
<div style="text-indent:50px;">wheel</div>
<div style="text-indent:50px;">pip</div></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://note.nkmk.me/en/python-pip-install-requirements/" target=_blank>note.nkmk.me :: Python - requirements</a></li>
<li><a href="https://pip.pypa.io/en/latest/reference/pip_install/#requirements-file-format" target=_blank>Python :: pip install - Documentation</a></li>
</ul>
</html>
<html>
<ul>
<li>Flask ist ein in Python geschriebenes Webframework. </li>
<li>Der Fokus von Flask liegt auf Erweiterbarkeit und guter Dokumentation.<br />
Die einzigen Abhängigkeiten sind <ul><li><b>Jinja2</b>, eine Template Engine,</li> und <li><b>Werkzeug</b>, eine Bibliothek zum Erstellen von WSGI-Anwendungen.</li></ul>(aus Wikipedia)</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Flask" target=_blank>Wikipedia :: Flask</a></li>
<li><a href="https://www.analyticsvidhya.com/blog/2017/09/machine-learning-models-as-apis-using-flask/" target=_blank>Analytics Vidhya ‐ Blog :: Machine Learning</a></li>
</ul>
</html>
<html>
For loop is an essential aspect of any programming language.<br />
<br />
In python, for loop is very flexible and powerful.<br />
<br />
In this tutorial, we've explained the following Python for loop examples.
<ol>
<li> Python For Loop for Numbers</li>
<li> Python For Loop for Strings</li>
<li> Python For Loop Using Default Range Function</li>
<li> Python For Loop With Custom Start and End Numbers</li>
<li> Python For Loop With Incremental Numbers</li>
<li> Python For Loop Range with Negative Values</li>
<li> Continue Statement Inside Python For Loop</li>
<li> Break Statement Inside Python For Loop</li>
<li> Can a For Loop itself have an Else without If?</li>
<li> Else and Break Combination Behavior Inside Python For</li>
<li> Nested For Loops in Python</li>
<li> Handling List-of-Lists in Python For Loop</li>
</ol>
The following is the general syntax for the python for loop:
for {variable} in {some-sequence-type}:
{python-statements}
else:
{python-statements}
In python, the for loop can iterate through several sequence types such as
lists, strings, tuples, etc.
<h2>1. Python For Loop for Numbers</h2>
To loop through a list of numbers, we just have to create a list of numbers and
pass it as an argument to the for loop as shown below.
<pre><code>
# cat for1.py
for i in [1, 2, 3, 4, 5]:
print(i)
</code></pre>
In the above example:
<ul>
<li> It will loop through all the numbers in the given list (i.e from 1
through 5) and then print them.</li>
<li> Here, we've directly given the list [1, 2, 3, 4, 5] as an argument
to the for loop.</li>
<li> The individual items in the list should be separated by comma.</li>
<li> Don't forget to specify the colon [:] at the end of for loop line.
This is part of the syntax.</li>
<li> You can also store the list into a variable, and pass that variable as
an argument to the for loop.</li>
<li> For every for loop iteration, each value is picked-up from the list and
stored in the variable given in the for loop.<br />
In this example, the variable is “i“.</li>
<li> Inside the loop, we have only one statement, which is print, which takes
the value from of the individual item <br />
from the variable i and prints it.</li>
<li> If you want to execute multiple statements for every iteration of the
for loop, then indent them accordingly<br /> (i.e put them in the same level as
the print command).</li>
</ul>
The following is the output of the above program:
<pre><code>
# python for1.py
1
2
3
4
5
</code></pre>
<h2>2. Python For Loop for Strings</h2>
Just list the above list of numbers, you can also loop through list of strings
as shown in the following example:
<pre><code>
# cat for2.py
names = ["john", "raj", "lisa"]
for i in names:
print(i)
</code></pre>
In the above example:
<ul>
<li> We are looping through the three names and printing them out one by
one.</li>
<li> “names“ ‐ This is the variable which has a list that
in-turn contains three string items.</li>
<li> The individual items in the names list should be separated by
comma.</li>
<li> Also, make sure you enclose the individual string values in double
quotes.</li>
<li> Again, don"t forget to put the colon at the end of the for loop
statement.<br />
This colon is part of the for command syntax.</li>
</ul>
The following is the output of the above program:
<pre><code>
# python for2.py
john
raj
lisa
</code></pre>
<h2>3. Python For Loop Using Default Range Function</h2>
In python, when you are dealing with looping through numbers, you can use range
function, which is extremely handy.
Range function will produce a list of numbers based on the specified criteria.
In the following example, the argument to the range function is 5. Let us see
how this behaves.
<pre><code>
# cat for3.py
for i in range(5):
print(i)
</code></pre>
The following output has printed 5 lines. But, as you see it starts from 0
(instead of 1).
<pre><code>
# python for3.py
0
1
2
3
4
</code></pre>
<b>Note:</b> <br />
Again, if you specify range(x), make sure you pay attention
to the fact that range function by default will always start with number 0, and
then generate “x“ number of numbers.<br />
<br />
<b>Note:</b><br />
You can also use xrange instead of range. For our practical
purpose, both will behave exactly the same. But, when you are dealing with huge
list with has 1000's of items, xrange is recommended, as it is
faster. xrange function will generate the numbers that are required on-demand.
But, range will generate all the numbers when it is called.
<h2>4. Python For Loop With Custom Start and End Numbers</h2>
When you
don't want to start the number sequence from 0,
you can also specify the start-value and the end-value in the range function as
shown in the example below.
<pre><code>
# cat for4.py
for i in range(1,6):
print(i)
</code></pre>
In the above example:
<ul>
<li> range(1,6) -
We've specified a start and end value in this
range function.</li>
<li> One important thing to under here is the fact that, this will start with
number “i“. But, the value the above will print will be only 5 (and
not 6).</li>
<li> If you want a sequence of 1 .. n, then your range should be:
range(1,n+1).</li>
<li> So, in this example, we wanted sequence from 1 .. 5 and we gave range as
range(1,6). i.e the end value is n+1.</li>
</ul>
The following is the output of the above program. Again, notice how it starts
from 1 and prints through 5 (not 6).
<pre><code>
# python for4.py
1
2
3
4
5
</code></pre>
<h2>5. Python For Loop With Incremental Numbers</h2>
Apart from specifying a start-value and end-value, we can also specify an
increment-value.<br />
<br />
For example, if you want a sequence like this: 1, 3, 5, 7, 9, …, then the
increment-value in this case would be 2, as we are incrementing the next number
by 2.<br />
<br />
In the following example, we are generating numbers from 1 through 6 with a
increment of 2.
<pre><code>
# cat for5.py
for i in range(1,6,2):
print(i)
</code></pre>
The following is the output of the above program.
<pre><code>
# python for5.py
1
3
5
</code></pre>
Again, as you see here when we give 6 as the end-value, it will go only upto 5.
In this case we are also incrementing by 2. Just to be clear:
<ul>
<li>range(1,6,2) &hyphen will print 1,3 and 5; </li>
<li>range(1,5,2) &hyphen will print only 1 and 3</li>
</ul>
<h2>6. Python For Loop Range with Negative Values</h2>
In range function inside for loop, we can also specify negative values.
In the example below, we are using negative numbers for end-value (-5) and
increment-value (-2).
<pre><code>
# cat for6.py
for i in range(4,-5,-2):
print(i)
</code></pre>
The following is the output of the above program:
<pre><code>
# python for6.py
4
2
0
-2
-4
</code></pre>
As you see from the above output, it sequence started from the start-value
(which is 4), and then increment the next number by the increment-value (which
is -2), and keeps going all the way through end-value-1.
<h2>7. Continue Statement Inside Python For Loop</h2>
You can use “continue“ statement inside python for loop. When a for
loop encounters “continue“, it will not execute the rest of the statements in that particular for-loop-block,
instead it will start the for-loop again for the next element in the list.<br />
<br />
The following example shows how the continue statement works inside the for
loop.
<pre><code>
# cat for7.py
names = ["john", "lisa", "raj", "lisa"]
for i in names:
if i != "lisa":
continue
print(i)
print("--end--")
</code></pre>
In the above example:
<ul>
<li> The for loop is looping through a list that has 4 names.</li>
<li> There are two statements in the for-loop-block (if statement, and print
statement)</li>
<li> The if statement has “continue“ inside
it, which will get executed only when the name is not equal to list.</li>
<li> So, in this case, whenever the name is equal to lisa, then it will
execute the 2nd statement (i.e print statement).</li>
<li> But, whenever the name is not equal to lisa, it will go inside the if
statement, which has “continue“ statement. This means that it will
not execute the rest of the statements in the
for loop. i.e It will not execute the print statement. But, this will continue
to go to the top of the loop, and start the process for the next item in the
list.</li>
<li> Please note that the last print statement is outside the for loop, which
will get executed after all the items in the list are processed.</li>
</ul>
The following is the output of the above program:
<pre><code>
# python for7.py
lisa
lisa
--end--
</code></pre>
<h2>8. Break Statement Inside Python For Loop</h2>
Just like continue statement, you can also specify
“break“ statement inside your for loop in python.<br />
<br />
As you can imagine, anytime for loop encounters
“break“, then it
will completely stop the for loop iteration and exit the for loop. i.e After the
“break“ statement, it will not process the remaining items in the
for loop list.<br />
<br />
The following example shows how the break works.
<pre><code>
# cat for8.py
names = ["john", "lisa", "raj", "lisa"]
for i in names:
if i == "raj":
break
print(i)
print("--end--")
</code></pre>
As you see from the following output, the moment, the name is equal to
“raj“, it will exit the for loop. In this case, “raj“ is the 3rd
item in the list. So, our for loop printed only the 1st two names.
<pre><code>
# python for8.py
john
lisa
--end--
</code></pre>
<h2>9. Can a For Loop itself have an Else without If?</h2>
This is a unique feature to Python.<br />
<br />
We typically use “else“ only in conjunction with
“if“ statement as we've explained earlier. Refer to this: <a
href="http://www.thegeekstuff.com/2017/06/python-if-else-elif-examples/"
target="_blank">9 Python if, if else, if elif Command Examples</a><br />
<br />
But, in Python, we can have “else“ in conjunction with
“for“ statement also as explained in this example.<br />
<br />
Anything inside the else-block for the for-loop will get executed when the for
statement fails as shown below.
<pre><code>
# cat for9.py
names = ["john", "raj", "lisa"]
for i in names:
print(i)
else:
print("for loop condition failed!")
</code></pre>
In the above example:
<ul>
<li> We have used this simple example only to understand how the
“else“ works with “for“.</li>
<li> As you notice, there is no “if“ command here.So, the “else“ is really part of the “for“ command.</li>
<li> The “else“ should be the last line in the for-loop-block.
In this simple example, the for loop will fail only when it process all the
items in the list, as it doesn't have any more to process. So, in that
case, the “else“ will get executed.</li>
<li> So, whatever we have inside else will be executed after all the items are
processed.</li>
</ul>
The following is the output of the above example:
<pre><code>
# python for9.py
john
raj
lisa
for loop condition failed!
</code></pre>
It might sound like, we might not really need a “else“ inside
“for“ if it only gets executed at the end of for loop iteration.<br />
<br />
But, the next example will clarify bit more on what is the advantage of
“else“ inside for-loop.
<h2>10. Else and Break Combination Behavior Inside Python For</h2>
In the previous example, we explained how the “else“ inside a
for-loop works, which is unique to Python.<br />
<br />
One important thing to understand is that when you have a
“break“ statement inside your for-loop-block, then the
“else“ part will not be executed.<br />
<br />
The following example explains the behavior of break and else combination inside
a for loop.
<pre><code>
# cat for10.py
names = ["john", "lisa", "raj", "lisa"]
for i in names:
if i == "raj":
break
print(i)
else:
print("for loop condition failed!")
print("--end--")
</code></pre>
As you see from the following ouput, the print command inside the
“else“ did not get executed this time, because the for loop encounterd a
“break“ and came-out of the loop in-between.
<pre><code>
# python for10.py
john
lisa
--end--
</code></pre>
Note: As you can imagine, “continue“
statement has no impact on “else“ in
for-loop. Else will still behave exactly how it is supposed to when the for loop
condition fails.
<h2>11. Nested For Loops in Python</h2>
Just like any other programming languages, in python also you can have nested
for loops.<br />
<br />
When you combine multiple for loops, it can become very effective.<br />
<br />
The following example shows how a nested for loop works.
<pre><code>
# cat for11.py
distros = ["centos", "redhat", "ubuntu"]
arch = ["32-bit", "64-bit"]
for i in distros:
for j in arch:
print(i + " " + j)
print("-----------")
</code></pre>
In the above example:
<ul>
<li> We have two lists here (i.e distros and arch).</li>
<li> The outer for loop is for distros. So, it will loop through every item
in the “distros“ list.</li>
<li> The inner for loop is for “arch“. So, for
every item in the distro list, this inner loop will loop through every item in
the “arch“ list.</li>
<li> The individual element in the outer loop is stored in the variable i</li>
<li> The individual element in the inner loop is stored in the variable j</li>
</ul>
The following is the output of the above example:
<pre><code>
# python for11.py
centos 32-bit
centos 64-bit
-----------
redhat 32-bit
redhat 64-bit
-----------
ubuntu 32-bit
ubuntu 64-bit
-----------
</code></pre>
<h2>12. Handling List-of-Lists in Python For Loop</h2>
The following example shows how you can use list of lists inside for loop.
<pre><code>
# cat for12.py
multiple_state_lists = [ ["CA","NV","UT"], ["NJ","NY","DE"]]
for state_list in multiple_state_lists:
for state in state_list:
print state
</code></pre>
In the above example:
<ul>
<li> The outer for-loop is looping through the main list-of-lists (which
contain two lists in this example).</li>
<li> The inner for-loop is looping through the individual list themselves.</li>
</ul>
The following is the output of the above example:
<pre><code>
# python for12.py
CA
NV
UT
NJ
NY
DE
</code></pre>
<br />
Link:<br />
<a href="http://www.thegeekstuff.com/2017/07/python-for-loop-examples/"
target="_blank">http://www.thegeekstuff.com/2017/07/python-for-loop-examples/</a
>
<p>
<h3>Comments</h3>
<ul>
<li><b>Robert Sander July 12, 2017, 5:57 am</b><br />
<br />
Instead of range() use xrange() in for loops:<br />
<br />
>>> print xrange.__doc__<br />
xrange(stop) -> xrange object<br />
xrange(start, stop[, step]) -> xrange object<br />
<br />
Like range(), but instead of returning a list, returns an object that<br />
generates the numbers in the range on demand. For looping, this is<br />
slightly faster than range() and more memory efficient.</li>
<br />
<li><b>James Doepp July 12, 2017, 9:19 am</b><br />
<br />
You should include a loop using enumerate()<br />
my_list =
[“a“,“b“,“c“]<br />
for idx, val in enumerate(my_list):<br />
print(idx, val)<br />
<br />
Returns the index and value for each member of the list:<br />
0 a<br />
1 b<br />
2 c</li>
</ul>
<br />
Link:<br />
<a href="http://www.thegeekstuff.com/2017/07/python-for-loop-examples/">http://www.thegeekstuff.com/2017/07/python-for-loop-examples/</a>
</html>
<html>
Functions are code snippets in a block that is assigned<br />
a name. It takes input, performs computation or an action<br />
and returns the output.<br />
<br />
Functions enhances the reusability of the code.<br />
<br />
In this tutorial, we'll discuss the following examples:
<ul>
<li>Basic Python Function Example</li>
<li>Python Built-In Functions</li>
<li>Python User-Defined Functions</li>
<li>Python Function Parameters</li>
<li>Python Function Unknown Number of Parameters</li>
<li>Python Function Return Value</li>
<li>Datatype for Parameter s and Return Value</li>
</ul>
<h3>1. Basic Python Function Example</h3>
The following is an example python function that takes <br />
two parameters and calculates the sum and return the <br />
calculated value.
<code><pre>
# function definition and declaration
def calculate_sum(a,b):
sum = a+b
return sum
# The below statement is called function call
print(calculate_sum(2,3)) # 5
</pre></code>
There are two broad categories of functions in Python: <br />
in-built functions and user-defined functions.
<h3>2. Python Built-In Functions</h3>
There are many functions that come along with Python, <br />
when it is installed. The user need not worry about the <br />
functions' definitions. print() is one of the most commonly <br />
used in-built functions in Python.
<code><pre>
print("Hello world")
print(len("My name is Aanisha Mishra"))
</pre></code>
Some more examples of such functions are : <br />
len(), str(), int(), abs(), sum(), etc.
<br />
All built-in functions supported by Python3 is here.
<h3>3. Python User-Defined Functions</h3>
User-defined functions are declared using the <code><b>def</b></code> keyword. <br />
The keyword should be followed by the function name.
<code><pre>
def calculate_si_amount(principal, rate, time):
interest = (principal*rate*time)/100
return principal+interest
</pre></code>
In this function, the final amount is calculated by <br />
applying simple interest to principal. <code><b>calculate_si_</b></code>‐ <br />
<code><b>amount</b></code> is the function name. principal, rate and <br />
time are the parameters and the function is returning <br />
the calculated data. <br />
<br />
It is not necessary for a function to accept parameters <br />
and return values. It can either do both, or one of them, <br />
or none. Below is an example of a function which does <br />
not take any parameter but returns data.
<code><pre>
from random import seed, random
from random import random
def generate_random_number():
seed(10)
return random()
</pre></code>
<h3>4. Python Function Parameters</h3>
A function can have default parameters.
<code><pre>
def multiply(a, b=10):
return a*b
multiply(12) # 120
multiply(2, 3) # 6
multiply(b=9) # error: None*9 is not valid
</pre></code>
In this function, if user does not give the second para‐ <br />
meter b, it assumes it to be 10, but providing the first <br />
parameter is necessary.
<h3>5. Python Function Unknown Number of Parameters</h3>
<b>NOTE:</b> <br />
If there are, say 4 parameters in a function and a default <br />
value is defined for the 2nd one, then 3rd and 4th para‐ <br />
meter should also be assigned a default value. <br />
<br />
If the number of parameters a function should expect is <br />
unknown, then <code><b>*args</b></code> is added to the function definition <br />
as one of the parameters. This parameter expects a tuple. <br />
The asterisk(*) is important here. The name args is just a <br />
convention. It can be given any other name.
<code><pre>
def calculate_sum(a, *args):
sum = a
for i in args:
sum += i
return sum
calculate_sum(10) # 10
calculate_sum(10, 11, 12) # 33
calculate_sum(1, 2, 94, 6, 2, 8, 9, 20, 43, 2) # 187
</pre></code>
Similarly, <code><b>**kwargs</b></code> expects a dictionary as parameter.
<code><pre>
def print_names(f1, l1, **kwargs):
print(f1, l1, end=' ')
for key in kwargs:
print(key, kwargs[key], end=' ')
print_names("anish", "gupta")
print_names("anish", "gupta", mohan="singh", mohit="jain")
# anish gupta anish gupta mohan singh mohit jain
</pre></code>
The above code snippet has reference to for loop. Refer <br />
to this for more details: 12 Essential Python For Loop Command Examples
<h3>6. Python Function Return Value</h3>
Python allows function to return multiple values.
<code><pre>
def prime_numbers(x):
l=[]
for i in range(x+1):
if checkPrime(i):
l.append(i)
return len(l), l
no_of_primes, primes_list = prime_numbers(100)
</pre></code>
Here two values are being returned. When this function <br />
is called, the return values are stored in two variables, <br />
simultaneously. <br />
<br />
<b>NOTE: </b> <br />
If a function does not return anything, it implicitly returns None.
<h3>7. Datatype for Parameters and Return Value</h3>
Defining data types for function parameters and the <br />
return value can be used to let user know the expec‐ <br />
tations of the functions.
<code><pre>
def prime_numbers(x:int) -> (int, list):
l=[]
for i in range(x+1):
if checkPrime(i):
l.append(i)
return len(l), l
</pre></code>
The function definition indicates that it needs one para‐ <br />
meter of type int and will return two values of type int <br />
and list respectively.
<h3>Links:</h3>
<a href="https://www.thegeekstuff.com/2019/06/python-function-examples/" target=_blank>TheGeekStuff :: Python - Beispiele für Funktionen</a>
</html>
<html>
<ul>
<li><b><code>os.walk</code></b>,<br />
a function that lets you walk through a tree of files and (sub)directories. <br />
<br />
Although os.walk looks and acts like a function, it's actually a <br />
“generator function“ – a function that, when executed, returns<br />
a “generator“ object that implements the iteration protocol. </li>
<br />
<li>Library <b><code>os</code></b><br />
⇒ <b><code>import os</code></b></li>
<br />
<li>Funktionen / Methoden in <b><code>os</code></b><br />
<ul>
<li><b><code>listdir</code></b><br />
returns the list of filenames without any path<br />
⇒ bessere Alternative: Library <b><code>glob</code></b>, mit Funktion <b><code>glob</code></b>;<br />
glob.glob returns the full pathname of each file</li>
<li><b><code>path.splitext</code></b><br />
it returns two items – the filename without the<br />
extension and the extension itself: </li>
</ul>
</ul>
<h3>Link:</h3>
<a href="https://www.linuxjournal.com/content/automate-sysadmin-tasks-pythons-oswalk-function" target=_blank>LinuxJournal :: Automate Sysadmin Tasks with Python's os.walk Function</a><br />
(als PDF “LinuxJournal_AutomateSysadminTasksWithPythons-oswalk-Function.pdf“ vorhanden)
</html>
<html>
Damit das Python-Skript “alleine“ funktionsfähig ist,<br />
muß eine main()-Funktion definiert sein, wie z.B. folgende:
<code><pre>
# ------- main() ---------
def main():
logtolist( './mini-access-log.txt' )
</pre></code>
Die main()-Funktion enthält alle Funktionen resp. die Funktionalität,<br />
um die gewünschte Aufgabe zu erfüllen. Hier wird die Funktion<br />
“logtolist“ mit einem Parameter aufgerufen.<br />
<br />
Zusätzlich muss die main()-Funktion aufgerufen werden:
<code><pre>
if __name__ == '__main__':
main()
</pre></code>
Mit Python3 reicht auch:
<code><pre>
main()
</pre></code>
<h3>Links</h3>
<a href="https://www.guru99.com/learn-python-main-function-with-examples-understand-main.html" target=_blank>Guru99 :: Main-Funktion</a>
</html>
<html>
<ul>
<li>it limits thread performance</li>
<li>parallel execution is forbidden<br />
⇒ the GIL ensures that only one thread runs in the interpreter at once</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.python.org/moin/GlobalInterpreterLock" target=_blank>Python.org</a></li>
<li><a href="https://realpython.com/python-gil/" target=_blank>RealPython</a></li>
<li><a href="https://www.dabeaz.com/python/UnderstandingGIL.pdf" target=_blank>Dabaez :: Understanding GIL</a>, PDF, downloaded</li>
</ul>
</html>
<html>
<ul>
<li><b>From the Python glossary:</b><br />
<p>
An object is <b><em>hashable</em></b> if it has a hash value which never changes during its lifetime <br />
(it needs a __hash__() method), and can be compared to other objects (it needs an<br />
__eq__() or __cmp__() method). Hashable objects which compare equal must have<br />
the same hash value.</p>
<p>
Hashability makes an object usable as a dictionary key and a set member, because<br />
these data structures use the hash value internally.
</p>
<p>
All of Python's immutable built-in objects are hashable, while no mutable containers<br />
(such as lists or dictionaries) are. Objects which are instances of user-defined classes<br />
are hashable by default; they all compare unequal, and their hash value is their id().</p></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://stackoverflow.com/questions/14535730/what-does-hashable-mean-in-python" target=_blank>StackOverflow :: What does hashable mean in Python?</a></li>
<li><a href="https://www.pythonforthelab.com/blog/what-are-hashable-objects/" target=_blank>Python for Lab :: What are hashable objects?</a></li>
<li><a href="https://medium.com/better-programming/3-essential-questions-about-hashable-in-python-33e981042bcb" target=_blank>medium.com :: 3 Essential Questions About Hashable in Python [<em>downloaded</em>]</li>
</ul>
</html>
<html>
The pydoc or pydoc3 command show text documentation on <br />
the name of a Python keyword, topic, function, module, or <br />
package, or a dotted reference to a class or function within a <br />
module or module in a package. You can call pydoc from vim <br />
itself. Let us see how to access Python documentation using <br />
pydoc within vim text editor.
<h3>Access python help using pydoc</h3>
The syntax is:<code><pre>
pydoc keyword
pydoc3 keyword
pydoc len
pydoc print
</pre></code>
Edit your ~/.vimrc:
<code><pre>$ vim ~/.vimrc</pre></code>
Append the following configuration for pydoc3 (python v3.x docs). <br />
Create a mapping for H key that works in normal mode:
<code><pre>
nnoremap <buffer> H :<C-u>execute “!pydoc3 “ . expand(“<cword>“)<CR>
</pre></code>
Save and close the file. Open vim text editor:
<code><pre>$ vim file.py</pre></code>
Write some code:
<code><pre>
#!/usr/bin/python3
x=5
y=10
z=x+y
print(z)
print("Hello world")
</pre></code>
Position cursor under the print Python keyword and press Shift‐H <br />
You will see output as follows:<br />
<br />
Access Python Help Within Vim
Gif.01: Press H to view help for the print Python keyword
<h3>How to view python help when using vim</h3>
jedi-vim is a VIM binding to the autocompletion library Jed. It can do <br />
many things including display help for keyword when you press Shift&dashK<br />
i.e. press capital K.
<h3>How to install jedi-vim on Linux or Unix-like system</h3>
Use pathogen, vim-plug or Vundle to install jedi-vim. I am using Vim-Plug.<br />
Add the following line in ~/vimrc:
<code><pre>Plug 'davidhalter/jedi-vim'</pre></code>
Save and close the file. Start vim and type:
<code><pre>PlugInstall</pre></code>
On Arch Linux, you can also install jedi-vim from official repositories as<br />
vim-jedi using pacman command:
<code><pre>$ sudo pacman -S vim-jedi</pre></code>
It is also available on Debian (?8) and Ubuntu (?14.04) as vim-python-jedi<br />
using apt command/apt-get command:
<code><pre>$ sudo apt install vim-python-jedi</pre></code>
On Fedora Linux, it is available as vim-jedi using dnf command:
<code><pre>$ sudo dnf install vim-jedi</pre></code>
Jedi is by default automatically initialized. So no further configuration needed<br />
on your part. To see Documentation/Pydoc press K. It shows a popup with <br />
assignments:<br />
<img src="./pictures/How-to-view-Python-Documentation-using-pydoc-within-vim-on-Linux-Unix.jpg">
<h3>Link:</h3>
<a href="https://www.cyberciti.biz/faq/how-to-access-view-python-help-when-using-vim/" target="_blank">nixCraft :: How to access/view Python help when using vim</a><br />
<br />
</html>
<html>
<ul>
<li><h3>REPL terminal:</h3>
<ul>
<li>REPL := “read ‐ eval ‐ print loop“</li>
<li>write a function using the os module;</li>
</ul></li>
<li><h3>Windows Command prompt / Anaconda prompt</h3>
<code><pre>
from os import system
def clear_screen():
system("cls")
</pre></code>
</li>
<li><h3>RedHat/ Ubuntu/ Centos (Linux)</h3>
<code><pre>
from os import system
def clear_screen():
system("clear")
</pre></code>
</li>
<li><h3>IDLE</h3>
<ul>
<li>IDLE := Integrated Development and Learning Environment</li>
<li><code><pre>
def clear():
print("\n" * 47)
</pre></code></li>
</li>
</ul>
<h3>Links:</h3>
<ul
<li><a href="https://www.pythonpool.com/how-to-clear-python-shell/" target="_blank" rel="noreferrer noopener">Python Pool : How to clear Python Shell</a></li>
<!--
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
-->
</ul>
</html>
<html>
<ul>
<li><h3>Installation unter Debian/Ubuntu</h3>
<code><pre>
get ‐qO ‐ https://download.sublimetext.com/sublimehq‐pub.gpg | sudo apt‐key add ‐     <em># bei “‐qO“ ist das der Buchstabe O, nicht die Zahl 0</em>
sudo apt‐get install apt‐transport‐https
echo “deb https://download.sublimetext.com/ apt/stable/“ | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt‐get update
sudo apt‐get install sublime‐text
</pre></code>
</li>
<li>Einrückung rückgängig machen (<em>unindentation</em>):
<code><pre>
Ctrl + [
</pre></code></li>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.fullstackpython.com/sublime-text.html" target=_blank rel="norefferer noopener">FullStackPython :: Sublime</a></li>
<li><a href="https://realpython.com/products/sublime-python/" target=_blank rel="norefferer noopener">Real Python :: Sublime step‐by‐step course</a></li>
<li><a href="https://www.sublimetext.com/" target=_blank rel="norefferer noopener">Sublime Text :: Homepage</a></li>
<li><a href="https://www.tecmint.com/sublime-text-editor-for-linux/" target=_blank rel="norefferer noopener">TecMint :: Sublime ‐ Text editor for Linux</a>
<em>(Installationsanweisungen)</em></li>
</ul>
</html>
<html>
<ul>
<li>lightweight Integrated Development Environment</li>
<li>IDLE allows to create/read/edit and execute your programs under the same roof without touching the command line. You can also access Python Shell from IDLE.</li>
<li>IDLE starten : <code><b>idle3</b></code> (Version 3.4+)<br />
→ ein separates Fenster erscheint, mit dem für Python typischen Eingabe‐Prompt:
<code><pre>
>>>
</pre></code>
Dadurch steht der Python‐Interpreter in der Python Shell zur Verfügung.</li>
<li>Die IDE stellt einen eigenen Editor bereit: <code><b>File</b></code> → <code><b>New File</b></code> oder <code><b>Open …</b></code></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://overiq.com/python-101/idle-and-python-shell/" target=_blank>OverIQ :: Python - IDLE & Python Shell</a></li>
</ul>
</html>
<html>
<h2>Vortrag von Switowski :: </h2>
<table>
<tr><th>Magic functions in IPython</th></tr>
<tr><td>%alias</td><td>%load_ext</td><td>%rerun</td></tr>
<tr><td>%cpaste</td><td>%ls</td><td>%save</td></tr>
<tr><td>%debug</td><td>%macro</td><td>%store</td></tr>
<tr><td>%edit</td><td>%prun</td><td>%timeit</td></tr>
<tr><td>%history</td><td>%recall</td><td>%who / %whos</td></tr>
<tr><td>%load</td><td>%rehashx</td><td>%xmode</td></tr>
</table>
Weitere Magic functions:
<ul>
<li>%pastebin</li>
<li>%run</li>
<li>%autoreload</li>
<li>%debug</li>
<li>%lprun :: line‐Profiler</li>
<li>%mprun :: memory‐Profiler</li>
</ul>
<br />
Erklärungen:
<ul>
<li><b>%load_ext</b> :: hiermit werden die sog. Extensions geladen</li>
<li><b>xonsh</b> :: wird “consh“ ausgesprochen<br />
Links:<br />
<a href="https://www.youtube.com/watch?v=uaje5I22kgE">Anthony Scopatz ‐ xonsh ‐ PyCon 2016</a></li>
<li></li>
</ul>
<h3>Links:</h3>
</html>
<html>
<ul>
<li>For Python 3 users, the preferred <br />
method is to use the Dnf package<br />
manager:
<pre><code>sudo dnf install python3-pip</code></pre>
</li>
<li>After installing pip, you can check<br />
the installation by running:
<pre><code>pip --version</code></pre>
</li>
<li><h4>Upgrading Pip</h4>
<ul>
<li>To ensure that you’re using the<br />
latest version of pip, you can<br />
upgrade it using the following<br />
command:
<pre><code>pip install --upgrade pip</code></pre>
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.linuxboost.com/how-to-install-pip-on-almalinux/"
target="_blank" rel="noreferrer noopener">
LinuxBoost :: How to Install Pip on AlmaLinux: A Step-by-Step Guide </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>pip ist der Paketmanager von Python;
</li>
<li>unterstützt bei der Installation & Verwaltung von Paketen;
</li>
<li>Alternativen zu pip: Conda, Pipenv
</li>
<li><h3>pip–Befehle:</h3>
<ul>
<li>Installation von Paketen:
<pre><code>pip install <em><PAKET-01></em> <em><PAKET-02></em> … </code></pre>
</li>
<li>De-Installation von Paketen:
<pre><code>pip uninstall <em><PAKET-01></em> <em><PAKET-02></em> … </code></pre>
</li>
<li>Auflisten der installierten Pakete:
<pre><code>pip freeze</code></pre>
</li>
<!--
<li>
</li>
-->
</ul>
</li>
<li>wenn mehrere Pakete mit bestimmten Versionen benötigt,<br />
verwendet man die Datei <code>requirements.txt</code>, in der die<br />
die benötigten Pakete mit den entsprechenden Versionen<br />
einträgt, und diese Datei dann als Argument dem pip–Be–<br />
fehlt mitgibt:
<ul>
<li>File <code>requirements.txt</code>:
<pre><code>DateTime==4.4
numpy==1.22.4
pandas==1.4.2</code></pre>
</li>
<li>pip-Befehl:
<pre><code>pip install –r requirements.txt </code></pre>
Dabei hat man im Verzeichnis der Datei zu sein.<br />
</li>
</ul>
</li>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href=""
target="_blank" rel="noreferrer noopener">
Florian Dalwigk :: Ethical Hacking – Das große Buch Hacking mit Python, Kapitel 4.4 </a>
</li>
<li><a href="https://pypi.org"
target="_blank" rel="noreferrer noopener">
pip – Homepage </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>Um die Shell zu verlassen, gibt es:
<ol>
<li><code><b>quit()</b></code></li>
oder
<li>Eingabe Tastenkombination: <code><b><i>Strg + d</i></b></code></li>
</ol></li>
<br />
<li>Wenn ich ein Python-Script in einem File habe<br />
und ich will es mit der Python-Shell aufrufen:
<code><pre>python3 -i <i>FileName</i></pre></code>
Danach führt der Python-Interpreter den Code<br />
im File aus.</li>
<br />
<li>Alternativ:
<code><pre>>>> exec(open("<em>fileName</em>.py").read())</pre<</code></li>
<br />
<li></li>
<br />
</ul>
</html>
<html>
<h2>Python Basic Interview Questions</h2>
<ul>
<li>1. What is Dynamic Typing in Python?</li>
<li>2. How to check the data type of the variable or object?</li>
<li>3. Justify: Everything is an object in Python?</li>
<li>4. What is the Built-in function in Python?</li>
<li>5. How to take multi-line user input in Python?</li>
<li>6. How do you create a dictionary which can preserve the order of pairs?</li>
<li>7. What is the use of enumerate() in Python?</li>
<li>8. How instance variables are different from class variables?</li>
<li>9. What is List comprehension?</li>
<li>10. What is __init__ method?</li>
<li>11. Differentiate between append() and extend() methods ?</li>
<li>12. What's the difference between Py2.x and Py3.x?</li>
<li>13. Explain indexing and slicing.</li>
<li>14. What is negative indexing in Python?</li>
<li>15. How to reverse a string?</li>
<li>16. What are the numeric data types in Python?</li>
<li>17. What are the minimum and maximum values of int in Python?</li>
<li>18. Difference between mutable and Immutable datatype.</li>
<li>19. What is the difference between list and tuple?</li>
<li>20. What are the Built-in modules available in Python?</li>
</ul>
<h2>Advance Python Interview Questions</h2>
<ul>
<li>21. What is Web Scraping? How do you achieve it in Python?</li>
<li>22. Explain the use of “with“ statement in Python?</li>
<li>23. What is a metaclass?</li>
<li>24. How do you go about packaging Python code?</li>
<li>25. How Python is interpreted?</li>
<li>26. Difference between “range“ vs “Xrange“</li>
<li>27. What is the term “lazy“ means in Python?</li>
<li>28. What is the difference between Iterators and generators?</li>
<li>29. What is the difference between yield and return in Python?</li>
<li>30. Write a Python Fibonacci Generator Program.</li>
<li>31. Difference between “deep copy“ vs “shallow copy“</li>
<li>32. Difference between list.sort() or sorted(list)?</li>
<li>33. What is the lambda method in Python?</li>
<li>34. What is a map function?</li>
<li>35. What is the filter function?</li>
<li>36. What is the reduce function?</li>
<li>37. What are decorators in Python?</li>
<li>38. What is name mangling?</li>
<li>39. How to define private variables in a class?</li>
<li>40. What is Virtual Environment in Python? Why is it needed?</li>
<li>41. What is the difference between static and class methods?</li>
<li>42. How does Memory Management work in Python?</li>
<li>43. How does Python Garbage Collection work?</li>
</ul>
<h2>Python Interview Programs and Coding Questions</h2>
<ul>
<li>44. Coding Question on Split Function</li>
<li>45. How to merge two Python list into a dictionary?</li>
<li>46. How to sort characters in a string?</li>
<li>47. How to find the index of all the occurrences in the list?</li>
<li>48. How to Validate IP address?</li>
<li>49. How to define an empty class in Python?</li>
<li>50. Basic Python Programming Questions asked in Interview</li>
<li>51. Competitive Programming Questions asked in Coding Challenge</li>
<li>52. How to Implement different sorting algorithms in Python?</li>
<li>53. What are the Time and Space Complexity of sorting algorithms?</li>
<li>54. How to create a MySQL connection with python?</li>
<li>55. Company-wise Python Coding Questions</li>
</ul>
<h2>Python Questions Related to ML, AI, DS</h2>
<ul>
<li>56. List down important Python libraries for Machine Learning.</li>
<li>57. What are the Useful Python libraries for General AI?</li>
<li>58. What are the Python modules supporting Neural Networking?</li>
<li>59. Name some good Python Libraries for Natural Language and Text Processing.</li>
<li>60. What are the best Python modules for Data Science?</li>
<li>61. List down some important Networking related Python libraries.</li>
<li>62. What are the different Web development frameworks?</li>
<li>63. Can we build a mobile application using Python?</li>
</ul>
<h2>Other Interview Questions for Python Developer</h2>
<h2>How you can make the best use of it?</h2>
<h3>Link:</h3>
<a href="https://www.csestack.org/python-interview-questions-answers/" target=_blank>CSEStack.org :: Top 63 Python Interview Questions and Answers Asked in Product Companies</a>
</html>
<html>
<ol>
<li><details>
<summary><b>Why was the language called as Python?</b></summary>
Python actually got its name from a BBC comedy series from the seventies Monty Python's Flying Circus . The designer needed a name that was short, unique, and slightly mysterious. Since he was a fan of the show he thought this name was great, so he decided to call the language Python.</details>
</li>
<br />
<li><details>
<summary><b>Name few Python Web Frameworks for developing web applications?</b></summary>
There are various web frameworks provided by Python. Some popular frameworks are :
<ul>
<li>Django</li>
<li>TurboGears</li>
<li>Web2py</li>
<li>Flask</li>
<li>Pyramid</li>
<li>Cubic Web</li>
</ul></details>
</li>
<br />
<li><details>
<summary></b>What is PEP 8?</b></summary>
Pep8 is a coding standard and Style Guide for readability and long-term maintainability. It was designed to help python developers write more readable code. It's not a requirement for your code to work, just a good coding practice you should follow.</details></li><br />
<li><details>
<summary></b>What IDE to use for Python?</b></summary>
There are various IDE for Python development. Some popular IDEs are :
<ul>
<li>Pycharm IDE</li>
<li>Pydev IDE</li>
<li>Wing IDE</li>
<li>Eric Python IDE</li>
<li>Vim IDE</li>
<li>IPython Notebook</li>
</ul>
Also, Visual Studio has an extension for Python: https://pytools.codeplex.com</details></li><br />
<li><details>
<summary></b>What are all the operating system that Python can run on?</b></summary>
Python is a platform independent language, it works for all Operating Systems like, Windows, Unix, Linus, MacOS etc.</details></li><br />
<li><details>
<summary></b>Is python a case sensitive language?</b></summary>
Yes, Python a case sensitive language
Case sensitive means that x is different from X. The variable of John is different from the variable of john.</details></li><br />
<li><details>
<summary></b>What is the purpose of PYTHONPATH environment variable?</b></summary>
Setting the PYTHONPATH environment variable is an easy way to make Python modules available for import from any directory. When you import modules in python, python searches for the module in the directories in PYTHONPATH, in addition to some other directories.</details></li><br />
<li><details>
<summary></b>Docstrings vs Comments</b></summary>
Documentation is important to understand what the code does. Docstrings are for people who are going to be using your code without needing or wanting to know how it works. Docstrings can be turned into actual documentation. While, comments are meant to give specific information on blocks or lines, #TODO is used to remind you what you want to do in future, definition of variables and so on.</details></li><br />
<li><details>
<summary></b>What's wrong with import all?</b></summary>
Importing * from a module, you will import all the functions and classes in your own namespace, which may clash with the functions you define yourself. Also you don't know exactly what is imported and can't find place from what module certain thing was imported easily (readability).</details></li><br />
<li><details>
<summary></b>How is print statement represented in Python 3 (v/s Python2)?</b></summary>
In Python 2.x print is actually a special statement, while in Python 3.x the print statement has been replaced with a print() function. It means that we have to wrap the object that we want to print in parentheses. Python 2 doesn't have a problem with additional parentheses, but in contrast, Python 3 would raise a Syntax Error if we called the print function without the parentheses.</details></li><br />
<li><details>
<summary></b>How can I read inputs as integers/float?</b></summary>
The input() method in Python return strings. Convert the result to integer explicitly with int()/float().
<code><pre>
x = int(input("Enter a number: "))
y = float(input("Enter a number: "))</pre></code></details></li><br />
<li><details>
<summary></b>What are the supported data types in Python?</b></summary>
Python's data types are built in the core of the language. Sticking to the hierarchy scheme used in the official Python documentation these are numeric types, sequences, sets and mappings.
<ul>
<li>Numeric types: int, long, float, complex.</li>
<li>Sequences: String, bytes, byte array, list, tuple.</li>
<li>Sets: set, frozen set.</li>
<li>Mappings: dict.</li>
</ul></details></li><br />
<li><details>
<summary></b>What are Python decorators?</b></summary>
A decorator is a function that takes another function and extends the behaviour of the latter function without explicitly modifying it. This supports more readable applications of the DecoratorPattern but also other uses as well.</details></li><br />
<li><details>
<summary></b>Is there a switch..case statement in Python?</b></summary>
No. There is no switch or case in Python.</details></li><br />
<li><details>
<summary></b>How can we get home directory using '~' in Python?</b></summary>
On Unix and Windows, return the argument with an initial component of ~ or ~user replaced by that user's home directory.
<code><pre>
import os
home = str(os.path.expanduser('~'))
print(home)
</pre></code>
or
<code><pre>
import os
home = str(os.path.expanduser('~user'))
print(home)</pre></code></details></li><br />
<li><details>
<summary></b>What is the purpose of the "//" operator in python?</b></summary>
"//" is for flooring division
<code><pre>5//2=2</pre></code></details></li><br />
<li><details>
<summary></b>How do I test one variable against multiple values?</b></summary>
The "in" operator you can use in this case.
<code><pre>
x=2
if x in (1,2,3,4,5):
print("found")
else:
print("Not found")
</pre></code>
Above statement validate... x=1 or x=2 or x=3 or x=4 or x=5.</details></li><br />
<li><details>
<summary></b>How to call an external command in Python?</b></summary>
The subprocess module allows you to spawn new processes, connect to their input/output/error pipes, and obtain their return codes. The subprocess.call() method run the command described by args. Wait for command to complete, then return the returncode attribute.<br />
<br />
<b>Windows example</b>
<code><pre>
from subprocess import call
call(["dir"])
</pre></code>
<b>Unix example</b>
<code><pre>
from subprocess import call
call(["ls", "-l"])
</pre></code></details></li><br />
<li><details>
<summary></b>Meaning of a single and double underscore before an object name?</b></summary>
<ul>
<li>_abc: weak "internal use" indicator. E.g. from X import * does not import objects whose name starts with single underscore.</li>
<li>__abc: the interpreter replaces this name with _classname__abc as a way to ensure that the name will not overlap with a similar name in another class.</li>
</ul>
</details></li><br />
<li><details>
<summary></b>Python read a single character from the user?</b></summary>
<code><pre>
while True:
userInput = input('>>')
if len(userInput) == 1:
break
print ("You should enter only one character")</pre></code></details></li><br />
<li><details>
<summary></b>Use of double quotes and single quote in Python.</b></summary>
Python does not have that restriction of single quotes for chars and double quotes for strings.
Both are equal and what you use is entirely your preference.
<code><pre>
print('Single Quotes')
print("Double Quotes")
</pre></code></details></li><br />
<li><details>
<summary></b>What's the difference between raw_input() and input() in python?</b></summary>
<ul>
<li>In Python 2, raw_input() takes exactly what the user typed and passes it back as a string.</li>
<li>In Python 3, raw_input() was renamed to input() so now input() returns the exact string and Old input() was removed.</li>
</ul></details></li><br />
<li><details>
<summary></b>What is the difference between Xrange and range?</b></summary>
<ul>
<li>In python 2.x range() returns a list and xrange() returns an xrange object, which is kind of like an iterator and generates the numbers on demand. </li>
<li>In Python 3, there is no xrange() , but the range() function behaves like xrange in Python 2. </li>
</ul>If you want to write code that will run on both Python 2 and Python 3, you should use range().
<code><pre>
for x in range(5):
print(x)
</code></pre>
Output
<code><pre>
0
1
2
3
4</pre></code></details></li><br />
<li><details>
<summary></b>How to exit python script in command prompt?</b></summary>
To leave the interactive shell and go back to the console (the system shell), press Ctrl-Z and then Enter on Windows, or Ctrl-D on OS X or Linux. Alternatively, you could also run the python command exit()!</details></li><br />
<li><details>
<summary></b>What is negative index in Python?</b></summary>
In python we can Both positive and negative index . Negative index is used in python to index starting from the last element of the list, tuple or any other container class which supports indexing.
-1 refers to the last index, -2 refers to the second last index and so on.
<code><pre>
lst = [1,2,3,4,5]
print(lst[-1])
print(lst[-2])
print(lst[-5])
</pre></code>
Output
<code><pre>
5
4
1</pre></code></details></li><br />
<li><details>
<summary></b>Is Python object oriented?</b></summary>
Yes. Python is an object-oriented language , in which the program is built around objects which combine data and functionality. Python classes provide all the standard features of Object Oriented Programming. It is a mixture of the class mechanisms found in C++ and Modula-3.</details></li><br />
<li><details>
<summary></b>Why is Python not fully object-oriented?</b></summary>
Python is an object-oriented language but not pure. Python doesn't support strong encapsulation , which is only one of many features associated with the term "object-oriented".</details></li><br />
<li><details>
<summary></b>What is a Class? How do you create it in Python?</b></summary>
Python Object is simply a collection of data (variables) and methods (functions) that act on those data. And, class is a blueprint for the object.
Here is a simple class definition.
<code><pre>
class MyClass:
MyVar = 0</pre></code></details></li><br />
<li><details>
<summary></b>How to convert strings into integers in Python?</b></summary>
Python int() method is the standard built-in function to convert a string into an integer value. You call it with a string containing a number as the argument, and it returns the number converted to an actual integer.
<code><pre>
print (int("100") + 1)</pre></code>
Return 101</details></li><br />
<li><details>
<summary></b>What is the output of print str * 2 if str = 'Hello World!'?</b></summary>
It will print 'Hello World!' two times.
<code><pre>
str = "Hello World!"
print(str*2) </pre></code>
Return "Hello World!Hello World!"</details></li><br />
<li><details>
<summary></b>How to capitalize the first letter of each word in a string (Python)?</b></summary>
The .title() method of a string (either ASCII or Unicode is fine) will capitalize the first letter of each word in a string.
<code><pre>
str = "python hello world"
print(str.title())</pre></code>
Return "Python Hello World"</details></li><br />
<li><details>
<summary></b>How to check the string consists of alphanumeric characters ?</b></summary>
The method isalnum() checks whether the string consists of alphanumeric characters.
<code><pre>
print ('123abc'.isalnum())
</pre></code>
Return True
<code><pre>
print ('123#$%abc'.isalnum()) </pre></code>Return False</details></li><br />
<li><details>
<summary></b>How will you check in a string that all characters are digits?</b></summary>
Python str.isdigit() method return true if all characters in the string are digits and there is at least one character, false otherwise.
<code><pre>
print ("12345".isdigit())
</pre></code>
Return True
<code><pre>
print ("12345abc".isdigit()) </pre></code>return False</details></li><br />
<li><details>
<summary></b>How will you remove all leading and trailing whitespace in string?</b></summary>
You can use the strip() to trim whitespace in Python.
<code><pre>
str = " hello World! "
print(str.strip())</pre></code>
Return "hello World!"</details></li><br />
</ol>
<br />
<h3>Links:</h3>
<a href="http://net-informations.com/python/iq/pfaq.htm" target=_blank>Net-Informations.com :: Interview questions 1</a>
</html>
<html>
<ol>
<li><details>
<summary><b>When does dictionary is used instead of a list?</b></summary>
<br />
You would only use the Dictionary if you needed to map (or associate) <br />
meaningful keys to values, whereas a List only maps (or associates)<br />
positions (or indices) to values.</details></li><br />
<li><details>
<summary><b>How to sort a dictionary by key?</b></summary>
<br />
<code><pre>
import operator
x = {1: 2, 3: 4, 4: 3, 2: 1, 0: 0}
sorted_x = sorted(x.items(), key=operator.itemgetter(0))
print(sorted_x)
</pre></code>
Output
<code><pre>
[(0, 0), (1, 2), (2, 1), (3, 4), (4, 3)]
</pre></code>
</details></li><br />
<li><details>
<summary><b>How to sort a dictionary by value?</b></summary>
<br />
<code><pre>
import operator
x = {1: 2, 3: 4, 4: 3, 2: 1, 0: 0}
sorted_x = sorted(x.items(), key=operator.itemgetter(1))
print(sorted_x)
</pre></code>
Output
<code><pre>
[(0, 0), (2, 1), (1, 2), (4, 3), (3, 4)]</pre></code>
</details></li><br />
<li><details>
<summary><b>What do you mean by list comprehension?</b></summary>
<br />
List comprehensions provide a concise way to create lists. Common<br />
applications are to make new lists where each element is the result of<br />
some operations applied to each member of another sequence or <br />
iterable, or to create a subsequence of those elements that satisfy<br />
a certain condition.
<code><pre>
lst = [x**2 for x in range(10)]
print(lst)
</pre></code>
Output
<code><pre>
[0, 1, 4, 9, 16, 25, 36, 49, 64, 81]
</pre></code>
same as :
<code><pre>
lst = []
for x in range(10):
lst.append(x**2)
print(lst)
</pre></code>
Output
<code><pre>
[0, 1, 4, 9, 16, 25, 36, 49, 64, 81]</pre></code>
</details></li><br />
<li><details>
<summary><b>How to clone or copy a list?</b></summary>
<br />
Python 3.3+ adds list.copy() method, which should be as fast as slicing:
<code><pre>
newlist = old_list.copy()</pre></code>
</details></li><br />
<li><details>
<summary><b>How to remove duplicates from a list ?</b></summary>
<br />
<code><pre>
itemList = ['1', '2', '3', '3', '6', '4', '5', '6']
newList = []
[newList.append(item) for item in itemList if item not in newList]
print(newList)
</pre></code>
Output
<code><pre>
['1', '2', '3', '6', '4', '5']</pre></code>
</details></li><br />
<li><details>
<summary><b>What is a built-in function that Python uses to iterate over <br />
a number sequence?</b></summary>
<br />
The range() is the built-in function to be used for iterating the sequence of<br />
numbers.
<code><pre>
for num in range (1, 5):
print (num)
</pre></code>
</details></li><br />
<li><details>
<summary><b>How many kinds of sequences are supported by Python? What are they?</b></summary>
<br />
Python supports six sequence types, they are:
<ul>
<li>strings
<li>unicode strings
<li>lists
<li>tuples
<li>buffers
<li>range objects
</ul>
</details></li><br />
<li><details>
<summary><b>Explain the shortest way to open a text file and display its contents?</b></summary>
<br />
<code><pre>
with open("index.txt") as f:
s = f.read()
print (s)
</pre></code></details></li><br />
<li><details>
<summary><b>How to redirect stdout to a file in Python?</b></summary>
<br />
You can use shell redirection while executing the python file.
<code><pre>
python test.py > output.txt
</pre></code>
</details></li><br />
<li><details>
<summary><b>How to display the contents of text file in reverse order?</b></summary>
<br />
The reversed() method returns an iterator that accesses the given sequence<br />
in the reverse order.
<code><pre>
for line in reversed(list(open("index.txt"))):
print(line.rstrip())</pre></code>
</details></li><br />
<li><details>
<summary><b>Explain what is Dogpile effect? How can you prevent this effect?</b></summary>
<br />
The <b>Dogpile effect</b> occurs when cache expires and websites are hit by<br />
numerous requests the same time. It is triggered because we allowed<br />
more than one request to execute the expensive query.<br />
<br />
Dog pile effect can be prevented using semaphore lock. If value expired, <br />
first process acquires a lock and starts generating new value. All the sub‐<br />
sequent requests check if lock is acquired and serve stale content. After <br />
new value is generated, lock is released.</details></li><br />
</ol>
<br />
<h3>Links:</h3>
<a href="http://net-informations.com/python/iq/pfaq1.htm" target=_blank>Net-Informations.com :: Interview questions 2</a>
</html>
<html>
<ul>
<li><h3>01. Know how to write code on a whiteboard or paper</h3></li>
<li><h3>02. Know basic Python control flow</h3>
<ul>
<li><em>for</em>‐Loops</li>
<li><em>while</em>‐Loops</li>
<li><em>if ‐ elif ‐ else</em> statement</li>
</ul></li>
<li><h3>03. Be able to discuss how you've used Python</h3>
<ul>
<li>Schreib ein kleines privates Projekt oder nimm an einem anderen Projekt teil;</li>
</ul></li>
<li><h3>04. Know how to solve common interview problems</h3>
Als Vorbereitung zum Interview: <em>Programmieren, programmieren, programmieren!</em> <br />
<br />
Beispiele:
<ul>
<li><a href="https://de.wikipedia.org/wiki/Fizz_buzz" target=_blank>Fizz Buzz</a></li>
<li>Fibonacci‐Zahlen</li>
</ul>
<li><h3>05. Know basic Python data types and when to use them</h3>
<ul>
<li>Set</li>
<li>Tuples</li>
<li>Dictionarys</li>
<li>Lists</li>
</ul>
<br />
<a href="http://stackoverflow.com/questions/1708510/python-list-vs-tuple-when-to-use-each" target=_blank>When to use a list or tuple?</a></li>
<li><h3>06. Know how to use list comprehensions</h3>
Eine saubere Art und Weise solche Zahlenreihen zu erzeugen;<br />
<br />
<a href="https://www.youtube.com/watch?v=3dt4OGnU5sM" target=_blank>Corey Schafer :: List comprehensions</a>
</li>
<li><h3>07. Know how to use generators</h3>
<br />
<br />
<a href="https://www.youtube.com/watch?v=bD05uGo_sVI" target=_blank>Corey Schafer :: Generators</a></li>
<li><h3>08. Know the basics of OOP</h3></li>
<li><h3>09. Have Python related questions ready to ask your interviewer</h3>
z.B.
<ul>
<li>Welche Test-Tools werden verwendet? (→ pytest)</li>
<li>Wird das Konzept der virtual envs verwendet? (→ venv)</li>
<li>Welche weiteren Tools werden verwendet? (→ Static code checker [pylint, mypy])
</ul>
<li><h3>10. Know the basics of other technologies</h3>
<br />
<br />
<a href="https://en.wikipedia.org/wiki/T-shaped_skills" target=_blank>Wikipedia :: What is a T-Shaped Skillset?</a>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.youtube.com/watch?v=DEwgZNC-KyE" target=_blank>Corey Schafer :: Preparing for a Python Interview: 10 Things You Should Know</a></li>
</ul>
</html>
<html>
<code><pre>
(hier scheint was zu fehlen)
<b>class Repeater:</b>
def __init__(self, value):
self.value = value
def __iter__(self):
RepeaterIterator(self)
<b>class RepeaterIterator:</b>
def __init__(self, source):
self.source = source;
def __next__(self):
print('... entering __next__')
sleep(5)
return self.source.value
def main():
repeater = Repeater('Hello')
#for item in repeater:
# print(item)
# beide nachfolgenden Zeilen sind identisch:
# (a) iterator = iter(repeater)
# (b) iterator = repeater.__iter__()
iterator = repeater.__iter__()
while True:
item = iterator.__next__()
print(item)
main()
</pre></code>
Python offers these facades for other functionality as <br />
well. For example, len(x) is a shortcut for calling <br />
x.__len__. Similarly, calling iter(x) invokes x.__iter__ <br />
and calling next(x) invokes x.__next__.<br />
<br />
First setting up and retrieving the iterator object <br />
with an iter() call, and then repeatedly fetching <br />
values from it via next().<br />
<br />
__iter__ returns any object with a __next__ method on it.<br />
<br />
Bessere Realisierung: innerhalb _EINER_ Klasse
<code><pre>
class Repeater:
def __init__(self, value):
self.value = value
def __iter__(self):
return self
def __next__(self):
return self.value
</pre></code>
Abbruch durch Werfen einer StopIteration-Exception.<br />
→ Iterators use exceptions to structure control flow. To <br />
<div style="text-indent:30px"> </div>signal the end of iteration, a Python iterator sim-<br />
ply raises the built-in StopIteration exception.<br />
<br />
Python iterators normally can't be “reset“ once they're <br />
exhausted they're supposed to raise StopIteration every <br />
time next() is called on them. To iterate anew you'll <br />
need to request a fresh iterator object with the iter() <br />
function.<br />
<br />
→ Klasse mit Iterator und Abbruch:
<code><pre>
class BoundedRepeater:
def __init__(self, value, max_repeats):
self.value = value
self.max_repeats = max_repeats
self.count = 0
def __iter__(self):
return self
def __next__(self):
if self.count >= self.max_repeats:
raise StopIteration
self.count += 1
return self.value
</pre></code>
<h4>Python Iterators ‐ A Quick Summary</h4>
<ul>
<li>Iterators provide a sequence interface to Python objects<br />
that's memory efficient and considered Pythonic. <br />
Behold the beauty of the for-in loop!</li>
<li>To support iteration an object needs to implement the <br />
iterator protocol by providing the __iter__ and <br />
__next__ dunder methods.</li>
<li>Class-based iterators are only one way to write iterable <br />
objects in Python. Also consider generators and <br />
generator expressions.<br />
[Was ist mit list comprehensions?]</li>
</ul>
<h3>Link:</h3>
<a href="https://dbader.org/blog/python-iterators" target=_blank>Dan Bader :: Python iterators</a>
</html>
<html>
<ul>
<li><a href="http://jinja.pocoo.org/docs/2.9/" target="_blank">Welcome to Jinja2</a></li>
<li><a href="http://jinja.pocoo.org/docs/2.9/intro/" target="_blank">Jinja2 Documentation (2.9) Introduction</a></li>
<li><a href="http://kagerato.net/articles/software/libraries/jinja-quickstart.html" target="_blank">Jinja2 Documentation (2.9) Quickstart Guide to Using the Jinja2 Template Engine</a></li>
<li><a href="http://packetpushers.net/python-jinja2-tutorial/" target="_blank">Python and Jinja2 Tutorial - Packet Pushers</a></li>
</ul>
</html>
<html>
<ul>
<li><code><b>ipynb</b></code> := <b><u>Py</u></b>thon <b><u>N</u></b>ote<b><u>b</u></b>ook</li>
<li>Jupyter ist im wesentlichen “nur“ ein erweiterter Textverarbeitert (<i>advanced word processer</i>)</l>
<li><h3>Anlegen eines Notebooks</h3>
Im Dashboard nach rechts aussen gehen, und auf den Button "New" klicken:<br />
<img src="./pictures/JupyterNotebook_01.png" width=285 heigth=210 /><br />
… und hier den gewünschten Eintrag auswählen.<br />
<br />
Your first Jupyter Notebook will open in new tab ‐ each notebook <br />
uses its own tab because you can open multiple notebooks simul‐<br />
taneously. If you switch back to the dashboard, you will see the<br />
new file “<b>Untitled.ipynb</b>“ and you should see some green text <br />
that tells you your notebook is running.
</li>
<br />
<li><h3>Notebook-Namen ändern</h3>
In das Dashboard gehen, mit dem Cursor auf den String “Untitled“ gehen,<br />
anklicken, dann erscheint ein neues Fenster:<br />
<img src="./pictures/JupyterNotebook_02.png" width=296 heigth=176 /><br />
… und den neuen Namen abgeben und abspeichern.
</li>
<br />
<li>Befehl :: <code><b>Ctrl + Shift + p</b></code><br />
damit wird das “Keyboard-Icon“, die sog. <b><i>command palette</i></b> aktiviert, <br />
das eine Liste der verfügbaren Befehle anzeigt</li>
</ul>
<h3>Links:</h3>
<a href="https://www.dataquest.io/blog/jupyter-notebook-tutorial/" target=_blank>DataQuest :: Jupyter Notebook for Beginners: A Tutorial</a>
</html>
<html>
<h3>Neues Notebook erzeugen</h3>
<ol>
<li>im Anaconda-Navigator "Jupyter notebook" anklicken</li>
<li>ein Webbrowser mit Tab wird aufgerufen & angezeigt</li>
<li>Verzeichnis auswählen</li>
<li>Button "New" (Downward-Pfeil) anklicken</li>
<li>ein kleines Menü erscheint, <br />
hier z.B. das Notebook für "Python 3" auswählen</li>
<li>ein neues Jupyter-Notebook erscheint</li>
</ol>
<h3>Links</h3>
<a href="https://nbviewer.jupyter.org/github/jupyter/notebook/blob/master/docs/source/examples/Notebook/Notebook%20Basics.ipynb" target=_blank>Jupyter Notebook Basics</a>
</html>
<html>
<h3>Close a notebook: kernel shut down</h3>
When a notebook is opened, its “computational engine“(called the kernel) <br />
is automatically started. Closing the notebook browser tab, will not shut <br />
down the kernel, instead the kernel will keep running until is explicitly shut <br />
down.<br />
<br />
To shut down a kernel, go to the associated notebook and click on menu <br />
<code><b>File → Close</b></code> and <code><b>Halt</b></code>. <br />
<br />
Alternatively, the Notebook Dashboard has a tab named <code><b>Running</b></code> <br />
that shows all the running notebooks (i.e. kernels) and allows <br />
shutting them down (by clicking on a Shutdown button).
<h3>Links:</h3>
<a href="https://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/execute.html#kernel-shutdown" target=_blank>Close a notebook: <i>kernel</i> shut down</a>
</html>
<html>
Damian Avila's <a href="https://github.com/damianavila/RISE" target=_blank>RISE</a> allows you to create a powerpoint <br />
style presentation from an existing notebook.<br />
<br />
You can install RISE using conda:<br />
<code><b>
conda install -c damianavila82 rise<br />
</b></code>
<br />
Or alternatively pip:<br />
<code><b>
pip install RISE<br />
</b></code>
<br />
And then run the following code to install and enable the extension:<br />
<code><b>
jupyter-nbextension install rise --py --sys-prefix<br />
jupyter-nbextension enable rise --py --sys-prefix<br />
</b></code>
<h3>Links:</h3>
<a href="https://www.dataquest.io/blog/jupyter-notebook-tips-tricks-shortcuts/" target=_blank>DataQuest :: 28 Jupyter Notebook Tips, Tricks, and Shortcuts</a>
</html>
<html>
<ul>
<li><code><b>%debug</b></code><br />
<ul>
<li>magic command</li>
<li>interner, interactiver Debugger</li>
</ul></li>
<li><code><b>Tracer()()</b></code><br />
<ul>
<li>Aufruf:<br />
dazu wird folgende Codezeile in das Programm eingebaut:<br />
<code>from IPython.core.debugger import <b>Tracer; Tracer()()</b></code></li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://kawahara.ca/how-to-debug-a-jupyter-ipython-notebook/" target=_blank>Kawahara :: How to debug a Jupyter Notebook</a></li>
<li><a href="https://www.blog.pythonlibrary.org/2018/10/17/jupyter-notebook-debugging/" target=_blank>PythonLibrary.org :: Jupyter Notebook debugging</a></li>
<li><a href="https://davidhamann.de/2017/04/22/debugging-jupyter-notebooks/" target=_blank>David Hamann :: Debugging Jupyter Notebooks</a></li>
</ul>
</html>
<html>
<ul>
<li>to install or upgrade a package for the current environment:
<code><pre>
import sys
!$sys.executable -m pip install [‐‐upgrade] <em><package></em>
</pre></code></li>
</ul>
Das funktioniert, weil:
<ul>
<li>in a Python session, the <b><em>sys.executable</em></b> attribute is a string<br />
with the full path to the executable for the current environment,<br />
e.g.:
<code><pre>
sys.executable
# Exected result like...
# /Users/myname/anaconda3/envs/myenv/bin/python
</pre></code>
</li>
<li>we use:
<ul>
<li><code><b>!</b></code> (esclamation mark) to escape shell commands in a notebook</li>
and
<li><code><b>$</b></code> to insert Python variables from the current session into that<br />
shell command.</li>
</ul></li>
<li></li>
<li></li>
<li></li>
</ul>
After you run the command, you might need to restart the notebook for<br />
the new package to be available.<br />
<h2>VORSICHT!</h2>
<u>You should usually avoid this pattern!</u> Whenever possible, you want<br />
your Python code to be in a reproducible environment. Use some‐<br />
thing like Poetry for that, or at least save dependencies in requirements.txt.<br />
<h3>Links:</h3>
<ul>
<li><a href="https://jbencook.com/install-packages-jupyter-notebook/" target="_blank" rel="noreferrrer noopener">JBenCook :: Installing packages in Jupyter Notebook</a></li>
<li><a href="https://python-poetry.org/" target="_blank" rel="noreferrer noopener">Poetry</a>, Python packaging and dependency management</li>
</ul>
</html>
<html>
<ul>
<li>Jupyter bietet den Aufruf sog. “magic commands“ an;</li>
<li>eigenlich werden sie vom IPython kernel bereitgestellt;</li>
<li>diese Befehle beginnen mit einem Prozentzeichen, “%“ (die sog. <i>line magics</i>) <br />
oder mit zwei Prozentzeichen, “%%“ (die sog. <i>cell magics</i>)<br />
⇒ line magics apply only to the line the magic command is written on,<br />
während cell magics apply to the whole cell.</li>
<li>mit “<code><b>!<i>Shell Cmd</i></b></code>“ lassen sich Unix Shell-Befehle ausfüren</li>
<li><h3>Befehlsliste</h3>
<table>
<tr><th>Befehl</th><th>Bedeutung</th></tr>
<tr><td>%lsmagic</td><td>listet alle zur Verfügung stehenden Magic Commands auf</td></tr>
<tr><td>%ls</td><td></td></tr>
<tr><td>%cat</td><td></td></tr>
<tr><td>%whos</td><td></td></tr>
<tr><td>%pylab</td><td>pylab is part of matplotlib (in matplotlib.pylab) and tries<br />
to give you a MatLab like environment. matplotlib has a<br />
number of dependencies, among them numpy which it<br />
imports under the common alias np. scipy is not a depen‐<br />
dency of matplotlib.<br />
<br />
⇒ <code<b>%pylab inline</b></code> ::<br />
mit “inline“ werden alle graphischen Darstellungen <u>inner‐ <br />
halb</u> von Jupyter angezeigt, und <u>nicht</u> außerhalb, als <br />
externes Plot‐Fenster;</br />
<br />
<b>Documentation:<br /></b>
<u>positional arguments:</u><br />
gui Name of the matplotlib backend to use;<br />
possible values: 'gtk', 'gtk3', 'inline', 'nbagg', 'notebook', <br />
'osx', 'qt', 'qt4', 'qt5', 'tk', 'wx';<br />
If given, the corresponding matplotlib backend is used, <br />
otherwise it will be matplotlib's default (which you can <br />
set in your matplotlib config file.<br />
<br />
loads Numpy as “np“<br />
loads MatplotLib as “plt“<br />
in den globalen Namespace</td></tr>
<tr><td>%env</td><td>Set Environment Variables</td></tr>
<tr><td>%run</td><td>Execute python code</td></tr>
<tr><td>%load</td><td>Insert the code from an external script</td></tr>
<tr><td>%store</td><td>Pass variables between notebooks</td></tr>
<tr><td>%who</td><td>List all variables of global scope</td></tr>
<tr><td>%pyplot</td><td></td></tr>
<tr><td>%paste</td><td>to execute a code snippet (particularly for <br />
multi-line snippets which would usually <br />
cause an _IndentationError_ to be thrown):</td></tr>
<tr><td>%time</td><td></td></tr>
<tr><td>%%time</td><td></td></tr>
<tr><td>%timeit</td><td></td></tr>
<tr><td>%pycat</td><td>Export the contents of a cell/<br />
Show the contents of an external script</td></tr>
<tr><td>%%writefile</td><td>Export the contents of a cell/<br />
Show the contents of an external script</td></tr>
<tr><td>%prun</td><td>Show how much time your program spent in each function</td></tr>
<tr><td>%debug</td><td>Aufruf des internen Debuggers;<br />
<ul><li>Beenden: <code><b>quit</b></code></li>
<li>weitere Befehle: <code><b>up</b></code><br /><code><b>print(<i><Vars></i>)</b></code></li>
</ul></td></tr>
<tr><td>%pdb</td><td>Debugging with <code><b>pdb</b></code>, dem Python Debugger</td></tr>
<tr><td>%config</td><td></td></tr>
<tr><td>%mode</td><td>Ausgabe Fehlerprotokoll;<br />
mögliche Wert <code><b>plain, compact, verbose</b></code></td></tr>
<tr><td>%pprint</td><td>Pretty printing;<br />Default : OFF
</td></tr>
<!-- tr><td></td><td></td></tr -->
</table>
<li><code><b>inline</b></code> :: mit dieser Angaben, z.B. bei <code><b>%pylab inline</b></code> ... ???<br />
<img src="./pictures/jupyter_pylab-inline-01.png" width=557 height=64 </li>
</li>
</ul>
<h3>Links</h3>
<ul>
<li><a href="https://ipython.org/ipython-doc/3/interactive/magics.html" target=_blank>IPython Interactive Computing :: Magic Commands</a></li>
<li><a href="https://www.dataquest.io/blog/jupyter-notebook-tips-tricks-shortcuts/" target=_blank>DataQuest :: 28 Jupyter Notebook Tips, Tricks, and Shortcuts</a></li>
<li><a href="https://ipython.readthedocs.io/en/stable/interactive/magics.html" target=_blank>IPython documentation :: IPython Magic commands</a></li>
<li><a href="https://www.tutorialspoint.com/jupyter/ipython_magic_commands.htm" target=_blank>Tutorialspoint :: IPython - Magic Commands</a></li>
<li><a href="https://towardsdatascience.com/the-top-5-magic-commands-for-jupyter-notebooks-2bf0c5ae4bb8" target=_blank>Towards data science :: The Top 5 Magic Commands for Jupyter Notebooks</a></li>
</ul>
</html>
<html>
The Jupyter Notebook has <b>two different keyboard input modes</b>.:
<ul>
<li><b><i>Edit mode</i></b> allows you to type code or text into a cell <br />
and is indicated by a green cell border.</li>
<li><b><i>Command mode</i></b> binds the keyboard to notebook level commands <br />
and is indicated by a grey cell border with a blue left margin.</li>
</ul>
<h2>Command Mode (press <i>“Esc“</i> to enable)</h2>
<table border="1">
<tr><td>f </td><td> find and replace</td></tr>
<tr><td>Ctrl-Shift-f </td><td>open the command palette</td></tr>
<tr><td>Ctrl-Shift-p </td><td> dto. </td></tr>
<tr><td>Enter </td><td> enter edit mode</td></tr>
<tr><td>P </td><td> open the command palette</td></tr>
<tr><td>Shift-Enter </td><td> run cell, select below</td></tr>
<tr><td>Ctrl-Enter </td><td> run selected cells</td></tr>
<tr><td>Alt-Enter </td><td> run cell and insert below</td></tr>
<tr><td>Y </td><td> change cell to code</td></tr>
<tr><td>M </td><td> change cell to markdown</td></tr>
<tr><td>R </td><td> change cell to raw</td></tr>
<tr><td>1 </td><td> change cell to heading 1</td></tr>
<tr><td>2 </td><td> change cell to heading 2</td></tr>
<tr><td>3 </td><td> change cell to heading 3</td></tr>
<tr><td>4 </td><td> change cell to heading 4</td></tr>
<tr><td>5 </td><td> change cell to heading 5</td></tr>
<tr><td>6 </td><td> change cell to heading 6</td></tr>
<tr><td>K </td><td> select cell above</td></tr>
<tr><td>Up </td><td> select cell above</td></tr>
<tr><td>Down </td><td> select cell below</td></tr>
<tr><td>J </td><td> select cell below</td></tr>
<tr><td>Shift-K </td><td> extend selected cells above</td></tr>
<tr><td>Shift-Up </td><td> extend selected cells above</td></tr>
<tr><td>Shift-Down </td><td> extend selected cells below</td></tr>
<tr><td>Shift-J </td><td> extend selected cells below</td></tr>
<tr><td>a</td><td> insert cell above</td></tr>
<tr><td>b</td><td> insert cell below</td></tr>
<tr><td>X </td><td> cut selected cells</td></tr>
<tr><td>C </td><td> copy selected cells</td></tr>
<tr><td>Shift-V </td><td> paste cells above</td></tr>
<tr><td>V </td><td> paste cells below</td></tr>
<tr><td>z </td><td> undo cell deletion</td></tr>
<tr><td>d d </td><td> delete selected cells; <br /> die Zellen selbst sind im Notebook abgelegt</td></tr>
<tr><td>Shift-M </td><td> merge selected cells, or <br />current cell with cell below if only one cell is selected</td></tr>
<tr><td>Ctrl-S </td><td> Save and Checkpoint</td></tr>
<tr><td>S </td><td> Save and Checkpoint</td></tr>
<tr><td>L </td><td> toggle line numbers</td></tr>
<tr><td>O </td><td> toggle output of selected cells</td></tr>
<tr><td>Shift-O </td><td> toggle output scrolling of selected cells</td></tr>
<tr><td>H </td><td> show keyboard shortcuts</td></tr>
<tr><td>I,I </td><td> interrupt the kernel</td></tr>
<tr><td>0,0 </td><td> restart the kernel (with dialog)</td></tr>
<tr><td>Ctrl-V </td><td> Dialog for paste from system clipboard</td></tr>
<tr><td>Esc </td><td> close the pager</td></tr>
<tr><td>Q </td><td> close the pager</td></tr>
<tr><td>Shift-L </td><td> toggles line numbers in all cells, and persist the setting</td></tr>
<tr><td>Shift-Space </td><td> scroll notebook up</td></tr>
<tr><td>Space </td><td> scroll notebook down</td></tr>
</table>
<h2>Edit Mode (press <i>“Enter“</i> to enable)</h2>
<table border="1">
<tr><td>Tab </td><td> code completion or indent</td></tr>
<tr><td>Shift-Tab </td><td> tooltip</td></tr>
<tr><td>Ctrl-] </td><td> indent</td></tr>
<tr><td>Ctrl-[ </td><td> dedent</td></tr>
<tr><td>Ctrl-A </td><td> select all</td></tr>
<tr><td>Ctrl-Z </td><td> undo</td></tr>
<tr><td>Ctrl-/ </td><td> comment</td></tr>
<tr><td>Ctrl-D </td><td> delete whole line</td></tr>
<tr><td>Ctrl-U </td><td> undo selection</td></tr>
<tr><td>Insert </td><td> toggle overwrite flag</td></tr>
<tr><td>Ctrl-Home </td><td> go to cell start</td></tr>
<tr><td>Ctrl-Up </td><td> go to cell start</td></tr>
<tr><td>Ctrl-End </td><td> go to cell end</td></tr>
<tr><td>Ctrl-Down </td><td> go to cell end</td></tr>
<tr><td>Ctrl-Left </td><td> go one word left</td></tr>
<tr><td>Ctrl-Right </td><td> go one word right</td></tr>
<tr><td>Ctrl-Backspace </td><td> delete word before</td></tr>
<tr><td>Ctrl-Delete </td><td> delete word after</td></tr>
<tr><td>Ctrl-Y </td><td> redo</td></tr>
<tr><td>Alt-U </td><td> redo selection</td></tr>
<tr><td>Ctrl-M </td><td> enter command mode</td></tr>
<tr><td>Ctrl-Shift-F </td><td> open the command palette</td></tr>
<tr><td>Ctrl-Shift-P </td><td> open the command palette</td></tr>
<tr><td>Esc </td><td> enter command mode</td></tr>
<tr><td>Shift-Enter </td><td> run cell, select below</td></tr>
<tr><td>Ctrl-Enter</td><td> run selected cells</td></tr>
<tr><td>Alt-Enter </td><td> run cell and insert below</td></tr>
<tr><td>Ctrl-Shift-Minus </td><td> split cell at cursor</td></tr>
<tr><td>Ctrl-S </td><td> Save and Checkpoint</td></tr>
<tr><td>Down </td><td> move cursor down</td></tr>
<tr><td>Up </td><td> move cursor up</td></tr>
</table>
</html>
<html>
<ul>
<li>Nachfolger vom IPython Notebook</li>
<li><h3>Starten Jupyter</h3>
es gibt zwei Möglichkeiten:
<ul>
<li>Aufruf: <code><b>anaconda-navigator</b></code></li>
<li>Aufruf: <code><b>jupyter notebook</b></code><br />
dazu vorher eine (Unix-)Shell aufrufen<br />
und in das gewünschte Verzeichnis wechseln.<br />
Dort den obigen Befehl eingeben.</li>
</ul>
→ in beiden Fällen erscheint das sog. <b>Notebook Dashboard</b><br />
<br />
Das angezeigte Verzeichnis entspricht dem Aufruf-Verzeichnis.<br />
Soll das geändert werden, <a href="https://stackoverflow.com/questions/35254852/how-to-change-the-jupyter-start-up-folder" target=_blank>hier stehen die Infos dazu</a>.</li>
<br />
<li>Jupyter's Notebooks and dashboard are web apps, and Jupyter <br />
starts up a local Python server to serve these apps to your web browser,</li>
</ul>
<h3>Links:</h3>
<a href="https://www.dataquest.io/blog/jupyter-notebook-tutorial/" target=_blank>DataQuest :: Jupyter Notebook for Beginners: A Tutorial</a>
</html>
<html>
<ul>
<li><h3>bundlerextension</h3></li>
<li><h3>console</h3>
- statt im Browser wird das Notebook in der Shell aufgemacht;</li>
<li><h3>kernel</h3></li>
<li><h3>kernelspec</h3></li>
<li><h3>lab</h3></li>
<li><h3>labextension</h3></li>
<li><h3>labhub</h3></li>
<li><h3>migrate</h3></li>
<li><h3>nbconvert</h3></li>
<li><h3>nbextension</h3></li>
<li><h3>notebook</h3></li>
<li><h3>qtconsole</h3></li>
<li><h3>run</h3></li>
<li><h3>serverextension</h3></li>
<li><h3>troubleshoot </h3></li>
<li><h3>trust</h3></li>
</ul>
</html>
<html>
<ol>
<li><details><summary>Wie kann das Notebook gestartet werden?</summary>
<br />Es gibt folgende Möglichkeiten:
<ul>
<li>mit Hilfe des Tools <code><b>Anaconda</b></code>;</li>
<li>auf einer Kommandozeile eingeben: <code><b>jupyter notebook</b></code><br />
<br />
(u.U. vorher in das gewünschte Verzeichnis wechseln)</li>
</ul>
<br /></details></li>
<li><details><summary>Wie schaltet man eine Zelle in das “<b>Code</b>“‐Format?</summary>
<br />
Mit Hilfe des Shortcuts <code><b><i>Esc</i> + y</b></code><br />
<br /></details></li>
<li><details><summary>Wie schaltet man eine Zelle in das “<b>Markdown</b>“‐Format?</summary>
<br />
Mit Hilfe des Shortcuts <code><b><i>Esc</i> + m</b></code><br />
<br /></details></li>
<li><details><summary>Wie fügt man eine neue Zelle hinzu?</summary>
<br />
Unter der aktuellen Zeile :: <br />
Mit Hilfe des Shortcuts <code><b><i>Esc</i> + b</b></code><br />
<br />
Über der aktuellen Zeile ::<br />
Mit Hilfe des Shortcuts <code><b><i>Esc</i> + a</b></code><br />
<br /></details></li>
<li><details><summary>Wie wird eine (komplette) Zeile gelöscht?</summary>
<br />
Mit Hilfe des Shortcuts <code><b><i>Esc</i> + d d</b></code><br />
(zwei Mal den Buchstaben “d“ eingeben)<br />
<br /></details></li>
<li><details><summary>Ist die linke Kastenseite <b>blau</b>, dann bin ich …</summary>
<br />
im <b>Edit</b>‐Mode.<br />
<br /></details></li>
<li><details><summary>Ist die linke Kastenseite <b>grün</b>, dann bin ich …</summary>
<br />
im <b>Run</b>‐Mode.<br />
<br /></details></li>
</ol>
</html>
<html>
<code><pre># Ignore warnings.
import warnings
warnings.filterwarnings("ignore")</pre></code>
</html>
<html>
<ul>
<li><h3>Multicursor support</h3>
Um mehrere Zeilen resp. um einen Bereich kopieren zu<br />
können, muss die <code><b>ALT</b></code>‐Taste gedrückt werden und dann<br />
den Bereich mit dem Cursor markieren.<br />
<br />
<img src="./pictures/multicursor_support.gif" width=418 height=115</li>
<br />
<li>Um zu einer Funktion oder Variablen die möglichen Werte aufge-<br />
listet zu bekommen, drückt man die <b>Tab-Taste</b>, wenn der Cursor <br />
direkt neben dem letzten Zeichen / Buchstaben steht.</li>
</ul>
</html>
<html>
<ul>
<li>lambda ‐ das sind kleine, anonyme Funktionen;<br />
sie ermöglichen eine restriktive, aber mehr prägnante, kurzgefaßte (?)</li>
<li>lambda‐Kalkül:<br />
(<em>lambda calculus</em>)<br />
ein Berechnungsmodell<br />
entwickelt von Alonzo Church (in den 1930er Jahren)<br />
kann jede Berechnung repräsentieren<br />
es ist Turing‐vollständig, merkt sich aber keine Zustände, es treten keine Seiteneffekte auf</li>
<li>zwei Berechnungsmodelle:
<ul>
<li>lambda‐Kalkü</li>
<li>Turing‐Maschine → imperative Programmierung</li>
</ul></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</html>
<html>
<ol>
<h2>Reuven Lerner :: NumPy-Course, Übungen 1</h2>
<li><!-- 001 --><details><summary>Create a NumPy array with the integers from <br />
your birthdate (year, month, and day)</summary>
<code><pre>
In[1]: myBirthday = np.array([1964, 1, 18])
In[2]: myBirthday
→ <b><i>Out[2]: array([1964, 1, 18])</i></b>
</pre></code>
</details></li>
<li><!-- 002 --><details><summary>Retrieve the year.</summary>
<code><pre>
In[3]: myBirthday[0]
→ <b><i>Out[3]: 1964</i></b>
</pre></code>
</details></li>
<li><!-- 003 --><details><summary>Replace the year with the current year.</summary>
<code><pre>
In[4]: myBirthday[0] = 2019
In[5]: myBirthday
→ <b><i>Out[5]: array([2019, 1, 18])</i></b>
</pre></code>
</details></li>
<li><!-- 004 --><details><summary>Create a NumPy array containing every 3rd number from 567 to 890. <br />
What is the 8th number in this array?<br />
What is the 15th?</summary>
<code><pre>
In[6]: ex4 = np.array(range(567, 890, 3))
In[7]: ex4
# Alternativ: np.arange(567, 890, 3)
→ <b><i>Out[7]: array([567, 570, 573, 576, 579, 582, 585, 588, 591, 594, 597, 600, 603,
606, 609, 612, 615, 618, 621, 624, 627, 630, 633, 636, 639, 642,
645, 648, 651, 654, 657, 660, 663, 666, 669, 672, 675, 678, 681,
684, 687, 690, 693, 696, 699, 702, 705, 708, 711, 714, 717, 720,
723, 726, 729, 732, 735, 738, 741, 744, 747, 750, 753, 756, 759,
762, 765, 768, 771, 774, 777, 780, 783, 786, 789, 792, 795, 798,
801, 804, 807, 810, 813, 816, 819, 822, 825, 828, 831, 834, 837,
840, 843, 846, 849, 852, 855, 858, 861, 864, 867, 870, 873, 876,
879, 882, 885, 888])</i></b>
In[8]: ex4[7] # Anmerkung: Die Zählung beginnt bei “0“
→ <b><i>Out[8]: 588</i></b>
In[9]: ex4[14]
→ <b><i>Out[9]: 609</i></b>
</pre></code>
</details></li>
<li><!-- 005 --><details><summary>Wie erhät man Informationen über ein Objekt?</b></summary>
<br />
Dafür steht die <code><b>help()</b></code>‐Funktion zur Verfügung.<br />
→ Aufruf: <code><b>help(np.random.randint)</b></code><br />
→ Ausgabe:
<code><pre>
randint(...) method of mtrand.RandomState instance
randint(low, high=None, size=None, dtype='l')
Return random integers from `low` (inclusive) to `high` (exclusive).
Return random integers from the "discrete uniform" distribution of
the specified dtype in the "half-open" interval [`low`, `high`). If
`high` is None (the default), then results are from [0, `low`).
Parameters
----------
low : int
Lowest (signed) integer to be drawn from the distribution (unless
``high=None``, in which case this parameter is one above the
*highest* such integer).
high : int, optional
If provided, one above the …
</pre></code>
</details></li>
<br />
<h2>Reuven Lerner :: NumPy-Course, Übungen 2</h2>
<li><details><summary>Create an array of 10 random integers, from 0-100.</summary><br />
<code><pre>
<i># Ex 01 - Create an array of 10 random integers, from 0-100.</i>
In [1] : import numpy as np
In [2] : a = np.random.randint(0, 100, 10)
In [3] : a
→ <b><i>Out[3] : array([79, 82, 76, 97, 87, 18, 85, 10, 93, 63])</i></b></pre></code>
<br /></details></li>
<li><details><summary>Find the mean and standard deviation of these numbers.</summary><br />
<code><pre>
<i># Ex 02 - Find the mean and standard deviation of these numbers.</i>
mean value / Mittelwert</i>
In [4] : meanVal = a.mean()
In [5] : meanVal
→ <b><i>Out[5] : 69.0</i></b>
In [6] : stdVal = a.std()
In [7] : stdVal
→ <b><i>Out[7] : 28.94131994225557</i></b>
</pre></code><br />
</details></li>
<li><details><summary>Create another array of 10 random integers, from 0-100.</summary><br />
<code><pre>
<i># Ex 03 - Create another array of 10 random integers, from 0-100.</i>
In [8] : b = np.random.randint(0, 100, 10)
In [9] : b
→ <b><i>Out[9] : array([79, 79, 72, 90, 3, 29, 52, 10, 0, 9])</i></b></pre></code>
<br /></details></li>
<li><details><summary>Create a new array whose elements are the average of <br />
those from each of the (sum of the) previous ones (arrays).</summary><br />
<code><pre>
<i># Ex 04 - Create a new array whose elements are the average of
those from each of the previous ones.</i>
### mein Ergebnis:
In [10] : c = np.array( [ a.mean(), b.mean() ] )
In [11] : c
→ <b><i>Out[11] : array([69. , 42.3])</i></b>
### gefordert war:
In [12] : c = 0.5 * (a + b)
In [13] : c
→ <b><i>Out[13] : array([79. , 80.5, 74. , 93.5, 45. , 23.5, 68.5, 10. , 46.5, 36. ])</i></b></pre></code>
<br /></details></li>
<li><details><summary>Create an array of 10 random floats, from 0-100.</summary><br />
<code><pre>
<i># Ex 05 - Create an array of 10 random floats, from 0-100.</i>
### mein Vorgehen:
In [14] : fltArr = np.random.rand(10) + np.random.randint(0,100,10)
In [15] : fltArr
→ <b><i>Out[15] : array([68.59965869, 48.24363767, 95.8903018 , 28.93454213, 97.27041664,
21.27155393, 13.65658417, 37.11422823, 3.07030997, 69.07116043])</i></b>
### erwartet war:
In [16] : fltArr = np.random.rand(10) * 100
In [17] : fltArr
→ <b><i>Out[17] : array([53.84446088, 63.819416 , 64.35027757, 62.07255105, 29.36442965,
86.28925268, 19.13418176, 69.99959083, 60.02753071, 38.91264205])</i></b>
</pre></code>
<br /></details></li>
<li><details><summary>We would expect the mean to be approaximately 50.<br />
Is it? What's the standard deviation?</summary><br />
<code><pre>
<i># Ex 06 - We would expect the mean to be approaximately 50.
Is it? What's the standard deviation?</i>
In [18] : meanFltArr = fltArr.mean()
In [19] : meanFltArr
→ <b><i>Out[19] : 48.317287565075716</i></b>
In [20] : stdFltArr = fltArr.std()
In [21] : stdFltArr
→ <b><i>Out[21] : 34.664402086578285</i></b></pre></code>
<br /></details></li>
<li><details><summary>What are the min and max values?</summary><br />
<br />
<code><pre>
<i># Ex 07 - What are the min and max values?</i>
In [22] : minFltArr = fltArr.min()
In [23] : mitFltArr
→ <b><i>Out[23] : 5.188098088273239</i></b>
In [24] : maxFltArr = fltArr.max()
In [25] : maxFltArr
→ <b><i>Out[25] : 97.4452407511444</i></b>
</pre></code>
</details></li>
<br />
<li><details><summary>Was sind die sog. <code><b>seeds</b></code>?</b></summary>
<br />
<ul>
<li>eigentlich: “seed key“ [<a href="https://www.python-kurs.eu/python_numpy_wahrscheinlichkeit.php" target=_blank><i>Link</i></a>]</li>
<li>initialsiert den Zufallszahlen-Generator;</li>
<li>der Generator benötigt eine Zahl, mit der er <br />
beginnen soll, um eine Zufallszahl zu erzeugen [<a href="https://www.w3schools.com/python/ref_random_seed.asp" target=_blank><i>Link</i></a>];</li>
<li>Wird kein Wert angegeben, wird als Zufallszahlen‐<br />
Generator die (aktuelle) Systemzeit verwendet [<a href="http://www.gtkdb.de/index_31_2453.html" target=_blank><i>Link</i></a>]</li>
<li>Die seed-Funktion liefert eine deterministische Sequenz<br />
von Zufallszahlen. [<a href="https://www.python-kurs.eu/python_numpy_wahrscheinlichkeit.php" target=_blank><i>Link</i></a>]</li>
<li>sie sind für Test‐ oder Debugging‐Zwecke vorhanden / hilfreich;</li>
<li>die Zufallswerte werden intern gespeichert und beim <br />
Aufruf der random-Funktion werden immer wieder die<br />
gleichen Zufallswerte “erzeugt“ werden;</li>
der Aufruf muss <b>immer</b> vor dem (eigentlichen) random-Aufruf erfolgen:
<code><pre>
#!/usr/bin/python
import random
random.seed( 10 )
print "Random number with seed 10 : ", random.random()
# It will generate same random number
random.seed( 10 )
print "Random number with seed 10 : ", random.random()
# It will generate same random number
random.seed( 10 )
print "Random number with seed 10 : ", random.random()
</pre></code><br />
⇒ Die Ausgabe ist dann:
<code><pre>
Random number with seed 10 : 0.57140259469
Random number with seed 10 : 0.57140259469
Random number with seed 10 : 0.57140259469
</pre></code></li>
<li>Def default value ist “2“. Diese Zahl gibt an, <br />
wie der erste Parameter, falls vorhanden, <br />
in einen Integer‐Wert konvertiert werden<br />
soll. <br />
[<a href="https://www.w3schools.com/python/ref_random_seed.asp" target=_blank><i>Link</i></a>]</li>
</ul>
</details></li>
<br />
<li><details><summary>Was ist das sog. <code><b>Boolean indexing</b></code>?</b></summary>
<br />
<ul>
<li>Mittels einer (booleschen) Abfrage wird ermittelt, <br />
ob ein Array-Element die Bedingung erfüllt oder nicht:
<code><pre>
arr = np.arange(7)
print(arr)
# Out: array([0, 1, 2, 3, 4, 5, 6])
⇒ boolesche Abfrage:
arr > 4
# Out: array([False, False, False, False, False, True, True], dtype=bool)
</pre></code>
An den Wahrheitswerten <code><b>False</b></code> und <code><b>True</b></code> kann man erkennen,<br /> welcher Wert diese (boolesche) Bedingung erfüt.<br />
<br />
Dieses Array kann verwendet werden, um ein Array zu erzeugen,<br />
das nur die Elemente enthält, die das boolesche Statement erfült:
<code><pre>arr[arr>4]
# Out: array([5, 6])</pre></code><br />
Somit ersetzt “boolean indexing“ eine Schleife, <br />
die dieselbe Aufgabe erledigt;<br />
<br />
Dies ist auch mit Funktionen, die boolesche Abfragen “stellen“, möglich<br />
(hier: die Fkt. <code><b>iscomplex()</b></code>:<br />
<code><pre>
import numpy as np
a = np.array([1, 2+6j, 5, 3.5+5j])
print a[np.<b>iscomplex(a)</b>]
# Out: [2.0+6.j 3.5+5.j]
</pre></code><br /></li>
</ul>
</details></li>
<br />
<li><details><summary>Was ist das sog. <code><b>fancy indexing</b></code>?</b></summary>
<br />
</details></li>
<br />
<h2>Reuven Lerner :: NumPy-Course, Übungen 3</h2>
<li><details><summary>Create an array of 20 random integers from 0 to 100.</summary>
<br /><code><pre>
### (1) Create an array of 20 random integers from 0 to 100.
In [1] : arr = np.random.randint(0, 100, 20)
In [2] : arr
→ <b><i>Out [2] : array([50, 20, 18, 84, 11, 28, 29, 14, 50, 68, 87, 87, 94, 96,
86, 13, 9,7, 63, 61])</i></b>
</pre></code>
</details></li>
<li><details><summary>Find the largest even number.</summary>
<br /><code><pre>### (2) Find the largest even number.
In [3] : arr[ arr % 2 == 0 ]
→ <b><i>Out [3] : array([50, 20, 18, 84, 28, 14, 50, 68, 94, 96, 86])</i></b>
In [4] : arr[ arr % 2 == 0 ].max()
→ <b><i>Out [4] : 96</i></b>
</pre></code>
</details></li>
<li><details><summary>Find the mean of the odd numbers.</summary>
<br /><code><pre>### (3) Find the mean of the odd numbers.
In [5] : arr[ arr % 2 == 1 ]
→ <b><i>Out [5] : array([11, 29, 87, 87, 13, 9, 7, 63, 61])</i></b>
In [6] : arr[ arr % 2 == 1 ].mean()
→ <b><i>Out []6 : 40.77777777777778</i></b>
</pre></code>
</details></li>
<li><details><summary>Create a NumPy array from the first and last odd numbers.</summary>
<br /><code><pre>### (4) Create a NumPy array containing the first and last odd numbers.
#### Reuvens Lösung:
In [7] : a[a % 2 ==1][[0,-1]]
→ <b><i>Out [7] : array([37, 9])</i></b>
#### Erklaerung:
#### a[a % 2 ==1][ ... ]
####
#### [0,-1] := gibt den ersten Eintrag ("0")
#### und den letzten Eintrag ("-1")
#### { zaehlt vom Ende des Arrays }
#### zurueck
#### // die zweiten [] werden intern
#### // als Methodenaufrufe interpretiert
</pre></code>
</details></li>
<li><details><summary>Create an array of 20 floats from 0-1,000.</summary>
<br /><code><pre>
### (5) Create an array of 20 floats from 0-1,000.
In [8] : floatArr = np.random.random([20, ])
In [9] : floatArr
→ <b><i>Out [9] : array([0.69232262, 0.87638915, 0.89460666, 0.08504421, 0.03905478,
0.16983042, 0.8781425 , 0.09834683, 0.42110763, 0.95788953,
0.53316528, 0.69187711, 0.31551563, 0.68650093, 0.83462567,
0.01828828, 0.75014431, 0.98886109, 0.74816565, 0.28044399])</i></b>
In [10] : intArr = np.random.randint(0, 1000, 20)
In [11] : intArr
→ <b><i>Out [11] : array([471, 903, 282, 665, 616, 22, 777, 707, 999, 126, 279, 381, 356,
155, 933, 313, 595, 166, 648, 288])</i></b>
In [12] : floatArr + intArr
→ <b><i>Out [12] : array([471.69232262, 903.87638915, 282.89460666, 665.08504421,
616.03905478, 22.16983042, 777.8781425 , 707.09834683,
999.42110763, 126.95788953, 279.53316528, 381.69187711,
356.31551563, 155.68650093, 933.83462567, 313.01828828,
595.75014431, 166.98886109, 648.74816565, 288.28044399])</i></b>
In [13] : totArr = np.random.random([20, ]) + np.random.randint(0, 1000, 20)
In [14] : totArr
→ <b><i>Out [14] : array([532.26554666, 542.49157316, 548.05336255, 871.57411761,
775.14672857, 813.58930554, 964.69975836, 569.10233443,
752.41405599, 508.69440016, 210.41417927, 96.04995346,
269.53589641, 10.66379465, 279.51488911, 892.94459476,
849.58655504, 903.90340192, 889.1374747 , 152.13927635])</i></b>
#### Reuvens Loesung:
In [15] : a = np.random.rand(20) * 1000
</pre></code>
</details></li>
<li><details><summary>Find the items that are less than the mean.</summary>
<br /><code><pre>
### (6) Find the items that are less than the mean.
In [16] : lessThanMeanArr = totArr[ totArr < totArr.mean() ]
In [17] : totArr.mean()
→ <b><i>Out [17] : 571.5960599335156</i></b>
In [18] : lessThanMeanArr
→ <b><i>Out [18] : array([532.26554666, 542.49157316, 548.05336255, 569.10233443,
508.69440016, 210.41417927, 96.04995346, 269.53589641,
10.66379465, 279.51488911, 152.13927635])</i></b>
</pre></code>
</details></li>
<li><details><summary>Find the items less than mean-std.</summary>
<br /><code><pre>
### (7) Find the items less than mean-std
### (gemeint ist "mean - std", also Subtraktion).
#### Reuvens Loesung:
In [18] : a[a < a.mean()-a.std()]
<i></i>
</pre></code>
</details></li>
<br />
<h2>Reuven Lerner :: NumPy-Course, Übungen 4</h2>
<li><details><summary>Create a NumPy array of 20 random integers from 0‐100.</summary><br />
<code><pre><i>In [95] : randIntArr = np.random.randint(0,100,20)
In [95] : randIntArr
Out[96] : array([22, 4, 90, 61, 29, 15, 36, 86, 73, 27, 9, 32, 93, 50, 43, 73, 75, 35, 19, 46])</i>
</pre></code>
</details></li>
<li><details><summary>What's the smallest even number greater than the mean?</summary><br />
<code><pre><i><b>"even numbers"</b>
In [98] : randIntArr % 2 == 0
Out [98] : array([ True, True, True, False, False, False, True, True, False,
False, False, True, False, True, False, False, False, False,
False, True])
<b>"greater than the mean"</b>
In [99] : randIntArr > randIntArr.mean()
Out [99] : array([False, False, True, True, False, False, False, True, True,
False, False, False, True, True, False, True, True, False,
False, True])
<b>beides verbinden, da ja beide Aussagen gleichzeitig gelten soll</b>
In [100] : (randIntArr % 2 == 0) & (randIntArr > randIntArr.mean())
Out [100] : array([False, False, True, False, False, False, False, True, False,
False, False, False, False, True, False, False, False, False,
False, True])
<b>Werte zurückgeben:</b>
In [101] : randIntArr[ (randIntArr % 2 == 0) & (randIntArr > randIntArr.mean()) ]
Out [101] : array([90, 86, 50, 46])
<b>das Minimum ermitteln:</b>
In [102] : randIntArr[ (randIntArr % 2 == 0) & (randIntArr > randIntArr.mean()) ].min()
Out [102] : 46
</i></pre></code>
</details></li>
<li><details><summary>Show all numbers either “< mean‐std or > mean+std“.</summary><br />
<code><pre><i>
<b>“ < mean-Wert - std-Wert“</b>
In [101] :randIntArr < randIntArr.mean() - randIntArr.std()
Out [101] : array([False, True, False, False, False, True, False, False, False,
False, True, False, False, False, False, False, False, False,
False, False])
<b>“ > mean-Wert + std-Wert“</b>
In [102] :randIntArr > randIntArr.mean() + randIntArr.std()
Out [1012 : array([False, False, True, False, False, False, False, True, False,
False, False, False, True, False, False, False, True, False,
False, False])
<b>⇒ Zusammensetzen:</b>
In [103] :(randIntArr < randIntArr.mean() - randIntArr.std()) | (randIntArr > randIntArr.mean() + randIntArr.std())
Out [103] : array([False, True, True, False, False, True, False, True, False,
False, True, False, True, False, False, False, True, False,
False, False])
<b>⇒ Werte zurückgeben:</b>
In [104] : randIntArr[ (randIntArr < randIntArr.mean() - randIntArr.std()) | (randIntArr > randIntArr.mean() + randIntArr.std()) ]
Out [104] : array([ 4, 90, 15, 86, 9, 93, 75])</i></pre></code>
</details></li>
<li><details><summary>Show “odd numbers < mean and even numbers > mean“.</summary><br />
<code><pre><i><b>“odd numbers“</b>
In [105] : randIntArr % 2 == 1
Out [105] : array([False, False, False, True, True, True, False, False, True,
True, True, False, True, False, True, True, True, True,
True, False])
<b>“odd numbers < mean“</b>
In [106] : (randIntArr % 2 == 1) & (randIntArr < randIntArr.mean())
Out [106] : array([False, False, False, False, True, True, False, False, False,
True, True, False, False, False, True, False, False, True,
True, False])
<b>“even numbers“</b>
In [107] : randIntArr % 2 == 0
Out [107] : array([ True, True, True, False, False, False, True, True, False,
False, False, True, False, True, False, False, False, False,
False, True])
<b>“even numbers > mean“</b>
In [108] : (randIntArr % 2 == 0) & (randIntArr > randIntArr.mean())
Out [108] : array([False, False, True, False, False, False, False, True, False,
False, False, False, False, True, False, False, False, False,
False, True])
<b>⇒ beide Aussagen miteinanver verbinden:</b>
In [109] : randIntArr[ (randIntArr % 2 == 1) & (randIntArr < randIntArr.mean()) | (randIntArr % 2 == 0) & (randIntArr > randIntArr.mean())]
Out [109] : array([90, 29, 15, 86, 27, 9, 50, 43, 35, 19, 46])</i>
</pre></code>
</details></li>
<br />
<li><details><summary>Mit welchen Statements lassen sich Arrays erzeugen?</summary>
<br />
<ol>
<li><code><b>np.arange(<i>startWert, endWert, Anzahl</i>)
</b></code><br />
⇒ ein Array, numpy.ndarry, mit <i>Anzahl</i> Werten, <br />
zwischen <i>startWert</i> und <i>endWert</i></li>
<li><code><b><i>np.random.rand(10)</i>
</b></code></li>
<li><code><b><i>np.random.randint(0,100,10)</i>
</b></code></li>
</ol>
</details></li>
<br />
<li><details><summary>Folgendes Statement steht zur Ausführung:
<code><pre>
randomIntArr[ randomIntArr % 2 == 0 and randomIntArr < randomIntArr.mean() ]
</pre></code>
Beim Aufruf erscheint folgende Fehlermeldung:
<img src="./pictures/NumPy_Uebungen_ComplexConditions_01.png" width=610 height=77 />
<br />
<ol>
<li>Warum erscheint die Meldung?</li>
<li><details><summary>Was muß man machen, damit sie nicht auftaucht?</summary>
⇒ jeder der beiden (booleschen) Ausdrücke muß <br />
in runde Klammern gesetzt werden:<br />
<code><b>randIntArr[ (randIntArr % 2 == 0) & (randIntArr < randIntArr.mean()) ]</b></code></details></li>
</ol>
</summary>
<br />
<code><pre><i>Code</i>
</pre></code>
</details></li>
<br />
<h2>Reuven Lerner :: NumPy-Course, Übungen 5</h2>
<li><details><summary>Create a NumPy array of 40 random integers, from 0-100.</summary><br />
<code><pre><i>arrRandInt = np.random.randint(0,100,40)
arrRandInt
array([ 7, 11, 90, 4, 56, 49, 45, 80, 31, 79, 60, 99, 67, 49, 19, 58, 67,
84, 43, 21, 3, 62, 4, 19, 47, 41, 31, 24, 27, 80, 61, 11, 17, 29,
52, 92, 7, 61, 78, 95])
mean value
arrRandInt.mean()
46.5
std value
arrRandInt.std()
28.555209682297903</i>
</pre></code>
</details></li>
<li><details><summary>Find all numbers that are within 1 standard deviation of the mean,<br />
and set them to be equal to the mean. Has the mean changed? Has<br />
the std changed?</summary><br />
<code><pre><i>(arrRandInt >= (arrRandInt.mean() - arrRandInt.std())) & (arrRandInt <= (arrRandInt.mean() + arrRandInt.std()))
array([False, False, False, False, True, True, True, False, True,
False, True, False, True, True, True, True, True, False,
True, True, False, True, False, True, True, True, True,
True, True, False, True, False, False, True, True, False,
False, True, False, False])
arrRandInt[(arrRandInt >= (arrRandInt.mean() - arrRandInt.std())) & (arrRandInt <= (arrRandInt.mean() + arrRandInt.std()))]
array([56, 49, 45, 31, 60, 67, 49, 19, 58, 67, 43, 21, 62, 19, 47, 41, 31,
24, 27, 61, 29, 52, 61])
arrRandInt[(arrRandInt >= (arrRandInt.mean() - arrRandInt.std())) & (arrRandInt <= (arrRandInt.mean() + arrRandInt.std()))] = arrRandInt.mean()
arrRandInt
array([ 7, 11, 90, 4, 46, 46, 46, 80, 46, 79, 46, 99, 46, 46, 46, 46, 46,
84, 46, 46, 3, 46, 4, 46, 46, 46, 46, 46, 46, 80, 46, 11, 17, 46,
46, 92, 7, 46, 78, 95])
arrRandInt.mean()
47.475
arrRandInt.std()
25.862122399370087</i>
</pre></code>
</details></li>
<li><details><summary>Create another NumPy array of 10 random integers, from 0-100.</summary><br />
<code><pre><i>arrRandInt_02 = np.random.randint(0,100, 10)
arrRandInt_02
array([66, 48, 12, 51, 52, 92, 93, 69, 79, 39])</i>
</pre></code>
</details></li>
<li><details><summary>Set the item at the even indexes to be equal to the items at the odd<br />
indexes. So index 0 will get the value at index 1, etc.</summary><br />
<code><pre><i><b>Even elements</b>
<u>Lösung 1 - "fancy indexing"</u>
arrRandInt_02[ [0,2,4,6,8] ]
array([66, 12, 52, 93, 79])
<u>Lösung 2 - "arange()"</u>
arrRandInt_02[ np.arange(0,10,2) ]
array([66, 12, 52, 93, 79])
<b>Odd elements</b>
<u>Lösung 1 - "fancy indexing"</u>
arrRandInt_02[ [1,3,5,7,9] ]
array([48, 51, 92, 69, 39])
<u>Lösung 2 - "arange()"</u>
arrRandInt_02[ np.arange(1,10,2) ]
array([48, 51, 92, 69, 39])
arrRandInt_02[ [0,2,4,6,8] ] = arrRandInt_02[ np.arange(1,10,2) ]
arrRandInt_02
array([48, 48, 51, 51, 92, 92, 69, 69, 39, 39])</i>
</pre></code>
</details></li>
<br />
<li><details><summary>Wie erzeuge ich ein einfaches (int-)Array?</summary><br />
<code><pre><i>import numpy as np
arr = np.array( [ 10, 20, 30 ] )</i>
</pre></code>
</details></li>
<br />
<li><details><summary>Was unterscheidet eine (normale) Liste von einem NumPy-Array?</summary><br />
Eine <b>Liste</b> weiss nur, daß es “Python-Objekte“ enth&aum;l;, <br />
aber nicht, um welchen Typ es sich dabei handelt. Daher kann eine Liste auch unterschied‐<br />
liche Datentypen enthalten. Erst bei der direkten Abfrage mittels <code><b>type</b></code> wird der Datentyp <br />
ermittelt, das LIst-Objekt selbst weiss davon nichts.<br />
Im Gegensatz dazu weiss ein <b>NumPy-Array</b>, welchen Datentyp es aufzunehmen hat. <br />
Zuweisungen, bei denen andere Datentype vorkommen, werden entweder unterbunden /<br />
abgelehnt oder die Daten werden in den Array-Datentyp umgewnandelt / gecastet (z.B.<br />
von String in Int).
</details></li>
<li><details><summary>Was bedeutet die dtype-Angaben <code><b><U5</b></code> ?</summary>Diese Angabe zeigt an, dass das betroffene Python-Objekt ein <b>String</b> ist. <br />
Dieser besteht aus <b><i>Unicode Characters</i></b>. Die Zahl “<code><b>5</b></code>“ zeigt<br />
an, dass der längste String die Länge von 5 Zeichen hat.</detail></li>
<h2>Reuven Lerner :: NumPy-Course, “dypes“ ‐ Übungen 6</h2>
<li><details><summary>Create a NumPy array of 10 random integers from 0-100.</summary>
<br /><code><pre><b>arrRandInt = np.random.randint(0, 100, 10)
arrRandInt
⇒ Ergebnis: <b></b>array([61, 33, 18, 29, 55, 52, 28, 56, 14, 86])</b></pre></code></detail><br /></li>
<li><details><summary>Calculate the mean, which will be a float.</summary>
<br /><code><pre><b>arrRandInt_mean = arrRandInt.mean()
arrRandInt_mean
⇒ 43.2</b></pre></code><br />
<b>Anmerkung:</b><br />
Der Mittelwert (“<code><b>mean</b></code>“) ist in Python <u>immer</u> eine Zahl vom Typ “ float“, <br />
da hier (bei der Berechnung des Mittlewertes) eine Division durchge‐<br />
führt wird, und die ist in Python immer vom Typ “ float“.</detail><br /></li>
<li><details><summary>Create an array of type float based on it, and replace the<br />
outliers (i.e., <mean-std or >mean+std) with the mean.</summary>
<code><pre><b>
arrRandFloat = arrRandInt.astype('float64')
arrRandFloat</b>
⇒ Ergebnis : array([61., 33., 18., 29., 55., 52., 28., 56., 14., 86.])
<b>
arrRandFloat_std = arrRandFloat.std()
arrRandFloat_std</b>
⇒ Ergebnis: 21.339165869358624
<b>
arrRandFloat_meanPstd = arrRandInt_mean + arrRandFloat_std
arrRandFloat_meanPstd</b>
&rArr: Ergebnis: 64.53916586935863
<b>arrRandFloat_meanMstd = arrRandInt_mean - arrRandFloat_std
arrRandFloat_meanMstd</b>
⇒ Ergebnis: 21.86083413064138
<b>arrRandFloat > arrRandFloat_meanPstd</b>
⇒ Ergebnis: array([False, False, False, False, False, False, False, False, False, True])
<b>arrRandFloat < arrRandFloat_meanMstd</b>
⇒ Ergebnis: array([False, False, True, False, False, False, False, False, True, False])
<b>(arrRandFloat > arrRandFloat_meanPstd) | (arrRandFloat < arrRandFloat_meanMstd)</b>
⇒ Ergebnis: array([False, False, True, False, False, False, False, False, True, True])
<b>arrRandFloat[ (arrRandFloat > arrRandFloat_meanPstd) | (arrRandFloat < arrRandFloat_meanMstd) ]</b>
⇒ Ergebnis: array([18., 14., 86.])
<b>arrRandFloat[ (arrRandFloat > arrRandFloat_meanPstd) | (arrRandFloat < arrRandFloat_meanMstd) ] = arrRandInt_mean
arrRandFloat</b>
⇒ Ergebnis: array([61. , 33. , <u>43.2</u>, 29. , 55. , 52. , 28. , 56. , <u>43.2</u>, <u>43.2</u>])
</b></pre></code>
<br />
<b>Reuvens Version:</b>
<code><pre><b>
a.astype(np.float64)
a[ (a < a.mean() − a.std()) | (a > a.mean() + a.std()) ] = a.mean()
</b></pre></code>
<br />
<b>Anmerkung:</b><br />
Wrd vor der Zuweisung des Mittelwertes <u>keine</u> Typkonvertierung durchgeführt,<br />
so wird nur der Integer-Anteil vom Mittelwert den Positionen zugewiesen.<br />
Der restliche Teil, die Nachkommastellen, werden abgeschnitten (“truncated“).
</detail><br /><br /></li>
<li><details><summary>Create a NumPy array of 20 random floats from 0-100.</summary>
<code><pre><b>
arrRandFloat = np.random.random(20) * 100
arrRandFloat</b>
⇒ Ergebnis: array([75.46244856, 3.75336128, 48.32305463, 47.68050563, 8.25099919,
50.22728143, 59.58978435, 7.48819877, 93.17352298, 29.48631394,
16.06656934, 52.33696256, 10.6825405 , 79.23733499, 33.86354536,
59.43438998, 19.4464769 , 85.56772303, 17.21659547, 95.70804906])
</pre></code>
</detail><br /></li>
<li><details><summary>Replace those numbers whose int portion is even with the mean.<br />
(So 20.5 would be replaced, but 21.5 would not be.)</summary>
<br />
Mit “int portion“ ist der Integer-Anteil, die Vorkommastellen gemeint.<br />
<br />
<b>Reuvens Version:</b>
<code><pre><b>
a.astype(np.int64) % 2 == 0</b>
⇒ Ergebnis: ein boolean array
<b>a[ a.astype(np.int64) % 2 == 0 ]</b>
⇒ das Ergebnis sind alle diejenigen Float-Zahlen, deren
Vorkommastellen geradzahlig (<code><b>% 2 == 0</b></code>) sind.
</pre></code></detail><br /></li>
<br />
<li><details><summary>Wie kann man das Format der Jupyter-Ausgaben anpassen?<br />
Wie lange sind sie gütig?</summary><br />
<ul>
<li>Mit Hilfe der Funktion get_printoptions() kann die aktuelle Einstellung <br />
abgefragt werden;</li>
<li>Mit Hilfe der Funktion set_printoptions() kann ein Parameter geändet<br />
werden.</li>
<br />
<li>Geänderte Parameter bleiben nur für den aktuellen Lauf,<br />
das aktuelle Programm gültig.</li>
</ul>
<br />
</details></li>
<br />
<li><details><summary>Wie erzeugt man einen Null-Vektor resp. Null-Matrix?<br />
<br />
Dafür gibt es die Methode “<code><b>zeros()</b></code>“. <br />
Der Datentyp ist dann <code><b><i>float64</i></b></code>.
</li>
<h2>Reuven Lerner :: NumPy-Course, “nan“ ‐ Übungen 7</h2>
<li><details><summary>Was ist die Aufgabe von “<code><b>nan</b></code>“?</summary><br />
<code><b>nan</b></code> steht fü “not a number“<br />
<br />
Es repräsentiert<br />
<ul>
<li>nicht vorhandene Daten</li>
<li>Daten, die nicht in eine Berechnung einbezogen werden sollen (z.B. der Wert “0“ soll ignoriert werden)</li>
</ul>
</details></li>
<li><details><summary>Welchen Datentyp hat <code><b>nan</b></code>?</summary><br />
<code><b>nan</b></code> hat den Datentyp <code><b><i>float64</i></b></code>, was zur Folge hat,<br />
daß Daten, die <b>nicht</b> diesen Datentyp haben, in <code><b><i>float64</i></b></code> konvertiert werden.
</details></li>
<li><details><summary>summary</summary><br />
<code><pre><i>Code</i>
</pre></code>
</details></li>
</ol>
<h3>Links:</h3>
<ul>
<li>Reuven Lerver :: Numpy-Kurs</li>
<li><a href="https://www.python-kurs.eu/numpy.php" target=_blank>Python-Kurs :: NumPy-Tutorial</a></li>
<li><a href="https://appdividend.com/2019/01/31/numpy-arange-tutorial-with-example-python-numpy-functions/" target=_blank>NumPy - Tutorial</a></li>
<li><a href="https://www.python-kurs.eu/numpy_arrays_erzeugen.php" target=_blank>Python-Kurs :: NumPy-Arrays erstellen</a></li>
</ul>
</html>
<html>
<ul>
<li>Simple and efficient tools for data mining and data analysis</li><br />
<li>kann für folgende Arten des Machine Learnings eingesetzt werden:
<ul>
<li><u>Supervised Learning</u><br />
<ol>
<li>Decision Trees</li>
<li>Random Forest</li>
<li>Super Vector Machines</li>
</ol></li>
<li><u>Unsupervised Learning</u><br />
<code>sklearn.decomposition</code> → PCA</li>
<li><u>Reinforcement Learnung</u><br />
<code>sklearn.cluster</code> → DBSCAN</li>
</ul>
</ul>
<h3>Links:</h3>
<a href="http://www.scikit-learn.org" target=_blank>SciKit-learn :: Homepage</a>
</html>
<html>
Lists in Python language can be compared to arrays in Java but they are different<br />
in many other aspects. Lists are used in almost every program written in Python.<br />
In this tutorial we will understand Python lists through practical examples.<br />
<br />
Lists are <b>mutable</b> objects in Python.<br />
<br />
<div id="toc">We will cover the following in this article:</div>
<ol>
<li><A HREF="#Example_1">How to define a list</A></li>
<li><A HREF="#Example_2">How to add elements to a list</A></li>
<li><A HREF="#Example_3">How access sub lists</A></li>
<li><A HREF="#Example_4">How to search within lists</A></li>
<li><A HREF="#Example_5">How to delete elements from a list</A></li>
<li><A HREF="#Example_6">Operators and lists</A></li>
</ol>
<h3><A NAME="Example_1">1. Create a Python List</A></h3>
Defining a List in Python is easy. You just need to provide name of the list and<br />
initialize it with values. Following is an example of a List in Python :
<code><pre>
>>> myList = ["The", "earth", "revolves", "around", "sun"]
>>> myList
['The', 'earth', 'revolves', 'around', 'sun']
</pre></code>
So you can see that a list named “myList“ was created with<br />
some elements.<br />
<br />
Lists in python are zero indexed. This means, you can access individual elements <br />
in a list just as you would do in an array. Here is an example :
<code><pre>
>>> myList[0]
'The'
>>> myList[4]
'sun'
</pre></code>
Lists cannot be accessed beyond the rightmost index boundary. Here is an example :
<code><pre>
>>> myList[5]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: list index out of range
</pre></code>
So we see that when we tried to access myList index 5, an error was thrown<br />
saying that this index is out of range.<br />
<br />
But, on the other hand, if you try to access value at a negative index then values<br />
from the rightmost index can be accessed backwards. Here is an example:
<code><pre>
>>> myList[-1]
'sun'
</pre></code>
So we see that index -1 was translated into index “4“ and corresponding <br />
value was produced in output. <br />
<br />
If you are new to Python, you should start by writing a Python hello world program, and <br />
understanding Python variables and strings.<br />
<br />
<a href="#toc">back to TOC</a>
<h3><A NAME="Example_2">2. Add Elements to a List</A></h3>
One can use the methods <br />
<ol>
<li><code><b>insert,</b></code></li>
<li><code><b>append </b></code></li>
and
<li><code><b>extend</b></code></li>
</ol>
to add elements to a List. <br />
<br />
The insert method expects an index and the value to be inserted. Here is an example of insert :
<code><pre>
>>> myList.insert(0,"Yes")
>>> myList
['Yes', 'The', 'earth', 'revolves', 'around', 'sun']
</pre></code>
So we see the value “yes“ was inserted at the index 0 in the list and all <br />
the other elements were shifted accordingly. <br />
<br />
The append method can take one or more elements as input and appends them into <br />
the list. Here is an example :
<code><pre>
>>> myList.append(["a", "true"])
>>> myList
['Yes', 'The', 'earth', 'revolves', 'around', 'sun', ['a', 'true']]
</pre></code>
So, the two values were appended towards the end of the list. Note that whether we <br />
add one element or multiple elements to the list, if we have used append then they <br />
will be added as a single element only. This can be proven if we try to check the length <br />
of myList now :
<code><pre>
>>> len(myList)
7
</pre></code>
So we see that though we added two elements but they are counted as a single <br />
element (or a sub-list) in myList. <br />
<br />
The other method that can be used to add elements to list is extend. Like append, <br />
it also expects one or more values as input. But, unlike append, all the elements <br />
are added as individual elements. Here is an example :
<code><pre>
>>> myList.extend(["statement", "for", "sure"])
>>> myList
['Yes', 'The', 'earth', 'revolves', 'around', 'sun', ['a', 'true'], 'statement', 'for', 'sure']
>>> len(myList)
10
</pre></code>
So we see that each element got added as a separate element towards the end <br />
of the list.<br />
<br />
<a href="#toc">back to TOC</a>
<h3><A NAME="Example_3">3. Slice Elements from a List</A></h3>
Python also allows slicing of the lists. You can access a part of complete list by <br />
using index range. There are various ways through which this can be done. Here <br />
are some examples : <br />
<br />
If it is required to access a sub-list from index 1 to index 3 then it can be done in <br />
following way:
<code><pre>
>>> myList[1:4]
['The', 'earth', 'revolves']
</pre></code>
Note that the index 4 was passed instead of 3 because if we pass index range x:y <br />
then values up to index y-1 are printed. <br />
<br />
Now, if it is required to access first “n“ elements of the list, then there is no need <br />
to provide index “0“, only the value of “n“ is required. Here is an example :
<code><pre>
>>> myList[:4]
['Yes', 'The', 'earth', 'revolves']
</pre></code>
So we see that first three elements were accessed. <br />
<br />
Similarly, if last “n“ elements are required to be accessed then only starting <br />
index is required. Here is an example :
<code><pre>
>>> myList[4:]
['around', 'sun', ['a', 'true'], 'statement', 'for', 'sure']
</pre></code>
So we see that all the elements beginning from index 4 till end of the list were displayed.
If neither starting index, nor the ending index is provided then complete list is displayed. Here is an example :
<code><pre>
>>> myList[:]
['Yes', 'The', 'earth', 'revolves', 'around', 'sun', ['a', 'true'], 'statement', 'for', 'sure']
</pre></code><br />
<br />
<a href="#toc">back to TOC</a>
<h3><A NAME="Example_4">4. Search the Lists and find Elements</A></h3>
Lists can easily be searched for values using the index method that expects a value that is to be searched. The output is the index at which the value is kept.
Here is an example :
Here we try to search the list for value “revolves“.
<code><pre>
>>> myList.index("revolves")
3
</pre></code>
So we see that the corresponding index was displayed in the output.
If some value is not found then an error is displayed. Here is an example :
<code><pre>
>>> myList.index("a")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: 'a' is not in list
</pre></code>
Here is how you can search a sub list :
<code><pre>
>>> myList.index(["a", "true"])
6
</pre></code>
If it is desired to just whether an element is present in a list, it can be done in following way :
<code><pre>
>>> "sun" in myList
True
</pre></code>
So we see that “True“ was returned as “sun“ was present in the list.<br />
<br />
<a href="#toc">back to TOC</a>
<h3><A NAME="Example_5">5. Delete Elements from the List</A></h3>
Python provides the remove method through which we can delete elements from a list. It expects the value which is required to be deleted.
Here are some examples :
<code><pre>
>>> myList
['Yes', 'The', 'earth', 'revolves', 'around', 'sun', ['a', 'true'], 'statement', 'for', 'sure']
>>> myList.remove("Yes")
>>> myList
['The', 'earth', 'revolves', 'around', 'sun', ['a', 'true'], 'statement', 'for', 'sure']
>>> myList.remove("statement")
>>> myList
['The', 'earth', 'revolves', 'around', 'sun', ['a', 'true'], 'for', 'sure']
</pre></code>
Here we see that remove can be used to easily delete elements in list.
Here is how a sub list can be deleted :
<code><pre>
>>> myList.remove(["a", "true"])
>>> myList
['The', 'earth', 'revolves', 'around', 'sun', 'for', 'sure']
</pre></code>
So we see that the sub list was deleted from the original list.
If it is required to access the last element and then to delete it, this can be done through pop method.
<code><pre>
>>> myList.pop()
'sure'
>>> myList
['The', 'earth', 'revolves', 'around', 'sun', 'for']
</pre></code>
So we see that the value was displayed and deleted simultaneously.<br />
<br />
<a href="#toc">back to TOC</a>
<h3><A NAME="Example_6">6. Python List Operators</A></h3>
Python allows to use mathematical operators like +, * etc to be used with lists.
Here are some examples :
<code><pre>
>>> myList
['The', 'earth', 'revolves', 'around', 'sun', 'for']
>>> myList = myList + ["sure"]
>>> myList
['The', 'earth', 'revolves', 'around', 'sun', 'for', 'sure']
>>> myList += ["."]
>>> myList
['The', 'earth', 'revolves', 'around', 'sun', 'for', 'sure', '.']
>>> myList *= 2
>>> myList
['The', 'earth', 'revolves', 'around', 'sun', 'for', 'sure', '.', 'The', 'earth', 'revolves', 'around', 'sun', 'for', 'sure', '.']
</pre></code>
So we see that through + operator elements could be added to the list and through * operator we can add the complete list repeatedly towards the end.<br />
<br />
<a href="#toc">back to TOC</a>
<h3>Links:</h3>
<ul>
<li><a href="https://www.thegeekstuff.com/2013/06/python-list/" target=_blank>TheGeekStuff :: Python List Examples ‐ Insert, Append, Length, Index, Remove, Pop</a></li>
</ul>
</html>
<html>
<table>
<tr><th colspan=5><center>Built‐In Functions</center></th></tr>
<tr><td>abs()</td><td>delattr()</td><td>hash()</td><td>memoryview()</td><td>set()</td></tr>
<tr><td>all()</td><td>dict()</td><td>help()</td><td>min()</td><td>setattr()</td></tr>
<tr><td>any()</td><td>dir()</td><td>hex()</td><td>next()</td><td>slice()</td></tr>
<tr><td>ascii()</td><td>divmod()</td><td>id()</td><td>object()</td><td>sorted()</td></tr>
<tr><td>bin()</td><td>enumerate()</td><td>input()</td><td>oct()</td><td>staticmethod()</td></tr>
<tr><td>bool()</td><td>eval()</td><td>int()</td><td>open()</td><td>str()</td></tr>
<tr><td>breakpoint()</td><td>exec()</td><td>isinstance()</td><td>ord()</td><td>sum()</td></tr>
<tr><td>bytearray()</td><td>filter()</td><td>issubclass()</td><td>pow()</td><td>super()</td></tr>
<tr><td>bytes()</td><td>float()</td><td>iter()</td><td>print()</td><td>tuple()</td></tr>
<tr><td>callable()</td><td>format()</td><td>len()</td><td>property()</td><td>type()</td></tr>
<tr><td>chr()</td><td>frozenset()</td><td>list()</td><td>range()</td><td>vars()</td></tr>
<tr><td>classmethod()</td><td>getattr()</td><td>locals()</td><td>repr()</td><td>zip()</td></tr>
<tr><td>compile()</td><td>globals()</td><td>map()</td><td>reversed()</td><td>__import__()</td></tr>
<tr><td>complex()</td><td>hasattr()</td><td>max()</td><td>round()<td></td></td></tr>
</table>
<h3>Links:</h3>
<ul>
<li><a href="https://docs.python.org/3/library/functions.html" target=_blank>Python‐Doc :: Functions</a></li>
</ul>
</html>
<html>
<h2>Python Logging ‐ Simplest Guide with Full Code and Examples</h2>
<p>
by Selva Prabhakaran
</p>
<p>
The logging module lets you monitor your code runs so that when <br />
the code crashes you can check the logs and identify what caused<br />
it. Log messages have a built-in hierarchy ‐ starting from debugging,<br />
informational, warnings, error and critical messages. You can include<br />
traceback information as well. It is designed for small to large python<br />
projects with multiple modules and is highly recommended for any<br />
modular python programming. This post is a simple and clear expla‐<br />
nation of how to use the logging module.
</p>
<h2>Content</h2>
<ol>
<li><A HREF="#first">Why logging?</a></li>
<li><A HREF="#second">A Basic logging Example</a></li>
<li><A HREF="#third">The 5 levels of logging</a></li>
<li><A HREF="#fourth">How to log to a file instead of the console</a></li>
<li><A HREF="#fifth">How to change the logging format</a></li>
<li><A HREF="#sixth">Why working with the root logger for all modules isn't the best idea</a></li>
<li><A HREF="#seventh">How to create a new logger?</a></li>
<li><A HREF="#eighth">What is and How to setup a File Handler and Formatter?</a></li>
<li><A HREF="#nineth">How to include traceback information in logged messages</a></li>
<li><A HREF="#tenth">Exercises</a></li>
<li><A HREF="#eleventh">Conclusion</a></li>
</ol>
<ol>
<div id="first"/>
<li><h3>Why logging?</h3>
<p>
Imagine you are running a python script, and you want to know what<br />
part of the script was executed, at what time and in certain cases in‐<br />
spect what values the variables hold.<br />
<br />
Usually, you may just 'print()' out meaningful messages so you<br />
can see them in the console. And this probably is all you need when<br />
you are developing small programs.<br />
<br />
The problem is: when you use this approach on larger projects containing<br />
many modules you want a more structured, robust approach.<br />
<br />
Why?<br />
<br />
Because, the code could go through different stages as in development, <br />
debugging, review, testing or goes into production you want to see diffe‐<br />
rent levels of details in the printed messages.<br />
<br />
The type of messages you want to print out during development or debug‐<br />
ging can be very different from what you want you to see once it goes into<br />
production. Depending on the purpose, you want the code to print out dif‐<br />
ferent types of messages.<br />
<br />
Imagine doing all this with only if else and print statements.<br />
<br />
Besides, there is a certain level of hierarchy needed in the printed messages.<br />
<br />
That is, during a certain 'testing' run, you want to see only <br />
warnings and error messages. Whereas during 'debugging',<br />
more detailed messages that help with the debugging is needed. Be‐<br />
sides, if you want to print out which module and at what time the codes<br />
was run on, the python script gets messy.<br />
<br />
All these issues are nicely addressed by the logging module.<br />
<br />
Using logging, you can:<br />
<ul>
<li>Control message level to log only required ones</li>
<li>Control where to show or save the logs</li>
<li>Control how to format the logs with built-in message templates</li>
<li>Know which module the messages is coming from</li>
</ul><br />
You might say “I see that logging can be useful but it seems too <br />
technical and seems to be a bit difficult to grasp“. Well, yes, logging<br />
requires a bit of learning curve but that's what this post is here for: <br />
make logging easy to learn.<br />
<br />
Without further delay, let's get right into it.
</p></li>
<div id="second"/>
<li><h3>A Basic logging Example</h3>
<p>
Python provides an in-built logging module which is part of the python standard library. So you don't need to install anything.
</p>
<p>
To use logging, all you need to do is setup the basic configuration using logging.basicConfig(). Actually, this is also optional. We will see about that soon.
</p>
<p>
Then, instead of print(), you call logging.{level}(message) to show the message in console.
<code><pre>
import logging
logging.basicConfig(level=logging.INFO)
def hypotenuse(a, b):
"""Compute the hypotenuse"""
return (a**2 + b**2)**0.5
logging.info("Hypotenuse of {a}, {b} is {c}".format(a=3, b=4, c=hypotenuse(a,b)))
#> INFO:root:Hypotenuse of 3, 4 is 5.0
</pre></code>
The printed log message has the following default format: {LEVEL}:{LOGGER}:{MESSAGE}.
</p>
<p>
In the above case, the level is info, because, I called logging.info().
</p>
<p>
The logger is called root, because that is the default logger and I did not create a new one, yet.
</p>
<p>
But what is a logger anyway?
</p>
<p>
A logger is like an entity you can create and configure to log different type and format of messages.
</p>
<p>
You can configure a logger that prints to the console and another logger that sends the logs to a file, has a different logging level and is specific to a given module. More explanations and examples coming up on this.
</p>
<p>
Finally, the message is the string I passed to logging.info().
</p>
<p>
Now, what would have happened had you not setup logging.basicConfig(level=logging.INFO)?
</p>
<p>
Answer: The log would not have been printed.
</p>
<p>
Why?
</p>
<p>
To know that let's understand the levels of logging.
</p>
</li>
<div id="third"/>
<li><h3>The 5 levels of logging</h3>
logging has 5 different hierarchical levels of logs that a given logger may be configured to.<br />
<br />
Let's see what the python docs has to say about each level:<br />
<br />
<ul>
<li>DEBUG: Detailed information, for diagnosing problems. Value=10.</li>
<li>INFO: Confirm things are working as expected. Value=20.</li>
<li>WARNING: Something unexpected happened, or indicative of some problem. But the software is still working as expected. Value=30.</li>
<li>ERROR: More serious problem, the software is not able to perform some function. Value=40</li>
<li>CRITICAL: A serious error, the program itself may be unable to continue running. Value=50</li>
</ul><br />
Now, coming back to the previous question of what would have happened had you not setup logging.basicConfig(level=logging.INFO) in the previous example.
The answer is: the log would not have been printed because, the default logger is the 'root' and its default basicConfig level is 'WARNING'. That means, only messages from logging.warning() and higher levels will get logged.
So, the message of logging.info() would not be printed. And that is why the basic config was set as INFO initially (in logging.basicConfig(level=logging.INFO)).
Had I set the level as logging.ERROR instead, only message from logging.error and logging.critical will be logged. Clear?
<code><pre>
import logging
logging.basicConfig(level=logging.WARNING)
def hypotenuse(a, b):
"""Compute the hypotenuse"""
return (a**2 + b**2)**0.5
kwargs = {'a':3, 'b':4, 'c':hypotenuse(3, 4)}
logging.debug("a = {a}, b = {b}".format(**kwargs))
logging.info("Hypotenuse of {a}, {b} is {c}".format(**kwargs))
logging.warning("a={a} and b={b} are equal".format(**kwargs))
logging.error("a={a} and b={b} cannot be negative".format(**kwargs))
logging.critical("Hypotenuse of {a}, {b} is {c}".format(**kwargs))
#> WARNING:root:a=3 and b=3 are equal
#> ERROR:root:a=-1 and b=4 cannot be negative
#> CRITICAL:root:Hypotenuse of a, b is 5.0
</pre></code>
</li>
<div id="fourth"/>
<li><h3>How to log to a file instead of the console</h3>
To send the log messages to a file from the root logger, you need to set the file argument in logging.basicConfig()
<code><pre>
import logging
logging.basicConfig(level=logging.INFO, file='sample.log')
</pre></code>
Now all subsequent log messages will go straight to the file 'sample.log' in your current working directory. If you want to send it to a file in a different directory, give the full file path.
</li>
<div id="fifth"/>
<li><h3>How to change the logging format</h3>
The logging module provides shorthands to add various details to the logged messages. The below image from Python docs shows that list.<br />
<br />
<img src="./pictures/logging_formats-min.png" height=691 width=538/><br />
Logging Formats<br />
<br />
Let's change the log message format to show the TIME, LEVEL and the MESSAGE. To do that just add the format to logging.basiconfig()'s format argument.
<code><pre>
import logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s :: %(levelname)s :: %(message)s')
logging.info("Just like that!")
#> 2019-02-17 11:40:38,254 :: INFO :: Just like that!
</pre></code>
</li>
<div id="sixth"/>
<li><h3>Why working with the root logger for all modules isn't the best idea</h3>
Because they all will share the same 'root' logger.
But why is that bad?
Let's look at the below code:
<code><pre>
# 1. code inside myprojectmodule.py
import logging
logging.basicConfig(file='module.log')
#-----------------------------
# 2. code inside main.py (imports the code from myprojectmodule.py)
import logging
import myprojectmodule # This runs the code in myprojectmodule.py
logging.basicConfig(file='main.log') # No effect, because!
</pre></code>
Imagine you have one or more modules in your project. And these modules use the basic root module. Then, when importing the module ('myprojectmodule.py'), all of that module's code will run and logger gets configured.
Once configured, the root logger in the main file (that imported the 'myprojectmodule' module) will no longer be able to change the root logger settings. Because, the logging.basicConfig() once set cannot be changed.
That means, if you want to log the messages from myprojectmodule to one file and the logs from the main module in another file, root logger can't that.
To do that you need to create a new logger.
</li>
<div id="seventh"/>
<li><h3>How to create a new logger?</h3>
You can create a new logger using the 'logger.getLogger(name)' method. If a logger with the same name exists, then that logger will be used.
While you can give pretty much any name to the logger, the convention is to use the __name__ variable like this:
<code><pre>
logger = logging.getLogger(__name__)
logger.info('my logging message')
</pre></code>
But, why use __name__ as the name of the logger, instead of hardcoding a name?
Because the __name__ variable will hold the name of the module (python file) that called the code. So, when used inside a module, it will create a logger bearing the value provided by the module's __name__ attribute.
By doing this, if you end up changing module name (file name) in future, you don't have to modify the internal code.
Now, once you've created a new logger, you should remember to log all your messages using the new logger.info() instead of the root's logging.info() method.
Another aspect to note is, all the loggers have a built-in hierarchy to it.
What do I mean by that?
For example, if you have configured the root logger to log messages to a particular file. You also have a custom logger for which you have not configured the file handler to send messages to console or another log file.
In this case, the custom logger will fallback and write to the file set by the root logger itself. Until and unless you configure the log file of your custom logger.
So what is a file handler and how to set one up?
</li>
<div id="eighth"/>
<li><h3>What is and How to set up a File Handler and Formatter?</h3>
The FileHandler() and Formatter() classes are used to setup the output file and the format of messages for loggers other than the root logger.
Do you remember how we setup the filename and the format of the message in the root logger (inside logging.basicConfig()) earlier?
We just specified the filename and format parameters in logging.basicConfig() and all subsequent logs went to that file.
However, when you create a separate logger, you need to set them up individually using the logging.FileHandler() and logging.Formatter() objects.
A FileHandler is used to make your custom logger to log in to a different file. Likewise, a Formatter is used to change the format of your logged messages.
<code><pre>
import logging
# Gets or creates a logger
logger = logging.getLogger(__name__)
# set log level
logger.setLevel(logging.WARNING)
# define file handler and set formatter
file_handler = logging.FileHandler('logfile.log')
formatter = logging.Formatter('%(asctime)s : %(levelname)s : %(name)s : %(message)s')
file_handler.setFormatter(formatter)
# add file handler to logger
logger.addHandler(file_handler)
# Logs
logger.debug('A debug message')
logger.info('An info message')
logger.warning('Something is not right.')
logger.error('A Major error has happened.')
logger.critical('Fatal error. Cannot continue')
</pre></code>
Notice how we set the formatter on the 'file_handler' and not the 'logger' directly.
Assuming the above code is run from the main program, if you look inside the working directory, a file named logfile.log will be created if it doesn't exist and would contain the below messages.
<code><pre>
#> 2019-02-17 12:40:14,797 : WARNING : __main__ : Something is not right.
#> 2019-02-17 12:40:14,798 : ERROR : __main__ : A Major error has happened.
#> 2019-02-17 12:40:14,798 : CRITICAL : __main__ : Fatal error. Cannot continue
</pre></code>
Note again, the Formatter is set on the FileHandler object and not directly on the logger. Something you may want to get used to.
</li>
<div id="nineth"/>
<li><h3>How to include traceback information in logged messages</h3>
Besides 'debug', 'info', 'warning', 'error', and 'critical' messages, you can log exceptions that will include any associated traceback information.
With logger.exception, you can log traceback information should the code encounter any error. logger.exception will log the message provided in its arguments as well as the error message traceback info.
Below is a nice example.
<code><pre>
import logging
# Create or get the logger
logger = logging.getLogger(__name__)
# set log level
logger.setLevel(logging.INFO)
def divide(x, y):
try:
out = x / y
except ZeroDivisionError:
logger.exception("Division by zero problem")
else:
return out
# Logs
logger.error("Divide {x} / {y} = {c}".format(x=10, y=0, c=divide(10,0)))
#> ERROR:__main__:Division by zero problem
#> Traceback (most recent call last):
#> File "<ipython-input-16-a010a44fdc0a>", line 12, in divide
#> out = x / y
#> ZeroDivisionError: division by zero
#> ERROR:__main__:None
</pre></code>
</li>
<div id="tenth"/>
<li><h3>Exercises</h3>
<ul>
<li>Create a new project directory and a new python file named 'example.py'. Import the logging module and configure the root logger to the level of 'debug' messages. Log an 'info' message with the text: 'This is root logger's logging message!'.
Configure the root logger to format the message “This is root logger's logging message!“ as the following:
<code><pre>
#> 2019-03-03 17:18:32,703 :: INFO :: Module <stdin> :: Line No 1 :: This is root logger's logging message!
</pre></code>
Show Solution
</li>
<li>Create another python file in the same directory called 'mymod.py' and create a new logger bearing the module's name. Configure it to the level of 'error' messages and make it send the log outputs to a file called 'mymod_{current_date}.log'.
From 'mymod' logger created above, log the following 'critical' message to the said log file: This is a critical message!. Don't ignore it.
</li></ul>
</li>
<div id="eleventh"/>
<li><h3>Conclusion</h3>
<p>
Many congratulations if you were able to solve the exercises!
</p>
<p>
That was quite useful and straightforward wasn't it?
</p>
<p>
logging is a great tool but is not popular is Data science workflows as it should be. I hope the logging concepts are clear and the next time you work on a python based project, my kind request for you is to remember to give the logging module a shot.
</p>
<p>
Happy logging!
</p>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.machinelearningplus.com/python/python-logging-guide/" target=_blank>Machine Learning Plus :: Python logging guide</a></li>
<li>https://docs.python-guide.org/writing/logging/</li>
<li>https://www.machinelearningplus.com/python/python-logging-guide/</li>
<li>https://realpython.com/python-logging/</li>
<li>https://www.digitalocean.com/community/tutorials/how-to-use-logging-in-python-3</li>
</ul>
</html>
<html>
<table>
<tr><th>Methode / <br />Befehl</th><th>Bedeutung</th><th>mgl. Werte</th></tr>
<tr><td><b>%matplotlib inline</b></td><td>sog. “<i>magic function</i>“;<br />
die Zeichnungen / Diagramme <br />
werden im Notebook gezeigt;</td><td></td></tr>
<tr><td><b>show()</b></td><td>Zeichnung / Diagramm anzeigen</td><td><i>keine ?</i></td></tr>
<tr><td><b>xlabel()</b><br />
<b>ylabel()</b></td><td>Beschriftungen an den <br />
(Koordinaten-)Achsen</td><td></td></tr>
<tr><td><b>legend()</b></td><td>Eine Legende für <br />
das Diagramm erstellen; <br /></td><td><a href="https://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.legend" target=_blank>Positionsangabe:</a><br />
“<i>upper right“</i> (default)
</td></tr>
<tr><td><b>grid()</b></td><td>Turn the axes grids on or off.</td><td></td></tr>
<tr><td><b>step()</b></td><td></td><td></td></tr>
<tr><td><b>axhline()</b><br />
<b>axvline()</b></td><td></td><td></td></tr>
<tr><td><b>xticks()</b><br />
<b>yticks()</b></td><td></td><td></td></tr>
<tr><td><b>style.use()</b></td><td></td><td></td></tr>
<tr><td><b>scatter()</b></td><td></td><td></td></tr>
<!-- tr><td><b></b></td><td></td><td></td></tr -->
</table>
<h3>Links:</h3>
<a href="https://www.dataquest.io/blog/matplotlib-tutorial/" target=_blank>DataQuest :: Tutorial Matplotlib </a>
</html>
<html>
Um mehrere Konstruktoren 'zuzulassen', ist wie folgt vorzugehen:
<code><pre>
#!/usr/bin/env python
class Foo():
def __init__(self, name = <b>None</b>):
if name is None: <i># Default-Konstruktor</i>
print(f'__init__ : nur self')
self.name = "BMW"
print(f'{self.name}')
else:
print(f'__init__ : Name mitgegeben')
self.name = name
print(f'{self.name}')
def main():
car2 = Foo()
print(f'Auto: {car2.name}')
car1 = Foo("Mercedes")
print(f'Auto: {car1.name}')
if __name__ == '__main__':
main()
</pre></code>
Die Konstruktor-Methode <code><b>__init__()</b></code> besitzt neben dem<br />
üblichen <code><b>self</b></code> noch das Argument <code><b>name = <b>None</b></b></code>. Damit <br />
läßt sich ein Konstruktor programmieren, dem beliebig viele <br />
Argumente mitgegeben werden kann.<br />
<h3>Links:</h3>
<a href="https://stackoverflow.com/questions/682504/what-is-a-clean-pythonic-way-to-have-multiple-constructors-in-python">StackOverflow :: Pythonic way to have multiple constuctors</a>
</html>
<html>
<ul>
<li>Pygame ist ein Python‐Wrapper für SDL (<i>Simple<br />
DirectMedia Layer</i>), eine plattformübergreifende<br />
C-Bibliothek zur Steuerung von Multimedia</li>
<br />
<li>Mit pygame kann man Videospiele oder andere <br />
Multimedia-Anwendungen in Python schreiben, die<br />
auf allen unterstützten SDL-Plattformen (Windows,<br />
Unix, Mac, beOS und anderen) unverändert<br />
bleiben. </li>
<br />
<li></li>
<br />
<li></li>
<br />
<li></li>
<br />
<li></li>
<br />
<!-- li></li -->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://riptutorial.com/de/pygame" target=_blank>RIP Tutorial :: Pygame</a></li>
<li><a href="https://www.spieleprogrammierer.de/wiki/Pygame-Tutorial#Was_ist_Pygame.3F" target=_blank>www.spieleprogrammierer.de :: Wiki - Pygame-Tutorial</a></li>
<!-- li><a href="" target=_blank></a></li -->
</ul>
</html>
<html>
<ul>
<li>tkinter := “Tk interface“
</li>
<li>mit Hilfe des Moduls
<pre><code><b>tkinter</b></code></pre>
lassen sich Benutzeroberflächen er‐ und darstellen;
</li>
<li><h3>Import-Klauseln:</h3>
<pre><code>import tkinter as tk
from tkinter import *</code></pre>
[Es wird zwar <em>nicht</em> empfohlen, den gesamten Inhalt<br />
eines Moduls mit dem Sternchen zu importieren, <br />
aber i.d.R. richtet es auch keinen Schaden an.]<br />
<br />
</li>
<li>Es können auch Bilder dargestellt werden, <br />
jedoch werden nur die Formate <b>GIF, PGM</b> <br />
oder <b>PPM </b> unterstützt
</li>
<li><h3>Erstellung eines einfachen GUI-Fensters:</h3>
<pre><code>window = Tk()</code></pre>
→ ein Tkinter-Widget erstellt
</li>
<li><h3>Erstellung eines Button-Widgets:</h3>
<pre><code>btn = Button()
btn.pack() # Aufruf des Geometrie-Managers “pack“
btn[“text“] = “Hello World!“</code></pre>
→ es erscheint ein kleines Fenster mit dem String “Hello World!“ darin.
</li>
<li><h3>Beispiel:</h3>
<pre><code>import tkinter as tk
from tkinter import *
btn=Button() # Widget definieren, das Fenster,
#+ das nachher angezeigt werden soll
btn.pack() # Aufruf des Geometrie-Managers,
#+ dh. was soll mit dem/den Widgets
#+ gemacht werden bzw. wie es darge-
#+ stellt werden soll
btn["text"] = "Hello Jens!" # dem Attribut "text" vom
#+ Widget wird ein Text
#+ zugewiesen</code></pre>
</li>
<li><h3>Interaktive Schaltflächen werden als Funktionen definiert:</h3>
<pre><code>def click():
print(“You just clicked me!“)</code></pre>
⇒ diese Funktionen werden dem entsprechenden Widget zugeordnet:
<pre><code>btn[“command“] = click</code></pre>
</li>
<li><h3>Tk stellt die folgenden Widgets zur Verfügung:</h3>
<table>
<tr>
<td>
<ul>
<li>button
</li>
<li>canvas
</li>
<li>checkbutton
</li>
<li>combobox
</li>
</ul>
</td>
<td>
<ul>
<li>entry
</li>
<li>frame
</li>
<li>label
</li>
<li>labelframe
</li>
</ul>
</td>
<td>
<ul>
<li>listbox
</li>
<li>menu
</li>
<li>menubutton
</li>
<li>message
</li>
</ul>
</td>
<td>
<ul>
<li>notebook
</li>
<li>tk_optionMenu
</li>
<li>panedwindow
</li>
<li>progressbar
</li>
</ul>
</td>
<td>
<ul>
<li>radiobutton
</li>
<li>scale
</li>
<li>scrollbar
</li>
<li>separator
</li>
</ul>
</td>
<td>
<ul>
<li>sizegrip
</li>
<li>spinbox
</li>
<li>text
</li>
<li>treeview
</li>
</ul>
</td>
</tr>
</table>
</li>
<li><h3>Außerdem stellt es die folgenden Fenster auf höchster Ebene zur Verfügung:</h3>
<ul>
<li>tk_chooseColor - lässt ein Pop-up-Fenster erscheinen, dass es dem Benutzer ermöglicht eine Farbe aus einer Palette auszuwählen.
</li>
<li>tk_chooseDirectory - Pop-up-Fenster, dass einem Benutzer erlaubt interaktiv ein Verzeichnis auszuwählen.
</li>
<li>tk_dialog - ein Pop-up-Fenster in Form eines Dialogfenster
</li>
<li>tk_getOpenFile - Pop-up-Fenster, dass einem Benutzer erlaubt interaktiv eine Datei zum Öffnen auszuwählen.
</li>
<li>tk_getSaveFile - Pop-up-Fenster, dass einem Benutzer erlaubt interaktiv eine Datei zum Schreiben auszuwählen.
</li>
<li>tk_messageBox - Pop-up-Fenster mit Message.
</li>
<li>tk_popup - Pop-up-Fenster.
</li>
<li>toplevel - erzeugt und verändert Widgets auf höchster Ebene.
</li>
</ul>
</li><h3>Tk stellt drei verschiede Geometrie-Manager zur Verfügung:</h3>
<ul>
<li>place
</li>
<li>grid
</li>
<li>pack
</li>
</ul>
<li>
</li>
</ul>
<h3>Quellen:</h3>
<ul>
<li>“Python für Einsteiger“, Zeitschrift, 01/2019
</li>
<li><a href="https://www.python-kurs.eu"
target="_blank" rel="noreferrer noopener">
Python-Kurs</a>
</li>
</ul>
</html>
<html>
<h3>Links:</h3>
<a href="https://www.techbeamers.com/python-shutil-module/" target=_blank>TechBeamers :: Python-Modul shutil </a>
</html>
<html>
<ul>
<li>Die “Turtle“ ist eine programmierbare “Schildkröte“,<br />
die auf dem Boden hin‐ und herlaufen kann und, <br />
falls der Zeichenstift abgesenkt ist, ihren zurück‐<br />
gelegten Weg aufzeichnet.</li>
<h4>Turtle laden und aktivieren</h4>
<li><b>Modul Turtle importieren ::</b> <br />
<code><b>import turtle</b></code> oder <code><b>from turtle import *</b></code></li>
<br />
<li><b>Turtle aktivieren ::<br />
</b><code><b>turtle.reset()</b></code> oder <code><b>reset()</b></code></li>
<br />
<li>Beim Start befindet sich die Turtle im Mittelpunkt des Fensters,<br />
in dem sich der Koordinatenursprung (0,0) befindet;<br />
→ um die aktuelle Position zu ermittlen, gibt es die Funktion <code><b>position()</b></code></li>
<br />
<li>bei einigen Kommandos gibt es mehrere Schreibweisen:<br />
<table>
<tr><th>Befehl</th><th>Alternativen / <br />Synonyme</th></tr>
<tr><td><b>pensize</b></td><td> <code><b>width</b></code></td></tr>
<tr><td><b>penup</b></td><td><code><b>pu</b></code> bzw. <code><b>up</b></code></td></tr>
<tr><td><b>pendown</b></td><td><code><b>pd</b></code> bzw. <code><b>down</b></code></td></tr>
<tr><td><b>forward</b></td><td><code><b>fd</b></code></td></tr>
<tr><td><b>left</b></td><td><code><b>lt</b></code></td></tr>
<tr><td><b>right</b></td><td><code><b>rt</b></code></td></tr>
</table></li>
<li>Die Schildkröte geht in die Richtung, in die sie zeigt<br />
→ diese Richtung kann mittels Funktion <code><b>heading()</b></code>ermittelt werden</li>
<h4>Befehle</h4>
<ul>
<li><b>Geradlinige Bewegungen</b><br />
<table>
<tr><td><code><b>forward(n)</b></code></td><td>um n Pixel nach vorne bewegen</td></tr>
<tr><td><code><b>backward(n)</b></code></td><td> um n Pixel nach hinten bewegen</td></tr>
<tr><td><code><b>goto(x,y)</b></code></td><td> zur Position (x,y) bewegen</td></tr>
</table></li>
<li><b>Drehungen und Kreise</b><br />
<table>
<tr><td><code><b>left(α)</b></code></td><td>um α nach links drehen</td></tr>
<tr><td><code><b>right(α)</b></code></td><td>um α nach rechts drehen</td></tr>
<tr><td><code><b>circle(r)</b></code></td><td>einen Kreis mit Radius r zeichnen</td></tr>
<tr><td><code><b>circle(r,α)</b></code></td><td>einen Kreisbogen mit Radius r und Winkel
α zeichnen</td></tr>
</table></li>
<li><b>Konfiguration und Erscheinungsbild</b><br />
<table>
<tr><td><code><b>lup()</b></code></td><td>den Stift anheben</td></tr>
<tr><td><code><b>ldown()</b></code></td><td>den Stift absenken</td></tr>
<tr><td><code><b>lwidth(w)</b></code></td><td>die Linienstärke auf w Pixel stellen</td></tr>
<tr><td><code><b>lcolor(f)</b></code></td><td>die Linienfarbe ändern (z.B. 'red')</td></tr>
</table></li>
<li><b>Bildschirmprozeduren</b><br />
<table>
<tr><td><code><b>clear()</b></code></td><td>die Zeichenfläche löschen</td></tr>
<tr><td><code><b>reset()</b></code></td><td>die Turtle in den Anfangszustand versetzen</td></tr>
<tr><td><code><b>bye()</b></code></td><td>das Turtlefenster schließen</td></tr>
</table>
</li>
<li> <b>Befehl <code>exitonclick()</code> :: </b><br />
kann statt <code><b>mainloop()</b></code> verwendet werden;<br />
schließt nach Tasten-/Maus-Klick das Fenster</li>
<br />
<li>
Weitere Infos unter <a href="http://docs.python.org/3.1/library/turtle.html" target=_blank>Python :: Library “turtle“</a></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://informatik.bildung-rp.de/fileadmin/user_upload/informatik.bildung-rp.de/Fortbildung/pdf/PY-091007-Schmidt-GUIinPython.pdf" target=_blank>Christoph Schmidt :: GUI in Python <i>(PDF)</i></a></li>
<li><a href="https://michael-holzapfel.de/progs/python/python_turtle.htm" target=_blank>Michael Holzapfel :: Übersicht über die Programmierung der Turtle</a></li>
<li><a href="http://gems-hassee.de/assets/TurtleGrafikPython.pdf" target=_blank>Dierk Schröder :: Vortrag ‐ Turtle Grafik in Python</a></li>
<!-- li><a href="" target=_blank></a></li -->
</ul>
</html>
<html>
<h3>10 things you need to know about Date and Time in Python with datetime, pytz, dateutil & timedelta</h3>
<h3>Links:</h3>
<ul>
<li><a href="https://medium.com/@eleroy/10-things-you-need-to-know-about-date-and-time-in-python-with-datetime-pytz-dateutil-timedelta-309bfbafb3f7" target=_blank>medium.com :: 10 things you need to know about …</a></li>
</ul>
</html>
<html>
Eine Liste der Python-Module ist <a href="https://docs.python.org/3/py-modindex.html" target=_blank>hier</a> zu finden.<br />
<ul>
<li><h1>os:</h2>
<ol>
<li><h4>os.path:</h4></li>
<br />
<li><h4>os.system( [“clear“ | “cls“ ] ):</h4>
Löschen des Bildschirms;
<ul>
<li>Betriebssystem “UNIX“ :: <code><b>os.system( “clear“ )</b></code></li>
<li>Betriebssystem “Windowsldquo; :: <code><b>os.system( “cls“ )</b></code></li>
</ul></li></ol>
</li>
<li><h1>datetime:</h1>
<code><pre>
current_date = datetime.datetime.now()
jahr = current_date.year
monat = current_date.month
tag = current_date.day
</pre></code>
</li>
<li><h1>sys:</h1>
<ul>
<li><h4>sys.winver:</h4>
Ermittlen, ob und wenn ja, welche Windows‐Version vorliegt</li>
</ul></li>
<li><h1>shutil:</h1>
This module offers several functions to deal with operations on files<br />
and their collections. It provides the ability to copy and removal of files.<br />
<br />
In a way, it is similar to the OS Module; however, the OS Module <br />
does have functions dealing with collections of files.</li>
<li><h1>pickle:</h1>
(De-)Serialisierung von Objekten
<ul>
<li><b><code>dump()</code></b>:: Objekte abspeichern (z.B. in ein File)</li>
<li><b><code>load()</code></b> :: Objekte auslesen (z.B. aus einem File)</li>
</ul>
</li>
<li><h1>time</h1>
<ul>
<li><b><code>sleep(<i>x</i>)</code></b>:: Stoppt das Programm fü x Sekunden</li>
</ul></li>
<li><h3>timeit</h3>
Measure the execution time of small code snippets.</li>
<li><h3>tkinter</h3>
Interface to Tcl/Tk for graphical user interfaces</li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://www.dune-project.org" target=_blank>Dune :: Homepage</a></l>
<li><a href="https://arxiv.org/pdf/1807.05252.pdf" target=_blank>The Dune-Python Module</a></l>
<li><a href="https://www.uni-muenster.de/AMM/includes/ohlberger/team/rave/talks/dune_user_meeting_2013.pdf" target=_blank>dune-pyMor - Model Order Reduction with Python and Dune</a></l>
</ul>
</html>
<html>
beides Module zum Iterieren
<h3>itertools</h3>
<ul>
<li><b>compress</b></li>
<li><b>accumulate</b></li>
<li><b>cycle</b></li>
<li><b>tee</b></li>
</ul>
<h3>more-itertools</h3>
<ol>
<li><b>divide</b></li>
<li><b>partition</b></li>
<li><b>consecutive_groups</b></li>
<li><b>side_effect</b></li>
<li><b>collapse</b></li>
<br />
<li><b>split_at</b></li>
<li><b>bucket</b></li>
<li><b>map_reduce</b></li>
<li><b>sort_together</b></li>
<li><b>seekable</b></li>
<br />
<li><b>filter_except</b></li>
<li><b>unique_to_each</b></li>
<li><b>numeric_range</b></li>
<li><b>make_decorator</b></li>
</ol>
</html>
<html>
<ul>
<li><ol>
<li>Exploring the Python math Module (Overview)</li>
<li>Constants of the math Module</li>
<li><details><summary>Arithmetic Functions:</summary>
<ol>
<li>Factorials</li>
<li>Rounding</li>
<li>Checking For Closeness</li>
</details></li>
<li>Power Functions (<em>Potenz‐Funktionen</em>)</li>
<li><details><summary>Exponential Functions:</summary>
<ol>
<li>math.exp()</li>
<li>Radioactive Decay</li>
</ol>
</details></li>
<li><details><summary>Logarithmic Functions:</summary>
<ol>
<li>math.log()</li>
<li>Half-Lives</li>
</ol>
</details></li>
<li><details><summary>Other Important math Functions:</summary>
<ol>
<li>gcd()</li>
<li>fsum(), sqrt(), and More</li>
</ol>
</details></li>
<li>New math Functions in Python 3.8</li>
<li>The cmath Module vs the math Module</li>
<li>The NumPy Module vs the math Module</li>
<li>Exploring the Python math Module (Summary)</li>
</ol></li>
<br />
<li><b>Constants of the math Module</b><br />
The math module defines five (built‐in) constants:
<table>
<tr><th><center>Constant</center></th><th><center>Description</center></th></tr>
<tr><td><center><b><math>math.pi</math></b></center></td><td>Approximation to π = 3.141592 …</td></tr>
<tr><td><center><b><math>math.tau</math></b></center></td><td>Approximation to τ = 2π <em>(since 3.6)</em></td></tr>
<tr><td><center><b><math>math.e</math></b></center></td><td>Approximation to e = 2.718281 …</td></tr>
<tr><td><center><b><math>math.inf</math></b></center></td><td>Floating-point positive inifinity <em>(since 3.5)</em></td></tr>
<tr><td><center><b><math>math.nan</math></b></center></td><td>Floating-point “not a number“ (NaN) value <em>(since 3.5)</em></td></tr>
</table></li>
<br />
<li><b>Arithmetic Functions</b><br />
<ol>
<li>Factorials:<br />
The math module defines many number-theoretic type functions:
<table>
<tr><th><center>Type</center></th><th><center>Examples</center></th></tr>
<tr><td>Rounding</td><td>ceil , floor , trunc</td></tr>
<tr><td>Combinatorial</td><td>factorial , perm , comb</td></tr>
<tr><td>Classification</td><td>isclose , isfinite , isinf , isnan</td></tr>
<tr><td>Reducers</td><td>fsum , prod , gcd , lcm</td></tr>
</table>
There are several more so check the online documentation.</li>
</li>
<br />
<li>Rounding:<br />
Its the rounding of floats to ints.
<table>
<tr><td><b>math.ceil(x)</b></td><td>“<em>ceiling</em>“<br />
Returns the nearest integer greater than or equal to x (round to the right)<br />
<math><mi>x</mi> <mo>−</mo> math.ceil(x)</math></td></tr>
<tr><td><b>math.floor(x)</b></td><td>“<em>floor</em>“<br />
Returns the nearest integer less than or equal to x (round to the le )<br />
<math>math.floor(x) <mo>−</mo> <mi>x</mi></math></td></tr>
<tr><td><b>math.trunc(x)</b></td><td>“<em>truncate</em>“<br />
Returns the integer part of x (round towards zero)<br /><math>
math.floor(x), x <em><b>????</b></em>
math.trunc(x) = {
math.ceil(x),</td></tr>
x <0</math>
</table></li>
<br />
<li>Checking for closeness:<br />
Function “isclose“ :: How close are two floats to each other</li>
</li>
</ol>
<br />
<li><b>Power functions:</b><br />
A power function is a function of the form <math><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo> <mo>=</mo><msup><mi>x</mi><mi>n</mi></msup></math></li>
<!--
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://realpython.com/courses/exploring-python-math-module/" target="_blank">Real Python :: Exploring the Python math Module</a></li>
<li><a href="https://realpython.com/python-math-module/" target="_blank">Real Python :: The Python math Module: Everything You Need to Know</a></li>
<!--
<li></li>
<li></li>
<li></li>
-->
</ul>
</html>
<html>
<ol>
<li><details><summary><b>Wie wird das <em>math</em>‐Modul verfügbar gemacht?</b></summary><br />
Mit der Anweisung <code><pre>import math</pre></code>
Das Modul ist Teil der Standard‐Bibliothek von Pyhton. Daher ist <br />
keine separate Installation notwendig.<br />
<br />
</details></li>
<li><details><summary><b>Nenne die fünf im math‐Modul definierten Konstanten.</b></summary><br />
Die definierten Konstanten sind:
<table>
<tr><td><b>math.pi</b></td><td>die Zahl π</td></tr>
<tr><td><b>math.tau</b></td><td>die Zahl τ ( = 2*π)</td></tr>
<tr><td><b>math.e</b></td><td>die Eulersche Zahl</td></tr>
<tr><td><b>math.inf</b></td><td>(positive) unendliche floating‐point‐Zahl</td></tr>
<tr><td><b>math.nan</b></td><td>“<em>not a number</em>“ (<em>NaN</em>), floating‐point‐Zahl</td></tr>
</table>
<br />
</details></li>
<li><details><summary><b>Warum ergibt “<math mathsize="1.25em"><mi>math.inf</mi> <mo>+</mo> <mn>1</mn> <mo>></mo> <mi>math.inf</mi></math>“ den Wert “<em>False</em>“ ?</b></summary><br />
The idea is that math.inf is not representing a numerical value, <br />
but more like a concept of boundlessness, or “without end“.<br />
<br />
</details></li>
<li><b>Nenne Beispiele für arithmetische Funktionen aus den Bereichen:</b><br />
<ol>
<li><details><summary>Rounding</summary><br />
<ul>
<li>math.ceil</li>
<li>math.floor</li>
<li>math.trunc</li>
</ul><br /></details></li>
<li><details><summary>Combinatorial</summary><br />
<ul>
<li>math.factorial “<em>Fakultät</em>“</li>
<li>math.perm “<em>Permutation</em>“</li>
<li>math.com “<em>Kombinatorik</em>“</li>
</ul><br /></details></li>
<li><details><summary>Classification</summary><br />
<ul>
<li>math.isclose</li>
<li>math.isfinite</li>
<li>math.isinf</li>
<li>math.isnan</li>
</ul><br /></details></li>
<li><details><summary>Reducers</summary><br />
<ul>
<li>math.fsum</li>
<li>math.prod</li>
<li>math.gcd</li>
<li>math.lcm</li>
</ul><br /></details></li>
</ol></li>
<li><details><summary><b>Wie sieht eine (selbstgeschriebene) <em>factorial</em>‐Funktion aus, bei der<br />
Rekursion verwendet wird?</b></summary><br />
<code><pre>def fact_recursion (num):
if num < 0 or not isinstance(num, int):
raise ValueError(“num must be a positive integer“)
if num == 0:
return 1
return num * fact_recursion( num − 1)
</pre></code>
</details></li>
<br />
<li><details><summary><b>Wie lautet die Syntax eines <em>timeit</em>‐Aufrufs?</b></summary><br />
</details></li>
<li><details><summary><b>Warum sind die Funktionen im <em>math</em>‐Modul in der Regel schneller<br />
als selbstdefinierte Versionen dieser Funktionen?</b></summary><br />
Die Funktionen im <em>math</em>‐Modul sind i.d.R. Wrapper für die entsprechenden<br />
Funktionen in der C math‐Bibliothek. Da C näher am Maschinencode ist<br />
(und auch nicht interpretiert wird), ist die Ausführung schneller.<br />
<br />
</details></li>
<li><details><summary><b>Nenne die drei Funktionen, die float‐Zahlen auf int‐Zahlen runden.</b></summary>
<br />
Diese drei Funktionen sind:
<ol>
<li>math.ceil</li>
<li>math.floor</li>
<li>math.trunc</li>
</ol>
<br />
</details></li>
<li><b>Welche Werte werden bei folgenden Aufrufen zurückgegeben:</b><br />
<ol>
<li><details><summary>math.ceil(5.43)</summary> ⇒ 6</details></li>
<li><details><summary>math.ceil(−12.3)</summary>⇒ −13</details></li>
<li><details><summary>math.floor(5.43)</summary>⇒ 5</details></li>
<li><details><summary>math.floor(−12.3)</summary>⇒ −12</details></li>
<li><details><summary>math.trunc(5.43)</summary>⇒ 5</details></li>
<li><details><summary>math.trunc(−12.3)</summary>⇒ −12</details></li>
</ol>
</li>
<li><details><summary><b>Wofür kann die Funktion “isclose“ verwendet werden?</b></summary><br />
</details></li>
<br />
<li><details><summary><b>Zu welchem Ausdruck ist “isclose“ äquivalent?</b></summary><br />
</details></li>
<li><details><summary><b>Was bedeutet der folgende Ausdruck:
<math>
<mfrac>
<mrow>
<mi>y</mi><mo>−</mo><mi>x</mi>
</mrow>
<mrow>
<mi>max( x, y )</mi>
</mrow>
</mfrac>
</math></b></summary><br />
</details></li>
<li><details><summary><b>Welche Python‐Funktionen können zur Berechnung<br />
von Potenz‐Funktionen verwendet werden?</b></summary><br />
<ul>
<li>math.pow(x, y)</li>
<li>** (<em>Potenz‐Operator</em>)</li>
<li>pow(x, y)</li>
</ul>
</details></li>
<li><details><summary><b>Worin unterscheidet sich math.pow(x,y)<br />
von den anderen beiden Potenz‐Funktionen?</b></summary><br />
</details></li>
<li><details><summary><b>Worin unterscheidet sich math.pow(x,y) <br />
von der “normalen“, in der Mathematik verwendeten Notation?</b></summary><br />
</details></li>
<br />
<li><details><summary><b></b></summary><br />
</details></li>
<li><details><summary><b></b></summary><br />
</details></li>
<li><details><summary><b></b></summary><br />
</details></li>
<li><details><summary><b></b></summary><br />
</details></li>
<li><details><summary><b></b></summary><br />
</details></li>
</ol>
</html>
<html>
<ul>
<li>mit den beiden Funktionen
<ol>
<li><code><b>get_printoptions()</b></code></li>
und
<li><code><b>set_printoptions()</b></code></li>
</ol>
können die Einstellung für die Darstellung der Ausgaben <br />
im Jupyter Notebook abgefragt und neu gesetzt werden.</li>
<br />
<li>Der Aufruf von <code><b>get_printoptions()</b></code> gibt folgendes zurück:
<code><pre>
{'edgeitems': 3,
'threshold': 1000,
'floatmode': 'maxprec',
'precision': 8,
'suppress': False,
'linewidth': 75,
'nanstr': 'nan',
'infstr': 'inf',
'sign': '-',
'formatter': None,
'legacy': False}
</pre></code>
(Angabe der Default-Werte in Form eines Dictionarys)</li>
<br />
<li>Eine Parametereinstellung bleibt nur für den aktuellen Lauf,<br />
für das aktuelle Programm gültig.</li>
<br />
<li>Mit <code><b>set_printoptions()</b></code> kann ein Parameter geändert werden:<br />
<code><b>np.set_printoptions(threshold=1005)</b></code></li>
</ul>
<h2>Links:</h2>
<ul>
<li><a href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.set_printoptions.html" target=_blank>SciPy.org :: set_printoptions</a></li>
<li><a href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.get_printoptions.html" target=_blank>SciPy.org :: get_printoptions</a></li>
<li></li>
</ul<
</html>
<html>
<code><pre>
mueller@Debian-Laptop ~/programming/python/Quant/Project develop pip install FinancePy
Collecting FinancePy
Downloading financepy-0.260-py3-none-any.whl (604 kB)
604.5/604.5 KB 2.9 MB/s eta 0:00:00
Collecting numba
Downloading numba-0.56.4-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.5 MB)
3.5/3.5 MB 10.5 MB/s eta 0:00:00
Collecting scipy
Downloading scipy-1.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.4 MB)
34.4/34.4 MB 3.5 MB/s eta 0:00:00
Collecting numpy
Downloading numpy-1.24.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
17.3/17.3 MB 11.6 MB/s eta 0:00:00
Requirement already satisfied: setuptools in /home/mueller/programming/python/Quant/lib/python3.9/site-packages (from numba->FinancePy) (44.1.1)
Collecting llvmlite<0.40,>=0.39.0dev0
Using cached llvmlite-0.39.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.6 MB)
Collecting numpy
Downloading numpy-1.23.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB)
17.1/17.1 MB 6.3 MB/s eta 0:00:00
Installing collected packages: numpy, llvmlite, scipy, numba, FinancePy
Successfully installed FinancePy-0.260 llvmlite-0.39.1 numba-0.56.4 numpy-1.23.5 scipy-1.10.0
</pre><code>
</html>
<html>
<code><b>python -m pip install wheel</b></code>
</html>
<html>
<ul>
<li>Library für Data Science</li>
<br />
<li>Bibliotheken:<br />
<ol>
<li>Pandas</li>
<li>NumPy</li>
<li>Matlibplot</li>
</ol></li>
<br />
<li>Pandas dient als “Wrapper“ für NumPy<br />
daher ratsam, zuerst NumPy zu erlernen und <br />
und danach erst Pandas;</li>
<br />
<li>Pandas erleichtert das Ein‐ & Auslesen von Daten;</li>
<br />
<li>Pandas ist zwar weniger effizient als NumPy,<br />
bietet aber mehr Funktionalität;</li>
<br />
<li>empfohlene Aufrufe (u.a. in Jupyter Notebook):<br />
<code><b>%pylab inline<br />
import pandas as pd<br />
from pandas import Series, DataFrame</b></code><br />
<br />
die letzte Zeile erleichtert die Programmierung, <br />
da jetzt nicht mehr <code><b>pd.Series…</b></code> oder <code><b>pd.DataFrame…</b></code> <br />
(also mit Präfix), sondern nur noch <code><b>Series…</b></code><br />
oder <code><b>DataFrame…</b></code> einzugeben ist;</li>
<br />
<li>Version von Pandas ermittlen:<br />
<code><b>pd.__version__</b></code>
</li>
<br />
<br />
<li></li>
<br />
<li></li>
<br />
<br />
<li></li>
<br />
<li></li>
<br />
<br />
<li></li>
<br />
<li></li>
<br />
</ul>
<h3>Links:</h3>
<ol>
<li>Mike Müller :: CLT 2018 - Pandas-Workshop <i>Unterlagen</i></li>
<li><a href="https://barcamptools.eu/pycamp201904/events/37163d8f-6122-4d7c-9d07-aa3d87ef00b3/pandas" target=_blank>Uwe Ziegenhagen :: Vortrag Pandas - PyCamp 04 2019</a> <br />
→ Verzeichnis INTENSO/Python/pandas/Ziegenhagen_PandasGFU-master;<br />
<code><b>Spyder</b></code> als IDE verwendet</li>
</ol>
</html>
<html>
<ol>
<li><details><summary>Was ist die einfachste Datenstruktur in pandas?</summary>
<br />
Die einfachste Datenstruktur ist die <b>Serie</b> (“Series“).
<br /><br /></details></li>
<li><details><summary>Wie wird sie angelegt?</summary>
<code><pre>
import pandas as pd
ser = pd.Series([ <i>Auflistung von Werten</i>])
</pre></code>
<br /></details></li>
<li><details><summary>Nenne die Methoden / Befehle, die folgende Ausgaben erzeugen:<br />
<ol>
<li><code><b>array([ 23, -10, 46, -3, 27])</b></code></li>
<li><code><b>RangeIndex(start=0, stop=5, step=1)</b></code></li>
<li><code><b>numpy.ndarray</b></code></li>
</ol>
</summary>
<br />
Die Methoden / Befehle sind:
<ol>
<li>die Methode <b>values</b>, <code><b>ser.values</b></code></li>
<li>die Methode <b>index</b>, <code><b>ser.index</b></code></li>
<li>der Beffehl <b>type</b>, <code><b>type(ser.values)</b></code></li>
</ol>
<br />.
<br /></details></li>
<li><details><summary>Wie werden Indizes explizit mit der Methode “<b>Series</b>“ erstellt?</summary>
<br />
Mit Hilfe der “<b>index</b>“<br /> :: <br />
<code><b>ser = pd.Series([23,-10, 46, -3, 27], index = list('abcde'))</b></code><br />
<br /></details></li>
<li><details><summary>Wie kann man auf die einzelnen Einträge in der <b>Series</b>‐Datenstruktur zugreifen?</summary>
<br />
Man kann auf einzelne Einträge zugreifen über:
<ul>
<li>den Index : <code><b>ser['c']</b></code></li>
<li>die Position : <code><b>ser[0]</b></code></li>
</ul><br />.
<br /></details></li>
<li><details><summary>Wann verhalten sich Series wie NumPy-Arrays? <br />
Was unterscheidet sie voneinander?</summary>
<br />
Die Series verhalten sich bei arithmetischen Berechnungen wie NumPy-Arrays.<br />
Im Gegensatz zu den NumPy-Arrays behalten sie jedoch ihre Indizes bei.<br />
<br /></details></li>
<li><details><summary>Welcher anderen Datenstruktur ähnelt das Verhalten der Series?</summary>
<br />
Das Verhalten der Series ähnelt (auch) dem eines <b>Dictionarys</b>.<br />
Als Beispiel sei <b>der Test der Mitgliedschaft</b> genannt: <code><b>'c' in ser</b></code> <br />.
<br /></details></li>
<li><details><summary>Woraus lässt sich eine Series leicht erstellen?</summary>
<br />
Aus einem <b>Dctionary</b><br />.
<br /></details></li>
<li><details><summary>Frage</summary>
<br />
Antwort<br />.
<br /></details></li>
<li><details><summary>Frage</summary>
<br />
Antwort<br />.
<br /></details></li>
<li><details><summary>Frage</summary>
<br />
Antwort<br />.
<br /></details></li>
<li><h2>Reuven Lerner :: Pandas-Course, Abschnitt 02 :: Basic Pandas series ‐ Übungen</h2>
<details><summary>summary</summary><br />
<code><pre><i>Code</i>
</pre></code>
</details>
<li><h2>Reuven Lerner :: Pandas-Course, Abschnitt 03 :: dtypes and NaN ‐ Übungen</h2>
<li><details><summary>summary</summary><br />
<code><pre><i>Code</i>
</pre></code>
</details></li>
<li><h2>Reuven Lerner :: Pandas-Course, Abschnitt 04 :: Advanced series functionality ‐ Übungen</h2>
<li><details><summary>summary</summary><br />
<code><pre><i>Code</i>
</pre></code>
</details></li>
<li><h2>Reuven Lerner :: Pandas-Course, Abschnitt 05 :: Strings ‐ Übungen</h2>
<li><details><summary>summary</summary><br />
<code><pre><i>Code</i>
</pre></code>
</details></li>
<li><h2>Reuven Lerner :: Pandas-Course, Abschnitt 06 :: Plotting series ‐ Übungen</h2>
<li><details><summary>summary</summary><br />
<code><pre><i>Code</i>
</pre></code>
</details></li>
<li><h2>Reuven Lerner :: Pandas-Course, Abschnitt 07 :: Introducing data frames ‐ Übungen</h2>
<li><details><summary>summary</summary><br />
<code><pre><i>Code</i>
</pre></code>
</details></li>
<li><h2>Reuven Lerner :: Pandas-Course, Abschnitt 08 :: Boolean indexes and data frames ‐ Übungen</h2>
<li><details><summary>summary</summary><br />
<code><pre><i>Code</i>
</pre></code>
</details></li>
<li><h2>Reuven Lerner :: Pandas-Course Abschnitt 09 :: Pandas and I/O ‐ Übungen</h2>
<li><details><summary>summary</summary><br />
<code><pre><i>Code</i>
</pre></code>
</details></li>
<li><h2>Reuven Lerner :: Pandas-Course, Abschnitt 10 :: Data analysis with Pandas ‐ Übungen</h2>
<li><details><summary>summary</summary><br />
<code><pre><i>Code</i>
</pre></code>
</details></li>
<li><h2>Reuven Lerner :: Pandas-Course, Abschnitt 11 :: Memory management ‐ Übungen</h2>
<li><details><summary>summary</summary><br />
<code><pre><i>Code</i>
</pre></code>
</details></li>
<li><h2>Reuven Lerner :: Pandas-Course, Abschnitt 12 :: Pandas indexes ‐ Übungen</h2>
<li><details><summary>summary</summary><br />
<code><pre><i>Code</i>
</pre></code>
</details></li>
<li><h2>Reuven Lerner :: Pandas-Course, Abschnitt 13 :: Sorting, merging, and grouping ‐ Übungen</h2>
<li><details><summary>summary</summary><br />
<code><pre><i>Code</i>
</pre></code>
</details></li>
<li><h2>Reuven Lerner :: Pandas-Course, Abschnitt 14 :: Plotting ‐ Übungen</h2>
<li><details><summary>summary</summary><br />
<code><pre><i>Code</i>
</pre></code>
</details></li>
<li><h2>Reuven Lerner :: Pandas-Course, Pandas and time ‐ Übungen</h2>
<li><details><summary>summary</summary><br />
<code><pre><i>Code</i>
</pre></code>
</details></li>
<li><h2>Reuven Lerner :: Pandas-Course, Advanced Pandas functionality (tips and ideas) ‐ Übungen</h2>
<li><details><summary>summary</summary><br />
<code><pre><i>Code</i>
</pre></code>
</details></li>
<li><h2>Reuven Lerner :: Pandas-Course, Missing and duplicate data ‐ Übungen</h2>
<li><details><summary>summary</summary><br />
<code><pre><i>Code</i>
</pre></code>
</details></li>
<li><h2>Reuven Lerner :: Pandas-Course, ??? ‐ Übungen</h2>
<li><details><summary>summary</summary><br />
<code><pre><i>Code</i>
</pre></code>
</details></li>
</ol>
</html>
<html>
<ul>
<li>dtypes, Datentypen</li>
<br />
<li>eine Liste weiß <b>nicht</b>, welche Datentypen es enthält<br />
⇒ sowas wie “list of integers“ gibt es nicht<br />
⇒ eine Liste enthält (nur) eine Liste von Python-Objekten<br />
⇒ dies können beliebig verschiedene sein;</li>
<br />
<li>bei NumPy ist das anders:<br />
hier weiss jedes NumPy-Array, welchen Datentyp die Objekte<br />
haben, die es enthält<br />
⇒ im Gegensatz zur Lste ist es immer nur <u>ein</u> Datentyp</li>
<br />
<li>Daher sind Zuweisungen an ein NumPy-Array auch vom Datentyp<br />
abhängig, der zugewiesen werden soll<br />
⇒ dabei versucht NumPy, den Datentyp der zugewiesenen Daten<br />
zu casten, zu konvertieren;<br />
⇒ Beispiel: <br />
Ein NumPy-Array mit Integer-Zahlen wird float-Zahlen konvertieren<br />
(genauer: truncaten),<br />
die Zuweisung von Zahlen in Form eines String wird ebenfalls gecastet,<br />
Strings jedoch, wie z.B. <code><b>'abc'</b></code> werden abgelehnt;</li>
<br />
<li>NumPy-Arrays sind eine Schicht über C-Arrays;</li>
<br />
<li>Um den Datentyp eines NumPy-Arrays zu ermitteln,<br />
gibt es folgende vier Möglichkeiten:
<ol>
<li><code><b>dtype('int64')</b></code></li>
<li><code><b>np.dtype('int64')</b></code></li>
<li><code><b>np.Int64</b></code></li>
<li><code><b>int64</b></code></li>
</ol>
</li>
<br />
<li>die Methode <code><b>dtype()</b></code> wird von <code><b>%pylab</b></code> automatisch mitimportiert.</li>
<br />
<li>die verfügbaren dtypes sind:
<ol>
<li><code><b>int<i>[0 | 8 | 16 | 32 | 64]</i></b></code>, “Integer“</li>
<li><code><b>uint<i>[0 | 8 | 16 | 32 | 64]</i></b></code>, “Unsigned Integer“</li>
<li><code><b>float<i>[0 | 8 | 16 | 32 | 64]</i></b></code>, “Float“</li>
<li><code><b><U<i>x</i></b></code>, “Strings (Unicode Characters), der Länge <code><b><i>x</i></b></code>“</li>
</ol></li>
<br />
<li>Bei Konvertierung ist darauf zu achten, welcher Datentyp<br />
wird in welchen Datentyp konvertiert. Habe ich nur Zahlen<br />
bis zu einer bestimmten Grösse, so kann ich den Datentyp<br />
darauf ausrichten. Werden aber Grenzen überschritten, kann<br />
es zu unvorhergesehenen (negativen) Auswirkungen kommen. </li>
</ul>
<h2>Links:</h2>
<ul>
<li>Reuven Lerner :: Pandas-Kurs</li>
</ul>
</html>
<html>
<p>
If your Python programs are slower than you'd like you can often speed them up by *parallelizing* them.
</p>
<p>
Basically, parallel computing allows you to carry out many calculations at the same time, thus reducing the amount of time it takes to run your program to completion.
</p>
<p>
I know, this sounds fairly vague and complicated somehow...but bear with me for the next 50 seconds or so.
</p>
<p>
Here's an end-to-end example of parallel computing in Python 2/3, using only tools built into the Python standard library.
</p>
<p>
Ready? Go!
<ol>
<li>First, we need to do some setup work. We'll import the "collections" and the "multiprocessing" module so we can use Python's parallel computing facilities and define the data structure we'll work with:
<code><pre>
import collections
import multiprocessing
</pre></code></li>
<li>Second, we'll use "collections.namedtuple" to define a new (immutable) data type we can use to represent our data set, a collection of scientists:
<code><pre>
Scientist = collections.namedtuple('Scientist', [
'name',
'born',
])
scientists = (
Scientist(name='Ada Lovelace', born=1815),
Scientist(name='Emmy Noether', born=1882),
Scientist(name='Marie Curie', born=1867),
Scientist(name='Tu Youyou', born=1930),
Scientist(name='Ada Yonath', born=1939),
Scientist(name='Vera Rubin', born=1928),
Scientist(name='Sally Ride', born=1951),
)
</pre></code></li>
<li>Third, we'll write a "data processing function" that accepts a scientist object and returns a dictionary containing the scientist's name and their calculated age:
<code><pre>
def process_item(item):
return {
'name': item.name,
'age': 2017 - item.born
}
</pre></code>
The process_item() function just represents a simple data transformation to keep this example short and sweet ‐ but you could swap it out with a much more complex computation no problem.
(20 seconds remaining)
</li><br />
<li>Fourth, and this is where the real parallelization magic happens, we'll set up a "multiprocessing pool" that allows us to spread our calculations across all available CPU cores.
Then we call the pool's map() method to apply our process_item() function to all scientist objects, in parallel batches:
<code><pre>
pool = multiprocessing.Pool()
result = pool.map(process_item, scientists)
</pre></code>
Note how batching and distributing the work across multiple CPU cores, performing the work, and collecting the results are all handled by the multiprocessing pool. How great is that?
</li><br />
<li>Fifth, we're all done here with 5 seconds remaining …
<br /><br />
Let's print the results of our data transformation to the console so we can make sure the program did what it was supposed to:
<code><pre>
print(tuple(result))
</pre></code></li>
That's the end of our little program. And here's what you should expect to see printed out on your console:
<code><pre>
({'name': 'Ada Lovelace', 'age': 202},
{'name': 'Emmy Noether', 'age': 135},
{'name': 'Marie Curie', 'age': 150},
{'name': 'Tu Youyou', 'age': 87},
{'name': 'Ada Yonath', 'age': 78},
{'name': 'Vera Rubin', 'age': 89},
{'name': 'Sally Ride', 'age': 66})
</pre></code>
</ol>
Isn't Python just lovely?
Now, obviously I took some shortcuts here and picked an example that made parallelization seem effortless ‐
But, I stand by the lessons learned here:
<ul>
<li>If you know how to structure and represent your data, parallelization is convenient and feels completely natural. As a Pythonista, you should pick up the basics of functional programming for this reason.</li>
<li>Python is a joy to work with and eminently suitable for these kinds of programming tasks.</li>
</ul>
Dan Bader
<h3>Links:</h3>
<ul>
<li>eMail, Dan Bader, “Parallel computing in Python (in 60 seconds or less)“ [18 Okt., 2020]</li>
<!--li><a href="" target=_blank></a></li-->
</ul>
</html>
<html>
<ul>
<li>Pint is a Python package</li>
<li>to define, operate and manipulate physical quantities: <br />
the product of a numerical value and a unit of measurement. </li>
<li>It allows arithmetic operations between them and con‐<br />
versions from and to different units.</li>
</ul>
<h3>Links:</h3>
<a href="https://pint.readthedocs.io/en/0.9/" target=_blank>Pint :: Documentation</a><br />
</html>
<html>
<p>
Das Buch “Konkrete Mathematik (nicht nur) für Informatiker“ enthält <br />
ein eigenes Kapitel mit (insges. 38) Programmieraufgaben resp. ‐projekte.
</p>
<ol>
<li><details>
<summary><b>Collatz-Vermutung</b></summary>
Die Funktion f ist für n ∈ ℕ<sup>+</sup> folgendermaßen definiert:<br />
n/2, wenn n gerade ist,
f (n) =
3n + 1, wenn n ungerade ist.
Also ist z.B. f ( 20) = 10 und f (5) = 16. Man kann nun mit einem beliebigen Start-
wert n anfangen und sukzessive f (n) ausrechnen, dann auf diesen Wert wieder f
anwenden, auf das Ergebnis erneut f anwenden, und so weiter.<br />
Würde man zum Beispiel mit dem Startwert 42 anfangen, dann wäre der nächste
Wert f (42) = 21, dann käme f (21) = 64 und dann f ( 64) = 32. Insgesamt sähe es
so aus:
<code><pre>
42, 21, 64, 32, 16, 8, 4, 2, 1, 4, 2, 1, 4, 2, 1, . . .
</pre></code>
<p>Ab jetzt wird sich die Sequenz der letzten drei Zahlen offenbar unablässig wieder-
holen. Die Collatz-Vermutung1 besagt, dass das bei jedem Startwert passiert: irgend-
wann wird man immer bei der Eins ankommen.
</p>
<p>
Finden Sie mithilfe eines Python-Programms heraus, für welchen Startwert zwi-
schen 1 und 10000 man am längsten warten muss, bis man zum ersten Mal den
Wert eins erreicht.
</p>
<p>
[<b>Fußnote:</b><br />
Lothar Collatz war von 1952 bis 1990 Professor für Mathematik in Hamburg. Es handelt sich<br />
um eine Vermutung, weil bisher kein Mathematiker einen Beweis dafür finden konnte!]
</p></details>
</li>
<li><details>
<summary><b>Vollkommene Zahlen</b></summary>
<p>Schreiben Sie zunächst eine Funktion <em>divisorSum</em>, die zu einer vor-<br />
gegebenen positiven natürlichen Zahl n die Summe aller (positiven)<br />
Teiler von n ausgibt, die kleiner als n sind.
</p>
<p>Beispielsweise hat 12 die Teiler 1, 2, 3, 4, 6 und 12.<br />
divisorSum(12) soll also den Wert 16 zurückgeben, weil 16 = 1 + 2 + 3 + 4 + 6<br />
gilt. divisorSum(13) muss 1 zurückgeben, weil 13 eine Primzahl ist.
</p>
<p>
Eine positive natürliche Zahl n heißt <em><b>vollkommen</b></em>, wenn sie die Summe aller (posi-<br />
tiven) Teiler von n ist, die kleiner als n sind. Die kleinste vollkommene Zahl ist 6,<br />
denn 6 ist die Summe von 1, 2 und 3, und das sind die Teiler von 6, die kleiner<br />
als 6 sind.
</p>
<p>
Schreiben Sie nun eine Funktion <em>findPerfectNumbers</em>, die zu einer<br />
vorgegebenen Zahl m eine Liste der ersten m vollkommenen Zahlen<br />
ausgibt. Bei der Eingabe <code><b>findPerfectNumbers(1)</b></code> soll also das Er‐<br />
gebnis [6] zurückgegeben werden. Geben Sie die ersten vier voll‐<br />
kommenen Zahlen an.
</p>
<p>
<h3>Links:</h3>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Perfect_number" target=_blank>Wikipedia :: Perfect numbers</a></details></li>
</ul>
</li>
<li><details>
<summary><b>Primitive Einheitswurzel</b></summary>
Ein Element a von ℤ/nℤ heißt <b>primitive Einheitswurzel</b>, wenn die Potenzen
<code><pre><math>
<msup><mi>a</mi><mn>1</mn></msup> , <msup><mi>a</mi><mn>2</mn></msup> , <msup><mi>a</mi><mn>3</mn></msup> , … , <msup><mi>a</mi><mn>n-1</mn></msup>
</math></pre></code>
alle verschieden sind. (Siehe auch Kapitel 59.) Zum Beispiel gilt in ℤ/5ℤ
<code><pre><math>
<msup><mi>3</mi><mn>1</mn></msup> = 3 <msup><mi>3</mi><mn>2</mn></msup> = 3 · 3 = 4 <msup><mi>3</mi><mn>3</mn></msup> = 3 · 3 · 3 = 2 <msup><mi>3</mi><mn>4</mn></msup> = 3 · 3 · 3 · 3 = 1
</math></pre></code>
<code><pre><math>
<msup><mi>4</mi><mn>1</mn></msup> = 4 <msup><mi>4</mi><mn>2</mn></msup> = 4 · 4 = 1 <msup><mi>4</mi><mn>3</mn></msup> = 4 · 4 · 4 = 4 <msup><mi>4</mi><mn>4</mn></msup> = 4 · 4 · 4 · 4 = 1
</math></pre></code>
3 ist also primitive Einheitswurzel in ℤ/5ℤ, 4 aber nicht.<br />
Lassen Sie sich die ersten 20 Werte für n (beginnend mit n = 2) anzeigen, <br />
für die ℤ/nℤ mindestens eine primitive Einheitswurzel hat. Was fällt Ihnen<br />
auf?
</li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ol>
<h3>Links:</h3>
<ul>
<li>Edmund Weitz :: Anhang (PDF - File: Weitz_KonkreteMathematik_2018_Bookmatter_KonkreteMathematikNichtNurFuerInformatiker_Anhang.pdf)</li>
<li><a href="https://de.acervolima.com/python-projekte-anfanger-bis-fortgeschrittene/"
target="_blank" rel="noreferrer noopener">
Acervo Lima :: Python-Projekte - Anfänger bis Fortgeschrittene</a>
</li>
</ul>
</html>
<html>
<h3>Strings Manipulation</h3>
<ol>
<li><h5>Reverse Integer</h5>
<code><pre>Output:
-132
543
</pre></code>
A warm-up algorithm, that will help you practicing your slicing skills. In effect the only
tricky bit is to make sure you are taking into account the case when the integer is
negative. I have seen this problem presented in many different ways but it usually is the
starting point for more complex requests.</li>
<li><h5>Average Words Length</h5>
<code><pre>Output:
4.2
4.08
</pre></code>
Algorithms that require you to apply some simple calculations using strings are very
common, therefore it is important to get familiar with methods like
.replace() and .split() that in this case helped me removing the unwanted characters
and create a list of words, the length of which can be easily measured and summed.</li>
<li><h5>Add Strings</h5>
<code><pre>Output:
2200
2200
</pre></code>
I find both approaches equally sharp: the first one for its brevity and the intuition of
using the eval( ) method to dynamically evaluate string-based inputs and the second
one for the smart use of the ord( ) function to re-build the two strings as actual
numbers trough the Unicode code points of their characters. If I really had to chose in
between the two, I would probably go for the second approach as it looks more complex
at first but it often comes handy in solving “Medium“ and “Hard“ algorithms that
require more advanced string manipulation and calculations.</li>
<li><h5>First Unique Character</h5>
<code><pre>
Output:
121
###
121
</pre></code>
Also in this case, two potential solutions are provided and I guess that, if you are pretty
new to algorithms, the first approach looks a bit more familiar as it builds as simple
counter starting from an empty dictionary.
However understanding the second approach will help you much more in the longer
term and this is because in this algorithm I simply used
collection.Counter(s) instead of building a chars counter myself and replaced
range(len(s)) with enumerate(s) , a function that can help you identify the index
more elegantly.</li>
<li><h5>Valid Palindrome</h5>
<code><pre>Output:
True
</pre></code>
The “Valid Palindrome“ problem is a real classic and you will probably find it
repeatedly under many different flavors. In this case, the task is to check weather by
removing at most one character, the string matches with its reversed counterpart. When
s = “radkar“ the function returns True as by excluding the “k“ we obtain the word
“radar“ that is a palindrome.</li>
<h3>Arrays</h3>
<li><h5>Monotonic Array</h5>
<code><pre>Output:
True
False
True
</pre></code>
This is another very frequently asked problem and the solution provided above is pretty
elegant as it can be written as a one-liner. An array is monotonic if and only if it is
monotone increasing, or monotone decreasing and in order to assess it, the algorithm
above takes advantage of the all() function that returns True if all items in an iterable
are true, otherwise it returns False . If the iterable object is empty, the all() function
also returns True .</li>
<li><h5>Move Zeroes</h5>
<code><pre>Output:
[1, 3, 12, 0, 0]
[1, 7, 8, 10, 12, 4, 0, 0, 0, 0]
</pre></code>
When you work with arrays, the .remove() and .append() methods are precious
allies. In this problem I have used them to first remove each zero that belongs to the
original array and then append it at the end to the same array.</li>
<li><h5>Fill The Blanks</h5>
<code><pre>Output:
[1, 1, 2, 3, 3, 3, 5, 5]
</pre></code>
I was asked to solve this problem a couple of times in real interviews, both times the
solution had to include edge cases (that I omitted here for simplicity). On paper, this an
easy algorithm to build but you need to have clear in mind what you want to achieve
with the for loop and if statement and be comfortable working with None values.</li>
<li><h5>Matched & Mismatched Words</h5>
<code><pre>Output:
(['The','We','a','are','by','heavy','hit','in','meet','our',
'pleased','storm','to','was','you'],
['city', 'really'])
</pre></code>
The problem is fairly intuitive but the algorithm takes advantage of a few very common
set operations like set() , intersection() or & and symmetric_difference()or ^ that are
extremely useful to make your solution more elegant. If it is the first time you encounter
them, make sure to check this page.</li>
<li><h5>Prime Numbers Array</h5>
<code><pre>Output:
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31]
</pre></code>
I wanted to close this section with another classic problem. A solution can be found
pretty easily looping trough range(n) if you are familiar with both the prime numbers
definition and the modulus operation.</li>
</ol>
<h3>Link:</h3>
File :: towardsdatascience.com-10 Algorithms To Solve Before your Python Coding Interview.pdf
</html>
<html>
<h3>Aufbau der Dokumentation bei Funktionen:</h3>
<ul>
<li>Allgemeine Beschreibung:<code><pre>
def <em><fct‐Name>(<ParamListe>)</em>:
<b>“““</b>
<em>Beschreibung der Aufgabe
der Funktion</em>
<b>Parameters:</b>
-----------
<em>param_1 : typ
Beschreibung des ersten Parameters</em>
[<em>param_2 : typ
Beschreibung des zweiten Parameters</em>
…
<em>param_n : typ
Beschreibung des n‐ten Parameters</em>]
<b>Returns:</b>
--------
'<em>Typ des Rückgabewertes</em>'
<em>Beschreibung des Rückgabewertes</em>
<b>“““</b>
</pre></code>
</li>
<li>Beispiel:
<code><pre>
def __construct_alpha_vantage_symbol_call(self, ticker):
<b> """
Construct the full API call to AlphaVantage
based on the user provided API key and the
desired ticker symbol.
Parameters:
-----------
ticker : 'str'
The ticker symbol, e.g. 'AAPL'
Returns:
--------
'str'
The full API call for a ticker time
series
"""</b>
return "%s/%s&symbol=%s&outputsize=full&apikey=%s" % (
…
</pre></code>
</li>
</ul>
</html>
<html>
<h3>Links:</h3>
</ul>
<li><a href="https://www.techbeamers.com/top-10-python-coding-tips-for-beginners/" target=_blank>TechBeamers :: Tipps</a></li>
<li><a href="https://www.techbeamers.com/essential-python-tips-tricks-programmers/" target=_blank>TechBeamers :: Essential tips</a></li>
<li><a href="https://www.techbeamers.com/python-interview-questions-programmers/" target=_blank>TechBeamers :: Interview questions</a></li>
</ul>
</html>
<html>
<ol>
<li><b>Shortcuts:</b><br />
<ul>
<li>Search Everywhere :: <code><b>Double Shift</b></code> (die Shift-Taste zwei Mal drücken)
</li>
<li>Go to File :: <code><b>Strg+Umschalt+N</b></code>
</li>
<li>Recent Files :: <code><b>Strg+E</b></code>
</li>
<li>Navigation bar :: <code><b>Alt+Pos 1</b></code>
</li>
<li> :: <code><b></b></code>
</li>
</ul>
</li>
<br />
<li>Scratch files are temporary files that let you experiment and prototype <br />
in the editor, without creating any project files.<br />
<br />
To create a scratch file, press <code><b>Strg+Alt+Umschalt+Einfg</b></code>, and then<br />
select the language to use.</li>
<br />
<li>When you invoke Basic Completion <code><b>Strg+Leertaste</b></code>, PyCharm <br />
Community suggests the choices that are reacheable from the <br />
current caret position. Press <code><b>Strg+Leertaste</b></code> again to extend <br />
the suggestions list.<br />
<img src="./pictures/pycharm_TipOfTheDay_01.png" height=124 width=337 /><br />
If you use completion to discover a class name and this class<br />
has not been imported yet, the import statement is generated<br />
automatically. </li>
<br />
<li>You do not need to open a file in the editor to change its line separator style. <br />
Use the Project tool window instead: select one or more files or folders, select <br />
<code><b>File | File Properties | Line Separators</b></code> from the main menu, <br />
and then choose the desired line ending style.<br />
For a directory, new line separator applies recursively.<br />
<img src="./pictures/pycharm_TipOfTheDay_02.png" height=102 width=512 /></li>
<br />
<li>PyCharm Community lets you compare the following via context menu commands:<br />
<ul>
<li>directories</li>
<li>a class or class member with another class or class member</li>
<li>a local file with its versions in Local History</li>
<li>a local file with its current revision in your version control repository</li>
<li>any two revisions of the same file</li>
<li>any local file with the file currently opened in the Editor</li>
<li>any two local files with each other: text or binary</li>
<li>active Editor with the clipboard contents</li>
<li>any text sources you paste into a blank diff window</li>
</ul>
<br />
You can configure the Diff tool in the <code><b><em>Settings/Preferences dialog</em></b></code>(Strg+Alt+S)<br />
under “Tools | Diff & Merge“.</li>
<br />
<li>Get access to the most common breakpoint actions and filters through intention actions (<code><b>Alt+Eingabe</b></code>)</li>
<br />
<li>Comment out a line or block of code (<em>Kommentarzeilen</em>) :: <br />
<code><b>Ctrl+/</b></code> bzw. <code><b>Ctrl+Shift+/</b></code><br />
→ <b>auf dem deutschen Keyboard:</b> <a href="https://stackoverflow.com/questions/32091163/comment-code-in-pycharm-with-a-german-keyboard" target=_blank>Ctrl + NumPad / </a> (Das Division-Zeichen auf dem Nummernpad)</li>
<br />
<li>To verify that your regular expression is correct, place the caret within the expression<br />
you want to check, press <code><b>Alt+Eingabe</b></code>, and select <code><b>Edit RegExp</b></code>.<br />
<br />
In the popup frame type a sample string that should match your regular expression. If the<br />
background turns green, the match occurred. If it turns red, there is no match or your ex‐<br />
pression probably contains a mistake.<br />
<img src="./pictures/PyCharm_TipOfTheDay_RegExp.png" height=153 width=424 />
</li>
<br />
<li>You can jump to a file located in a deeply nested directory by pressing <code><b>Strg+Umschalt+N</b></code><br />
and typing several characters of the enclosing directories and filename.<br />
<br />
<img src="./pictures/PyCharm_TipOfTheDay_2020-12-08.png" height=122 width=343 /><br />
<br />
Use either a slash or a backslash as a delimiter.</li>
<br />
<li>In PyCharm Community, you can configure different copyright notices for different sets of files. For convenience, you can use variables. For example, use $today.year to keep the year up to date.
In the Settings/Preferences dialog Strg+Alt+S, select Editor | Copyright | Copyright Profiles, create a new profile, and add the text for your copyright notice using variables.</li>
<br />
<li>
To preview a referenced image in a popup instead of in a separate editor tab, press Strg+Umschalt+I.
</li>
<br />
<!--
<li></li>
<br />
<li></li>
<br />
<li></li>
<br />
<li></li>
<br />
<li></li>
-->
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://bodo-schoenfeld.de/eine-virtuelle-umgebung-fuer-python-erstellen/" target=_blank rel="noreferrer noopener">Bodo Schönfeld :: Eine virtuelle Umgebung für Python erstellen</a></li>
</ul>
</html>
https://www.jetbrains.com/help/pycharm/installation-guide.html#3ef929ec
<html>
<h3>Configure the Typo inspection</h3>
By default, the Typo inspection checks all text including code elements, string literals, and comments in all scopes.
<ol>
<li>In the Settings/Preferences dialog Ctrl+Alt+S, select Editor | Inspections.</li>
<br />
<li>Expand the Proofreading node and click Typo in the central pane.</li>
<br />
<li>In the right-hand pane, configure the Typo inspection:
<table>
<tr><th>Item</th><th>Description</th></tr>
<tr><td>Severity</td><td>Specify the severity level and the scope in which to apply this level.<br />
<br />
For example, if you want typos to stand out more, select Error or <br />
Warning to highlight typos similar to syntax errors or warnings in<br />
your code.</td></tr>
<tr><td>Options</td><td>Specify the type of content to check:<br />
<br />
<ul>
<li>Process code: check various code elements.</li>
<br />
<li>Process literals: check text inside string literals.</li>
<br />
<li>Process comments: check text inside comments.</li>
</ul>
</table>
</ol>
To disable the Typo inspection, clear the checkbox next to it.
<h3>Links:</h3>
<ul>
<li><a href="https://www.jetbrains.com/help/pycharm/spellchecking.html#configure-the-typo-inspection" target=_blank>PyCharm ‐ Help :: Spellchecking</a></li>
</ul>
</html>
<html>
<h2>Werkzeuge zur statistischen Codeanalyse</h2>
<ul>
<li> <b>Pychecker</b><br />
Werkzeug zur Prüfung von Python Sourcecode</li>
<br />
<li> <b>Pylint</b><br />
Statische Codeanalyse;<br />
Spyder - ShortCut: F8 (“Run Analysis“)</li>
<br />
<li> <b> Pyflakes</b><br />
Programm, um Python Code auf Fehler hin zu überprüfen</li>
</ul>
</html>
<html>
<h3>PyTorch</h3>
<ul>
<li>Python-Library, auf Torch basierend, für Machine Learning</li>
<li>aktuelle Version :: 1.0 (Stand: 12/2018)</li>
<li>liefert mit:
<ul><li>JIT-Compiler</li>
<li>C++-Frontend (Hochperformance)</li>
</ul>
<li>der Compiler schreibt PyTorch-Modelle zur Laufzeit um,<br />
um ihre Effizienz in der Produktion zu steigern. Er erlaubt <br />
au6szlig;erdem das Erstellen von Modellen ohne Abhängigkeit<br />
zum Python-Interpreter, sodass noch mehr Optimierungen<br />
möglich sein sollen.</li>
<li> Darüber hinaus kann er das Modell in eine C++-Laufzeit ex‐<br />
portieren, die auf dem Framework Caffe2 basiert. </li>
<li>Caffe2 ist mit PyTorch verschmolzen</li>
<li>Das C++-Frontend ist ein reines C++-Interface für das<br />
PyTorch-Backend, das demselben API- und Architektur‐<br />
muster wie das Python-Frontend folgt. Es soll vor allem in<br />
Applikationen Einsatz finden, die eine hohe Performance<br />
und geringe Latenzen benötigen. </li>
<li>das Frontend ist aktuell noch mit "API Unstable" markiert</li>
<li>Darüber hinaus haben die PyTorch-Entwickler die verteilte<br />
Bibliothek neu designt. <i>torch.distributed</i> arbeitet in den Back&hpyhen;<br />
ends Gloo, NCCL und MPI völlig asynchron. Es soll außerdem<br />
Performanceverbesserungen bei verteilten Daten geben, be‐<br />
sonders für Hosts mit langsamen Netzwerkverbindungen.</li>
<li>Weitere Informationen finden sich in den <a href="https://github.com/pytorch/pytorch/releases/tag/v1.0.0" target=_blank>Release Notes</a>.</li>
<li>Wer PyTorch ausprobieren möchte, findet in dem eben‐<br />
falls neu veröffentlichten Torch Hub ein <a href="https://pytorch.org/docs/master/hub.html" target=_blank>Repository</a> mit vor‐<br />
trainierten Machine-Learning-Modellen.</li>
</ul>
<h3>Link:</h3>
<a href="https://www.heise.de/developer/meldung/Machine-Learning-PyTorch-erreicht-Version-1-0-mit-JIT-Compiler-und-C-Frontend-4247659.html" target=_blank>Heise :: PyTorch</a>
</html>
<html>
<code><pre>
<b># Aktualisierung u.a. des bin-Verzeichnisses</b>
python3.9 -m venv .
<b># Aktualisierung des venv-Verzeichnisses</b>
python3.9 -m venv venv
<b># virtuelle Umgebung aktivieren</b>
source ./bin/activate
(Quant) mueller@Debian-Laptop:~/programming/python/Quant$ python ‐‐version
Python 3.9.2
(Quant) mueller@Debian-Laptop:~/programming/python/Quant$ python -m pip install ‐‐upgrade pip
</pre></code>
</html>
<html>
Mit Hilfe der folgenden Befehle lassen sich die Python‐Version<br />
und das Betriebssystem ermitteln & anzeigen:
<code><pre>
>>> <b>import platform</b>
>>> <b>platform.python_version()</b>
</pre></code>
<code><pre>
>>> <b>platform.platform()</b>
</pre></code>
Mögliche Ausgaben:
<code><pre>
• 'Windows-XP-5.1.2600-SP3'
• 'Linux-4.19.0-13-amd64-x86_64-with-debian-10.7'
</pre></code>
</html>
<html>
<a href="https://python.quantecon.org/" target=_blank>QuantEcon :: Homepage ‐ Quantitative Economics with Python</a>
</html>
<html>
<!-- meta Zufallszahlen -->
Python has a built-in module that you can use to make random numbers.<br />
<br />
The random module has a set of methods:<br />
<table>
<tr><th>Method</th><th>Description</th></tr>
<tr><td>seed()</td><td>Initialize the random number generator</td></tr>
<tr><td>getstate() </td><td>Returns the current internal state of the random number generator</td></tr>
<tr><td>setstate() </td><td>Restores the internal state of the random number generator</td></tr>
<tr><td>getrandbits() </td><td>Returns a number representing the random bits</td></tr>
<tr><td>randrange() </td><td>Returns a random number between the given range</td></tr>
<tr><td>randint() </td><td>Returns a random number between the given range</td></tr>
<tr><td>choice() </td><td>Returns a random element from the given sequence</td></tr>
<tr><td>choices() </td><td>Returns a list with a random selection from the given sequence</td></tr>
<tr><td>shuffle() </td><td>Takes a sequence and returns the sequence in a random order</td></tr>
<tr><td>sample() </td><td>Returns a given sample of a sequence</td></tr>
<tr><td>random() </td><td>Returns a random float number between 0 and 1</td></tr>
<tr><td>uniform() </td><td>Returns a random float number between two given parameters</td></tr>
<tr><td>triangular() </td><td>Returns a random float number between two given parameters, <br />
you can also set a mode parameter to specify the midpoint between the two other parameters</td></tr>
<tr><td>betavariate() </td><td>Returns a random float number between 0 and 1 based on the Beta distribution (used in statistics)</td></tr>
<tr><td>expovariate() </td><td>Returns a random float number based on the Exponential distribution (used in statistics)</td></tr>
<tr><td>gammavariate() </td><td>Returns a random float number based on the Gamma distribution (used in statistics)</td></tr>
<tr><td>gauss() </td><td>Returns a random float number based on the Gaussian distribution (used in probability theories)</td></tr>
<tr><td>lognormvariate() </td><td>Returns a random float number based on a log-normal distribution (used in probability theories)</td></tr>
<tr><td>normalvariate() </td><td>Returns a random float number based on the normal distribution (used in probability theories)</td></tr>
<tr><td>vonmisesvariate() </td><td>Returns a random float number based on the von Mises distribution (used in directional statistics)</td></tr>
<tr><td>paretovariate() </td><td>Returns a random float number based on the Pareto distribution (used in probability theories)</td></tr>
<tr><td>weibullvariate() </td><td>Returns a random float number based on the Weibull distribution (used in statistics)</td></tr>
</table>
<h3>Links:</h3>
<ul>
<li><a href="https://www.w3schools.com/python/module_random.asp" target="_blank" rel="noreferrer noopener">W3Schools :: Python ‐ Random module</a></li>
</ul>
</html>
<html>
<ul>
<li><b>Modul:</b><br />
<code><pre><b>import re</b></pre></code></li>
<li><b>How to use regex flags</b><br />
Each regex flag can be activated in three different ways:
<ul>
<li>Activated with the long argument name (e.g. re.IGNORECASE).</li>
<li>Activated with the short argument name (e.g. re.I).</li>
<li>Activated with the inline name (e.g. "(?i)").</li>
</ul>
<table>
<tr><th><center>long</center></th><th>short</th><th>inline</th></tr>
<tr><td>re.VERBOSE</td><td>re.X</td><td>"(?x)"</td></tr>
<tr><td>re.IGNORECASE</td><td>re.I</td><td>"(?i)"</td></tr>
<tr><td>re.MULTILINE</td><td>re.M</td><td>"(?m)"</td></tr>
<tr><td>re.DOTALL</td><td>re.S</td><td>"(?s)"</td></tr>
</table></li>
<li><b>Anwendung</b><br />
Die folgenden Anweisungen sind äquivalent:
<code><pre><b>(a) re.match("dave", "Dave", flags=re.IGNORECASE)
(b) re.match("dave", "Dave", flags=re.I)
(c) re.match("(?i)dave", "Dave")
</b></pre></code></li>
<li><b>Bei folgenden Methoden können die Flags angewendet werden</b><br />
<table>
<tr><td>re.compile</td><td>re.search</td><td>re.match</d></tr>
<tr><td>re.fullmatch</td><td>re.split</td><td>re.findall</d></tr>
<tr><td>re.finditer</td><td>re.sub</td><td>re.subn</d></tr>
</table></li>
<!--li></li>
<li></li>
<li></li>
<li></li>
<li></li-->
</ul>
<h3>Links:</h3>
</ul>
<li><a href="https://johnlekberg.com/blog/2020-03-11-regex-flags.html" target=_blank>John Lekberg :: Blog - Regex flags</a></li>
<!--li></li>
<li></li>
<li></li>
<li></li-->
</ul>
</html>
<html>
<ul>
<li>Strings can be treated like list objects under some circumstances;</li>
<br />
<li>all sequences in Python support a feature called <b><em>"slicing"</em></b>;</li>
<br />
<li>this syntax includes a special case, where slicing a sequence with<br />
<code><b>"[::-1]"</b></code> produces a *reversed copy* of the input sequence;</li>
<br />
<li>all Python strings are sequences, so there is a quick and easy<br />
way to get a reversed copy of a string:
<code><pre>
>>> 'TURBO'[::-1]
'OBRUT'
</pre></code></li>
</ul>
</html>
<html>
spaCy is a free, open-source library for advanced Natural Language Processing (NLP) in Python.
It was specifically designed for production use and it's a great tool to build applications that process text and help to „understand“ large corpuses. <br />
(https://ep2020.europython.eu/talks/7TXpVro-15-things-you-should-know-about-spacy/)<br />
<br />
written in the programming languages Python and Cython.<br />
(Wikipedia - engl.)<br />
</html>
<html>
<b>Sphinx</b> ist ein in Python geschriebenes Programm zum <br />
einfachen Erstellen von (umfangreichen) Dokumentationen. <br />
<br />
Das Programm entstammt zwar dem Python-Umfeld und wird<br />
dort auch häufig eingesetzt, ist aber keineswegs darauf be‐<br />
schränkt. Weiterhin sind zur Nutzung von Sphinx keine Python‐<br />
Kenntnisse notwendig.<br />
<br />
Dokumentationen, welche mit Sphinx generiert werden, be‐<br />
stehen aus ein oder mehreren einfachen Textdateien, wobei<br />
reStructuredText (kurz: reST) als Auszeichnungssprache zum<br />
Einsatz kommt. Als Zielformate beherrscht Sphinx standardmäßig<br />
HTML und LaTeX, bei Installation der entsprechenden Pakete<br />
können auch PDF-Dokumente erzeugt werden
<h3>Installation</h3>
<h4>... aus den offiziellen Paketquellen:</h4>
Sphinx ist in den offiziellen Paketquellen enthalten und kann<br />
über das Paket
<code><pre>
python3-sphinx
</pre></code>
<b>Paketliste zum Kopieren:</b>
<code><pre>
sudo apt-get install python3-sphinx
sudo aptitude install python3-sphinx
</pre></code>
installiert werden.<br />
<br >
<h4>... via pip & in einem <em>virtual environment</em></h4>
Bei einer Installation in einer <em>virtual environment</em> sieht es wie folgt aus:
<code><pre>
(exercise_05) mueller@Debian-Laptop:~/programming/python/PythonWorkout/exercise_05$ <b>pip install -U sphinx</b>
Collecting sphinx
Downloading Sphinx-3.2.1-py3-none-any.whl (2.9 MB)
|‐| 2.9 MB 1.9 MB/s
Collecting imagesize
Downloading imagesize-1.2.0-py2.py3-none-any.whl (4.8 kB)
Collecting sphinxcontrib-qthelp
Downloading sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl (90 kB)
|‐| 90 kB 761 kB/s
Collecting sphinxcontrib-devhelp
Downloading sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl (84 kB)
|‐| 84 kB 279 kB/s
Requirement already satisfied, skipping upgrade: setuptools in ./lib/python3.8/site-packages (from sphinx) (50.0.0)
Collecting packaging
Downloading packaging-20.4-py2.py3-none-any.whl (37 kB)
Collecting alabaster<0.8,>=0.7
Downloading alabaster-0.7.12-py2.py3-none-any.whl (14 kB)
Collecting babel>=1.3
Downloading Babel-2.8.0-py2.py3-none-any.whl (8.6 MB)
|‐| 8.6 MB 1.9 MB/s
Collecting sphinxcontrib-jsmath
Downloading sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl (5.1 kB)
Collecting Jinja2>=2.3
Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
|‐| 125 kB 1.7 MB/s
Collecting docutils>=0.12
Downloading docutils-0.16-py2.py3-none-any.whl (548 kB)
|‐| 548 kB 1.7 MB/s
Collecting requests>=2.5.0
Downloading requests-2.24.0-py2.py3-none-any.whl (61 kB)
|‐| 61 kB 36 kB/s
Collecting snowballstemmer>=1.1
Downloading snowballstemmer-2.0.0-py2.py3-none-any.whl (97 kB)
|‐| 97 kB 462 kB/s
Collecting sphinxcontrib-serializinghtml
Downloading sphinxcontrib_serializinghtml-1.1.4-py2.py3-none-any.whl (89 kB)
|‐| 89 kB 582 kB/s
Collecting sphinxcontrib-htmlhelp
Downloading sphinxcontrib_htmlhelp-1.0.3-py2.py3-none-any.whl (96 kB)
|‐| 96 kB 528 kB/s
Collecting Pygments>=2.0
Downloading Pygments-2.6.1-py3-none-any.whl (914 kB)
|‐| 914 kB 1.7 MB/s
Collecting sphinxcontrib-applehelp
Downloading sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl (121 kB)
|‐| 121 kB 1.7 MB/s
Collecting six
Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting pyparsing>=2.0.2
Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
‐| 67 kB 250 kB/s
Collecting pytz>=2015.7
Downloading pytz-2020.1-py2.py3-none-any.whl (510 kB)
|‐| 510 kB 1.7 MB/s
Collecting MarkupSafe>=0.23
Downloading MarkupSafe-1.1.1-cp38-cp38-manylinux1_x86_64.whl (32 kB)
Collecting chardet<4,>=3.0.2
Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
|‐| 133 kB 1.7 MB/s
Collecting certifi>=2017.4.17
Downloading certifi-2020.6.20-py2.py3-none-any.whl (156 kB)
|‐| 156 kB 1.7 MB/s
Collecting idna<3,>=2.5
Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
|‐| 58 kB 435 kB/s
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
Downloading urllib3-1.25.10-py2.py3-none-any.whl (127 kB)
|‐| 127 kB 1.7 MB/s
Installing collected packages: imagesize, sphinxcontrib-qthelp, sphinxcontrib-devhelp, six, pyparsing, packaging, alabaster, pytz, babel, sphinxcontrib-jsmath, MarkupSafe, Jinja2, docutils, chardet, certifi, idna, urllib3, requests, snowballstemmer, sphinxcontrib-serializinghtml, sphinxcontrib-htmlhelp, Pygments, sphinxcontrib-applehelp, sphinx
Successfully installed Jinja2-2.11.2 MarkupSafe-1.1.1 Pygments-2.6.1 alabaster-0.7.12 babel-2.8.0 certifi-2020.6.20 chardet-3.0.4 docutils-0.16 idna-2.10 imagesize-1.2.0 packaging-20.4 pyparsing-2.4.7 pytz-2020.1 requests-2.24.0 six-1.15.0 snowballstemmer-2.0.0 sphinx-3.2.1 sphinxcontrib-applehelp-1.0.2 sphinxcontrib-devhelp-1.0.2 sphinxcontrib-htmlhelp-1.0.3 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.3 sphinxcontrib-serializinghtml-1.1.4 urllib3-1.25.10
(exercise_05) mueller@Debian-Laptop:~/programming/python/PythonWorkout/exercise_05$
</pre></code>
<h3>Dokumentenerstellung</h3>
Wer aus Sphinx heraus direkt noch fertige PDF-Dokumente <br />
generieren möchte, der benötigt noch einen Teil der TeX <br />
Live-Pakete:
<ul>
<li>texlive-latex-recommended</li>
<br />
<li>texlive-latex-extra</li>
<br />
<li>texlive-fonts-recommended</li>
</ul>
<b>Paketliste zum Kopieren:</b>
<code><pre>
sudo apt-get install texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
sudo aptitude install texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
</pre></code>
Die drei Paket sind recht groß. Es werden 824 MB heruntergeladen; <br />
für die Installation werden ca. 1,4 GB Plattenplatz benötigt.<br />
<br />
<h3>Hinweis:</h3>
Die Tex-Live-Pakete sind nur notwendig, wenn direkt aus Sphinx <br />
heraus PDF-Dokumente generiert werden sollen. Für die Erstellung<br />
von LaTeX-Dokumenten werden diese nicht benötigt.
<h3>Benutzung</h3>
Zur Erstellung einer Dokumentation muss zuerst deren Grund‐<br />
gerüst angelegt werden. Dazu bietet Sphinx einen englischen, <br />
text-basierten Assistenten, welcher über den Befehl:
<code><pre>
sphinx-quickstart
</pre></code>
aufgerufen wird. Danach werden einige Fragen gestellt.<br />
<br />
Die erste Frage ist nach dem Installationsverzeichnis. Hier kann<br />
ein beliebiges Verzeichnis gewählt werden. Existiert dieses nicht,<br />
wird es angelegt. <br />
<br />
In der zweiten Frage wird gefragt, ob für die Quelldokumente und<br />
die erzeugten Dokumente ein jeweils eigenes Verzeichnis angelegt<br />
werden soll. Für die Übersichtlichkeit ist dies besser, deshalb ist <br />
hier "yes" die bessere Wahl (im Folgenden wird auch davon ausge‐<br />
gangenen, dass dies der Fall ist). Die meisten weiteren Fragen kön‐<br />
nen einfach mit dem Vorgabewert durch Drücken von “Carriage-Return“<br />
bestätigt werden.<br />
<br />
Bei der Frage nach dem Projektnamen, dem Autor und der Version<br />
müssen jedoch Daten eingegeben werden. <br />
<br />
Die letzte Frage ist nach einem "Make File". Da dies den Befehlsauf‐<br />
ruf zur Generierung der Dokumentation erheblich verkürzt, ist hier<br />
die Auswahl von "yes" zweckmäßig, aber natürlich keine Pflicht.<br />
<br />
Anschließend legt Sphinx alle benötigten Dateien und Verzeichnisse<br />
an. Wichtig sind dabei zwei Dateien, welche sich im Verzeichnis <br />
source befinden:
<ol>
<li><b>File index.rst :: </b><br />
ist der Ausgangspunkt für die Dokumentation. <br />
Diese Datei muss für jedes Projekt existieren.</li>
<li><b>File conf.py :: </b><br />
enthält die Konfiguration für das gesamte Projekt. <br />
Soll diese geändert werden, so kann diese Datei <br />
mit einem Editor editiert werden. Details zum Auf‐<br />
bau der Datei sind in der offiziellen Dokumentation<br />
zu finden.</li>
</ol>
<h3>Dokumentation erstellen</h3>
Wie bereits erwähnt, besteht die Dokumentation minimal aus<br />
der Datei index.rst. Bei kurzen Dokumentationen ("single page<br />
docs") kann diese komplett in der Datei hinterlegt werden, bei <br />
größeren Dokumentationen enthält die Datei die Liste der Doku‐<br />
mente, aus denen die Gesamtdokumentation zusammengesetzt<br />
wird.<br />
<br />
Alle Dateien sind normale Textdateien, welche mit einem Text‐<br />
editor angelegt und bearbeitet werden können. Die Dateinamen<br />
müssen keiner bestimmten Konvention folgen, aber die Endung .rst<br />
haben. Weiterhin müssen sich alle Dateien im Projektverzeichnis<br />
befinden (hier also source).<br />
<br />
Der Inhalt der Dokumente wird in der Auszeichnungssprache Re‐<br />
StructuredText geschrieben, wobei neben der üblichen ReST Syntax<br />
auch Sphinx-spezifische Erweiterungen genutzt werden können.<br />
<br />
Besteht die Dokumentation aus mehreren Dokumenten, so sind <br />
diese in der Datei index.rst aufzuführen, und zwar unterhalb der<br />
Toctree-Direktive. Besteht eine Dokumentation z.B. aus den Da‐<br />
teien intro.rst, main.rst und outro.rst, dann sollte die Hauptdatei<br />
so aussehen:
<code><pre>
1 .. toctree::
2 :maxdepth: 2
3
4 intro
5 main
6 outro
</pre></code>
:maxdepth: bestimmt dabei die Tiefe des Inhaltsverzeichnisses<br />
(welches Sphinx automatisch generiert); der Wert kann natürlich<br />
auch z.B. 1 oder 3 sein.
<h3>Dokumente generieren</h3>
Sind alle rst-Dokumente fertig geschrieben, kann die Dokumentation<br />
generiert werden. Dies kann auf zwei Arten geschehen.<br />
<br />
Hat man beim Anlegen des Projekts ein Make-File angelegt, dann<br />
kann man nach dem Wechsel ins Projektverzeichnis die Dokumen‐<br />
tation wie folgt bauen:
<code><pre>
make html # für HTML als Zielformat
make latex # für LaTeX als Zielformat
make latexpdf # für PDF als Zielformat
</pre></code>
Wobei der letzte Befehl nur funktioniert, wenn die Tex-Live-Pakete<br />
installiert sind.<br />
<br />
Der "universellere" Befehl ist der voll manuelle Anstoß des Baus <br />
der Dokumentation, die allgemeine Syntax lautet wie folgt:
<code><pre>
sphinx-build -b BUILDER QUELLE ZIEL DATEI(EN)
</pre></code>
BUILDER ist einer der Builder, welche Sphinx an Bord hat. Wird <br />
-b nicht angegeben, wird HTML als Zielformat genutzt. Eine Über‐<br />
sicht über alle Builder ist in der offiziellen Dokumentation zu finden.<br />
<br />
QUELLE ist das Verzeichnis, wo die Datei conf.py liegt. Weiter‐<br />
hin wird hier nach den .rst-Dateien gesucht, wenn keine DATEI(EN) <br />
angegeben werden. <br />
<br />
ZIEL ist das Zielverzeichnis, in dem die generierten Dokumente ge‐<br />
speichert werden. Hat man beim Anlegen des Projekts das Trennen<br />
von Quell- und Zieldokumenten gewählt, dann empfiehlt sich für ZIEL<br />
das Verzeichnis build. Innerhalb dieses Verzeichnisses gibt es dann<br />
wiederum Unterverzeichnisse für die verschiedenen Ausgabeformate,<br />
also html, latext usw. PDF-Dateien landen auch im Verzeichnis latex.<br />
<br />
Die Angabe von DATEI(EN) ist optional. Werden hier keine Dateien<br />
angegeben, werden alle rst-Dateien aus dem Quellverzeichnis heran‐<br />
gezogen. Werden Dateien angegeben, werden nur diese für den Bau<br />
der Dokumentation genutzt.<br />
<br />
Sphinx "bemerkt", ob schon fertige Zieldateien für Quelldateien vor‐<br />
handen sind und baut diese nicht neu, sofern keine inhaltlichen Än‐<br />
derungen vorliegen. Dies kann aber über die Option -a erzwungen<br />
werden.<br />
<br />
sphinx-build kennt noch eine Reihe weitere Optionen, welch in der <br />
Man-Page erklärt sind.
<h3>Weitere Funktionen</h3>
Die hier beschriebenen Funktionen von Sphinx stellen nur dessen<br />
Grundfunktionalität dar, das System kann noch weit mehr. Ein voll‐<br />
ständiger Überblick ist in der offiziellen Dokumentation zu finden, <br />
siehe Abschnitt Links.
<h3>Weitere Programme</h3>
Neben den hier beschriebenen Programmen aus dem Sphinx-Paket<br />
werden noch zwei weitere installiert:
<ul>
<li><b>sphinx-apidoc: </b><br />
dient zu automatisierten API-Dokumentation von kompletten Python‐<br />
Modulen, offizielle Dokumentation </li>
<br />
<li><b>sphinx-autogen: </b><br />
offizielle Dokumentation</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.ubuntuusers.de/Sphinx/" target=_blank>Ubuntu-Users :: Sphinx</a></li>
<li><a href="https://de.wikipedia.org/wiki/Sphinx_%28Software%29" target=_blank>Wikipedia :: Sphinx (Software)</a></li>
<li><a href="https://www.sphinx-doc.org/en/master/" target=_blank>Sphinx :: Homepage</a></li>
<li><a href="https://www.mathematik.hu-berlin.de/~ccafm/teachingBasic/allg/python_sphinx.shtml" target=_blank>HU Berlin - Mathematik :: Sphinx</a></li>
</ul>
</html>
<html>
<h3>How to update Spyder on Anaconda</h3>
f you want to update Spyder in the <i><b>root</b></i> environment, then<br />
<code><pre>cd ~/anaconda/bin<br />
./conda update spyder</pre></code> works for me.<br />
<br />
If you want to update Spyder for a <b>virtual environment</b> <br />
you have created (e.g., for a different version of Python), then <br />
<code><pre>./conda update -n <i><b>$ENV_NAME</b></i> spyder </pre></code><br />
where <i><b>$ENV_NAME</b></i> is your environment name.<br />
<h3>Link:</h3>
<a href="https://stackoverflow.com/questions/41849718/how-to-update-spyder-on-anaconda" target=_blank>StackOverflow :: Updating Spyder</a>
</html>
<html>
<ul>
<li><h3>pytest</h3>
s. <a href="https://blog.ionelmc.ro/2014/05/25/python-packaging/" target=_blank><i>ionel's codelog</i> :: Packaging a python library</a></li>
<li><h3>nose</h3>
s. <a href="https://blog.ionelmc.ro/2014/05/25/python-packaging/" target=_blank><i>ionel's codelog</i> :: Packaging a python library</a></li>
<li><h3>tox</h3>
s. <a href="https://tox.readthedocs.io/en/latest/" target=_blank>Tox - Dokumente</a>
</li>
<li><h3>trial</h3>
<ul>
<li>Owner: Twisted Matrix Lab</li>
<li>it's an unit testing system, an extension of Python's 'unittest' module. </li>
<li><a href="https://twistedmatrix.com/trac/wiki/TwistedTrial" target=_blank>Twisted Matrix Lab - Trial :: Homepage</a></li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li> “Decorator“ is a utility that accepts a callable as an argument and returns a callable.</li>
<li> “We love dictionaries and we use them wherever we can.“</li>
<li> Use pickle when args are not hashable.</li>
<li> Decorator can be used to modify classes easily and conveniently.</li>
</ul>
<h3>Link:</h3>
<a href="https://www.youtube.com/watch?v=MjHpMCIvwsY&__s=wcwhzfwkm49ndrnttkud" target=_blank>Youtube :: Reuven M. Lerner - Practical decorators - PyCon 2019 </a> → Kommentar von You Wang
</html>
<html>
<! --Abschnitt 1 ----------------------------------------------------------------------------------------------------------------------------------------------------------- />
<h3>Selbsterstellte Fragen zum Thema “Python“</h3>
<ul>
<li><a href="https://data-flair.training/blogs/python-data-structures-tutorial/" target=_blank>DataFlair training :: Data Structures (list, set, tuple, dictionary)</a></li>
</ul>
<details><summary><em>Fragenliste</em></summary>
<ol>
<li><details><!--001-->
<summary>Worauf muß man bei der <b>input()</b>-Funktion achten?</summary>
<br />
Die <b>input()</b>-Funktion nimmt auch einen leeren String entgegen, was<br />
beim Casten (in Zahlen) zu einer Fehlermeldung führt. Ein leerer<br />
String kann von der <code><b>int()</b></code> bzw. <code><b>float()</b></code>‐Funktion <u>nicht</u> gecastet <br />
werden. Dies wird mit einem Fehler (z.B. <code><b>ValueError: could not <br />
convert string to float</b></code> bzw. <code><b>ValueError: invalid literal <br />
for int() with base 10: ' ')</b></code> abbrechen. Denn <code><b>int()</b></code> bzw. <br />
<code><b>float()</b></code> erwartet einen String, der in eine Zahl konvertiert werden<br />
soll. Der leere String kann <u>nicht</u> in eine Zahl konvertiert werden.<br />
<br />
Das kann mittels einer try‐except‐Anweisung abgefangen werden:
<code><pre>
[ … ]
eingabe = input("Eingabe: ")
try:
value = int(eingabe)
except (ValueError) as e:
print(f'ValueError: {e}')
</pre></code>
<br />
</details></li>
<li><details><!--002-->
<summary>Wie lautet die print-Anweisung?</summary>
<code><b>print( "<i>string</i>" )</b></code><br />
<br />
besser die <em>f-strings</em> benutzen: <code><b>print(f'<i>text</i> <em>{var}</em>')</b></code><br />
<br />
</details></li>
<li><details><!--003-->
<summary>Defaultmäß fügt die print-Anweisung ein “\n“ <br />
an den auszugebenen String. Welche Option ändert das?</summary>
<br />mit Hilfe der Option "<code><b>end</b></code>":<br />
<code><b>print( "<i>string</i>", end=“ … “ )</b></code><br />
<br />
</details></li>
<li><details><!--004-->
<summary>Die print-Anweisung hat weitere Optionen. Wie lauten sie?</summary>
<br />
Die Syntax ist:
<code><pre>
print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False)
</pre></code>
<ol>
<li>Option “<code><b>sep</b></code>“</li>
<li>Option “<code><b>file</b></code>“</li>
<li>Option “<code><b>flush</b></code>“</li>
</ol>
<br />
<details><summary>Option “<code><b>sep</b></code>“ :</summary><br />
Angabe eines Separator- / Trennzeichen, mit dem<br />
die übergebenen Strings verbunden werden<br />
Beispiele:
<code><pre>
#code for disabling the softspace feature
print('G','F','G', sep='')
#for formatting a date
print('09','12','2016', sep='-')
#another example
print('pratik','geeksforgeeks', sep='@')
<b>Output:</b>
GFG
09-12-2016
pratik@geeksforgeeks
</pre></code>
<br />
</details>
<details><summary>Option “<code><b>flush</b></code>“:</summary>
<br />
mögliche Werte: True, False <em>(default)</em><br />
to force the print function to output to the screen (“to flush it“)<br />
<br />
<b>Links:</b>
<ul>
<em><li>https://stackoverflow.com/questions/230751/how-to-flush-output-of-print-function</li>
<li>https://www.includehelp.com/python/flush-parameter-in-python-with-print-function.aspx</li>
<li>https://docs.python.org/3/library/functions.html#print</em></li>
</ul><br />
</details>
<br />
</details></li>
<li><details><!--005-->
<summary>Definition einer Zuweisung</summary>
<br />
Beispiele:<br />
<code><b>intVar = 5</b></code><br />
<code><b>floatVar = 0.8</b></code><br />
<code><b>stringVar = 'String'</b></code><br />
<br />
</details></li>
<li><details><!--006-->
<summary>Was ist bei String-Zuweisungen zu beachten?</summary>
<br />
Die normale Zuweisung ist:<br />
<code><b>stringVar = 'String'</b></code>, dh. mit einem Apostroph. <br /><br />
Ist ein Apostroph im <code><b>String</b></code>, dann muß dieses mit<br />
einem Backslash maskiert werden:<br />
<code><b>stringVar = 'The Geek\'s Stuff'</b></code><br />
<br />
Alternativ können auch doppelte Anführungszeichen<br />
verwendet werden:<br />
<code><b>stringVar = “The Geek's Stuff“</b></code><br />
<br />
</details></li>
<li><details><!--007-->
<summary>Mathematische Operatoren</summary>
<br />
“+ | - | * | / “ :: <br />
<code><b>var_a + var_b</b></code><br />
<code><b>var_a - var_b</b></code><br />
<code><b>var_a * var_b</b></code><br />
<code><b>var_a / var_b</b></code> <em>(float‐Division)</em><br />
<br />
“**“ (Exponentiation, Potenzieren) :: <br />
<code><b>print( 2 ** 3 ) </b></code> ⇒ 8<br />
<br />
“%“(Modulo-Operator) :: <br />
<code><b>print( 17 % 3 ) </b></code> ⇒ 2, da 3 * 5 = 15 + 2 ist.<br />
<br />
“//“ (ganzzahlige Division, Nachkommastellen werden abgeschnitten)<br />
<code><b>print( 17 // 3 ) </b></code> → 5<br />
<br />
</details></li>
<li><details><!--008-->
<summary>Wie lautet die Syntax einer Funktion?</summary>
<br />
<code><b>def <i>fctName(param1, param2, …)</i>:<br />
…<i>Anweisungen</i> …</b></code><br />
<br />
<u><em>Immer auf die Einrückungen achten!</em></u><br />
<br />
</details></li>
<li><details><!--009-->
<summary>Welche Module kennst Du?</summary>
<br />
<table>
<tr><td><code><b>os</b></code></td><td><code><b>dis</b></code> (Modul zum Disassembling)</td></tr>
<tr><td><code><b>shutil</b></code></td><td><code><b>http.server</b></code></td></tr>
<tr><td><code><b>pickle</b></code></td><td><code><b>doctest</b></code></td></tr>
<tr><td><code><b>calendar</b></code></td><td><code><b>collections</b></code> (Container Data Types)</td></tr>
<tr><td><code><b>datetime</b></code></td><td></td></tr>
<tr><td><code><b>sys</b></code></td><td></td></tr>
<tr><td><code><b>random</b></code></td><td></td></tr>
<tr><td><code><b>itertools</b></code></td><td></td></tr>
<tr><td><code><b>math</b></code></td><td></td></tr>
<tr><td><code><b>zipfile</b></code></td><td></td></tr>
<tr><td><code><b>pathlib</b></code></td><td></td></tr>
<tr><td><code><b>getpass</b></code> (Password-Modul)</td><td></td></tr>
<tr><td><code><b> … </b></code></td><td></td></tr>
</table><br />
<h3>Links:</h3>
<ul>
<li><a href="https://pymotw.com/3/" target=_blank>PyMOTW - Python Module of the week</a></li>
</ul>
<br />
</details></li>
<li><details><!--010-->
<summary>Welche Python-Objekte sind <b>mutable</b> <br />
und welche sind <b>immutable</b>?</summary>
<br />
<h5>mutable:</h5>
<ul>
<li><b>List</b> :: eckige Klammern, <code><b>[ … ]</b></code></li>
<li><b>Set</b> :: geschweifte Klammern, <code><b>{ … }</b></code> </li>
<li><b>Dictionary</b> :: geschweifte Klammern, mit k,v ‐Wertepaare, <code><b>{ key: value, … }</b></code></li>
</ul><br />
<h5>immutable:</h5>
<ul>
<li><b>None</b></li>
<li><b>boolean</b></li>
<li><b>int</b></li>
<li><b>float</b></li>
<li><b>string</b></li>
<li><b>tuple</b>, hier reichen die Komma-Zeichen, die Klammern sind nicht notwendig</li>
<br />
</details></li>
<li><details><!--011-->
<summary>Woran kann ich erkennen, ob eine Liste, <br />
ein Set / Menge oder ein Dictionary vorliegt?</summary>
<br />
Man kann an der Art der Klammern, die Datenstrukturen voneinander unterscheiden:
<ul>
<li><b>List</b> :: eckige Klammern, <code><b>[ … ]</b></code></li>
<li><b>Set</b> :: geschweifte Klammern, <code><b>{ … }</b></code></li>
<li><b>Dictionary</b> :: geschweifte Klammern, <code><b>{ “<em>key</em>“ : “<em>value</em>“, … }</b></code><br />
<br />Aber da <em>dictionaries</em> key‐value ‐Paare statt Einzelwerte enthalten, sind sie von Mengen (<em>sets</em>) zu unterscheiden.</li>
</ul>
<br />
</details></li>
<li><details><!--012-->
<summary>Was ist eine <b>Generator-Funktion?</b></summary>
<br />
Das ist eine Funktion, die ein Iterator-Objekt zurückgibt. Dazu wird<br />
statt einer <code><b>return</b></code>‐Anweisung eine <code><b>yield</b></code>‐Anweisung verwendet.<br />
<br />
Beispiel:<br />
Die folgende Generator-Funktion liefert einen Generator für Quadrat‐<br />
zahlen von 0 bis n−1:
<code><pre>
def generiereZahlen(n):
for i in range(n):
yield i*i
</pre></code><br />
Mit dem Aufruf
<code><pre>
next(i)
</pre></code>
wird ‐ somit auf Anforderung ‐ der nächste Wert berechnet und <br />
zurückgegeben.<br />
<br />
<h3>Links:</h3>
<a href="https://www.pythonpool.com/python-next/" target=_blank>PythonPool :: next ‐ Funktion</a>
<br />
<br />
</details></li>
<li><details><!--013-->
<summary>Welche Funktionen / Methoden hat jeder <b>Iterator</b>?</summary>
<br />
<ul>
<li><code><b>__iter__()</b></code></li>
<li><code><b>__next__()</b></code></li>
</ul>
<br />
Diese beiden Methoden muß ein Objekt besitzen, damit über dieses Objekt<br />
iteriert werden kann.<br />
<br />
Diese Methoden definieren zusammen das sog. <b>Iterator‐Protokoll</b>.<br />
<br />
</details></li>
<li><details><!--014-->
<summary>Wie wird ein <b>Dictionary</b> angelegt / erzeugt?</summary>
<br />
<ul>
<li><code><b><i>name_of_dictionary</i> = {}</b></code></li>
bzw.
<li><code><b><i>name_of_dictionary</i> = dict()</b></code></li>
</ul>
<br />
</details></li>
<li><details><!--015-->
<summary>Wie werden Daten einem <b>Dictionary</b> hinzugefügt?</summary>
<br />
<ul>
<li><code><b><i>name_of_dictionary</i>['key'] = 'wert'</b></code></li>
</ul>
<br />
</details></li>
<li><details><!--016-->
<summary>Wie wird über ein <b>Dictionary</b> iteriert?</summary>
<br />
<ul>
<li><pre><b>for k, v in <i>name_of_dictionary</i>.items():<br />
print(k,v)</b></pre></li>
</ul>
<br />
</details></li>
<li><details><!--017-->
<summary>Statement zur Ausgabe der <b>Dictionary</b>-Keys.</summary>
<br />
<ul>
<li><pre><b> <i>name_of_dictionary</i>.keys()</b></pre></li>
</ul>
<br />
</details></li>
<li><details><!--018-->
<summary>Wie wird überprüft, ob ein bestimmter Key in<br />
einem <b>Dictionary</b> vorhanden ist?</summary>
<br />
<ul>
<li><pre><b>'key' in <i>name_of_dict</i></b></pre></li>
bzw.
<li><pre><b>'key' not in <i>name_of_dict</i></b></pre></li>
</ul>
<br />
</details></li>
<li><details><!--019-->
<summary>Worin unterscheiden sich die Anweisungen<br />
<pre> <code>== , !=</code></pre> und die Anweisungen <pre> is, is not</pre> voneinander?</summary>
<br />
<ul>
<li><pre><b>==, !=</b> :: <br />
sie vergleichen den <b>Wert</b> eines Objektes</pre></li>
<br />
<li><pre><b>is, is not</b> :: <br />
sie überprüfen, ob beide Variablen <b> auf die gleichen Objekte</b> (im System) verweisen.</pre>
<a href="https://www.tutorialspoint.com/What-is-difference-in-Python-operators-and-is-not" target="_blank" rel="noreferrer noopener">Tutorialspoint.com :: Difference between Python operators and <em>is, is not</em></a> :: <br />
[ … ] Whereas “is not“ operator checks whether <b>id()</b> of two objects is same or not. If same, it returns false and if not same, it returns true</li>
</ul>
<br />
</details></li>
<li><details><!--020-->
<summary>Welche Datentypen zur Darstellung von <b>endlichen Mengen</b> bietet Python an?<br />
Worin unterscheiden sie sich?</summary>
<br />
<ul>
<li>Die Datentypen
<ol><li><code><b>set</b></code></li> und <li><code><b>frozenset</b></code></li>
</ol></li>
<br />
<li>Sie unterscheiden sich darin, daß Objekte vom Typ <code><b>frozenset</b></code>, <br />
so wie Tupel oder Strings, <b><u>nicht</u></b> veränderbar sind, dh. sie sind<br />
<em>immutable</em>. Man kann aus ihnen keine Elemente entfernen und </br />
ihnen keine hinzufügen. Es werden immer Kopien vom Objekt<br />
erzeugt.<br />
</li>
</ul>
<br />
</details></li>
<li><details><!--021-->
<summary>Was ist der <b>walrus operator</b>?</summary>
<br />
<ul>
<li>In Python sind Zuweisungen <b>keine</b> Ausdrücke!</li>
<br />
<li> → daher funktioniert sowas nicht:
<code><pre>…
while s = input('Enter …)
…</pre></code></li>
<br />
<li>Daher wurde mit Python 3.8 der <b>walrus operator</b> (<code><b>:=</b></code>) eingeführt:<br />
<code><pre>…
while s := input('Enter …)
…</pre></code>
(ausgesprochen: “s Walrus input“, weil die Zeichen <code><b>:=</b></code> wie die Augen <br />
und die Stoßzähne eines Walrosses aussehen.)</li>
<br />
<li>Er wird auch als <em>Zuweisungsoperator</em> bezeichnet.</li>
</ul>
<br />
</details></li>
<li><details><!--022-->
<summary>Worin unterscheiden sich die beiden Methoden <code><b>sort()</b></code> und <code><b>sorted()</b></code>?</summary>
<br />
<ul>
<li><code><b>sort()</b></code> :: die Sortierung erfolgt <em>in-place</em>, das originale Objekt bleibt erhalten, die Positionen werden getauscht;</li>
<br />
<li><code><b>sorted()</b></code> :: es wird ein neues Objekt erzeugt; eine Zuweisung notwendig;</li>
</ul>
<br />
To sort iterables in Python you can either use:
<ol>
<li>the sorted() built-in function, </li>
<li>or .sort() method. </li>
</ol>
<br />
<b>Aufrufe:</b>
<ol>
<li><code>sorted(<Iterable> [,<Params>])</code><br />
# da dies eine Funktion ist, braucht<br />
# das Objekt keine Sortiermöglichkeit bereitstellen
</li>
<br />
<li><code><em><Iterable></em>.sort(<Params>)</code><br />
# das Objekt stellt die Sortiermöglichkeit selbst bereit
</li>
</ol>
<br />
You can pass in the optional parameter:<br />
<ul>
<li>key :: to specify how to sort the iterable</li>
<li>reverse :: to reverse the order</li>
</ul>
<br />
<a href="https://realpython.com/lessons/sorted-and-sort-python-overview/" target=_blank>RealPython :: Sorted & sort ‐ Overview</a>
<br />
</details></li>
<li><details><!--023-->
<summary>Worin unterscheiden sich <b>comments</b> und <b>docStrings</b>?</summary>
<br />
<ul>
<li><b>comments</b> :: <br />
Comments are typically used to explain tricky or non-obvious portions of the code,<br />
and leave FIXME/TODO notes.<br />
<br />
For example,
<code><pre>
def foo_bar(*args):
<em># TODO: use sets inplace of list because X </em>
.. code here
</pre></code>
</li>
<br />
<li><b>docStrings</b> :: <br />
<p>
Docstrings are like the super enhanced, more logical and useful version of comments.
</p><p>
Docstrings, on the other hand do a lot of things, like:
</p><p>
Provide a detailed description of a function, class, or module. These descriptions<br />
are what is returned by Python when you type <code><b>help(object)</b></code> or <code><b>object.__doc__</b></code><br />
in the interpretor session.<br />
<br />
Allow you to write tests. Using doctest standard library module, you can embed <br />
small tests in your docstrings which can be pretty handy for fast test-driven de‐<br />
velopment style. More so, if you are writing a bunch of scripts with independent<br />
functions.<br />
</p>
<h3>Links:</h3>
<ul>
<li><a href="https://www.quora.com/What-is-the-difference-between-comments-and-docstrings-in-python?share=1" target=_blank>Quora.com</a></li>
<li><a href="https://stackoverflow.com/questions/19074745/docstrings-vs-comments" target=_blank>StackOverflow</a></li>
</ul>
</li>
</ul>
<br />
</details></li>
<li><details><!--024-->
<summary>Was ist ein “<b>hashable type</b>“?</summary>
<br />
From the Python glossary:
<p>
An object is hashable if it has a hash value which never changes during its <br />
lifetime (it needs a __hash__() method), and can be compared to other objects<br />
(it needs an __eq__() or __cmp__() method). Hashable objects which compare<br />
equal must have the same hash value.
</p>
<p>
Hashability makes an object usable as a dictionary key and a set member, <br />
because these data structures use the hash value internally.
</p>
A characteristic of a Python object to indicate whether the object has a hash<br />
value, which allows the object to serve as a key in a dictionary or an element <br />
in a set.<br />
(<a href="https://betterprogramming.pub/3-essential-questions-about-hashable-in-python-33e981042bcb"
target="_blank" rel="noreferrer noopener">betterprogramming.pub :: 3 essential questions about hashable in Python</a>)<br />
<p>
All of Python's immutable built-in objects are hashable, while no mutable <br />
containers (such as lists or dictionaries) are. Objects which are instances<br />
of user-defined classes are hashable by default; they all compare unequal,<br />
and their hash value is their id(). (<a href="https://stackoverflow.com/questions/14535730/what-does-hashable-mean-in-python" target=_blank>Link</a>)
</p>
<h3>weitere Links:</h3>
<ul>
<li><a href="https://medium.com/better-programming/3-essential-questions-about-hashable-in-python-33e981042bcb" target=_blank>medium.com :: Better programming : 3 Essential Questions About Hashable in Python</a></li>
<li><a href="https://code-examples.net/en/q/28c310" target=_blank>Code Examples :: unhashable - what is a hashable type in python </a></li>
</ul>
<br />
<br />
</details></li>
<li><details><!--025-->
<summary>Was ist der Unterschied zwischen <code><b>import <module></b></code> und <code><b>from <module> import <method></b></code>?</summary>
<br />
#TODO
<br />
</details></li>
<li><details><!--026-->
<summary>Was ist die Ursache / der Grund für die folgende Fehlermeldung:
<code><pre>TypeError: 'module' object is not callable </pre></code>
Und wie lässt sie sich auflösen?</summary>
<br />
Die Fehlermeldung erscheint, da statt einer Klasse ein Modul<br />
importiert werden soll. Das ist darauf zurückzuführen, daß der<br />
Modul‐Name und der Klassen‐Name übereinstimmen.<br />
<br />
If you have a class MyClass in a file called MyClass.py , then<br />
you should write:<br />
<code><pre>
from MyClass import MyClass
</pre></code>
<br />
<a href="http://www.net-informations.com/python/iq/typeerror.htm" target=_blank>TypeError - Erklärung</a>
<br />
</details></li>
<li><details><!--027-->
<summary>Welche Aufgaben hat der (einzelne) Underscore, "_"?</summary>
<br />
<ol>
<li>als sog. <em>Wegwerf‐Variable</em>, wenn die Werte nicht benötigt werden:
<code><pre>
_, *others, _ = [ 'first', 'second', 'third', 'fourth' ]
print(f'{_}')
print(f'{others}')
</pre></code>
→ Ausgabe:
<code><pre>
fourth
[ 'second', 'third' ]
</pre></code></li>
<li>ab Python Version 3.6 ::<br />
in Zahlen zur Trennung von Ziffern (als Trennzeichen):
<code><pre>
dec_base = 1_000_000
bin_base = 0b_1111_0000
hex_base = 0x_1234_abcd
</pre></code>
Auf die Ausgabe und die weitere Verwendung (z.B. in Berechnungen) hat dieses<br />
Feature keinen Einfluss:
<code><pre>
print(dec_base) # 1000000
print(bin_base) # 240
print(hex_base) # 305441741
</pre></code></li>
<li>Im Interpreter enthät das Underscore das Ergebnis einer vorherigen, der<br />
letzten Berechnung, des letzten Ausdruck:
<code><pre>
>>> a = 10
>>> b = 10
>>> _
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name '_' is not defined
>>> a+b
20
>>> _
20
>>> _ * 2
40
>>> _
40
>>> _ / 2
20
</pre></code></li>
<!-- li></li -->
</ol>
<ul>
<li><a href="https://hackernoon.com/understanding-the-underscore-of-python-309d1a029edc" target=_blank>Hackernoon :: Understanding the underscore of Python</a></li>
<li><a href="https://www.geeksforgeeks.org/underscore-_-python/" target=_blank>GeeksForGeeks :: Underscore in Python</a></li>
</ul>
<br />
</details></li>
<li><details><!--028-->
<summary>Was ist der "<code><b>ternäre Operator</b></code>" und wie lautet seine Syntax?</summary>
<br />
<ul>
<li>Dies eine verkürzte Schreibweise für das <code><b>if ‐ else</b></code>‐Statement;</li>
<li>Statt <code><pre>
if condition:
x = 1
else:
x = 0
</pre></code>
kann auch schreiben:
<code><pre>
x = 1 if condition else 0
</pre></code></li>
</ul>
<br />
</details></li>
<li><details><!--029-->
<summary>In welchen drei Formen lassen sich <em><b>Regular Expressions</b></em> aufrufen?</summary>
<br />
Um Regular Expressions verwenden zu können, muss das <br />
entsprechende Modul importiert werden:
<code><pre>
import re
</pre></code>
Die drei Formen sind:
<ol>
<li>in einer <em>langen</em> Form: z.B. <code><b>re.VERBOSE</b></code></li>
<li>in einer <em>kurzen</em> Form: z.B. <code><b>re.X</b></code></li>
<li>als <em>inline</em>‐Form: z.B. <code><b>"(?x)"</b></code></li>
</ol>
<br />
</details></li>
<li>
<details><!-030-->
<summary>Nenne die vier (wichtigsten?) Regex Flags der Regular Expressions.</summary>
<br />
<table>
<tr><th><center>long</center></th><th>short</th><th>inline</th></tr>
<tr><td>re.VERBOSE</td><td>re.X</td><td>"(?x)"</td></tr>
<tr><td>re.IGNORECASE</td><td>re.I</td><td>"(?i)"</td></tr>
<tr><td>re.MULTILINE</td><td>re.M</td><td>"(?m)"</td></tr>
<tr><td>re.DOTALL</td><td>re.S</td><td>"(?s)"</td></tr>
</table>
</li>
<li><details><!--031-->
<summary>Mit welchen Methoden können die <em><b>Regular Expressions</b></em> verwendet werden?</summary>
<br />
Die betroffenen Methoden sind:
<table>
<tr><td>re.compile</td><td>re.search</td><td>re.match</d></tr>
<tr><td>re.fullmatch</td><td>re.split</td><td>re.findall</d></tr>
<tr><td>re.finditer</td><td>re.sub</td><td>re.subn</d></tr>
</table>
<br />
</details></li>
<li><details><!--032-->
<summary>Mit welcher Funktion kann man den Typ einer Variablen ermitteln?</summary>
<br />
Die Methode heißt <code><b>type()</b></code>.<br />
<br />
Beispiel:
<code><pre>
lst = list()
lst = ('a','b','c')
type(lst)
<em>→ Ausgabe: <class 'list'></em>
</pre></code>
<br />
</details></li>
<li><details><!--033-->
<summary>Was ist der <em><b>__pycache__‐Folder</b></em>?</summary>
<br />
Er enthält die .py‐Files, die in den Bytecode übersetzt wurden<br />
und von der Virtuellen Maschine interpretiert werden;<br />
<br />
Wird ein Code mehrfach benötigt und aufgerufen, so wird er kompiliert und in einem<br />
File mit der Endung '.pyc' abgelegt;
<code><b></b></code><br />
<br />
Beispiel:
<code><pre>
<em></em>
</pre></code>
<br />
</details></li>
</ol>
</details>
<! --Abschnitt 2 ----------------------------------------------------------------------------------------------------------------------------------------------------------- />
<h3>EDX - Pre-Quiz-Fragen aus dem Kurs "Using Python for Research"</h3>
<details><summary><em>Fragenliste</em></summary>
<ol>
<li><details><summary><b>Question 1</b><br />
Consider the following code:
<code><pre>
import math
print(math.cos(math.pi))
-1.0
</pre></code>
What type of object is <b><u>math.pi</u></b> ?
<ol>
<li>int (integer)</li>
<li>float (real number)</li>
<li>function</li>
<li>string</li>
</ol>
</summary><br /><i>Antwort</i><br />
b. float (real number)<br />
<br />
<b>Explanation</b><br />
<b>math.pi</b> is an floating point approximation to π (a real number). </details>
</li><br />
<li><details><summary><b>Question 2</b><br />
Again consider the code:
<code><pre>
import math
print(math.cos(math.pi))
-1.0
</pre></code>
what type of object is <b><u>math.cos</u></b> ?
<ol>
<li>int (integer)</li>
<li>float (real number)</li>
<li>function</li>
<li>string</li>
</ol>
</summary><br /><i>Antwort</i><br />
c. function<br />
<br />
<b>Explanation</b><br />
<b>math.cos</b> takes in numeric values (in radians) as input <br />
and returns its cosine as output. </details>
</li><br />
<li><details><summary><b>Question 3</b><br />
Consider the following code:
<code><pre>
nums = set([1, 1, 2, 2, 3, 3, 3, 4])
print(len(nums))
</pre></code>
What does this return?
<ol>
<li>This code contains an error.</li>
<li>4</li>
<li>8</li>
<li>len([1, 1, 2, 2, 3, 3, 3, 4])</li>
</ol>
</summary><br /><i>Antwort</i><br />
b. 4
<br />
<b>Explanation</b><br />
<br />
Although the list contains 8 elements, a set only contains unique <br />
elements, eliminating one 1, one 2, and two 3s. Casting the list <br />
as a set eliminates repeats, leaving only {1,2,3,4} , containing 4 <br />
elements.
</details>
</li><br />
<li><details><summary><b>Question 4</b><br />
Consider the following code:
<code><pre>
a=[1,2,3]
a[1]=4
</pre></code>
What is <b><u>a</u></b> ?
<ol>
<li>This code contains an error.</li>
<li>[1,2,3]</li>
<li>[1,2,3,1]</li>
<li>[4,2,3]</li>
<li>[1,4,3]</li>
</ol>
</summary><br /><i>Antwort</i><br />
e. [1,4,3]<br />
<br />
<b>Explanation</b><br />
The second line calls the 1st index of the list, where 0 is the <br />
most basic element. The equals sign is used for assignment,<br />
so 4 is assigned to the position 1 in the list.
</details>
</li><br />
<li><details><summary><b>Question 5</b><br />
Consider the following code:
<code><pre>
a=(1,2,3)
a[1]=4
</pre></code>
What is <b><u>a </u></b>?
<ol>
<li>This code contains an error.</li>
<li>[1,2,3]</li>
<li>[1,2,3,1]</li>
<li>[4,2,3]</li>
<li>[1,4,3]</li>
</ol>
</summary><br /><i>Antwort</i><br />
This code contains an error.<br />
<br />
<b>Explanation</b><br />
<br />
Because a is defined with parentheses, it is a tuple,<br />
which is immutable (cannot be altered).
</details>
</li><br />
<li><details><summary><b>Question 6</b><br />
Consider the following code and output:
<code><pre>
a = [1,2,3]
b = a
a == b
True
a is b
True
b = a[:]
a == b
True
a is b
False
</pre></code>
Why is the last statement false?
<ol>
<li>This code contains an error.</li>
<li>a and b refer to the same object and therefore have same contents.</li>
<li>a and b refer to different objects that have identical content.</li>
<li>a and b refer to the same objects but have different content.</li>
<li>b is an empty list.</li>
</ol>
</summary><br /><i>Antwort</i><br />
a and b refer to different objects that have identical content.<br />
<br />
<b>Explanation</b><br />
<br />
For mutables, = makes the right object refer to the left one. <br />
In contrast, the Python shortcut with indexing “: “ makes a <br />
new copy of a mutable with its containing elements. Therefore,<br />
a and b are different objects, but each with the same elements.
</details>
</li><br />
<li><details><summary><b>Question 7</b><br />
Again consider the code:
<code><pre>
x = "Hello, world!"
y = x[5:]
</pre></code>
What is the value of y ?
<ol>
<li>This code contains an error.</li>
<li>'Hello'</li>
<li>'Hello '</li>
<li>', world!'</li>
<li>'o, world!'</li>
</ol>
</summary><br /><i>Antwort</i><br />
', world!'</details>
</li><br />
<li><details><summary><b>Question 8</b><br />
Again consider the code:
<code><pre>
y = [x**2 for x in range(5)]
</pre></code>
What is the value of y ?
<ol>
<li>This code contains an error.</li>
<li>[0, 2, 4, 6, 8]</li>
<li>[2, 4, 6, 8, 10]</li>
<li>[0, 1, 4, 9, 16]</li>
<li>[1, 4, 9, 16, 25]</li>
</ol>
</summary><br /><i>Antwort</i><br />
d. [0, 1, 4, 9, 16] <br />
<br />
<b>Explanation</b><br />
<br />
This is an example of a list comprehension, in which a list<br />
is created containing elements specified in the inside ex‐<br />
pression (i.e., x**2 ), performed for each element in the <br />
iterable (i.e., range(5) ).
</details>
</li><br />
<li><details><summary><b>Question 9</b><br />
Consider the following code and output:
<code><pre>
x = 1
def my_function():
x = 2
print(x)
print(x)
my_function()
print(x)
</pre></code>
What will be printed? Note that here, we separate lines of output with "; ".
<ol>
<li>This code contains an error.</li>
<li>1; 2; 1</li>
<li>2; 2; 2</li>
<li>1; 2; 2</li>
</ol>
</summary><br /><i>Antwort</i><br />
b. 1; 2; 1<br />
<br />
<b>Explanation</b></br />
x is first defined globally, with value 1 . Then, my_function <br />
creates a variable x with local scope. Therefore, its value <br />
does not extend beyond its use in the function.
</details>
</li><br />
<li><details><summary><b>Question 10</b><br />
Let's say you want to flip a coin until you get 10 heads. <br />
Should you use a for loop or while loop?
<ol>
<li>A for loop</li>
<li>A while loop</li>
</ol>
</summary><br /><i>Antwort</i><br />
b. A while loop<br />
<br />
<b>Explanation</b><br />
This process should continue until a condition is met, <br />
which has a clear definition, but not a clear number of<br />
steps. This means the coin should be flipped while <br />
fewer than ten heads arrive, which requires a while<br />
loop.
</details>
</li><br />
<li><details><summary><b>Question 11</b><br />
Let's say you want to flip a coin 10 times and count the number of heads. <br />
Should you use a for loop or a while loop?
<ol>
<li>A for loop</li>
<li>A while loop</li>
</ol>
</summary><br /><i>Antwort</i><br />
a. A for loop<br />
<br />
<b>Explanation</b><br />
<br />
In this case, we know the number of steps beforehand. This is a <br />
situation for which a for loop is appropriate.
</details>
</li><br />
<li><details><summary><b>Question 12</b><br />
Consider the following code and output:
<code><pre>
x = 1
while x < 5:
x *= 2
</pre></code>
What is the final value of x ?
<ol>
<li>This code contains an error.</li>
<li>2</li>
<li>5</li>
<li>8</li>
<li>10</li>
</ol>
</summary><br /><i>Antwort</i><br />
d. 8<br />
<br />
<b>Explanation</b><br />
x will be doubled starting with 1 until it reaches or exceeds 5.<br />
8 is the number that meets this criterion. </details>
</li><br />
<li><details><summary><b>Question 13</b><br />
Consider the following code and output:
<code><pre>
for integer in (-1,3,5):
if integer < 0:
print("negative")
else:
print("non-negative")
</pre></code>
How many lines of text does this print?
<ol>
<li>This code contains an error.</li>
<li>0</li>
<li>1</li>
<li>2</li>
<li>3</li>
</ol>
</summary><br /><i>Antwort</i><br />
e. 3<br />
<br />
<b>Explanation</b><br />
This code will print either "negative" or "non-negative" for each <br />
element in the tuple, of which there are three total.
</details>
</li><br />
<li><details><summary><b>Question 14</b><br />
Which data structure would best represent average latitude and <br />
longitude for each city in a group of cities, accessible by city name?
<ol>
<li>A tuple of string city names, latitudes, and longitudes.</li>
<li>A list of tuples , each containing a string city name, and a float for both latitude and longitude.</li>
<li>A set of string city names, latitudes, and longitudes.</li>
<li>A dict with string city name keys and tuple latitude/longitude values.</li>
</ol>
</summary><br /><i>Antwort</i><br />
d. A dict with string city name keys and tuple latitude/longitude values.<br />
<br />
<b>Explanation</b><br />
<br />
A dict allows for values to be of any type, with keys that are immutable. <br />
A natural choice for city names is strings, and their latitude and longitude<br />
can be represented by an iterable (such as a tuple ), making a dict an <br />
appropriate data type.
</details>
</li><br />
<li><details><summary><b>Question 15</b><br />
Consider the following code and output:
<code><pre>
x = 'String'
y = 10
z = 5.0
print(x + x) # print command 1
print(y + y) # print command 2
print(y + x) # print command 3
print(y + z) # print command 4
</pre></code>
Which of the following print commands will work?
<ol>
<li>None: this code contains an error.</li>
<li>1</li>
<li>1; 2</li>
<li>1; 2; 3</li>
<li>1; 2; 4</li>
<li>1; 2; 3; 4</li>
</ol></summary><br /><i>Antwort</i><br />
e. 1; 2; 4<br />
<br />
<b>Explanation</b><br />
<br />
Addition (+ ) is polymorphic for two strings, and pairs of many <br />
numeric types. However, + is not defined for strings and nu‐<br />
meric values.
</details>
</li><br />
</ol>
</details>
<! --Abschnitt 3 ----------------------------------------------------------------------------------------------------------------------------------------------------------- />
<h3>Fragenkatalog ‐ Quelle: <a href="https://realpython.com/python-first-steps/#15-test-your-knowledge" target=_blank>RealPython :: Test you knowledge! # TODO</a></h3>
<details><summary><em>Fragenliste</em></summary>
<ol>
<li><details>
<summary>What does it mean that Python is a strong, dynamically typed language?</summary>
<br />
<ul>
<li><b>strong typed</b> :: <br />
means that the type of a value doesn't change in unexpected ways. <br />
A string containing only digits doesn't magically become a number, <br />
as may happen in Perl. Every change of type requires an explicit<br />
conversion.</li>
<li><b>dynamically typed</b> :: <br />
means that runtime objects (values) have a type, as opposed to static<br />
typing where variables have a type.</li>
</ul>
<br />
Example
<code><pre>
bob = 1
bob = "bob"
</pre></code>
This works because the variable does not have a type; it can name any object. After bob=1, you'll find that type(bob) returns int, but after bob="bob", it returns str. (Note that type is a regular function, so it evaluates its argument, then returns the type of the value.)
Contrast this with older dialects of C, which were weakly, statically typed, so that pointers and integers were pretty much interchangeable. (Modern ISO C requires conversions in many cases, but my compiler is still lenient about this by default.)
I must add that the strong vs. weak typing is more of a continuum than a boolean choice. C++ has stronger typing than C (more conversions required), but the type system can be subverted by using pointer casts.
The strength of the type system in a dynamic language such as Python is really determined by how its primitives and library functions respond to different types. E.g., + is overloaded so that it works on two numbers or two strings, but not a string and an number. This is a design choice made when + was implemented, but not really a necessity following from the language's semantics. In fact, when you overload + on a custom type, you can make it implicitly convert anything to a number:
<code><pre>
def to_number(x):
"""Try to convert function argument to float-type object."""
try:
return float(x)
except (TypeError, ValueError):
return 0
class Foo:
def __init__(self, number):
self.number = number
def __add__(self, other):
return self.number + to_number(other)
</pre></code>
Instance of class Foo can be added to other objects:
<code><pre>
>>> a = Foo(42)
>>> a + "1"
43.0
>>> a + Foo
42
>>> a + 1
43.0
>>> a + None
42
</pre></code>
Observe that even though strongly typed Python is completely fine with adding objects of type int and float and returns an object of type float (e.g., int(42) + float(1) returns 43.0). On the other hand, due to the mismatch between types Haskell would complain if one tries the following (42 :: Integer) + (1 :: Float). This makes Haskell a strictly typed language, where types are entirely disjoint and only a controlled form of overloading is possible via type classes.
</p>
<a href="https://stackoverflow.com/questions/11328920/is-python-strongly-typed" target=_blank>StackOverflow :: Is Python strongly typed?</a>
<br />
</details></li>
<li><details>
<summary>How do you access the Python Shell?</summary>
<br />
Aufruf mittels <code><pre>python3</pre></code> für die Shell von Python‐Version 3.<br />
→ als Ergebnis wird der Eingabe‐Prompt (<code><b>>>></b></code>) angezeigt:
<code><pre>q@vm:~$ python3
Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>></pre></code>
<br />
</details></li>
<li>How do you declare a variable?</li>
<li>What's the difference between a variable name and a variable value?</li>
<li>What are Python's built-in data types?</li>
<li>What's the difference between an integer and a floating point number?</li>
<li>What are boolean values?</li>
<li>What does the % operator do?</li>
<li>What's the difference between a list and a tuple?</li>
<li>What's a dictionary?</li>
<li>Why should you use comments in your code?</li>
<li>Test out the help() function. What did you learn?</li>
<li>Pass in float to the dir() function. What did you learn?</li>
<li>One primitive that we didn't go over is None. What does it represent?</li>
<li>You can check the data type of a variable or a value by using the type() function. Test this out using various data types and variables. What did you learn?</li>
<li>Open your text editor and create a new file called <code><b>exercise.py</b></code>. <br />
Copy and paste the following code into the file:
<code><pre>
##########################################################################
## Modify the variables so that all of the statements evaluate to True. ##
##########################################################################
var1 =
var6 =
var2 =
var3 =
var4 =
var5 =
############################################
## Don't edit anything below this comment ##
############################################
# integers
print(type(var1) is int)
print(type(var6) is float)
print(var1 < 35)
print(var1 <= var6)
# strings
print(type(var2) is str)
print(var2[5] == 'n' and var2[0] == "p")
# lists
print(type(var3) is list)
print(len(var3) == 5)
# tuples
print(type(var4) is tuple)
print(var4[2] == "Hello, Python!")
# dictionaries
print(type(var5) is dict)
print("happy" in var5)
print(7 in var5.values())
print(var5.get("egg") == "salad")
print(len(var5) == 3)
var5["tuna"] = "fish"
print(len(var5) == 3)
</pre></code>
Following the instructions, update the code. When done, run the code from your terminal to test using the <code><b>python exercise.py</b></code> command. Good luck!</li>
</ol>
</details>
<! --Abschnitt 4 ----------------------------------------------------------------------------------------------------------------------------------------------------------- />
<h3>Fragenkatalog ‐ Quelle: Schwaiger / Steinwendner: “Neuronale Netze programmieren“<br />Anhang A: Python kompakt; S. 393ff.</h3>
<details><summary><em>Fragenliste</em></summary>
<ol>
<li><details>
<summary>Was bedeuten die Begriffe <br />
<ul>
<li>a) <b><i>objektorientiert</i></b></li>
<li>b) <b><i>rekursiv</i></b></li>
<li>c) <b><i>Lambda</i></b></li>
<li>d) <b><i>dynamische Typisierung</i></b></li>
<li>e) <b><i>iterativ</i></b></li>
</ul></summary>
<br /><ul>
<li>a) <b><i>objektorientiert</i></b></li>
<li>b) <b><i>rekursiv</i></b></li>
<li>c) <b><i>Lambda</i></b></li>
<li>d) <b><i>dynamische Typisierung</i></b></li>
<li>e) <b><i>iterativ</i></b></li>
</ul><br />
<br />
</details></li>
<li><details>
<summary>Welche Vorteile bietet Python?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Nenne die für <b><i>Machine Learning</i></b> wichtigsten Python-Module.</summary>
<br />
<ul>
<li>Numpy</li>
<li>scikit-learn</li>
<li>Tensorflow</li>
<li>keras</li>
</ul>
<br />
</details></li>
<li><details>
<summary>Was sind “<b>Gewichte</b>“?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Worin liegt der Wert von ML?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Wie ist in Python eine Zuweisung definiert?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Welche Datentypen gibt es in Python?</summary>
<br />
<ul>
<li>boolesche Typen</li>
<li>Zahlen (integer, float, complex …)</li>
<li>Zeichenketten (string)</li>
</ul>
<br />
</details></li>
<li><details>
<summary>Wie werdren Kommentare gekennzeichnet?</summary>
<br />
Eine Zeile, die mit “<b>#</b>“ (Hashmark) beginnt, wird als <b>Kommentarzeile</b> bezeichnet. <br />
Alles, was nach dem Hashmark geschrieben steht, wird vom Programm ignoriert.<br />
<br />
</details></li>
<li><details>
<summary>Wie ist der Operator definiert für:<br />
<ol>
<li>die abgerundete Division ?</li>
<li>den Modulo-Operator ?</li>
</ol>
</summary>
<br />
<ol>
<li><b>abgerundete Division</b>: <code><b>//</b></code> </li>
<li><b>Modulo-Operator</b>: <code><b>%</b></code></li>
</ol>
<br />
</details></li>
<li><details>
<summary>Welche Funktion wird für die Ausgabe von Text verwendet?</summary>
<br />
Die Funktion <code><b>print()</b></code>.<br />
<br />
</details></li>
<li><details>
<summary>Um welchen Datentyp handelt es sich, der nur “<b>0</b>“ oder “<b>1</b>“ enthält?</summary>
<br />
Es handelt sich um den <b>booleschen Datentyp</b>.<br />
<br />
</details></li>
<li><details>
<summary>Wofür ist dieser Datentyp wichtig?</summary>
<br />
<br />
<br />
</details></li>
<li><details>
<summary>Wie lautet der Operator für den o.g. Datentyp für:
<ul>
<li><b><i>Gleichheit</i></b></li>
<li><b><i>Ungleichheit</i></b></li>
<li><b><i>Größer‐als ‐ Vergleich</i></b></li>
<li><b><i>Kleiner‐als ‐ Vergleich</i></b></li>
<li><b><i>Größer ‐ Vergleich</i></b></li>
<li><b><i>Kleiner‐als ‐ Vergleich</i></b></li>
</ul></summary>
<br />
<ul>
<li><b><i>Gleichheit</i></b> :: <code><b></b>==</code></li>
<li><b><i>Ungleichheit</i></b> :: <code><b>!=</b></code></li>
<li><b><i>Größer‐als ‐ Vergleich</i></b> :: <code><b>></b></code></li>
<li><b><i>Kleiner‐als ‐ Vergleich</i></b> :: <code><b><</b></code></li>
<li><b><i>Größer‐gleich ‐ Vergleich</i></b> :: <code><b>>=</b></code></li>
<li><b><i>Kleiner‐gleich ‐ Vergleich</i></b> :: <code><b><=</b></code></li>
</ul>
<br />
</details></li>
<li><details>
<summary>Wie wird ein <b>String</b> definiert?</summary>
<br />
<br />
<br />
</details></li>
<li><details>
<summary>Wie werden Strings konkateniert?</summary>
<br />
Mit Hilfe des Plus-Zeichens, “<b>+</b>“<br />
<br />
</details></li>
<li><details>
<summary>Welche Aufgabe hat die Funktion <br />
<ul>
<li>a) <code><b>len()</b></code> ?</li>
<li>b) <code><b>format()</b></code> ?</li>
</ul>
</summary>
<br />
<ul>
<li>a) <code><b>len()</b></code> :: <br />
berechnet die Länge eines Strings und gibt die Anzahl der Zeichen aus.</li>
<li>b) <code><b>format()</b></code> :: <br />
</li>
</ul>
<br />
</details></li>
<li><details>
<summary>Wie kann man in Python auf einzelne Zeichen in einem String zugreifen?</summary>
<br />
Über den Index, dargestellt mit eckigen Klammern: <code><b>string[ <i>pos</i> ] </b></code>,<br />
wobei <code><b><i>pos</i></b></code> die Position angibt.<br />
<b>WICHTIG!</b> Die Zählung beginnt bei “<b>0</b>“, d.h. das <b>n</b>-te Zeichen ist an der Position <b>n-1</b>.<br />
<br />
</details></li>
<li><details>
<summary>Mit welcher Nummer startet die Nummerierung von Strings?</summary>
<br />
Die Nummerierung von Strings beginnt mit “<b>0</b>“.<br />
<br />
</details></li>
<li><details>
<summary>Was bedeutet “<b><i>Slicing</i></b>“?</summary>
<br />
Das Arbeiten mit Teillisten aus einer Liste.<br />
<br />
</details></li>
<li><details>
<summary>Beschreibe, welche Ergebnisse bei den folgenden Aufrufen zurückgeliefert werden:<br />
<code><b>
nums = list(range(5))<br />
print(nums)<br />
print(nums[2:4])<br />
print(nums[2:])<br />
print(nums[:2])<br />
print(nums[:])<br />
print(nums[:-1])<br />
nums[2:4] = [8, 9]<br />
print(nums)<br />
</b></code>
</summary>
<br />
<code><b>
nums = list(range(5)) # range is a built-in function that creates a list of integers<br />
print(nums) # Prints "[0, 1, 2, 3, 4]"<br />
print(nums[2:4]) # Get a slice from index 2 to 4 (exclusive); prints "[2, 3]"<br />
print(nums[2:]) # Get a slice from index 2 to the end; prints "[2, 3, 4]"<br />
print(nums[:2]) # Get a slice from the start to index 2 (exclusive); prints "[0, 1]"<br />
print(nums[:]) # Get a slice of the whole list; prints "[0, 1, 2, 3, 4]"<br />
print(nums[:-1]) # Slice indices can be negative; prints "[0, 1, 2, 3]"<br />
nums[2:4] = [8, 9] # Assign a new sublist to a slice<br />
print(nums) # Prints "[0, 1, 8, 9, 4]"
</b></code><br />
<br />
</details></li>
<li><details>
<summary>Wie lautet die Fehlermeldung, wenn auf eine nicht-existente Position zugegriffen wird?</summary>
<code><b></b></code><br />
<br />
</details></li>
<h5>A2. Kontrollstrukturen</h5>
<li><details>
<summary>Welche Kontrollstrukturen stehen in Python zur Verfügung?</summary>
<br />
<ul>
<li><code><b>if - then - elif - else</b></code></li>
<li><code><b>for</b></code>‐Loop</li>
<li><code><b>while</b></code>‐Loop</li>
</ul><br />
<br />
</details></li>
<li><details>
<summary>Gib die Syntax zu jeder in der vorherigen Frage erwähnten Kontrollstruktur an.</summary>
<br />
<ul>
<li><code><b>if - then - elif - else</b></code> :: <br /></li>
<li><code><b>for</b></code>‐Loop :: <br /></li>
<li><code><b>while</b></code>‐Loop :: <br /></li>
</ul>
<br />
</details></li>
<li><details>
<summary>Was bedeutet es, wenn Code eingerückt ist?</summary>
<br />
Anweisungen, die eingerückt sind, bilden einen eigenen Anweisungsblock.<br />
<br />
</details></li>
<li><details>
<summary>Welche Schleifen stehen in Python zur Verfügung?</summary>
<br />
<ul>
<li><code><b>for</b></code>‐Loop :: <br /></li>
<li><code><b>while</b></code>‐Loop :: <br /></li>
</ul>
<br />
</details></li>
<li><details>
<summary>Wozu dient die Funktion <code><b>range()</b></code>?</summary>
<br />
<br />
</details></li>
<li><details>
<summary>Was gibt die Funktion <code><b>type</b></code> zurück?</summary>
<br />
Sie gibt den Datentyp der Variablen zurück, die ihr beim Aufruf mitgegeben wurde.<br />
<br />
</details></li>
<h5>Funktionen, Klassen & Module</h5>
<li><details>
<summary>Wann werden Funktionen eingesetzt?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Woraus besteht ein Funktionsaufruf?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Wie lautet die Syntax einer Funktionsdefinition?</summary>
<br />
<code><b>def <i>fctName</i>( <i>mgl. param.</i>):</b></code><br />
<br />
</details></li>
<li><details>
<summary>Was ist der sog. “<b>Docstring</b>“ ?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Was bedeutet der Asterisk, “&asterisk“ in der Parameterliste einer Funktion?</summary>
<br />
Damit wird angegeben, daß aktuell, zum Zeitpunkt der Programmierung, die Anzahl der übergebenen Parameter noch unbekannt ist.<br />
Beispiel:<br />
<code><b>def <i>fctName</i> ( *param ) : </b></code>
<br />
</details></li>
<h5>Klassen</h5>
<li><details>
<summary>Was ist <b><i>OOP</i></b> ?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Was ist unter einer <b><i>Klasse</i></b> zu verstehen?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Was ist die <b><i>Instanz einer Klasse</i></b> ?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Gib die Syntax einer <b><i>Klassendefinition</i></b> an.</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Was sind <b><i>Klassenattribute</i></b> ?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Wie werden Klassen in Python initialisiert ? (Syntax) </summary>
<code><b></b></code><br />
<br />
</details></li>
<h5>Module</h5>
<li><details>
<summary>Wie werden Module bereitgestellt resp. initialisiert?</summary>
<code><b></b></code><br />
<br />
</details></li>
<h5>Besondere Datentypen für Vektor, Matrix & Tensor</h5>
<li><details>
<summary>Was ist die <b>Dimension</b> eines Vektors?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Nenne eine andere Bezeichnung für Vektoren bzw. Matrizen.</summary>
<br />
Sie werden auch als <b>Tensor</b> bezeichnet.
<br />
</details></li>
<li><details>
<summary>Woraus besteht eine Matrix?</summary>
<br />
Aus einer Zusammenstellung von Vektoren.<br />
<br />
</details></li>
<li><details>
<summary>Was sind <b><i>Tensoren</i></b>?</summary>
<code><b></b></code><br />
<br />
</details></li>
<h5>Datentypen im Kernpython</h5>
<li><details>
<summary>Was wird als “Kernpython“ bezeichnet?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Welche Datentypen stellt das Kernpython bereit?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Welcher Datentype wird zur Darstellung von Vektoren verwendet? <br />
(Nenne die wichtigsten Methoden)</summary>
<code><b></b></code><br />
<br />
</details></li>
<h5>Modul “numpy“ ( Numerical Python )</h5>
<li><details>
<summary>Was stellt das Modul “numpy“ zur Verfügung?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Wie wird eine Liste in ein numpy-Array umgewandetl?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Wie wird eine Matrix in numpy dargestellt?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Nenne ein paar “Spezial-Arrays“.</summary>
<br />
<ul>
<li><code><b>ones</b></code></li>
<li><code><b>zeros</b></code></li>
</ul>
<br />
</details></li>
<li><details>
<summary>Wie wird die Matrixmultiplikation mit Hilfe des numpy-Moduls durchgeführt?</summary>
<code><b></b></code><br />
<br />
</details></li>
<h5>Fertiger k-NN-Klassifizierer</h5>
<li><details>
<summary>Wofür steht “k-nn“?</summary>
<br />
<code><b>k-NN</b></code> steht für “k-nächsten Nachbarn“.<br />
<br />
</details></li>
<li><details>
<summary>Ws ist hier mit “Klassisfikation“ gemeint?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Was wird dafür benötigt?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Was ist die Aufgabe eines Klassifikators?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Was versteht man unter “überwachte Klassifikation“?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Wie lautet der Sammelbegriff für solche Verfahren?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Was macht ein k-NN-Klassifikator?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Wie wird dieses Problem auch bezeichnet?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Was ist ein “Pseudocode“?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Wie sieht der Pseudocode für den k-NN-Klassifikator aus?</summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary>Wie lautet die Bezeichnung für die Klassenfunktion für
<ol>
<li>Training ?</li>
<li>Klassifizierung ?</li>
</ol></summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary></summary>
<code><b></b></code><br />
<br />
</details></li>
</ol>
</details>
</html>
<html>
<ul>
<li><b>PYTHONSTARTUP:</b><br /></li>
<br />
<li><b>PYTHONPATH:</b><br /></li>
<br />
<li><b>PYTHONHOME:</b><br /></li>
<br />
<li><b>PYTHONCASEOK:</b><br /></li>
<br />
<li><b>PYTHONIOENCODING:</b><br /></li>
<br />
</ul>
</html>
<html>
Wenn das Programm in einer Endlos-Schleife gefangen ist,<br />
dann verwenden:
<ul>
<li>Ctrl ‐ C</li>
<li>Ctrl ‐ Backslash</li>
</ul>
</html>
<html>
<ul>
<li><b>Download entsprechendes Paket:</b><br />
(hier: Python 3.11.5 ‐ June 6, 2023 ‐ Windows installer (64-bit))
</li>
<br />
<li>Bei der Installation mit dem Install-Wizard von Python<br />
daran denken, den Haken beim Menüpunkt<br />
<pre><code>Add python.exe to Path</code></pre>
zu setzen.
</li>
<br />
<li><b>Aufruf der Python-Shell (& Version ermitteln):</b><br />
<code><pre>py ––version</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.python.org/downloads/windows/"
target="_blank" rel="noreferrer noopener">
Python Releases for Windows</a>
</li>
<li><a href="https://www.computerwoche.de/a/wie-sie-python-richtig-installieren,3548847"
target="_blank" rel="noreferrer noopener">
Computerwoche :: Tutorial ‐ Wie Sie Python richtig installieren </a>
</li>
<li><a href="https://docs.python.org/3.11/tutorial/index.html"
target="_blank" rel="noreferrer noopener">
The Python Tutorial (online)</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
Updating to a new Python version is easy on a computer running Windows. <br />
All you have to do is visit the <a href="https://www.python.org/downloads/windows/" target="_blank" rel="noreferrer noopener">Python downloads page</a> and download the la–<br />
test version. If you're updating to a new patch of Python (3.x.a to 3.x.b), <br />
when you run the installer, it will prompt you to “Upgrade Now“. The installer<br />
will look like this:
<br />
<img src="./pictures/Updating-Python-Patch-On-Windows.png" height=364 width=603 /> <!-- height=808 width=1327 --> <br />
<br />
Upgrade to Python 3.7.4 prompt window Clicking on the button will replace<br />
the existing version of Python with the new version. The older version will<br />
be removed from your computer. After you restart the computer, the new<br />
patch will be installed on your machine. In contrast, if you're updating Py–<br />
thon to a new minor version (3.x to 3.y), you will see the “Install Now“<br />
prompt instead of the “Upgrade Now“ prompt on the installer. Clicking the<br />
button will install the new version of Python. However, the old version will <br />
not be removed. Your computer can have more than one Python version<br />
installed. The py launcher is installed automatically regardless of the ver–<br />
sion of Python you're using. It will enable you to select the version of Py–<br />
thon you want to use. Running a program with a specific version is as<br />
simple as using the “py“ command and entering the version you want to<br />
use, like so:
<pre><code>py -3.8</code></pre>
or
<pre><code>py -3.9</code></pre>
Suppose there are many projects on your machine that use the previous<br />
version of Python, and you use them all in a virtual environment. In that<br />
case, you can update Python just in that environment using the following<br />
command:
<pre><code>python -m venv --upgrade <VIRTUAL ENVIRONMENT PATH HERE></code></pre>
<h3>Links:</h3>
<ul>
<li><a href="https://www.pythoncentral.io/how-to-update-python/"
target="_blank" rel="noreferrer noopener">
Python Central :: How to Update Python</a>
</li>
</ul>
</html>
<html>
<ol>
<li><b>Exercise 01</b><br /></li>
<li><b>Exercise 02</b><br />
<ul>
<li>*args, **kwargs : Aufrufparameter bei Funktionen<br />
⇒ allow you to pass a variable number of arguments to a function;<br />
beide Asterisks sind „unpacking operator“, die Bezeichnungen<br />
„args“ und „kwargs“ sind beliebig (können auch anders heißen);<br />
der unpacking operator ** erwartet Dictionaries<br />
<a href="https://pythontips.com/2013/08/04/args-and-kwargs-in-python-explained/" target=_blank>Python Tips :: args & kwargs explained</a></li>
<br />
<li>with-Statement <br />
⇒ zum Öffnen & Schließen von Files<br />
<a href="https://www.pythonforbeginners.com/files/with-statement-in-python" target=_blank>Python for Beginners :: with ‐ Statement</a></li>
</ul></li>
<li><b></b><br /></li>
<li><b></b><br /></li>
</ol>
</html>
<html>
<ul>
<li>haben die Endung “whl“</li><br />
<li>Beispiel: <br />
<code><b>PySnooper-0.4.1-py2.py3-none-any.whl</b></code>
</li><br />
<li>unterstützt den Installationsprozess von Python-Paketen
</li><br />
<li>Wheels sind eine Komponente des Python-Ecosystems:
sie helfen, dass die Paktetinstallation funktioniert<br />
<br />
→ schnellere Installation und höhere Stabilität
im Paket-Verteilungs-/Paketierungsprozess
</li><br />
<li>benötigte Pakete (aktuellste Versionen):
<ul>
<li>pip</li>
<li>setuptools</li>
<li>wheel</li>
</ul>
</li><br />
<li><h3>Python Packaging Made Better: An Intro to Python Wheels</h3>
* "source distribution", sdist<br />
→ z.B. ein TAR file (a tarball)<br />
das ist im gewissen Maße das Gegenteil von einem Wheel-File<br />
<br />
es enthält Source Code<br />
<br />
Source distributions also contain a bundle of metadata sitting<br />
in a directory called <package-name>.egg-info. This metadata<br />
helps with building and installing the package, but user's <br />
don't really need to do anything with it.<br />
<br />
eine Source distribution wird mit folgendem Befehl erstellt:<br />
<code><pre>
$ python setup.py sdist
</pre></code>
</li><br />
<li>"wheel file", .whl
→ Bei der Installation mit Hilfe eines Wheel-Files enfällt die
Umwandlung von "sdist" in ein Wheel-File (no build stage)
ein wheel wird mit folgendem Befehl erstellt:
$ python setup.py bdist_wheel
</li><br />
<li>pip will always prefer the wheel if it's compatible with your system.
</li><br />
<li>To avoid compatibility issues, some packages offer multiple wheels, with <br />
each wheel geared toward a specific Python implementation and under-<br />
lying operating system.
</li><br />
< Wheels Make Things Go Fast >
<li>Verschiedene Typen von Wheel-Files:
<ol>
<li>“universal wheel“</li>
<li>“pure-Python wheel“</li>
<li>“platform wheel“</li>
</ol>
</li><br />
<li>Unterschiede zwischen diesen Wheel-Varianten:
<table>
<tr><th>Wheel Type</th><th>Supports <br />Python 2 and 3</th><th>Supports Every ABI, OS,<br /> and Platform</th></tr>
<tr><td>Universal</td><td><center>✓</center></td><td><center>✓</center></td><tr>
<tr><td>Pure-Python</td><td></td><td><center>✓</center></td><tr>
<tr><td>Platform</td><td></td><td></td><tr>
</table>
</li><br /></ul>
<h3>Unterschiede zwischen EggFiles und Wheel-Files</h3>
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="" target=_blank>Reuven Lerner :: [Better developers] Wheelfiles, 30. Sept. 2019</a></li>
<li><a href="https://realpython.com/python-wheels/" target=_blank>Real Python :: Wheels</a></li>
<li></li>
<li></li>
</ul>
</html>
<html>
<ul>
<li><h3>Syntax:</h3>
<ol>
<li> <code>import</code> <i>Bibliotheksname</i> <code>as</code> <i>Nickname</i></li>
<li> <code>from </code> <i>Bibliotheksname</i> <code>import *</code></li>
</ol>
<br />
<b>Beispiel:</b><br />
<code>import pandas as pd</code><br />
</li>
<li><h3>Liste der Bibliotheken</h3>
<table border="1">
<tr><th>Bibliotheksname</th><th>wichtige Funktionen</th></tr>
<tr><td><b>os</b></td><td><ul><li>walk</li><li>path</li><li></li></ul></td>
<tr><td><b>system</b></td><td><ul><li></li></ul></td>
<tr><td><b>networkx</b></td><td><ul><li></li></ul></td>
<tr><td><b>igraph</b></td><td><ul><li></li></ul></td>
<tr><td><b>regular expressions</b></td><td><ul><li></li></ul></td>
<tr><td><b>BeautifulSoup</b></td><td><ul><li></li></ul></td>
<tr><td><b></b></td><td><ul><li></li></ul></td>
</table>
</li>
<li><h3>Liste der Data Science ‐ Bibliotheken</h3>
<table border="1">
<tr><th>Bibliotheksname</th><th>wichtige Funktionen</th></tr>
<tr><td><b>NumPy</b></td><td></td>
<tr><td><b>SciPy</b></td><td></td>
<tr><td><b>Matplotlib</b></td><td></td>
<tr><td><b>Pandas</b></td><td></td>
<tr><td><b>Scikit Learn</b></td><td></td>
<tr><td><b>Statsmodels</b></td><td></td>
<tr><td><b>Seaborn</b></td><td></td>
<tr><td><b>Bokeh</b></td><td></td>
<tr><td><b>Blaze</b></td><td></td>
<tr><td><b>Scrapy</b></td><td></td>
<tr><td><b>SymPy</b></td><td></td>
<tr><td><b>Requests</b></td><td></td>
<tr><td><b></b></td><td><ul><li></li></ul></td>
</table>
</li>
</ul>
</html>
<html>
<h3><em>Work stages</em></h3>
<ol>
<li>A folder contains your main project and a venv as a sibling.<br />
<img src="./pictures/WorkStages_001.png" height=155 width=304 />
</li>
<li>Die Verzeichnisse für <em>ProjectRootDir</em> und <em>ProjectDir</em> erstellen:<br />
<code><pre>
mkdir -p <em>ProjectRootDir</em>/<em>ProjectDir</em>
</pre></code>
</li>
<li>Managing Python Dependencies with Pip and Virtualenv:<br />
<ol>
<li>in das Verzeichnis <em>ProjectRootDir</em> wechseln:<br />
<code><pre>
cd <em>ProjectRootDir</em>
</pre></code>
</li>
<li>→ Create venv‐Dir
<code><pre>
python -m venv ./venv --prompt=<em>NAME</em>
</pre></code></li>
</ol>
</li>
<li>Setup Git repository :
<ol>
<li>in das Verzeichnis <em>ProjectDir</em> wechseln:<br />
<code><pre>
cd <em>ProjectDir</em>
</pre></code>
</li>
<li>→ Create Repo‐Dir:<br />
<code><pre>
git init .
</pre></code></li>
</ol>
<li>Put the not tracked files in your <code><b>.gitignore</b></code> file:
<code><pre>
echo '.gitignore' >> .gitignore
</pre></code>
</li>
<li>Activate the virtual environment:
<code><pre>
source ./venv/bin/activate
</pre></code></li>
<li>Überprüfen, ob die aktuelle pip‐Version installiert ist:
<code><pre>pip install ‐‐upgrade pip</pre></code></li>
<li>Installation <code><b>pip‐review</b></code>:
<code><pre>pip install pip‐review</pre></code>
<ul>
<li>Tool for updating all packages</li>
<li>it lets you smoothly manage all available PyPi updates with simple commands</li>
<li>originally a part of the pip-tools package, it now lives on as a standalone convenience wrapper around pip</li>
</ul><br /></li>
<li>folgende Packages resp. Tools installieren (Befehl: <code><b>pip install <em>PACKAGE</em></b></code>):
<ol>
<li>wheel</li>
<li>pylint ‐ source-code, bug and quality checker </li>
<li>pipenv (inkl. Abhängigkeiten)</li>
<li>bandit <em>(security scanner for Python code)</em></li>
<li>filprofiler <em>(memory profiler)</em></li>
<li>pipwrap <em>(?bin mir über Sinn (oder Unsinn) des Moduls noch nicht ganz klar)</em></li>
<li>pip-tools (wg. pip-compile)</li>
<li>black (Code formatter)</li>
<li><details><summary><a href="https://pypi.org/project/pyupgrade/" target="_blank" rel="noreferrer noopener">pyupgrade</a></summary><br />
(?bin mir über Sinn (oder Unsinn) des Moduls noch nicht ganz klar)</em><br />
<br />
A tool (and pre-commit hook) to automatically upgrade syntax for newer versions of the language.<br />
<br />
s.a. RealPython Podcast Episode 97: Improving Your Django and Python Developer Experience<br />
</details> </li>
<li>icecream <em>(Debugging)</em></li>
<!--
<li></li>
<li></li>
-->
</ol>
<li>mypy ‐ Static Type Checker</li>
<li>pytest ‐ Testsuite (TDD)<br />
→ pytest-cov</li>
<li>tox ‐ automating and standardizing testing</li>
<li>Sphinx ‐ Dokumentation</li>
<br />
<li>Programmierung - folgende Libs importieren:
<ol>
<li>logging<em> (in der Standard Library enthalten)</em></l>
</ol></li>
<br />
<li>Freeze the requirements:
<code><pre>
pip freeze > requirements.txt
</pre></code></li>
<li>Check requirements.txt into source control:
<code><pre>
git add requirements.txt
git commit -a -m 'requirements.txt :: Projekt‐Environment packages'
</pre></code>
(The basic idea here is simple. Your virtual environment stays in its own folder, <br />
which you don't check into source control. That way your environment does not<br />
pollute your project's root. The requirements, on the other hand, do get checked<br />
into source control.)<br />
<br />
</li>
<li>Auf einem anderen System kann man dann mittels
<code><pre>
pip install -r <em>FileName</em>
</pre></code>
eben jene Pakete einspielen lassen.<br />
<br />
</li>
<li>alias-Befehle (falls möglich & notwendig) erstellen:
<code><pre>alias ae='deactivate &> /dev/null && source ./bin/activate'
alias de='deactivate'
</pre></code> </li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://medium.com/@jtpaasch/the-right-way-to-use-virtual-environments-1bc255a0cba7" target=_blank rel="noreferrer noopener">
Medium.com :: The Right Way to Use Virtual Environments</a></li>
<li><a href="https://bhupesh-v.github.io/the-unholy-way-of-using-virtual-environments/" target=_blank rel="noreferrer noopener">
Bhupesh Varshney :: The unholy way of using virtual environments</a></li>
<li><a href="https://bodo-schoenfeld.de/eine-virtuelle-umgebung-fuer-python-erstellen/" target=_blank rel="noreferrer noopener">Bodo Schönfeld :: Eine virtuelle Umgebung für Python erstellen</a></li>
</ul>
</html>
<html>
<ul>
<li>Einrückung rückgängig machen (<em>unindentation</em>):<br />
<code><pre>
Ctrl + [
</pre></code>
</li>
<h3>Issue #1</h3>
<li></li>
<li></li>
<li></li>
<h3>Issue #2</h3>
<li></li>
<li></li>
<li></li>
<h3>Issue #3</h3>
<li></li>
<li></li>
<li></li>
<h3>Issue #4</h3>
<li></li>
<li></li>
<li></li>
<h3>Issue #5</h3>
<li></li>
<li></li>
<li></li>
</ul>
<h3>Quelle:</h3>
</ul>
<li>eMails von Dan Bader (real python)</li>
<li><a href="https://bodo-schoenfeld.de/eine-virtuelle-umgebung-fuer-python-erstellen/" target=_blank rel="noreferrer noopener">Bodo Schönfeld :: Eine virtuelle Umgebung für Python erstellen</a></li>
</ul>
</html>
<html>
<ul>
<li>Python has built-in assert statement to use assertion condition in <br />
the program. assert statement has a condition or expression which<br />
is supposed to be always true. If the condition is false assert halts<br />
the program and gives an AssertionError.</li>
<br />
<li><b>Syntax for using Assert in Pyhton:</b><br />
<ol>
<li>assert <condition></li>
<li>assert <condition>,<error message></li>
</ol></li>
<br />
<li>In Python we can use assert statement in two ways as mentioned above.<br />
<ol>
<li>assert statement has a condition and if the condition is not satisfied the program will stop and give AssertionError.</li>
<li>assert statement can also have a condition and a optional error message. If the condition is not satisfied assert stops the program and gives AssertionError along with the error message.</li>
</ol></li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.programiz.com/python-programming/assert-statement" target=_blank>Programiz :: Assert statement</a></li>
</ul>
</html>
<html>
<ul>
<li>Die “normalen“ Dictionarys in Python haben folgendes Problem:<br />
Beim Zugriff oder Verändern eines Keys / Schlüssels, der im Dictionary <br />
<b>nicht</b> existiert, kommt es zur <em>KeyError</em>‐Exception. Als Folge bricht das <br />
Programm ab.</li>
<br />
<li>Um dieses Verhalten zu verhindern, gibt es den Typ <code><b>defaultdict</b></code> <br />
aus dem Modul “collections“. Dieser Typ arbeitet zwar wie ein normales <br />
Dictionary, aber beim Zugriff auf einen nicht-existierenden Schlüssel er‐<br />
zeugt defaultdict automatisch den Schlüssel und gleichzeitgt wird die‐<br />
sem Schlüssel ein Default-Wert zugewiesen.</li>
<br />
<li><code><pre>from collections import defaultdict</pre></code></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://realpython.com/python-defaultdict/" target=_blank>RealPython :: defaultdict</a></li>
</ul>
</html>
<html>
<ul>
<li>die Testfälle werden im Docstring (<code>“““ … “““</code> bzw. <code>' ' ' … ' ' '</code>) geschrieben</li>
<br />
<li>die Testschritte werden durch drei Größer‐Zeichen markiert:<br />
<code><b>>>></b></code></li>
<li><h3>Anwendung:</h3>
<ol>
<li><b>als Import in CodeFile:</b></br>
<code><b>import doctest</b></code><br />
…<br />
<code><b>def</b></code> <i>fct(x)</i>:<br />
<div style="text-indent:30px;"><code>“““</code></div>
<div style="text-indent:30px;"><code>…</code></div>
<div style="text-indent:30px;"><code><b>>>></b></code>… hier die Eingabe / der Funktionsaufruf, mit Aufrufparameter<br />
<div style="text-indent:30px;">hier die zu erwartende Ausgabe</div>
<div style="text-indent:30px;"><code>“““</code></div></li>
</li>
<li><b>als Parameter bei File-Aufruf:</b><br />
<code><b>python -m doctest <<em>CodeFile.py</em>></b></code>
</ol>
<li><h3>Beispiel:</h3>
<code><pre>
def fizz_buzz(numbers):
' ' '
Given a list of integers:
1. Replace all integers that are evenly divisible by 3
with "fizz"
2. Replace all integers divisible by 5 with "buzz"
3. Replace all integers divisible by both 3 and 5 with "fizzbuzz"
>>> numbers = [45, 22, 14, 65, 97, 72] <em># Beginn Doctest‐Anweisungen ‐ erste Eingabe</em>
>>> fizz_buzz(numbers) <em># zweite Eingabe</em>
>>> numbers <em># dritte Eingabe</em>
['fizzbuzz', 22, 14, 'buzz' 97, 'fizz'] <em># zu erwartende Ausgabe</em>
' ' '
for i in range(len(numbers)):
…
</pre></code></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://pythontesting.net/framework/doctest/doctest-introduction/" target="_blank" rel="noreferrer noopener">Python Testing :: doctest</li>
</ul>
</html>
<html>
<ul>
<li>wurden mit Python 3.6 eingeführt</li>
<li><code><pre>first_name = 'Jens'
last_name = 'Mueller'
sentence = 'My name is {} {}'.format(first_name, last_name)
print(sentence)
--> Ausgabe:
My name is Jens Mueller
sentence = 'My name is {} {}'
--> Erweitern: sentence = f'My name is {first_name} {last_name}' # "formatted string", f-string
print(sentence)
--> Ausgabe:
My name is Jens Mueller
--> Weitere Erweiterung:
# Sollen die Strings in Grossbuchstaben ausgegeben werden, reicht es aus,
# die String-Methode "upper()" zu verwenden, dh. Methoden können
problemlos innerhalb von f-Strings aufgerufen werden:
sentence = f'My name is {first_name.upper()} {last_name.upper()}'
print(sentence)
--> Ausgabe:
My name is JENS MUELLER
# Die Formatierung la f-string ist leichter zu lesen und zu verstehen
# als die bisherigen Formatierungsangaben
# Weiteres Beispiel:
# Angabe des 1.000er Trennzeichen
num1 = 100_000_000
num2 = 10_000_000
total = num1 + num2
--> Ausgabe:
# default-mässig:
>>> print(f'{total}')
110000000
# mit zusätzlicher Formatierung:
>>> print(f'{total:,}')
110,000,000
# Weiteres Beispiel:
person= {'name': 'Jenn', 'age':23}
sentence = 'My name is {} and I am {} years old'.format(person['name'], person['age'])
print(sentence)
--> Ausgabe:
My name is Jenn and I am 23 years old
# Die Verarbeitung unter Verwendung von f-string:
sentence = f'My name is {person['name']} and I am {person['age']} years old'
print(sentence)
--> Dies führt zu einem Syntax-Error, da der erste Apostroph von 'name' (der
Zugriff auf den Key des Dictionarys) den String zu früh beendet.
--> Um dies zu vermeiden, ist es am besten, den gesamten String in doppelten
Anführungsstrichen zu packen:
sentence = f"My name is {person['name']} and I am {person['age']} years old"
print(sentence)
--> Ausgabe:
My name is Jenn and I am 23 years old
# Weiteres Beispiel:
# Es ist auch möglich, Berechnungen innerhalb der f-Strings durchzuführen:
calculation = f'4 times 11 is equal to {4 * 11}'
print(calculation)
--> Ausgabe:
4 times 11 is equal to 44
# Weiteres Beispiel:
# Für DB ist es manchmal erforderlich, Zero-Padding durchzuführen. Das lässt
# sich leicht erreichen, indem zusätzliche Formatierungen hinzugefügt
# werden.
# Hier werden dreistellige Zahlen dargestellt, die mit führenden Nullen
# aufgefüllt werden:
for n in range(1,11):
sentence = f'The value is {n:03}'
print(sentence)
--> Ausgabe:
The value is 001
The value is 002
The value is 003
The value is 004
The value is 005
The value is 006
The value is 007
The value is 008
The value is 009
The value is 010
# Weiteres Beispiel:
# Ausgabe von floating point-Zahlen, die Länge der Ausgabe wird eingeschränkt:
pi = 3.14159265
sentence = f'Pi is equal to {pi:.4f}'
# "." := Angabe, dass es sich um eine floating point-Zahl handelt
# "4" := Die Ausgabe soll auf vier Nachkomma-Stellen beschränkt sein
# "f" := Angabe, dass es sich um eine floating point-Zahl handelt
print(sentence)
--> Ausgabe:
pi = 3.1416 # Die Zahl wird nicht einfach gekappt, es wird entsprechend gerundet
# Weiteres Beispiel:
# Formatierung von Datumsangaben
from datetime import datetime
birthday = datetime(1990, 1, 1)
sentence = f'Jenn has a birthday on {birthday}'
print(sentence)
--> Ausgabe:
Jenn has birthday on 1990-01-01 00:00:00
--> erweiterte Formatierung:
# die Formatierungsangaben (Codes befinden sich in der Python-Doku, Abschnitt 8.1.8,
# strftime() ["String-Format-Time"] und strptime() ["String-Print-Time"]
sentence = f'Jenn has a birthday on {birthday:%B %d, %Y}'
print(sentence)
--> Ausgabe:
Jenn has birthday on January 01, 1990
</pre></code></li>
<!-- li></li>
<li></li>
<li></li>
<li></li -->
</ul>
<h3>Links:</h3>
<ol>
<li><a href="https://www.youtube.com/watch?v=nghuHvKLhJA" target=_blank>YouTube :: F-Strings</a></li>
</ol>
</html>
<html>
<ul>
<li>The <conversion> component is the middle portion of a replacement field:
<code><pre>
{[<b><name></b>][<b>!<conversion></b>][<b>:<format_spec></b>]}
</pre></code>
</li>
<li>Python can format an object as a string using three different built-in functions:<br />
<br />
<ul>
<li>str()</li>
<li>repr()</li>
<li>ascii()</li>
</ul><br />
</li>
<li>By default, the Python .format() method uses str(), but in some instances, <br />
you may want to force .format() to use one of the other two. You can do this <br />
with the <conversion> component of a replacement field.</li>
<li>The possible values for <em><conversion></em> are shown in the table below:
<table>
<tr><th>Value</th><th>Meaning</th></tr>
<tr><td><center>!s </center></td><td>Convert with <code><b>str()</b></code></td></tr>
<tr><td><center>!r </center></td><td>Convert with <code><b>repr()</b></code></td></tr>
<tr><td><center>!a </center></td><td>Convert with <code><b>ascii()</b></code></td></tr>
</table>
</li>
<li>In many cases, the result is the same regardless of which conversion function<br />
you use, as you can see in the example above. That being said, you won't often<br />
need the <conversion> component, so you won't spend a lot of time on it here.<br />
However, there are situations where it makes a difference, so it's good to be aware<br />
that you have the capability to force a specific conversion function if you need to.</li>
<!--li></li>
<li></li-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://realpython.com/python-formatted-output/" target=_blank>RealPython :: A Guide to the Newer Python String Format Techniques</a></li>
<!--li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li-->
</ul>
</html>
<html>
<ul>
<li>wurde mit Python 3.8 eingeführt;</li>
<li>a the self-documenting expression with the = character</li>
<li>Python programmers often use “printf-style“ debugging. <br />
In the (really) bad old days this was pretty wordy:
<code><pre>
print 'foo=', foo, 'bar=', bar
</pre></code>
f-strings make this slightly nicer to type:
<code><pre>
print(f'foo={foo} bar={bar}')
</pre></code>
But you still have to repeat yourself: you have to write<br />
out the *string* “foo“, and then the *expession* “foo“.<br />
<br />
<b>↠ Ergebnis / Lösung:</b>
<code><pre>
print(f'{foo=} {bar=}')
</pre></code>
Die beiden zuletzt genannten Statements haben die <br />
gleiche Ausgabe:
<code><pre>
foo=Jens bar=Mueller
foo='Jens' bar='Mueller'
</pre></code>
</li>
<li>Dieses Konstrukt vereinfacht das Erstellen von <br />
Debugging-Statements</li>
<br />
<li><b>Formating option:</b><br />
Um die Zahlenwerte formatieren zu können:
<code><pre>
print(f'{num1=:,}')
</pre></code></li>
<!--li></li>
<li></li>
<li></li>
<li></li-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="http://zetcode.com/python/fstring/" target=_blank rel="noreferrer noopener">
ZetCode :: Python f-string tutorial</a></li>
<li><a href="https://bugs.python.org/issue36817" target=_blank rel="noreferrer noopener">
Python bug tracker :: Issue 36817</a></li>
<!--li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li-->
</ul>
</html>
<html>
<ul>
<li>Die Formatierungsoption wird durch einen Doppelpunkt<br />
hinter der Variablen eingeleitet.</li>
<br />
<li><b>Nachkommastellen angeben:</b><br />
<code><pre>
print(f'{price:<u><b>.3</b></u>}')
</pre></code></li>
<li><b>1000er Trennzeichen angeben:</b><br />
<code><pre>
print(f'{price:<u><b>,</b></u>}')
</pre></code></li>
<li><b>Ausgabe der Debug‐Information (Zahlen) formatieren:</b><br />
<code><pre>
print(f'{price<u><b>=:,</b></u>}')
</pre></code></li>
<li><b>Formatierung der Stringlänge:</b><br />
<code><pre>
print(f'{price:<u><b>02</b></u>}')
</pre></code> <em>Variable “price“ zweistellig ausgeben, mit führender Null</em></li>
<br />
<li><b>Zahlen in anderer Zahl‐Darstellung ausgeben:</b><br />
<code><pre>
print(f'{num:<u><b>[xoe]</b></u>}')
</pre></code> <em>, dabei gilt:
<table>
<tr><td>“x“</td><td>hexadezimal</td></tr>
<tr><td>“o“</td><td>oktal</td></tr>
<tr><td>“e“</td><td>scientific</td></tr>
</table></em></li>
<li><b>links‐ / rechtsbündig:</b><br />
<code><pre>
</pre></code></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="http://zetcode.com/python/fstring/" target=_blank rel="noreferrer noopener">
ZetCode :: Python f-string tutorial</a></li>
</ul>
</html>
<html>
<ul>
<li>static type checker, experimental (Beta), optional</li>
<li>“static“ :: this means that it will check for <br />
errors without ever running your code</li>
<li>aktuell ist es noch in der Beta-Phase (<em>mypy is officially beta software</em>)</li>
<li>one of the main benefits of using a type checker is <b>getting errors <br />
at “compile time“ rather than at run time</b></li>
<li>takes advantage of Python 3's <b><i>type annotations</i></b> (auch: <b><i>type hints</i></b>)</li>
<li>während der Programmierung werden "static type checkings" <br />
in den Code eingefügt</li>
<li>der Befehl <b>“type“</b> gibt den Typ des Wertes zurück,<br /> <u>nicht</u> aber den Typ der Variablen!</li>
<li>Folgende Konstrukte können in Python 3 <br />
mit Annotations versehen werden:
<ol><li>function parameters</li><li>return values</li><li>variables</li></ol></li>
<li><h4>Setzen der Annotations:</h4>
<ol>
<li><b>Variablen annotieren:</b><br />
<i><variable>: <type></i> (der Doppelpunkt und das Blank sind wichtig!),<br />
z.B. <code><pre>def hello (name<u><b>: str</b></u>):
return f'Hello, {name}'</pre></code>
Neben str, int, float gibt es auch list, tuple, ...</li><br />
<li><b>Return value annotieren:</b><br />
<code><pre>
z.B. def hello (name: str)<u><b>‐> str</b></u>:
return f'Hello, {name}'
</pre></code>
Wenn die Funktion keinen Return Value definiert, wird als Typ <code><b>None</b></code> angegeben:
<code><pre>
z.B. def hello (name: str)<u><b>‐> None</b></u>:
print(f'Hello, {name}'
</pre></code>
</li>
<li><b>Argumente mit Default‐Werten werden wie folgt annotiert:</b>
<code><pre>
def greeting(name: str, excited<u><b>: bool = False</b></u>) -> str:
…
</pre></code>
</li>
<li><b>Dictionaries annotieren:</b><br />
z.B. <code><pre>menu: <u><b>Dict[str, int]</b></u> = {'coffee': 5, 'sandwich': 7, 'soup': 8}</pre></code>
</li>
<li><b>Für manche Annotations wird ein separates / weiteres Modul benötigt:</b>
<code><pre>import typing</pre></code>
Dies stellt u.a. folgende Annotations bereit:
<ul>
<li><b>Sequence</b> :: Das umfaßt die Typen list, tuple, set.<br />
z.B. eine Folge von Zahlen: Sequence[int]</li>
<li><b>Iterable</b> :: Das Objekt ist iterierbar (besitzt einen Iterator)<br />
z.B. alles, was iterierbar ist und Zahlen zurückgibt: Iterable[int]</li>
<li><b>Union</b> :: Mehrfach-Angabe von Typen<br />
z.B. sowohl int-Zahlen als auch float-Zahlen sollen akzeptiert werden: Union[int,float]</li>
<li><b>Optional</b> :: der (Rückgabe‐)Wert kann auch <code><b>None</b></code> sein<br />
z.B. Optional[int] bedeutet, daß ein Integer-Wert zurück‐<br />
gegeben werden soll, es ist aber auch ok, wenn es <code><b>None</b></code> ist</li>
</ul><br />
It defines annotation-friendly versions of many built-in types, as well as<br />
many new types designed for this purpose.</li><br />
</ol></li>
<li>Python selbst ignoriert diese <b><i>type annotations</i></b>.<br />
Man kann sie sich mittels des Attributes <b><code>__annotations__</code></b> anzeigen lassen.<br />
Andere Tools, wie z.B. <b>mypy</b>, greifen auf diese Annotations zu.
</li><br />
<li><b>Installation / Upgrade:</b><br />
<code><pre>pip3 install -U mypy</pre></code>
<li><b>Aufruf Type checking:</b><br />
<code><pre>mypy <file name></pre></code>
→ wenn es nichts zu beanstanden gibt, wird ausgegeben (in hellgrün):
<code><pre>
Success: no issues found in 1 source file
</pre></code></li>
<li>Auch wenn Python 3 notwendig ist, damit mypy verwendet werden kann, <br />
so ist mypy auch in der Lage, Python 2‐Code zu überprüfen.<br />
<br />
Dazu muss mypy mit der Option <code><b>‐‐py2</b></code> aufgerufen werden:<br />
<code><pre>
$ mypy ‐‐py2 program.py
</pre></code><br />
(s.a. <a href="https://mypy.readthedocs.io/en/stable/python2.html#python2" target=_blank>Python 2 ‐ Doku</a>)</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.linuxjournal.com/content/introducing-mypy-experimental-optional-static-type-checker-python" target=_blank>LinuxJournal :: mypy - Introduction</a> (downloaded)</li>
<li><a href="https://www.linuxjournal.com/content/pythons-mypy-advanced-usage" target=_blank>LinuxJournal :: mypy - Advanced usage</a> (downloaded)</li>
<li><a href="https://www.realpython.com/python-type-checking/" target=_blank>Python Type Checking Guide</a> (downloaded)</li>
<li><a href="http://www.mypy-lang.org/" target=_blank>mypy :: Homepage</a></li>
<li><a href="https://mypy.readthedocs.io/en/stable/introduction.html" target=_blank>Mypy ‐ The docs</a></li>
<!--
<li><a href="" target=_blank></a></li>
-->
</ul>
</html>
<html>
<ul>
<li><a href="https://entwickler.de/online/development/finde-den-fehler-114697.html" target=_blank>entwickler.de :: Finde den Fehler! - Unit Tests mit Python</a></li>
<li><a href="https://www.python-kurs.eu/python3_tests.php" target=_blank>Python-Kurs :: Fehler und Tests</a></li>
<li><a href="https://blog.ionelmc.ro/2014/05/25/python-packaging/#the-structure" target=_blank>ionel's codelog :: Packaging a python library</a></li>
<li><a href="https://pythontips.com/" target=_blank>Python tips</a>
</ul>
</html>
<html>
<ul>
<li>Der <code><b>pdb</b></code> kann auf folgende zwei Arten verwendet werden:<br />
<br />
<ol>
<li>auf der CommandLine:<code><pre>pdb3 scriptfile.py</pre></code></li>
<li>aus dem Programmcode heraus:<br /><br /><ul><li>Python3.7+ :<code><pre>breakpoint()</pre></code>
Calling <code><b>breakpoint()</b></code> will put you into pdb,<br />
which is the default Python debugger.<br />
<br />
<code><b>pdb</b></code> is part of the standard library, so it's<br />
always available.<br />
<br />
Als Prompt erscheint <code><b>(Pdb)</b></code><br />
<br /></li>
</li><li>Python3.6 oder älter :<code><pre>import pdb
…<br />pdb.set_trace()</pre></code></li></ul></li>
</ol></li>
<li>Folgende Befehle stehen u.a. zur Verfügung:<br />
<br />
<ul>
<li><b>help (oder kurz: h):</b><br />
<br />Mit help wird eine Übersicht über die wichtigsten Funktionen von pdb angezeigt.<br />
<br />
</li>
<li><b>step (oder kurz: s):</b><br />
<br />Mit step wird die aktuelle Zeile ausgeführt; der Debugger hält allerdings bei der nächst möglichen Stelle an (beispielsweise einem neuen Funktionsaufruf).<br />
<br />
</li>
<li><b>p und pp:</b><br />
<br />Mit <b>p</b> wird der angegebene Ausdruck ausgewertet und das Ergebnis angezeigt; beispielsweise gibt <code><pre>p variablenname</pre></code> den Wert der angegebenen Variablen zum aktuellen Zeitpunkt im Programm an.<br />
Mit pp wird das Ergebnis in “pretty print“-Form ausgegeben.<br />
<br />
</li>
<li><b>list (oder kurz: l):</b><br />
<br />Mit list wird der Code-Bereich ausgegeben, in dem man sich beim Debuggen aktuell im Programm befindet. Standardmäßig (und meist völlig ausreichend) werden elf Zeilen an Code ausgegeben, wobei sich die aktuelle Code-Zeile in der Mitte befindet und mit “‐>“ gekennzeichnet ist.<br />
<br />
</li>
<li><b>return (oder kurz: r):</b><br />
<br />Mit return wird das Programm bis zum Ende der aktuellen Funktion weiter ausgeführt.<br />
<br />
</li>
<li><b>break (oder kurz: b):</b><br />
<br />Wird break ohne weiteres Argument aufgerufen, gibt es alle aktuellen Haltepunkte (“Breakpoints“) und ihre laufende Nummer aus. Diese können ebenfalls mittels break manuell gesetzt werden:<br />
<ul>
<li>Wird break mit einer ganzzahligen Nummer als Argument aufgerufen, <br />
so wird ein Breakpoint an dieser Stelle im Quellcode des Programms gesetzt; das heißt, der Debugger hält an, wenn diese Stelle erreicht wird.</li>
<li>Wird break mit einem Funktionsnamen als Argument aufgerufen,<br />
so wird ein Breakpoint bei dieser Funktion gesetzt, das heißt, der Debugger hält jedes mal an, wenn diese Funktion aufgerufen wird.</li>
</ul>
<br />
</li>
<li><b>clear (oder kurz: cl):</b><br />
<br />Mit clear nummer kann der Breakpoint mit der angegebenen Nummer wieder gelöscht werden.<br />
<br />
</li>
<li><b>continue (oder kurz: c):</b><br />
<br />Mit continue wird das Programm bis zum Ende weiter ausgeführt, außer ein mit break gesetzter Breakpoint wird erreicht.<br />
<br />
</li>
<li><b>run bzw. restart:</b><br />
<br />Mit run beziehungsweise restart wird das zu debuggende Programm von Neuem gestartet. Wurde das Programm seit dem letzten Aufruf von pdb verändert, wird es neu geladen; Breakpoints bleiben dabei erhalten.<br />
<br />
</li>
<li><b>exit() bzw. quit():</b><br />
<br />Mit exit oder quit wird der Debugger beendet.<br />
<br />
</li>
<li><h4>pdb Command Reference</h4>
These pdb commands and their syntax and descriptions are from the Python 3.6 documentation.
<table>
<tr><th>Command</th><th>Syntax / Description</th></tr>
<tr><td>a</td><td>
a(rgs)
Print the argument list of the current function.</td></tr>
<tr><td>alias</td><td>
alias [name [command [parameter parameter ...] ]]
Create an alias called 'name' that executes 'command'. The command must *not* be enclosed
in quotes. Replaceable parameters can be indicated by %1, %2, and so on, while %* is
replaced by all the parameters. If no command is given, the current alias for name is shown. If
no name is given, all aliases are listed.
Aliases may be nested and can contain anything that can be legally typed at the pdb prompt.
Note! You *can* override internal pdb commands with aliases! Those internal commands are
then hidden until the alias is removed. Aliasing is recursively applied to the first word of the
command line; all other words in the line are left alone.
As an example, here are two useful aliases (especially when placed in the .pdbrc file):
# Print instance variables (usage "pi classInst")
alias pi for k in %1.__dict__.keys(): print("%1. ",k,"=",%1.__dict__[k])
# Print instance variables in self
alias ps pi self</td></tr>
<tr><td>args</td><td>
a(rgs)
Print the argument list of the current function.</td></tr>
<tr><td>b</td><td>
b(reak) [ ([filename:]lineno | function) [, condition] ]
Without argument, list all breaks.
With a line number argument, set a break at this line in the current file. With a function name,
set a break at the first executable line of that function. If a second argument is present, it is a
string specifying an expression which must evaluate to true before the breakpoint is honored.
The line number may be prefixed with a filename and a colon, to specify a breakpoint in
another file (probably one that hasn't been loaded yet). The file is searched for on sys.path; the
.py suffix may be omitted.</td></tr>
<tr><td>break</td><td>
b(reak) [ ([filename:]lineno | function) [, condition] ]
Without argument, list all breaks.
With a line number argument, set a break at this line in the current file. With a function name,
set a break at the first executable line of that function. If a second argument is present, it is a
string specifying an expression which must evaluate to true before the breakpoint is honored.
The line number may be prefixed with a filename and a colon, to specify a breakpoint in
another file (probably one that hasn't been loaded yet). The file is searched for on sys.path; the
.py suffix may be omitted.</td></tr>
<tr><td>bt</td><td>
w(here)
Print a stack trace, with the most recent frame at the bottom. An arrow indicates the "current
frame", which determines the context of most commands. 'bt' is an alias for this command.</td></tr>
<tr><td>c</td><td>
c(ont(inue))
Continue execution, only stop when a breakpoint is encountered.</td></tr>
<tr><td>cl</td><td>
cl(ear) filename:lineno
cl(ear) [bpnumber [bpn umber...]]
With a space separated list of breakpoint numbers, clear those breakpoints. Without argument,
clear all breaks (but first ask confirmation). With a filename:lineno argument, clear all breaks
at that line in that file.</td></tr>
<tr><td>clear</td><td>
cl(ear) filename:lineno
cl(ear) [bpnumber [bpn umber...]]
With a space separated list of breakpoint numbers, clear those breakpoints. Without argument,
clear all breaks (but first ask confirmation). With a filename:lineno argument, clear all breaks
at that line in that file.</td></tr>
<tr><td>commands</td><td>
commands [bpnumber]
(com) ... (com) end (Pdb)
Specify a list of commands for breakpoint number bpnumber. The commands themselves are
entered on the following lines. Type a line containing just 'end' to terminate the commands.
The commands are executed when the breakpoint is hit.
To remove all commands from a breakpoint, type commands and follow it immediately with
end; that is, give no commands.
With no bpnumber argument, commands refers to the last breakpoint set.
You can use breakpoint commands to start your program up again. Simply use the continue
command, or step, or any other command that resumes execution.
Specifying any command resuming execution (currently continue, step, next, return, jump, quit
and their abbreviations) terminates the command list (as if that command was immediately
followed by end). This is because any time you resume execution (even with a simple next or
step), you may encounter another breakpoint -- which could have its own command list,
leading to ambiguities about which list to execute.
If you use the 'silent' command in the command list, the usual message about stopping at a
breakpoint is not printed. This may be desirable for breakpoints that are to print a specific
message and then continue. If none of the other commands print anything, you will see no sign
that the breakpoint was reached.</td></tr>
<tr><td>condition</td><td>
condition bpnumber [condition]
Set a new condition for the breakpoint, an expression which must evaluate to true before the
breakpoint is honored. If condition is absent, any existing condition is removed; i.e., the
breakpoint is made unconditional.</td></tr>
<tr><td>cont</td><td>
c(ont(inue))
Continue execution, only stop when a breakpoint is encountered.</td></tr>
<tr><td>continue</td><td>
c(ont(inue))
Continue execution, only stop when a breakpoint is encountered.</td></tr>
<tr><td>d</td><td>
d(own) [count]
Move the current frame count (default one) levels down in the stack trace (to a newer frame).</td></tr>
<tr><td>debug</td><td>
debug code
Enter a recursive debugger that steps through the code argument (which is an arbitrary
expression or statement to be executed in the current environment).</td></tr>
<tr><td>disable</td><td>
disable bpnumber [bpnumber ...]
Disables the breakpoints given as a space separated list of breakpoint numbers. Disabling a
breakpoint means it cannot cause the program to stop execution, but unlike clearing a
breakpoint, it remains in the list of breakpoints and can be (re-)enabled.</td></tr>
<tr><td>display</td><td>
display [expression]
Display the value of the expression if it changed, each time execution stops in the current
frame.
Without expression, list all display expressions for the current frame.</td></tr>
<tr><td>down</td><td>
d(own) [count]
Move the current frame count (default one) levels down in the stack trace (to a newer frame).</td></tr>
<tr><td>enable</td><td>
enable bpnumber [bpnumber ...]
Enables the breakpoints given as a space separated list of breakpoint numbers.</td></tr>
<tr><td>EOF</td><td>
EOF
Handles the receipt of EOF as a command.</td></tr>
<tr><td>exit</td><td>
q(uit)
exit Quit from the debugger. The program being executed is aborted.</td></tr>
<tr><td>h</td><td>
h(elp)
Without argument, print the list of available commands. With a command name as argument,
print help about that command. "help pdb" shows the full pdb documentation. "help exec"
gives help on the ! command.</td></tr>
<tr><td>help</td><td>
h(elp)
Without argument, print the list of available commands. With a command name as argument,
print help about that command. "help pdb" shows the full pdb documentation. "help exec"
gives help on the ! command.</td></tr>
<tr><td>ignore</td><td>
ignore bpnumber [count]
Set the ignore count for the given breakpoint number. If count is omitted, the ignore count is
set to 0. A breakpoint becomes active when the ignore count is zero. When non-zero, the count
is decremented each time the breakpoint is reached and the breakpoint is not disabled and any
associated condition evaluates to true.</td></tr>
<tr><td>interact</td><td>
interact
Start an interactive interpreter whose global namespace contains all the (global and local)
names found in the current scope.</td></tr>
<tr><td>j</td><td>
j(ump) lineno
Set the next line that will be executed. Only available in the bottom-most frame. This lets you
jump back and execute code again, or jump forward to skip code that you don't want to run.
It should be noted that not all jumps are allowed -- for instance it is not possible to jump into
the middle of a for loop or out of a finally clause.</td></tr>
<tr><td>jump</td><td>
j(ump) lineno
Set the next line that will be executed. Only available in the bottom-most frame. This lets you
jump back and execute code again, or jump forward to skip code that you don't want to run.
It should be noted that not all jumps are allowed -- for instance it is not possible to jump into
the middle of a for loop or out of a finally clause.</td></tr>
<tr><td>l</td><td>
l(ist) [first [,last] | .]
List source code for the current file. Without arguments, list 11 lines around the current line or
continue the previous listing. With . as argument, list 11 lines around the current line. With one
argument, list 11 lines starting at that line. With two arguments, list the given range; if the
second argument is less than the first, it is a count.
The current line in the current frame is indicated by "->". If an exception is being debugged,
the line where the exception was originally raised or propagated is indicated by ">>", if it
differs from the current line.</td></tr>
<tr><td>list</td><td>
l(ist) [first [,last] | .]
List source code for the current file. Without arguments, list 11 lines around the current line or
continue the previous listing. With . as argument, list 11 lines around the current line. With one
argument, list 11 lines starting at that line. With two arguments, list the given range; if the
second argument is less than the first, it is a count.
The current line in the current frame is indicated by "->". If an exception is being debugged,
the line where the exception was originally raised or propagated is indicated by ">>", if it
differs from the current line.</td></tr>
<tr><td>ll</td><td>
longlist | ll
List the whole source code for the current function or frame.</td></tr>
<tr><td>longlist</td><td>
longlist | ll
List the whole source code for the current function or frame.</td></tr>
<tr><td>n</td><td>
n(ext)
Continue execution until the next line in the current function is reached or it returns.</td></tr>
<tr><td>next</td><td>
n(ext)
Continue execution until the next line in the current function is reached or it returns.</td></tr>
<tr><td>p</td><td>
p expression
Print the value of the expression.</td></tr>
<tr><td>pp</td><td>
pp expression
Pretty-print the value of the expression.</td></tr>
<tr><td>q</td><td>
q(uit)
exit Quit from the debugger. The program being executed is aborted.</td></tr>
<tr><td>quit</td><td>
q(uit)
exit Quit from the debugger. The program being executed is aborted.</td></tr>
<tr><td>r</td><td>
r(eturn)
Continue execution until the current function returns.</td></tr>
<tr><td>restart</td><td>
run [args...]
Restart the debugged python program. If a string is supplied it is split with "shlex", and the
result is used as the new sys.argv. History, breakpoints, actions and debugger options are
preserved. "restart" is an alias for "run".</td></tr>
<tr><td>return</td><td>
r(eturn)
Continue execution until the current function returns.</td></tr>
<tr><td>retval</td><td>
retval
Print the return value for the last return of a function.</td></tr>
<tr><td>run</td><td>
run [args...]
Restart the debugged python program. If a string is supplied it is split with "shlex", and the
result is used as the new sys.argv. History, breakpoints, actions and debugger options are
preserved. "restart" is an alias for "run".</td></tr>
<tr><td>rv</td><td>
retval
Print the return value for the last return of a function.</td></tr>
<tr><td>s</td><td>
s(tep)
Execute the current line, stop at the first possible occasion (either in a function that is called or
in the current function).</td></tr>
<tr><td>source</td><td>
source expression
Try to get source code for the given object and display it.</td></tr>
<tr><td>step</td><td>
s(tep)
Execute the current line, stop at the first possible occasion (either in a function that is called or
in the current function).</td></tr>
<tr><td>tbreak</td><td>
tbreak [ ([filename:]lineno | function) [, condition] ]
Same arguments as break, but sets a temporary breakpoint: it is automatically deleted when
first hit.</td></tr>
<tr><td>u</td><td>
u(p) [count]
Move the current frame count (default one) levels up in the stack trace (to an older frame).</td></tr>
<tr><td>unalias</td><td>
unalias name
Delete the specified alias.</td></tr>
<tr><td>undisplay</td><td>
undisplay [expression]
Do not display the expression any more in the current frame.
Without expression, clear all display expressions for the current frame.</td></tr>
<tr><td>unt</td><td>
unt(il) [lineno]
Without argument, continue execution until the line with a number greater than the current one
is reached. With a line number, continue execution until a line with a number greater or equal
to that is reached. In both cases, also stop when the current frame returns.</td></tr>
<tr><td>until</td><td>
unt(il) [lineno]
Without argument, continue execution until the line with a number greater than the current one
is reached. With a line number, continue execution until a line with a number greater or equal
to that is reached. In both cases, also stop when the current frame returns.</td></tr>
<tr><td>up</td><td>
u(p) [count]
Move the current frame count (default one) levels up in the stack trace (to an older frame).</td></tr>
<tr><td>w</td><td>
w(here)
Print a stack trace, with the most recent frame at the bottom. An arrow indicates the "current
frame", which determines the context of most commands. 'bt' is an alias for this command.</td></tr>
<tr><td>whatis</td><td>
whatis arg
Print the type of the argument.</td></tr>
<tr><td>where</td><td>
w(here)
Print a stack trace, with the most recent frame at the bottom. An arrow indicates the "current
frame", which determines the context of most commands. 'bt' is an alias for this command.</td></tr>
</table>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.grund-wissen.de/informatik/python/debugging-logging-testing.html" target=_blank>Grundwissen : Informatik - Debugging, logging, testing</a></li>
<li><a href="https://realpython.com/python-debugging-pdb/" target=_blank>RealPython :: Python debugger pdb</a></li>
</ul>
</html>
<html>
<meta charset="utf-8" pdm />
<ul>
<li>“<em>Python Development Master</em>“
</li>
<br />
<li>Python Package and Dependency Manager
</li>
<br />
<li>it installs and manages packages in a similar way to<br />
npm that doesn't need to create a virtualenv</li>
<br />
<li>It installs dependencies into the local package directory<br />
__package__ and makes Python interpreters aware of it<br />
with a very simple setup. It is not only an implementation of<br />
PEP 582 but also the only package manager that supports<br />
PEP 621, a new metadata format based on pyproject.toml<br />
which becomes the standard recently. </li>
<br />
<li>Besides, PDM uses the same dependency resolver as pip<br />
and has a full‐featured plugin system, allowing for commu‐<br />
nity‐contributed plugins to enhance the functionalities.</li>
<br />
<li>In PDM, PEP 582 is not mandatory, you can also stick with<br />
virtualenv. PDM can detect existing venvs but not create new ones.</li>
<br />
<li>Another thing that is noteworthy is its dependency resolution<br />
mechanism ‐‐ it tries to lock versions that are compatible with<br />
the requires‐python value of the project:
<code><pre>pdm add ‐d pytest</pre></code> </li>
<li><h3>Installation</h3>
PDM requires Python 3.7+ to be installed. It works on multiple<br />
platforms including Windows, Linux and MacOS.<br />
<br />
PDM provides an installation script that will install PDM into an<br />
isolated environment.<br />
<code><pre>curl ‐sSL https://raw.githubusercontent.com/pdm-project/pdm/main/install-pdm.py | python3 ‐ </pre></code>
u.U. ist es besser:
<code><pre>curl ‐sSL https://raw.githubusercontent.com/pdm-project/pdm/main/install-pdm.py | /usr/bin/python3 ‐ </pre></code>
<details><summary>⇒ Ausgabe:</summary><br />
<code><pre>
curl: (3) Failed to convert ‐sSL to ACE; string contains a disallowed character
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 14108 100 14108 0 0 90435 0 --:--:-- --:--:-- --:--:-- 89859
Installing PDM (2.1.4): Creating virtual environment
Installing PDM (2.1.4): Installing PDM and dependencies
Installing PDM (2.1.4): Making binary at /home/mueller/.local/bin
Usage: pdm [-h] [-V] [-c CONFIG] [-v] [-I] [--pep582 [SHELL]]
{add,build,cache,completion,config,export,import,info,init,install,list,lock,plugin,publish,remove,run,search,show,sync,update,use,venv} ...
____ ____ __ ___
/ __ \/ __ \/ |/ /
/ /_/ / / / / /|_/ /
/ ____/ /_/ / / / /
/_/ /_____/_/ /_/
Commands:
{add,build,cache,completion,config,export,import,info,init,install,list,lock,plugin,publish,remove,run,search,show,sync,update,use,venv}
add Add package(s) to pyproject.toml and install them
build Build artifacts for distribution
cache Control the caches of PDM
completion Generate completion scripts for the given shell
config Display the current configuration
export Export the locked packages set to other formats
import Import project metadata from other formats
info Show the project information
init Initialize a pyproject.toml for PDM
install Install dependencies from lock file
list List packages installed in the current working set
lock Resolve and lock dependencies
plugin Manage the PDM plugins
publish Build and publish the project to PyPI
remove Remove packages from pyproject.toml
run Run commands or scripts with local packages loaded
search Search for PyPI packages
show Show the package information
sync Synchronize the current working set with lock file
update Update package(s) in pyproject.toml
use Use the given python version or path as base interpreter
venv Virtualenv management
Optional Arguments:
-h, --help show this help message and exit
-V, --version show the version and exit
-c CONFIG, --config CONFIG
Specify another config file path(env var: PDM_CONFIG_FILE)
-v, --verbose -v for detailed output and -vv for more detailed
-I, --ignore-python Ignore the Python path saved in the .pdm.toml config
--pep582 [SHELL] Print the command line to be eval'd by the shell
Successfully installed: PDM (2.1.4) at /home/mueller/.local/bin/pdm
mueller@Debian-Laptop:~/programming/python$
</pre></code>
</details>
<br />
The installer will install PDM into the user site and the location<br />
depends on the system:<br />
<br />
<ul>
<li><b>$HOME/.local/bin</b> for Unix</li>
<li><b>%APPDATA%\Python\Scripts</b> on Windows</li>
</ul>
</li>
<li><h3>Shell Completion</h3>
PDM supports generating completion scripts for Bash, Zsh, Fish<br />
or Powershell. Here the location for bash:
<code><pre>pdm completion bash > /etc/bash_completion.d/pdm.bash-completion</pre></code>
</li>
<li><h3>Anwendung</h3>
<ul>
<li>virtuelle Umgebung erstellen:<br />
in das gewünschte Verzeichnis wechseln und den Befehl aufrufen:
<code><pre>pdm init</pre></code>
<details><summary> ⇒ Ausgabe: </summary><br />
z.B. <code><pre>
Creating a pyproject.toml for PDM...
Please enter the Python interpreter to use
0. /home/mueller/programming/python/PythonWorkout/pdm-test/.venv/bin/python (3.9)
1. /usr/bin/python3.9 (3.9)
2. /usr/local/bin/python3.8 (3.8)
3. /home/mueller/.local/share/pdm/venv/bin/python (3.9)
Please select (0):
Using Python interpreter: /home/mueller/programming/python/PythonWorkout/pdm-test/.venv/bin/python (3.9)
Is the project a library that will be uploaded to PyPI [y/n] (n):
License(SPDX name) (MIT):
Author name (Jens "Bibo" Mueller):
Author email (j-a-mueller@alice-dsl.net):
Python requires('*' to allow any) (>=3.9): *
Changes are written to pyproject.toml.
mueller@Debian-Laptop:~/programming/python/PythonWorkout/pdm-test$
</pre></code>
<br />
</details>
</li>
</ul>
</li>
<li><h3>Packages hinzufügen</h3>
<ul>
<li>benötige Packete hinzufügen:
<code><pre>pdm add <pckge></pre></code>
<details><summary> ⇒ Ausgabe: </summary><br />
z.B. pytest:
<code><pre>
mueller@Debian-Laptop:~/programming/python/PythonWorkout/pdm-test$ pdm add pytest
Adding packages to default dependencies: pytest
Lock successful
Changes are written to pdm.lock.
Changes are written to pyproject.toml.
Synchronizing working set with lock file: 3 to add, 0 to update, 0 to remove
Install setuptools 30.1.0 successful
Install py 1.4.34 successful
Install pytest 3.2.5 successful
All complete!
mueller@Debian-Laptop:~/programming/python/PythonWorkout/pdm-test$
</pre></code>
<br />
</details>
</li>
</ul>
</li>
<li><h3>Aktuelle Configuration anzeigen</h3>
<ul>
<li>Befehl:
<code><pre>pdm config</pre></code>
<details><summary> ⇒ Ausgabe: </summary><br />
<code><pre>
mueller@Debian-Laptop:~/programming/python/PythonWorkout/pdm-test$ pdm config
Site/default configuration (/etc/xdg/pdm/config.toml):
build_isolation = True
cache_dir = /home/mueller/.cache/pdm
check_update = True
global_project.fallback = False
global_project.fallback_verbose = True
global_project.path = /home/mueller/.config/pdm/global-project
global_project.user_site = False
install.cache = False
install.cache_method = symlink
install.parallel = True
project_max_depth = 5
pypi.json_api = False
pypi.url = https://pypi.org/simple
pypi.verify_ssl = True
python.use_pyenv = True
python.use_venv = True
strategy.resolve_max_rounds = 10000
strategy.save = minimum
strategy.update = reuse
venv.backend = virtualenv
venv.in_project = True
venv.location = /home/mueller/.local/share/pdm/venvs
Home configuration (/home/mueller/.config/pdm/config.toml):
Project configuration (/home/mueller/programming/python/PythonWorkout/pdm-test/.pdm.toml):
python.path = /home/mueller/programming/python/PythonWorkout/pdm-test/.venv/bin/python
mueller@Debian-Laptop:~/programming/python/PythonWorkout/pdm-test$
</pre></code>
<br />
</details>
</li>
</ul>
</li>
<li><h3>Infos zum Projekt ausgeben</h3>
<ul>
<li>Befehl:
<code><pre>pdm info</pre></code>
</li>
</ul>
</li>
<li><h3>Infos zu einem Paket ausgeben</h3>
<ul>
<li>Befehl:
<code><pre>pdm show <pckge></pre></code>
z.B. für pytest:
<code><pre>pdm show pytest</pre></code>
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://frostming.com/2021/01-22/introducing-pdm/" target="_blank" rel="noreferrer noopener">Frost's Blog :: You don't really need a virtualenv</a></li>
<li><a href="https://pdm.fming.dev/latest/" target="_blank" rel="noreferrer noopener">PDM :: Homepage</a></li>
<li><a href="https://github.com/pdm-project/pdm" target="_blank" rel="noreferrer noopener">GitHub‐Repo :: PDM</a></li>
<li><a href="https://pythonawesome.com/a-modern-python-package-manager-with-pep-582-support/"
target="_blank" rel="noreferrer noopener">Python Awesome:: PDM</a></li>
</ul>
</html>
<html>
<ul>
<li>Der Befehl <code><b>pip</b></code> ist aktuell (Stand: 2019-08-10)<br />
sowohl über die Anaconda-Umgebung<br />
aufrufbar als auch über Unix-Shell.
</li>
<br />
<li>Installierte Version ermitteln :: <code><b>pip ‐‐version</b></code>
</li>
<br />
<li>Aktualisierung :: <code><b>pip install --upgrade pip</b></code><br />
alternativ in einer virtuellen Umgebung: <code><b>python3 -m pip install --upgrade pip</b></code>
</li>
<br />
<li>Wenn bei einer Installation (<code><b>pip install <i>PACKAGE NAME</i></b></code>)<br />
die Fehlermeldung <code><pre> error: could not write to 'build/lib.linux-x86_64-3.6/spacy/lang/da/lemmatizer.py': No space left on device</pre></code> erscheint, dann könnte das tmp-Verzeichnis nicht <br />
ausreichend sein.<br />
<br />
In diesem Fall ist dem o.g. Aufruf die Opiton <code><b>-b / --build</b></code><br />
mit der Angabe eines Verzeichnisses, das auf einerm FIle‐<br />
system liegt, welches ausreichend Platz bietet, hinzuzufügen.
</li>
<br />
<li><b>Fehlermeldung:</b>
<pre><code>error: externally-managed-environment</code></pre>
<b>Lösung:</b><br />
<a href="https://itsfoss.com/externally-managed-environment/"
target="_blank" rel="noreferrer noopener">
IT's FOSS</a>
</ul>
</html>
<html>
<code><pre>
(base) mueller@Debian-Laptop:~/programming/python$ pip install --help
<b>Usage:</b>
pip install [options] <requirement specifier> [package-index-options] ...
pip install [options] -r <requirements file> [package-index-options] ...
pip install [options] [-e] <vcs project url> ...
pip install [options] [-e] <local project path> ...
pip install [options] <archive url/path> ...
<b>Description:</b>
Install packages from:
- PyPI (and other indexes) using requirement specifiers.
- VCS project urls.
- Local project directories.
- Local or remote source archives.
pip also supports installing from "requirements files", which provide
an easy way to specify a whole environment to be installed.
<b>Install Options:</b>
-r, --requirement <file> Install from the given requirements file. This option can be used multiple times.
-c, --constraint <file> Constrain versions using the given constraints file. This option can be used multiple
times.
--no-deps Don't install package dependencies.
--pre Include pre-release and development versions. By default, pip only finds stable versions.
-e, --editable <path/url> Install a project in editable mode (i.e. setuptools "develop mode") from a local project
path or a VCS url.
-t, --target <dir> Install packages into <dir>. By default this will not replace existing files/folders in
<dir>. Use --upgrade to replace existing packages in <dir> with new versions.
--platform <platform> Only use wheels compatible with <platform>. Defaults to the platform of the running system.
--python-version <python_version>
Only use wheels compatible with Python interpreter version <version>. If not specified,
then the current system interpreter minor version is used. A major version (e.g. '2') can
be specified to match all minor revs of that major version. A minor version (e.g. '34')
can also be specified.
--implementation <implementation>
Only use wheels compatible with Python implementation <implementation>, e.g. 'pp', 'jy',
'cp', or 'ip'. If not specified, then the current interpreter implementation is used. Use
'py' to force implementation-agnostic wheels.
--abi <abi> Only use wheels compatible with Python abi <abi>, e.g. 'pypy_41'. If not specified, then
the current interpreter abi tag is used. Generally you will need to specify
--implementation, --platform, and --python-version when using this option.
--user Install to the Python user install directory for your platform. Typically ~/.local/, or
%APPDATA%\Python on Windows. (See the Python documentation for site.USER_BASE for full
details.)
--root <dir> Install everything relative to this alternate root directory.
--prefix <dir> Installation prefix where lib, bin and other top-level folders are placed
-b, --build <dir> Directory to unpack packages into and build in. Note that an initial build still takes
place in a temporary directory. The location of temporary directories can be controlled by
setting the TMPDIR environment variable (TEMP on Windows) appropriately. When passed, build
directories are not cleaned in case of failures.
--src <dir> Directory to check out editable projects into. The default in a virtualenv is "<venv
path>/src". The default for global installs is "<current dir>/src".
-U, --upgrade Upgrade all specified packages to the newest available version. The handling of
dependencies depends on the upgrade-strategy used.
--upgrade-strategy <upgrade_strategy>
Determines how dependency upgrading should be handled [default: only-if-needed]. "eager" -
dependencies are upgraded regardless of whether the currently installed version satisfies
the requirements of the upgraded package(s). "only-if-needed" - are upgraded only when
they do not satisfy the requirements of the upgraded package(s).
--force-reinstall Reinstall all packages even if they are already up-to-date.
-I, --ignore-installed Ignore the installed packages (reinstalling instead).
--ignore-requires-python Ignore the Requires-Python information.
--no-build-isolation Disable isolation when building a modern source distribution. Build dependencies specified
by PEP 518 must be already installed if this option is used.
--install-option <options> Extra arguments to be supplied to the setup.py install command (use like --install-option="
--install-scripts=/usr/local/bin"). Use multiple --install-option options to pass multiple
options to setup.py install. If you are using an option with a directory path, be sure to
use absolute path.
--global-option <options> Extra global options to be supplied to the setup.py call before the install command.
--compile Compile Python source files to bytecode
--no-compile Do not compile Python source files to bytecode
--no-warn-script-location Do not warn when installing scripts outside PATH
--no-warn-conflicts Do not warn about broken dependencies
--no-binary <format_control>
Do not use binary packages. Can be supplied multiple times, and each time adds to the
existing value. Accepts either :all: to disable all binary packages, :none: to empty the
set, or one or more package names with commas between them. Note that some packages are
tricky to compile and may fail to install when this option is used on them.
--only-binary <format_control>
Do not use source packages. Can be supplied multiple times, and each time adds to the
existing value. Accepts either :all: to disable all source packages, :none: to empty the
set, or one or more package names with commas between them. Packages without binary
distributions will fail to install when this option is used on them.
--prefer-binary Prefer older binary packages over newer source packages.
--no-clean Don't clean up build directories.
--require-hashes Require a hash to check each requirement against, for repeatable installs. This option is
implied when any package in a requirements file has a --hash option.
--progress-bar <progress_bar>
Specify type of progress to be displayed [off|on|ascii|pretty|emoji] (default: on)
<b>Package Index Options:</b>
-i, --index-url <url> Base URL of Python Package Index (default https://pypi.org/simple). This should point to a
repository compliant with PEP 503 (the simple repository API) or a local directory laid out
in the same format.
--extra-index-url <url> Extra URLs of package indexes to use in addition to --index-url. Should follow the same
rules as --index-url.
--no-index Ignore package index (only looking at --find-links URLs instead).
-f, --find-links <url> If a url or path to an html file, then parse for links to archives. If a local path or
file:// url that's a directory, then look for archives in the directory listing.
--process-dependency-links Enable the processing of dependency links.
<b>General Options:</b>
-h, --help Show help.
--isolated Run pip in an isolated mode, ignoring environment variables and user configuration.
-v, --verbose Give more output. Option is additive, and can be used up to 3 times.
-V, --version Show version and exit.
-q, --quiet Give less output. Option is additive, and can be used up to 3 times (corresponding to
WARNING, ERROR, and CRITICAL logging levels).
--log <path> Path to a verbose appending log.
--proxy <proxy> Specify a proxy in the form [user:passwd@]proxy.server:port.
--retries <retries> Maximum number of retries each connection should attempt (default 5 times).
--timeout <sec> Set the socket timeout (default 15 seconds).
--exists-action <action> Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort).
--trusted-host <hostname> Mark this host as trusted, even though it does not have valid or any HTTPS.
--cert <path> Path to alternate CA bundle.
--client-cert <path> Path to SSL client certificate, a single file containing the private key and the
certificate in PEM format.
--cache-dir <dir> Store the cache data in <dir>.
--no-cache-dir Disable the cache.
--disable-pip-version-check
Don't periodically check PyPI to determine whether a new version of pip is available for
download. Implied with --no-index.
--no-color Suppress colored output
(base) mueller@Debian-Laptop:~/programming/python$
</pre></code>
</html>
<html>
<code><pre>
(exercise_06) mueller@Debian-Laptop:~/programming/python/PythonWorkout/exercise_06$ pip uninstall --help
Usage:
pip uninstall [options] <package> ...
pip uninstall [options] -r <requirements file> ...
Description:
Uninstall packages.
pip is able to uninstall most installed packages. Known exceptions are:
- Pure distutils packages installed with ``python setup.py install``, which
leave behind no metadata to determine what files were installed.
- Script wrappers installed by ``python setup.py develop``.
Uninstall Options:
-r, --requirement <file> Uninstall all the packages listed in the given requirements file. This option can be used
multiple times.
-y, --yes Don't ask for confirmation of uninstall deletions.
General Options:
-h, --help Show help.
--isolated Run pip in an isolated mode, ignoring environment variables and user configuration.
-v, --verbose Give more output. Option is additive, and can be used up to 3 times.
-V, --version Show version and exit.
-q, --quiet Give less output. Option is additive, and can be used up to 3 times (corresponding to
WARNING, ERROR, and CRITICAL logging levels).
--log <path> Path to a verbose appending log.
--proxy <proxy> Specify a proxy in the form [user:passwd@]proxy.server:port.
--retries <retries> Maximum number of retries each connection should attempt (default 5 times).
--timeout <sec> Set the socket timeout (default 15 seconds).
--exists-action <action> Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort).
--trusted-host <hostname> Mark this host as trusted, even though it does not have valid or any HTTPS.
--cert <path> Path to alternate CA bundle.
--client-cert <path> Path to SSL client certificate, a single file containing the private key and the certificate
in PEM format.
--cache-dir <dir> Store the cache data in <dir>.
--no-cache-dir Disable the cache.
--disable-pip-version-check
Don't periodically check PyPI to determine whether a new version of pip is available for
download. Implied with --no-index.
--no-color Suppress colored output
</pre></code>
</html>
<html>
<ul>
<li>ist Bestandteil des Python-Pakets <b>pip-tools</b></li>
<li><b>pip-tools - Workflow ::</b><br />
<img src="./pictures/pip-tools_Workflow.png" height=337 width=544</li>
<li><em>???Unterschied zu pip-freeze???</em></li>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li>File "RomanImankulov_Python code cleanup for beginners-12 steps to readable and maintainable code.pdf"</li>
<li><a href=""https://pypi.org/project/pip-tools/ target=_blank>PyPi :: pip-tools</a></li>
<!--li></li-->
</ul>
</html>
<html>
<ul>
<li>Erstellen einer virtuellen Entwicklungsumgebung</li>
<li><h3>Installation:</h3>
<code><pre>pip install pipenv</pre></code>
</li>
<li><h3>Virtuelle Umgebung aktivieren:</h3>
<ul>
<li>in das Verzeichnis wechseln, das die virtuelle Umgebung enthalten soll:<br />
<code><b>cd <<em>DIR</em>></b></code></li>
<br />
<li>pipenv‐Befehl aufrufen, um die virtuelle Umgebung zu aktivieren:<br />
<code><pre>pipenv shell</pre></code></li>
</ul>
</li>
<li><h3>Weitere Pakete installieren:</h3>
<code><pre>pipenv install <<em>PACKAGE</em>></pre></code>
⇒ empfehlenswerte Pakete:
<ul>
<li>pytest</li>
<li>black</li>
<li>pylint</li>
</ul>
</li>
<li><code><b>pipenv graph</b></code></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://realpython.com/pipenv-guide/" target="_blank" rel="noreferrer noopener">Real Python :: pipenv - Guide</a></li>
<li><a href="https://pipenv.pypa.io/en/latest/" target="_blank" rel="noreferrer noopener">Pipenv :: Homepage</a></li>
<!--
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
-->
</ul>
</html>
<html>
<ul>
<li><code><b>pipwrap -r</b></code></li>
<br />
<li><code><b>pipwrap -x</b></code><br />
alle “herrenlose“ Packages / Module (in der Venv) werden gelöscht</li>
</ul>
<h3>Links:</h3>
</html>
<html>
<ul>
<li>is a tool for dependency management and packaging in Python</li>
<li>creating virtual environments</li>
<li>alternative to pipenv</li>
<li>a kind of all-in-one project management tool</li>
<li>it allows you to declare the libraries your Python project depends on and<br />
it will manage (install/update) them for you.</li>
<li>With Poetry, Python finally has a graceful way to manage virtual <br />
environments and dependencies for development projects. </li>
</ul>
<h3>Installation</h3>
<ul>
<li><b>Recommended way:</b><br />
Poetry provides a custom installer that will install poetry. <br />
The installation will be isolated from the rest of your system by <br />
vendorizing its dependencies.</li>
<li>You only need to install Poetry once. It will automatically pick up <br />
the current Python version and use it to create virtualenvs accordingly.</li>
<li>The installer installs the poetry tool to Poetry's bin directory. <br />
→ On Unix :: <code><b>$HOME/.poetry/bin</b></code></li>
</ul>
<h3>Create a Poetry-managed Python project</h3>
<ul>
<li>Befehl: <code><b> poetry new <em><project_name></em></b></code></li>
<br />
<li>The Poetry project scaffold includes the following:
<ul>
<li><b>pyproject.toml</b><br />
the definition file for the project. Poetry manages this definition for you.<br />
If you know what you're doing, you can edit this file directly, but most of<br />
the time you won't need to.</li>
<li><b>README.rst </b><br />
an empty README file in ReStructuredText format, the file format used for Python documentation. (There is no rule that says you must use .rst format for your docs; you can use Markdown for simpler cases.)</li>
<li><b>tests </b><br />
a subdirectory with scaffolding for unit tests. If you aren't in the habit of writing tests for your new projects, you should be!</li>
<li><b><em>Project dir</em></b><br />
And finally, a subdirectory with the project name that contains the code for your project.</li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://python-poetry.org/" target=_blank>Poetry :: Homepage</a></li>
<li><a href="https://www.infoworld.com/article/3527850/how-to-manage-python-projects-with-poetry.html" target=_blank>InfoWorld :: How to manage Python projects with Poetry</a></li>
</ul>
</html>
<html>
Es gibt folgende drei Möglichkeiten, um die Ausgabe von Strings zu formatieren:
<ol>
<li><b>mittels %‐Operator:</b><br />
Dies ist die älteste Möglichkeit;<br />
Es verwendet den %‐Operator und klassische <br />
Format‐Spezifizierer wie %s und %d;
<code><pre>'%s, %d' %(string, int<em>(decimal)</em>)</pre></code></li>
<li><b>mittels format‐Funktion:</b><br />
Mit Python 3.0 wurde die Funktion <code><b>format()</b></pre></code> eingeführt;
<code><pre>'{},{}'.format(stringVar, intVar)</pre></code></li>
<li><b>mittels f‐strings:</b><br />
Ab Python 3.6 können auch die sog. <b>f‐strings</b> eingesetzt werden;
<code><pre>f'{name},{age}'</pre></code></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="http://zetcode.com/python/fstring/" target=_blank>ZetCode :: Python f‐string tutorial</a></li>
</ul>
</html>
<html>
<ul>
<li>Visueller Debugger</li>
<li><h3>Installation</h3>
<code><pre>
pip3 install pvdb
</pre></code></li>
<li><h3>Aufruf</h3>
<code><pre>pvdb <em><FileName></em>
</code></pre></li>
<li></li>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li></li>
</ul>
</html>
<html>
<ul>
<li><code><b>C0303: Trailing whitespace (trailing‐whitespace)</b></code> :: <br />
die Zeile endet mit Leerzeichen: <code>… random value $</code><br />
Korrektur: <code>… random value$</code></li>
<br />
<li><code><b>C0325: Unnecessary parens after [ 'if' | 'return' ] keyword (superfluous‐parens)</b></code> :: <br />
Es werden (runde) Klammern verwendet, obwohl das nicht notwendig ist.<br />
This one can be turned of with the argument: <code>‐‐ignore‐superfluous-parens</code>)
</li>
<br />
<li><code><b>C0111: Missing function docstring (missing'docstring)</b></code> :: <br />
Link: <a href="http://pylint-messages.wikidot.com/messages:c0111" target="_blank" rel="_noreferrer noopener">pylint message C0111</a><br />
Eine Funktion / Methode / Klasse besitzt keine Dokumentation (“docstring“)
</li>
<br />
<li><code><b>C0103:: Variable name “<i>xyz</i>“ doesn't conform to snake_case naming style (invalid-name)</b></code> :: <br />
Die Variable entspricht nicht der Namenskonvention <br />
resp. des Style guides für Variablennamen. <br />
Snake case combines words by replacing each space <br />
with an underscore (_) and, in the all caps version, all <br />
letters are capitalized, as follows:<br />
<br />
<ul>
<li><b>Raw: </b><code><b>user login count</b></code></li>
<br />
<li>(*) <b>Snake Case: </b><code><b>user_login_count</b></code></li>
<br />
<li><b>Snake Case (All Caps):</b> <code><b>USER_LOGIN_COUNT</b></code></li>
</ul>
<br />
This style, when capitalized, is often used as a convention <br />
in declaring constants in many languages. When lower cased,<br />
it is used conventionally in declaring database field names.
</li>
<br />
<li><code><b>E0602: Undefined variable 'random' (undefined-variable)</b></code> :: <br />
Die angegebene Variable ist _NICHT_ definiert (z.B. fehlt der Import eines Moduls)
</li>
<br />
<li><code><b>E0001: invalid syntax (<unknown>, line 21) (syntax-error)</b></code> :: <br /></li>
<br />
<li><code><b>C0326: No space allowed after bracket</b></code>
<code><pre>if [ "a", "e", "i", "o", "u" ] in orig_word:<br />
^ (bad-whitespace)</pre></code></li>
<br />
<li><code><b>C0326: No space allowed before bracket</b></code>
<code><pre>if [ "a", "e", "i", "o", "u" ] in orig_word:<br />
^ (bad-whitespace) </pre></code></li>
<br />
<li><code><b>C0122: Comparison should be orig_word[0] == 'a' (misplaced-comparison-constant)</b></code> :: <br /></li>
<br />
<li><code><b>R0903: Too few public methods (0/2) (too-few-public-methods)</b></code> :: <br /></li>
<br />
<li><code><b>C0305: Trailing newlines (trailing-newlines)</b></code> :: <br />
die letzte(n) Zeile(n) sind Leerzeilen ⇒ diese Leerzeilen löschen</li>
<br />
<li><code><b>C0116: Missing function or method docstring (missing-function-docstring)</b></code> :: <br />
Used when a function or method has no docstring. <br />
Es muss so oder ähnlich aussehen:
<code><pre>def guessing_game():
"""
Funktion
"""
</pre></code>
Some special methods like __init__ do not require a docstring.
</li>
<br />
<li><code><b>E1121: Too many positional arguments for function call (too-many-function-args)</b></code> :: <br /></li>
<br />
<li><code><b>E0001: Parsing failed: 'unindent does not match any outer indentation level (<unknown>, line 37)' (syntax-error)</b></code> :: <br /></li>
<br />
<!--
<li><code><b></b></code> :: <br /></li>
<br />
<li><code><b></b></code> :: <br /></li>
<br />
<li><code><b></b></code> :: <br /></li>
<br />
<li><code><b></b></code> :: <br /></li>
<br />
<li><code><b></b></code> :: <br /></li>
<br />
<li><code><b></b></code> :: <br /></li>
<br />
<li><code><b></b></code> :: <br /></li>
<br />
<li><code><b></b></code> :: <br /></li>
<br />
<li><code><b></b></code> :: <br /></li>
<br />
<li><code><b></b></code> :: <br /></li>
-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://pylint.pycqa.org/en/latest/user_guide/messages/messages_overview.html" target="_blank" rel="noreferrer noopener">Pylint 2.15.0-dev0 documentation :: Messages overview</a></li>
</ul>
</html>
<html>
<h3>Usage: </h3>
<code><pre>
pylint [options] modules_or_packages
</pre></code>
Check that module(s) satisfy a coding standard (and more !).
<code><pre>
pylint --help
</pre></code>
Display this help message and exit.
<code><pre>
pylint --help-msg <msg-id>[,<msg-id>]
</pre></code>
Display help messages about given message identifiers and exit.
<h3>Options:</h3>
<table>
<tr><td> --version </td><td> show program's version number and exit</td></tr>
<tr><td> -h, --help </td><td> show this help message and exit</td></tr>
<tr><td> --long-help </td><td> more verbose help</td></tr>
</table>
<h3>Master:</h3>
<table>
<tr><td> --rcfile=<file> </td><td> Specify a configuration file.</td></tr>
<tr><td> --init-hook=<code> </td><td> Python code to execute, usually for sys.path<br />
manipulation such as pygtk.require().</td></tr>
<tr><td> -E, --errors-only </td><td> In error mode, checkers without error messages are<br />
disabled and for others, only the ERROR messages are<br />
displayed, and no reports are done by default.</td></tr>
<tr><td> --py3k </td><td> In Python 3 porting mode, all checkers will be<br />
disabled and only messages emitted by the porting<br />
checker will be displayed.</td></tr>
<tr><td> -v, --verbose </td><td> In verbose mode, extra non-checker-related info will<br />
be displayed.</td></tr>
<tr><td> --ignore=<file>[,<file>...]</td><td>
Add files or directories to the blacklist. They should<br />
be base names, not paths. [current: CVS]</td></tr>
<tr><td> --ignore-patterns=<pattern>[,<pattern>...]</td><td>
Add files or directories matching the regex patterns<br />
to the blacklist. The regex matches against base<br />
names, not paths. [current: none]</td></tr>
<tr><td> --persistent=<y_or_n></td><td>
Pickle collected data for later comparisons. [current: yes]</td></tr>
<tr><td> --load-plugins=<modules></td><td>
List of plugins (as comma separated values of python<br />
modules names) to load, usually to register additional<br />
checkers. [current: none]</td></tr>
<tr><td> -j <n-processes>, --jobs=<n-processes></td><td>
Use multiple processes to speed up Pylint. Specifying<br />
0 will auto-detect the number of processors available<br />
to use. [current: 1]</td></tr>
<tr><td> --limit-inference-results=<number-of-results></td><td>
Control the amount of potential inferred values when<br />
inferring a single object. This can help the<br />
performance when dealing with large functions or<br />
complex, nested conditions. [current: 100]</td></tr>
<tr><td> --extension-pkg-whitelist=<pkg[,pkg]></td><td>
A comma-separated list of package or module names from<br />
where C extensions may be loaded. Extensions are<br />
loading into the active Python interpreter and may run<br />
arbitrary code. [current: none]</td></tr>
<tr><td> --suggestion-mode=<yn></td><td>
When enabled, pylint would attempt to guess common<br />
misconfiguration and emit user-friendly hints instead<br />
of false-positive error messages. [current: yes]</td></tr>
<tr><td> --exit-zero </td><td> Always return a 0 (non-error) status code, even if</br>
lint errors are found. This is primarily useful in</br>
continuous integration scripts.</td></tr>
</table>
<h3>Commands:</h3>
<table>
<tr><td> --help-msg=<msg-id></td><td>
Display a help message for the given message id and<br />
exit. The value may be a comma separated list of<br />
message ids.</td></tr>
<tr><td> --list-msgs </td><td> Generate pylint's messages.</td></tr>
<tr><td> --list-groups </td><td> List pylint's message groups.</td></tr>
<tr><td> --list-conf-levels </td><td> Generate pylint's confidence levels.</td></tr>
<tr><td> --full-documentation </td><td> Generate pylint's full documentation.</td></tr>
<tr><td> --generate-rcfile </td><td> Generate a sample configuration file according to the<br />
current configuration. You can put other options<br />
before this one to get them in the generated<br />
configuration.</td></tr>
</table>
<h3>Messages control:</h3>
<table>
<tr><td> --confidence=<levels></td><td>
Only show warnings with the listed confidence levels.<br />
Leave empty to show all. Valid levels: HIGH,<br />
INFERENCE, INFERENCE_FAILURE, UNDEFINED. <br />
[current: none]</td></tr>
<tr><td> -e <msg ids>, --enable=<msg ids></td><td>
Enable the message, report, category or checker with<br />
the given id(s). You can either give multiple<br />
identifier separated by comma (,) or put this option<br />
multiple time (only on the command line, not in the<br />
configuration file where it should appear only once).<br />
See also the "--disable" option for examples.</td></tr>
<tr><td> -d <msg ids>, --disable=<msg ids></td><td>
Disable the message, report, category or checker with<br />
the given id(s). You can either give multiple<br />
identifiers separated by comma (,) or put this option<br />
multiple times (only on the command line, not in the<br />
configuration file where it should appear only once).<br />
You can also use "--disable=all" to disable everything<br />
first and then reenable specific checks. For example,<br />
if you want to run only the similarities checker, you<br />
can use "--disable=all --enable=similarities". If you<br />
want to run only the classes checker, but have no<br />
Warning level messages displayed, use "--disable=all<br />
--enable=classes --disable=W".</td></tr>
</table>
<h3>Reports:</h3>
<table>
<tr><td> -f <format>, <br />--output-format=<format></td><td>
Set the output format. Available formats are text,<br />
parseable, colorized, json and msvs (visual studio).<br />
You can also give a reporter class, e.g.<br />
mypackage.mymodule.MyReporterClass. [current: text]</td></tr>
<tr><td> -r <y_or_n>, <br />--reports=<y_or_n></td><td>
Tells whether to display a full report or only the<br />
messages. [current: no]</td></tr>
<tr><td> --evaluation=<python_expression></td><td>
Python expression which should return a note less than<br />
10 (10 is the highest note). You have access to the<br />
variables errors warning, statement which respectively<br />
contain the number of errors / warnings messages and<br />
the total number of statements analyzed. This is used<br />
by the global evaluation report (RP0004). [current:<br />
10.0 - ((float(5 * error + warning + refactor +<br />
convention) / statement) * 10)]</td></tr>
<tr><td> -s <y_or_n>, <br />--score=<y_or_n></td><td>
Activate the evaluation score. [current: yes]</td></tr>
<tr><td> --msg-template=<template></td><td>
Template used to display messages. This is a python<br />
new-style format string used to format the message<br />
information. See doc for all details.</td></tr>
</table>
<br />
</html>
<html>
s.a. Tiddler “Python :: pytest - Tests durchfuehren“
<ul>
<li><h3>Aufruf</h3>
Es gibt zwei Möglichkeiten:
<ol>
<li><b><code>pytest […]</code></b></li>
<li><b><code>python -m pytest […]</code></b> (Hat den Vorteil, daß das aktuelle<br /> Verzeichnis der Variablen <b>sys.path</b> hinzugefügt wird)</li>
</ol><br />
<li>Der Aufruf hat aus dem Verzeichnis zu erfolgen, in dem der Quellcode <br />
liegt. Dabei muß der Pfad zu den Testfiles angegeben werden,<br />
solange sie <b>nicht</b> im gleichen Verzeichnis der Quellcode-Files liegen.<em><b>[wirklich?]</b></em><br />
</li><br />
<li>Der import-Eintrag im TestFile muß mit dem Funktionsnamen und <br />
der Modul‐Name mit dem Namen des Source‐Files übereinstimmen:
<code><pre>from <<em>MODULE</em>> import <<em>FUNCTION</em>></pre></code>
Der Name des Verzeichnisses scheint dafür<br />
keine Rolle zu spielen.</li>
<br />
<li>pytest führt alle Files aus, die:<br /><br />
<ol><li>entweder als Präfix <b>test_*</b></li><li> or als Suffix <b>*_test</b></li></ol></br />
haben und die sich im aktuellen Verzeichnis<br />
und in den Verzeichnissen darunter befinden;<br />
es ist aber auch möglich, andere Filenamen<br />
zu definieren & zu verwenden;
</li><br />
<li>pytest führt nur diejenigen Test-Methoden aus, <br />
die mit <code><b>test</b></code> beginnen:
<code><pre>
def test_file1_method1():
def testfile1_method1():</pre></code></li>
<br />
To execute the tests from a specific file, use the following syntax :<br />
<b><code>pytest <i><test filename></i> -v</code></b><br />
<br />
<li>Pytest provides two ways to run the subset of the test suite:<br />
<ol>
<li>Select tests to run based on substring matching of test names:<br />
<br />
<b><code>pytest ‐k <i><substring></i> -v</code></b><br />
<br />
→ es werden <b>alle</b> Testfunktionen, die den String <code><b><i><substring></i></b></code><br />
im Funktionsnamen tragen, aufgerufen;
</li>
<br />
<li>Select tests groups to run based on the markers applied:<br />
Pytest allows us to use markers on test functions. <b>Markers</b> <br />
are used to set various features/attributes to test functions.<br />
<br />
<code><b>@pytest.mark.<i><markername></i></b></code> <br />
<br /><b>Beispiel:</b><br />
<code><pre>@pytest.mark.parametrize('isbn,result', [
('', False),
('12345', False),
('9780262038003', True),
('978026203800', False),
('9-7-8b0-2a6-2.0-3?8-0!0-3', True),
('9780262038002', False)])</pre></code>
→ hier heißt der Marker “parametrize“<br />
→ To use markers, we have to <b>import pytest</b> module in the test <br />
file.<br />
To run the marked tests, we can use the following syntax:<br />
<br />
<code><b>pytest ‐m <i><markername></i> ‐v</b></code><br />
(für das Beispiel: <code><b>pytest ‐m parametrize ‐v</b></code>)
<br />
</li>
</ol>
<br />
</li><br />
<li>Homepage Dokumentation:<br />
<a href="https://docs.pytest.org/en/latest/" target=_blank>PyTest ::
Homepage</a><br />
<a href="!https://media.readthedocs.org/pdf/pytest/latest/" target=_blank>PyTest :: Homepage (missratener Link)</a><br />
<a href="https://automationpanda.com/2017/03/14/python-testing-101-pytest/" target=_blank>Blog "Automation Panda" :: Python Testing 101: pytest</a><br />
<a href="https://www.adfinis-sygroup.ch/blog/de/testing-with-pytest/" target=_blank>Adfinis Sysgroup ::
Testing mit Pytest</a><br />
<a href="https://de.slideshare.net/soasme/pytest" target=_blank>Slideshare :: Pytest</a><br />
“Python Testing with pytest“ von Brian Okken</li>
<br />
<li>Dazugehörige Packages:<br />
<code><b>atomicwrites-1.2.1<br />attrs-18.2.0<br />more-itertools-4.3.0<br />pluggy-0.7.1<br />py-1.6.0<br />pytest-3.8.2<br /setuptools<br />six>=1.10.0<br /> py>=1.5.0</b></code><br />[Stand: 2018-10-06]</li>
<br />
<li>Installierte Version ermitteln:<br /><code><b>pytest ‐‐version</b></code></li>
<br />
<li><h3>Fixtures</h3>
<li>Fixtures werden dann benutzt, um Konstellationen aufzubauen, <br />
die von den Testmethoden benötigt werden, wie z.B. eine DB-Verbindung;</li>
<br />
<li>A method is marked as a fixture by marking with
<code><pre>
@pytest.fixture
<em>Name des Fixture</em>
</pre></code></li><br />
<li><h3>Definition eines Fixtures></h3>
<code><pre>
@pytest.fixture <em># Setzen der Annotation</em>
def supply_AA_BB_CC(): <em># Definition der Fixture‐Methode</em>
aa=25
bb =35
cc=45
return [aa,bb,cc]
def test_comparewithAA(<em><b>supply_AA_BB_CC</b></em>): <em># Verwendung des Fixtures als Input-Parameter</em>
zz=35
assert supply_AA_BB_CC[0]==zz,"aa and zz comparison failed"
</pre></code>
<li>Ermitteln, welche fixtures pytest anbietet:<br />
<code><b>pytest ‐‐fixtures</b></code><br />
Mit der Option <code><b>‐v</b></code> werden auch diejenigen fixtures<br />
ausgegeben, die mit <code><b>__</b></code> (<em>“dunder“</em>) beginnen.<br />
→ Beispielausgabe:<br />
<code><pre>(base) mueller@Debian-Laptop:~/programming/python/pytest$ pytest --fixtures
============================== test session starts ==============================
platform linux -- Python 3.6.3, pytest-3.8.2, py-1.6.0, pluggy-0.7.1
rootdir: /home/mueller/programming/python/pytest, inifile:
collected 0 items
<b>cache</b>
Return a cache object that can persist state between testing sessions.
cache.get(key, default)
cache.set(key, value)
Keys must be a ``/`` separated value, where the first part is usually the
name of your plugin or application to avoid clashes with other cache users.
Values can be any object handled by the json stdlib module.
<b>capsys</b>
Enable capturing of writes to ``sys.stdout`` and ``sys.stderr`` and make
captured output available via ``capsys.readouterr()`` method calls
which return a ``(out, err)`` namedtuple. ``out`` and ``err`` will be ``text``
objects.
<b>capsysbinary</b>
Enable capturing of writes to ``sys.stdout`` and ``sys.stderr`` and make
captured output available via ``capsys.readouterr()`` method calls
which return a ``(out, err)`` tuple. ``out`` and ``err`` will be ``bytes``
objects.
<b>capfd</b>
Enable capturing of writes to file descriptors ``1`` and ``2`` and make
captured output available via ``capfd.readouterr()`` method calls
which return a ``(out, err)`` tuple. ``out`` and ``err`` will be ``text``
objects.
<b>capfdbinary</b>
Enable capturing of write to file descriptors 1 and 2 and make
captured output available via ``capfdbinary.readouterr`` method calls
which return a ``(out, err)`` tuple. ``out`` and ``err`` will be
``bytes`` objects.
<b>doctest_namespace</b>
Fixture that returns a :py:class:`dict` that will be injected into the namespace of doctests.
<b>pytestconfig</b>
Session-scoped fixture that returns the :class:`_pytest.config.Config` object.
Example::
def test_foo(pytestconfig):
if pytestconfig.getoption("verbose"):
...
<b>record_property</b>
Add an extra properties the calling test.
User properties become part of the test report and are available to the
configured reporters, like JUnit XML.
The fixture is callable with ``(name, value)``, with value being automatically
xml-encoded.
Example::
def test_function(record_property):
record_property("example_key", 1)
<b>record_xml_property</b>
(Deprecated) use record_property.
<b>record_xml_attribute</b>
Add extra xml attributes to the tag for the calling test.
The fixture is callable with ``(name, value)``, with value being
automatically xml-encoded
<b>caplog</b>
Access and control log capturing.
Captured logs are available through the following methods::
* caplog.text -> string containing formatted log output
* caplog.records -> list of logging.LogRecord instances
* caplog.record_tuples -> list of (logger_name, level, message) tuples
* caplog.clear() -> clear captured records and formatted log output string
<b>monkeypatch</b>
The returned ``monkeypatch`` fixture provides these
helper methods to modify objects, dictionaries or os.environ::
monkeypatch.setattr(obj, name, value, raising=True)
monkeypatch.delattr(obj, name, raising=True)
monkeypatch.setitem(mapping, name, value)
monkeypatch.delitem(obj, name, raising=True)
monkeypatch.setenv(name, value, prepend=False)
monkeypatch.delenv(name, raising=True)
monkeypatch.syspath_prepend(path)
monkeypatch.chdir(path)
All modifications will be undone after the requesting
test function or fixture has finished. The ``raising``
parameter determines if a KeyError or AttributeError
will be raised if the set/deletion operation has no target.
<b>recwarn</b>
Return a :class:`WarningsRecorder` instance that records all warnings emitted by test functions.
See http://docs.python.org/library/warnings.html for information
on warning categories.
<b>tmpdir_factory</b>
Return a TempdirFactory instance for the test session.
<b>tmpdir</b>
Return a temporary directory path object
which is unique to each test function invocation,
created as a sub directory of the base temporary
directory. The returned object is a `py.path.local`_
path object.
.. _`py.path.local`: https://py.readthedocs.io/en/latest/path.html
============================== no tests ran in 0.02 seconds ==============================
(base) mueller@Debian-Laptop:~/programming/python/pytest$
</pre></code></li>
</ul>
</html>
<html>
<ul>
<li><h3>”AttributeError: module 'abc' has no attribute 'xyz' “</h3>
</li>
</ul>
</html>
<html>
<ul>
<li>Um Tests parallel laufen lassen zu können, <br />
wird <code><b>pytext-xdist</b></code> benötigt;</li>
<li><h3>Installation</h3>
<code><pre>pip install pytest-xdist</pre></code></li>
<li><h3>Aufruf</h3>
Man kann jetzt mit dem Aufruf
<code><pre>
py.test -n 4
</pre></code>
4 gleichzeitig laufende worker-Prozesse starten;</li>
<!--li></li>
<li></li>
<li></li-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.guru99.com/pytest-tutorial.html" target=_blank>Guru99 :: Pytest ‐ Tutorial</a></li>
</ul>
</html>
<html>
<ul>
<li><h3>Vorbereitungen für die Tests</h3>
<ul>
<li>das File mit den Testcases hat die Endung <b>.py</b> zu haben;</li>
<br />
<li>Die Verzeichnisstruktur sollte wie folgt aussehen:
<code><pre>
setup.py
pytest.ini
src/
app.py
view.py
…
tests/
__init__.py
test_app.py
test_view.py
…
</pre></code></li>
<li>For development, we recommend to use <b>virtualenv environments</b><br />
and <b>pip</b> for installing your application and any dependencies as<br />
well as the pytest package itself. This ensures your code and de‐<br />
pendencies are isolated from the system Python installation.</li><br />
<li><b>Wichtig!</b><br />
In den TestCase‐Files hat die Import‐Anweisung für die zu testende<br />
Funktion wie folgt auszusehen:
<code><pre><b>from</b> <em>SourceCode‐Verzeichnis</em><b>.</b><em>SourceCode‐File</em> <b>import</b> <em>zu testende Fkt.</em></pre></code>
Beispiel:
<code><pre><b>from</b> src<b>.</b>app <b>import</b> <em>zu testende Fkt.</em></pre></code></li></li>
<li>Um später ein Package zu erstellen, ist ein File “<code><b>setup.py</b></code>“ <br />
(at least with the minimum content) im Root‐Verzeichnis anzulegen.</li>
<br />
<li>Außerdem kann eine ini-Datei, <code><b>pytest.ini</b></code> im Root‐Verzeichnis<br />
des Projekts angelegt werden, in der pytest‐Optionen definiert<br />
werden können. <br />
<br /><b>Beispiel:</b><code><pre># This is pytest.ini in your root directory
[pytest]
addopts = --ignore=env</pre></code></li>
</ul>
<li><h3>Aufruf eines Tests</h3>
Damit man direkt aus dem SourceCode‐Verzeichnis heraus die Tests<br />
aufrufen zu können, gibt es das File <b>__init__.py</b>.<br />
<br />
<ol>
<li><code><b>python -m pytest ../tests/testCases.py </b></code><br />
Ist fast identisch mit dem Aufruf von pytest direkt, <br />
hat aber den Vorteil, daß das aktuelle Verzeichnis<br />
mit in die Umgebungsvariable <code><b>sys.path</b></code> aufgenom‐<br />
men wird.</li>
<br />
<li>oder:<br />
<code><b>pytest ../tests/testCases.py</b></code><br /></li>
</ol>
<br />
Dadurch muss das Verzeichnis nicht extra verlassen werden.</li>
<li><h3>Aufrufoptionen, die hilfreich sind</h3>
<code><b>pytest ‐vvs </b></code><br />
→ <b><code>‐v</code></b> :: gibt (weitere) Informationen aus<br />
→ <b><code>‐s</code></b> :: führt zusätzlich die im Programm stehenden print-Anweisungen aus<br />
</li>
<br />
<li>File: PythonTest_pytest.pdf, “Tests outside application code“, S. 166ff</li>
</ul>
</html>
<html>
<h3>Übungen</h3>
<ol>
<li><details>
<summary>Wie erhält man beim <code><b>pytest</b></code>-Aufruf zusätzliche Infos?</summary>
<br /><code><b>pytest -v</b></code><br />
⇒ steht für “verbose“<br />
<br />
</details></li>
<li><details>
<summary>Welche Files werden von <code><b>pytest</b></code> verarbeitet?</summary>
<br />Es werden nur diejenigen Files verarbeitet, die:<br />
<ul>
<li>entweder “<code><b>test_*.py</b></code>“</li>
<li>oder “<code><b>*_test.py</b></code>“</li>
</ul> entsprechen:<br />
<br />
</details></li>
<li><details>
<summary>Welche Test-Funktionen werden von <code><b>pytest</b></code> verarbeitet?</summary>
<br />
Es werden nur diejenigen Test-Funktionen verarbeitet, die<br />
“<code><b>test</b></code>“<br />
als Präfix im Funktionsnamen haben.<br />
<br />
</details></li>
<li><details>
<summary>Worauf ist beim Aufruf von <code><b>pytest</b></code> bzgl. der Abarbeitung zu beachten?</summary>
<br />
Defaultmäßig werden alle Test-Files abgearbeitet, <br />
die sich im aktuellen (Aufruf-)Verzeichnis und in dem darunter-<br />
liegenden Verzeichnis befinden.<br />
<br />
</details></li>
<li><details>
<summary>Wie ist der <code><b>pytest</b></code>-Aufruf, wenn nur ein <br />
einzelnes Test-File aufgerufen werden soll?</summary>
<br />
Der Aufruf ist:<br />
<code><b>pytest <i><fileName></i> -v</b></code><br />
<br />
</details></li>
<li><details>
<summary>Welche Möglichkeiten bietet <code><b>pytest</b></code>, um nur<br />
eine bestimmte Menge von Tests aufzurufen?</summary>
<br />
Bei <code><b>pytest</b></code> gibt es zwei Möglichkeiten:
<ul>
<li>über <b>Substrings</b></li>
<li>über <b>Markierungen</b>, sog. “markers“</li>
</ul>
<br />
</details></li>
<li><details>
<summary>Wie lautet der Aufruf, wenn über <u>Substrings</u> <br />die Testfiles ausgewählt werden?</summary>
<br />
<code><b>pytest <i>-k <substring></i> -v</b></code><br />
<br />
⇒ <code><b>pytest</b></code> sucht in den Namen der Testfälle nach dem Teilstring<br />
“<code>substring</code>“ und f&uum;hrt diese dann aus.<br />
<br />
<b>Beispiel:</b><code><b>pytest -k great -v</b></code><br />
⇒ Es werden alle Testfälle ausgeführt, die den String “great“ im Namen tragen.
<br />
</details></li>
<li><details>
<summary>Wie lautet der Aufruf, wenn über <u>Markierungen</u> <br />die Testfiles ausgewählt werden?</summary>
<br />
<code><b>pytest <i>-m <markerName></i> -v</b></code><br />
<br />
⇒ Voraussetzung ist aber, dass vor den gewünschten Funktionen <br />
eine sog. Markierung, oder auch “marker“ angegeben ist, über den<br />
<code><b>pytest</b></code> die Funktionen ermittelt.<br />
<br />
</details></li>
<li><details>
<summary></summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary></summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary></summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary></summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary></summary>
<code><b></b></code><br />
<br />
</details></li>
<li><details>
<summary></summary>
<code><b></b></code><br />
<br />
</details></li>
</ol>
</html>
<html>
<ul>
<li>Die regex flags sind:
<ol>
<li>VERBOSE</li>
<li>IGNORECASE</li>
<li>MULTILINE</li>
<li>DOTALL</li>
</ol>
</li>
<br />
<li>Es gibt folgende drei Möglichkeiten, sie einzusetzen:
<table>
<tr><th>Langform</th><th>Kurzform</th><th>Inline-Form</th></tr>
<tr><td><code><b>re.VERBOSE</b></code></td><td><code><b>re.X</b></code></td><td><code><b>(?x)</b></code></td></tr>
<tr><td><code><b>re.IGNORECASE</b></code></td><td><code><b>re.I</b></code></td><td><code><b>(?i)</b></code></td></tr>
<tr><td><code><b>re.MULTILINE</b></code></td><td><code><b>re.M</b></code></td><td><code><b>(?m)</b></code></td></tr>
<tr><td><code><b>re.DOTALL</b></code></td><td><code><b>re.S</b></code></td><td><code><b>(?s)</b></code></td></tr>
</table></li>
<li>Beispiele:<br />
<ul>
<li>als Langform: <code><pre>re.match("dave", "Dave", flags=re.IGNORECASE)</pre></code>
<li>als Kurzform: <code><pre>re.match("dave", "Dave", flags=re.I)</pre></code>
<li>als Inline-Form: <code><pre>re.match("(?i)dave", "Dave")</pre></code></li>
</ul>
<li>Aktivierung / Deaktivierung der Flags der Inline-Form:</li>
<li></li>
</ul>
</html>
<html>
<ul>
<li>auch: <br /><ul>
<li>shallow copy → “flache Kopie“</li>
und
<li>deep copy → “tiefe Kopie“</li></ul>
</ul>
<img src="./pictures/ShallowCopy_DeepCopy.png" height=265 width=325 />
<h3>aliasing</h3>
<ul>
<li>Hier wird ‐ lediglich ‐ eine Zuweisung ausgeführt:<br />
<code><b>>>> liste = [ [ 1, 2 ], [ 3, 4 ] ]</b></code><br />
<code><b>>>> liste1 = liste</b></code><br />
</li>
<br />
<li>Dies bewirkt, dass das Objekt [ [ 1, 2 ], [ 3, 4 ] ] neben dem Namen <code><b>liste</b></code> <br />
noch den zweiten Namen <code><b>liste1</b></code> erhält. Die Namen <code><b>liste</b></code> und <code><b>liste1</b></code> <br />
sind also zwei Namen für dasselbe Objekt.<br />
<br />
<li>Der Variablen <code><b>liste1</b></code> wird die Referenz auf die Speicherzelle von <code><b>liste</b></code><br />
zugewiesen.</li><br />
</li>
</ul>
<h3>shallow copy</h3>
<ul>
<li>Eine “shallow copy“ erzeugt ein neues Objekt.</li>
<br />
<li>Mit Hilfe der Slice-Notation kann man z.B. eine Kopie des Listen-Objekts <br />
erzeugen:<br />
<code><b>>>> liste2 = liste[:]</b></code></li>
<br />
<li>Die Variable Variablen <code><b>liste2</b></code> bekommt eine neue Referenz, da ein <br />
neues Objekt mit dem Inhalt der Liste angelegt wurde.</li>
<br />
<li>This means it will create new and independent object with same content. </li><br />
<li>Dadurch wurde ein sog. <em>flache Kopie (shallow copy)</em> der Originalliste erzeugt.<br />
Die flache Kopie enthält Verweise auf Elemente der Originalliste. Die Elemente selbst<br />
werden aber <b>nicht</b> kopiert</li><br />
<li>(Bei der flachen Kopie wird die Hülle, die die Elemente “umhüllt“, kopiert, aber die Elemente selbst nicht!!<br />
→ Als Folge davon werden Änderungen:
<ol>
<li><b>an</b> der Originalliste <b>nicht</b> weitergegeben resp. sind <b>nicht</b> sichtbar;<br />
z.B. die Liste wird um Einträge erweitert. Die flache Kopie bekommt davon nichts mit.</li>
<li><b>in</b> der Originalliste <direkt> weitergegeben resp. sind sichtbar.</li></ol>)</li>
</ul>
<h3>deep copy</h3>
<ul>
<li>Mit der Funktion <code><b><em>deepcopy()</em></b></code> im Modul <code><b><em>copy</em></b></code> kann man<br />
<em>tiefe Kopien</em> zusammengesetzter Objekte anfertigen. Da‐<br />
bei werden auch Unterobjekte kopiert.</li>
<br />
<li>→ Eine tiefe Kopie ist also ein völlig selbstständiges System von Objekten und <br />
hat keinerlei Zusammenhang mehr zum Original.</li>
</ul>
<br />
<h3>Links:</h3>
<ul>
<li><b>Michael Weigend</b> :: Python 3 - Lernen und professionell anwenden, 6. Auflage</li>
</ul>
</html>
<html>
<ul>
<li><h3>Slicing</h3>
<ul>
<li>aus einem 1xn‐Objekt (z.B. String, Liste) wird ein Teil‐<br />
Abschnitt extrahiert;</li>
<li>Beispiel: aus einer Liste eine Teil‐Liste “ausschneiden“
<code><pre>
mylist = ['a', 'c', 'e', 'g', 'i', 'k', 'l']
mylist[3:6] <em># Ausgabe: 'g', 'i', 'k'</em>
</pre></code></ul>
</li>
<br />
<li><h3>Dicing</h3>
<ul>
<li>aus einem mxn‐Objekt (z.B. Matrix, Kubus) wird ein Teil‐<br />
Abschnitt in Form eines <b>kleineren</b> Objekts extrahiert;</li>
<li>Beispiel: aus einer Liste eine Teil‐Liste “ausschneiden“
<code><pre>
</pre></code></ul></li>
</ul>
<br />
<h3>Links:</h3>
<ul>
<li><a href="https://www.mbaskool.com/business-concepts/it-and-systems/13503-slicing-and-dicing.html" target=_blank>MBASkool :: Slicing & dicing</a></li>
<li><a href="http://www.hypertextbookshop.com/dataminingbook/public_version/contents/chapters/chapter003/section004/blue/page004.html" target=_blank>HyperText-Bookshop :: Data Mining ‐ Book</a></li>
<li><a href="https://stackoverflow.com/questions/30980011/slicing-a-matrix-with-python" target=_blank>Stackoverflow :: Slicing a matrix (with Python)</a></li>
</ul>
</html>
<html>
Once you are done with your work and want to make sure <br />
that your actual package passes all tests you may want to<br />
look into <code><b>tox</b></code>, <u>the virtualenv test automation tool and its py‐<br />
test support</u>. <br />
<br />
tox helps you to setup virtualenv environments with pre-defined<br />
dependencies and then executing a pre-configured test command<br />
with options. It will run tests <b>against the installed package</b> and <u>not</u><br />
against your source code checkout, helping to detect packaging<br />
glitches.<br />
<br />
tox makes it easy to:
<ul>
<li>test against different versions of Python</li>
<li>test against different dependency versions</li>
<li>capture and run setup steps/ad hoc commands</li>
<li>isolate environment variables - By design, tox does not pass any <br />
evars <em>{environment variables}</em> from the system. Instead you are<br />
asked to explicitly declare them</li>
<li>do all the above across Windows / macOS / Linux</li>
</ul>
And tox will have done all of these things with a clean syntax<br />
which the team can lift and drop in their CI config to reduce the <br />
boilerplate there.<br />
<br />
<img src="./pictures/rsz_tox_workflow.png" height=485 width=717 /><br />
<br />
Based on a config file (which we'll look be looking at in the upcoming sections):<br />
<ol>
<li>tox generates a series virtual environments.</li>
<li>Installs dependencies for each environment (which are defined in config).</li>
<li>Runs setup commands (which are also defined in config) for each environment.</li>
<li>Returns the results from each environment to the user.</li>
</ol>
<br />
The .tox directory of tox includes a Python installation, so if you are working <br />
with PyCharm then you can configure your project to look for its Python inter‐<br />
preter in that directory, as shown in this screenshot:<br />
<br />
<img src="./pictures/tox_pycharm.png" height=412 width=857 />
<h3>Installation tox</h3>
<code><pre>pip install tox</pre></code>
<h3>File “tox.ini“ erzeugen</h3>
<ul>
<li>es muß im gleichen Verzeichnis sein wie <code><b>setup.py</b></code></li>
<li>
Zwei Möglichkeiten:
<ul>
<li>automatisch → <code><b>tox-quickstart</b></code></li>
<li>manuell → File mit u.a. folgendem Inhalt anlegen:
<code><pre>
<em># content of: tox.ini , put in same dir as setup.py</em>
[tox]
envlist = py27,py36
[testenv]
# install pytest in the virtualenv where commands will be executed</em>
deps = pytest
commands =
<em># NOTE: you can run any command line tool here - not just tests</em>
pytest
</pre></code></li>
</ul>
</li></ul>
<h3>Starting tox</h3>
Invoking <code><b>tox</b></code> from the directory, where the file <code><b>tox.ini</b></code> is located.<br />
<br />
<h3>Links:</h3>
<ul>
<li><a href="https://opensource.com/article/19/5/python-tox" target=_blank>OpenSource.com :: Tox</a></li>
<li><a href="https://tox.readthedocs.io/en/latest/" target=_blank>Tox :: Read the docs</a></li>
<li><a href="https://tox.readthedocs.io/en/latest/examples.html" target=_blank>Tox :: Configuration and usage examples</a></li>
<li><a href="https://christophergs.com/python/2020/04/12/python-tox-why-use-it-and-tutorial/" target=_blank>Christopher Samiullah :: Python Tox ‐ Why You Should Use It and Tutorial</a></li>
</ul>
</html>
<html>
<h3>Direkte Nutzung ab Python 3.3</h3>
Seit Python 3.3 ist ein Modul zum Erzeugen einer virtuellen Pythonumgebung auch <br />
direkt in Python enthalten, das Modul heißt venv.
<h3>Installation</h3>
u.U. muß das Modul (zusätzlich) installiert werden:<br />
<code><pre>
mueller@Debian-Laptop:~/programming/python$ <b>sudo apt-get install python3-venv</b>
</pre></code>
Einrichten einer virtuellen Umgebung (für das Projekt "myApp1"):
<code><pre>
mueller@Debian-Laptop:~/programming/python$ <b>python -m venv myApp1</b>
</pre></code>
Sollte das Verzeichnis schon vorhanden sein, dann:<br />
<code><pre>
mueller@Debian-Laptop:~/programming/python$ <b>cd myApp1</b>
mueller@Debian-Laptop:~/programming/python$ <b>python -m venv .</b>
</pre></code>
<b>KonfigFile:</b> pyvenv.cfg<br />
<code><pre>
home = /usr/bin # In welchem Verzeichnis ist das zum Erzeu‐
# gen der virtuellen Umgebung verwendete
# Python-Executable zu finden?
include-system-site-packages = false # Soll das System-Installationsverzeichnis
# für Python-Packages verwendet werden?
version = 3.7.3 # Welche Python-Version wird in dieser
# virtuellen Umgebung verwendet?
</pre></code>
(zu finden in <a href="https://www.python.org/dev/peps/pep-0405/">PEP 405</a>)<br />
<br />
<h3>Umgebung aktivieren:</h3>
In das gewünschte Verzeichnis wechseln: <br />
<code><pre>
cd myApp1
</code></pre>
Aufruf des Shellscripts "activate":
<code><pre>
. ./bin/activate
</code></pre>
→ damit werden die PATH-Variable und andere Umgebungsvariablen neu gesetzt.<br />
→ der Prompt ändert sich:<br />
<img src="./pictures/venv_aktivieren.png" width=502 height=43 /><br />
Wichtig! Auf den Punkt vor dem Befehl achten!<br />
<h3>Umgebung deaktivieren:</h3>
Aufruf des Shellscripts "activate":
<code><pre>
deactivate
</code></pre>
Im Gegensatz zu dem Aktivierungsaufruf ist dies eine (Shell-)Funktion.
<h3>Aktualisierung der Umgebung</h3>
<a href="https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/" target=_blank>Python Packaging: Installing packages</a>
</html>
<html>
<ul>
<li><h3>Vorbereitungen:</h3>
<code><pre>
$ sudo apt-get remove vim-tiny
$ sudo apt-get update
$ sudo apt-get install vim
</pre></code>
</li>
<li><h3>Verifying Your VIM Install</h3>
<ul>
<li><h4>Check vim – Version:</h4>
<code><pre>
vim ––version
</pre></code>
erforderlich: > 7.3
</li>
<li><h4>Check version of Python used in VIM:</h4>
from within VIM:<br />
<code><pre>
:python import sys;
:print(sys.version)
</pre></code>
<br />
⇒ <em>2023-08-26:</em> bei der Ausgabe der <em>version</em>–Abfrage steht:
<code><pre>
…
–python
–python3
…
</pre></code>
→ Aktivieren des Eintrag <em>–python3</em>:<br />
<ul>
<li>– vim-gtk installieren</li>
<li>– neu compilieren</li>
</ul>
</li>
</ul>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://realpython.com/vim-and-python-a-match-made-in-heaven/"
target="_blank" rel="noreferrer noopener">
Real Python :: VIM and Python — A Match Made in Heaven</a>
</li>
<li><a href="https://vi.stackexchange.com/questions/11526/how-to-enable-python-feature-in-vim"
target="_blank" rel="noreferrer noopener">
Stackexchange – Vi :: How to enable +python feature in vim</a>
</li>
</ul>
</html>
<html>
<b>ANMERKUNG:</b><br />
Dieses Tool könnte in der Zwischenzeit [06/2023]<br />
von <b>pdm</b> abgelöst sein.
<hr />
virtualenv is a tool to create isolated Python environments.
The virtualenv creates a folder which contains all the
necessary executables to use the packages that a Python pro-
ject would need.
benötigte Pakete:
<ul>
<li>virtualenv (notwendig)
</li>
<li>virtualenv-clone (notwendig?)
</li>
<li>virtualenvwrapper (optional, hilfreich)
</li>
</ul>
# anscheinend gibt es seit Vers. 3.3 ein anderes, eigenes
Paket zum Erstellen von virtuellen Umgebungen:
python3-venv (keine Ahnung, wie gut)
# das Verzeichnis für die Virtuelle Umgebung anlegen:
<code><pre>mkdr testVirtualEnvs</pre></code>
# in das neue Verzeichnis wechseln
<code><pre>cd testVirtualEnvs/</pre></code>
# in diesem Verzeichnis die Virtuelle Umgebung erstellen:
<code><pre>virtualenv .venv</pre></code>
bzw.
<code><pre>virtualenv --prompt WPE-A1 ./testVirtualEnv</pre></code>
Alternativ:
alias setVenv="virtualenv --prompt "
setVenv "[ WPE-A1 ]" ./testVirtualEnv
bzw.
<code><pre>python3 -m venv VENV --symlinks --prompt PR1</pre></code>
→ "-m" :: das Module xx soll verwendet / aufgerufen werden (hier: venv)
→ Ausgabe:
<code><pre>Using base prefix '/home/mueller/Programme/anaconda3'
New python executable in /home/mueller/programming/python/testVirtualEnvs/.env/bin/python
Installing setuptools, pip, wheel...
done.
</pre></code>
# das Ergebnis ist folgende Verzeichnisstruktur:
<code><pre>
./testVirtualEnv
|----- env
|--- bin
|--- include
|--- lib
</pre></code>
# diese Umgebung “aktivieren“
<code><pre>source <<em>Venv‐DirName</em>>/bin/activate</pre></code>
→ es ändert sich der Prompt (der Umgebungsnamen
erscheint am Anfang des neuen Prompts):
<code><pre>(.env) mueller@Debian-Laptop:~/programming/python/testVirtualEnvs$</pre></code>
# alles, was jetzt mit pip installiert
wird, landet in diesem Ver-
zeichnis / dieser Umgebung
# Deaktivieren der virtuellen Umgebung
<code><pre>deactivate</pre></code>
→ das reicht, da die Pfade zu den Binaries für die Umgebung gesetzt sind.
# Deinstallation von virtuellen Umgebungen
Es reicht, das für die virtuelle Umgebung angelegte
Verzeichnis inklusive Unterverzeichnissen zu löschen.
→ <code><pre>rm −r <Venv‐Dir></pre></code>
# Tool / Modul / Paket "virtualenvwrapper"
!Achtung!
Es muss die Vers. 3.x aufgerufen werden.
→ Also überprüfen, welche Python-Version default-
maessig aufgerufen / verwendet wird
Definition der Variablen WORKON_HOME,
welches die virtuellen Umgebungen beherbergt
→ z.B. in der .bashrc:
<code><pre>export WORKON_HOME=~/Envs</pre></code>
Installation in das Home-Verzeichnis des Users,
z.B. ~/.local/bin
Aktivierung durch:
source $HOME/path/to/virtualenvwrapper.sh
→ z.B. source /home/mueller/.local/bin/virtualenvwrapper.sh
→ Ausgabe:
<code><pre>virtualenvwrapper.user_scripts creating /home/mueller/programming/python/Envs/premkproject
virtualenvwrapper.user_scripts creating /home/mueller/programming/python/Envs/postmkproject
virtualenvwrapper.user_scripts creating /home/mueller/programming/python/Envs/initialize
virtualenvwrapper.user_scripts creating /home/mueller/programming/python/Envs/premkvirtualenv
virtualenvwrapper.user_scripts creating /home/mueller/programming/python/Envs/postmkvirtualenv
virtualenvwrapper.user_scripts creating /home/mueller/programming/python/Envs/prermvirtualenv
virtualenvwrapper.user_scripts creating /home/mueller/programming/python/Envs/postrmvirtualenv
virtualenvwrapper.user_scripts creating /home/mueller/programming/python/Envs/predeactivate
virtualenvwrapper.user_scripts creating /home/mueller/programming/python/Envs/postdeactivate
virtualenvwrapper.user_scripts creating /home/mueller/programming/python/Envs/preactivate
virtualenvwrapper.user_scripts creating /home/mueller/programming/python/Envs/postactivate
virtualenvwrapper.user_scripts creating /home/mueller/programming/python/Envs/get_env_details
</pre></code>
→ dh. es werden Shell-Scripte in dem Umgebungsverzeichnis angelegt
# Eine virtuelle Umgebung anlegen:
<code><pre>mueller@Debian-Laptop:~/programming/python/Envs$ mkvirtualenv env1</pre></code>
→ Ausgabe:
<code><pre>
Using base prefix '/home/mueller/Programme/anaconda3'
New python executable in /home/mueller/programming/python/Envs/env1/bin/python
Installing setuptools, pip, wheel...
done.
virtualenvwrapper.user_scripts creating /home/mueller/programming/python/Envs/env1/bin/predeactivate
virtualenvwrapper.user_scripts creating /home/mueller/programming/python/Envs/env1/bin/postdeactivate
virtualenvwrapper.user_scripts creating /home/mueller/programming/python/Envs/env1/bin/preactivate
virtualenvwrapper.user_scripts creating /home/mueller/programming/python/Envs/env1/bin/postactivate
virtualenvwrapper.user_scripts creating /home/mueller/programming/python/Envs/env1/bin/get_env_details
(env1) mueller@Debian-Laptop:~/programming/python/Envs$
</pre></code>
→ Es wurde im Dir. Envs ein Unterverzeichnis namens "env1" angelegt
→ Danach wurden 5 Shell-Skripte in dieses Verzeichnis kopiert
→ der Prompt ändert sich, indem der Name des Unterverzeichnisses
(und somit der virtuellen Umgebung) an den Anfang des Prompts gesetzt
weitere Befehle:
<ul>
<li><b>Changing the env:</b><br />
workon {name_of_env}
→ ohne Angabe:<br />
Es werden alle zur Verfügung stehenden<br />
virtuellen Umgebungen aufgelistet<br />
→ mit Angabe:<br />
Es wird in die angegebene virtuelle Umgebung gewechselt.<br />
!Ein Verzeichniswechsel findet NICHT statt!<br />
</li>
<li><b>To find a list of existing virtual environments:</b><br />
<code><pre>lsvirtualenv</pre></code>
</li>
<li><b>Change the current working directory to $VIRTUAL-ENV:</b><br />
<code><pre>cdvirtualenv { name_of_env }</pre></code>
→ ohne Angabe:
wechselt in das Top-Verzeichnis der aktuellen virtuellen Umgebung
→ mit Angabe:
wechselt in das angegeben Unterverzeichnis der aktuellen virtuellen Umgebung
</li>
<li><b>To remove our virtual environment (This will remove the virtual environment from ~/Envs.):</b><br />
<code><pre>rmvirtualenv myenv</pre></code>
→ Beispiel:
mueller@Debian-Laptop:~/programming/python/Envs$ rmvirtualenv WPE-A1/
→ Ausgabe:
Removing WPE-A1/...
</li>
<li><b>To list all of the site packages from within the virtual environment:</b><br />
<code><pre>lssitepackages</pre></code>
</li>
<li><b>To get out of the virtual environment:</b><br />
<code><pre>deactivate</pre></code>
Or, you can simply close your shell.
When you open a new shell you will
land in your original environment.
Then, to renter the virtual environ-
ment, use the workon command.
<h3>Links:</h3>
<ul>
<h5>virtualenv</h5>
<li><a href="https://wiki.ubuntuusers.de/virtualenv/"
target=_blank rel="noreferrer noopener">
Ubuntu-Users :: virtualenv</a>
</li>
<li><a href="https://www.unixwitch.de/de/sysadmin/tools/python3-venv"
target=_blank rel="noreferrer noopener">
UnixWicht :: Sysadmin - python3-venv</a>
</li>
<h5>virtualenvwrapper</h5>
<li><a href="https://virtualenvwrapper.readthedocs.io/en/latest/command_ref.html"
target=_blank rel="noreferrer noopener">
Virtualenvwrapper - Doku :: Command reference</a>
</li>
<li><a href="https://pypi.org/project/virtualenvwrapper/"
target=_blank rel="noreferrer noopener">
PyPi.org :: virtualenvwrapper</a>
</li>
<li><a href="https://www.bogotobogo.com/python/python_virtualenv_virtualenvwrapper.php"
target=_blank rel="noreferrer noopener">
Bogotobogo.com :: virtualenv & virtualenvwrapper</a>
</li>
<li><a href="https://howchoo.com/g/nwewzjmzmjc/a-guide-to-python-virtual-environments-with-virtualenvwrapper"
target=_blank rel="noreferrer noopener">
HowChoo.com :: A guide to Python-Virtual-Environments with virtualenvwrapper</a>
</li>
<li><a href="https://medium.com/the-andela-way/configuring-python-environment-with-virtualenvwrapper-8745c2895745"
target=_blank rel="noreferrer noopener">
Medium.com :: Configuring Python Environment with virtualenvwrapper</a>
</li>
<li><a href="https://code-examples.net/de/keyword/22003"
target=_blank rel="noreferrer noopener">
Code-Examples.net :: </a>
</li>
<li><a href="https://docs.python-guide.org/dev/virtualenvs/"
target=_blank rel="noreferrer noopener">
Python-Guide-Doc :: virtualenvs</a>
</li>
</ul>
</html>
<html>
<b>Usage: </b>virtualenv [OPTIONS] DEST_DIR<br />
<br />
Options:<br />
<table>
<tr><td> --version</td><td>show program's version number and exit</td></tr>
<tr><td> -h, --help</td><td>show this help message and exit</td></tr>
<tr><td> -v, --verbose</td><td>Increase verbosity.</td></tr>
<tr><td> -q, --quiet</td><td>Decrease verbosity.</td></tr>
<tr><td> -p PYTHON_EXE, --python=PYTHON_EXE</td><td>
The Python interpreter to use, e.g.,
--python=python3.5 will use the python3.5 interpreter
to create the new environment. The default is the
interpreter that virtualenv was installed with
(/home/mueller/Programme/anaconda3/bin/python)</td></tr>
<tr><td> --clear </td><td>Clear out the non-root install and start from scratch.</td></tr>
<tr><td> --system-site-packages</td><td>
Give the virtual environment access to the global
site-packages.</td></tr>
<tr><td> --always-copy</td><td> Always copy files rather than symlinking.</td></tr>
<tr><td> --relocatable </td><td>Make an EXISTING virtualenv environment relocatable.
This fixes up scripts and makes all .pth files
relative.</td></tr>
<tr><td> --no-setuptools</td><td> Do not install setuptools in the new virtualenv.</td></tr>
<tr><td> --no-pip</td><td>Do not install pip in the new virtualenv.</td></tr>
<tr><td> --no-wheel</td><td> Do not install wheel in the new virtualenv.</td></tr>
<tr><td> --extra-search-dir=DIR</td><td>
Directory to look for setuptools/pip distributions in.
This option can be used multiple times.</td></tr>
<tr><td> --download </td><td>Download pre-installed packages from PyPI.</td></tr>
<tr><td> --no-download, --never-download</td><td>
Do not download pre-installed packages from PyPI.</td></tr>
<tr><td> --prompt=PROMPT</td><td> Provides an alternative prompt prefix for this
environment.</td></tr>
</table>
empfohlene Parameter:<br />
--prompt=<i>NAME</i><br />
</html>
<html>
<ol>
<li><details><summary><b>Sum of a Range of Integers</b></summary>…</details></li>
<li><details><summary><b>Caesar Cipher</b></summary>…</details></li>
<li><details><summary><b>Caesar Cipher Redux</b></summary>…</details></li>
<li><details><summary><b>Log Parser</b></summary>…</details></li>
<li><details><summary><b>Sudoku Solver</b></summary>…</details></li>
<li><details><summary><b>Verschiebe-Puzzle</b></summary>
(von mir eingefügt)
…</details></li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://realpython.com/python-practice-problems/" target=_blank>RealPython :: Python practice problems</a> (als PDF vorhanden)</li>
</ul>
</html>
<html>
<ul>
<li>
<i>⇒ Fehlermeldung:</i>
<code><pre>Error: Command '['/home/mueller/programming/python/wpe/bin/python3', \ <br />
'-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1</pre></code>
--> Versuchte, im Verzeichnis <code>/home/mueller/programming/python</code> mittels Befehl<br />
<b><code>python3 -m venv wpe</code></b> eine virtuelle Umgebung einzurichten;</li>
<br />
<li>
<i>⇒ Fehlermeldung:</i><code><pre>
E File "/home/mueller/programming/python/WPE_03/source/solution.py", line 13
E fobj.close()
E ^
E IndentationError: unindent does not match any outer indentation level <<<<<<<<<<<<<<<<<<<<<
</pre></code>
--> Lösung:<br />
there might be spaces mixed in with your tabs.
Try doing a search & replace to replace all tabs with a few spaces.
</li>
<br />
<li><i>⇒ Fehlermeldung:</i>
<code><pre>
> assert len(log_list) == 206
E TypeError: object of type 'NoneType' has no len()
</pre></code>
⇒ Lösung:<br />
This function returns None and that's why you have the error<br />
(in diesem Fall fehlte in der Funktion das Röckgabestatement<br />
"return" ... s. WPE_03)
</li>
<br />
<li><i>⇒ Fehlermeldung:</i><code><pre>
File "./solution.py", line 16
ipAddress = i[1]
^
TabError: inconsistent use of tabs and spaces in indentation
</pre></code>
⇒ Lösung:<br />
Python erwartet als Leerzeichen _KEINE_ Tabs. Also
alle Tabs durch entsprechende Anzahl von Leerzeichen
(Blanks) ersetzen.
</li>
<br />
<li><i>⇒ Fehlermeldung:</i>
<code><pre>
UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
</pre></code>
⇒ Lösung:<br />
<b>Solution 1: is to install the GUI backend tk</b><br />
<br />
All I had to do was to install tkinter through the Linux bash terminal using<br />
the following command:
<code><pre>
sudo apt-get install python3-tk
</pre></code>
instead of installing it with pip or directly in the virtual environment in Pycharm.<br />
<br />
<b>Solution 2: install any of the matplotlib supported GUI backends</b><br />
<br />
<ul>
<li>solution 1 works fine because you get a GUI backend... in this case the TkAgg</li>
<li>however you can also fix the issue by installing any of the matplolib GUI backends like Qt5Agg, GTKAgg, Qt4Agg, etc<br />
for example <code><pre>pip install pyqt5</pre></code> will fix the issue also</li>
</ul>
<br />
NOTE:<br />
<br />
usually this error appears when you pip install matplotlib and you are trying to display a plot in a GUI window and you do not have a python module for GUI display.<br />
The authors of matplotlib made the pypi software deps not depend on any GUI backend because some people need matplotlib without any GUI backend.<br />
<br />
<h3>Links:</h3>
<ul>
<li><a href="https://stackoverflow.com/questions/56656777/userwarning-matplotlib-is-currently-using-agg-which-is-a-non-gui-backend-so"
target="_blank" rel="noreferrer noopener">StackOverflow :: Userwarning ‐ Matplotlib is currently using agg …</a></li>
</ul>
</li>
</ul>
</html>
<html>
QuantLib is available as C++ source code which is compiled into a library. It is known to work on Windows, Mac OS X, Linux and other Unix-like operation systems.
It can be linked with other languages via SWIG, the Python extension is popular and can be installed via pip.
Much of QuantLib's functionality can be used in Excel via the add-in QuantlibXL.
The software provides various facilities for computing values of financial instruments and related calculations. It is a major example of Mathematical finance. Its main use is in quantitative analysis.
The financial instruments and derivatives it can evaluate include
<ul>
<li>Options :: </li>
<ul>
<li>Asian options</li>
<li>Basket options</li>
<li>Cliquet options</li>
<li>Compound options</li>
<li>Digital options</li>
<li>Lookback options</li>
<li>Vanilla options</li>
</ul>
<li>Bonds</li>
<ul>
<li>Amortizing bonds</li>
<li>Convertible bonds</li>
<li>Fixed rate bonds</li>
<li>Floating rate bonds</li>
<li>Zero-coupon bonds</li>
</ul>
<li>Yield curve</li>
<li>Date calculations</li>
<ul>
<li>Calendars</li>
<li>Date calculations</li>
<li>Day counting methods</li>
</ul>
<li>Swaps</li>
<ul>
<li>Asset swaps</li>
<li>BMA swaps</li>
<li>Year-on-year inflation swaps</li>
<li>Vanilla swaps</li>
</ul>
<li>Quantos</li>
<li>Currencies</li>
</ul>
It has models for
</ul>
<li>Yield curves</li>
<li>Interest rates</li>
<li>Volatility</li>
</ul>
It can compute derivative prices using methods including:
<ul>
<li>Analytic formulae</li>
<li>Tree methods</li>
<li>Finite difference methods</li>
<li>Monte Carlo methods</li>
</ul>
<h3>Links:</h3>
<a href="https://en.wikipedia.org/wiki/QuantLib" target=_blank>Wikipedia :: QuantLib (engl.)</a>
</html>
If you have aliased a command to somehting and want to quickly
unalias it, preceed the name with a backslash, '\', and it
will have the original meaning. For example, if you have 'rm'
aliased to 'rm -i' and want to remove one entire directory without
being prompted for each file, you would do:
$ \rm -fr dirname
where 'dirname' is the directory you want to trash.
This tip generously supported
by: khamsi@kmrmail.kmr.ll.mit.edu
<html>
<code><pre>
# Hier wird das Dataset "airquality" verwendet;
# es wird schon mit R mitgeliefert.
data(airquality)
names(airquality)
# ⇒ Ausgabe: [1] “Ozone“ “Solar.R“ “Wind“ “Temp“ “Month“ “Day“
plot(Ozone~Solar.R,data=airquality)
#calculate mean ozone concentration (na's removed)
# (weitere Erklärungen s. u.)
mean.Ozone=mean(airquality$Ozone,na.rm=T)
# Drucke eine horizontale Linie (“h“)
# an der Stelle vom Ozone-Mittelwert
abline(h=mean.Ozone)
#use lm to fit a regression line through these data:
model1=lm(Ozone~Solar.R,data=airquality)
model1
# Zeichnen der Linie, die Linie bekommt die Farbe "rot"
abline(model1,col="red")
plot(model1)
termplot(model1)
summary(model1)
</pre></code>
<ul>
<li><b><code>Ctrl + r</code></b> :: Damit wird die Eingabe im R-Editor auf die R-Console weitergereicht</li>
<li>“na“ - oder “NA“ - steht für “not available“, <br />
d.h. im Datensatz (“dataset“) fehlen an einigen Stellen Werte<br />
(der komplette Datensatz kann mit “airquality$Ozone“ angezeigt werden)<br />
“na.rm=T“ :: na's removed, i.e. removing na entries set to “TRUE“) </li>
</ul>
<h3>Link:</h3>
<a href="https://www.youtube.com/watch?v=Xh6Rex3ARjc" target=_blank>Youtube ::: Statistics with R (1) - Linear regression</a>
</html>
<html>
# Check that connection is working (Optional)<br />
odbcGetInfo(channel)<br />
<br />
Link: <br />
http://rprogramming.net/connect-to-database-in-r/
</html>
<html>
<ul>
<li>Programm-System</li>
<br />
<li>zur statistichen Anaylse (Wahrscheinlichkeit & Statistik)</li>
<br />
<li>Nach Aufruf mit dem Befehl “<code><b>R</b></code>“ erscheint die <u>R-Console</u><br />
⇒ Beenden: <code><b>q()</b></code></li>
<br />
<li>Bearbeiten von R-Programmen mittels Texteditor;<br />
Files stets im Dateiformat "txt" abspeichern</li>
<br />
<li><u>data.frame</u>:<br /></li>
<br />
<li><u>Zuweisungsoperator:</u> <b><code><‐</b></code></li>
<br />
<li><u>Kommentarzeichen:</u><b><code>#</b></code> (Hash-Zeichen)</li>
<br />
<li><u>Numerischen Vektor erzeugen:</u> <b><code> c(<i>VAL-1</i>, <i>VAL-2</i>, <i>VAL-3</i>, …)</b></code><br />
“c“ steht für “concatenate“<br />
Der Vektor enthät drei Werte, die alle Zahlen sind. <br />
<br />
Bei Operationen mit mehreren Vektoren gilt:<br />
<ul>
<li>die Vektoren haben die gleiche Länge<br />
→ die Operation wird komponentenweise durchgeführt</li>
<li>die Vektoren haben unterschiedliche Längen <br />
→ die kürzeren Vektoren werden “aufgebläht“,<br />
und zwar bis zur benötigten Länge<br />
Bsp: aus <b><code>z * 2 + 100</code></b> wird zu <b><code>z * c(2, 2, 2) + c(100, 100, 100)</b></code>, <br />
da die Variable z ein dreistellige Vektor ist (<b><code>z = (1.1, 9, 3.14)</code></b>)<br /></li><br />
<b>Anmerkung:</b> “Vector recycling“<br />
<b><code>If the length of the shorter vector does not divide evenly into <br />
the length of the longer vector, R will still apply the 'recyc‐<br />
ing' method, but will throw a warning to let you know something<br />
fishy might be going on.</code></b>
</ul></li>
<br />
<li><u>Infos über R-Objekte abfragen:</u> <br />
<li><b><code>?<i>fctName</i></code></b> :: Info zu angegebener Funktion (Anmerkung: ohne Klammern!)</li>
<li><b><code>?"<i>Operator</i>"</code></b> :: Info zu angegebenem Operator (z.B Doppelpunkt: ?":")</li>
<br />
<li><u>Standardfunktionen:</u> <br />
<ul>
<li><b><code>abs()</code></b>, Absolutbetragsfunktion</li>
<li><b><code>sqrt()</code></b>, Quadratwurzelfunktion</li>
<li><b><code>length(<i>OBJ</i>)</code></b>, die Läge des R-Objekts ermitteln</li>
<li><b><code>rnorm(<i>#Num</i>)</code></b>, Standard-Normalverteilung</li>
</ul>
<br />
<li><u>Workspace & Files:</u><br />
<ul>
<li><code><b>ls()</b></code> :: Auflisten der aktuell im Workspace definierten Variablen</li>
<li><code><b>rm(<i>VAR</i>)</b></code> :: Löschen der Variablen <i>VAR</i> im Workspace<br />
<li><code><b>rm(list=ls())</b></code> :: Befehl zum Löschen aller Variablen</li>
</li>
</ul>
</li>
<br />
<li><u>Zahlenfolgen (<i>“Sequence of numbers“</i>)</u><br />
<ul>
<li><code><b>1:20</b></code> :: Erzeugen einer einfachen Zahlenfolge, von 1 bis 20, aufsteigend</li>
<li><code><b>15:1</b></code> :: Erzeugen einer einfachen Zahlenfolge, von 15 bis 1, absteigend</li>
<br />
<li>Alternative zu “:“ (Doppelpunkt) :: Funktion <code><b>seq()</b></code>
<ul>
<li><code><b>seq(1,20</b></code> bzw. <code><b>seq(15,1)</b></code></li>
<li>Vorteil der Funktion <code><b>seq()</b></code> ist eine größere Kontrolle über die zu erzeugende Sequenz</li>
<li>So lässt sich eine andere Schrittweite als 1 angegeben:<br />
<code><b>seq(1, 10, by=0,5)</b></code></li>
<li>Die Schrittweite ist uninteressant, es wird eine bestimmte Anzahl an Werten benötigt:<br />
<code><b>seq(1, 10, length=30)</b></code><br /></li>
<br />
<li><code><b>seq_along(<i>VAR</i>)</b></code> :: es sollen soviele Werte erzeugt werden, wie das <i>VAR</i>-Objekt lang ist</li>
<br />
<li><code><b>rep()</b></code> :: “replicate“, vervielfacht einen Wert um die angegebene Anzahl;<br />
(IMHO wohl eher “repetition“)<br />
<bullet><code><b>rep(0, times = 40)</b></code> :: es wird 40 Mal der Wert “0“ erzeugt<br />
<bullet><code><b>rep(c(0,1,2), times = 10)</b></code> :: es wird 10 Mal der Vektor c(0,1,2) erzeugt<br />
<bullet><code><b>rep(c(0,1,2), each = 10)</b></code> :: es werden 3 Blöcke mit “0“ ,“1“ bzw. “2“erzeugt<br /></li></ul>
</li>
</ul>
<br />
<li><u>Vektoren</u><br />
<ul>
<li>einfachste Datenstruktur in R, die am meisten benutzte</li>
<li>Es gibt zwei Typen von Vektoren:
<ul>
<li>atomic vectors :: enthält nur Elemente/Werte von einem Datentyp</li>
<li>Listen :: kann u.U. verschiedene Datentypen enthalten</li>
</ul></li>
</ul>
</li>
<br />
<li><u>Bedingungen (<i>conditions</i>)</u><br />
<ul>
<li>boolesche Werte: TRUE, FALSE, NA</li>
<li>intern arbeitet R mit den Werten "1" (für TRUE), "0" (für FALSE)</li>
<li>Vergleichsoperatoren: < <= > >= == !=</li>
<li>Logische Funktionen: <code><b>is.na</b></code>
<li><code><b>vect < 1</b></code> :: jeder Wert im Vektor “vect“ wird auf “< 1“ überprüft</li>
<li>logische Operationen: <br />
<ul>
<li><code><b>A | B</b></code> :: steht für "A oder B" [<i>union</i>]</li>
<li><code><b>A & B</b></code> :: steht für "A und B" [<i>intersection</i>]</li>
<li><code><b>!A</b></code> :: steht für "nicht A" [negation]</li></ul>
</ul>
</li>
<br />
<li><u>Zeichenketten (<i>character vectors</i>)</u><br />
<ul>
<li>die Zeichenketten werden in “ … “ eingeschlossen;<br />
<bullet><code><b>my_char("My", "name", "is", "Earl")</b></code><br />
⇒ die Länge des String-Vektors ist 3<br />
⇒ um daraus einen einzelnen String-Vektor zu machen: <code><b>paste(my_char, collapse = " ")</b></code></li>
</ul>
</li>
<br />
<li><u>Fehlende Werte</u><br />
<ul>
<li>Fehlende Werte spielen in der Statistik und der Daten-Analyse<br />
eine wichtige Rolle. Häfig werden solche Werte ignoriert, aber<br />
dennoch müssen sie sorgfältig untersucht werden, um ein da‐<br />
hinter‐ oder ein zugrundeliegendes Muster oder die Ursache für<br />
ihr Fehlen zu ermitteln.</li>
<li>Um fehlende oder nicht zur Verfügung stehende Werte anzugeben,<br />
wird “<code><b>NA</b></code>“ verwendet.</li>
<li>Jede Operation mit “<code><b>NA</b></code>“ hat “<code><b>NA</b></code>“ als Ergebnis.</li>
<li><b>Vorsicht</b> <br />
bei der Verwendung logischer Ausdrücke, bei denen der Stellvertreter NA <br />
sich einschleichen kann, denn ein einziger NA-Wert kann die ganze Ber‐<br />
echnung verfälschen.</li>
<li>“<code><b>NaN</b></code>“ steht für "Not a Number", und tritt bei Division durch Null auf</li>
<li>“<code><b>Inf</b></code>“ steht für "Infinity", </li>
</ul>
</li>
<br />
<li></li>
<br />
<li></li>
<br />
<li><u>“Coercion“</u><br />
<ul>
<li>Umwandlung von Zahl in Buchstabe (und umgekehrt?)</li>
</ul>
</li>
<br />
<li><u>Erstellen einer “Minitabelle“</u>, also mehrere Spalten :: <br />
Man benötigt dazu einen <code><b>data.frame</b></code>
→ <img src="./pictures/R-Console_dataFrame_01.png" height=110 width=896/><br />
Bereits definierte Vektoren können aufgenommen werden (s. letzte Spalte im Objekt <code><b>diversity</b></code>)<br />
(die Spalte “tree“ wird mit den Werten des Vektors “Baum“ gefüllt.<br />
Vorher war der Vektor “Baum“ wie folgt erstellt worden: <code><b>Baum <‐ c(25, 23, 19, 33)</b></code>)
</li>
<br />
<li><u>Einlesen von Daten nach R</u> :: <br />
Die etabliertesten Tabellenformate sind:
<ul>
<li>txt, ASCII-Text</li>
<li>csv, <em>comma separated variables</em></li>
</ul>
<br />
Die R‐Funktionen zum Einlesen der Daten sind:
<table
<tr><td><code><b>read.table</b></code></td><td>allgemeine Funktion</td></tr>
<tr><td><code><b>read.csv</b></code></td><td>spezifische, für <b>csv</b>‐Files vorgesehene Funktion</td></tr>
<tr><td><code><b>read.delim</b></code></td><td>spezifische, für <b>txt</b>‐Files vorgesehene Funktion</td></tr>
<tr><td><code><b>read.csv2</b></code></td><td>spezifische Funktion, für im deutschen Format abgespeicherte <b>csv</b>‐Files<br />
mit Komma statt Punkt, mit Semikolon statt Komma als Variablentrennzeichen</td></tr>
<tr><td><code><b>read.delim2</b></code></td><td>spezifische Funktion, für im deutschen Format abgespeicherte<b>txt</b>‐Files<br />
mit Komma statt Punkt, mit Semikolon statt Komma als Variablentrennzeichen</td></tr>
</table>
<br />
Einlesen der Daten:<br />
z.B. <code><b>eschen <- read.csv2("")</b></code>
</li>
<br />
</ul>
<br />
<b>Link:</b><br />
<ul>
<li><a href="https://bookdown.org/brry/course/" target="_blank" rel="noreferrer noopener">Berry Boessenkool (OpenHPI) [2022]</a></li>
<li><a href="https://de.wikibooks.org/wiki/GNU_R" target=_blank>Wiki-Books :: GNU R</a></li>
<li>PDF-File</li>
<li>“An introduction to R“</li>
<li>“R for Beginners“</li>
<li><a href="https://cran.r-project.org/doc/contrib/Short-refcard.pdf" target=_blank>R reference card (PDF) by Tom Short</li>
<li><a href="http://www.statmethods.net/" target=_blank>Quick-R</a></li>
<li>Christian Dormann :: Parametrische Statistik, Kap. 2 </li>
<li><a href="https://rstudio.cloud/" target=_blank>RStudio.cloud - Saas</a> (Saas : “Software as a Service“)</li>
</ul>
<br />
</html>
<html>
<code><pre>
Warnmeldung:
In cbind(PkteMaennl, PkteWeibl) :
number of rows of result is not a multiple of vector length (arg 2)
</pre></code>
→ Grund für die Warnung war die unterschiedliche Anzahl der Werte: <br />statt 12 Werte wie in PkteMaennl, waren es nur 10 Werte in PkteWeibl
</html>
<html>
<h3>attach: Attach Set of R Objects to Search Path</h3>
<b>Description</b><br />
<br />
The database is attached to the R search path. This means that the <br />
database is searched by R when evaluating a variable, so objects in<br />
the database can be accessed by simply giving their names.<br />
<br />
Durch diesen Mechanismus verkürzen sich Anweisungen für den Zu‐<br />
griff auf ein R-Objekt (i.d.R. ein data.frame‐Objekt) von <code><pre>data.frame<b>$</b>spalte # “$“ als Trennzeichen</pre></code> auf <code><pre>spalte</pre></code><br />
, da durch den Befehl der <code><b>data.frame</b></code> zum Suchpfad, in dem de‐<br />
finiert ist, wo R nach den Objekten suchen soll, hinzugefügt wird<br />
<br />
<b>Usage</b><br />
<code><pre>
attach(what, pos = 2L, name = deparse1(substitute(what), backtick=FALSE), warn.conflicts = TRUE)
</pre></code>
<b>Arguments</b><br />
<table>
<tr><td>what</td><td>'database'. This can be a data.frame or a list or a R data file<br />
created with save or NULL or an environment. See also 'Details'.</td></tr>
<tr><td>pos</td><td>integer specifying position in search() where to attach.</td></tr>
<tr><td>name</td><td>name to use for the attached database. Names starting with package: are reserved for library.</td></tr>
<tr><td>warn.conflicts</td><td>logical. If TRUE, warnings are printed about conflicts from attaching the database, unless that database contains an object .conflicts.OK. A conflict is a function masking a function, or a non-function masking a non-function.</td></tr>
</table>
<br />
<b>Details</b><br />
<br />
When evaluating a variable or function name R searches for that name in the databases listed by <code><b>search</b></code>. The first name of the appropriate type is used.<br />
<br />
By attaching a data frame (or list) to the search path it is possible to refer to the variables in the data frame by their names alone, rather than as components of the data frame (e.g., in the example below, height rather than <code><b>women$height</b></code>).<br />
<br />
By default the database is attached in position 2 in the search path, immediately after the user's workspace and before all previously attached packages and previously attached databases. This can be altered to attach later in the search path with the pos option, but you cannot attach at pos = 1.<br />
<br />
The database is not actually attached. Rather, a new environment is created on the search path and the elements of a list (including columns of a data frame) or objects in a save file or an environment are copied into the new environment. If you use <code><b><<‐ </b></code>or <code><b>assign</b></code> to assign to an attached database, you only alter the attached copy, not the original object. (Normal assignment will place a modified version in the user's workspace: see the examples.) For this reason attach can lead to confusion.<br />
<br />
One useful 'trick' is to use what = NULL (or equivalently a length-zero list) to create a new environment on the search path into which objects can be assigned by assign or load or sys.source.<br />
<br />
Names starting "package:" are reserved for library and should not be used by end users. Attached files are by default given the name file:what. The name argument given for the attached environment will be used by search and can be used as the argument to as.environment.<br />
<br />
There are hooks to attach user-defined table objects of class "UserDefinedDatabase", supported by the Omegahat package RObjectTables.<br />
<br />
<b>Value</b><br />
<br />
The environment is returned invisibly with a "name" attribute.<br />
<br />
<b>Good practice</b><br />
<br />
attach has the side effect of altering the search path and this can easily lead to the wrong object of a particular name being found. People do often forget to detach databases.<br />
<br />
In interactive use, <code><b>with</b></code> is usually preferable to the use of attach/detach, unless what is a save()-produced file in which case attach() is a (safety) wrapper for load().<br />
<br />
In programming, functions should not change the search path unless that is their purpose. Often <code><b>with</b></code> can be used within a function. If not, good practice is to
<ul>
<li>Always use a distinctive name argument, and</li>
<br />
<li>To immediately follow the attach call by an on.exit call to detach using the distinctive name.</li>
</ul>
This ensures that the search path is left unchanged even if the function is interrupted or if code after the attach call changes the search path.<br />
<br />
<b>Examples</b>
<code><pre>
require(utils)
summary(women$height) # refers to variable 'height' in the data frame “women“
attach(women)
summary(height) # The same variable now available by name
height <- height*2.54 # Don't do this. It creates a new variable
# in the user's workspace
find("height")
summary(height) # The new variable in the workspace
rm(height)
summary(height) # The original variable.
height <<- height*25.4 # Change the copy in the attached environment
find("height")
summary(height) # The changed copy
detach("women")
summary(women$height) # unchanged
## Not run: ## create an environment on the search path and populate it
sys.source("myfuns.R", envir = attach(NULL, name = "myfuns"))
## End(Not run)
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://rdrr.io/r/base/attach.html" target=_blank>rdrr.io :: attach: Attach Set of R Objects to Search Path</a></li>
<li><a href="https://statisticsglobe.com/attach-detach-function-in-r" target=_blank>StasticsGlobe.com :: Attach - Detach function</a></li>
</ul>
</html>
<html>
<ul>
<li>Der Befehl sort(x) ordnet (defaultmässig) den metrischen Vektor x in aufsteigender Reihenfolge. </li>
<li></li>
<li>Soll der Vektor in absteigender Reihenfolge sortiert werden, muss der Aufruf wie folgt erweiter werden:
<code><pre>
sort(test, decreasing=TRUE)
[1] 453 435 96 8 7 4 2
</pre></code>
</li>
<li>Beispiel:
<code><pre>
> Bsp_121 <- c(20, 22, 20, 23, 23, 30, 18, 5, 18, 26, 12, 35)
> Bsp_121
[1] 20 22 20 23 23 30 18 5 18 26 12 35
> sort(Bsp_121)
[1] 5 12 18 18 20 20 22 23 23 26 30 35
> </pre></code></li>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikibooks.org/wiki/GNU_R:_sort" target=_blank>Wikibooks :: GNU R</a></li>
</ul>
</html>
<html>
Die Methode "<code><b>unique()</b></code>" eliminates duplicate elements/rows<br />
from a vector, data frame or array. unique values of a vector.
<code><pre>
> cyl
[1] 6 6 4 6 8 6 8 4 4 6 6 8 8 8 8 8 8 4 4 4 4 8 8 8 8 4 4 4 8 6 8 4
> unique(cyl)
[1] 6 4 8
</pre></code>
Unique values of a matrix and unique rows of the dataframe in R is obtained by<br />
using unique() function in R.<br />
<h3>Links:</h3>
<ul>
<li><a href="https://www.datasciencemadesimple.com/unique-function-in-r/" target=_blank>Data Science Made Simple :: unique()</a></li>
</ul>
</html>
<html>
<table>
<tr><td>adj </td><td><details><summary>Text ADJustment (i.e., justification).</summary> <br />
The value of adj determines the way in which text strings are justified in text, mtext and title.<br />
<br />
A value of :
<ul>
<li><b>0</b> produces left-justified text,</li>
<li><b>0.5</b> (the default) centered text and </li>
<li><b>1</b> right-justified text.</li>
</ul>
(Any value in [0, 1] is allowed, and on most devices values outside that interval will also work.)</details></td></tr>
<tr><td>ann </td><td>Draw plot ANNotations? (i.e., labels and titles). </td></tr>
<tr><td>ask </td><td>ASK before starting a new page? </td></tr>
<tr><td>bg </td><td>BackGround colour. </td></tr>
<tr><td>bty </td><td>Box TYpe (what style of box for box() to draw). </td></tr>
<tr><td>cex </td><td>Character EXpansion factor (text size multiplier). </td></tr>
<tr><td>cex.axis, <br />cex.lab, <br />cex.main, <br />cex.sub</td><td>cex for AXIS tick labels, axis LABels, MAIN plot label (title), and plot SUB-title. </td></tr>
<tr><td>cin </td><td>Character size in INches. </td></tr>
<tr><td>col </td><td>Drawing COLour. </td></tr>
<tr><td>col.axis, <br />col.lab, <br />col.main, <br />col.sub</td><td>Drawing colour for AXIS tick labels, axis LABels, MAIN plot label (title), and plot SUB-title. </td></tr>
<tr><td>cra </td><td>Character size in RAasters (pixels). </td></tr>
<tr><td>crt </td><td>Character RoTation angle. </td></tr>
<tr><td>csi </td><td>Character SIze (height) in inches. </td></tr>
<tr><td>cxy </td><td>Character size in XY coordinates (relative to the axis scales). </td></tr>
<tr><td>din </td><td>Device size in INches. </td></tr>
<tr><td>family </td><td>Text font FAMILY. </td></tr>
<tr><td>fg </td><td>ForeGround colour. </td></tr>
<tr><td>fig </td><td>Size of the FIGure region (as a proportion of the inner region). </td></tr>
<tr><td>fin </td><td>Size of the Figure region in INches. </td></tr>
<tr><td>font </td><td>Text FONT face. </td></tr>
<tr><td>font.axis, <br />font.lab, <br />font.main, <br />font.sub</td><td>Text FONT face for AXIS tick labels, axis LABels, MAIN plot label (title), and plot SUB-title. </td></tr>
<tr><td>lab </td><td>Placement of axis LABels. </td></tr>
<tr><td>las </td><td>Axis LAbel Style </td></tr>
<tr><td>lend </td><td>Line ENDing style. </td></tr>
<tr><td>lheight </td><td>Line HEIGHT (multiplier). </td></tr>
<tr><td>ljoin </td><td>Line JOIN style. </td></tr>
<tr><td>lmitre </td><td>Line MITRE limit (when does a pointy line join get beveled). </td></tr>
<tr><td>lty </td><td>Line TYpe (solid, dashed, ...). </td></tr>
<tr><td>lwd </td><td>Line WidDth </td></tr>
<tr><td>mai </td><td>Figure MArgins in Inches. </td></tr>
<tr><td>mar </td><td>Figure MARgins in lines of text. </td></tr>
<tr><td>mex </td><td>Figure Margin character EXpansion (multiplier). </td></tr>
<tr><td>mfcol </td><td>Number of Multiple Figures (use COLumn-wise). </td></tr>
<tr><td>mfg </td><td>Specify next figure in Multiple FiGure arrangement. </td></tr>
<tr><td>mfrow </td><td>Number of Multiple Figures (use ROW-wise). </td></tr>
<tr><td>mgp </td><td>MarGin Position for plot title and axis labels. </td></tr>
<tr><td>new </td><td>Is the plot region NEW? (not been drawn on). </td></tr>
<tr><td>oma </td><td>Size of the Outer MArgins in lines of text. </td></tr>
<tr><td>omd </td><td>Size of the Outer Margins as a proportion of the Device (page). </td></tr>
<tr><td>omi </td><td>Size of the Outer Margins in Inches. </td></tr>
<tr><td>pch </td><td>Plotting CHaracter (symbol). </td></tr>
<tr><td>pin </td><td>Size of the Plot region in INches. </td></tr>
<tr><td>plt </td><td>Size of the PLoT region as a proportion of the figure region. </td></tr>
<tr><td>ps </td><td>Text Point Size. </td></tr>
<tr><td>pty </td><td>Plot TYpe (points, lines, both). </td></tr>
<tr><td>srt </td><td>String (text) RoTation angle. </td></tr>
<tr><td>tck </td><td>Length of axis TiCK marks as a proportion of the plot region. </td></tr>
<tr><td>tcl </td><td>Length of axis TiC marks as a proportion of the height of a Line of text. </td></tr>
<tr><td>usr </td><td>The axis scale ranges (USeR coordinates). </td></tr>
<tr><td>xaxp </td><td>X-AXis tick mark Positions. </td></tr>
<tr><td>xaxs </td><td>X-AXis Style. </td></tr>
<tr><td>xaxt </td><td>X-AXis Type. <br />
mit “n“ werden keine Strings angezeigt,<br />
alle anderen Angaben werden als “Strings ausgeben“ interpretiert.</td></tr>
<tr><td>xpd </td><td><em>I have NO IDEA where this came from.</em><br />
UPDATE: Bill Venables has proposed “Do you want to eXceed any of the Plotting Domains?“</td></tr>
<tr><td>yaxp </td><td>Y-AXis tick mark Positions. </td></tr>
<tr><td>yaxs </td><td>Y-AXis Style. </td></tr>
<tr><td>yaxt </td><td>Y-AXis Type. <br />
mit “n“ werden keine Strings angezeigt,<br />
alle anderen Angaben werden als “Strings ausgeben“ interpretiert.</td></tr>
</table>
<h3>Links:</h3>
<ul>
<li><a href="https://www.stat.auckland.ac.nz/~paul/R/parMemnonics.html" target="_blank" rel="noreferrer noopener">Paul Murrell mnemonics</a></li>
</ul>
</html>
<html>
### hat nichts gebracht ... irgendwo muss geschrieben stehen, <br />
### welche R-Version Anaconda-RStudio nehmen soll <br />
### Update (17.08.2020, 17:41)<br />
### Habe festgestellt, dass die Anaconda-Version von RStudio eine veraltete R-Version nimmt<br />
### → Habe Link erstellt:<br />
<code><pre>
mueller@Debian-Laptop:~/Programme/anaconda3/envs/rstudio/bin$ cd ../lib/R/bin/
mueller@Debian-Laptop:~/Programme/anaconda3/envs/rstudio/lib/R/bin$ ls -latr R
-rwxrwxr-x 2 mueller mueller 8486 Okt 3 2018 R
mueller@Debian-Laptop:~/Programme/anaconda3/envs/rstudio/lib/R/bin$ mv R R_3.5.1
mueller@Debian-Laptop:~/Programme/anaconda3/envs/rstudio/lib/R/bin$ whereis R
R: /usr/bin/R /usr/lib/R /etc/R /usr/local/lib/R /usr/share/R /usr/share/man/man1/R.1.gz
mueller@Debian-Laptop:~/Programme/anaconda3/envs/rstudio/lib/R/bin$ /usr/bin/R --version
R version 3.5.2 (2018-12-20) -- "Eggshell Igloo"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
http://www.gnu.org/licenses/.
mueller@Debian-Laptop:~/Programme/anaconda3/envs/rstudio/lib/R/bin$ ln -s /usr/bin/R R
mueller@Debian-Laptop:~/Programme/anaconda3/envs/rstudio/lib/R/bin$ ls -atlr R
lrwxrwxrwx 1 mueller mueller 10 Aug 17 17:39 R -> /usr/bin/R
mueller@Debian-Laptop:~/Programme/anaconda3/envs/rstudio/lib/R/bin$
</pre></code>
<br />
### 16.08.2020 :: <br />
### hiermit hat es nicht funktioniert ... ich habe dann in Anaconda die Version von RStudio aktualisiert<br />
### das hat funktioniert<br />
###<br />
This article will cover installation of Open source edition of RStudio released under AGPL License.<br />
<ol>
<li><h3>Step 1: Update system</h3>
Like always, update system package index, and optionally upgrade all installed packages to latest.<br />
<br />
<code><b>
sudo apt update<br />
sudo apt -y upgrade<br />
</b></code>
</li>
<br />
<li><h3>Step 2: Install R on Debian 10 (Buster)</h3>
We need to install r-base package which contains the basic R functions that let you perform arithmetic<br />
operations and basic programming in R. Use the command below to install.<br />
<br />
<code><b>
sudo apt -y install r-base<br />
sudo apt -y install r-base-dev<br />
</b></code>
</li>
<br />
<li><h3>Step 3: Download and Install RStudio on Debian 10 (Buster)</h3>
Now visit the RStudio downloads page to grab the latest release of RStudio for Debian based Linux <br />
distributions.<br />
<br />
<code><b>
wget https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.3.1073-amd64.deb<br />
sudo dpkg -i rstudio-1.3.1073-amd64.deb<br />
</b></code>
<br />
If you encounter any dependency problems, run:<br />
<br />
<code><b>
sudo apt -f install<br />
</b></code>
<br />
<h3>Install for Debian 10 / Ubuntu 18 / Ubuntu 20</h3>
To download and install RStudio Server open a terminal window and execute the following commands.<br />
<br />
<code>
Size: 66.74 MB | SHA-256: bd9a6b0f | Version: 1.3.1073| Released: 2020-08-11<br />
<br /><b>
sudo apt-get install gdebi-core<br />
wget https://download2.rstudio.org/server/bionic/amd64/rstudio-server-1.3.1073-amd64.deb<br />
sudo gdebi rstudio-server-1.3.1073-amd64.deb<br />
</b></code>
<br />
You may choose to verify the build's GPG signature prior to installing it.<br />
<br />
<code><b>
mueller@Debian-Laptop:~$ sudo gdebi rstudio-server-1.3.1073-amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading state information... Done
RStudio Server
RStudio is a set of integrated tools designed to help you be more productive with R. It includes a console, syntax-highlighting editor that supports direct code execution, as well as tools for plotting, history, and workspace management.
Wollen Sie das Software-Paket installieren? [j/N]:j
/usr/bin/gdebi:113: FutureWarning: Possible nested set at position 1
c = findall("[[(](\S+)/\S+[])]", msg)[0].lower()
(Lese Datenbank ... 250430 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von rstudio-server-1.3.1073-amd64.deb ...
Entpacken von rstudio-server (1.3.1073) über (1.3.1073) ...
rstudio-server (1.3.1073) wird eingerichtet ...
useradd: Benutzer “rstudio-server“ existiert bereits
Created symlink /etc/systemd/system/multi-user.target.wants/rstudio-server.service ‐ /lib/systemd/system/rstudio-server.service.
• rstudio-server.service - RStudio Server
Loaded: loaded (/lib/systemd/system/rstudio-server.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2020-08-15 19:10:59 CEST; 1s ago
Process: 8891 ExecStart=/usr/lib/rstudio-server/bin/rserver (code=exited, status=0/SUCCESS)
Main PID: 8892 (rserver)
Tasks: 4 (limit: 4684)
Memory: 39.9M
CGroup: /system.slice/rstudio-server.service
‐ 8892 /usr/lib/rstudio-server/bin/rserver
‐ 8896 /bin/sh -c /usr/bin/R --slave --vanilla -e "cat(paste(R.home('home'),R.home('share'),R.home('include'),R.h“
‐; 8897 /usr/lib/R/bin/exec/R --slave --vanilla -e cat(paste(R.home('home'),R.home('share'),R.home('include'),R.ho“
Aug 15 19:10:59 Debian-Laptop systemd[1]: Starting RStudio Server...
Aug 15 19:10:59 Debian-Laptop systemd[1]: Started RStudio Server.
mueller@Debian-Laptop:~$
</b></code>
</li>
<br />
<li><h3>Step 4: Launch RStudio on Debian 10 (Buster)</h3>
Launch RStudio from Applications search section of your Desktop Environment or from the terminal.<br />
<br />
For terminal, run:<br />
<br />
<code><b>
$ rstudio<br />
</b></code>
</li>
<br />
You have installed R and Rstudio on Debian 10 (Buster) Linux distribution.<br />
<br />
<h3>Link:</h3>
<a href="https://computingforgeeks.com/how-to-install-r-and-rstudio-on-debian/" target=_blank>Computing for Geeks :: How to install R and RStudio on Debian</a>
</html>
<html>
<ol>
<li>Günter Faes (2007): <br />
“Einführung in R, Ein Kochbuch zur statistischen Datenanalyse mit R“, BoD, ISBN 978‐3833491849</li>
<li>Dubravko Dolic (2003): <br />
“Statistik mit R. Einführung für Wirtschafts- und Sozialwissenschaftler“, Oldenbourg, ISBN 3486275372</li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikibooks.org/wiki/GNU_R:_Einleitung" target=_blank>Wiki-Books :: GNU R - Einleitung</a></li>
</ul>
</html>
<html>
<ol>
<li><b><em>build-in help</em></b><br />
Um für die Funktion <code><b>FUN</b></code> diese Hilfe anzuzeigen, einfach <code><b>?</b></code> verwenden:<br />
<code><pre>?FUN</pre></code>
<code><b>?</b></code> ist die Kurzform von <code><b>help</b></code>.<br />
Bei Sonderzeichen (+ oder $) und spezielleren Funktionen (wie <code><b>help</b></code> <br />
selbst) sind diese in Anführungszeichen zu setzen: <code><pre>?"?"</pre></code></li>
<br />
<li><b><em>Paketdokumentation</em></b><br /></li>
<br />
<li><b><em>Dokumente zu R</em></b><br /></li>
</ol>
</html>
<html>
<ul>
<li><h3>Fenster erstellen / öffnen:</h3>
Dies ist betriebssytem-abhängig:
<table>
<tr><td><b>Linux</b> </td><td> <code><b>X11()</b></code></td></tr>
<tr><td><b>MacOS</b> </td><td> <code><b>quartz()</b></code></td></tr>
<tr><td><b>Windows</b> </td><td> <code><b>windows()</b></code></td></tr>
</table>
<br />
<li><h3>psych</h3>
Funktion <code><b>read.clipboard</b></code></li>
<br />
<li><h3>reshape</h3>
<ul>
<li>Funktion <code><b>cast</b></code></li>
<li>Funktion <code><b>melt</b></code></li>
</ul></li>
<br />
<li><h3>???</h3>
<ul>
<li>Funktion <code><b>fix</b></code> :: <ul><li>öffnet ein neues (Editor‐)Fenster, in dem die Werte geändert werden können;</li><li>das Original‐Objekt wird geändert und zurückgegeben</li></ul></li>
<li>Funktion <code><b>edit</b></code>:: <ul><li>öffnet ein neues (Editor‐)Fenster, in dem die Werte geändert werden können;</li><li>das Original‐Objekt wird <u>nicht</u> geändert!</li><li>Daher muss eine Zuweisung an eine neue Variable erfolgen!</ul></li>
</ul>
</li>
<br />
<li><h3>???</h3>
<ul>
<li>Funktion <code><b>scan</b></code> ::</li>
<li>Funktion <code><b>readLines</b></code> ::</li>
</ul></li>
<br />
<li><h3>???</h3>
<ul>
<li>Funktion <code><b>hist</b></code> :: Erstellen eines Histogramms;
Argumente:<br />
col<br />
las<br />
density :: für eine Schraffur; wie dicht die Linien zueinander dargestellt werden (Abstand zueinander?) <br />
angle :: für eine Schraffur; in welchem Winkel die Linien gezeichnet werden sollen<br /></li>
</ul></li>
<br />
<li><h3>RODBC</h3></li>
<br />
<li><h3>sfsmisc</h3>
<ul>
<li>Funktion <code><b>hist.bxp</b></code> :: Kombinierte Darstellung von Histogramm und Boxplot</li>
</ul></li>
<br />
<li><h3>graphics</h3>
<ul>
<li>Funktion <code><b>layout</b></code> ::</li>
</ul></li>
<br />
<!-- li><h3></h3></li>
<br />
<li><h3></h3></li>
<br />
<li><h3></h3></li>
<br />
<li><h3></h3></li>
<br />
<li><h3></h3></li>
<br />
<li><h3></h3></li>
<br / -->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://rdrr.io/r/base/attach.html" target=_blank>rdrr.io :: attach: Attach Set of R Objects to Search Path</a></li>
</ul>
</html>
<html>
<ul>
<li>freie Programmiersprache für <br />
statistische Berechnungen & Datenanalyse</li>
<br />
<li>wurde von Statistikern für Anwender <br />
mit statistischen Aufgaben entwickelt. </li>
<br />
<li>stellt leistungsfähige Grafikfunktionen bereit</li>
<br />
<li>Konsolenanwendung;<br />
Als <b>Standarddistribution</b> kommt R mit einem <b>Interpreter als Kommando-<br />
zeilenumgebung</b> mit rudimentären grafischen Schaltflächen. So ist R auf <br />
vielen Plattformen verfügbar; die Umgebung wird von den Entwicklern aus-<br />
drücklich ebenfalls als R bezeichnet. R ist Teil des GNU-Projekts.</li>
<br />
<li>Die Sprache bietet Schnittstellen zu anderen Programmiersprachen und <br />
Möglichkeiten zur Integration in verschiedene Software.</li>
<br />
<li>R grenzt sich von anderen Programmiersprachen durch die für Statistik<br />
entworfenen Datenstrukturen und Funktionen sowie die Möglichkeiten bei<br />
der Grafikerzeugung ab.</li>
<br />
<li>Nachteilig an R ist die niedrige Geschwindigkeit.</li>
<br />
<li>R gilt zunehmend als die Standardsprache für statistische Problem-<br />
stellungen sowohl in der Wirtschaft als auch in der Wissenschaft.</li>
<br />
<li><b>CRAN</b>, "Comprehensive R Archive Network,<br />
⇒ Bereitstellung von Paketen/Modulen, ca. 5.800;<br />
ähnlich dem CPAN,</li>
<br />
<li><b>Schnittstellen:</b><br />
<ol>
<li><u>Import:</u><br />
CSV, XML, Excel, Access, <br />
Datenbanken (u.a. Oracle, PostgreSQL, MySQL)</li>
<li><u>Export:</u><br />
PNG, JPG, SVg, PDF, HTML, Markdown, LaTeX</li>
</ol></li>
<br />
<li>Syntax-Beispiel:
<code><pre>
# load data from file
tomcat <- read.table (file = "<FileName>")
</pre></code>
wobei:
<ul>
<li>"tomcat" :: Variable</li>
<li>"<-" :: Zuweisung, "=" geht auch</li>
<li>"read.table" :: Funktionsaufruf;<br />
der Punkt als Trennzeichen, nur um es lesbarer zu machen</li>
</ul>
</li>
<br />
<li>Package einladen:<br />
Beispiel: <code><pre># Load RODBC package
library(RODBC)</pre></code></li>
<br />
<li></li>
<br />
<li></li>
<br />
<li></li>
<br />
</ul>
<h3>Links:</h3>
<ul>
<li>Wikipedia-Eintrag</li>
<li><a href="https://statistikguru.de/r/r-basics/was-ist-r.html" target=_blank> StatistikGuru :: R - Basics</li>
</ul>
</html>
<html>
Beispiel:
<code><pre>
> Bsp_121 <- c(20, 22, 20, 23, 23, 30, 18, 5, 18, 26, 12, 35)
> sort(Bsp_121)
[1] 5 12 18 18 20 20 22 23 23 26 30 35
> quantile(Bsp_121)
0% 25% 50% 75% 100%
5.00 18.00 21.00 23.75 35.00
</pre></code>
Vorlesungsskript Parametrische Stochastik FU Hagen 2020/2021<br />
http://www.r-tutor.com/elementary-statistics/numerical-measures/quartile
</html>
<html>
<ul>
<li>easy to learn R programming and data science</li>
<li>Installation :: s. R :: RStudio, IDE</li>
<br />
<li>es gibt mehrere verschiedene Übungskurse, <br />
die heruntergeladen werden (können)</li><br />
<li><b>Durchführungsschritte:</b><br />
Das Paket “swirl“ wurde bereits installiert;<br />
<b><code>
library(“swirl“)<br />
swirl()
</code></b>
</li><br />
<li><b>Infos zu “swirl“:</b><br />
verwendeter Username: <b>McMoneySack</b><br />
<b><code>
You can exit swirl and return to the R prompt (>) at any time by pressing the Esc key. If<br />
| you are already at the prompt, type bye() to exit and save your progress. When you exit<br />
| properly, you'll see a short message letting you know you've done so.<br />
<br />
| When you are at the R prompt (>):<br />
| -- Typing skip() allows you to skip the current question.<br />
| -- Typing play() lets you experiment with R on your own; swirl will ignore what you do...<br />
| -- UNTIL you type nxt() which will regain swirl's attention.<br />
| -- Typing bye() causes swirl to exit. Your progress will be saved.<br />
| -- Typing main() returns you to swirl's main menu.<br />
| -- Typing info() displays these options again.
</code></b></li><br />
<li><b>Angebotene Übungskurse:</b><br />
1: R Programming: The basics of programming in R<br />
2: Regression Models: The basics of regression modeling in R<br />
3: Statistical Inference: The basics of statistical inference in R<br />
4: Exploratory Data Analysis: The basics of exploring data in R<br />
</li><br />
<li><b>Zusätzliche Infos:</b><br />
<b><code>If at any point you'd like more information on a particular topic related to R, you can<br />
| type help.start() at the prompt, which will open a menu of resources (either within<br />
| RStudio or your default web browser, depending on your setup). Alternatively, a simple web<br />
| search often yields the answer you're looking for.</code></b></li><br />
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://swirlstats.com/" target=_blank>swirl, R-Lern-Packet</li>
</ul>
</html>
<html>
<ul>
<li><h3>Ausgabe des help-Befehls <code><b>help(mtcars)</b></code>:</h3>
<p>
mtcars {datasets} R Documentation
<h4>Motor Trend Car Road Tests</h4>
<h5>Description</h5>
The data was extracted from the 1974 Motor Trend US magazine, and comprises fuel consumption and 10 aspects of automobile design and performance for 32 automobiles (1973‐74 models).
<h5>Usage</h5>
mtcars
<h5>Format</h5>
A data frame with 32 observations on 11 (numeric) variables.
<table>
<tr><td>[, 1] </td><td> mpg </td><td> Miles/(US) gallon</td></tr>
<tr><td>[, 2] </td><td> cyl </td><td> Number of cylinders</td></tr>
<tr><td>[, 3] </td><td> disp </td><td> Displacement (cu.in.) (<em>dt. Hubraum</em>)</td></tr>
<tr><td>[, 4] </td><td> hp </td><td> Gross horsepower (<em>dt. Brutto-Pferdestärken</em>)</td></tr>
<tr><td>[, 5] </td><td> drat </td><td> Rear axle ratio</td></tr>
<tr><td>[, 6] </td><td> wt </td><td> Weight (1000 lbs)</td></tr>
<tr><td>[, 7] </td><td> qsec </td><td> 1/4 mile time</td></tr>
<tr><td>[, 8] </td><td> vs </td><td> Engine (0 = V-shaped, 1 = straight)</td></tr>
<tr><td>[, 9] </td><td> am </td><td> Transmission (0 = automatic, 1 = manual)</td></tr>
<tr><td>[,10] </td><td> gear </td><td> Number of forward gears (<em>dt. Vorwärtsgang</em>)</td></tr>
<tr><td>[,11] </td><td> carb </td><td> Number of carburetors (<em>dt. Vergaser</em>)</td></tr>
</table>
<h5>Source</h5>
Henderson and Velleman (1981), Building multiple regression models interactively. Biometrics, 37, 391‐411.
<h5>Examples</h5>
<code><pre>
require(graphics)
pairs(mtcars, main = "mtcars data", gap = 1/4)
coplot(mpg ~ disp | as.factor(cyl), data = mtcars,
panel = panel.smooth, rows = 1)
## possibly more meaningful, e.g., for summary() or bivariate plots:
mtcars2 <- within(mtcars, {
vs <- factor(vs, labels = c("V", "S"))
am <- factor(am, labels = c("automatic", "manual"))
cyl <- ordered(cyl)
gear <- ordered(gear)
carb <- ordered(carb)
})
summary(mtcars2)
</pre></code>
</p>
<code><pre>
> input <- mtcars[]
> print(input)
mpg cyl disp hp drat wt qsec vs am gear carb
Mazda RX4 21.0 6 160.0 110 3.90 2.620 16.46 0 1 4 4
Mazda RX4 Wag 21.0 6 160.0 110 3.90 2.875 17.02 0 1 4 4
Datsun 710 22.8 4 108.0 93 3.85 2.320 18.61 1 1 4 1
Hornet 4 Drive 21.4 6 258.0 110 3.08 3.215 19.44 1 0 3 1
Hornet Sportabout 18.7 8 360.0 175 3.15 3.440 17.02 0 0 3 2
Valiant 18.1 6 225.0 105 2.76 3.460 20.22 1 0 3 1
Duster 360 14.3 8 360.0 245 3.21 3.570 15.84 0 0 3 4
Merc 240D 24.4 4 146.7 62 3.69 3.190 20.00 1 0 4 2
Merc 230 22.8 4 140.8 95 3.92 3.150 22.90 1 0 4 2
Merc 280 19.2 6 167.6 123 3.92 3.440 18.30 1 0 4 4
Merc 280C 17.8 6 167.6 123 3.92 3.440 18.90 1 0 4 4
Merc 450SE 16.4 8 275.8 180 3.07 4.070 17.40 0 0 3 3
Merc 450SL 17.3 8 275.8 180 3.07 3.730 17.60 0 0 3 3
Merc 450SLC 15.2 8 275.8 180 3.07 3.780 18.00 0 0 3 3
Cadillac Fleetwood 10.4 8 472.0 205 2.93 5.250 17.98 0 0 3 4
Lincoln Continental 10.4 8 460.0 215 3.00 5.424 17.82 0 0 3 4
Chrysler Imperial 14.7 8 440.0 230 3.23 5.345 17.42 0 0 3 4
Fiat 128 32.4 4 78.7 66 4.08 2.200 19.47 1 1 4 1
Honda Civic 30.4 4 75.7 52 4.93 1.615 18.52 1 1 4 2
Toyota Corolla 33.9 4 71.1 65 4.22 1.835 19.90 1 1 4 1
Toyota Corona 21.5 4 120.1 97 3.70 2.465 20.01 1 0 3 1
Dodge Challenger 15.5 8 318.0 150 2.76 3.520 16.87 0 0 3 2
AMC Javelin 15.2 8 304.0 150 3.15 3.435 17.30 0 0 3 2
Camaro Z28 13.3 8 350.0 245 3.73 3.840 15.41 0 0 3 4
Pontiac Firebird 19.2 8 400.0 175 3.08 3.845 17.05 0 0 3 2
Fiat X1-9 27.3 4 79.0 66 4.08 1.935 18.90 1 1 4 1
Porsche 914-2 26.0 4 120.3 91 4.43 2.140 16.70 0 1 5 2
Lotus Europa 30.4 4 95.1 113 3.77 1.513 16.90 1 1 5 2
Ford Pantera L 15.8 8 351.0 264 4.22 3.170 14.50 0 1 5 4
Ferrari Dino 19.7 6 145.0 175 3.62 2.770 15.50 0 1 5 6
Maserati Bora 15.0 8 301.0 335 3.54 3.570 14.60 0 1 5 8
Volvo 142E 21.4 4 121.0 109 4.11 2.780 18.60 1 1 4 2
</pre></code>
<!-- li></li>
<li></li>
<li></li -->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.tutorialspoint.com/r/r_boxplots.htm" target=_blank>Tutorialspoint :: R - Boxplots</a></li>
</ul>
</html>
<html>
<ul>
<li>Der jeweilige Workspace kann in einer Datei gespeichert werden;<br />
→ Endungen: *.RDATA, *.RDA (R Workspace Files)<br />
→ Geöffnet über: <code><b>Menü “Arbeitsbereich“ → Arbeitsbereich öffnen</b></code> (Shortcut: Strg + Umschalt + O)</li>
<li>Java‐Umgebungsvariablen (neu) setzen: <code><b>sudo R CMD javareconf</b></code></li>
<li>R-Console öffnen bzw. schließen :: <br />
am unteren Bildrand<br />
→ <img src="./pictures/RKWard_R-Console-Position.png" height=53 width=359 /><br />
durch Klicken auf dem Button kann zwischen “Anzeigen“ und “Verschwinden“ hin‐ und hergewechselt werden
</ul>
<h3>Links:</h3>
<ul>
<li><a href="" target=_blank></a></li>
</ul>
</html>
<html>
<table>
<tr align=center><th>Shortcut</th><th>Aktion</th></tr>
<tr><td>Alt + −</td><td>Zuweisungsoperator, <−</td></tr>
<tr><td>Ctrl + Shift + n</td><td>neues File anlegen</td></tr>
<tr><td>Ctrl + Enter</td><td>aktuell markierte Zeile ausführen</td></tr>
<tr><td>Ctrl + Shift + s</td><td>kompletten Programmcode ausführen</td></tr>
<tr><td>Ctrl + Shift + Enter</td><td>zusätzlich zur Ausführung des Programm‐<br />
codes wird der Code (nochmal) ausgegeben</td></tr>
<tr><td>Ctrl + Z</td><td>Undo</td></tr>
<tr><td>Ctrl + Shift + V</td><td>Text pasten mit Einrückung(en)</td></tr>
<tr><td>Alt Gr + 8</td><td>eckiges Klammernpaar ausgeben</td></tr>
<tr><td>Alt Gr + 9</td><td>nur die schliessende eckige Klammer ausgeben</td></tr>
<tr><td>Ctrl + Shift + c</td><td>Code‐Zeile ein‐ und auskommentieren</td></tr>
<tr><td>Tab‐Taste</td><td>Autocompletion</td></tr>
<tr><td>Alt + Pfeil links/rechts</td><td></td></tr>
<tr><td>Strg + F</td><td></td></tr>
<tr><td>F1</td><td></td></tr>
<tr><td>Strg + L</td><td></td></tr>
<tr><td>Strg + 1, Strg + 2</td><td></td></tr>
<tr><td>Strg + Shift + R</td><td></td></tr>
<tr><td>Alt + L, Alt + Shift + L</td><td></td></tr>
<tr><td>Strg + Shift + M</td><td></td></tr>
<tr><td>Strg + + und Strg + −</td><td></td></tr>
<tr><td>Strg + Shift + a</td><td></td></tr>
<tr><td>Strg + F11, Strg + F12</td><td></td></tr>
<!--
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
2. Alt + Pfeil links/rechts
Damit Ihr schnell im Skript navigieren könnt, braucht Ihr dafür natürlich einen Shortcut. Nach oben und unten ist klar, das geht wie üblich mit den Bild hoch/runter Tasten. Aber um an den Anfang oder das Ende einer Zeile zu springen, und nicht einfach nur auf die Pfeiltasten zu drücken und zu warten, nehmt Ihr einfach die Alt-Taste dazu. Denn mit Alt + Pfeil links/rechts springt der Cursor an den Anfang bzw. Ende einer Zeile. Aber Achtung: Alt + Pfeil hoch/runter schiebt die aktuelle Zeile im Skript nach oben bzw. unten, also nicht aus Versehen diese Tasten drücken. Mit diesem RStudio Shortcut wird das Auswählen von mehreren Zeilen Code schneller, denn wenn der Cursor erstmal am Anfang einer Zeile ist, können dann mit Shift + Pfeil hoch/runter ja dann fix die entsprechenden Zeilen ausgewählt werden.
5. Strg + F
Der Klassiker, den Ihr hoffentlich auch schon aus anderen Programmen wie Word oder Excel kennt. Mit Strg + F öffnet sich oberhalb des Skripts die Suchmaske, mit der Ihr ein Wort im Skript finden und auch ersetzen könnt. Interessanterweise funktioniert das Kürzel Strg + H, welches in vielen Programmen den Suchen und Ersetzen-Dialog aufruft, in RStudio nicht. Aber da Suche und Suche und Ersetzen sowieso in der Suchmaske nebeneinander stehen, ist das auch gar nicht nötig. Hier noch ein Power-Tipp zum Ersetzen: Markiert vorher das Wort, welches Ihr ersetzen wollt und benutzt dann den Shortcut Strg+ F, dann wird nämlich dieses Wort direkt schon in Find eingetragen.
6. F1
Ok, Ihr wisst, wie ein Befehl heißt, aber braucht Details dazu. Schaut in mein R-Glossar ‐ R-Befehle mit knackiger Erklärung und guten Beispielen ‐ oder schreibt ?Befehlsname oder drückt einfach F1, wenn der Cursor auf der Funktion steht.
7. Strg + L
Ist die R-Konsole voll von den vorherigen Aufrufen? Dann drückt Strg + L und löscht damit die bisherige Ausgabe aus der Konsole
8. Strg + 1, Strg + 2
Ehrlich gesagt braucht man diese Shortcuts gar nicht so häufig, denn das meiste spielt sich doch im Skript ab. Aber wenn ihr schnell mal in die R-Konsole springen wollt, benutzt Strg + 2, um mal eben ein paar Befehle auszuprobieren. Dann mit Strg+ 2 zurück zum Skript, um mit der eigentlichen Arbeit fortzufahren.
9. Strg + Shift + R
Dieser R-Shortcut ist super nützlich. Ihr könnt Eure R-Skripte strukturieren, indem Ihr Abschnitte einfügt. Diese lassen sich dann mit dem folgenden Shortcut ein- bzw. ausblenden. Sobald Euer Code eine gewisse Länge hat, ist das definitiv zu empfehlen. Und es ist auch echt schnell gemacht, einfach Strg + Shift + R drücken, benennen und fertig.
10. Alt + L, Alt + Shift + L
Sind mehrere Zeilen markiert oder noch besser ein Abschnitts-Label gesetzt (siehe letzten Shortcut), kann dieser mit Alt+ L eingeklappt und mit Alt + Shift+ L wieder ausgeklappt werden. So behaltet Ihr und die Leute, die Euren Code blicken müssen, den Überblick.
11. Strg + Shift + M
Finger verknotet beim Erzeugt die Pipe %>%, dann schafft das RStudio Tastenkürzel Strg + Shift + M Abhilfe. Auf deutschen Tastaturen ist die Pipe ansonsten wirklich schlecht tippbar, aber so nützlich, wenn Ihr das tidyverse nutzt.
Übrigens: Seit R 4.1 gibt es auch eine Pipe direkt in Base-R, die ihr stattdessen nutzen könnt. Diese wird aus senkrechtem Strich und größer-Zeichen gebildet |>. In den Optionen von RStudio kann man einstellen, welche der beiden Pipes man mit dem Shortcut erzeugen möchte. Geht dazu unter Options > Global Options > Code. Im ersten Tab Editing gibt es dann das Feld “Use native pipe operator, |> (Requires R4.1+ )“. Häkchen dran und fertig.
12. Strg + + und Strg + −
Mit diesem Shortcut skaliert Ihr die Größe der Schrift. Ok, zugegeben, ist ein Spezialfall, aber ziemlich praktisch, wenn man zwischen Laptop und Docking-Station mit Monitoren hin und herwechselt. So hat mein Laptop eine ziemlich hohe Auflösung, also muss ich die Schrift ein bisschen vergrößern. Die Monitore sind aber groß genug bzw. haben für die Größe nur Full-HD, also dort ist es besser, die Schrift zu verkleinern.
13. Strg + Shift + a
Ihr wollt sauber formatierten Code, habt aber keine Lust, das alles selber zu machen. Markiert den Bereich, den ihr formatieren wollt und drückt Strg + Shift + A und schon ist alles sauber formatiert, wie es sein sollte.
15. Strg + F11, Strg + F12
Last but not least ein nützlicher Shortcut, um zwischen mehreren geöffneten Skripten hinu nd her zu springen.Mit Strg + F11 geht ihr zum vorherigen Skript bzw. Tab, der gerade offen ist, mit Strg + F12 zum nächsten Skript bzw. Tab. Damit navigiert ihr schnell zwischen verschiedenen offenen R-Skripten oder zwischen Skript und RMarkdown oder was ihr sonst noch so in RStudio treibt. Kiril hat mich darauf hingewiesen (siehe Kommentar), dass das auch mit der unter Windows üblicheren Tastenkomination Strg + Tab bzw. Strg + Shift + Tab geht.
-->
</table>
<h3>Links:</h3>
<ul>
<li><a href="https://databraineo.com/ki-training-resources/r-programmierung/meine-15-nuetzlichsten-rstudio-shortcuts/" target="_blank" rel="noreferrer noopener">
DataBraineo :: 15 nützliche RStudio‐Shortcuts</a></li>
</ul>
</html>
<html>
<ul>
<li>bereits in Anaconda (“anaconda-navigator“ → “RStudio“) vorhanden</li>
<li>Endung *.rproj := R-Projekt-Datei</li><br />
<li>Wurde von mir bei mir durch RkWard ersetzt</li><br />
<li>Fehlermeldung <b><code>“unable to access index for repository https://cran.rstudio.com/src/contrib: “</code></b><br />
⇒ Workaround: <br />
<b><code>install.packages('package_name', dependencies=TRUE, repos='http://cran.rstudio.com/')</code></b></li><br />
<li><b>Repositories setzen:</b><br />
The default list of known repositories is stored in the file <b><code>“R_HOME/etc/repositories“</code></b>.
<br />(Für gewöhnlich ist <b><code>R_HOME := envs/rstudio/lib/R/</code></b>)<br />That file can be edited for a site, or a user can have a personal copy in the file pointed <br />
to by the environment variable R_REPOSITORIES, or if this is unset or does not exist, in “HOME/.R/repositories“, which will take precedence.
<br /><br />
⇒ soll das Repository geähndert werden, den Befehl “<code><b>setRepositories()</b></code>“ eingeben.<br />
Es erscheint eine menü‐geführte Auflistung</li><br />
<li><b>Library laden:</b><br />
<b><code>library('<i>Lib-Name</i>')</code></b><br /></li>
<br />
<li><b>RStudio aktualisieren:</b><br />
<b><code>Header menu → Help → Check for updates</code></b></li>
<br />
<li><b>Probleme mit dem (En-)Coding:</b><br />
Falls Rstudio das Encoding der Umlaute verbockt, unter<br />
<b><code>Tools → Global Options → Code → Saving → Default Text Encoding: UTF‐8 auswählen</code></b><br />
<a href="https://bookdown.org/brry/course/settings.html#settings" target="_blank" rel="noreffer noopener">Link</a></li>
<br />
<li>Um im <em>Console</em>‐Fenster bei der Eingabe einen Zeilenumbruch zu erzeugen,<br />
einfach hinter dem letzten Zeichen mehrere (2 oder 3?) Leerzeichen einge‐<br />
ben und dann Enter drücken.</li>
<br />
</ul>
<h3>Links:</h3>
<ul>
<li><a href="http://rprogramming.net/download-and-install-rstudio/" target=_blank>Programming.Net :: RStudio</a></li>
<li>Buch "Data Analysis for Life Science"</li>
</html>
<html>
<ul>
<li><b>How to Create R Script</b><br />
<ol>
<li>Mit beliebigem Editor R-Anweisungen schreiben</li>
<li>Das File im Arbeitsverzeichnis als “txt“-File abspeichern</li>
<li>Das File von R einlesen lassen:
<code><pre>source(file = "sample_script.txt") # Wichtig! Die Anführungszeichen angeben!</pre></code></li>
</ol></li>
<li>Befehl, …
<table>
<tr><td>um den Inhalt des aktuell ausgewählten Directories anzuzeigen </td><td> <code><b>dir()</b></code></td></tr>
<tr><td>um den Inhalt einer Variablen auszugeben </td><td> <code><b>print()</b></code></td></tr>
<tr><td>um die im aktuellen Workspace vorhandenen Variablen anzuzeigen </td><td> <code><b>ls()</b></code></td></tr>
<tr><td>um das aktuelle Verzeichnis anzuzeigen </td><td> <code><b>getwd()</b></code></td></tr>
<tr><td>um das Verzeichnis zu wechseln </td><td> <code><b>setwd(“<em>dir</em>“)</b></code></td></tr>
</table>
</li>
<!-- tr><td> </td><td> <code><b></b></code></td></tr>
<tr><td> </td><td> <code><b></b></code></td></tr>
<tr><td> </td><td> <code><b></b></code></td></tr -->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://dzone.com/articles/how-to-write-r-script-explained-with-an-awesome-ex" target=_blank>DZone.com :: How to write a R script</a></li>
<li><a href="https://www.r-bloggers.com/r-scripts/" target=_blank>R-Bloggers :: R scripts</a></li>
<!-- li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li-->
</ul>
</html>
<html>
<ul>
<li>range(), Wertebereich anzeigen</li>
<br />
<li>mean(), Mittelwert</li>
<br />
<li>median(), Median</li>
<br />
<li>IQR(), “Interquartilsabstand“, Streuung</li>
<br />
<li>quantile(), Quantile</li>
<br />
<li></li>
<br />
<li></li>
<br />
<li></li>
<br />
<li></li>
<br />
</ul>
</html>
<html>
<table>
<tr><th>Deutscher Name</th><th>Abk.</th><th><b>R</b>‐Funktion</th></tr>
<tr><td>Mittelwert</td><td></td><td><code><b>mean</b></code></td></tr>
<tr><td>Median</td><td></td><td><code><b>median</b></code></td></tr>
<tr><td>Modus</td><td></td><td>keine Funktion in <b>R</b>;<br /> <br />
selbst definieren: <br />
<code><b>
Modus <‐ function(x) { <br />
b <‐ sort(table(x), decreasing=TRUE);<br />
as.numeric(names(which(max(b)))<br />
}</b></code></td></tr>
<tr><td>Hubers M Schätzer</td><td></td><td><code><b>huber</b></code> im Paket <b>MASS</b></td></tr>
<tr><td>Varianz</td><td></td><td><code><b>var</b></code></td></tr>
<tr><td>Standardabweichung</td><td></td><td><code><b>sd</b></code></td></tr>
<tr><td>Standardfehler des Mittelwerts</td><td></td><td><code><b>std.error</b></code> im Paket <b>plotrix</b></td></tr>
<tr><td>Mittlere absolute Abweichung</td><td></td><td><code><b>mad</b></code></td></tr>
<tr><td>Varianzkoeffizient</td><td></td><td><code><b>cv</b></code> im Paket <b>raster</b><br /><br />Alternativ selbst definieren: <code><b>CV <‐ function(x) { <br /> sd(x, na.rm=TRUE) / mean(x, na.rm=TRUE) }</b></code><br />[Das Argument <code><b>na.rm=TRUE</b></code> löscht fehlende Werte (<code><b>NAs</b></code>),<br />
bevor Mittelwert und Standardabweichung berechnet werden.]</td></tr>
<tr><td>95% Konfidenzintervall</td><td></td><td><code><b></b></code></td></tr>
<tr><td>95% Quantilen</td><td></td><td><code><b></b></code></td></tr>
<tr><td>Interquartilabstand</td><td></td><td><code><b></b></code></td></tr>
<tr><td>Spanne</td><td></td><td><code><b></b></code></td></tr>
<tr><td>Schiefe</td><td></td><td><code><b></b></code></td></tr>
<tr><td>Kurtosis</td><td></td><td><code><b></b></code></td></tr>
</table>
<h3>Quelle:</h3>
<ul>
<li>Christian Dormann :: Parametrische Statistik, Tab. 2.1 (S. 29)</li>
</ul>
</html>
<html>
https://r4ds.had.co.nz/tibbles.html
</html>
<html>
<ol>
<li><details><!--001-->
<summary>Lade den R‐internen Datensatz "<code><b>mtcars</b></code>" und verschaffe Dir mit dem Befehl <code><b>help</b></code> einen Überblick über den Datensatz.</summary>
<br />
<br />
</details></li>
<li><details><!--002-->
<summary>Berechne die Quartilen und den Durchschnitt der Variablen <code><b>hp</b></code>, <code><b>wt</b></code> und <code><b>mpg</b></code>.</summary>
<br />
<br />
</details></li>
<li><details><!--003-->
<summary>Zeichne und interpretiere einen gruppierten Boxplot für die Variable <code><b>mpg</b></code>, gruppiert nach der Variablen <code><b>cyl</b></code></summary>
<br />
<br />
</details></li>
<li><details><!--004-->
<summary>Was macht die Funktion <code><b>unique()</b></code>?</summary>
<br />
Sie eliminiert aus einem Vektor alle mehrfachen Vorkommen eines Wertes.<br />
<br />
Beispiel:
<code><pre>
> cyl
[1] 6 6 4 6 8 6 8 4 4 6 6 8 8 8 8 8 8 4 4 4 4 8 8 8 8 4 4 4 8 6 8 4
> unique(cyl)
[1] 6 4 8
</pre></code>
<em>#TODO Was ist bei Matrizen?</em>
<br />
</details></li>
</ol>
<h2>Links:</h2>
<ul>
<li><a href="https://www.tutorialspoint.com/r/index.htm" target=_blank>Tutorialspoint :: R</a></li>
<li><a href="https://www.codeschool.com/courses/try-r" target=_blank>Codeschool :: R</a></li>
</ul>
</html>
<html>
1. Sub-Directory RCS anlegen: mkdir ./RCS<br>
<br>
2. zu sichernde Datei "einchecken": ci <i>FileName</i><br>
<br>
Die Datei "verschwindet" aus dem aktuellen Verzeichnis und<br>
wird im Sub-Directory RCS neu angelegt: <i>FileName</i>,v<br>
<br>
Dieses Verhalten ist nicht in jedem Fall erwünscht, da nun das <br>
Skript aus dem Pfad entfernt wurde und nicht mehr funktioniert. <br>
<br>
Entweder checken Sie die Datei also einfach mittels <b>co <i>FileName</i></b> <br>
wieder aus, oder verwenden beim Ein-Checken die Option <u>-u</u> (unlocked).<br>
<br>
Der Befehl <b>ci -u <i>FileName</i></b> bewirkt, dass direkt nach dem <br>
Einchecken eine nicht editierbare Kopie im Verzeichnis ~/bin landet.<br>
Gleichzeitig kann der User einen Kommentar eingeben.<br />
<br>
<b>weitere Optionen:</b>
<br>
<b>co -l </b> - das File wird ausgecheckt, und gleichzeitig gelocked<br>
<br>
<b>ci -m MESG</b> - einen Kommentar mitgeben, der beim rlog angezeigt wird<br>
<br>
<b>weitere Befehle:</b>
<br>
<b>rlog</b> - print log messages and other information about RCS files<br>
<br>
<b>rcsdiff</b> - compare RCS revisions; z.B. rcsdiff -r<i>rev1</i> -r<i>rev2</i><br>
<br>
<b>Beispiele:</b><br />
ci -u -d -w<User> <Filename><br />
<br />
</html>
<html>
<ul>
<li>Usage: rlog [options] file ... </li>
<br />
<li>Print log messages and other information about RCS files. </li>
<br />
<li><h3>Options: </h3>
<table>
<tr><td> -L </td><td> Ignore RCS files with no locks set.</td></tr>
<tr><td> -R </td><td> Print the RCS file name only.</td></tr>
<tr><td> -h </td><td> Print only the "header" information. </td></tr>
<tr><td>-t </td><td> Like -h, but also include the description. </td></tr>
<tr><td> -N </td><td> Omit symbolic names. </td></tr>
<tr><td> -b </td><td> Select the default branch. </td></tr>
<tr><td> -dDATES </td><td> Select revisions in the range DATES, with spec: <ul>
<li> D -- single revision D or earlier </li>
<li> D1<D2 -- between D1 and D2, exclusive </li>
<li> D2>D1 -- likewise </li>
<li> <D, D> -- before D </li>
<li> >D, D< -- after D </li>
</ul>
Use <= or >= to make ranges inclusive; <br />DATES
may also be a list of semicolon-separated specs.
<tr><td> -l[WHO] </td><td> Select revisions locked by WHO (comma-separated list) <br />
only, or by anyone if WHO is omitted. </td></tr>
<tr><td> -r[REVS]</td><td> Select revisions in REVS, a comma-separated list of <br />
range specs, one of: REV, REV:, :REV, REV1:REV2 </td></tr>
<tr><td> -sSTATES</td><td> Select revisions with state in STATES (comma-separated list). </td></tr>
<tr><td> -w[WHO] </td><td> Select revisions checked in by WHO (comma-separated list), <br />
or by the user if WHO is omitted. </td></tr>
<tr><td> -T </td><td> No effect; included for compatibility with other commands. </td></tr>
<tr><td> -V </td><td> Obsolete; do not use. </td></tr>
<tr><td> -VN </td><td> Emulate RCS version N. </td></tr>
<tr><td> -xSUFF </td><td> Specify SUFF as a slash-separated list of suffixes <br />
used to identify RCS file names. </td></tr>
<tr><td> -zZONE </td><td> Specify date output format in keyword-substitution.</td></tr>
<tr><td> -q </td><td> No effect, included for consistency with other commands. </td></tr>
</table>
Report bugs to: <bug-rcs@gnu.org> <br />
RCS home page: <http://www.gnu.org/software/rcs/> <br />
General help using GNU software: <http://www.gnu.org/gethelp/> <br />
</html>
<html>
<ul>
<li>Akronym von “Rivest‐Shamir‐Adleman“</li>
<lI>Verschlüsselungsverfahren</li>
</ul>
</html>
<html>
<ul>
<li>RSI := “ Repetitive Strain Injury“</li>
<br />
<li>scheint dem deutschen “ Tennisarm “ zu entsprechen</li>
<br />
<li>Link: <a href="https://www.cyberciti.biz/tips/repetitive-strain-injury-prevention-software.html" target="_blank">Cyberciti :: RSI </a>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://support.rstudio.com/hc/en-us/articles/200532077?version=2022.02.0%2B443&mode=desktop" target="_blank" rel="noreffer noopener">RStudio :: Article</a></li>
</ul>
</html>
<html>
<ul>
<li>Abk. : ReST, reST, RST</li>
<br />
<li>reStructuredText is the default plaintext markup language used by Sphinx. </li>
<br />
<li>reStructuredText ist eine vereinfachte Auszeichnungssprache (Markup)<br />
mit dem Ziel, in der reinen Textform besonders lesbar zu sein. Weiter‐<br />
hin soll reStructuredText leicht in andere Formate umwandelbar sein. </li>
<br />
<li><a href="http://docutils.sourceforge.net/docs/user/rst/quickref.html" target=_blank>ReST Kurzreferenz</a></li>
<br />
<li><a href="http://rst.ninjs.org/" target=_blank>Online reStructuredText editor</a></li>
</ul>
<h3>Links:</h3>
<a href="http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html" target=_blank>Sphinx :: ReStructedText - Primer</a><br />
<a href="https://de.wikipedia.org/wiki/ReStructuredText" target=_blank>Wikipedia</a><br />
<a href="http://docutils.sourceforge.net/docs/user/rst/quickstart.html" target=_blank>Sourceforge :: Quickstart ‐ A ReStructuredText Primer</a>
</html>
<html>
There is nothing more frustrating for an Administrator who <br />
has to reboot system due to <b>fork bomb</b> (i.e. the number of <br />
processes in the system reaches the maximum limit when<br />
a user, even a superuser, tries to execute some command, <br />
the system will respond with <b>"Vfork failed"</b>). <br />
<br />
In Solaris under SPARC, this can be controlled by specifying<br />
a line in <b>/etc/system</b>:
<code><pre>
set maxuprc=64
</pre></code>
And reboot the system. Now a user can have maximum of <br />
64 processes under his ownership. By default the <b>maxuprc</b> <br />
value is 16*maxusers - 5 where 'maxusers' is another tunable<br />
parameter in /etc/system.<br />
<h3>Caution : </h3>
You should have a backup of /etc/system file before you make<br />
the changes. So that you can revert back to old system file using<br />
boot -a option in case of inconsistent system file. <br />
</html>
<html>
To convert the file names from upper <br />
case to lower in all subdirectories a <br />
simple script can be used:
<pre><code>
for i in $*
do
mv $i `echo $i | tr A-Z a-z`
done
</code></pre>
This tip generously supported <br />
by: ksatish@in.ibm.com<br />
</html>
<html>
<ul>
<li>verwendetes ISO-Image: <b>CentOS-Stream-9-latest-x86_64-dvd1.iso</b><br />
von der Seite <a href="https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/iso/"
target="_blank" rel="noreferrer noopener">
CentOS 9 Stream Mirror site</a>
</li>
<br />
<li><img src="./pictures/CentOS-FromISOInstallation-01.jpg" height=148 width=696 /><br />
</li>
<br />
<li><img src="./pictures/CentOS-FromISOInstallation-02.jpg" height=395 width=792 /><br />
</li>
<br />
<li><img src="./pictures/CentOS-FromISOInstallation-03.jpg" height=390 width=789 /><br />
</li>
<br />
<li><img src="./pictures/CentOS-FromISOInstallation-04.jpg" height=395 width=793 /><br />
</li>
<br />
<li><img src="./pictures/CentOS-FromISOInstallation-05.jpg" height=395 width=790 /><br />
</li>
<br />
<li><img src="./pictures/CentOS-FromISOInstallation-06.jpg" height=556 width=792 /><br />
</li>
<br />
<li><img src="./pictures/CentOS-FromISOInstallation-07.jpg" height=122 width=301 /><!-- height=122 width=301 --><br />
</li>
<br />
<li><img src="./pictures/CentOS-FromISOInstallation-08.jpg" height=127 width=437 /><!-- height=127 width=437 --><br />
</li>
<br />
<li><img src="./pictures/CentOS-FromISOInstallation-09.jpg" height=119 width=233 /><!-- height=119 width=233 --><br />
</li>
<br />
<li><img src="./pictures/CentOS-FromISOInstallation-10.jpg" height=253 width=427 /><!-- height=253 width=427 --> <br />
</li>
<br />
<li><img src="./pictures/CentOS-FromISOInstallation-11.jpg" height=255 width=420 /><!-- height=255 width=420 --><br />
</li>
<br />
<li><img src="./pictures/CentOS-FromISOInstallation-12.jpg" height=552 width=641 /> <!-- height=552 width=641 --> <br />
</li>
<br />
</ul>
</html>
<html>
<b>in RHEL / CentOS / Fedora / Rocky Linux:</b>
<ul>
<li>Problem war, dass die Tastaturbelegung auf US eingestellt war
</li>
<li>Vorgehensweise:
<ul>
<li>Einloggen
</li>
<li>locale-Einstellungen anzeigen: locale
</li>
<li>alle verfügbaren locale-Einstellungen auflisten:
<pre><code>locale -a</code></pre>
<ul>
<li>→ die locale "de_DE.UTF-8" oder ähnliches NICHT vorhanden
</li>
<li>→ (Nach-)Installation von glibc & glibc-langpack-de-*:
<pre><code>sudo dnf install glibc glibc-langpack-de-*</code></pre>
</li>
<li>locale -a ⇒ "de_DE.UTF8" in der Liste vorhanden
</li>
<li>Überprüfung File /etc/locale.conf ⇒ der gewünschte Eintrag, "de_DE.UTF8" vorhanden
</li>
<li>VM reboot:
<pre><code>systemctl reboot -i <em># Vorsicht, könnte "the hard way" sein</em></code></pre>
</li>
</ul>
</li>
<li>Anpassung der Keymaps (Tastatur):
<ul>
<li><pre><code>localectl list-keymaps</code></pre>
</li>
<li><pre><code>sudo localectl set-keymap de</code></pre>
</li>
</ul>
</li>
<li>weitere Eingaben dazwischen:
<ul>
<li>Syntax von Befehl "localectl":
<pre><code>localectl [ status | list-locales | list-keymaps ]</code></pre>
</li>
<li>Changing locale settings:
<pre><code>sudo localectl set-locale LANG=de_DE.UTF-8</code></pre>
</li>
<li>Compiling locale definition files:
<pre><code>localedef</code></pre>
</ul>
</li>
<li>Beispiel: <br />
<img src="./pictures/Changing_Locale_RockyLinux.png"
height=264 width=521 />
</li>
</ul>
</html>
<html>
The DNF command (<b><em>“Dandified yum“</em></b>) is the next-generation version of the traditional YUM (<b><em>“Yellowdog Updater, Modified</em></b>) package manager for RedHat based systems. It is the default package manager for Fedora 22, CentOS8, and RHEL8. It is intended to be a replacement for YUM. It does Package Management using RPM and libsolv (maintained by OpenSUSE).
<div id="tw-hreftoc"><h2>Table of Contents</h2></div>
<ul>
<li><a href="#tw-href01">dnf command Basic Usage</a></li>
<li><a href="#tw-href02">Managing packages using the dnf command</a></li>
<li><a href="#tw-href03">1. Search and Install packages with dnf</a></li>
<li><a href="#tw-href04">2. List information about a package</a></li>
<li><a href="#tw-href05">3. List installed packages</a></li>
<li><a href="#tw-href06">4. Remove a package</a></li>
<li><a href="#tw-href07">5. Upgrade a package</a></li>
<li><a href="#tw-href08">6. Search and Install package groups</a></li>
<li><a href="#tw-href09">7. List available or enabled repositories</a></li>
<li><a href="#tw-href10">8. View history of installation/removal of packages</a></li>
<li><a href="#tw-href11">9. List dependencies of a package</a></li>
</ul>
<div id="tw-href01"><h2>dnf command Basic Usage</h2></div>
The general syntax of dnf command is
<code><pre>dnf [options] <command> [<args>...]</pre></code>
Available commands include install, search, query, etc.
args can be a package name, a group name, or subcommand(s) specific to the 'command'.
Note: To install and remove packages, you need to have sudo privileges. Since I am already root (which is not a great idea but works for the purpose of demonstration), I won't be prepending any command with sudo. But keep in your mind that you must prepend sudo while installing and removing packages.<br />
<br />
<a href="#tw-hreftoc">Back to TOC</a>
<div id="tw-href02"><h2>Managing packages using the dnf command</h2></div>
Let's now see how we can use the dnf command to install/remove/query packages on our RedHat based system.
<div id="tw-href03"><h3>1. Search and Install packages with dnf</h3></div>
Let's install the TigerVNC Server using the dnf command. But you may not know the exact name of the package. It's better to search for the package first.
You can use the search command of DNF for searching packages.
<code><pre>
dnf search tigervnc
</pre></code>
<img src="./pictures/dnf-search.png.webp" height=220 width=834 title="DNF Search"/><br />
<br />
Once you know the exact package name(without the architecture part, here x86_64), you can use the install command of DNF for installing that package.
<code><pre>
dnf install tigervnc-server
</pre></code>
<img src="./pictures/dnf-install-tiger.png.webp" height=318 width=779 title="DNF Install TigerVNC Server"/><br />
<br />
<a href="#tw-hreftoc">Back to TOC</a>
<div id="tw-href04"><h3>2. List information about a package</h3></div>
To list more information about a package, use the info command of DNF.
<code><pre>
dnf info tigervnc-server
</pre></code>
<img src="./pictures/dnf-info.png.webp" height=391 width=778 title="DNF Info"/><br />
<br />
<a href="#tw-hreftoc">Back to TOC</a>
<div id="tw-href05"><h3>3. List installed packages</h3></div>
To see the list of installed packages, you can use the list installed command of DNF.
<code><pre>
dnf list installed
</pre></code>
<img src="./pictures/dnf-list-installed.png.webp" height=364 width=813 title="DNF List Installed Packages"/><br />
<br />
Combined with the grep command, you can search whether a particular package is installed or not as follows
<code><pre>
dnf list installed | grep bash
</pre></code>
<img src="./pictures/dnf-installed.png.webp" height=65 width=881 title="DNF check bash is installed or not"/><br />
<br />
If it didn't produce any output, it means that the package is not installed. In that case, if you want to install the package, use dnf search to know the exact name of the package and then dnf install the package.<br />
<br />
<a href="#tw-hreftoc">Back to TOC</a>
<div id="tw-href06"><h3>4. Remove a package</h3></div>
To remove a package, use the remove command of DNF.
<code><pre>
dnf remove tigervnc-server
</pre></code>
<img src="./pictures/dnf-remove.png.webp" height=348 width=689 title="Dnf Remove"/><br />
<br />
To remove all unneeded packages that were originally installed as dependencies, use the autoremove command
<code><pre>
dnf autoremove
</pre></code>
<img src="./pictures/dnf-autotremove.png.webp" height=143 width=952 title="Dnf Autotremove"/><br />
<br />
In my case, there were no unneeded dependencies. So running autoremove had no effect.<br />
<br />
<a href="#tw-hreftoc">Back to TOC</a>
<div id="tw-href07"><h3>5. Upgrade a package</h3></div>
To upgrade all the packages that can be upgraded, use the upgrade command
<code><pre>
dnf upgrade
</pre></code>
<img src="./pictures/dnf-upgrade.png.webp" height=487 width=952 title="Dnf Upgrade"/><br />
<br />
To upgrade a specific package, just add the name of the package, for example
<code><pre>
dnf upgrade python3-perf
</pre></code>
<img src="./pictures/dnf-upgrade-package.png" height=387 width=1013 title="Dnf Upgrade Package"/><br />
<br />
<a href="#tw-hreftoc">Back to TOC</a>
<div id="tw-href08"><h3>6. Search and Install package groups</h3></div>
Package groups are just multiple packages under a single name. These packages groups can be a whole server GUI, Security Tools, Administration Tools, etc. To see the list of groups, you can use the group list command of DNF.
<code><pre>
dnf group list
</pre></code>
<img src="./pictures/dnf-groups.png.webp" height=426 width=789 title="Dnf Groups"/><br />
<br />
To know which packages are there in a group package, just use the group info command and give the name of the package. For 'Development Tools' package, type:
<code><pre>
dnf group info "Development Tools"
</pre></code>
Note: You need to enclose the Group Package Name which has multiple words in quotes(“ … “). Even if the Group package name is a single word, it is recommended that you use quotes.
<img src="./pictures/dnf-group-info.png.webp" height=429 width=783 title="Dnf Group Info"/><br />
<br />
Let's install the Development Tools Group package using the group install command.
<code><pre>
dnf group install "Development Tools"
</pre></code>
<img src="./pictures/dnf-group-install.png.webp" height=428 width=932 title="Dnf Group Install"/><br />
<br />
<a href="#tw-hreftoc">Back to TOC</a>
<div id="tw-href07"><h3>7. List available or enabled repositories</h3></div>
To list all the available repositories using the dnf command, type
<code><pre>
dnf repolist all
</pre></code>
<img src="./pictures/dnf-repolist.png.webp" height=425 width=698 title="Dnf Repolist"/><br />
<br />
To list all the enabled repositories, type
<code><pre>
dnf repolist enabled
</pre></code>
<img src="./pictures/dnf-repo.png.webp" height=160 width=695 title="Dnf Repo"/><br />
<br />
<a href="#tw-hreftoc">Back to TOC</a>
<div id="tw-href10"><h3>8. View history of installation/removal of packages</h3></div>
Sometimes, viewing your DNF command history is a good idea especially if you want to repeat the installations on a different system. History can be viewed using the history command of DNF.
<code><pre>
dnf history
</pre></code>
<img src="./pictures/dnf-history.png" height=697 width=962 title="Dnf History"/><br />
<br />
<a href="#tw-hreftoc">Back to TOC</a>
<div id="tw-href11"><h3>9. List dependencies of a package</h3></div>
To list the dependencies of a package, use the deplist command.
<code><pre>
dnf deplist vim-common
</pre></code>
<img src="./pictures/dnf-deplist.png.webp" height=315 width=980 title="Dnf Deplist"/><br />
<br />
<a href="#tw-hreftoc">Back to TOC</a>
<h3>Links:</h3>
<ul>
<li><a href="https://www.linuxfordevices.com/tutorials/centos/dnf-command" target="_blank"
rel="noreferrer noopener">LinuxForDevices :: Tutorial - dnf command</a></li>
</ul>
</html>
<html>
<table>
<tr>
<th>Dialekt</th><th>Abkürzung</th><th>Beschreibung</th><th>Anwendung</th>
</tr>
<tr>
<td><b>POSIX Basic Regular Expressions</b></td>
<td>POSIX BRE</td>
<td>Grundlegende Ausdrücke gemäß<br />IEEE‐POSIX‐Standard 1003.2</td>
<td>R</td>
</tr>
<tr>
<td><b>POSIX Extended Regular Expressions</b></td>
<td>POSIX ERE</td>
<td>Erweitere Ausdrücke gemäß<br />IEEE‐POSIX‐Standard 1003.2</td>
<td>MySQL, Oracle Database 10g, PHP,<br /> PostgreSQL (<em>bis Vers. 7.4</em>), R</td>
</tr>
<tr>
<td><b>GNU Basic Regular Expressions</b></td>
<td>GNU BRE</td>
<td>POSIX BRE mit GNU‐Erweiterungen</td>
<td>GNU Grep, GNU Sed</td>
</tr>
<tr>
<td><b>GNU Extended Regular Expressions</b></td>
<td>GNU ERE</td>
<td>POSIX ERE mit GNU‐Erweiterungen</td>
<td>GNU Egrap, GNU Awk, GNU Sed, PHP,<br /> GNU Emacs</td>
</tr>
<tr>
<td><b>Perl Compatible Regular Expressions</b></td>
<td>PCRE</td>
<td>Regexe, die in der Programmiersprache <br />Perl benutzt werden</td>
<td>PHP, Perl, R, Emacs mit Pcre2el‐Erweiterung,<br />Apache‐Webserver, Exim, Postfix, Nmap</td>
</tr>
<tr>
<td><b>Tcl Advanced Regular Expressions</b></td>
<td>Tcl ARE</td>
<td>Regex‐Kommandos von Tcl 8.2 & 8.4</td>
<td>TCL, PostgreSQL (<em>ab Vers. 7.4</em>)</td>
</tr>
<tr>
<td><b>European Computer Manufacturers<br /> Associatioin</b></td>
<td>ECMA 262</td>
<td>Regex‐Implementierung für Webbrowser</td>
<td>Javascript</td>
</tr>
</table>
<h3>Links:</h3>
<ul>
<li><a href=""
target="_blank" rel="noreferrer noopener">
Linux‐User :: Reguläre Ausdrücke in Vim & Emacs benutzen, 07/2023, S. 24ff</a>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>Anchors / Anker</h3>
<ul>
<li>\A ‐ Start of string</li>
<li>\Z ‐ End of string</li>
<li>\b ‐ Word boundary</li>
<li>\B ‐ Not word boundary</li>
<li>\< ‐ Start of word</li>
<li>\> ‐ End of word</li>
<li>| ‐ Matches previous OR next character</li>
<li>^Here ‐ Matches any string that begins with 'Here'</li>
<li>finish$ - Matches any string that ends with 'finish'</li>
<li>^Here finish$ - Matches any string that begins with 'Here' and ends with 'finish'</li>
<li>here ‐ Matches any string with 'here' in the string</li>
</ul></li>
<li><h3>Quantifiers</h3>
<ul>
<li>xyz* - Matches strings which have xy in them, but not necessarily</li>
<li>xyz+ - Matches strings which have xy followed by at least one z</li>
<li>xyz? - Matches strings which have xy and either zero or one z</li>
<li>xyz{2} - Matches strings which have xy followed by exactly two z</li>
<li>xyz{2, } - Matches strings which have xy followed by two or more z</li>
<li>xyz{2, 8} - Matches strings which have xy followed by at least 2 z, and up to eight z</li>
<li>x(yz)* - Matches strings which have x followed by zero or more uses of yz</li>
<li>X(yz){2, 8} - Matches strings which have x followed by two through 8 uses of the sequence yz</li>
</ul></li>
<li><h3>Operators</h3>
<ul>
<li>x(yz) - Matches strings where x is followed by either y or z</li>
<li>x[yz] - Matches strings where x is matched, but not y and z</li>
</ul></li>
<li><h3>Character Classes / Zeichenklassen</h3>
<ul>
<li>\d - Matches a single character that is a digit</li>
<li>\w - Matches a single character that is a word character (no numbers)</li>
<li>\s - Matches any whitespace character</li>
<li>. - Matches any character</li>
<li>\t ‐ Matches any tab</li>
<li>\r ‐ Matches any return</li>
</ul></li>
<li><h3>Hilfreiche Beispiele</h3>
<ul>
<li>^\s*$ - Matches an empty line
</li>
<li>find . ‐type f ‐iregex ".*\.mp3$"
</li>
</ul></li>
</ul>
<br />
<h3>Links:</h3>
<ul>
<li><a href="https://setapp.com/how-to/regex-quick-start"
target="_blank" rel="noreferrer noopener">
Setapp‐Blog :: RegEx Quick‐Start</a>
</li>
<li><a href="https://linuxhandbook.com/find-with-regex/"
target="_blank" rel="noreferrer noopener">
LHB :: Using Find Command With Regex </a>
</li>
</ul>
</html>
<html>
If you ever find yourself typing <br>
<br><code>
command | grep pattern | awk '{print $3}'<br>
</code><br>
you can shorten this by using the regexp matching in awk, like this:<br>
<br><code>
command | awk '/pattern/{print $3}'<br>
</code><br>
</html>
<html>
<table>
<tr><th>Ausdruck</th><th>Bedeutung</th></tr>
<tr><td>‐d</td><td>“digits“; Zahlen</td></tr>
<tr><td>‐D</td><td>Nicht-Zahlen</td></tr>
</table>
<table>
<tr><th>Ausdruck</th><th>Bedeutung</th></tr>
<tr><td>‐s</td><td>“strings“; Zeichen, ‐ketten</td></tr>
<tr><td>‐S</td><td>Nicht-Zeichen, ‐ketten</td></tr>
</table>
</html>
<html>
This the Regular expression for floating point numbers and<br />
this can be used with grep or egrep for searching<br />
floating point numbers in any text file.<br />
<code><pre>
(\+|-)?([0-9]+\.?[0-9]*|\.[0-9]+)([eE](\+|-)?[0-9]+)?
</pre></code>
<br />
This tip generously supported by:
udayk@india.hp.com
</html>
<html>
<ul>
<li>Reiterhof Kelkheim</li>
<li>Reiterhof Spiekeroog</li>
<li></li>
<li></li>
</ul>
</html>
<html>
<ul>
<li>Technik aus dem Compilerbau (Top Down Parser)</li>
<br />
<li>implementiert auf direkte Weise (d.h. ohne Tabelle) einen LL-Parser</li>
<br />
<li>z.B. compiler-09.pdf (THM, Gießen)</li>
<br />
</ul>
</html>
<html>
Have you ever accidentally created a file beginning with '-'?<br>
It happens often by mistake and from the first look it seems<br>
like you can't delete the file (rm thinks the initial - is an<br>
option, and doesn't recognize the file).<br>
<br>
The simple, quick way around this is the -- option to rm.<br>
Say you had the file ---hey in the current directory:<br>
<br><code>
$ ls ---hey<br>
/bin/ls: unrecognized option `---hey'<br>
Try `/bin/ls --help' for more information.<br>
<br>
$ ls | grep hey<br>
---hey<br>
<br>
$ rm ---hey<br>
rm: unrecognized option `---hey'<br>
Try `rm --help' for more information.<br>
<br />
$ rm -- ---hey<br>
</code><br>
( ls also has an -- option: )<br>
<br><code>
$ ls -- ---hey<br>
/bin/ls: ---hey: No such file or directory<br>
$</code><br>
<br>
This tip generously supported <br>
by: root@analog.org<br>
</html>
<html>
This a an oldie but a goodie. There always comes a<br>
time when a large number of files need to be renamed.<br>
<br>
Here is one quick way to do it:<br>
<br>
=================== cut here ===========================<br>
<br>
<code>
#!/bin/sh<br>
<br>
for i in *<br>
do<br>
echo $i<br>
mv $i `basename $i`.bak<br>
done
</code>
<br>
</html>
s. a. "Dateien / Verzeichnisse mit Sonderzeichen umbenennen"
<html>
<b>Was versteht man unter dem Rentenartfaktor?</b><br />
<br />
Der gesetzliche Rentenanspruch wird nach einer Formel berechnet, die aus 3<br />
Faktoren besteht:
<ul>
<li>den persönlichen Entgeltpunkten,</li>
<li>dem Rentenartfaktor</li> und
<li>dem aktuellen Rentenwert.</li>
</ul>
<br />
Der <b>Rentenartfaktor</b> ist abhängig vom versicherten Risiko bzw. vom<br />
Sicherungsziel. Er gibt an, um welche Rentenart (Alters-, Erwerbsminderungs-,<br />
Witwen- oder Waisenrente) es sich handelt. Für die Alters- und Erziehungsrente<br />
sowie die Rente wegen voller Erwerbsminderung beträgt der Rentenartfaktor 1,0.<br />
Aufgrund des geringeren Sicherungsziels beträgt er nur 0,5 für die Rente wegen<br />
teilweiser Erwerbsminderung, für die große Witwen-/Witwerrente 0,6 bzw. 0,55<br />
und für die kleine Witwen-/Witwerrente nur noch 0,25. Für Vollwaisenrenten ist<br />
ein Rentenartfaktor von 0,2 und für Halbwaisenrenten von 0,1 maßgebend.<br />
</html>
<html>
Save yourself a lot of typing when you have to perform<br />
repetitive commands on a list of files. Put the list of files<br />
in a text file with one file per line ie: <br />
<br /><code>
find . -name version.C > filename<br />
</code><br />
Then have xargs build a command line for each file in<br />
the list as follows:<br />
<br /><code>
cat filename | xargs -n 1 cp anotherfile<br />
</code><br />
This will copy anotherfile over all the files listed in<br />
filename one at a time until the end of filename is<br />
reached.<br />
</html>
<html>
Ein plötzlicher Anstieg der kurzfristigen Zinsen<br />
am Interbankenmarkt (Repo-Zinsen) ist oft der<br />
Startschuß für heftige Turbulenzen.<br />
<br />
Repo-Zinsen := Repurchase Rate<br />
<br />
<i>www.boersen-knowhow.de</i><br />
</html>
<html>
Config-Session<br>
--> Processing<br>
--> Scripts<br>
--> Define User reports<br>
--> ...<br>
<br>
<br>
Alternativ:<br>
cd /murex/prod/mxg2000<br>
egrep "lux_app" *.mod<br>
</html>
<html>
What's the fastest way to rewind a tape without<br />
using "mt" or other tape software?<br />
<br />
From a bourne or korn shell, Just type:<br />
<br /><code>
$ < /dev/[tapedevice]<br />
$ < /dev/rst8<br />
</code><br />
and watch it rewind...<br />
<br />
This tip generously supported <br />
by: ulli@ucrc.org<br />
</html>
<html>
<h3>Ripping audio CDs to MP3s with abcde</h3>
<ul>
<b>abcde (<em>A Better CD Encoder</em>)</b> is a performant and reliable command-line<br />
tool for ripping audio CDs which can be installed from packages. <br />
<br />
Modern versions of abcde come with logical defaults. An easy way to change<br />
the defaults is to copy /etc/abcde.conf to ~/.abcde.conf and edit the latter. <br />
Everything in the configuration file is commented out, so uncomment and<br />
change the values you want.<br />
<h3>Installation</h3>
Install abcde with your favorite package manager. abcde recommends and<br />
suggests many packages, consider looking at each package and installing<br />
the ones that you need.<br />
<h3>Running abcde</h3>
Put a CD in the CD reader of the system. Start abcde with abcde to execute<br />
with all the defaults and any configuration changes you have made. It will ask<br />
a few questions but then proceed to rip and save. <br />
<h3>Links:</h3>
<a href="https://wiki.debian.org/Ripping#ripping_audio_CDs" target=_blank>Debian - Wiki</a>
</html>
<html>
eine Security (z.B. Staatsanleihe), die ausgelaufen ist, wird genauso wieder neu aufgesetzt.
</html>
<html>
https://roundcube.net/
</html>
<html>
<h2>20 Practical Ruby Loop Command Examples – For, Each, While, Until</h2>
Looping through stuff is an important aspect of any programming language.<br />
<br />
In several of our previous tutorials, we explained in detail various loops including python for loop, for loops in c programming, loops in awk scripting, loops in bash shell scripting, etc.<br />
<br />
The focus of this article is on how to loop through stuff in Ruby.<br />
<br />
In Ruby programming language, on a very high-level, the following are 8 different types of commands (functions) that you can use to loop through stuffs.<br />
<ul>
<li> Loop</li>
<li> Until</li>
<li> While</li>
<li> Do – While</li>
<li> For</li>
<li> Each</li>
<li> Upto</li>
<li> Times</li>
</ul>
In this tutorial, we'll discuss the following 20 examples that will cover all of the Ruby loop related commands.
<ol>
<li> Quick Summary – For the Impatient</li>
<li> Loop Command – Just Keeps Looping</li>
<li> Loop Command – Break out of It</li>
<li> Loop Command – Just Skip one Particular Loop using Next</li>
<li> Until Command – Keep looping until it is true</li>
<li> While Command – While it is true, keep looping</li>
<li> Do-While Loop – While at the end of the block</li>
<li> For Command – Loop through a Number Range</li>
<li> For using Array – Loop through an Array of Elements</li>
<li> For using Array Length</li>
<li> For using Array Size</li>
<li> For inside a For – Nested For Loops</li>
<li> Each Command – Popular Loop Method in Ruby</li>
<li> Each Command – Loop through Multiple Strings in an Array</li>
<li> Each_Index Command – Loop through Only Array Indexes</li>
<li> Each_with_Index Command – Loop through an Array using Index and Value</li>
<li> Each inside a Each – Nested Each Command</li>
<li> Each Command – Loop through Static Number Ranges</li>
<li> Times Command – Loop through X number of Times</li>
<li> Upto Command – Loop through Upto X number Starting from Y</li>
</ol>
<h3>1. Quick Summary – For the Impatient</h3>
For the impatient, quick snippets of major loop commands are shown below. For more details on these commands, read through the full tutorial.
<ul>
<li><b>Loop command:</b><br />
<code><pre>
loop do
puts "do something"
end
</pre></code></li>
<li><b>Until command:</b><br />
<code><pre>
until count > 5
puts "do something"
end
</pre></code></li>
<li><b>While command:</b><br />
<code><pre>
while count <= 5
puts "do something"
end
</pre></code></li>
<li><b>For command – loop 5 times</b><br />
<code><pre>
for i in 1..5 do
puts "#{i}"
end
</pre></code></li>
<li><b>For command – loop through an array:</b><br />
<code><pre>
for i in myarray do
puts "#{i}"
end
</pre></code></li>
<li><b>Each command – loop 5 times</b><br />
<code><pre>
(1..5).each do |i|
puts "#{i}"
end
</pre></code></li>
<li><b>Each command – loop through an array</b><br />
<code><pre>
myarray.each do |element|
puts "#{element}"
end
</pre></code></li>
<li><b>Each command – loop through an array with both index and elements</b><br />
<code><pre>
myarray.each_with_index do |element,i|
puts "#{i}. #{element}"
end
</pre></code></li>
<li><b>Times command – loop 5 times</b><br />
<code><pre>
5.times do |i|
puts "#{i}"
end
</pre></code></li>
<li><b>Upto command – loop from 2 through 5</b><br />
<code><pre>
2.upto(5) do |i|
puts "#{i}"
end
</pre></code></li>
</ul>
<h3>2. Loop Command – Just Keeps Looping</h3>
The first is the loop command itself. All it does is that it keeps going on an infinite loop.
As you see below, the following basic loop command example, will repeatedly keep printing the stuff between the “do“ and “end“ block until you press Ctrl-C
<code><pre>
# cat loop1.rb
loop do
puts "The Geek Stuf"
puts "Press Ctrl-C to Exit!"
end
</pre></code>
Execute the above program to test it. Make sure you press Ctrl-C to exit out of the loop
<code><pre>
# ruby loop1.rb
The Geek Stuf
^CPress Ctrl-C to Exit!
loop1.rb:2: Interrupt
from loop1.rb:1:in `loop'
from loop1.rb:1
</pre></code>
Also, keep in mind that for pretty much any loop commands in Ruby, instead of “do“ and “end“ you can also specify the body of the loop within curly brackets { } as shown below.
The following example is exactly same as above, but using braces .
<code><pre>
# cat loop2.rb
loop {
puts "The Geek Stuf"
puts "Press Ctrl-C to Exit!"
}
</pre></code>
Warning: Donapos;t give { on a separate line! If you do, you'll get an error message. The following is not correct as the { is on the next line to loop. It should be on the same line as loop command.
<code><pre>
# cat loop2.rb
loop
{
puts "The Geek Stuf"
puts "Press Ctrl-C to Exit!"
}
</pre></code>
The above example will throw the following error message.
<code><pre>
# ruby loop2.rb
loop2.rb:3: syntax error, unexpected tSTRING_BEG, expecting kDO or '{' or '('
puts "The Geek Stuf"
^
loop2.rb:5: syntax error, unexpected '}', expecting $end
</pre></code>
<h3>3. Loop Command – Break out of It</h3>
The previous loop command example is pretty much useless as it just keeps looping through.
So, to break out of a loop command, use the break command as shown below.
When you do a “break“, it will just stop the execution of the loop and come out.
<code><pre>
# cat loop3.rb
loop do
puts "The Geek Stuff"
break
end
</pre></code>
The above example will loop through just one time.
<code><pre>
# ruby loop3.rb
The Geek Stuff
</pre></code>
Looping through just one time, is pretty much useless also. So, in the following loop command example, it will loop through total of 5 times before breaking out of the loop.
As you can imagine, to keep track of the number of times to loop, we are using a variable called count and increment it by 1 every time. When the value of the count is equal to 6, we'll break out of the loop.
<code><pre>
# cat loop4.rb
count = 1
loop do
puts "#{count}" " The Geek Stuff"
count = count + 1
if count == 6
break
end
end
</pre></code>
The following is the output of the above example, which loops through exactly 5 times.
<code><pre>
# ruby loop4.rb
1 The Geek Stuff
2 The Geek Stuff
3 The Geek Stuff
4 The Geek Stuff
5 The Geek Stuff
</pre></code>
<h3>4. Loop Command – Just Skip one Particular Loop using Next</h3>
Just like break, inside a loop command, you can also use next.
Next will just skip the rest of the commands in the loop-block for the current execution, but will continue the loop from the top again.
So, in the following example, using if command, we are checking if the value of count is 3. When it is 3, we are executing “next“ command, which will skip the remainder of the loop-block and continue the loop from the top again.
This means that the following example will skip only the 3rd execution of the loop.
<code><pre>
# cat loop5.rb
count = 1
loop do
if count == 3
count = count + 1
next
end
puts "#{count}" " The Geek Stuff"
count = count + 1
if count == 6
break
end
end
</pre></code>
The following output indicates that the above example has skipped the 3rd execution of the loop.
<code><pre>
# ruby loop5.rb
1 The Geek Stuff
2 The Geek Stuff
4 The Geek Stuff
5 The Geek Stuff
</pre></code>
<h3>5. Until Command – Keep looping until it is true</h3>
Until is another type of ruby command to loop through stuff.
In until command, the body will get executed until the condition is true. i.e Keep looping as long the condition is false. When the condition becomes true, it will stop the loop.
In the following example, as long as the value of the variable count is not greater than 5, it will keep looping. When the condition becomes true (i.e when count is greater than 5), it will stop looping.
<code><pre>
# cat until1.rb
count = 1
until count > 5
puts "#{count}" " The Geek Stuff"
count = count + 1
end
</pre></code>
As you see from the output below, the above example has executed the loop 5 times using until command.
<code><pre>
# ruby until1.rb
1 The Geek Stuff
2 The Geek Stuff
3 The Geek Stuff
4 The Geek Stuff
5 The Geek Stuff
</pre></code>
<h3>6. While Command – While it is true, keep looping</h3>
The second type of command to loop through stuff is while command.
In while command, the body will get executed as long the condition specified in the while command is true.
So, the idea here is that while the condition is true, it will keep looping forever. So, it is your responsibility to make sure the condition becomes false at some point in time.
In the following example, the while will keep looping the body until the count is less than or equal to 5. We are increasing the count inside the loop-body.
So, the following example will loop through 5 times.
<code><pre>
# cat while1.rb
count = 1
while count <= 5
puts "#{count}" " The Geek Stuff"
count = count + 1
end
</pre></code>
As you see from the output below, the above example has executed the loop 5 times using while command.
<code><pre>
# ruby while1.rb
1 The Geek Stuff
2 The Geek Stuff
3 The Geek Stuff
4 The Geek Stuff
5 The Geek Stuff
</pre></code>
<h3>7. Do-While Loop – While at the end of the block</h3>
In the previous example, we had the while command at the beginning of the loop.
Typically in most programming languages, when you put the while command at the end of the loop, it is called do-while loop.
Ruby also supports the format of do-while as shown in the following example.
One thing to keep in mind here is that, a do-while loop will always execute the body of the loop at-least once.
This is because we are not checking for any condition at the beginning of the loop. So, the first time the loop is always executed.
At the end of the 1st loop, the condition is checked. As long as the condition is true, it will keep looping.
So, the following example will execute the loop 1st time, and then as long as the condition is true, it will keep looping.
<code><pre>
# cat do-while1.rb
count = 1
begin
puts "#{count}" " The Geek Stuff"
count = count + 1
end while count <= 5
</pre></code>
As you see from the output below, the above example has executed the loop 5 times using do-while command.
<code><pre>
# ruby do-while1.rb
1 The Geek Stuff
2 The Geek Stuff
3 The Geek Stuff
4 The Geek Stuff
5 The Geek Stuff
</pre></code>
<h3>8. For Command – Loop through a Number Range</h3>
Almost all programming languages have a for command to loop through stuff. Ruby is no exception.
The following example shows how to loop through a range of numeric values using a simple for loop.
The range is specified in the format of start-value and end-value separated by two periods (without any space in between them)
In the following example, the start-value of the range is 1. The end-value of the range is 5. count is the name of the variable that hold the current value of the loop.
<code><pre>
# cat for1.rb
for count in 1..5 do
puts "#{count}" " The Geek Stuff"
end
</pre></code>
The following output indicates that the above example executed the loop 5 times using for command
<code><pre>
# ruby for1.rb
1 The Geek Stuff
2 The Geek Stuff
3 The Geek Stuff
4 The Geek Stuff
5 The Geek Stuff
</pre></code>
<h3>9. For using Array –Loop through an Array of Elements</h3>
Apart from giving a number range in the for command, you can also specify an array of elements to loop through.
In the following example, we have an array called “myarray“. In the for command, we've just specified this array name to loop through.
This will just loop through all the elements in the array one by one using the for command.
<code><pre>
# cat for2.rb
myarray = [ 101, 201, 301, 401, 501 ]
for i in myarray do
puts "#{i}"
end
</pre></code>
As you see from the following output, it looped through all the elements in the array and printed them accordingly.
<code><pre>
# ruby for2.rb
101
201
301
401
501
</pre></code>
You can also loop through an array with string values as shown below.
<code><pre>
# cat for2.1.rb
myarray = [ "The", "Geek", "Stuff" ]
for i in myarray do
puts "#{i}"
end
</pre></code>
As you see from the following output, the above example just looped through myarray which contains three string elements and printed them out.
<code><pre>
# ruby for2.1.rb
The
Geek
Stuff
</pre></code>
<h3>10. For using Array Length</h3>
In a for loop command, you can also specify the array-length in the range as the end-value to loop through an array as shown below.
<code><pre>
# cat for3.rb
myarray = [ "The", "Geek", "Stuff" ]
maxsize = myarray.length
for i in 1..maxsize
puts "#{i}" " The Geek Stuff"
end
</pre></code>
In the above example, myarray contains total of three elements. So, marray.length will return 3. We are using this value in the for command range as 1..maxsize
So, we are not really looping through the array. We are kind of looping through the array indexes indirectly. There is a better method to loop through an array using indexes, which is explained in one of the following examples.
As you see from the following output, the loop is executed, exactly 3 times, which is the length of the array.
<code><pre>
# ruby for3.rb
1 The Geek Stuff
2 The Geek Stuff
3 The Geek Stuff
</pre></code>
<h3>11. For using Array Size</h3>
The following example is very similar to the previous example. But, we are using array size instead of length.
<code><pre>
# cat for4.rb
myarray = [ "The", "Geek", "Stuff" ]
for i in 0...myarray.size
puts "#{i}" " The Geek Stuff"
end
</pre></code>
<b>Keep in mind that:</b><br />
Array length will return how many elements are in the array. We got 3 in previous example. So, if you want to loop through from 1, 2, 3 – use array length.
Array size will return total number of elements in the array minus 1. So, we got 2 in this example. So, if you want to loop through from 0, 1, 2 – use array size.
As you see from the following output, the array size returned 2. So, we are looping through from 0 through 2 in our for loop range.
<code><pre>
# ruby for4.rb
0 The Geek Stuff
1 The Geek Stuff
2 The Geek Stuff
</pre></code>
<h3>12. For inside a For – Nested For Loops</h3>
You can also have for loop inside a for loop. This is called nested for loops as shown in the following example.
The outer for loop will loop through the “names“ array. The inner for loop will loop through the “things“ array.
So, for each person in the names array, it will loop through every item in the things array.
<code><pre>
# cat for5.rb
names = [ "John", "Jason", "Lisa" ]
things = [ "Chocolate", "Sugar" ]
counter = 1
for name in names
puts "#{counter}. #{name} likes: "
counter = counter + 1
for item in things
puts " #{item}"
end
end
</pre></code>
As you see from the following output, for each person, it has looped through all the things using a nested for loop format.
<code><pre>
# ruby for5.rb
1. John likes:
Chocolate
Sugar
2. Jason likes:
Chocolate
Sugar
3. Lisa likes:
Chocolate
Sugar
</pre></code>
<h3>13. Each Command –Popular Loop Method in Ruby</h3>
In Ruby, the recommended method to loop through stuff is using each command as shown below.
The syntax of each command is bit different than the traditional for loop, while loop, etc.
The following example explains how to loop through an array of numbers using each command in ruby.
<code><pre>
# cat iterator1.rb
counter = [ 1, 2, 3, 4, 5 ]
counter.each do |i|
puts "#{i} The Geek Stuff"
end
</pre></code>
In the above:
<ul>
<li> counter is the name of the array that contains array of numbers.</li>
<li> counter.each – Here we are adding .each to the array variable name. This will loop through the counter array.</li>
<li> do … end – This is the loop body (just like other loop command examples)</li>
<li> |i| – This is specific to each command. This indicates that the variable i will hold the current value of the array during the looping. You can use this variable to manipulate the individual array element in side the array.</li>
</ul>
As you see from the following output, we've looped through the array variable using the each command and printed the output.
<code><pre>
# ruby iterator1.rb
1 The Geek Stuff
2 The Geek Stuff
3 The Geek Stuff
4 The Geek Stuff
5 The Geek Stuff
</pre></code>
<h3>14. Each Command – Loop through Multiple Strings in an Array</h3>
This is similar to the previous each example, but instead of looping through an array of numbers, here we are looping through an array of strings.
<code><pre>
# cat iterator2.rb
title = [ "The", "Geek", "Stuff" ]
counter = 1
title.each do |i|
puts "#{counter}. #{i}"
counter = counter + 1
end
</pre></code>
As you see from the following output, the each command has looped through out title array and printed all the individual elements one by one.
<code><pre>
# ruby iterator2.rb
1. The
2. Geek
3. Stuff
</pre></code>
<h3>15. Each_Index Command – Loop through Only Array Indexes</h3>
If you just want to loop through the indexes of the array and not the array elements themselves, then use the each_index command as shown below.
<code><pre>
# cat iterator4.rb
title = [ "The", "Geek", "Stuff" ]
title.each_index do |i|
puts "#{i}"
end
</pre></code>
In the above:
<ul>
<li> title is the array that contains three string elements.</li>
<li> title.each_index – This indicates that we like to loop through the indexes of our title array (not the array elements, just the index of the elements)</li>
<li> do … end – This is the loop body (just like other loop command examples)</li>
<li> |i| – This indicates that the variable i will hold the current value of whatever we are looping through. Since we are looping through the indexes, this will hold the current value of the index that we are looping through.</li>
</ul>
As you see from the following output, this has printed the indexes of the array elements. Since we have three elements in the array, this example has printed 0, 1 and 2.
<code><pre>
# ruby iterator4.rb
0
1
2
</pre></code>
Please keep in mind that array index always starts from 0 (not from 1)
<h3>16. Each_with_Index Command – Loop through an Array using Index and Value</h3>
While it is great that each command loops through elements, and each_index loops through indexes.
What if you want to loop through both indexes and elements.
That is exactly why we have each_with_index command as shown in the following example.
In this example, the each_with_index will loop through each individual item, and store both the element value and index value during the loop-body execution in two different variables.
<code><pre>
# cat iterator3.rb
title = [ "The", "Geek", "Stuff" ]
title.each_with_index do |element,i|
puts "#{i}. #{element}"
end
</pre></code>
In the above:
<ul>
<li> title is the array that contains three string elements.</li>
<li> title.each_with_index – This indicates that we like to loop through both the array values and indexes</li>
<li> do … end – This is the loop body (just like other loop command examples)</li>
<li> |element,i| – Here we are specifying two variables. The 1st variable (element) will hold the value of the individual array element. The 2nd variable i will hold the value of the indexes of that particular element.</li>
<li> puts “#{i}. #{element}“ – In the loop body, we are using both individual element and it's corresponding index value.
</ul>
As you see from the following output, this example prints both the index and the individual array element value.
<code><pre>
# ruby iterator3.rb
0. The
1. Geek
2. Stuff
</pre></code>
<h3>17. Each inside a Each – Nested Each Command</h3>
You can also have each inside an each. This is called Nested each, which is similar to the nested for loop example that we saw earlier.
The outer for loop will loop through the “names“ array. The inner for loop will loop through the “things“ array.
So, for each person in the names array, it will loop through every item in the things array.
<code><pre>
# cat iterator5.rb
names = [ "John", "Jason", "Lisa" ]
things = [ "Chocolate", "Sugar" ]
counter = 1
names.each do |name|
puts "#{counter}. #{name} likes: "
counter = counter + 1
things.each do |item|
puts " #{item}"
end
end
</pre></code>
As you see from the following output, for each person, it has looped through all the things using a nested each loop format.
<code><pre>
# ruby iterator5.rb
1. John likes:
Chocolate
Sugar
2. Jason likes:
Chocolate
Sugar
3. Lisa likes:
Chocolate
Sugar
</pre></code>
<h3>18. Each Command – Loop through Static Number Ranges</h3>
Instead of looping through an array, you can also loop through static numbers from a range as shown in the following example.
<code><pre>
# cat iterator6.rb
(1..5).each do |counter|
puts "#{counter} The Geek Stuff"
end
</pre></code>
In the above:
<ul>
<li> (1..5).each – This indicates that we'll be looping through the given range using each command. The given range is 1 through 5</li>
<li> do … end – This is the loop body (just like other loop command examples)</li>
<li> |counter| – This indicates that the variable counter will hold the current value of whatever we are looping through.</li>
</ul>
As you see from the following output, ther above command has looped through the given static range using each command.
<code><pre>
# ruby iterator6.rb
1 The Geek Stuff
2 The Geek Stuff
3 The Geek Stuff
4 The Geek Stuff
5 The Geek Stuff
</pre></code>
<h3>19. Times Command – Loop through X number of Times</h3>
Times is a very helpful loop command, which will help you to quickly loop through x number of times.
The following example will loop through the loop-body 5 times.
<code><pre>
# cat times1.rb
5.times do |i|
puts "#{i} The Geek Stuff"
end
</pre></code>
In the above:
<ul>
<li> 5.times – This indicates that number of time that we like to loop through. Here we'll be looping through 5 times</li>
<li> do … end – This is the loop body (just like other loop command examples)</li>
<li> |i| – This indicates that the variable i will hold the current value of the loop counter i.e 1st loop, or 2nd loop, or 3rd loop, etc.</li>
</ul>
One important thing to keep in mind is that, the times command will always start from 0.
So, when we say 5.times, it means: 0, 1, 2, 3 and 4
As you see from the following output, the above example looped through 5 times, but starting from 0 through 4.
<code><pre>
# ruby times1.rb
0 The Geek Stuff
1 The Geek Stuff
2 The Geek Stuff
3 The Geek Stuff
4 The Geek Stuff
</pre></code>
<h3>20. Upto Command – Loop through Upto X number Starting from Y</h3>
Another useful command is upto.
Unlike times command, you can specify the starting number for the loop.
The following example is similar to the previous example, but it starts from 1 (instead of 0) and loops through 5 times.
<code><pre>
# cat upto1.rb
1.upto(5) do |i|
puts "#{i} The Geek Stuff"
end
</pre></code>
As you see from the following output, the above example looped through 5 times, but starting from 1 through 5.
<code><pre>
# ruby upto1.rb
1 The Geek Stuff
2 The Geek Stuff
3 The Geek Stuff
4 The Geek Stuff
5 The Geek Stuff
</pre></code>
In the following example, we are starting from 3 and looping through upto 6. So, this will loop through: 3, 4, 5 and 6
<code><pre>
# cat upto2.rb
3.upto(6) do |i|
puts "#{i} The Geek Stuff"
end
</pre></code>
The following example has looped through 4 times using upto command, but starting from 3 through 6.
<pre><code>
# ruby upto2.rb
3 The Geek Stuff
4 The Geek Stuff
5 The Geek Stuff
6 The Geek Stuff
</code></pre>
<h3>Link:</h3>
<ul>
<li><a href="https://www.thegeekstuff.com/2018/05/ruby-loop-examples/"
target="_blank" rel="noreferrer noopener">
The Geek Stuff :: Ruby - Loop examples</a>
</li>
</ul>
<br />
<br />
</html>
<html>
UNIX provides a command called "at" <br>
which can be used to run jobs according<br>
to the specfied time.<br>
<br>
To run a particular job in every hour,<br>
every day use the following set of<br>
commands in a file called "at.sh" which<br>
will be executed recursively everyday.<br>
<code>
########### CUT HERE ##################<br>
#! /usr/bin/sh<br>
<br>
# dt is a variable used to store current date<br>
<br>
dt=`date | cut -c5-10`<br>
<br>
# tm is a variable used to store current time<br>
<br>
tm=`date | cut -c12-13`<br>
<br>
while [ $tm -le 23 ]<br>
do<br>
<br>
# "at" is the command ad -f is the option used<br />
# to execute a specified file. "file Name" should<br />
# be an executable file.<br>
<br>
at -f ./"file Name" $tm $dt<br>
tm=`expr $tm + 1`<br>
done<br>
<br>
# With out manual intervention, automatic<br>
# change over to the next day's job scheduling<br>
<br>
at -f ./"File Name" 2358 $dt<br>
dt=`expr $dt + 1`<br>
at -f ./at.sh 0002 $dt<br>
<br>
########### CUT HERE ##################<br>
</code>
</html>
<html>
<ul>
<li>eine Programmiersprache der Mozilla Foundation</li>
<li>Multiparadigmen-Systemprogrammiersprache</li>
<li>soll eine eine schnelle, sichere, nebenläufige und<br />
praxisnahe Sprache sein (s.a. NIST)</li>
<li>In Rust geschriebene Programme laufen <u>nicht</u> in<br />
einer virtuellen Maschine, sondern ein Compiler<br />
übersetzt sie in nativen Maschinencode.</li>
<br />
<li>Rust besitzt <u>skalare Datentypen</u> (<em>scalar data types</em>):
<ul>
<li>Integer
</li>
<li>Floating point</li>
<li>Characters</li>
<li>Boolean</li>
</ul>
</li>
<br />
<li>Daneben gibt es auch <u>zusammengesetzte Datentypen</u> (<em>compound data types</em>):
<ul
<li>Array [speichert mehrere Werte gleichen Typs]</li>
<li>Tuples [speichert mehrere Werte gleichen oder verschiedenen Typs]</li>
</ul>
</li>
<br />
<li>Eigenschaften von Arrays:
<ul>
<li>jedes Element hat den gleichen Typ;</li>
<li>sie haben eine feste Länge;</li>
<li>sie werden in einem Stack gespeichert;</li>
</ul>
</li>
<br />
<li><u>Syntax von Arrrays:</u>
<ol>
<li>ohne Typ‐Annotationen:<br />
<code><b>let var_name = [el-1, el-2, … el-n]</b></code></li>
<li>mit Typ‐Annotationen:
<pre><code><b>let var_name:[<em>data_type; array_length</em>] = [el-1, el-2, … el-n]</b></code></pre>
</li>
</ol>
</li>
<br />
<li><details><summary><b>Community:</b></summary><br />
<a href="https://www.rust-lang.org/community"
target="_blank" rel="noreferrer noopener">
https://www.rust-lang.org/community</a>
</details>
</li>
<br />
<li><details><summary><b>Installation Rust‐Compiler:</b></summary>
<code><pre>curl --proto '=https' --tlsv1.3 -sSf https://sh.rustup.rs | sh</pre></code>
Neben dem Rust‐Compiler wird empfohlen, ein paar<br />
zusätzliche Tools zu installieren:
<code><pre>rustup component add rust-src rust-analyzer rust-analysis</pre></code>
Wenn die Fehlermeldung
<code><pre>error: linker cc not found</pre></code>
erscheint, dann muss der GNU C-Compiler nachinstalliert werden:
<code><pre>sudo apt install build-essential gcc <em># on Ubuntu and Debian</em></pre></code>
To configure your current shell, run:
<code><pre>source $HOME/.cargo/env</pre></code>
</details>
</li>
<br />
<li><details><summary><b>Deinstallation:</b></summary>
<code><pre>rustup self uninstall</pre></code>
</details>
</li>
<br />
<li><details><summary><b>Editoren/PlugIns:</b></summary>
<br />
<ul>
<li><b>SolidOak</b><br />
eine einfache IDE
</li>
<li><b>Rust–DT</b><br />
Eclipse-Plugin
</li>
</ul>
</details>
</li>
<br />
<li><details><summary><b>Offline ‐ Dokumentation:</b></summary><br />
To open the local documentation in the browser:
<code><pre>rustup doc</pre></code>
</details>
<br />
<li><details><summary><b>Compilieren & Programmaufruf:</b></summary><br />
<ul>
<li>Fileendung: .rs, z.B. main.rs
</li>
<li>Compilieren:
<code><pre>rustc <em>Rust‐File, z.b. main.rs</em></pre></code>
</li>
<li>Programmaufruf:
<code><pre><em>Rust‐File, z.B. main</em></pre></code>
</li>
</ul>
</li>
<br />
<li><details><summary><b>Code‐Formatierer aufrufen:</b></summary>
<code><pre>rustfmt ‐‐check <em><SourceFile></em></pre></code>
</details>
</li>
<br />
<li><details><summary><b>Deklaration Funktion:</b></summary>
<code><pre>
fn main() {
}
</pre></code>
The main function is a special function used as the program's<br />
entry point.<br />
<br />
Der Funktionskörper ist durch geschweifte Klammern<br />
umschlossen. Dabei ist es “Good practice“, die öffnen‐<br />
de Klammer in der Zeile der Funktionsdeklaration zu<br />
schreiben.<br />
<br />
Einrückungen sind <b>4 Blanks</b>, <u>keine</u> Tabs!<br />
</details>
</li>
<br />
<li><details><summary><b>Textausgabe:</b></summary><br />
Rust language's standard library has the <code><b>println</b></code> macro. <br />
A macro is similar to a function but it is distinguished by the ex-<br />
clamation mark:
<code><pre>
println!("Hello world!");
</pre></code>
The println macro takes in a format string and puts it to the<br />
program's output (in our case, that is terminal). Since I wish<br />
to output some text instead of a variable the text has to be<br />
enclosed by double quotes (").<br />
<br />
Macros folgen <b>NICHT</b> den gleichen Regeln wie (gleich‐<br />
namige) Funktionen.<br />
</details>
</li>
<br />
<li><div style="color: #FF0000;"><b>Wichtig!</b></div>
Jedes Statement ist mit einem <b>Semikolon</b> abzuschließen.
</li>
<br />
<li><details><summary><b>Kommentarzeilen:</b></summary><br />
<ul>
<li>entspricht der Art und Weise von C;
</li>
<li><b>Kommentierung einer Zeile:</b><br />
beginnt mit Forward-Slashes (“//“);
</li>
<li><b>Kommentierung mehrerer Zeilen:</b><br />
beginnt mit “/*“ und endet mit “*/“.
</li>
</ul>
</details>
</li>
<br />
<li><details><summary><b>Rust‐eigenes Build‐ & Package‐Tool: Cargo</b></summary><br />
<ul>
<li>is the tool to manage code, downloading the libraries<br />
the code depends on and building these libraries;
</li>
<li>
Some common cargo commands are (see all commands with --list):
<table>
<tr align="center">
<th>Befehl</th><th>Aktion</th>
</tr>
<tr>
<td>build, b</td><td>Compile the current package</td>
</tr>
<tr>
<td>check, c</td><td>Analyze the current package and report errors, but don't build object files</td>
</tr>
<tr>
<td>clean</td><td>Remove the target directory</td>
</tr>
<tr>
<td>doc, d</td><td>Build this package's and its dependencies' documentation</td>
</tr>
<tr>
<td>new</td><td>Create a new cargo package</td>
</tr>
<tr>
<td>init</td><td>Create a new cargo package in an existing directory</td>
</tr>
<tr>
<td>add</td><td>Add dependencies to a manifest file</td>
</tr>
<tr>
<td>remove</td><td>Remove dependencies from a manifest file</td>
</tr>
<tr>
<td>run, r</td><td>Run a binary or example of the local package</td>
</tr>
<tr>
<td>test, t</td><td>Run the tests</td>
</tr>
<tr>
<td>bench</td><td>Run the benchmarks</td>
</tr>
<tr>
<td>update</td><td>Update dependencies listed in Cargo.lock</td>
</tr>
<tr>
<td>search</td><td>Search registry for crates</td>
</tr>
<tr>
<td>publish</td><td>Package and upload this package to the registry</td>
</tr>
<tr>
<td>install</td><td>Install a Rust binary. Default location is $HOME/.cargo/bin</td>
</tr>
<tr>
<td>uninstall</td><td>Uninstall a Rust binary</td>
</tr>
</table>
</li>
</ul>
</li>
<br />
<li><b>Creating a project with “<em>cargo</em>“</b><br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://doc.rust-lang.org/book/" target="_blank" rel="noreferrer noopener">Offizielles Lehrbuch</a></li>
<li><a href="https://www.infoworld.com/article/3218074/application-development/what-is-rust-safe-fast-and-easy-software-development.html#tk.ifw-infsb" target="_blank" rel="noreferrer noopener">InfoWorld-Artikel</a></li>
<li><a href="https://de.wikipedia.org/wiki/Rust_(Programmiersprache)" target="_blank" rel="noreferrer noopener">Wikipedia :: Rust</a></li>
<li><a href="http://www.linux-magazin.de/Ausgaben/2012/10/Rust" target="_blank" rel="noreferrer noopener"> Linux-Magazin 10/2012 :: Die Programmiersprache Rust</a></li>
<li><a href="https://www.pc-college.de/seminare-schulungen-kurse/rust/rust-programmierung-einfuehrung-rug.php" target="_blank" rel="noreferrer noopener">
PC‐College :: Seminar ‐ Einführung in Rust</a></li>
<li><details><summary>IT's FOSS Rust Basics Serie</summary><br />
<ol>
<li><a href="https://itsfoss.com/rust-introduction/"
target="_blank" rel="noreferrer noopener">
Create and Run Your First Rust Program ‐ Introduction</a>
</li>
<li><a href="https://itsfoss.com/rust-variables/"
target="_blank" rel="noreferrer noopener">
Using Variables and Constants in Rust Programs</a>
</li>
<li><a href="https://itsfoss.com/rust-arrays-tuples/"
target="_blank" rel="noreferrer noopener">
IT's FOSS :: Rust Basics Series</a>
</li>
<li><a href="https://itsfoss.com/rust-arrays-tuples/"
target="_blank" rel="noreferrer noopener">
IT's FOSS :: Rust Basics Series</a>
</li>
</details>
</li>
</ul>
</html>
<html>
SCA := „Strong Customer Authentication“<br />
Kundenauthentifizierung
</html>
<html>
SD-WAN := Software-Defined WAN</br>
</br>
<pre>
Arrow präsentiert: Check Point & VMware SD-WAN
<b>Secure Cloud-Delivered SD-WAN</b>
Da immer mehr Anwendungen in die Cloud verlagert werden,
verlassen sich Geschäftsbenutzer zunehmend auf diese An–
wendungen, um ihre Arbeit zu erledigen. Von virtuellen Besprechungen
über die gemeinsame Nutzung von Dateien bis hin zur Zusammenarbeit über Tools wie
Skype, Slack und Office 365, einschließlich Sprach- und Videoverkehr, benötigen sie stets
eine konsistente, qualitativ hochwertige Bandbreite. Für IT-Organisationen, die Remote‐
und Zweigstellen verwalten, kann es eine Herausforderung sein, diese Anforderungen auf
effiziente, sichere und kostengünstige Weise zu erfüllen. Für Zweigstellenbenutzer,
die mehr WAN-Bandbreite (Wide Area Network) als je zuvor verbrauchen, ist die Benutzer‐
erfahrung häufig nicht optimal. Herkömmliche WAN-Architekturen wurden nicht zur
Unterstützung von Cloud‐ und SaaS-Anwendungen entwickelt. WAN-Verkehr wird
über teure Mietlei‐ tungen übertragen, die die Kosten in die Höhe treiben,
oder über unzuverlässige öffentliche Internetleitungen, die Endbenutzer frustrieren.
<b>Die Lösung: Check Point VMware SD-WAN. </b>
Jetzt gibt es eine bessere Option. Software-Defined WAN (SD-WAN) ermöglicht es Unternehmen, das Anwendungswachstum zu unterstützen und den Zweigstellenbetrieb zu vereinfachen, während der Zugriff auf Cloud-Dienste und Rechenzentren über das normale Breitband-Internet und private Verbindungen unabhängig vom Transportmechanismus optimiert wird. SD-WAN ist für die heutigen Hybrid-Cloud-Umgebungen von entscheidender Bedeutung, da es Verwaltbarkeit, Leistung und Zuverlässigkeit auf Unternehmensebene in allen Niederlassungen bietet.
Private Verbindungen, die zum Rechenzentrum zurückgeführt werden, können in einem Hub-and-Spoke-Modell gesichert werden. Der lokale Internet-Breakout in die Cloud ist jedoch anfällig für Cyber-Angriffe. Check Point sichert diese Links mit derselben erweiterten Bedrohungsprävention, die in den lokalen Sicherheitsgateways von Check Point verfügbar ist. Gemeinsam gewährleisten VMware SD-WAN von VeloCloud und Check Point gemeinsam die Leistung und Sicherheit von Unternehmens- und Cloud-Anwendungen über das Internet und Hybrid-WAN, vereinfachen die Bereitstellung erheblich und senken die Kosten.
<b>VMware SD-WAN von VeloCloud</b>
VMware SD-WAN von VeloCloud ist eine Overlay-Lösung zwischen VMware SD-WAN Edge-Geräten in verteilten Standorten oder Rechenzentren und in der Cloud gehosteten VMware SD-WAN-Gateways. Das Overlay ist unabhängig von physischen Transporten und Anbietern und ermöglicht eine einheitliche Kontrolle und Transparenz, Abstraktion auf Unternehmensebene und inkrementelle Migration.
<b>Check Point Advanced Threat Prevention</b>
Check Point bietet Unternehmen jeder Grße eine integrierte, fortschrittliche Bedrohungsprävention, die die Komplexität reduziert und die Gesamtbetriebskosten senkt. Check Point schüzt SaaS-, IaaS- und jetzt auch Zweigstellen-Assets vor hoch entwickelten Bedrohungen durch dynamische Skalierbarkeit, intelligente Bereitstellung und konsistente Kontrolle über physische und virtuelle Netzwerke hinweg.
<b>Check Point CloudGuard Connect & Edge</b>
CloudGuard Connect ergänzt die Verbindungen von Zweigniederlassungen mit Security Services aus der Cloud. CloudGuard Edge ist ein leichtgewichtiges virtuelles Security Gateway (VM) für Unternehmen, die on-Premise Security wegen Anforderungen an Datenschutz und ‐standort benötigen. Beide Lösungen können sowohl über das Check Point Infinity Portal oder über einen bestehenden Check Point Management Server verwaltet werden.
Zusammen bieten die integrierte SD-WAN- und Advanced Threat Prevention-Plattform eine sichere und optimierte WAN-Konnektivität über Internetverbindungen und hybride WAN-Verbindungen. Durch die drastische Vereinfachung der Bereitstellung und die Reduzierung der Kosten bieten Check Point und VMware SD-WAN Unternehmen eine kostengünstige und sichere Sicherheitslösung für Remote-Zweigstellen. Als Value Added Distributor bringt Arrow beide Lösungen unter einen Hut und veredelt sie durch bewährte Services bei Konzeptionierung, PoC, Roll-Out, Training und Support.
</pre>
</html>
<html>
steht im Zusammenhang mit OFAC;<br />
SDN := Special Designated National<br />
</html>
<html>
<ul>
<li>EU-SFTR-Verordnung: <br />
mehr Transparenz bei Wertpapierfinanzierungsgeschäfte</li>
<li><a href="https://home.kpmg.com/content/kpmgpublic/de/de/home/themen/2017/06/sftr.html" target=_blank> KPMG :: Vortrag Ulrich Rücker</a></li>
</ul>
</html>
<html>
<ul>
<li>fünf Prinzipien zum Entwurf und der Entwicklung wartbarer Softwaresysteme</li>
<li></li>
</ul>
<h3>Links</h3>
<a href="https://www.informatik-aktuell.de/entwicklung/methoden/solid-die-5-prinzipien-fuer-objektorientiertes-softwaredesign.html" target=_blank>Stefan Dirschnabel :: SOLID – Die 5 Prinzipien für objektorientiertes Softwaredesign</a><br />
<a href="https://www.informatik-aktuell.de/entwicklung/methoden/solid-1-das-dependency-inversion-principle.html?utm_source=CleverReach&utm_medium=email&utm_campaign=Newsletter+8%2F2018&utm_content=Mailing_7074854" target=_blank>Andre Krämer :: SOLID [1] – Das Dependency Inversion Principle </a><br />
</html>
<html>
In general a cross join just takes all rows from table A and combines them with all rows from table B. Other terms for cross join are cross product and cartesian product. Let's make a small example. We need two tables:
<h4>TBL_A</h4>
<img src="./pictures/BLOG_0032-PIC01-TBL_A.png">
<h4>TBL_B</h4>
<img src="./pictures/BLOG_0032-PIC02-TBL_B.png">
<br />
Now you can do the CROSS JOIN with the following SQL:
<code><pre>
SELECT *
FROM TBL_A
CROSS JOIN TBL_B
</pre></code>
Compared with an inner join you write CROSS JOIN and you leave the ON clause. That one is not needed as you don't define any joining condition. That is because all rows from A are taken and combined with all rows of B. The result looks like this:<br />
<br />
<img src="./pictures/BLOG_0032-PIC03-Example-1.png"><br />
<br />
As you can see the row one from table A (1 / A) is taken and combined with all three rows from table B. The result are three rows where the first two columns (that come from table A) are the same and the last two columns (that come from table b) are changing. The same is repeated with row two from table A (2 / A).<br />
<br />
So you can calculate the number of resulting rows with rows in table A * rows in table B. In our example it's 2*3 = 6 rows.<br />
<br />
This type of join is seldom used as it makes sense only in a few cases. For example if you have a value per week and you want to distribute it on each day of the week. I have another table for that:<br />
<br />
<img src="./pictures/BLOG_0032-PIC04-TBL_VALUE_WEEK.png"><br />
<br />
Now we run the following query:
<code><pre>SELECT WEEK_START_DATE+DAY_OF_WEEK AS DAY_DATE,
WEEK_VALUE
FROM TBL_VALUE_WEEK
CROSS JOIN (
SELECT LEVEL-1 AS DAY_OF_WEEK
FROM dual
CONNECT BY LEVEL<=7
) week_days
ORDER BY DAY_DATE</pre></code>
And the result looks like this:<br />
<br />
<img src="./pictures/BLOG_0032-PIC05-Example-2.png"><br />
<br />
As you can see we have all seven days of the week starting with 2017-12-04 and each day has the WEEK_VALUE of this week. Then comes the next week.<br />
<br />
Let's take a closer look at the query. We have a subquery which is needed for generating the seven days of a week. This is database specific. In this case it is an opportunity on an Oracle database. You could also create a table with the numbers 0 to 7 and work with that instead of a subquery. If you are working on other databases you have to change that part.<br />
<br />
Besides the subquery we are just accessing the weekly table cross joining it so in a result we get seven rows a week instead of one.
<h3>Link:</h3>
<a href="http://bi-solutions.gaussling.com/cross-join/" target=_blank>Gaussling :: Cross Join</a>
</html>
<html>
<h3>DCL, Data Control Language</h3>
</html>
<html>
<h3>DDL, Data Definition Language</h3>
</html>
<html>
<h3>DML, Data Manipulation Language</h3>
</html>
<html>
<h3>What is foreign key and difference between primary vs foreign key in SQL</h3>
<p>
A Foreign key is a column in one table which is the primary key on another table. Foreign key and a Primary key is used to define relationship between two tables in relational database. For example in Employee and Department relationship, we have two tables Department(dept_id, dept_name) and Employee (emp_id, emp_name, dept_id). dept_id is primary key in Department table and foreign key in Employee table.
</p>
<p>
Though it's not require that name of foreign key must be same with primary key, we have kept it same as per standard SQL best practices. Foreign key in a table enforce Referential Integrity constraint, which can be used to implement business rules e.g. referential integrity can stop you from creating an Employee with a non existent department.
</p>
<p>
This kind of check maintains integrity of data in a relationship. As discussed in our post What is referential integrity in MySQL database, we have seen that it's implemented as foreign key constraint and can allow CASCADE UPDATE and DELETE. These referential action delete or update matching column in child table ( foreign key table) when corresponding row from parent table (primary key table ) is deleted or updated to maintain integrity of data.
</p>
<h3>Difference between Primary key and Foreign key in SQL</h3>
Here is some important difference between primary and foreign keys in a table which is worth remembering both on SQL interview point of view and knowledge point of view.
<ul>
<li>1) Name of foreign key can be different than the name of primary key it represent in other table. For example in our Employee and Department relationship, Primary key in Department table is dept_id and we have used same name in Employee table to create foreign key. It could have been different e.g. departmentId or departmentID t etc.</li>
<li>2) Another difference between primary and foreign key is that unlike primary key, a foreign key can be null e.g. in our example you can have an Employee record for which dept_id can be null, this shows that no corresponding record in Department table.</li>
<li>3) One more difference between primary key and foreign key is that foreign key can be duplicate opposite to primary key which is always unique.</li>
<li>4) By using foreign key constraints, we can introduce referential integrity in multiple table relationship in SQL. Referential integrity guarantees data integrity, see benefits of Referential Integrity in SQL to know more.</li>
<li>5) Foreign key mostly works as a link between two table when we join tables using INNER JOIN and OUTER JOIN. For example, when we INNER JOIN both Employee with Department table, we can use dept_id as joining column. See How to join three tables in SQL for more details.</li>
<li>6) Table on which a column is declared as a primary key is known as parent table in the relationship and foreign key table is known as child table in a relationship. For example in Employee and Department relationship, Department is parent table because dept_id is primary key there and Employee is child table because dept_id is a foreign key in this table.</li>
</ul>
<h3>Primary key and Foreign key Example in SQL</h3>
One of the best example to understand Primary key and Foreign key in a table is Employee and Department relationship or Customer and Order relationship. You can create Order and Customer table in MySQL as following to create primary and foreign keys :
<code><pre>
CREATE TABLE Customer (cust_id INT NOT NULL,
cust_name VARCHAR(256),
PRIMARY KEY (cust_id)) ENGINE=INNODB;
CREATE TABLE ORDER (order_id INT NOT NULL,
amount INT NOT NULL,
cust_id INT,
FOREIGN KEY (cust_id) REFERENCES Customer(cust_id)
ON DELETE CASCADE) ENGINE=INNODB;
</pre></code>
Now cust_id is primary key in Customer table and foreign key in Order table. If we try to insert an Order for which cust_id is something which is invalid in Customer table, MySQL database will reject such INSERT or UPDATE. This is one of the benefit of using Referential Integrity. It also allow to CASCADE UPDATE and DELETE operation which first delete or update a row in parent table e.g. Customer and then delete or update all matching rows in child table e.g. Order table.
</p>
<p>
That's all on what is foreign key in a table and difference between primary and foreign key in SQL. I suggest to create some table by yourself and try to test foreign key constraint by violating it and see how database e.g. Oracle, MySQL or SQL Server behaves. To understand more try ON DELETE CASCADE and ON DELETE UPDATE to see how database maintains foreign key constraint. You can also see my post on Referential Integrity example on MySQL </p>
<p>
<h3>Further Learning</h3>
<a href="https://www.pluralsight.com/courses/introduction-to-sql" target=_blank>Introduction to SQL</a><br />
<a href="https://www.pluralsight.com/courses/oracle-database-12c-fundamentals" target=_blank>The Complete SQL Bootcamp</a><br />
<a href="https://www.pluralsight.com/courses/mysql-fundamentals-part1" target=_blank>SQL for Newbs: Data Analysis for Beginners </a><br />
<h3>Link:</h3>
<a href="https://javarevisited.blogspot.com/2012/12/foreign-key-vs-primary-key-table-sql-database-difference.html#more" target=_blank>Java Revisited :: </a>
</html>
<html>
<h3>SQL Formatter</h3>
<a href="http://www.dpriver.com/pp/sqlformat.htm" target="_blank">http://www.dpriver.com/pp/sqlformat.htm</a>
</html>
<html>
<ul>
<li><h3>Unterschied zwischen Standards:</h3>
<ul>
<li><b>SQL:2008</b>: <br />so werden die ISO-Standards gekennzeichnet, <br />mit Doppelpunkt und CCYY-Format</li>
<br />
<li><b>SQL-92</b>: <br />so werden die ANSI-Standards gekennzeichnet, <br />mit Bindestrich und YY-Forma</li>
</ul></li>
<li><h3>Aufbau ISO-Standard:</h3>
<table border="1">
<tr><th><b>Part</b></th><th><b>SQL:1999</b></th><th><b>SQL:2003</b></th><th><b>Inhalt</b></th></tr>
<tr><td>1</td><td>Framework (SQL/Framework) </td><td>Framework </td><td>Grundlagen</tr>
<tr><td>2 </td><td>Foundation (SQL/Foundation) </td><td>Foundation (SQL/Foundation) </td><td>Der grundlegende Sprachschatz. Der Teil des SQL:1999 Part 2, der sich mit dem Informations- und Definitionsschema beschäftigt, ist im neuen Part 11 (SQL/Schemata) aufgegangen.</tr>
<tr><td>3 </td><td>Call Level Interface (SQL/CLI) </td><td>Call Level Interface (SQL/CLI) </td><td> </tr>
<tr><td>4 </td><td>Persistent Stored Modules (SQL/PSM) </td><td>Persistent Stored Modules (SQL/PSM)</td><td> </tr>
<tr><td>5 </td><td>Host Language Bindings (SQL/Bindings) </td><td></td><td>Part 5 wurde in SQL:2003 Part 2 integriert.</tr>
<tr><td>6-8 </td><td>Part 6 bis Part 8 gibt es nicht. Die Gründe sind nicht ganz klar und hängen wahrscheinlich mit der Historie des Standards zusammen.</tr>
<tr><td>9</td><td></td><td>Management of External Data (SQL/MED)</td><td>In diesem neuen Teil des Standards wird auf die Möglichkeit eingegangen, Daten außerhalb einer Datenbank zu speichern, aber in einer Datenbank zu verwalten. Dies ist u.a. bei sehr großen zusammenhängenden Datenmengen (z.B. Videodateien) wichtig.</tr>
<tr><td>10</td><td></td><td>Object Language Bindings (SQL/OLB) </td><td>Dieser Teil beschäftigt sich mit der Integration von SQL in JAVA. Diese Einbettung ist auch als SQLJ bekannt.</tr>
<tr><td>11</td><td></td><td>Information and Definition Schemas (SQL/Schemata) </td><td>Dieser Teil beschäftigt sich hauptsächlich mit der Struktur von SQL-Daten, der Wahrung ihrer Integrität, sowie mit Zugangs- und Sicherheitsaspekten.</tr>
<tr><td>12 </td><td>Part 12 gibt es nicht. Die Gründe sind nicht ganz klar und hängen wahrscheinlich mit der Historie des Standards zusammen.</tr>
<tr><td>13</td><td> </td><td>SQL Routines and Types Using the Java TM Programming Language (SQL/JRT) </td><td>Dieser Teil beschäftigt sich mit der Möglichkeit, JAVA-Methoden aus SQL heraus aufzurufen und JAVA-Klassen als spezielle Datentypen zu benutzen.</tr>
<tr><td>14</td><td> </td><td>XML-Related Specifications </td><td>Dieser Teil beschreibt, wie SQL und XML gemeinsam genutzt werden können.</tr>
</table>
</li>
</ul>
</html>
<html>
Darunter versteht man die Verknüpfung zweier oder mehrerer<br />
Tabellen bei einer Abfrage. <br />
<ol>
<li><h4>Kreuzprodukt / CROSS JOIN</h4>
(auch: kartesisches Produkt).<br />
Ein Kreuzprodukt oder kartesisches Produkt entsteht, wenn bei der <br />
Verknüpfung zweier Tabellen keine Join-Bedingung angegeben <br />
wird. Als Ergebnismenge wird dann jede Zeile der einen Tabelle mit <br />
jeder Zeile der anderen Tabelle kombiniert.<br />
<br />
Ab Oracle Version 9i wird diese Art der Kombination auch als <b>Cross<br /> Join</b> bezeichnet, falls bei der Syntax die ANSI-Norm verwendet wird.
</li><br />
<li><h4>Outer Join</h4>
Analog zu den EQUI JOINs gibt es auch bei OUTER JOINs mehrere <br />
Varianten für die Syntax der SELECT-Anfrage. <br />
<br />
In <code>Oracle</code> wurde an die Seite der referenzierten Tabelle ein "(+)" angeführt.<br />
In <code>MySQL</code> werden dafür die Schlüsselwörter "LEFT" und "RIGHT" verwendet.<br />
<br />
"LEFT" bedeutet, dass die Einträge in der linken Tabelle auf alle Fälle aufge-<br />
führt werden, auch dann, wenn kein Eintrag in der rechten Tabelle zugeordnet<br />
werden kann.<br />
"RIGHT" entspricht dem anderen Fall, bei dem alle Einträge in der rechten <br />
Tabelle aufgeführt werden. <br />
<br />
Bei dieser Form des Join werden die Tabellen ebenso wie beim Equijoin über<br />
ein Gleichheitszeichen verknüpft: der Wert einer Spalte in der ersten Tabelle<br />
muss genau dem Wert einer Spalte in der zweiten Tabelle entsprechen. Im<br />
Unterschied zum Equijoin werden Zeilen einer Tabelle ohne Entsprechung in<br />
der anderen Tabelle jedoch schon ausgewählt; es muss angegeben werden,<br />
von welcher Tabelle die Zusatzzeilen angegeben werden sollen.<br />
<br />
Ab Oracle Version 9i kann bei der Syntax auch die ANSI-Norm verwendet <br />werden. Man spricht dann von Left Outer Join, Right Outer Join oder Full<br />
Outer Join. Beim Full Outer Join werden aus beiden beteiligten Tabellen <br />
die Zeilen ohne Entsprechung in der anderen Tabelle mit ausgewählt.<br />
<br />
<ul>
<li><b>Full (Outer) Join</b><br />
<img src="./pictures/SQL-Joins_Full-Outer-Join.png" height=160 width=291</li>
<li><b>Left (Outer) Join</b><br />
<img src="./pictures/SQL-Joins_LeftJoin.png" height=161 width=275<br />
<br />
<ul>
<li>returns all rows from the left table, and <br />
the matched rows from the right table;
</li>
</ul>
<br />
</li>
<li><b>Right (Outer) Join</b><br />
<img src="./pictures/SQL-Joins_RightJoin.png" height=161 width=288><br />
<br />
<ul>
<li>returns all rows from the right table, and<br />
the matched rows from the left table;
</li>
</ul>
<br />
</li>
</ul></li>
<br />
<li><h4>Inner Join</h4>
<img src="./pictures/SQL-Joins_InnerJoin.png" height=160 width=288><br />
<br />
<ul>
<li>auch: "Join"
</li>
<li>returns all rows when there is at least<br />
one match in BOTH tables;
</li>
<li>
</li>
<li>
</li>
</ul>
</li>
<br />
<li><h4>Natural Join</h4></li>
<br />
<li><h4>Straight Join</h4></li>
<br />
<li><h4>Cross Join</h4>
s. oben “Kreuzprodukt“<br />
resp. cf. Tiddler “SQL :: Cross Join“</li>
<br />
<li><h4>Self Join</h4>
Der Self Join ist eine Sonderform des Equijoin: eine Tabelle wird mit sich<br />
selbst verknüpft; sie erscheint zweimal unter verschiedenem Alias in der<br />
FROM-Klausel.<br />
<br />
Ab Oracle Version 9i wird auch diese Art des Join als <b>Inner Join</b> bezeichnet,<br />
falls bei der Syntax die ANSI-Norm verwendet wird.<br /></li>
<br />
<li><h4>Equijoin</h4></li>
<br />
<li><h4>Non-Equijoin</h4></li>
<br />
<li><h4>θ-Joins(Theta–Join)</h4></li>
<br />
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://www.interviewqs.com/blog/sql_joins"
target=_blank rel="noreferrer noopener">
InterviewQS :: SQL-Joins</a>
</li>
<li><a href="https://de.wikipedia.org/wiki/Join_(SQL)"
target=_blank rel="noreferrer noopener">
Wikipedia :: Join</a>
</li>
<li><a href="https://www.w3resource.com/slides/sql-joins-slide-presentation.php"
target=_blank rel="noreferrer noopener">
W3Resource :: Slides ‐ SQL‐Joins</a>
</li>
<li><a href="https://www.w3schools.com"
target=_blank rel="noreferrer noopener">
WWW-Schools.com :: ‐ SQL‐Joins</a>
</li>
<li><a href="https://database.guide/sql-joins-tutorial/"
target=_blank rel="noreferrer noopener">
Database-Guide :: SQL-Joins Tutorial</a>
</li>
</ul>
</html>
<html>
<b>SELECT UNIQUE</b> is old syntax supported by Oracle's flavor of SQL. <br />
It is synonymous with <b>SELECT DISTINCT</b>.<br />
<br />
Use <b>SELECT DISTINCT</b> because this is standard SQL, and <br />
<b>SELECT UNIQUE</b> is non-standard, and in database brands <br />
other than Oracle, <b>SELECT UNIQUE</b> may not be recognized at all.<br />
<br />
Link:<br />
<a href="https://stackoverflow.com/questions/336268/difference-between-select-unique-and-select-distinct#336455" target="_blank">StackOverflow</a>
</html>
<html>
<ul>
<li>SQLite is a self-contained, file-based SQL database.
</li>
<li>it comes bundled with Python and can be used in<br />
any of your Python applications without having to<br />
install any additional software.
</li>
<li>Python ORM-Tool: <code>Peewee</code>
</li>
<li>Bei einer fehlerhaften (Befehls-)Eingabe:
<pre><code>sqlite> quit
…> exit
…> exit
…>
</code></pre>
einfach ein Semikolon als Abschluss eingeben.<br />
Danach ist eine normale Befehlseingabe wie–<br />
der möglich;
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://sqlite.org/download.html"
target="_blank" rel="noreferrer noopener">
SQLite :: Download-Page</a>
</li>
<li><a href="https://pynative.com/python-sqlite/"
target="_blank" rel="noreferrer noopener">
PyNative</a>
</li>
<li><a href="https://www.pythoncentral.io/introduction-to-sqlite-in-python/"
target="_blank" rel="noreferrer noopener">
PythonCentral</a>
</li>
<li><a href="https://www.digitalocean.com/community/tutorials/how-to-use-the-sqlite3-module-in-python-3"
target="_blank" rel="noreferrer noopener">
DigitalOcean</a>
</li>
<li><a href="https://www.educba.com/python-sqlite/"
target="_blank" rel="noreferrer noopener">
Educba</a>
</li>
<li><a href="https://www.sqlitetutorial.net/sqlite-python/" target=_blank>SQLite-Tutorial</a>
</li>
<li><a href="https://dba.stackexchange.com/questions/289767/sqlite-command-line-shell-stuck-on-ctrld-not-working"
target="_blank" rel="noreferrer noopener">
DBA StackExchange :: SQLite command line shell stuck on ...> , CTRL+D not working</a>
</li>
</ul>
</html>
<html>
<ul>
<li>sind auf Start-Server die Schlüssel erzeugt worden?<br />
(z.B. id_rsa und id_rsa.pub)<br />
<br />
</li>
<li>[1] You do have to copy your public key which is being Generated or you have to generate it with the command:-
<ul>
<li>Expecting Your Hostmachine is a linux machine<br />
⇒ <code>ssh-keygen -t rsa -b 4096</code>
</li>
<li>The above command will create a public Key in
<pre><code>/home/user/.ssh/id_rsa.pub</code></pre>
</li>
<li>Copy that public Key and you have to paste it in the vm machine to which you want to ssh, the path where to paste it is.
⇒ <code>/home/user/.ssh/authorized_keys</code>
</li>
<li>Paste the same public key in all the vm.this will make sure your host is haveing passwordless access to all the vm machines.
</li>
<li>In some cases there is no file called as authorized_keys in the above path you do have to create the file at that time with the permission 700.
</li>
<li>And the very last and main thing I saw in your Config File you have changed the Port number for SSH, So your command to connect with ssh should be like,
⇒ <code> ssh -p 2206 vagrant@192.168.1.8</code></pre>
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>[1] <a href="https://serverfault.com/questions/1129160/why-i-can-not-ssh-to-my-vagrant-host-vagrant192-168-1-8-permission-denied-pu"
target="_blank" rel="noreferrer noopener">
ServerFault.com :: Why I can not ssh to my Vagrant host? vagrant@192.168.1.8: Permission denied (publickey)</a>
</li>
</ul>
</html>
<html>
<ul>
<li><pre><code>[vagrant@ctrlnode .ssh]$ ssh-copy-id -i id_rsa.pub vagrant@debian
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
vagrant@debian's password: <em>Hier das Password vom User eingeben, in diesem Fall von "vagrant"</em>
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'vagrant@debian'"
and check to make sure that only the key(s) you wanted were added.</code></pre>
</li>
</ul>
</html>
<html>
<ul>
<li>Ein automatisches Login führt SSH durch, wenn auf der Zielmaschine der <br />
öffentliche Schlüssel des eigenen Accounts hinterlegt ist. Der öffentliche <br />
Schlüssel wird auf der Zielmaschine zum Zielaccount hinzugefügt mittels:<br />
<br /><code>
$ cat id_rsa.pub >>.ssh/authorized_keys<br />
</code>
<br />
Die Datei darf nur für den Owner schreibbar sein.<br />
<br />
Information zur Schlüsselgenerierung: <a href="http://www.supportnet.de/faqsthread/806" target=_blank>Supportnet</a>
</li>
</ul>
<h3>Link:</h3>
<ul>
<li><a href="http://www.fseitz.de/blog/index.php?/archives/20-SSH-Automatisch-einloggen.html"
target="_blank" rel="noreferrer noopener">
Seitz.de :: Blog - SSH - Automatisch einloggen</a>
</li>
</ul>
<br />
</html>
<html>
<ul>
<li><pre><code>ssh-keygen -l [ -f /path/to/key ]</code></pre>
z.B.
<pre><code>ssh-keygen -lf ~/.ssh/id_rsa</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://phoenixnap.com/kb/ssh-permission-denied-publickey"
target="_blank" rel="noreferrer noopener">
PhoenixNAP :: How to Fix SSH Failed Permission Denied </a>
</li>
</ul>
</html>
<html>
<ul>
<li>Wenn die Fehlermeldung
<pre><code>This key is not known by any other names</code></pre>
kommt, dann hat der aufrufende Host nicht den Finger-<br />
print der Remote-Maschine;<br />
</li>
<li>das trat u.a. beim Aufruf von
<pre><code>ssh-copy-id vagrant@centos</code></pre>
auf;
</li>
<li>die Lösung ist, den Fingerprint in die lokale <br />
<code>known_hosts</code>-Datei zu kopieren:
<pre><code>ssh-keyscan <em>Remote-Maschine</em> >> ~/.ssh/known_hosts</code></pre>
z.B.
<pre><code>ssh-keyscan centos >> ~/.ssh/known_hosts</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://devcodef1.com/news/1018322/troubleshooting-ssh-key-and-directory-issues"
target="_blank" rel="noreferrer noopener">
DevCodeF1.com :: Troubleshooting SSH: Key is not known by any other names / could not create directory /ssh / failed to add the host to the list of known hosts </a>
</li>
</ul>
</html>
<html>
<ul>
<li>Ursache war, dass auf dem Zielrechner<br />
in der Datei
<pre><code>~/.ssh/authorized_keys</code></pre>
der Public-Key des Users vom Quell-<br />
rechner nicht hinterlegt war;
</li>
<br />
<li>als erstes ist der Transfer mittels
<pre><code>ssh-copy-id <em>USER-AUF-ZIELRECHNER</em>@<em>ZIELRECHNER</em></code></pre>
zu erledigen;
</li>
<br />
<li>es gibt folgende Möglichkeiten, den Public-Key<br />
dennoch auf den Zielrechner zu transferieren:
<ol>
<li>Connect from another computer
</li>
<li>Connect with password
</li>
<li>Connect via server provider console (Cloud)
</li>
<li>via Zielrechner:
<ol>
<li>sich auf dem Zielrechner unter dem Account<br />
<code>vagrant</code> einloggen, und von dort mittels<br />
<code>sftp</code> auf den Startserver einloggen;
</li>
<li>danach in das <code>.ssh</code> wechseln, und per <br />
<code>get id_rsa.pub</code> auf den Zielrechner<br />
transferieren;
</li>
<li>hier an das Ende der Datei <code>authorized_keys</code><br />
anhängen;<br />
</li>
<li>die Datei <code>id_rsa.pub</code> löschen
</li>
</ol>
</li>
</ol>
</li>
</ul>
<!--
<h3>Links:</h3>
<ul>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
</ul>
-->
</html>
<html>
<ul>
<li><pre><code>Received message too long 774774885
Ensure the remote shell produces no output for non-interactive sessions.</code></pre>
</li>
<li><b>Lösung:</b><br />
<ul>
<li>Configure your server to use the internal <br />
sftp server adding the following directive <br />
to <b>/etc/ssh/sshd_config</b>:
<pre><code>Subsystem sftp internal-sftp</code></pre>
</li>
<li>That way, it will not use the user shell to<br />
launch the sftp server program.
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://stackoverflow.com/questions/8250379/sftp-on-linux-server-gives-error-received-message-too-long"
target="_blank" rel="noreferrer noopener">
StackOverflow :: SFTP on linux server gives error "Received message too long" [closed]</a>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>To find the fingerprint of a local SSH server’s host key</h3>
<ul>
<li><pre><code>ssh-keygen -lf /etc/ssh/ssh_host_<em>ENCRYPTION</em>_key.pub</code></pre>
</li>
<li>The -l option displays the fingerprint.
</li>
<li>The -f option specifies the key file.
</li>
<li><code>/etc/ssh/ssh_host_<em>ENCRYPTION</em>_key.pub </code><br />
is the default path for the public key<br />
file of the SSH server.
</li>
</ul>
</li>
<li><h3>To find the fingerprint of a <u><em>remote</em></u> SSH server’s host key</h3>
<ul>
<li>combine ssh-keygen with ssh-keyscan:
<pre><code>ssh-keyscan <em>hostname_or_IP</em> | ssh-keygen -lf -</code></pre>
</li>
<li> <code>ssh-keyscan</code> retrieves the public<br />
key of the remote server.
</li>
<li>The output is piped into <code>ssh-keygen -lf – </code><br />
to compute and show the fingerprint.
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.howtouselinux.com/post/obtaining-ssh-host-key-fingerprint-in-linux"
target="_blank" rel="noreferrer noopener">
HowToUseLinux :: Find SSH Host Key Fingerprint in Linux</a>
</li>
</ul>
</html>
<html>
<ul>
<li><code>The authenticity of host 'server.server.test (88.188.141.88)' can't be established.<br />
RSA key fingerprint is 88:88:88:01:7f:f9:19:73:53:79:dd:a5:ac:88:88:88.<br />
Are you sure you want to continue connecting (yes/no)? yes<br />
Warning: Permanently added 'server.server.test' (RSA) to the list of known hosts.</code></li>
</ul>
</html>
<html>
I recently read that SSH keys provide a secure way of logging <br />
into a Linux and Unix-based server. How do I set up SSH keys<br />
on a Linux or Unix based systems? In SSH for Linux/Unix, how<br />
do I set up public key authentication?<br />
<br />
I am assuming that you are using Linux or Unix-like server and<br />
client with the following software:
<ul>
<li> OpenSSH SSHD server</li>
<li> OpenSSH ssh client and friends on Linux (Ubuntu, Debian, <br />
{Free,Open,Net}BSD, RHEL, CentOS, MacOS/OSX, AIX, HP-UX and co).</l>
</ul>
<h3>What is a public key authentication?</h3>
OpenSSH server supports various authentication schema. The<br />
two most popular are as follows:
<ul>
<li>Passwords based authentication</li>
<li>Public key based authentication. <br />
It is an alternative security method to using passwords.<br />
This method is recommended on a VPS, cloud, dedicated <br />
or even home based server.</li>
</ul>
<h3>How to set up SSH keys</h3>
Steps to setup secure ssh keys:
<ol>
<li>Create the key pair using <b>ssh-keygen</b> command.</li>
<li>Copy and install the public key using <b>ssh-copy-id</b> command.</li>
<li>Add yourself to sudo admin account.</li>
<li>Disable the password login for root account.</li>
</ol>
Let us see all steps in details.
<h3>How do I set up public key authentication?</h3>
You must generate both a public and a private key pair. For example:<br />
<img src="pictures/ssh-welcome-setup.png" width=599 height=347>
<br />
Fig.01: Our sample setup
Where,
<ul>
<li><b>server1.cyberciti.biz – </b><br />
You store your public key on the remote hosts and you <br />
have an accounts on this Linux/Unix based server.</li>
<li><b>client1.cyberciti.biz – </b><br />
Your private key stays on the desktop/laptop/ computer <br />
(or local server) you use to connect to server1.cyberciti.biz server. <br />
Do not share or give your private file to anyone.</li>
</ul>
In public key based method you can log into remote hosts and <br />
server, and transfer files to them, without using your account <br />
passwords. Feel free to replace server1.cyberciti.biz and client1.cyberciti.biz<br />
names with your actual setup. Enough talk, let's set up public key <br />
authentication.<br />
<br />
Open the Terminal and type following commands if .ssh directory does not exists:<br />
<br />
<code>mkdir -p $HOME/.ssh<br />
chmod 0700 $HOME/.ssh
</code>
<h3>#1: Create the key pair</h3>
On the computer (such as client1.cyberciti.biz), generate a key pair for the protocol.<br />
<br />
<code>ssh-keygen -t rsa</code><br />
<br />
Sample outputs:<br />
<br /><code>
Generating public/private rsa key pair.<br />
Enter file in which to save the key (/Users/vivek/.ssh/id_rsa): <br />
Enter passphrase (empty for no passphrase): <br />
Enter same passphrase again: <br />
Your identification has been saved in /Users/vivek/.ssh/id_rsa.<br />
Your public key has been saved in /Users/vivek/.ssh/id_rsa.pub.<br />
The key fingerprint is:<br />
80:5f:25:7c:f4:90:aa:e1:f4:a0:01:43:4e:e8:bc:f5 vivek@desktop01<br />
The key's randomart image is:<br />
+--[ RSA 2048]----+<br />
| oo ...+. |<br />
|.oo . .ooo |<br />
|o .o. . .o . |<br />
| o ...+o. |<br />
| o .=.=S |<br />
| . .Eo . |<br />
| |<br />
| |<br />
| |<br />
+-----------------+<br />
</code><br />
You need to set the Key Pair location and name. I recommend you <br />
use the default location if you do not yet have another key there, for <br />
example: <code>$HOME/.ssh/id_rsa</code>. You will be prompted to supply<br />
a passphrase (password) for your private key. I suggest that you <br />
setup a passphrase when prompted. You should see two new files <br />
in $HOME/.ssh/ directory:<br />
<ul>
<li><b>$HOME/.ssh/id_rsa –</b> contains your private key.</li>
<li><b>$HOME/.ssh/id_rsa.pub –</b> contain your public key.</li>
</ul>
<b>Optional syntax for advance users</b><br />
<br />
The following syntax specifies the 4096 of bits in the RSA key to <br />
creation (default 2048):<br />
<code>
$ ssh-keygen -t rsa -b 4096 -f ~/.ssh/vps-cloud.web-server.key -C "My web-server key"<br />
</code><br />
Where,
<ul>
<li> -t rsa : <br />
Specifies the type of key to create. <br />
The possible values are 'rsa1' for protocol version 1 and <br />
'dsa', 'ecdsa', 'ed25519', or 'rsa' for protocol version 2.</li>
<li> -b 4096 : <br />
Specifies the number of bits in the key to create</li>
<li> -f ~/.ssh/vps-cloud.web-server.key : <br />
Specifies the filename of the key file.</li>
<li> -C "My web-server key" : <br />
Set a new comment.</li>
</ul>
<h3>#2: Install the public key in remote server</h3>
Use scp or ssh-copy-id command to copy your public key file <br />
(e.g., $HOME/.ssh/id_rsa.pub) to your account on the remote <br />
server/host (e.g., nixcraft@server1.cyberciti.biz). To do so, enter <br />
the following command on your client1.cyberciti.biz:<br />
<br /><code>
ssh-copy-id -i $HOME/.ssh/id_rsa.pub user@server1.cyberciti.biz<br />
</code><br />
OR just copy the public key in remote server as authorized_keys in ~/.ssh/ directory:<br />
<br /><code>
scp $HOME/.ssh/id_rsa.pub user@server1.cyberciti.biz:~/.ssh/authorized_keys<br />
<br /></code>
<b>A note about appending the public key in remote server</b><br />
<br />
On some system ssh-copy-id command may not be installed, so <br />
use the following commands (when prompted provide the password<br />
for remote user account called vivek) to install and append the public key:<br />
<br /><code>
## First create .ssh directory on server ##<br />
ssh vivek@server1.cyberciti.biz "umask 077; test -d .ssh || mkdir .ssh"<br />
<br />
## cat local id.rsa.pub file and pipe over ssh to append the public key in remote server ##<br />
cat $HOME/.ssh/id_rsa.pub | ssh vivek@server1.cyberciti.biz "cat >> .ssh/authorized_keys"<br />
</code>
<h3>#3: Test it (type command on client1.cyberciti.biz)</h3>
The syntax is:
ssh user@server1.cyberciti.biz
Or copy a text file called foo.txt:
scp foo.txt user@server1.cyberciti.biz:/tmp/
You will be prompted for a passphrase. To get rid of passphrase whenever you log in the remote host, try ssh-agent and ssh-add commands.
<b>What are ssh-agent and ssh-add, and how do I use them?</b>
To get rid of a passphrase for the current session, add a passphrase to ssh-agent and you will not be prompted for it when using ssh or scp/sftp/rsync to connect to hosts with your public key. The syntax is as follows:
eval $(ssh-agent)
Type the ssh-add command to prompt the user for a private key passphrase and adds it to the list maintained by ssh-agent command:
ssh-add
Enter your private key passphrase. Now try again to log into user@server1.cyberciti.biz and you will not be prompted for a password:
ssh user@server1.cyberciti.biz
<h3>#4: Disable the password based login on a server</h3>
Login to your server, type:
## client commands ##
eval $(ssh-agent)
ssh-add
ssh user@server1.cyberciti.biz
Edit /etc/ssh/sshd_config on server1.cyberciti.biz using a text editor such as nano or vim:
<h3>Warning: </h3>
Make sure you add yourself to sudoers files. Otherwise you will not able to
login as root later on. See „How To Add, Delete, and Grant Sudo Privileges to Users on a FreeBSD Server“ for
more info.
$ sudo vim /etc/ssh/sshd_config
OR directly jump to PermitRootLogin line using a vim text editor:
$ sudo vim +/PermitRootLogin /etc/ssh/sshd_config
Find PermitRootLogin and set it as follows:
PermitRootLogin no
Save and close the file. Reload/restart sshd server, type command as per your Linux/Unix version:
## CentOS/RHEL/Fedora (older version) Linux server reload sshd ##
sudo service sshd reload
## CentOS/RHEL/Fedora (latest version i.e. systemd based) Linux server reload sshd ##
sudo systemctl reload sshd
## Debian/Ubuntu Linux (older version) server reload sshd ##
sudo /etc/init.d/ssh reload
## Debian/Ubuntu Linux (systemd based latest) server reload sshd ##
sudo systemctl reload ssh
## Generic Unix method to reload sshd ##
sudo kill -HUP `cat /var/run/sshd.pid`
OR
sudo kill -HUP $(cat /var/run/sshd.pid)
<h3>#5: How to add or replace a passphrase for an existing private key?</h3>
To to change your passphrase type the following command:
ssh-keygen -p
<h3>#6: How to backup an existing private/public key?</h3>
Just copy files to your backup server or external USB pen/hard drive:
## Copy files to home based nas server ##
rsync -avr $HOME/.ssh user@home.nas-server:/path/to/encrpted/nas/partition/
## Copy files to usb pen drive mounted at /mnt/usb ##
cp -avr $HOME/.ssh/ /mnt/usb/backups/
<h3>How do I protect my ssh keys</h3>
<ul>
<li>Always use a strong passphrase.</li>
<li>Do not share your private keys anywhere online or store in insecure cloud storage.</li>
<li>Restrict privileges of the account.</li>
</ul>
<h3>How do I create and setup an OpenSSH config file to create shortcuts for servers I frequently access?</h3>
See how to create and use an OpenSSH ssh_config file for more info.
See also
keychain: Set Up Secure Passwordless SSH Access For Backup Scripts
Ubuntu / Debian Linux Server Install Keychain SSH Key Manager For OpenSSH
Man pages – ssh(1), ssh-agent(1), ssh-add(1), ssh-keygen(1)
And, there you have it, ssh set up with public key based authentication for Linux or Unix-like systems.
<br />
<h3>Links:</h3>
<ul>
<li><a href="https://www.cyberciti.biz/faq/how-to-set-up-ssh-keys-on-linux-unix/" target="_blank" rel="noreferrer noopener">Cyberciti :: How to setup ssh‐keys on Linux</a></li>
<li><a href="https://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id/" target="_blank" rel="noreferrer noopener">The Geek Stuff :: 3 steps to perform ssh‐login without password using ssh‐keygen & ssh‐copy‐id</a></li>
</ul>
</html>
<html>
<ul>
<li>You can override what tool is used to ask for the <br />
passwords/passphrases via the environment variable<br />
<code>$SSH_ASKPASS</code>.
<pre><code>$ echo $SSH_ASKPASS
/usr/libexec/openssh/gnome-ssh-askpass
</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://unix.stackexchange.com/questions/141233/sshd-password-feedback-show-asterisks-for-characters"
target="_blank" rel="noreferrer noopener">
Stackexchange :: SSHd password feedback show asterisks for characters</a>
</li>
<li><a href="https://www.redhat.com/sysadmin/ssh-automation-sshpass"
target="_blank" rel="noreferrer noopener">
RedHat :: SSH password automation in Linux with sshpass</a>
</li>
</ul>
</html>
<html>
I want to disable ssh clients from accessing using the password <br />
and only allow ssh login using SSH keys. How do I disable pass-<br />
word authentication for SSH on Linux operating systems?<br />
<br />
First, you need to setup a normal user account. Next, configure SSH <br />
keys for login. Once you have SSH Keys configured, you need to <br />
disable password login for all users include root. In this guide, shows <br />
you how to generate an ssh key and disable password authentication <br />
on the Linux or Unix-based system.
<h2>How to Disable Password Authentication for SSH</h2>
<br />
For demo purpose I am using a Ubuntu Linux here.<br />
<h3>Step 1 – Login to the remote server</h3>
Use the ssh command or client such as Putty:<br />
<code><pre>
$ ssh root@server-ip-here
$ ssh root@server1.cyberciti.biz
</pre></code>
<h3>Step 2 – Create a new user account</h3>
Type the following command on Linux based system to create a new user named vivek:
<code><pre>
# useradd -m -s /bin/bash vivek
</pre></code>
Set the user's password:
<code><pre>
# passwd vivek
</pre></code>
Sample outputs:
<code><pre>
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
</pre></code>
Add user to sudo (Ubuntu/Debian) or wheel (RHEL/CentOS) supplementary/secondary group:
<code><pre>
# usermod -aG sudo vivek
</pre></code>
OR for RHEL/CentOS Linux:
<code><pre>
# usermod -aG wheel vivek
</pre></code>
The above command allows people in group wheel or sudo to run all commands. Verify it:
<code><pre>
# su - vivek
$ id vivek
</pre></code>
Sample outputs:
<code><pre>
uid=1000(vivek) gid=1000(vivek) groups=1000(vivek),27(sudo)
</pre></code>
Exit a login shell:
<code><pre>
$ logout
</pre></code>
<h3>Step 3 – Install ssh keys on a remote machine</h3>
All command must be executed on local system/desktop/macos/freebsd workstation. Create the key pair:
<code><pre>
$ ssh-keygen -t rsa
</pre></code>
Install the public key in remote server:
<code><pre>
$ ssh-copy-id -i $HOME/.ssh/id_rsa.pub vivek@server1.cyberciti.biz
</pre></code>
Sample outputs:
<code><pre>
/usr/local/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/Users/vivek/.ssh/id_rsa.pub"
/usr/local/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/local/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
vivek@ln.cbzc01's password:
Number of key(s) added: 1
</pre></code>
Now try logging into the machine, with: "ssh 'vivek@server1.cyberciti.biz'"
and check to make sure that only the key(s) you wanted were added.
Test ssh keybase login:
<code><pre>
$ ssh vivek@server1.cyberciti.biz
</pre></code>
Sample outputs:
<code><pre>
Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 4.8.6-x86_64-linode78 x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
To run a command as administrator (user "root"), use "sudo ".
See "man sudo_root" for details.
vivek@ubuntu:~$
</pre></code>
To run a command as administrator (user „root“), use „ sudo {command}“. For example:
<code><pre>
$ sudo ls /root/
</pre></code>
To gain root shell, enter:
<code><pre>
$ sudo -s
</pre></code>
See How To Setup SSH Keys on a Linux / Unix System for more information.
<h3>Step 4 – Disable root login and password based login</h3>
Edit the /etc/ssh/sshd_config file, enter:
<code><pre>
$ sudo vi /etc/ssh/sshd_config
Find ChallengeResponseAuthentication and set to no:
ChallengeResponseAuthentication no
Find PasswordAuthentication set to no
PasswordAuthentication no
Find UsePAM and set to no:
UsePAM no
Find PermitRootLogin and set to no:
PermitRootLogin no
</pre></code>
Save and close the file. Reload the ssh server:
<code><pre>
# /etc/init.d/ssh reload
</pre></code>
OR
<code><pre>
$ sudo systemctl reload ssh
</pre></code>
OR Use the following on RHEL/CentOS Linux
<code><pre>
# /etc/init.d/sshd reload
</pre></code>
<h3>Step 5 – Verification</h3>
Try to login as root:
<code><pre>
$ ssh root@server1.cyberciti.biz
Permission denied (publickey).
</pre></code>
Try to login with password only:
<code><pre>
$ ssh vivek@server1.cyberciti.biz -o PubkeyAuthentication=no
Permission denied (publickey).
</pre></code>
And there you have it, password authentication for SSH disabled <br />
including root user. Your server will now only accept key based login<br />
and the root user can not login with password.<br />
<h3>Link:</h3>
<ul>
<li><a href="https://www.cyberciti.biz/faq/how-to-disable-ssh-password-login-on-linux/"
target="_blank" rel="noreferrer noopener">
Cyberciti :: FAQ - How to disable ssh password login on Linux</a>
</li>
</ul>
<br /><br /><br /><br />
</html>
<html>
<ul>
<li>bei der Rückfrage von ssh-copy-id nach <br />
dem Password → Permission denied;<br />
<br />
</li>
<li>Auf dem Zielrechner im File
<pre><code>/etc/ssh/sshd_config</code></pre>
überprüfen, ob der Eintrag
<pre><code>PubkeyAuthentication yes</code></pre>
auf "yes" gesetzt ist und ob der Ein–<br />
trag aktiviert ist (sprich: er ist NICHT<br />
auskommentiert);<br />
<br />
</li>
<li>nach Anpassungen den ssh-Daemon<br />
restarten:
<pre><code>sudo systemctl restart sshd</code></pre>
</li>
</ul>
</html>
<html>ssh-keygen -R server.server.test
<ul>
<li><pre><code>ssh-keygen -R <em>REGARDING-SERVER</em></code></pre>
</li>
<li>Beispiel:
<pre><code>[vagrant@centos .ssh]$ ssh-keygen -R ubuntu
# Host ubuntu found: line 3
/home/vagrant/.ssh/known_hosts updated.
Original contents retained as /home/vagrant/.ssh/known_hosts.old</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.mediamill.de/blog/2014/05/07/ssh-host-key-aus-der-datei-known_hosts-entfernen/"
target="_blank" rel="noreferrer noopener">
Media Mill - Blog :: SSH Host Key aus der Datei known_hosts entfernen</a>
</li>
</ul>
</html>
<html>
<ul>
<li>Befehl:
<pre><code>ssh-keygen -t rsa -b 4096 -C <em>COMMENT</em></code></pre>
</li>
<li>Beispiel:
<pre><code>mueller@Debian-Laptop:~$ ssh-keygen -t rsa -b 4096 -C "LinuxHotel key"
Generating public/private rsa key pair.
Enter file in which to save the key (/home/mueller/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/mueller/.ssh/id_rsa.
Your public key has been saved in /home/mueller/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:Xo1GORjOBt/55QySwpbmuKrzfDX5lQrO0HDc86jz5/c LinuxHotel key
The key's randomart image is:
+---[RSA 4096]----+
| . . |
| * = + |
| .%.O . . |
| .*ooo* = |
| .+S.++o.o |
| .o*o. + |
| .=.= o |
| .. .. = o . . |
| .++. o.o.. .E|
+----[SHA256]-----+
mueller@Debian-Laptop:~$ </code></pre>
</liI>
</ul>
</html>
<html>
<ol>
<li><a href="http://www.schlittermann.de/doc/ssh.html" target=_blank> Schlittermann :: SSH ohne Passwort -- Kurze Anleitung zur Nutzung</a></li>
<li><a href="https://www.ssh.com/ssh/config/" target=_blank>SSH.com :: File ssh_config (Client-File)</a></li>
<li><a href="https://www.ssh.com/ssh/sshd_config/" target=_blank>SSH.com :: File sshd_config (Server-File)</a></li>
<li></li>
<li></li>
<li></li>
</ol>
</html>
<html>
<h3>Achtung</h3>
Bei neueren SSH (was ist neu? Neuer als 3.4) muß in der <br />
Konfiguration extra erlaubt werden, daß Environment-Variablen<br />
gesetzt werden dürfen. Sonst werden die betroffenen Zeilen der <br />
<code>authorized_keys</code> einfach ignoriert. <br />
<br />
Die entsprechende Option heißt <b>PermitUserEnvironment</b>.
<h3>Link:</h3>
<a href="http://www.schlittermann.de/doc/ssh.html" target=_blank> Schlittermann :: SSH ohne Passwort -- Kurze Anleitung zur Nutzung</a>
</html>
<html>
<table border="1">
<tr><th>Schlüssel</th><th>Eintrag / Hinweis</th></tr>
<tr><td><code><b>PermitRootLogin no</b></code></td><td>Root-Zugang unterbinden</td></tr>
<tr><td><code><b>AllowGroups <i>Gruppe</i></b></code></td><td>nur User in <i>Gruppe</i> dürfen sich anmelden</td></tr>
<tr><td><code><b>AllowUsers <i>User</i></b></code></td><td>nur User <i>User</i> darf sich anmeldend</td></tr>
<tr><td><code><b>PasswordAuthentication no</b></code></td><td>Unterbindet das Anmelden via Passwort</td></tr>
<tr><td><code><b>ChallengeResponseAuthentication no</b></code></td><td>Nur über die Schlüssel anmelden</td></tr>
<tr><td><code><b>PermitEmptyPasswords no</b></code></td><td>keine leeren Kennwörter erlauben</td></tr>
<tr><td><code><b>Port <i>Nummer</i></b></code></td><td>abweichenden Port festlegen (Default: 22)</td></tr>
<tr><td><code><b>ListenAddress <i>IP</i></b></code></td><td>Netzwerkschnittstelle benutzen, <br /> je IP-Adresse eine Zeile</td></tr>
<tr><td><code><b>MaxSessions</b></code></td><td>Legt die Anzahl der maximal zulässigen Sessions (pro User?) fest;<br /> auf kritischen Sytemen so niedrig wie möglich ( 1 )</td></tr>
<tr><td><code><b>MaxStartups</b></code></td><td>Legt die Anzahl der maximal zulässigen Sessions (pro User?) fest;<br /> auf kritischen Sytemen so niedrig wie möglich ( 1 )</td></tr>
<tr><td> </td><td></td></tr>
<tr><td> </td><td></td></tr>
</table>
</html>
<html>
<ul>
<li>The randomart is meant to be an easier way for humans to validate keys.
Validation is normally done by a comparison of meaningless strings (i.e. the hexadecimal representation of the key fingerprint), which humans are pretty slow and inaccurate at comparing. Randomart replaces this with structured images that are faster and easier to compare.
This paper <a href="http://www.ece.cmu.edu/~adrian/projects/validation/validation.pdf"
target="_blank" rel="noreferrer noopener">
"Hash Visualization: a New Technique to improve Real-World Security", Perrig A. and Song D., 1999, International Workshop on Cryptographic Techniques and E-Commerce (CrypTEC '99)"</a> explains some techniques and advantages.
</li>
<li>Essentially, the random art generated by the user's keys can also be used in the same sort of way. If the image generated initially is different from the current image of the key, for example if you had moved a key, then the key had likely been tampered with, corrupted, or replaced.
</li>
</ul>
<h3>Links:</h3>
<li><a href="https://superuser.com/questions/22535/what-is-randomart-produced-by-ssh-keygen"
target="_blank" rel="noreferrer noopener">
StackExchange :: SuperUser — What is randomart produced by ssh-keygen?</a>
</li>
<li><a href="https://unix.stackexchange.com/questions/144702/whats-the-purpose-of-the-randomart-image-for-user-not-host-ssh-keys"
target="_blank" rel="noreferrer noopener">
StackExchange :: Unix & Linux — What's the purpose of the randomart image for user (not host) SSH keys?</a>
</li>
<li><a href="file:///media/mueller/INT-256GB/SystemAdministration/Security/Perrig-Song_HashVisualization-ANewTechniqueToImproveRealWorldSecurity_validation.pdf"
target="_blank" rel="noreferrer noopener">
A. Perrig / D. Song :: "Hash Visualization: a New Technique to improve Real-World Security" (<em>pdf, downloaded</em>)</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</html>
<html>
<b>(a) Clientseitig</b><br />
<br /><code>
$ echo "ServerAliveInterval 120" >> /etc/ssh/ssh_config<br />
</code><br />
Wenn der Server 120 Sekunden kein Paket gesendet hat, <br />
sendet der Client ein Dummy-Paket zum Server.<br />
<br />
Alternativ kann man den Wert in die eigene ssh_config<br />
(<code>~/.ssh/config</code>) eintragen.<br />
<br />
<b>(b) Serverseitig</b><br />
<br /><code>
$ echo "ClientAliveInterval 120" >> /etc/ssh/sshd_config<br />
<br />
$ /etc/init.d/sshd reload<br />
</code><br />
Wenn der Client 120 Sekunden kein Paket gesendet hat, <br />
sendet der Server ein Dummy-Paket zum Client.<br />
<br />
<b>Weiterer Parameter:</b><br />
<code>ServerAliveCountMax 2</code><br />
Das Senden des "Alive-Paket" wird max. 2 durchgeführt. <br />
Scheitern diese zwei Versuche, so wird die Verbindung geschlossen.<br />
<br/>
<h3>Link:</h3>
<a href="http://www.fseitz.de/blog/index.php?/archives/21-SSH-Timeout-unterbinden.html" target=_blank>F. Seitz :: SSH-Timeout unterbinden</a><br />
<a href="https://technik.blogbasis.net/ssh-verbindung-leben-lassen-18-03-2014" target=_blank>Technik - Blogbasis.net :: SSH-Verbindung leben lassen</a><br />
</html>
<html>
<ul>
<li>To confirm the private and public keys are a match, <br />
you can run the following command to examine the<br />
private key and see what the contents of the cor–<br />
responding public key should be:
<pre><code>ssh-keygen -y -e -f <em>PRIVATE-KEY-FILE</em></code></pre>
</li>
<li>Then output the contents of the public key file<br />
(*.pub) to make sure it’s a match:
<pre><code>cat <em>PUBLIC-KEY-FILE</em>.pub</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://codewithsusan.com/notes/ssh-permission-denied"
target="_blank" rel="noreferrer noopener">
code w/ Susan :: Fix for SSH Permission Denied (Public Key) </a>
</li>
</ul>
</html>
<html>
<ul>
<li>Search known_hosts file for a (remote) server:
<pre><code>$ ssh-keygen -F <em>server3.example.com</em> [-lv] [ -f <em>NonDefault-known_hosts-File</em> ]</code></pre>
</li>
<li>Beispiele:
<ol>
<li><pre><code>mueller@HPLaptop:~/.ssh$ ssh-keygen -F 192.168.56.102
# Host 192.168.56.102 found: line 12
|1|/EJqmFe0Den4Q+tTbOk/ttRj3bE=|z2ZzyF/jfSjPNHoCvKiP8xJGmP4= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJr9ehLLumwRrLE2arJPA1+me9z8ekJ84zDQYxILWcGmmer0pkCcK2jMYqVaa1s3OHGvr4DVcq1g5Tr70pvJr/Y=</code></pre>
</li>
<li><pre><code>mueller@HPLaptop:~/.ssh$ ssh-keygen -F 192.168.56.102 -l
# Host 192.168.56.102 found: line 12
192.168.56.102 ECDSA SHA256:8C0RiTibozT1mnv9Jj6VQL2zUaEGDj4FR/OU7r94sEs</code></pre>
</li>
<li><pre><code>mueller@HPLaptop:~/.ssh$ ssh-keygen -F 192.168.56.102 -lv
# Host 192.168.56.102 found: line 12
192.168.56.102 ECDSA SHA256:8C0RiTibozT1mnv9Jj6VQL2zUaEGDj4FR/OU7r94sEs
+---[ECDSA 256]---+
| .o+Bo.... |
| +..=o*o.. |
| . =+.o.+o |
| o + .+.+= |
| . o + So.= |
| . o .* |
| . . .E+ |
| . . +.o.o |
| . ..=+o.. |
+----[SHA256]-----+</code></pre>
</li>
</ol>
</li>
<li>If a key must be removed from the file:
<pre><code>$ ssh-keygen -R <em>server3.example.com</em> [ -f <em>NonDefault-known_hosts-File</em> ]</code></pre>
When a key is removed, it will then be <br />
appended to the file <code>~/.ssh/known_hosts.old</code><br />
in case it is needed later.<br />
<br />
Beispiel:
<pre><code>mueller@HPLaptop:~/.ssh$ ssh-keygen -R 192.168.56.102
# Host 192.168.56.102 found: line 12
/home/mueller/.ssh/known_hosts updated.
Original contents retained as /home/mueller/.ssh/known_hosts.old</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.howtouselinux.com/post/ssh-known_hosts-file"
target="_blank" rel="noreferrer noopener">
HowToUseLinux :: Understanding SSH known_hosts File with Examples</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<table border="1">
<tr><th>Schlüssel</th><th>Eintrag / Hinweis</th></tr>
<tr><td><code><b>UseDNS yes</b></code></td><td>Specifies whether sshd should look up the remote host name<br /> and check that the resolved host name for the remote IP <br />
address maps back to the very same IP address.<br /><br /> The default is 'yes'</td></tr>
<tr><td><code><b>GSSAPIAuthentication no</b></code></td><td>Specifies whether user authentication based on GSSAPI is <br />allowed.<br /><br /> The default is 'no'</td></tr>
</table>
</html>
<html>
<ul>
<li><pre><code>$ sudo sshd -t</code></pre>
<ul>
<li><b>Test mode</b>
</li>
<li>Only check the validity of the configuration <br />
file and sanity of the keys.
</li>
<li>This is useful for updating sshd reliably as<br />
configuration options may change.
</li>
</ul>
</li>
<li><pre><code>$ sudo sshd -T</code></pre>
<ul>
<li><b>Extended test mode</b>
</li>
<li>Check the validity of the configuration file, <br />
output the effective configuration to stdout<br />
and then exit.
</li>
<li>Optionally, Match rules may be applied by<br />
specifying the connection parameters u-<br />
sing one or more <a href="https://man.openbsd.org/sshd"
target="_blank" rel="noreferrer noopener">-C options</a>.
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://superuser.com/questions/1122125/cannot-restart-ssh-daemon-after-changing-sshd-config-to-port-2222"
target="_blank" rel="noreferrer noopener">
SuperUser :: Cannot restart SSH daemon after changing sshd_config to port 2222
</li>
</ul>
</html>
<html>
<ul>
<li>OpenSource-Programm</li>
<br />
<li>ist ein Computer-Algebra-System (CAS)</li>
<br />
<li>Skriptsprache: Python</li>
<br />
<li>ähnlich Mathematic, Maple</li>
<br />
<li>erwähnt im Buch zu den <a href="https://www.cryptool.org/images/ctp/documents/CT-Book-de.pdf" target=_blank>CrypTools</a></li>
</ul>
</html>
<html>
<ul>
<li><h3>Um (Musik‐)Tracks verlangsamt abzuspielen:</h3>
<ul>
<li>App “Musicolet“ aufrufen</li>
<li>→ das Icon <br />
<img src="./pictures/Musicolet_PlaySpeed.png" height=33 width=46 /><br />
anklicken</li> <!-- height=33 width=46 -->
<li>→ neues Fenster erscheint</li>
<li>→ “Play speed“ anpassen</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>Geräte–Infos</h3>
<ul>
<li><b>Geräte–/Produktname:</b> Samsung Galaxy Tab A9+ 5G
</li>
<li><b>Modellname:</b> SM-X216B
</li>
<li><b>Seriennummer:</b> R9TX109SSMN
</li>
<li><b>IMEI:</b> 35286257401190
</li>
<li><b>IMEI SV:</b> 01
</li>
<li><b>Speicher:</b>
<ul>
<li>Platte: 64GB
</li>
<li>RAM: 4GB
</li>
</ul>
</li>
</ul>
</li>
<li><h3>PIN ändern</h3>
<ul>
<li>Auf dem Android‐Tablet die “Einstellungen“‐App öffnen;
</li>
<li>In die Kategorie “Standort und Sicherheit“ wechseln;
</li>
<li>Hier die “SIM-PIN Optionen“ oder den Punkt “SIM-Karten‐<br />
sperre einrichten“ auswählen;
</li>
<li>Auf “SIM–PIN ändern“, dann wird nach der alten PIN ge‐<br />
fragt;
</li>
<li>Anschließend kann man einen neuen Code festlegen.
</li>
</ul>
</li>
<li><h3>App "S Note" ::</h3>
Speicherort der Daten: <i>Interner Speicher / SnoteData</i></li>
<br />
<li><h3>Logitech Universal Folio (Tastatur)</h3>
Supoort-Seite: <a href="www.logitech.com/support/universalfolio" target=_blank>Logitech :: Support</a><br />
⇒ PDF heruntergeladen<br />
<table>
<tr><th>LED</th><th>Beschreibung</th></tr>
<tr><td>Grün</tdtd><td>Die Batterien sind ausreichend geladen.</td></tr>
<tr><td>Rot</td><td>Der Akkustand ist niedrig (weniger als 10%). Tauschen Sie
die Batterien aus.</td></tr>
<tr><td>Blinkt blau</td><td>
<b>Schnell: </b>Die Tastatur ist im Erkennungsmodus und wartet
auf das Pairing.<br />
<b>Langsam:</b> Die Tastatur versucht, erneut eine Verbindung
mit Ihrem Tablet herzustellen.</td></tr>
<tr><td>Blau </td><td>Das Bluetooth-Pairing bzw. die Wiederverbindung
war erfolgreich.</td></tr>
</table>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://praxistipps.chip.de/pin-auf-dem-tablet-aendern-so-gehts_38510"
target="_blank" rel="noreferrer noopener">
CHIPS :: PIN auf dem Tablet ändern – so geht's</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
--->
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://icem.folkwang-uni.de/~finnendahl/cm_kurse/doc/schintro/schintro_toc.html" target=_blank>Universität Folkwang :: Einführung in Scheme</a></li>
<li><a href="https://de.wikipedia.org/wiki/Scheme" target=_blank>Wikipedia :: Scheme</a></li>
<li><a href="https://htdp.org/" target=_blank>How to design programs (Online-Buch)</a></li>
</ul>
</html>
<html>
<br />
Links:<br />
<a href="http://www.scons.org/doc/production/HTML/scons-user/index.html">http://www.scons.org/doc/production/HTML/scons-user/index.html</a><br />
<a href="http://www.scons.org/doc/production/HTML/scons-man.html">http://www.scons.org/doc/production/HTML/scons-man.html</a><br />
</html>
<html>
Want to search all files for in the local directory for<br />
a string and then edit them in vi?<br />
<br />
This will do it.<br />
<br />
<code>vi `grep -il "target" *.sql 2>/dev/null`</code><br />
<br />
Search all files in a directory structure for<br />
a regular expression and edit with vi.<br />
<br />
<code>vi `find . -type f -name "*.sql" -print | (xargs grep -il "[a-z][a-z]*get" 2>/dev/null)`</code><br />
<br />
It's a good idea to redirect stderr in case you come<br />
across files for which you don't have read permissions.<br />
The errors messages would be passed as arguments to<br />
vi.<br />
<br />
This tip generously supported <br />
by: jkstill@bcbso.com<br />
</html>
<html>
<ul>
<li>default credentials in Virtualbox:
<pre><code>kali / kali</code></pre>
</li>
<li>default credentials in Vagrant box/image:
<pre><code>vagrant / vagrant</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.geeksforgeeks.org/how-to-install-kali-linux-in-virtualbox/"
target="_blank" rel="noreferrer noopener">
GeeksForGeeks :: How to Install Kali Linux in VirtualBox?</a>
</li>
<li><a href="https://miloserdov.org/?p=4747"
target="_blank" rel="noreferrer noopener">
Ethical hacking and penetration testing :: Default passwords in Kali Linux - Vagrant Image Password </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li><b>SOC</b> :=: Security Operations Center (IT–Sicherheitszentrum)
</li>
<li><b>POC</b> :=: Proof-of-concept
</li>
<li><b>RAT</b> :=: Remote Access Trojaner
</li>
<li><b><a href="https://de.wikipedia.org/wiki/Payment_Card_Industry_Data_Security_Standard"
target="_blank" rel="noreferrer noopener">
PCI-DSS</a></b> :=: Payment Card Industry Data Security Standard<br />
<meta PCI />
</li>
<li><b>RFM</b> :=: Reduced Functionality Mode
</li>
<li><b>NIS2</b> :=: die Richtlinie (EU) 2016/1148 zur <u>Netzwerk- und Informationssicherheit</u> (NIS-Richtlinie)<br />
<em>Network and Information Systems Directive 2</em><br />
<a href="https://de.wikipedia.org/wiki/NIS-2-Richtlinie"
target="_blank" rel="noreferrer noopener">
Wikipedia :: NIS2–Richtlinie</a>
</li>
<li><b>ECSF</b> :=: European Cybersecurity Skills Framework
</li>
<li><b>DORA</b> :=: Digital Operational Resilience Act<br />
<a href="https://www.sans.org/blog/beyond-compliance-achieving-cyber-resilience-in-the-financial-sector-with-dora-and-tiber-eu/"
target="_blank" rel="noreferrer noopener">
SANS Institute :: Blog – Beyond Compliance: Achieving Cyber Resilience in the Financial Sector with DORA and TIBER-EU</a>
</li>
<li><b>TIBER-EU</b> :=: "Threat Intelligence-Based Ethical Red Teaming" framework<br />
<a href="https://www.sans.org/blog/beyond-compliance-achieving-cyber-resilience-in-the-financial-sector-with-dora-and-tiber-eu/"
target="_blank" rel="noreferrer noopener">
SANS Institute :: Blog – Beyond Compliance: Achieving Cyber Resilience in the Financial Sector with DORA and TIBER-EU</a>
</a>
</li>
<li><b>IoC</b> :=: …
<ul>
<li>Infrastructure as Code
</li>
<li>Indicator of Compromise
</li>
</ul>
</li>
<li><b>FCC</b> :=: U.S. Federal Communications Commission
</li>
<li><b>KEV</b> :=: Known Exploited Vulnerabilities
</li>
<li><b>CISA</b> :=: US Cybersecurity and Infrastructure Security Agency
</li>
<li><b>FUD</b> :=: Fear, Uncertainty, and Doubt
</li>
<li><b>CTI</b> :=: Cyber Threat Intelligence
</li>
<li><b>DHS</b> :=: Department of Homeland Security
</li>
<li><b>SSRF</b> :=: Server-Side Request Forgery
</li>
<li><b>DFIR</b> :=: Digital Forensics, Incident Response
</li>
<li><b>CLOUD Act</b> :=: Clarifying Lawful Overseas Use of Data Act</b>
</li>
<li><b>OT</b> :=: Operational Technology
</li>
<li><b>ICS</b> :=: Industrial Control Systems
</li>
<li><b>BAS</b> :=: Breach and Attack Simulation
</li>
<li><b>RCE</b> :=: Remote Code Execution
</li>
<li><b>MS-ISAC</b> :=: Multi-State Information Sharing and Analysis Center
</li>
<li><b>PAM</b> :=: Privileged Access Management
</li>
<li><b>NHI</b> :=: Non-Human Identity
</li>
<li><b>DCV</b> :=: domain control validation
</li>
<!--
<li><b></b>
</li>
<li><b></b>
</li>
<li><b></b>
</li>
<li><b></b>
</li>
<li><b></b>
</li>
<li><b></b>
</li>
<li><b></b>
</li>
<li><b></b>
</li>
-->
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li>
<a href="https://geballte-sicherheit.de/threat-modelling-bedrohungsanalyse-1-teil-einleitung/"
target="_blank" rel="noreferrer noopener">
Geballte Sicherheit :: Threat Modelling ‐ Bedrohungsanaylse</a>
</li>
<li>
<a href="https://www.cologne-intelligence.de/blog/was-ist-eigentlich-threat-modeling"
target="_blank" rel="noreferrer noopener">
Cologne Intelligence :: Was ist eigentlich “threat modeling“?</a>
</li>
<li>
<a href="https://www.security-insider.de/was-ist-bedrohungsanalyse-a-739801/"
target="_blank" rel="noreferrer noopener">
Security Insider :: Was ist Bedrohungsanalyse?</a>
</li>
</ul>
</html>
<html>
<meta bubblebabble />
<ul>
<li>it makes the fingerprint look like a string of <br />
“real“ words (making it easier to remember).
</li>
<li>SHA1 is also called <b><em>Bubble Babble</em></b> format.
</li>
<li>The Bubble Babble Binary Data Encoding:<br />
ftp://ftp.ietf.org/ietf-mail-archive/secsh/2001-08.mail <br />
<br />
The Bubble Babble Encoding encodes arbitrary binary data into<br />
pseudowords that are more natural to humans and that can be <br />
pronounced relatively easily. <br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.microfocus.com/documentation/amc-archive/rsit-server-8-2-1-1/rsit-windows-server-guide/data/rsitserver_identity_cs.htm
target="_blank" rel="noreferrer noopener">
Microfocus</a>
</li>
<li><a href="https://dzsi4jt244dno.cloudfront.net/manuals/server-zos-admin/52/ssh-keygen2.html
target="_blank" rel="noreferrer noopener">
sshtectia</a>
</li>
<li><a href="https://en.everybodywiki.com/Bubble_Babble"
target="_blank" rel="noreferrer noopener">
Everybody Wiki :: Bubble Babble</a>
</li>
<li><a href="https://www.easytechjunkie.com/what-is-bubble-babble.htm"
target="_blank" rel="noreferrer noopener">
Easy Tech Junkie :: What is Bubble Babble?</a>
</li>
<!--
<li>
</li>
<li>
</li>
-->
</ul>
</html>
<html>
<h3>Installation DVWA</h3>
<h3>Links:</h3>
<ul>
<li><a href="https://www.golinuxcloud.com/install-dvwa-kali-linux/"
target="_blank" rel="noreferrer noopener">
GoLinuxCloud :: Install DVWA on Kali Linux (Step-by-Step)
</li>
</ul>
</html>
<html>
<ul>
<li><h3>Creating an OpenSSL public and private key pair</h3>
<code><pre>openssl req -x509 -nodes -newkey rsa:4096 -keyout private-key.pem -out public-key.pem</pre></code>
There is not need to answer any of the above<br />
questions so simply hit ENTER to continue.<br />
<br />
Now you should have both private and public <br />
keys in your current working directory:
<code><pre>$ ls -l *.pem
-rw-rw-r--. 1 lrendek lrendek 1704 Jan 2 16:45 private-key.pem
-rw-rw-r--. 1 lrendek lrendek 1220 Jan 2 16:45 public-key.pem</pre></code>
Make sure to keep your <b>private key</b> in the<br />
save location otherwise you will not be able<br />
to decrypt your files and your files may be<br />
decrypted by someone else.
</li>
<li><h3>Encrypt large file using OpenSSL</h3>
<code><pre>openssl smime -encrypt -binary -aes-256-cbc -in <em>File.img</em> -out <em>File.img.dat</em> -outform DER public-key.pem</pre></code>
</li>
<li><h3>Decrypt large file using OpenSSL</h3>
<code><pre>openssl smime -decrypt -in <em>File.img.dat</em> -binary -inform DEM -inkey private-key.pem -out <em>Decrypted_File.img</em></pre></code>
</li>
<li>Mittels Erstellen eines z.B. md5-Hashwertes können das Ursprungs-<br />
und das entschlüsselte File verglichen werden:<br />
<code><pre>$ md5sum *File.img*
cd573cfaace07e7949bc0c46028904ff Decrypted_File.img
cd573cfaace07e7949bc0c46028904ff File.img
c4d8f1e868d1176d8aa5363b0bdf8e7c File.img.dat</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://linuxconfig.org/easy-way-to-encrypt-and-decrypt-large-files-using-openssl-and-linux"
target="_blank" rel="noreferrer noopener">
LinuxConfig.org :: An easy way to encrypt and decrypt large files using OpenSSL and Linux</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li><code><b>inurl:</b>notes <b>site:</b>renenyffenegger.ch %</code>
</li>
</ul>
</html>
<html>
<ul>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href=""
target="_blank" rel="noreferrer noopener">
Admin Magazin – Network & Security :: Phishing Tests – Phish Food, pg. 58ff</a>
</li>
</ul>
</html>
<html>
<ul>
<li><b>Malvertising</b><br />
Werbeanzeigen mit bösartigen Zielen;
</li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://www.geeksforgeeks.org/how-to-install-metasploitable-2-in-virtualbox/"
target="_blank" rel="noreferrer noopener">
GeeksForGeeks :: How to install Metasploitable 2 in VirtualBox</a>
</li>
</ul>
</html>
<html>
<ul>
<li>An einer öffentlichen Ladestation steige der Akku und sinke die Datensicherheit des Smartphones. Davor warnt inzwischen die US-Regulierungsbehörde FCC in einer Pressemitteilung, das FBI hat die Empfehlung weitergeleitet und rät zur Verwendung eines sogenannten USB-Kondoms gegen das "Juice Jacking" im öffentlichen Raum. Einen konkreten Anlass für die plötzliche Warnung wird jedoch nicht angeführt, auch ist das Problem bereits seit Jahren bekannt, konkrete Fälle scheint es aber nicht zu geben.
</li>
<li>Datenübertragung führt zu "Juice Jacking"
</li>
<li>Elektronische Geräte können heute fast überall aufgeladen werden. Die breite Verfügbarkeit von öffentlichen Ladestationen soll aber auch ein großes Sicherheitsrisiko bergen. Der Vorgang des "Juice Jacking" beschreibt genau dieses Problem. Während des Ladevorgangs per USB-C- oder Lightning-Anschluss können sämtliche Daten des Smartphones oder Tablets übertragen werden. So lautet die Warnung.
</li>
<li>Die FCC hatte erstmals im Jahr 2019 auf möglichen "Juice Jacking" hingewiesen und die Richtlinien dann im Jahr 2021 aktualisiert, um sicherzustellen, dass die Verbraucher über die aktuellsten Informationen verfügen. Der Sprecher der Behörde fügte nun hinzu, dass die FCC keinen Anstieg der Verbraucherbeschwerden über "Juice Jacking" festgestellt habe.
</li>
<li>Der amerikanische Journalist Brian Krebs, der den Begriff "juice jacking" auf seinem Security-Blog als erster verwendete, findet den erneuten Aufruf zur Sicherheit vor öffentlichen Ladestationen überzogen.
</li>
<li>Denn seit die ersten Sicherheitsforscher auf die Gefährdung von Smarpthones per USB-Ladekabel hinwiesen "haben Apple, Google und andere Hersteller von Mobilgeräten die Funktionsweise ihrer Hard- und Software so geändert, dass ihre Geräte nicht mehr automatisch Daten synchronisieren, wenn man sie mit einem USB-Ladekabel an einen Computer anschließt. Stattdessen wird der Benutzer gefragt, ob er einem angeschlossenen Computer vertrauen möchte, bevor eine Datenübertragung stattfinden kann", so der Reporter.
</li>
<li><h3>Was sind USB-Kondome?</h3>
<ul>
<li>USB-Kondome sollen als "Datenblocker" dienen und den unbefugten Datentransfer verhindern. In der folgenden Tabelle finden Sie daher eine Übersicht mit den besten USB-Datenblockern im Vergleich.
</li>
</ul>
</li>
<hr />
<li><h3>Zusammenfassung in drei Punkten</h3>
<ul>
<li>Ein USB-Datenblocker ermöglicht sicheres Laden von Geräten ohne Datenklau.
</li>
<li>USB-Datenblocker sind wichtig im Kontext der aktuellen Cybersecurity-Landschaft.
</li>
<li>Es gibt verschiedene USB-Datenblocker auf dem Markt, wie z.B. ROLINE USB Typ A Datenblockier-Adapter und PortaPow Daten-Block-Adapter SmartCharge.
</li>
</ul>
</li>
<li><h3>Warum Sie einen USB-Datenblocker benötigen und wie er Sie vor Juice Jacking schützt</h3>
<ul>
<li>USB-Datenblocker sind kleine Geräte, die zwischen Ihr USB-Gerät und den USB-Anschluss gesteckt werden, um den Datenaustausch zu verhindern und nur das Aufladen zu ermöglichen.
</li>
<li>Die Funktionsweise eines USB-Datenblockers besteht darin, die Datenpins im USB-Anschluss zu blockieren, während die Strompins weiterhin aktiv bleiben.
</li>
<li>USB-Datenblocker sind wichtig, um sich vor potenziellen Gefahren wie „Juice Jacking“ zu schützen, bei dem Hacker über einen öffentlichen USB-Anschluss Daten von Ihrem Gerät stehlen können.
</li>
<li>„Juice Jacking“ bezieht sich auf den Angriff auf ein Gerät über einen manipulierten USB-Anschluss, bei dem nicht nur Strom, sondern auch Daten übertragen werden.
</li>
<li>Ein USB-Datenblocker kann verhindern, dass Ihre Daten gestohlen werden, indem er den Datenaustausch blockiert, während Ihr Gerät weiterhin sicher aufgeladen wird.
</li>
<li>Zu den USB-Datenblocker-Produkten auf dem Markt gehören der ROLINE USB Typ A Datenblockier-Adapter Abdeckungsschutz für USB und der PortaPow Daten-Block-Adapter SmartCharge.
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.chip.de/news/Smartphone-unterwegs-laden-Braucht-man-ein-USB-Kondom_184811399.html"
target="_blank" rel="noreferrer noopener">
Chip.de :: Smartphone unterwegs laden: Braucht man ein USB-Kondom? </a>
</li>
<li><a href="https://usbstelle.de/usb-datenblocker/"
target="_blank" rel="noreferrer noopener">
USBStelle :: USB-Datenblocker: Ihre Lösung für sicheres Aufladen und Datenschutz </a>
</li>
</ul>
</html>
<html>
<code><pre>
sudo apt update
sudo apt full-upgrade -y
</pre></code>
<code><pre>
sudo apt install kali-tweaks
</pre></code>
<code><pre>
kali-tweaks <em># Aufruf</em>
</pre></code>
⇒ ein graphisches Menü erscheint<br />
⇒ Menüpunkt “Metapackages“ ausgewählt<br />
⇒ den Menüpunkt “kali-linux-default“ ausgewählt<br />
⇒ <code><pre>
Configuring macchanger
</pre></code>
⇒ <code><pre>
Kismet needs root privileges for some of its functions. However, running it as root ("sudo kismet") is not
recommended, since running all of the code with elevated privileges increases the risk of bugs doing system-wide
damage. Instead Kismet can be installed with the "setuid" bit set, which will allow it to grant these privileges
automatically to the processes that need them, excluding the user interface and packet decoding parts.
Enabling this feature allows users in the "kismet" group to run Kismet (and capture packets, change wireless
card state, etc), so only thoroughly trusted users should be granted membership of the group.
For more detailed information, see the Kismet 010-suid.md, which can be found at
"/usr/share/doc/kismet-doc/readme/010-suid.md" in kismet-doc package or
"https://www.kismetwireless.net/docs/readme/suid/".
Install Kismet "setuid root"?
</pre></code>
⇒ "yes"<br />
⇒ <code><pre>
Only users in the kismet group are able to use kismet under the setuid model.
Please specify the users to be added to the group, as a space-separated list.
Note that currently logged-in users who are added to a group will typically need to log out and log in again
before it is recognized.
Users to add to the kismet group:
</pre></code>
⇒ "mueller"
⇒ <code><pre>
The provided user list contains invalid usernames.
The users to be added to the kismet group have to be provided in a space-separated list of usernames. It seems
that the following usernames are not valid: mueller. Please revise the list.
</pre></code>
⇒ Probleme gehabt, Prozesse gekilled und neu gestartet
<h3>Links:</h3>
<ul>
<li><a href="https://www.kali.org/docs/general-use/metapackages/"
target="_blank" rel="noreferrer noopener">
Kali.org :: Docs - Metapackages installieren</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ol>
<li><h4>Basic security mechanism</h4>
<ul>
<li>Use Strong Passwords
</li>
<li>Verify All Accounts Have Passwords
</li>
<li>Set Up Password Aging
</li>
<li>Restrict the Use of Previous Passwords on Linux
</li>
<li>nsure Only Root Has User ID Set to 0
</li>
<li>Keep Linux Up to Date
</li>
<li>Configure Linux Firewall
</li>
<li>Disable Unwanted Linux Services
</li>
<li>Manage Linux File Permissions
</li>
<li>Use a VPN
</li>
<li>Enable Disk Quotas
</li>
<li>Manage “Noowner“ Files
</li>
<li>Install an Antivirus Program
</li>
<li>Use a Security-Focused Web Browser
</li>
</ul>
</li>
<li><h4>Intermediate security mechanism</h4>
<ul>
<li>Ensure OpenSSH Server Security
</li>
<li>Disable Root Login via SSH
</li>
<li>Limit the Use of sudo
</li>
<li>Lock User Accounts After Login Failures
</li>
<li>Enable Two-Factor Authentication
</li>
<li>Use Linux Security Extensions
</li>
<li>Reduce Network Service Vulnerabilities by Isolation
</li>
<li>Detect Listening Network Ports
</li>
<li>Use Centralized Authentication Service
</li>
<li>Set Up an Intrusion Detection System
</li>
<li>Use Access Control Lists (ACLs)
</li>
<li>Monitor Suspicious Server Logs
</li>
<li>Restrict World-Writable Files
</li>
<li>Configure Logging and Auditing Processes
</li>
<li>Disable Unwanted SUID and SGID Binaries
</li>
<li>Encrypt Data Communication
</li>
<li>Use Encryption Tools to Protect Sensitive Data
</li>
<li>Harden the Linux Kernel
</li>
<li>Separate Disk Partitions for Improved Linux Security
</li>
<li>Backup Linux System
</li>
<li>Ensure Linux Server Physical Security
</li>
</ul>
</li>
<li><h4>Advanced security mechanism</h4>
</li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://phoenixnap.com/kb/linux-security"
target="_blank" rel="noreferrer noopener">
PhoenixNAP :: Linux Security Stats, Tools, and Best Practices
</li>
</ul>
</html>
<html>
<ul>
<li> Es klingt nach einem Missgeschick – doch wenn du darauf eingehst, wirst du möglicherweise Geld verlieren: Ein neuer Paypal-Trick sorgt für reichlich Kopfzerbrechen, lässt sich aber ganz einfach umgehen. Denn im schlimmsten Fall verlierst du sonst gleich doppelt Geld.
</li>
<li>Die Nachricht über Paypal klang nett und Vertrauen erweckend: „Hey, ich habe versehentlich an dich Geld überwiesen, die Adresse war minimal anders als die Zieladresse.“ Dazu noch einige Erklärungen wie, dass diejenige Person jung oder arm ist und das Missgeschick in der Eile auf einem Flohmarkt passiert sei.
</li>
<li>Und in der Tat findet sich auf dem Paypal-Konto ein neuer Geldeingang in der genannten Höhe. „Überweise es mir bitte über ‚Freunde und Familie‘ schnell zurück, dann ist das Problem gelöst“, bittet der Absender des Geldbetrags. Doch wer das tut, läuft Gefahr, das Geld zu verlieren und im schlimmsten Fall doppelt Ärger zu bekommen. Denn dahinter steckt eine perfide Betrugsmasche, die in vielen Fällen aufgeht.
</li>
<li>Die Erklärung dazu ist einfach: Im Nachhinein wird der oder die Absender:in angeben, man habe für eine bestimmte Ware oder Dienstleistung bezahlt, diese aber nicht erhalten und sei selbst betrogen worden. Der Paypal-Käuferschutz entschädigt dann die vermeintlich betrogene Person – auf Kosten des ehrlichen Kunden. Dass es eine zweite Zahlung gibt, ist dem doch sehr pauschal und fallbezogen arbeitenden Kundenservice meist nicht zu vermitteln.
</li>
<li><h3>Paypal-Betrug: Der (vorschnell) Ehrliche ist der Dumme</h3>
Wer also so ehrlich ist und das falsch erhaltene Geld überweist, könnte auf einem dann doppelt so hohen Schaden sitzen bleiben, warnt die Verbraucherzentrale des Saarlandes gegenüber dem Saarländischen Rundfunk. „In meinem guten Willen schicke ich das zurück und mache schnell etwas, ohne nachzudenken. Das ist genau das, was die Betrüger wollen“, erklärt Lukas Tafreshi, Finanzexperte bei der Verbraucherzentrale des Saarlandes, gegenüber dem Sender. Wichtig ist, zu wissen, dass man das Geld zumindest theoretisch nicht einfach behalten darf. Zumindest die Täter:innen werden es nicht zurückfordern, allenfalls ein:e Dritte:r, wenn es sich um einen Dreiecksbetrug handeln sollte.
</li>
<li><h3>Paypal hat eine Lösung, die nicht alle kennen</h3>
Doch die Opfer können sich in der entsprechenden Situation ganz einfach schützen, indem sie sich korrekt und zielgerichtet verhalten. Dazu gibt es nämlich seitens Paypal eine einfache Möglichkeit. Wichtig ist, hierbei nicht vorschnell die Summe zurückzuzahlen (und schon gar nicht über den einspruchsfreien Freunde-und-Familie-Modus), <b>sondern einen Fall bei Paypal selbst eröffnen. Das geht, indem man auf die Transaktion selbst geht – und diese offiziell zurückbucht. Dann ist die Hin- und Rückbuchung transparent und – im Falle, dass es sich um einen Dreiecksbetrug handelt – kein Schaden für den anderen Geschädigten entstanden.</b>
</li>
<li>Wer bereits in die Falle gelaufen ist und Geld verloren hat, dürfte sich indes schwertun, den Schaden wiederzuerlangen. Dennoch sollten Kund:innen den Schaden bei der Polizei melden und als Betrug anzeigen. Nur so ist für spätere Probleme alles aktenkundig. Denn auch wenn Verbraucher:innen bei kleineren Summen meist einen Haken dran machen, könnte ja die Polizei ihrerseits die entsprechende Mailadresse gemeldet bekommen. Umgekehrt kann die Polizei vielleicht Muster erkennen und könnte Chancen haben, bei entsprechend häufigen Vorkommnissen etwas dagegen zu tun.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://t3n.de/news/paypal-masche-geld-zurueck-ueberweisen-1696577/"
target="_blank" rel="noreferrer noopener">
t3n :: Paypal-Masche: Warum du „versehentliche“ Überweisungen von Fremden nie zurückzahlen solltest</a>
</li>
<li><a href="https://t3n.de/news/paypal-schuetze-dein-konto-vor-dieser-betrugsmasche-1677218/"
target="_blank" rel="noreferrer noopener">
t3n :: Paypal-Alarm: Schütze dein Konto vor dieser neuen Betrugsmasche</a>
</li>
</ul>
</html>
<html>
<h3>The Six Phases of a Penetration Test:</h3>
<h4>1. Pre-Engagement Interactions</h4>
<ul>
<li>auch bezeichnet als: Scoping
</li>
<li>outline …
<ul>
<li>the logistics of the test,
</li>
<li>the expectations,
</li>
<li>the legal implications,
</li>
<li>the objectives and
</li>
<li>the goals
</li>
</ul>
the customer would like to achieve.
</li>
<li> the penetration testers should work with your company to fully understand any risks, your organizational culture, and the best pentesting strategy for your organization.
</li>
<li>You may want to perform a white box, black box, or gray box penetration test.
</li>
<li>It's at this stage when the planning occurs along with aligning your goals to specific pentesting outcomes.
</li>
</ul>
<h4>2. Reconnaissance or Open Source Intelligence (OSINT) Gathering</h4>
<ul>
<li>
</li>
</ul>
<h4>3. Threat Modeling & Vulnerability Identification</h4>
<ul>
<li>
</li>
</ul>
<h4>4. Exploitation</h4>
<ul>
<li>
</li>
</ul>
<h4>5. Post-Exploitation, Risk Analysis & Recommendations</h4>
<ul>
<li>
</li>
</ul>
<h4>6. Reporting</h4>
<ul>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://cipher.com/blog/a-complete-guide-to-the-phases-of-penetration-testing/"
target="_blank" rel="noreferrer noopener">
Cipher.com :: A Complete Guide to the Phases of Penetration Testing</a>
</li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/SIM-Swapping"
target="_blank" rel="noreferrer noopener">
Wikipedia :: SIM‐Swapping</a>
</li>
<li><a href="https://www.kaspersky.com/resource-center/threats/sim-swapping"
target="_blank" rel="noreferrer noopener">
Kaspersky :: SIM‐Swapping</a>
</li>
<li><a href="https://us.norton.com/blog/mobile/sim-swap-fraud"
target="_blank" rel="noreferrer noopener">
Norton :: What is SIM swapping? SIM swap fraud explained and how to help protect yourself</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</html>
<html>
<head>
<title>SSI Ausstrahlung (broadcast)</title>
</head>
<body>
<h1>Was ist SSID Ausstrahlung (broadcast)?</h1>
Der Service Set Identifier ist eine Art Netzwerkname, der auf<br />
dem Access Point verwaltet wird. Normalerweise wird der SSID<br />
als Broadcast frei sichtbar ausgestrahlt, da so die Verbindungs‐<br />
aufnahme von neu hinzukommenden Clients erleichtert wird. Jedes<br />
Gerät bietet heute jedoch an, die SSID zu unterdrücken.
<h3>Was ist SSID Broadcast aktivieren?</h3>
Wireless-Geräte müssen mit derselben SSID konfiguriert sein,<br />
um kommunizieren zu können. ... Wenn Sie die Auswahl von SSID-<br />
Broadcast aktivieren auf einem Router oder einem Access Point<br />
deaktivieren, ist die SSID dieses Geräts nicht in der Standort‐<br />
analyse eines anderen Geräts sichtbar und muss von Hand einge‐<br />
geben werden.
<h3>Was bedeutet getrennte SSID verwenden?</h3>
<ul>
<li><b>Vergrößern Getrennte Netze:</b><br />
Wenn der WLAN-Router die Option bietet, vergeben Sie für das 2,4-<br />
und 5-GHz-Frequenzband unterschiedliche SSIDs. Das gewünschte<br />
Netz lässt sich dann - je nach Qualität - gezielt auswählen.<br />
</li>
<li><b>Maßnahmen:</b><br />
Meist sind Router auf automatische Kanalwahl eingestellt, was auch<br />
ganz gut funktioniert.
</li>
</ul>
<h3>Was ist SSID Aussendung unterdrücken?</h3>
Viele Router bieten die Option, die SSID des WLAN-Netzwerks über<br />
einen Hidden-Modus zu verschleiern. ... Das Verstecken des WLAN-<br />
Namens legt nahe, dass das WLAN dadurch besser geschützt ist. Denn<br />
ein Hacker muss nicht nur die Passphrase herausfinden, sondern auch<br />
die richtige SSID, um sich im WLAN einloggen zu können.<br />
<h3>Was muss ich bei SSID eingeben?</h3>
Die Abkürzung SSID steht für “Service Set Identifier“. Hinter der<br />
Bezeichnung versteckt sich der Name von einzelnen WLAN-Netzwerken.<br />
Möchten Sie zum Beispiel Ihren Computer oder Ihr Smartphone per<br />
WLAN mit dem Router verbinden, um ins Internet zu gelangen, müssen<br />
Sie als erstes den richtigen Access-Point wählen.<br />
<h3>What is SSID</h3>
23 verwandte Fragen gefunden
<h3>Ist SSID das WLAN Passwort?</h3>
Sofern Sie das WLAN-Passwort nie geändert haben, ist es der vorkon‐<br />
figurierte Schlüssel, den Sie meistens auf dem Aufkleber auf der <br />
Unterseite des Routers finden. Dort ist neben der SSID, dem Namen <br />
Ihres WLAN-Netzwerks, auch das Passwort angegeben.<br />
<h3>Wo finde ich die SSID?</h3>
Hinter dem Begriff SSID verbirgt sich lediglich der Name Ihres Netz‐<br />
werks. Wenn Sie unter Windows auf das WLAN-Symbol unten rechts in<br />
Ihrer Taskleiste klicken, werden Ihnen alle SSIDs, das heißt alle<br />
Namen der verfügbaren WLAN-Netzwerke in Ihrer Umgebung, angezeigt.<br />
<h3>Was bedeutet SSID des Netzwerks?</h3>
Service Set Identifier (SSID) für drahtlose Netzwerke ist schlicht<br />
der Name, der einem WLAN-Netz gegeben wurde.<br />
<h3>Was ist die SSID Nummer?</h3>
Bei einem WLAN die Netzwerkkennung (SSID) zu verstecken, bringt kaum einen<br />
Sicherheitsgewinn. Dennoch gibt es aber einige Funknetzwerke, die ihre SSID<br />
nicht senden: Ihr Android-Smartphone kann sie also nicht sehen und sich daher<br />
auch nicht automatisch mit ihnen verbinden. Hierfür müssen Sie selbst Hand<br />
anlegen.<br />
<h3>Wie ändere ich meine SSID?</h3>
WLAN am Handy umbenennen:<br />
<ul>
<li>Öffne die Browser-App auf Deinem Handy.
</li>
<li>Steuere die Benutzeroberfläche Deines Routers an. ...
</li>
<li>Logge Dich gegebenenfalls mit dem Router-Passwort ein.
</li>
<li>Suche in den Einstellungen nach den WLAN-Optionen. ...
</li>
<li>Gib einen neuen Namen ein und speichere die Einstellung.
</li>
</ul>
<h3>Wie funktioniert Multi SSID?</h3>
<ol>
<li>Durch die Multi-SSD-Funktion können mehrere verschiedene<br />
WLAN-Netze mit unterschiedlichen SSID's eingerichtet werden<br />
(z.B. verschiedene Abteilungen in einer Firma).<br />
</li>
<li>Fü jedes dieser Netze können unterschiedliche Sicherheits‐<br />
methoden definiert werden, wie etwa die Bandbreitenbeschränkung für<br />
einzelne SSIDs.<br />
</li>
</ol>
<h3>Warum 2 WLAN Netze?</h3>
Der Hauptgrund, warum es in Ihrem drahtlosen Internet-Router zwei Netzwerke<br />
gibt, ist der, dass sie für die Ausstrahlung im 2,4-GHz- und 5-GHz-Band<br />
konzipiert wurden. Sie sind so konzipiert, dass sie Ihnen eine große Flexi‐<br />
bilität bei der Einrichtung der Heimnetzwerkverbindungen Ihres Geräts bieten.<br />
<h3>Was ist schneller WLAN 2.4 oder 5 GHz?</h3>
Das 5 GHz-Band bietet höhere Bandbreiten, hat aber eine kürzere Reich‐<br />
weite im Vergleich zu einem 2,4-GHz-Band. Bei Radiofrequenzen gilt, je<br />
höher die Frequenz, desto kürzer ist seine Reichweite.<br />
<h3>Was ist Band Steering aktivieren?</h3>
Mit Band Steering können Router und Repeater erkennen, welches Frequenz‐<br />
band für die einzelnen WLAN-Geräte besser geeignet ist und diese auto‐<br />
matisch dorthin steuern.<br />
<h3>Was ist Broadcast WLAN?</h3>
In der Vermittlungstechnik ist ein Broadcast eine spezielle Form der Mehr‐<br />
punktverbindung. Ein Broadcast-Paket erreicht alle Teilnehmer eines loka‐<br />
len Netzes, ohne dass sie explizit als Empfänger angegeben sind.<br />
<h3>Was versteht man unter netzwerkname?</h3>
Der Netzwerkname ist die Bezeichnung eines WLAN-Netzes.<br />
<h3>Wo finde ich die SSID bei Fritz Box?</h3>
1 WLAN-Einstellungen der FRITZ!Box ermitteln<br />
In den Werkseinstellungen können Sie die WLAN-Einstellungen der FRITZ!Box<br />
von der Geräteunterseite ablesen: Den Namen des WLAN-Funknetzes (SSID)<br />
finden Sie im Abschnitt “WLAN-Funknetz (SSID)“.<br />
<h3>Wo finde ich mein WLAN Netz?</h3>
Tippen Sie dazu auf “Einstellungen → Drahtlos & Netzwerk → WLAN“ und<br />
dann auf den Namen des verbundenen Netzwerks.<br />
<h3>Wo finde ich wie mein WLAN heißt?</h3>
So finden Sie die SSID heraus: Taskleiste: Sind Sie aktuell mit dem Netz‐<br />
werk verbunden und befindet sich unten rechts in der Taskleiste das Netz‐<br />
werk-Symbol, können Sie die SSID ganz einfach herausfinden. Fahren Sie<br />
mit der Maus über das Symbol, wird Ihnen der Name des Netzwerks angezeigt.<br />
</body>
<footer>
<h3>Links:</h3>
<ul>
<li><a href="https://alleantworten.de/was-ist-ssid-ausstrahlung-broadcast"
target="_blank" rel="noreferrer noopener"
Alle-Antworten.de :: Was ist SSID?</a>
</li>
</ul>
</footer>
</html>
<html>
<ul>
<li>Zum Schutz von Linux‐Rechnern vor (Bad‐)USB‐Angriffen;
</li>
<li>Dafür verwendet USBGuard das im Linux‐Kernel integrierte<br />
USB‐Authorization‐Feature;
</li>
<li>Die Reglementierung der Zugriffe erfolgt über Black‐ und<br />
White‐Listing;
</li>
<li><h3>Begriffsdefinition</h3>
<ul>
<li>Unter <b><em>BadUSB</em></b> versteht man Angriffe durch mit<br />
Schadsoftware präparierten USB-Geräten.
</li>
<li><pre>
BadUSB ist ein Begriff, der von dem deutschen Forscher Team
(Nohl, Krißler und Lell, SRLabs) geprägt wurde und bezeichnet
USB‐Geräte, deren Firmware verändert wurde, um einen Schad‐
code (Virus, Trojaner etc.) zu injizieren.
</pre>
<small>
Zitat - Quelle: Ruhr Universität Bochum: Bad USB
</small>
</li>
</ul>
<br />
<li>Ein präpariertes USB-Gerät kann im schlimmsten Fall alleine durch<br />
Einstecken in den Rechner, ohne jegliches Zutun des Benutzers und<br />
ohne, dass dieser etwas mitbekommt, Schadcode ausführen. Hier‐<br />
durch könnte ein Angreifer das System gezielt manipulieren und z.B.<br />
in den DNS-Einstellungen einen kompromitierten DNS-Server hinter‐<br />
legen.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.codingblatt.de/usbguard-zum-schutz-vor-usb-angriffen-einsetzen/"
target="_blank" rel="noreferrer noopener">
coding.blatt :: USBGuard zum Schutz vor (Bad‐)USB-Angriffen einsetzen</a>
</li>
<li>Tobias Scheible :: Hardware & Security, Kap. 11, “Angriffe über die USB‐Schnittstelle“
</li>
<li><a href="https://www.kernel.org/doc/Documentation/usb/authorization.txt"
target="_blank" rel="noreferrer noopener">
Kernel.org :: Authorization‐Feature</a>
</li>
</ul>
</html>
<html>
<ul>
<li><a href="https://builtwith.com/de/"
target="_blank" rel="noreferrer noopener">
<b>Builtwith</b></a>
</li>
<li><a href="https://haveibeenpawnd.com/DomainSearch/"
target="_blank" rel="noreferrer noopener">
<b>Have I been pawned?</b></a>
</li>
<li><a href="hunter.io"
target="_blank" rel="noreferrer noopener">
<b>Hunter.io</b></a>
</li>
<li><a href="https://github.com/ihebski/DefaultCreds-cheat-sheet"
target="_blank" rel="noreferrer noopener">
<b>GitHub - Ihebski :: Default Credentials Cheat Sheet</b></a>
</li>
</ul>
</html>
<html>
Nachträglich installierte Tools in Kali:
<ol>
<li><b>Wappalyzer</b> (Firefox)
</li>
<li><b>Foxy Proxy Standard</b> (Firefox)
</li>
<li><b>Sublist3r</b>
</li>
<li><b>Sherlock</b> (für Soziale Netzwerke)
</li>
<li>
</li>
</ol>
Weitere mögliche Tools (bisher nicht installiert):
<ul>
<li><b>breach parse</b> (GitHub)
</li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://www.howtogeek.com/674288/how-to-audit-your-linux-systems-security-with-lynis/"
target="_blank" rel="noreferrer noopener">
HowToGeek :: How to audit your Linux system security with lynis</a>
</li>
<li><a href="https://linux-audit.com/lynis-3-major-release/"
target="_blank" rel="noreferrer noopener">
Linux Audit :: lynis 3, major release</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
Geben Sie den Text für 'Neuer Tiddler' ein
<html>
<ul>
<li><b>MRCC</b> :=: <em>Maritime Rescue Co‐ordination Centre</em></li>
<li><b>DGzRS</b> :=: <em>Deutsche Gesellschaft zur Rettung Schiffbrüchiger</em></li>
</ul>
</html>
<html>
<ul>
<li>Als <b><em>Gösch</em></b> wird die Bugflagge von Schiffen bezeichnet.</li>
<li>Heutzutage ist die Gösch insbesondere bei Kriegsschiffen<br />
in Verwendung. Sie wird nur gesetzt, wenn das Schiff im<br />
Hafen liegt.</li>
<li>
Die Schiffe der Deutschen Gesellschaft zur Rettung Schiff‐<br />
brüchiger (DGzRS) tragen als Gösch dauerhaft die “Bremer<br />
Speckflagge“.<br />
<br />
<img src="./pictures/BremerSpeckflagge.svg.png" height=110 width=165 /> <!-- height=220 width=330 -->
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/G%C3%B6sch_(Seefahrt)" target="_blank" rel="noreferrer noopener">
Wikipedia :: Gösch</a></li>
<li><a href="https://www.flaggenlexikon.de/d-schiff.htm" target="_blank" rel="noreferrer noopener">
Flaggenlexikon :: Schiffsbeflaggung</li>
</ul>
</html>
<html>
<ul>
<li><b>Dogger</b><br />
Schottische (Ost–)Küste, Mittelengland
</li>
<li><b>Utsira</b><br />
Norwegisches Seegebiet, westlich der Küste
</li>
</ul>
</html>
<html>
<ul>
<li>benannt nach <a href="https://de.wikipedia.org/wiki/Francis_Beaufort"
target="_blank" rel="noreferrer noopener">
Sir Francis Beaufort</a> (1774‐1857);
</li>
<li>ein weit verbreitetes System zur Beschreibung der Windstärke;
</li>
<li>Abkürzung: <b><em>Bft</em></b>
</li>
</li>
<li>eine Skala zur Einteilung der Windstärke in 13 Stärkenbereiche<br />
von 0 (<em>Windstille</em>) bis 12 (<em>Orkan</em>);
</li>
<li>sie basiert <b><em>nicht</em></b> auf exakten Messungen, sondern den beobach‐<br />
teten Auswirkungen des Windes;
</li>
<li><h3>Beaufort-Skala nach phänomenologischen Kriterien</h3>
<table border="1">
<tr>
<th rowspan="2">Windstärke und<br>
mittlere Wind-<br>
geschwindigkeit<br>
in kn, m/s, km/h
</th>
<th rowspan="2" align="center">Symbol in<br />
Wetterkarten
</th>
<th colspan="2" align="center">Bezeichnung
</th>
<th colspan="2" align="center">Beschreibung
</th>
</tr>
<tr>
<th align="center" width=150>der Windstärke
</th>
<th align="center" width=150>des Seegangs<br />
(Windsee)
</th>
<th align="center" width=150>Wirkung an Land
</th>
<th align="center" width=150>Wirkung auf dem Meer
</th>
</tr>
<tr>
<td style="background: #FFFFFF; text-align:center; font-size:110%;">
<b>0 Bft</b><br />
<br />
0‐1 kn<br />
<br />
0‐0,2 m/s<br />
<br />
0‐1 km/h<br />
</td>
<td style="text-align:center;">
<img src="./pictures/WindBarp00_000.svg" height=100 width=100 />
</td>
<td style="text-align:center;">
Windstille,<br />
Flaute
</td>
<td style="text-align:center;">
völlig ruhige,<br />
glatte See
</td>
<td style="max-width:0">
keine Luftbewegung, <br />
Rauch steigt senkrecht empor
</td>
<td>
spiegelglatte See
</td>
</tr>
<tr>
<td style="background: #ECECFF; text-align:center; font-size:110%;">
<b>1 Bft</b><br />
<br />
1‐3 kn<br />
<br />
0,3‐1,5 m/s<br />
<br />
1‐5 km/h<br />
</td>
<td style="text-align:center;">
<img src="./pictures/WindBarp05_030.svg" height=100 width=100 />
</td>
<td style="text-align:center;">
leiser Zug
</td>
<td style="text-align:center;">
ruhige, gekräuselte See
</td>
<td style="max-width:0">
kaum merklich, Rauch<br />
treibt leicht ab, Wind‐<br />
flügel und Windfahnen unbewegt
</td>
<td>leichte Kräuselwellen
</td>
</tr>
<tr>
<td style="background: #D9D9FF; text-align:center; font-size:110%;">
<b>2 Bft</b><br />
<br />
4‐6 kn<br />
<br />
1,6‐3,3 m/s<br />
<br />
6‐11 km/h<br />
</td>
<td style="text-align:center;">
<img src="./pictures/WindBarp10_030.svg" height=100 width=100 />
</td>
<td style="text-align:center;">
leichte Brise
</td>
<td style="text-align:center;">
schwach bewegte See
</td>
<td>
Blätter rascheln,<br />
Wind im Gesicht spürbar
</td>
<td style="max-width:0">
kleine, kurze Wellen, Oberfläche glasig
</td>
</tr>
<tr>
<td style="background: #C5C5FF; text-align:center; font-size:110%;">
<b>3 Bft</b><br />
<br />
7‐10 kn<br />
<br />
3,4‐5,4 m/s<br />
<br />
12‐19 km/h<br />
</td>
<td style="text-align:center;">
<img src="./pictures/WindBarp15_030.svg" height=100 width=100 />
</td>
<td style="text-align:center;">
schwache Brise
</td>
<td style="text-align:center;">
schwach bewegte See
</td>
<td>
Blätter und dünne Zweige<br />
sowie Wimpel bewegen sich;
</td>
<td style="max-width:0">
Anfänge der Schaumbildung
</td>
</tr>
<tr>
<td style="background: #B0B0FF; text-align:center; font-size:110%;">
<b>4 Bft</b><br />
<br />
11‐15 kn<br />
<br />
5,5‐7,9 m/s<br />
<br />
20‐28 km/h<br />
</td>
<td style="text-align:center;">
<img src="./pictures/WindBarp20_030.svg" height=100 width=100 />
</td>
<td style="text-align:center;">
mäßige Brise
</td>
<td style="text-align:center;">
leicht bewegte See
</td>
<td style="max-width:0">
Zweige bewegen sich, Staub<br />
und loses Papier wird vom<br />
Boden gehoben, Wimpel werden<br />
gestreckt
</td>
<td style="max-width:0">
kleine, länger werdende<br />
Wellen, recht regel‐<br />
mäßige Schaumköpfe
</td>
</tr>
<tr>
<td style="background: #9B9BFF; text-align:center; font-size:110%;">
<b>5 Bft</b><br />
<br />
<br />16‐21 kn<br />
<br />
<br />8,0‐10,7 m/s<br />
<br />
<br />29‐38 km/h<br />
</td>
<td>
<img src="./pictures/WindBarp25_030.svg" height=100 width=100 />
</td>
<td style="text-align:center;max-width:0">
frische Brise, frischer Wind
</td>
<td style="text-align:center;">
mäßig bewegte See
</td>
<td style="max-width:0">
größere Zweige und kleine<br />
Äste bewegen sich, kleine Laubbäume beginnen zu schwanken, Wind deutlich hörbar
</td>
<td style="max-width:0">
mäßige Wellen von großer Länge, überall Schaumköpfe
</td>
</tr>
<tr>
<td style="background: #8383FF; text-align:center; font-size:110%;">
<b>6 Bft</b><br />
<br />
22‐27 kn<br />
<br />
10,8‐13,8 m/s<br />
<br />
39‐49 km/h<br />
</td>
<td>
<img src="./pictures/WindBarp30_030.svg" height=100 width=100 />
</td>
<td style="text-align:center;">
starker Wind
</td>
<td style="text-align:center;">
grobe See
</td>
<td style="max-width:0">
starke Äste bewegen sich, hörbares Pfeifen an Drahtseilen und Telefonleitungen, Regenschirme sind schwer zu halten
</td>
<td style="max-width:0">
größere Wellen mit brechenden Köpfen, überall weiße Schaumflecken
</td>
</tr>
<tr>
<td style="background: #6868FF; color: white; text-align:center; font-size:110%;">
<b>7 Bft</b><br />
<br />
28‐33 kn<br />
<br />
13,9‐17,1 m/s<br />
<br />
50‐61 km/h<br />
</td>
<td style="text-align:center;">
<img src="./pictures/WindBarp35_030.svg" height=100 width=100 />
</td>
<td style="text-align:center;">
steifer Wind
</td>
<td style="text-align:center;">
sehr grobe See
</td>
<td style="max-width:0">
Bäume schwanken, fühlbare Hemmungen beim Gehen gegen den Wind
</td>
<td style="max-width:0">
weißer Schaum von den brechenden Wellenköpfen legt sich in Schaumstreifen in die Windrichtung
</td>
</tr>
<tr>
<td style="background: #4747FF; color: white; text-align:center; font-size:110%;">
<b>8 Bft</b><br />
<br />
34‐40 kn<br />
<br />
17,2‐20,7 m/s<br />
<br />
62‐74 km/h<br />
</td>
<td style="text-align:center;">
<img src="./pictures/WindBarp40_030.svg" height=100 width=100 />
</td>
<td style="text-align:center;">
stürmischer Wind
</td>
<td style="text-align:center;">
mäßig hohe See
</td>
<td style="max-width:0">
große Bäume werden bewegt, Fensterläden werden geöffnet, Zweige brechen von Bäumen, beim Gehen erhebliche Behinderung
</td>
<td style="max-width:0">
ziemlich hohe Wellenberge, deren Köpfe verweht werden, überall Schaumstreifen
</td>
</tr>
<tr>
<td style="background: #0000FF; color: white; text-align:center; font-size:110%;">
<b>9 Bft</b><br />
<br />
41‐47 kn<br />
<br />
20,8‐24,4 m/s<br />
<br />
75‐88 km/h<br />
</td>
<td style="text-align:center;">
<img src="./pictures/WindBarp45_030.svg" height=100 width=100 />
</td>
<td style="text-align:center;">
Sturm
</td>
<td style="text-align:center;">
hohe See
</td>
<td style="max-width:0">
Äste brechen, kleinere Schäden an Häusern, Ziegel und Rauchhauben werden von Dächern gehoben, Gartenmöbel werden umgeworfen und verweht, beim Gehen erhebliche Behinderung
</td>
<td style="max-width:0">
hohe Wellen mit verwehter Gischt, Brecher beginnen sich zu bilden
</td>
</tr>
<tr>
<td style="background: #0000BB; color: white; text-align:center; font-size:110%;">
<b>10 Bft</b><br />
<br />
48‐55 kn<br />
<br />
24,5‐28,4 m/s<br />
<br />
89‐102 km/h<br />
</td>
<td style="text-align:center;">
<img src="./pictures/WindBarp50_030.svg" height=100 width=100 />
</td>
<td style="text-align:center;">
schwerer Sturm
</td>
<td style="text-align:center;">
sehr hohe See
</td>
<td style="max-width:0">
Bäume werden entwurzelt, Baumstämme brechen, Gartenmöbel werden weggeweht, größere Schäden an Häusern; selten im Landesinneren
</td>
<td style="max-width:0">
sehr hohe Wellen, weiße Flecken auf dem Wasser, lange, überbrechende Kämme, schwere Brecher
</td>
</tr>
<tr>
<td style="background: #000077; color: white; text-align:center; font-size:110%;">
<b>11 Bft</b><br />
<br />
56‐63 kn<br />
<br />
28,5‐32,6 m/s<br />
<br />
103‐117 km/h<br />
</td>
<td style="text-align:center;">
<img src="./pictures/WindBarp55_030.png" height=100 width=100 />
</td>
<td style="text-align:center;">
orkanartiger Sturm
</td>
<td style="text-align:center;">
schwere See
</td>
<td style="max-width:0">
heftige Böen, schwere Sturmschäden, schwere Schäden an Wäldern (Windbruch), Dächer werden abgedeckt, Autos werden aus der Spur geworfen, dicke Mauern werden beschädigt, Gehen ist unmöglich; sehr selten im Landesinneren
</td>
<td style="max-width:0">
brüllende See, Wasser wird waagerecht weggeweht, starke Sichtverminderung
</td>
</tr>
<tr>
<td style="background: #000000; color: white; text-align:center; font-size:110%;">
<b>12 Bft</b><br />
<br />
≥ 64 kn<br />
<br />
≥ 32,7 m/s<br />
<br />
≥ 118 km/h<br />
</td>
<td style="text-align:center;">
<img src="./pictures/WindBarp60_030.png" height=100 width=100 />
</td>
<td style="text-align:center;">
Orkan
</td>
<td style="text-align:center;max-width:0">
außergewöhnlich schwere See
</td>
<td style="max-width:0">
schwerste Sturmschäden und Verwüstungen; sehr selten im Landesinneren
</td>
<td style="max-width:0">
See vollkommen weiß, Luft mit Schaum und Gischt gefüllt, keine Sicht mehr
</td>
</tr>
</table>
</li>
<!--
<li>
</li>
-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Beaufortskala"
target="_blank" rel="noreferrer noopener">
Wikipedia :: Beaufortskala</a>
</li>
</ul>
</html>
<html>
In any X based desktop when the number of pseudo terminal<br>
windows are more then one, the common shell history<br>
file (KSH) becomes a nuisance. Here is a way to have<br>
separate, safe and limited shell command history files.<br>
<br>
Put the following code in your shell RC file.<br>
<br>
<code>
--------------------------------CODE START------------------------------------<br>
# Form a unique name for the shell history file using the tty output and<br>
# set the shell variable HISTFILE to point to that<br>
# This solves the problem of mutiple shells using the same history file<br>
# and causing the confusion....<br>
histf=`tty | awk 'BEGIN {FS="/"; nm=".shist_"} { for (i=1; i<=NF; i++) nm = nm $i;} END { print nm;} '`<br>
export HISTFILE=$histf<br>
\rm -f $histf<br>
echo History file is $histf...<br>
--------------------------------CODE END------------------------------------<br>
</code>
<br>
This tip generously supported <br>
by: atulk@informix.com<br>
<br>
</html>
<html>
If the environment and home directory structure<br />
are centralized, then build a set of alias tables<br />
for setting the display for all remote machines<br />
that may get logged into remotely or administrate<br />
remotely. In the long run it will save time.
<pre><code>
alias 'setwad setenv DISPLAY wad:0'
alias 'setspot setenv DISPLAY spot:0'
alias 'settrash setenv DISPLAY trash:0'
</code></pre>
</html>
<html>
Ever wanted the standard input and standard output<br>
to be shared on two terminals?<br>
<br>
Try the following short script,<br>
<br>
<code>
------------------- CUT HERE -------------------------<br>
<br>
[ $# -lt 2 ] && echo "Usage: $0 program ttytodupon" && exit 2<br>
mytty=`tty`<br>
prog=$1<br>
othertty=$2<br>
sh -c "$prog|tee -a $mytty" 1>$othertty 2>&1 0>$othertty<br>
<br>
------------------- CUT HERE -------------------------<br>
</code>
This tip generously supported <br>
by: ian@kiwiplan.co.nz<br>
</html>
<html>
<b>typeset </b><br />
Shell: Korn-Shell (ksh)<br />
This command creates a shell variable, assigns it a value,<br />
and specifies certain atttributes for the variable, such as<br />
integer and read-only.<br />
<br />
Synonym zu "declare".<br />
<br />
Beispiel:<br />
typeset -LZ1 char<br />
-L :: left justify and remove leading blanks from value.<br />
If n is nonzero it defines the width of the field, otherwise<br />
it is determined by the width of the value of first assignment.<br />
<br />
-Z :: right justify and fill with leading zeros if the first nonblank<br />
character is a digit and the -L flag has not been set. <br />
If n is nonzero it defines the width of the field, otherwise<br />
it is determined by the width of the value of first assignment.<br />
<br />
</html>
<html>
In VI editor you can get the output of any <br />
shell command command inserted into <br />
the file you are editing by using:
<pre><code>:r!<command></code></pre>
For example:
<pre><code>:r!who -r</code></pre>
inserts the ouput of the command "who -r"<br />
to the file currently being edited.<br />
<br />
This can be effectively used to copy the <br />
contents of a file to the file currently being <br />
edited ie,<br />
<pre><code>:r!cat /etc/passwd</code></pre>
inserts all the contents of the the /etc/passwd<br />
to the file currently being edited.<br />
<br />
This tip supported by: <br />
Prem Kumar S <sprem@wipro.co.in><br />
</html>
https://bash.cyberciti.biz/virtualization/shell-script-to-update-all-lxd-container-hypervisor/
<html>
Here is a tip on how to run sqlplus scripts within a shell script.<br>
It is an example of how to pass database values into shell variables<br>
and to make shell scripts more dynamic. This maybe elementary to some<br>
folks but hope it helps others.....Here is the syntax:<br>
<br>
<code>
#!/bin/sh<br>
dummyvar=`sqlplus -s username/password <<end<br>
set pagesize 0 feedback off ver off heading off echo off<br>
select sysdate from dual;<br>
exit;<br>
end`<br>
echo "system date is " $dummyvar<br>
#end of shell script<br>
</code><br>
This will retrieve the system date from Oracle but you get the idea<br>
that you can expand the select script to get whatever you want from<br>
the database and place it in a shell variable where you can make<br>
decisions on it.<br>
<br>
This tip generously supported <br>
by: riosm@abcbs.com<br>
</html>
<html>
<h3>Aufruf-Beispiel: </h3>
<code><pre>./recover.ksh -s MXTST8 -d MX_TST06_FIN -i MX_DUMPPROD \
-p /dbarchive/remote/MXTST8/dumps/Daily_EoD_Before_Global_20180530_164528_20180530_164528 \
-o & </pre></code>
<code><pre>
#!/bin/ksh
################################################################################
# File: /sybase12/scripts/shells/recover.ksh
# Platform: Solaris 8 HW 07/01
# Author: Bernd Ihmels, Rainer Neusuess
# Date: 16.09.2002
#
# recover.ksh -- Script, that reloads databases of a Sybase ASE using
# 'load database' and 'load transaction'. Only one database may be recovered
# on each instance of this script.
# The database to be recovered must be specified using the option -d or -db.
# The dump file names to be loaded
# are expected to have either the format <Database name>.<Stripe>.dmp or
# <Database name>.<Sequence number>.<Stripe>.dmp. So giving the database name
# and, if necessary, the sequence number of the dump to be loaded should
# sufficiently determine the dump file name. If the dump file has the suffix
# *.dmc, then it is assumed, that it was written using the Sybase compress
# option.
# The option -i (or -inputdb) determines the database name of the dump file.
# The sequence number may be specified using the option -n or -number.
# If -n (-number) is not given, no sequence number in the dump file name to
# be loaded is expected.
# The path, where the dumps and transactionlogs can be found, must be
# specified using the option -p or -path. The dumps will be searched in the
# subdirectory ./dumps, the transaction log in ./trlogs.
# The last transaction dump to be loaded may be specified with the option -l
# or -last. Default is 0, i.e. no trandump will be loaded. If any transaction
# dump should be loaded, the corresponding dump file MUST contain a sequence
# number. The corresponding transaction dump files will be determined from
# this sequence number!
# If the sybase ASE name was not given (option -s or -server), then the first
# entry in $SYB_CONF will be used.
# If the optional argument -z or -zip is given, the dump files will be
# zipped when the loading is finished.
# Zipped input files will be unzipped automatically using either decompress,
# gunzip or bunzip2. The optional argument -o or -online triggers an 'online
# database' at the end of the load.
################################################################################
# Autor: Bernd Ihmels, CS Consulting AG (2002)
# Creation date: 15.05.2002
# Number of last trandump to be loaded.
LAST_TR=0
# ========================== End of configurable section ====================
PROG=$(/bin/basename $0)
# Check Sybase environment variable and initialize dba environment.
SYBASE=${SYBASE:?"Undefined environment variable SYBASE!"}
DBA_FILE=$SYBASE/dba/dba.init
if [ ! -r $DBA_FILE ]; then
echo "$(date) <$PROG>: Can not read file $DBA_FILE!"
exit 1
fi
# Read dba init file.
. $DBA_FILE
# Replace some settings in $DBA_FILE with more secure ones.
SYB_CONF=~/scripts/.cfg/dumpuser.cfg
SYB_USER=nlb_dump
SYB_SERVER=$($AWK_EXE -F: '!/#/{print $1}' $SYB_CONF)
# Short notice, where to find the status of this script.
echo "$(date): See log file $LOG_FILE for status and error messages."
# Define the isql command.
ISQL=$SYBASE/$SYBASE_OCS/bin/isql
# Set ERROR status.
ERROR=0
# Unset SEQ number, if files with no sequence number shall be read.
unset SEQ
display_help()
{
# display_help -- Generate a help message on stdout and exit.
echo "\nUsage: $PROG -d(b) <database> -p(ath) <dump file path>"
echo " -i(nputdb) <database name>\n [-n(umber) <dump no>]\c"
echo " [-s(erver) <ASE>] [-l(ast) <last trandump no>]"
echo " [-z(ip)] [-o(nline)] [-h(elp)]"
echo "\n\n$PROG -- Reloads a database of a Sybase ASE using 'load database'"
echo " and 'load transaction'. Only one database may be recovered"
echo " on each instance of this script. The database to be recovered must"
echo " be specified using the option -d or -db. The dump file names to be"
echo " loaded are expected to have either the format"
echo " <Database name>.<Stripe>.dmp or"
echo " <Database name>.<Sequence number>.<Stripe>.dmp. So giving the"
echo " database name and, if necessary, the sequence number of the dump to"
echo " be loaded should sufficiently determine the dump file name. If the"
echo " dump file has the suffix *.dmc, then it is assumed, that it was"
echo " written using the Sybase compress option."
echo " The option -i (or -inputdb) determines the database name of the"
echo " dump file. The sequence number may be specified using the option -n"
echo " or -number. If -n (-number) is not given, no sequence number in the"
echo " dump file name to be loaded is expected."
echo " The path, where the dumps and transactionlogs can be found, must be"
echo " specified using the option -p or -path. The dumps will be searched"
echo " in the subdirectory ./dumps, the transaction log in ./trlogs."
echo " The last transaction dump to be loaded may be specified with the"
echo " option -l or -last. Default is 0, i.e. no trandump will be loaded."
echo " If any transaction dump should be loaded, the corresponding dump"
echo " file MUST contain a sequence number. The corresponding transaction"
echo " dump files will be determined from this sequence number!"
echo " If the sybase ASE name was not given (option -s or -server), then"
echo " the first entry in $SYB_CONF will be used."
echo " If the optional argument -z or -zip is given, the dump files will"
echo " be zipped when the loading is finished. Zipped input files will be"
echo " unzipped automatically using either decompress, gunzip or bunzip2."
echo " The optional argument -o or -online triggers an 'online database'"
echo " at the end of the load."
return 0
}
isqlerr()
{
if [ $# -ne 2 ]; then
error "Function isqlerr needs two arguments!"
error "Usage: isqlerr <Here document name> <Error status>"
return
fi
error "Isql $1 terminated with the error code $2"
${CAT_EXE} ${TMP_FILE} >> ${LOG_FILE}
}
# Write header into log file.
header
# Read arguments.
typeset -LZ1 char
while [ $# -ne 0 ]; do
case $1 in
(-h|-help) # Display help message.
display_help
check_exit 0;;
(-d|-db) # Load dump into this database.
shift
# Display help if no argument is given.
char=$1
if [ $# -eq 0 ] || [ $char = "-" ]; then
error "No database name found!"
display_help
check_exit 2
fi
DB=$1
shift;;
(-i|-inputdb) # Get dump of this database.
shift
# Display help if no argument is given.
char=$1
if [ $# -eq 0 ] || [ $char = "-" ]; then
error "No input database name found!"
display_help
check_exit 2
fi
INPUTDB=$1
shift;;
(-p|-path) # Get dump files from this directory.
shift
# Display help if no argument is given.
char=$1
if [ $# -eq 0 ] || [ $char != "/" ]; then
error "No directory given (has to be an absolute path name)!"
display_help
check_exit 2
fi
DPATH=$1
shift;;
(-n|-number) # Get no of dump file.
shift
# Display help if no argument is given.
char=$1
if [ $# -eq 0 ] || [ $char = "-" ]; then
error "No dump number found!"
display_help
check_exit 2
fi
SEQ=$1
shift;;
(-l|-last) # Get no of last transaction log to be loaded.
shift
# Display help if no argument is given.
char=$1
if [ $# -eq 0 ] || [ $char = "-" ]; then
error "No transaction log number found!"
display_help
check_exit 2
fi
LAST_TR=$1
shift;;
(-s|-server) # Get name of ASE, where the database to be loaded is in.
shift
# Display help if no argument is given.
char=$1
if [ $# -eq 0 ] || [ $char = "-" ]; then
error "No sql server name found!"
display_help
check_exit 2
fi
ASE=$1
shift;;
(-z|-zip) # Unzip dump files before loading and zip them afterwards.
ZIP=true
shift;;
(-o|-online) # Online database when the dump is done.
ONLINE=true
shift;;
(*) # Unknown option.
error "$1: Unknown option!"
display_help
check_exit 2;;
esac
done
# Check the settings. The database names and the dump file path must be given.
if [[ -z $DB ]]; then
error "No database name given!"
display_help
check_exit 3
fi
if [[ -z $INPUTDB ]]; then
error "No input database name determining the dump file name given!"
display_help
check_exit 3
fi
if [[ -z $DPATH ]]; then
error "No dump file path is given!"
display_help
check_exit 3
fi
if [[ -z $ASE ]]; then
# Get ASE name from config file.
SYB_SERVER=${SYB_SERVER#\ *}
ASE=${SYB_SERVER%%\ *}
else
# Check, if the ASE name we got is listed in $SYB_CONF.
echo $SYB_SERVER | egrep -s $ASE
if [ $? -ne 0 ]; then
error "ASE $ASE not found in $SYB_CONF!"
check_exit 4
fi
fi
# Check, if the given path is valid on this server.
if [ ! -d $DPATH ]; then
error "Given path $DPATH not a directory on this server!"
check_exit 4
fi
# Get password from $SYB_CONF for the choosen ASE.
SYB_PASSWD=$($AWK_EXE -F: '$1 == "'$ASE'" {print $2}' $SYB_CONF)
# Generate dump file name(s).
if [[ -n $SEQ ]]; then
SEQ=".$SEQ"
fi
set -A DUMPFILES $(/bin/find $DPATH/dumps \( -name "$INPUTDB$SEQ.*dmp*" -o \
-name "$INPUTDB$SEQ.*dmc*" \) -print | /bin/sort)
# Quit, if no DUMPFILES have been found.
if [[ -z $DUMPFILES ]]; then
error "Can not find any dump file containing the string $INPUTDB$SEQ!"
check_exit 5
fi
# Generate load dump command and decompress files, if necessary.
integer i=0
last=${#DUMPFILES[*]}
unset UNZIPFILES
while (($i < $last)); do
eval FILE=\${DUMPFILES[$i]}
ENDING=${FILE##*.}
# Decompress file if necessary.
case $ENDING in
(gz) /bin/gunzip $FILE &
log "gunzip dump file $FILE"
set -A UNZIPFILES ${UNZIPFILES[*]} $FILE;;
(Z) /bin/uncompress $FILE &
log "uncompress dump file $FILE"
set -A UNZIPFILES ${UNZIPFILES[*]} $FILE;;
(bz2) /bin/bunzip2 $FILE &
log "bunzip dump file $FILE"
set -A UNZIPFILES ${UNZIPFILES[*]} $FILE;;
(*) ENDING= ;;
esac
eval DUMPFILES[$i]=\${DUMPFILES[$i]%.${ENDING}}
eval FILE=\${DUMPFILES[$i]}
ENDING=${FILE##*.}
if [ $ENDING = "dmc" ]; then
COMPRESS_FLAG="compress::"
else
COMPRESS_FLAG=""
fi
# Generate load dump command.
if [ $i = 0 ]; then
LDCMD="load database ${DB} from '${COMPRESS_FLAG}${DUMPFILES[0]}'"
else
eval LDCMD=\""${LDCMD} stripe on '${COMPRESS_FLAG}\${DUMPFILES[$i]}'"\"
fi
((i+=1))
done
# Wait, until all files are decompressed.
if [[ -n $UNZIPFILES ]]; then
while true; do
if ls ${UNZIPFILES[@]} > /dev/null 2>&1; then
# Found some files. Wait a short period and test again.
sleep 1
else
# No files found any more. Leave this loop.
break
fi
done
fi
log ''
log ''
log "Now loading database: $DBNAME"
log ''
# Load database $DB using $LDCMD.
$ISQL -S$ASE -U$SYB_USER -w200 <<-EOLoadDump >> $LOG_FILE
$SYB_PASSWD
set nocount on
go
$LDCMD
go
EOLoadDump
# Get status of isql command
STATUS=$?
if [ $STATUS != 0 ]; then
isqlerr EOLoadDump $STATUS
check_exit 6
fi
# Recompress files.
if [ $ZIP ]; then
for FILE in ${DUMPFILES[@]}; do
$COMPRESS_EXE $FILE &
done
fi
# Load transaction logs.
i=1
while (($i <= $LAST_TR)); do
TRFILE=$(ls $DPATH/trlogs/$INPUTDB$SEQ.$i.tr*)
# Check, whether this file exists. If not, quit loading trandumps.
if [[ -z $TRFILE ]]; then
log "The trandump file $TRFILE does not exist! Quit loading."
check_exit 7
fi
# Check, whether the file has to be decompressed before loading.
ENDING=${TRFILE##*.}
case $ENDING in
(gz) /bin/gunzip $TRFILE;;
(Z) /bin/uncompress $TRFILE;;
(bz2) /bin/bunzip2 $TRFILE;;
(*) unset ENDING;;
esac
eval TRFILE=\${TRFILE%.${ENDING}}
ENDING=${TRFILE##*.}
if [ $ENDING = "trc" ]; then
COMPRESS_FLAG="compress::"
else
COMPRESS_FLAG=""
fi
# Generate load tran command.
LDCMD="load tran ${DB} from \"${COMPRESS_FLAG}${TRFILE}\""
log ''
log "Now loading tran $i into database $DBNAME"
log ''
# Load trandump $i using $LDCMD.
$ISQL -S$ASE -U$SYB_USER -w 200 <<-EOLoadTran >> $LOG_FILE
$SYB_PASSWD
set nocount on
go
$LDCMD
go
EOLoadTran
# Get status of isql command.
STATUS=$?
if [ $STATUS != 0 ]; then
isqlerr EOLoadTran $STATUS
check_exit 8
fi
# Recompress files.
if [ $ZIP ]; then
$COMPRESS_EXE ${TRFILE} &
fi
# Increase counter by one.
((i+=1))
done
if [ $ONLINE ]; then
# Online database at the end.
log ''
log "Online database ${DB}"
log ''
$ISQL -S$ASE -U$SYB_USER -w 200 <<-EOOnlineDB >> $LOG_FILE
$SYB_PASSWD
set nocount on
go
online database ${DB}
go
EOOnlineDB
STATUS=$?
if [ $STATUS != 0 ]; then
isqlerr EOOnlineDB $STATUS
check_exit 9
fi
fi
check_exit 0
</pre></code>
</html>
<html>
<code><pre>
#!/bin/ksh
# setRORights.ksh -- Sets read only rights on all user tables in a database to
# the role READ_ONLY_ROLE.
# Author: Bernd Ihmels, CS Consulting AG
PROG=$(/bin/basename $0)
# Check Sybase environment variable and initialize dba environment.
SYBASE=${SYBASE:?"Undefined environment variable SYBASE"}
DBA_FILE=$SYBASE/dba/dba.init
if [ ! -r $DBA_FILE ]; then
echo "`date` <$PROG>: Can not read file $DBA_FILE!"
exit 1
fi
. $DBA_FILE
# Define the isql command.
ISQL=$SYBASE/$SYBASE_OCS/bin/isql
# Define some other commands
GREP_EXE=/bin/grep
TAIL_EXE=/bin/tail
TR_EXE=/bin/tr
# Set owner of tables.
OWNER=MUREXDB
display_help()
{
# display_help -- Generates a help message on stdout and exit.
echo "\nUsage: $PROG -s(erver) <ASEname> -d(b) <DBname>"
echo " [-o(wner) <Username>] [-h(elp)]"
echo "\n\n $PROG -- Set read only rights for role READ_ONLY_ROLE on"
echo " all user tables in database <DBname> on server <ASEname>. The role"
echo " has to exist already in the server. The current owner of the"
echo " database is set to MUREXDB as default. This can be changed using"
echo " the option -o|-owner <Username>\n".
return 0
}
isqlerr()
{
if [ $# -ne 2 ]; then
error "Function isqlerr needs two arguments!"
error "Usage: isqlerr <Here document name> <Error status>"
exit
fi
error "Isql $1 terminated with the error $2"
${CAT_EXE} ${TMP_FILE} >> ${LOG_FILE}
}
# Short notice, where to find the status of this script.
echo "$(date): See log file $LOG_FILE for status and error messages."
typeset -LZ1 char
while [ $# -ne 0 ]; do
case $1 in
(-h|-help) # Display help message
display_help
check_exit 0;;
(-s|-server) # Database can be found in this ASE.
shift
# Display help if no argument was given.
char=$1
if [ $# -eq 0 ] || [ $char = "-" ]; then
error "No server name found!"
check_exit 1
fi
ASE=$1
shift;;
(-d|-db) # Name of the database.
shift
# Display help if no argument was given.
char=$1
if [ $# -eq 0 ] || [ $char = "-" ]; then
error "No database name found!"
check_exit 1
fi
DB=$1
shift;;
(-o|-owner) # Current owner of database objects.
shift
# Display help if no argument was given.
char=$1
if [ $# -eq 0 ] || [ $char = "-" ]; then
error "No user name found!"
check_exit 1
fi
OWNER=$1
shift;;
(*) error "$0: Unknown option $1!"
display_help
check_exit 1;;
esac
done
# Check, if the ASE name we got is listed in $SYB_CONF.
if [ $ASE ]; then
echo $SYB_SERVER | egrep -s $ASE
if [ $? -ne 0 ]; then
error "ASE $ASE not found in $SYB_CONF!"
check_exit 2
fi
SYB_SERVER=$ASE
else
error "No ASE name given!"
check_exit 2
fi
# Check, if we got a database name.
if [[ -z $DB ]]; then
error "No database name given!"
check_exit 3
fi
# Get password from $SYB_CONF for the ASE.
SYB_PASSWD=$($AWK_EXE -F: '$1 == "'$SYB_SERVER'" {print $2}' $SYB_CONF)
if [[ -z $SYB_PASSWD ]]; then
error "Can not find password for server $SYB_SERVER in $SYB_CONF!"
check_exit 4
fi
$ISQL -S$SYB_SERVER -D$DB -U$SYB_USER -w200 <<-EOSetRights > $TMP_FILE
$SYB_PASSWD
set nocount on
go
set flushmessage on
go
-- Check if role READ_ONLY_ROLE exists in ASE.
declare @role_name varchar(32)
select @role_name = name from master..syssrvroles
where name = "READ_ONLY_ROLE"
if @@rowcount != 1
begin
print "No role 'READ_ONLY_ROLE' exists in this ASE! Stop execution."
print "STATUS = 1"
end
go
declare @lines int, @status int
select name into #table_list from sysobjects where type = 'U'
select @status = @@error, @lines = @@rowcount
if @status != 0
begin
print "Could not create table #table_list"
print "STATUS = 2"
end
if @lines = 0
begin
print "No tables defined in database!?"
print "STATUS = 3"
end
go
declare @tablename varchar(32), @owner varchar(32)
select @owner = "${OWNER}"
while 1=1 -- Endless loop
begin
set rowcount 1
select @tablename = name from #table_list
if @@rowcount = 0 break
set rowcount 0
exec('grant select on ' + @owner + '.' + @tablename + ' to READ_ONLY_ROLE')
if @@error != 0
begin
print "Can not grant select rights on table %1!", @tablename
print "STATUS = 4"
select syb_quit()
end
delete from #table_list where name = @tablename
if @@error != 0
begin
print "Problems deleting %1! from #table_list", @tablename
print "STATUS = 5"
select syb_quit()
end
end
go
print "STATUS = 0"
go
quit
EOSetRights
STATUS=$($TAIL_EXE -3 $TMP_FILE | $GREP_EXE "STATUS =" | $TR_EXE -cd [0-9])
STATUS=${STATUS:-9}
if [ "$STATUS" != "0" ]; then
isqlerr EOSetRights $STATUS
check_exit $STATUS
fi
check_exit 0
</pre></code>
</html>
<html>
<code><pre>
#!/bin/ksh
# setRORights.ksh -- Sets read only rights on all user tables in a database to
# the role READ_ONLY_ROLE.
# Author: Bernd Ihmels, CS Consulting AG
PROG=$(/bin/basename $0)
# Check Sybase environment variable and initialize dba environment.
SYBASE=${SYBASE:?"Undefined environment variable SYBASE"}
DBA_FILE=$SYBASE/dba/dba.init
if [ ! -r $DBA_FILE ]; then
echo "`date` <$PROG>: Can not read file $DBA_FILE!"
exit 1
fi
. $DBA_FILE
# Settings for the database login.
SYB_CONF=~/scripts/.cfg/sauser.cfg
SYB_USER=sa_murex
SYB_SERVER=$($AWK_EXE -F: '!/#/{print $1}' $SYB_CONF)
# Define the isql command.
ISQL=$SYBASE/$SYBASE_OCS/bin/isql
# Define some other commands
GREP_EXE=/bin/grep
TAIL_EXE=/bin/tail
TR_EXE=/bin/tr
# Set owner of tables.
OWNER=MUREXDB
display_help()
{
# display_help -- Generates a help message on stdout and exit.
echo "\nUsage: $PROG -s(erver) <ASEname> -d(b) <DBname>"
echo " [-o(wner) <Username>] [-h(elp)]"
echo "\n\n $PROG -- Set read only rights for role READ_ONLY_ROLE on"
echo " all user tables in database <DBname> on server <ASEname>. The role"
echo " has to exist already in the server. The current owner of the"
echo " database is set to MUREXDB as default. This can be changed using"
echo " the option -o|-owner <Username>\n".
return 0
}
isqlerr()
{
if [ $# -ne 2 ]; then
error "Function isqlerr needs two arguments!"
error "Usage: isqlerr <Here document name> <Error status>"
exit
fi
error "Isql $1 terminated with the error $2"
${CAT_EXE} ${TMP_FILE} >> ${LOG_FILE}
}
# Short notice, where to find the status of this script.
echo "$(date): See log file $LOG_FILE for status and error messages."
typeset -LZ1 char
while [ $# -ne 0 ]; do
case $1 in
(-h|-help) # Display help message
display_help
check_exit 0;;
(-s|-server) # Database can be found in this ASE.
shift
# Display help if no argument was given.
char=$1
if [ $# -eq 0 ] || [ $char = "-" ]; then
error "No server name found!"
check_exit 1
fi
ASE=$1
shift;;
(-d|-db) # Name of the database.
shift
# Display help if no argument was given.
char=$1
if [ $# -eq 0 ] || [ $char = "-" ]; then
error "No database name found!"
check_exit 1
fi
DB=$1
shift;;
(-o|-owner) # Current owner of database objects.
shift
# Display help if no argument was given.
char=$1
if [ $# -eq 0 ] || [ $char = "-" ]; then
error "No user name found!"
check_exit 1
fi
OWNER=$1
shift;;
(*) error "$0: Unknown option $1!"
display_help
check_exit 1;;
esac
done
# Check, if the ASE name we got is listed in $SYB_CONF.
if [ $ASE ]; then
echo $SYB_SERVER | egrep -s $ASE
if [ $? -ne 0 ]; then
error "ASE $ASE not found in $SYB_CONF!"
check_exit 2
fi
SYB_SERVER=$ASE
else
error "No ASE name given!"
check_exit 2
fi
# Check, if we got a database name.
if [[ -z $DB ]]; then
error "No database name given!"
check_exit 3
fi
# Get password from $SYB_CONF for the ASE.
SYB_PASSWD=$($AWK_EXE -F: '$1 == "'$SYB_SERVER'" {print $2}' $SYB_CONF)
if [[ -z $SYB_PASSWD ]]; then
error "Can not find password for server $SYB_SERVER in $SYB_CONF!"
check_exit 4
fi
$ISQL -S$SYB_SERVER -D$DB -U$SYB_USER -w200 <<-EOSetRights > $TMP_FILE
$SYB_PASSWD
set nocount on
go
set flushmessage on
go
-- Check if role READ_ONLY_ROLE exists in ASE.
declare @role_name varchar(32)
select @role_name = name from master..syssrvroles
where name = "READ_ONLY_ROLE"
if @@rowcount != 1
begin
print "No role 'READ_ONLY_ROLE' exists in this ASE! Stop execution."
print "STATUS = 1"
end
go
declare @lines int, @status int
select name into #table_list from sysobjects where type in ('U', 'V') and name not like 'sys%'
select @status = @@error, @lines = @@rowcount
if @status != 0
begin
print "Could not create table #table_list"
print "STATUS = 2"
end
if @lines = 0
begin
print "No tables defined in database!?"
print "STATUS = 3"
end
go
declare @tablename varchar(32), @owner varchar(32)
select @owner = "${OWNER}"
while 1=1 -- Endless loop
begin
set rowcount 1
select @tablename = name from #table_list
if @@rowcount = 0 break
set rowcount 0
exec('grant select on ' + @owner + '.' + @tablename +
' to READ_ONLY_ROLE')
if @@error != 0
begin
print "Can not grant select rights on table %1!", @tablename
print "STATUS = 4"
select syb_quit()
end
delete from #table_list where name = @tablename
if @@error != 0
begin
print "Problems deleting %1! from #table_list", @tablename
print "STATUS = 5"
select syb_quit()
end
end
go
print "STATUS = 0"
go
quit
EOSetRights
STATUS=$($TAIL_EXE -3 $TMP_FILE | $GREP_EXE "STATUS =" | $TR_EXE -cd [0-9])
STATUS=${STATUS:-9}
if [ "$STATUS" != "0" ]; then
isqlerr EOSetRights $STATUS
check_exit $STATUS
fi
check_exit 0
</pre></code>
</html>
<html>
<ul>
<li> <code>echo $date | awk -F"\" '{ print $2 }' </code></li>
<br />
<li><code>for i in $(seq 1 10); do touch ${i}_file; done </code>
<br />
alternativ: <br />
<code>for i in {1..10}; do touch ${i}_file; done </code>
<br />
alternativ: <br />
<code>for i in {1..10..2}; do touch ${i}_file; done </code> // in Zweier-Schritte</li>
<br />
<li>Addition:<br />
<code>n=0;<br />
for i in $(seq 1 10); do no=`expr ${no} + 1`; touch ${no}_file; done </code></li>
<br />
</ul>
</html>
<html>
<pre><code>
#/bin/bash
set -x # "xtrace" - Print commands just before execution -
with all expansions and substitutions done,
and words marked - useful for debugging.
ORACLE_JAVA=/opt/Oracle_Java/current_java # Variablenzuweisung
cd /usr/local/src/DomainMathIDE
echo $ORACLE_JAVA
$ORACLE_JAVA/bin/java -jar ./DomainMathIDE.jar
</code></pre>
</html>
<html>
<p>
<img src="./pictures/ShortCuts_Accelerators.png" alt="Accelerators">
<img src="./pictures/ShortCut_Navigation.png" alt="Navigation">
<img src="./pictures/ShortCuts_Display.png" alt="Display">
<img src="./pictures/ShortCuts_NumericalCells.png" alt="Numerical cells">
</p>
</html>
<html>
<h3>Links:</h3>
<a href="https://de.wikipedia.org/wiki/Zwei-Faktor-Authentisierung" target=_blank>Wikipedia</a><br />
<a href="https://www.pcwelt.de/ratgeber/Wichtige_Dienste_per_Zwei-Faktor-Authentifizierung_schuetzen-Sicherheit-8679969.html" target=_blank>PC-Welt :: </a><br />
<a href="https://www.heise.de/security/meldung/Amnesty-Hacker-hebeln-automatisiert-2-Faktor-Authentifizierung-aus-4257453.html" target=_blank>Heise :: </a><br />
<a href="https://www.pc-magazin.de/ratgeber/2-faktor-authentifizierung-google-paypal-facebook-app-sicherheit-3195485.html" target=_blank>PC-Magazin :: </a><br />
<a href="https://www.sciebo.de/anleitung/2-faktor.html" target=_blank>Sciebo :: </a><br />
<a href="https://www.com-magazin.de/praxis/sicherheit/sicherer-login-2-faktor-authentifizierung-743082.html" target=_blank></a><br />
<a href="https://t3n.de/news/zwei-faktor-authentifizierung-google-facebook-dropbox-paypal-twitter-531483/" target=_blank></a><br />
<a href="https://www.datenschutz-praxis.de/fachartikel/3-faktor-authentifizierung-macht-das-wirklich-sinn/" target=_blank></a><br />
<a href="https://www.mcs.sophos.com/produkte/zwei-faktor-authentifizierung/" target=_blank></a><br />
<a href="http://www.linux-community.de/ausgaben/linuxuser/2014/08/praktikable-zwei-faktor-authentifizierung-fuer-linux/" target=_blank></a><br />
<a href="https://www.secsign.com/de/entwickler/unix-pam/linux-login-tutorial-zwei-faktor-authentifizierung/" target=_blank></a><br />
<a href="https://linuxnews.de/2018/05/firefox-60-2-faktor-authentifizierung/" target=_blank></a><br />
<a href="https://www.thomas-krenn.com/de/wiki/SSH-Login_mit_2-Faktor-Authentifizierung_absichern" target=_blank></a><br />
<a href="https://www.karsten-thomas.de/2015/07/07/ssh-mit-2-faktor-authentifizierung/" target=_blank></a><br />
<a href="" target=_blank></a><br />
<a href="" target=_blank></a><br />
<a href="" target=_blank></a><br />
</html>
<html>
<code>
vi -O# file1 file2 ... file#<br>
</code>
<br>
Option -O (gross Oh)<br>
<br><code>
z. B. vi -O2 file1 file2 --> die beiden Files werden nebeneinander dargestellt<br>
</code><br>
?? Wie schalte ich zwischen den beiden hin und her ??<br>
--> mittels Ctrl-W<br>
</html>
<html>
<ul>
<li>Wer kennt sie nicht, diese peinliche Stille beim Smalltalk, die sich anfühlt, wie eine Ewigkeit. Damit dir das in Zukunft nicht mehr passiert, verraten wir dir sieben absolute Pro-Tipps, mit denen du beim nächsten Gespräch glänzen kannst;
</li>
<li>Smalltalk-Tipps: So verhinderst du die unangenehme Stille beim Gespräch
Egal ob am Arbeitsplatz, in der Uni oder auf dem Date: Smalltalk spielt immer eine Rolle, wenn es darum geht, neue Menschen kennenzulernen. Dass diese Art von Gespräch nicht unbedingt zu der beliebtesten Art der Kommunikation zählt, ist kein Geheimnis. Man sucht verzweifelt nach Gesprächsthemen und hat plötzlich das Gefühl, man hätte noch nie im Leben eine normale Unterhaltung geführt. Letzten Endes führt das dazu, dass man einander anschweigt und versucht, so schnell wie möglich dieser unangenehmen Situation zu entfliehen – kommt dir das bekannt vor? Wenn ja, dann lass dir gesagt sein: Das hat nun ein Ende! Wir verraten dir hilfreiche Do’s und Dont’s rund um das Thema Smalltalk und geben dir ein paar Eisbrecher an die Hand, mit denen du das nächste Mal perfekt gewappnet bist.
Mehr lesen
Gehaltsverhandlung – aber wie? Mit diesen 7 Tipps gehst du das Thema Bezahlung am besten an
Von Francesca Murdaca
Gehaltsverhandlung: 7 Tipps für ein erfolgreiches Gespräch
Smalltalk: Warum hassen wir ihn eigentlich so sehr?
Hast du dich schonmal gefragt, warum das Thema Smalltalk überhaupt so unbeliebt ist? Eigentlich beschreibt es nur das kurze, seichte Gespräch mit neuen Menschen, bei dem man sich oberflächlich kennenlernen und gleichzeitig über Gott und die Welt sprechen kann – warum gehen wir dem dann so aus dem Weg?
Für die meisten Menschen spielt besonders ein Aspekt dabei eine große Rolle: die Angst vor Ablehnung. Was, wenn ich bei ihm/ihr nicht gut ankomme oder mich blamiere? Man möchte ja schließlich weder langweilig, noch aufdringlich erscheinen und dem Gegenüber damit einen komischen Eindruck von sich vermitteln. Im Idealfall wollen wir natürlich, dass ein harmonisches Gespräch zustande kommt und wir uns dabei nicht zum Affen machen.
Damit tun sich introvertierte Menschen allerdings ziemlich schwer. Gedanken wie “Was denkt er/sie nur von mir?” oder “Was habe ich denn da gerade von mir gegeben?” erschweren den Smalltalk ungemein und haben meistens genau das zur Folge, wovor sich die Meisten fürchten: die unangenehme Stille.
Mehr lesen
“Cave-Syndrom”: Zurück zur (Vor-Corona-)Normalität – für dich undenkbar? Das könnte der Grund sein
Von Melanie Paukner
Cave Syndrom
Smalltalk Tipps: Mit diesen 7 Tipps meisterst du jedes Gespräch
Jeder Mensch kann zum Smalltalk-Profi werden, wenn er ein paar einfache Dinge beachtet. Wir verraten dir sieben Tipps, die dir dabei helfen, das nächste lockere Gespräch so angenehm wie möglich zu gestalten.
1. Spring über deinen Schatten
Auch wenn es dir unfassbar schwerfällt, auf jemanden zuzugehen und ihn/sie anzusprechen: just do it! Du weißt nie, was für interessante Geschichte hinter den einzelnen Menschen stecken und was sie zu erzählen haben. Ansonsten wirst du dich im Nachhinein ständig fragen, was wohl passiert wäre, wärst du über deinen eigenen Schatten gesprungen, denn wer weiß? Vielleicht handelt es sich dabei um eine ganz besondere Freundschaft oder sogar mehr, die dir dabei entgeht. Also, trau dich und denk immer daran: Wir bereuen immer nur die Dinge, die wir nicht getan haben, weil wir uns nicht getraut haben.
2. Ein Lächeln hat noch niemandem geschadet
Eine freundliche Ausstrahlung ist das A und O beim Smalltalk. Wenn du dabei weder interessiert noch aufmerksam erscheinst, wird euer Gespräch ein jähes Ende finden. Du erzählst deinem Gegenüber schließlich auch ungern von deiner letzten Spanien Reise, wenn er/sie dabei ständig aufs Handy schaut und kaum auf dich reagiert. Ein nettes Lächeln, ein offener Blick in die Augen und eine aufmerksame Haltung kann wahre Wunder bewirken und entlocken deiner:m Gesprächspartner:in garantiert auch mehr Geschichten und spannende Details.
3. Bohre nicht zu tief
Es gibt Dinge, die willst du nicht jeder Person offen legen. Genau so gilt das für andere Menschen, denen du beim Smalltalk begegnest. Solltet ihr bei eurem Gespräch über ein ihm/ihr unangenehmes Thema stolpern, nimm dich etwas zurück und frag nicht weiter nach. Ansonsten löst du bei deinem:r Gesprächspartner:in vielleicht ein ungutes Gefühl aus und er/sie wird versuchen, euren Austausch zu verlassen. Das ist nicht nur ihm/ihr sehr unangenehm, sondern auch dir.
Mehr lesen
Gym-Knigge: 10 Verhaltensweisen im Fitnessstudio, die dafür sorgen, dass alle eine gute Zeit beim Sport haben
Von Anna Bader und Allegra Isert
No Gos im Gym
4. Finde eine Gemeinsamkeit
Wann verstehen wir uns besonders gut mit Anderen? Wenn uns eine Gemeinsamkeit verbindet! Das kann alles Mögliche sein, von der tiefen Leidenschaft für eine bestimmte Serie bis hin zur grundlegenden Abneigung gegen eine spezielle Mahlzeit – je seltener, desto besser. Das bietet die perfekte Grundlage für ein spannendes Gespräch, das euch beiden super einfach von der Hand geht und euch garantiert im Gedächtnis bleiben wird.
5. Gehe auf dein Gegenüber ein
Kennst du das? Du erzählst jemandem von deinen aktuellen Problemen und die Antwort deines Gegenübers beginnt mit den Worten: “Also mir geht es aktuell richtig gut, weil …”. Er/sie geht überhaupt nicht auf das Gesagt ein und kann es kaum abwarten, wieder von sich zu sprechen – kein gerade angenehmes Gespräch. Genau deswegen ist es beim Smalltalk so wichtig, dem:r Anderen zuzuhören, Rückfragen zu stellen und damit Interesse und Empathie zu signalisieren.
6. Keine Panik vor Gesprächspausen
Auch, wenn die Stille genau das ist, was wir beim Smalltalk so gerne vermeiden wollen, müssen wir trotzdem lernen, diese zu akzeptieren und auszuhalten, ohne direkt in Panik zu verfallen. Anstatt hektisch nach einem neuen Gesprächsthema zu suchen und schließlich mit dem erstbesten herauszuplatzen, überlege in Ruhe, was dich noch an der anderen Person interessieren könnte oder greif ein Detail aus dem bisherigen Gespräch auf.
7. Stelle offene Fragen
Je nachdem, wie gesprächig dein Gegenüber bei eurem Smalltalk ist, kann es ein cleveres Hilfsmittel sein, ihm:ihr mit offenen Fragen zu begegnen. Das bedeutet: Vermeide Fragen, die mit Ja oder Nein beantwortet werden können und formuliere sie lieber so, dass er/sie etwas weiter ausholen muss. Das kannst du dir bereits im Vorhinein überlegen und dir entsprechende Fragen zurechtzulegen. Anstatt einfach zu fragen, ob eine Person Sport macht, formuliere dein Anliegen lieber etwas anders: “Mit welcher Sportart beschäftigst du dich in deiner Freizeit?”.
Mehr lesen
5 Smalltalk-Fakten zur ersten Reise mit Baby Archie
Von Glamour.de
Meghan Markle, Prinz Harry, Afrika
Smalltalk Fehler: Darauf solltest du bei deinem Gespräch unbedingt verzichten
Selbstverständlich gibt es auch Dinge, die beim Smalltalk überhaupt nicht gehen und eher einen gegenteiligen Effekt als den eigentlich gewünschten erzielen. Welche No-Gos es gibt, erklären wir dir hier.
1. Versuche nicht zu überinterpretieren
Tu dir selbst einen Gefallen und versuche nicht jede Mimik, Gestik oder Aussage deines Gegenübers ins tiefste Detail zu analysieren. Im Regelfall kennst du diese Person noch nicht besonders lange und bist daher auch nicht mit der Art und Weise, wie er:sie sich verhält, vertraut. Wenn du dir zu viele Gedanken darüber machst, verhältst du dich nicht mehr natürlich und bist nicht mehr du selbst. Konzentriere dich auf euer Gespräch und versuch dabei ganz locker und entspannt zu bleiben.
2. Halte nicht zu lange am selben Thema fest
An einem gewissen Punkt müssen wir beim Smalltalk anerkennen, dass es Zeit wird, einen Themenwechsel vorzunehmen. Natürlich sollst du dafür keine Stoppuhr bereithalten, um die Zeit für jedes Thema zu messen. Allerdings kannst du darauf achten, wann der Gesprächsfluss so langsam abnimmt und ihr euch im Kreis dreht. Ist es so weit, solltest du versuchen, das Gespräch inhaltlich anders zu gestalten und dich nicht zu lange mit dem ursprünglichen Thema aufzuhalten.
3. Vermeide unangenehme, zu persönliche Themen
“Sag mal, was ist eigentlich deine liebste Sexstellung?” – eine Frage, die beim ersten Smalltalk vielleicht nicht immer angebracht ist. Es gibt gewisse Themenbereiche, die für ein seichtes, lockeres Gespräch ungeeignet sind und deshalb fürs Erste umschifft werden sollten. Intime Fragen zum Privatleben oder auch Lästereien zählen zu den absoluten Tabuthemen, die nichts beim Smalltalk zu suchen haben.
4. Rede dein Gegenüber nicht tot
Genau so, wie du deinen Gesprächspartner nicht anschweigen solltest, ist auch ununterbrochenes Reden ein absolutes No-Go. Natürlich ist es toll, dass du so viel zu erzählen hast und auch alles andere als verwerflich. Allerdings gibt es in der Kommunikation immer mindestens zwei Personen. Der Redeanteil sollte, so gut es geht, ausgeglichen sein, sodass keine:r den:die Andere an die Wand quasselt.
Mehr lesen
Sexistische Sprache: Diese Umfrage zeigt, wie viele von uns sie verwenden – ohne es zu merken
Von Hannah Madlener
Junge Frau spricht mit jungem Mann
Smalltalk Eisbrecher: 9 Einstiegsfragen, die immer gehen
“Und worüber soll ich beim Smalltalk jetzt tatsächlich reden?” – keine Sorge, wir geben dir sieben Beispielfragen, die die perfekte Grundlage für jedes kurzweilige Gespräch bieten.
Was machst du beruflich?
Wohin geht deine nächste Reise?
Welche Haustiere hast du oder welche hättest du gerne?
Welche Hobbys hast du?
Welcher Ort auf der Welt hat dich bisher am meisten begeistert?
Was isst du am liebsten?
Welchen guten Film oder welche Serie hast du in letzter Zeit gesehen?
Woher kennst du den:die Gastgeber:in der Party?
Was hast du letztes Wochenende so gemacht?
</li>
<li>
</li>
<li>
</li>
<li>
</li>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>[1] <a href="https://www.glamour.de/artikel/smalltalk-tipps"
target="_blank" rel="noreferrer noopener">
Glamour :: Smalltalk-Einmaleins gefällig? <br />
  Wir verraten dir, wie du das Eis am besten brichst <br />
  und welche Fehler du unbedingt vermeiden solltest</a>
</li>
<li>[2] <a href="https://utopia.de/ratgeber/du-findest-small-talk-unangenehm-dieser-einfache-trick-hilf-dir_797050/"
target="_blank" rel="noreferrer noopener">
Utopia :: Du findest Small Talk unangenehm? Dieser einfache Trick hilft dir</a>
</li>
<!--
<li>[3] <a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li>[4] <a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>objektorientierte Programmiersprache
</li>
- "send a message":
instead of saying "call an operation" or "invoke a method";
this reflects the idea that objects are responsible for their own actions;
you never tell an object what to do -- instead you politely ask it to do
something by sending it a message. The object, not you, selects
the appropriate method for responding to your message;
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Smalltalk_(Programmiersprache)"
target="_blank" rel="noreferrer noopener">
Wikipedia :: Smalltalk</a>
</li>
</ul>
</html>
<html>
During these times of tight budgets. It is hard to<br />
convince the boss to pay for a class or conference. <br />
When being quoted for a new system ask the <br />
vendor to toss in some education classes into the <br />
price of the quote.<br />
<br />
There are 2 benefits to this:<br />
<br />
1) Education in most IT organizations comes out of<br />
a different budget so you are saving the company money<br />
since that you don't need to use the funds from that pool<br />
of money.<br />
<br />
2) If you need to negotiate the price of the quote or tell<br />
the vendor you are taking it to bid against a competitor;<br />
educational classes are like dessert at a restaurant. They<br />
sometimes can toss it in for free to keep your business.<br />
<br />
But either way, the goal is to get the classes <br />
on the quote!<br />
</html>
<html>
<p>
Ein kleiner Wissenstest: Wie lange dauert es, bis eine Hypothek bei einem Prozent anfänglicher Tilgung vollständig zurückgezahlt ist? Bei einem einzigen Prozent. 20 Jahre? 40 Jahre? 60 oder gar 100 Jahre? Die richtige Antwort ist die Standardantwort jeder juristischen Prüfung: Es kommt drauf an.
</p>
<p>
Tatsächlich: Die Tilgung kann bei diesem einen einzigen Prozent 70, 40 oder auch nur gut 24 Jahre dauern. Es kommt allein auf den Zins an. Ist der Zins richtig hoch, beträgt er zum Beispiel 10 Prozent, ist die Tilgung in 24 Jahren faktisch erledigt. Ist der Zins dagegen extrem niedrig, zieht sich der Abbau der Schulden sehr lange hin. Bei einem Prozent Zins dauert es geschlagene 70 Jahre, bis die letzte Rate gezahlt ist.
</p>
<p>
Die Ursache dafür hängt mit der konstanten Rate zusammen: Je niedriger der Zins, desto weniger Geld wird innerhalb der Rate durch jeden bereits getilgten Euro für weitere Tilgung freigesetzt. Die Finanzmathematik kann heimtückisch sein: …
</p>
<h4>Link:</h4>
<a href="https://www.welt.de/finanzen/immobilien/plus180607156/Immobiliendarlehen-Darauf-sollten-Sie-bei-Tilgung-und-Zins-achten.html" target=_blank>Welt :: So entkommen Sie der Zinsfalle beim Hauskredit</a>
</html>
<html>
<ul>
<li>
</li>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://jfrog.com/devops-tools/article/what-is-a-software-artifact/"
target="_blank" rel="noreferrer noopener">
JFrog :: What is a Software Artifact?</a>
</li>
<li><a href="https://simplicable.com/IT/it-artifact"
target="_blank" rel="noreferrer noopener">
Simplicable :: 57 examples of an IT artefact</a>
</li>
<li><a href="https://en.wikipedia.org/wiki/Artifact_(software_development)"
target="_blank" rel="noreferrer noopener">
Wikipedia :: Artifact </a>
</li>
<li><a href="https://techfruit.com/focus/what-is-a-software-artifact-and-why-developers-use-it/"
target="_blank" rel="noreferrer noopener">
Techfruit :: What is a software artifact and why developers use it</a>
</li>
<li><a href="https://www.leanix.net/en/wiki/trm/software-artifacts"
target="_blank" rel="noreferrer noopener">
SAP LeanIX :: What is a software artifact? </a>
</li>
<li><a href="https://www.techtarget.com/searchsoftwarequality/definition/artifact-software-development"
target="_blank" rel="noreferrer noopener">
TechTarget :: artifact (software development) </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<h1>Sechs Monate Zeit, dann muss das Ding stehen!</h1>
<h3>Nur wie geht man an die Sache heran?</h3>
Wie löse ich ein zu Beginn unkonkretes Problem die-<br />
ser Größe und Komplexität und das auch noch mittels<br />
wissenschaftlicher Methoden? Und dann das typische <br />
Studierenden‐Problem: Prokrastinieren ‐ im Volks-<br />
mund auch "Aufschieberitis" genannt.<br />
<br />
[ … ]<br />
<br />
Meine Idee: Die Arbeit einfach agil "schreiben"!<br />
Wenn Konezpte wie Scrum oder Kanban in der Ent-<br />
wicklung von Software oder sonstigen Projekten<br />
eingesetzt werden kann, dann wird das auch bei<br />
der Masterarbeit funktionieren.<br />
<h3>Kein Plan, aber Ziele</h3>
Als erstes muss die Planung und Arbeitsweise ge-<br />
klärt werden. Eine langfristige, detaillierte <br />
Planung macht bei einem Problem dieser Form kei-<br />
nen Sinn. Aus diesem Grund hatte ich mir grobe <br />
Ziele gesetzt. Beispielsweise, dass nach drei <br />
Monaten das Konzept stehen muss, damit genügend <br />
Zeit für die Evaluation mittels Interviews bleibt.<br />
<h3>Mit Scrum und Kanban rein in die Sprints</h3>
Innerhalb des groben Plans habe ich mich dann an <br />
klassischen Konzepten aus Scrum und Kanban be-<br />
dient:<br />
<ul>
<li>In Sprints von drei Wochen arbeiten,
</li>
<li>pro Sprint Ziele definieren,
</li>
<li>auf Grundlage der Ziele Arbeitspakete ableiten
</li>
<li>und diese grob anhand ihres Aufwands schätzen.
</li>
</ul>
[ … ]<br />
<br />
Zur Organisation der Arbeitspakete habe ich ein <br />
Kanban-Board verwendet und es direkt über den<br />
Schreibtisch gehängt.<br />
<br />
Auf diesem waren neben den bekannten Kategorien <br />
wie ToDo, In Progress, In Review und Done auch <br />
die Sprintziele und die Frist des aktuellen <br />
Sprints erfasst.<br />
<h3>Am Ende zählt die Seitenzahl!</h3>
<br />
[ … ]<br />
<br />
Genau dieses "Auf die lange Bank schieben", führt<br />
dazu, dass man am Ende in Zeitnot gerät.<br />
<br />
[ … ]<br />
<br />
Aus diesem Grund habe ich mich am Vorgehen, wie es<br />
im agile Requirements Engineering gelebt wird, orien-<br />
tiert. Es wird nur genau das beschrieben und analy-<br />
siert, was für den nächsten Schritt wirklich notwen-<br />
dig ist. Das heißt genau immer den Theorieblock <br />
schreiben, der für den spezifischen Teil des Konezpts<br />
oder Auswertung notwendig ist. Das ermöglicht, dass <br />
man kontinuierich Seiten liefert [...].<br />
<br />
[ … ]<br />
<br />
Auch wenn die Arbeitspakete im Sprint schon recht <br />
klein waren, war es zum Teil trotzdem schwierig,<br />
den Aufwand richtig zu schätzen oder es kamen master-<br />
arbeitsfremde Themen dazu. Dadurch konnte ich einige <br />
Sprintziele nicht zu 100% erfüllen. Scrum hat für <br />
diesen Fall eigene Regeln, bei mir hat es lediglich<br />
dazu geführt, dass ich das Arbeitspaket in den <br />
nächsten Spring geschoben habe.<br />
<h3>Fazit</h3>
Zusammenfassend lässt sich jedoch sagen, dass das<br />
Verwenden der Sprints, Sprintziele und des Kaban <br />
Boards viel Struktur, Fokus und Routine in die Ar-<br />
beit reingebracht hat. Man hat [ … ] kleine Ziele <br />
vor Augen [ … ], die leichter erreichbar sind und<br />
auf die man gut zuarbeiten kann. Das kann auch be-<br />
sonders hilfreich sein, um dem Prokrastinieren <br />
entgegenzuwirken!<br />
<h3>Links:</h3>
<ul>
<li>OOSE Innovative Informatik eG, Hamburg, www.oose.de
</li>
<li><a href="https://agile-coach.de/"
target="_blank" rel="noreferrer noopener">
Robert Wiechman :: Wertstiftende Beratung & Coaching</a><br />
Buch: <a href="https://scrum-in-der-praxis.de/"
target="_blank" rel="noreferrer noopener">
3. Auflage <em>Scrum in der Praxis</em>, 3. Auflage</a>
</li>
<li><a href="https://www.wertstiftender-agile-coach.de/"
target="_blank" rel="noreferrer noopener">
oose :: Ausbildung zum “Wertstiftenden Agile Coach“</a>
</li>
</ul>
</html>
<html>
<b>Drucker eintragen in:</b> /etc/printers.conf<br />
<br />
<b>Status anzeigen:</b> lpstat ‐t<br />
<br />
<b>Prüfen ob das Printsystem läuft:</b><br />
svcs application/print/server<br />
oder<br />
lpstat ‐r<br />
<br />
z.B. {21} >sudo svcs application/print/server<br />
STATE STIME FMRI<br />
disabled Apr_21 svc:/application/print/server:default<br />
<br />
<b>Printsystem starten:</b><br />
svcadm enable application/print/server<br />
oder<br />
/usr/lib/lpsched<br />
<br />
<b>Printsystem stoppen:</b><br />
svcadm disable application/print/server<br />
oder <br />
/usr/lib/lpshut<br />
</html>
<html>
During a session, sometimes we have a need to change <br />
the system time for our session only. We have used it to <br />
simulate time based testing. <br />
<code><pre>export TZ=ESThhEDT</pre></code>
The EST set your time to Eastern Standard Time and EDT <br />
is Eastern Daylight Time. <br />
<br />
hh is the number of hours you wish to change. <br />
<br />
<b>Example:</b> <br />
Currently the system date is <b> Tue Jun 19 13:38:03 EDT 2001 </b> <br />
<br />
and you wish to set it to yesterday at the same time. <br />
You would substitute a positive 29 for hh.
<code><pre>export TZ=EST29EDT </pre></code>
Now the shell time is:
<code><pre>Mon Jun 18 13:38:50 EDT 2001 </pre></code>
WHY 29 and not 24? <br />
The main UNIX clock is set from GMT not EST therefore <br />
you have to add 5 hours to your backward calculations <br />
to get the same exact time since EST is GMT - 5 hours. <br />
<br />
Use negative numbers to set the clock into the future. <br />
<br />
Also if you need to set the minutes and seconds it is <br />
<b>hh:mm:ss</b>. These are all the number of hours, minutes and <br />
seconds from GMT that you wish to set. <br />
<br />
This is for Solaris 2.6, your mileage may vary. <br />
</html>
<html>
<ul>
<li>Wenn ich die Solaris-Manpage bzgl. tar-Befehl richtig verstehe,<br />
wird die Option "-j" beim Extrahieren ignoriert, so daß zuerst das<br />
File entzippt und <b><u>erst dann</u></b> ent-tared werden muss. </li>
<br />
<li><h3>Manpage "tar", Option "-j":</h3><br />
s. eMail capgemini - epad<br />
<a href="http://ibgwww.colorado.edu/~lessem/psyc5112/usail/man/solaris/tar.1.html" target=_blank>Solaris :: ManPage - tar (1) </h4>
</li>
</ul>
</html>
<html>
Ever needed to know how many processors you have and what<br />
speed their running at on your Solaris system?<br />
<br />
Just run the command <b>prtdiag</b> from the directory<br />
<br />
/usr/platform/sun4u/sbin.<br />
bzw.<br />
/usr/platform/`uname -i`/sbin<br />
<br />
Add a <b>-v</b> for even more info about<br />
power supply, power/cpu fans etc.<br />
<br />
This tip generously supported<br />
by: litz2@home.com and mct5030@yahoo.com<br />
</html>
<html>
Sort a directory / certain files in a directory
by file size (HP-UX):
<code><pre>
===================== begin script =======================
#!/bin/ksh
# script Ls
# use 1 : Ls
# use 2 : Ls *
if [ -n "$*" ]
then
ls -1 -al $* | sort -nbk5
else
ls -al | sort -nbk5
fi
===================== end script =========================
</pre></code>
<br />
This tip generously supported by:<br />
Marc.VanOosterwyck@vlafo.be<br />
--------------------------------------------------------------------------------------------------
<h3>Alternaive:</h3>
To sort certain files in the directory and to show the biggest file first, do
<code><pre>
$ du -a | sort -n -r | more
</pre></code>
To sort certain files in the directory in numerical order (e.g. dmc filesI):
<code><pre>
$ ls -latr *.dmc | sort -t. -k2 -n
</pre></code>
→ die Optionen bedeuten:<br />
<ul>
<li>-t. :: der Separator ist jetzt der Punkt ".", Default ist Blank</li>
<li>-k2 :: das zweite Feld wird sortiert</li>
<li>-n :: Zahlen werden numerisch, und nicht alphanumerisch</li>
</ul>
</html>
<html>
<ul>
<li>die zu sortierende Liste wird in zwei Teilen geteilt:<br />
<ul>
<li>in einen sortierten Teil / Abschnitt,</li>
<li>und in einen unsortierten Teil / Abschnitt;</li>
</ul></li>
</ul>
</html>
<html>
<ul>
<li>Quicksort ist einer der meist verwendeten Sortieralgorithmen.</li>
<br />
<li>Die Idee beruht auf dem <i>divide&conquer</i>-Prinzip. </li>
<br />
<li>Der Kern des Algorithmus ist die Zerlegung des Feldes (Partition).</li>
</ul>
<h4>Anmerkung:</h4>Mit PDF quicksort_VI.pdf gearbeitet<br />
<img src="./pictures/Quicksort_manuellerDurchgang_01.jpg" />
<br />
<img src="./pictures/Quicksort_manuellerDurchgang_02.jpg" />
<h3>Links:</h3>
<a href="https://www.uni-trier.de/fileadmin/fb4/prof/INF/DEA/Uebungen_LVA-Ankuendigungen/AuD/ss_2011/quicksort_VL.pdf" target=_blank>Uni Trier :: Übungen [Downloaded :: quicksort_VI.pdf]</a><br />
<a href="http://scienceblogs.de/von_bits_und_bytes/2011/10/24/algorithmen-rekursion-und-quicksort/" target=_blank>Scienceblogs :: Algorithmen - Rekursion & Quicksort</a><br />
<a href="https://de.wikipedia.org/wiki/Quicksort" target=_blank>Wikipedia :: Quicksort</a>
</html>
<html>
<b>THIS TIP IS NOT SUPPORT,
UGU ADVICES TESTING BE FOR
USING.</b><br />
<br />
To remove every file in the folder that is not<br />
dated March:
<code><pre>
rm ` ls -al | grep -v "Mar" | awk '{print $9}'`
</pre></code>
Or a specific date in March:
<code><pre>
rm ` ls -al | grep -v "Mar 28" | awk '{print $9}'`
</pre></code>
<h3>Note: </h3>
that this is a dangerous command to issue<br />
since it assumes that you are consciously using it<br />
on a directory which is full of files that are out<br />
of date or not belonging to March or whatever.<br />
<br />
(If this is not the case you might get some undesirable<br />
results.)<br />
<br />
The other thing is that you might want to keep more than<br />
one month's worth of files. You would then need to move<br />
the files from the other month out into a temporary subfolder<br />
while you "clean" the top folder. Then move them back<br />
in. Also, note that you have two types of single quote,<br />
the first and last are from the key under the escape key<br />
and the one that is used to delimit the awk print<br />
statement is the one next to the hash key. I have used this<br />
command myself regularly with a few extra pipes (to do certain<br />
specific things which are irrelevant here) in order to<br />
clean out subdirectories where the df is running at 100%!<br />
This has been a time-saver when I have had to log on to<br />
different servers around the world and do a regular purge.<br />
<br />
<b>THIS TIP IS NOT SUPPORT,
UGU ADVICES TESTING BE FOR
USING.</b>
</html>
One way to speed up the interaction time of
a shell (that does not hash its commands)
that you may overlook is to modify your path.
The order of the directories in your path
should rely on the number of commands you use
most. So /usr/bin or /bin would probably be first.
Very large directorys that are mounted over
the network should be later in the list. If
there are some directories in your path you only
use for one or two commands consider making an
alias or shell script (if your shell doesn't
support aliases) which calls the program with its
full path name.
Watch out when sourcing files, especially when
you're root. It could modify your path and make
you run something detrimental to your system.
Getting into the habit of using full pathnames
is the key here.
This tip generously supported
by: kevin@ti.com
<html>
<ul>
<li><b>Obdachlosenhilfe Hannover e.V. (Ohh e.V.)</b><br />
<br />
<u>Spendenkonto</u><br />
  Hannoversche Volksbank<br />
  IBAN   DE 37 2519 0001 0796 4927 00<br />
  BIC   VOHADE2HXXX<br />
<br />
<a href="https://www.obdachlosenhilfe.org/" target="_blank" rel="noreferrer noopener">Obdachlosenhilfe Hannover ‐ Homepage</a>
</li>
<br />
<li><b>StreetAngel e.V., FFM</b><br />
aus: ZDF Reportage, 2020-10-18</li>
<br />
<li><b><a href="https://www.tierheim-hannover.de/spenden-helfen/spenden/" target=_blank>Tierheim Hannover e.V.</a></b></li>
<br />
<li><b>Notpfote</b></li>
<br />
<li><b>Bienenpatenschaft</b><br />
→ <a href="https://www.clemifreunde.de" target="_blank" rel="noreferrer noopener">Freunde des Clementinenhaus</a> bzw.<a href="https://hannover.deutschland-summt.de/home-hannover.html" target="_blank" rel="noreferrer noopener">Hannover summt e.V.</a><br />
(keine Satzung gefunden)</li>
<br />
</ul>
</html>
<html>
To split a file up for floppies:<br>
<br>
# split -b 1400000<br>
<br>
The filenames will be xaa, xbb, etc.<br>
To restore them:<br>
<br>
# cat x* > original_filename<br>
</html>
<html>
<ul>
<li>Log-, Monitoring- & Reporting-Tool</li>
<br />
<li>macht Maschinendaten für alle Benutzer zu-<br />
gänglich und nutzbar</li>
<br />
<li>ähnlich Nagios / Icinga</li>
<br />
</ul>
</html>
<html>
<ul>
<li>Log-, Monitoring- & Reporting-Tool</li>
<br />
<li>macht Maschinendaten für alle Benutzer zu-<br />
gänglich und nutzbar</li>
<br />
<li>ähnlich Nagios / Icinga</li>
</ul>
<p>
Splunk ist ein Log-, Monitoring- und Reporting-Tool, welches <br />
Maschinendaten für alle Benutzer zugänglich und nutzbar macht.<br />
Es durchsucht Logs, Metriken und weitere Daten von Applikationen,<br />
Servern und Netzwerkgeräten und indiziert sie in ein durchsuchbares<br />
Repository. Dort lassen sich Grafiken, Reports und Warnmeldungen<br />
generieren.</p>
<p>
Es soll Systemadministratoren dabei unterstützen, Störfälle zu<br />
erkennen und zu analysieren. Logdaten verschiedenster Systeme<br />
und Softwarekomponenten können zueinander korreliert werden.
</p>
<p>
Splunk nutzt als Skalierungskonzept MapReduce, um die relevanten<br />
Daten, Ereignisse und Logdateien zu erfassen, zu indexieren und <br />
durchsuchbar zu machen, ähnlich der Technologie, die auch Frame‐<br />
works wie Hadoop einsetzen. Das Tool ist eine horizontal skalierbare<br />
Technologie, mit der Verfügbarkeitskontrolle, Server- und Netzwerk‐<br />
Management, E-Mail-Administration, Transaktionsmanagement und<br />
Informationssicherheit/-Compliance unterstützt wird. Der Begriff „Splunk“<br />
bezieht sich auf die „Datenanalyse“ von unbekannten und unstruk‐<br />
turierten Informationen in Anlehnung an den englischen Begriff „spelunking“<br />
(Höhlenforschung). </p>
<h3>Link:</h3>
<a href="https://de.wikipedia.org/wiki/Splunk" target=_blank>Wikipedia :: Splunk</a>
</html>
<html>
Splunk supports three types of authentication:
<ul>
<li> Native Authentication, </li>
<li> LDAP </li>
and
<li>Scripted Authentication API.</li>
</ul>
For most part, Native Authentication is referred as Splunk<br />
authentication, which takes high priority over any external<br />
authentication.<br />
<br />
So, if an user exists in both Splunk native authentication<br />
and LDAP, Splunk will use the user in the native authentication.<br />
<br />
Typically, you'll create an user, and then assign the user<br />
to a role. This is called role-based access control system.<br />
You can do this either using Splunk CLI or from Splunk Web.<br />
<br />
Few things to keep in mind about username and role created in native authentication:
<ul>
<li>Both username and role cannot contain space, colons, or forward slashes</li>
<li>Username are case-insensitive. So, both „ohndoe“ and „JohnDoe“ are the same user.</li>
<li>Role name is lowercase only</li>
<li>You can create a new user and assign to an existing role. Or, you can create a new role and assign to an existing user. So, users are assigned to role</li>
<li>Role has capabilities. Capabilities defines the actions that are available to roles</li>
</ul>
This tutorial explains how to create and manage Splunk users and roles.
<h2>I. User Management using Splunk CLI</h2>
<h3>1. Add User using Splunk CLI</h3>
Use splunk add user command as shown below to add a new user.
<code><pre>
# splunk add user ramesh -role Admin -password rameshpassword -full-name "Ramesh Natarajan"
User added.
</pre></code>
In the above:
<ul>
<li>splunk ‐ This is the splunk cli command</li>
<li>add user ‐ This indicates that we are adding a new user. Give the name of the username following this. In this example, the username is ramesh</li>
<li>-role ‐ This option indicates the role the user will be assigned to. In this example, we are assigning ramesh to Admin role</li>
<li>-password ‐ Specify the password for this new user</li>
<li>-full-name ‐ Specify the full name of the user</li>
</ul>
If the given role doesn't exist, you'll get an error as shown below.
# splunk add user jason -role ReadOnly -password jasonpassword -full-name "Jason Bourne"
Error creating user. role="ReadOnly" does not exist
<h3>2. List All Users using Splunk CLI</h3>
Use splunk list user command as shown below to get a list of all available users in your system.
<code><pre>
# splunk list user
username: admin
full-name: Administrator
role: admin
username: ramesh
full-name: Ramesh Natarajan
role: admin
</pre></code>
<h3>3. Edit an Existing User using Splunk CLI</h3>
Use splunk edit user command as shown below to edit the details of an existing user. In the following command, we are changing the full-name of the given user.
# splunk edit user ramesh -full-name "Ramesh N"
User ramesh edited.
After editing, make sure the changes are reflected using splunk list user.
<code><pre>
# splunk list user
username: admin
full-name: Administrator
role: admin
username: ramesh
full-name: Ramesh N
role: admin
</pre></code>
<h3>4. Delete User using Splunk CLI</h3>
Let us quickly add an user and then delete it.
# splunk add user jason -role Power -password jasonpassword -full-name "Jason Bourne"
Use splunk remove user command as shown below to delete the given user from splunk native authentication.
# splunk remove user jason
User removed.
If the given user doesn't exist, you'll get the following non-existent error message.
# splunk remove user jason1
In handler 'users': Could not get info for non-existent user="jason1"
<h3>5. Assign a different Role to an User</h3>
Use splunk edit user command with -role option as shown below to assign an existing user to a different role.
Initially, when we created ramesh, we assigned Admin role. The following will reassign ramesh to Power role.
# splunk edit user ramesh -role Power
User ramesh edited.
Verify that the role is changed for the user.
<code><pre>
# splunk list user
username: admin
full-name: Administrator
role: admin
username: ramesh
full-name: Ramesh Natarajan
role: power
</pre></code>
<h1>II. Role Management using Splunk CLI</h1>
<h3>6. List Current Roles using Splunk CLI</h3>
Splunk comes with the following roles:
<ul>
<li>admin ‐ Full administrator access</li>
<li>power ‐ One level down from admin. You can edit shared objects, alerts, tag events, etc.</li>
<li>user ‐ Assign this for typical splunk user who can run searches, edit own saved searches, etc.</li>
<li>can_delete ‐ Allows user to delete by keyword.</li>
</ul>
Use splunk list role command as shown below to display all available roles in your system.
As you see from the following output, it will also display the capabilities that are currently associated with the role.
<code><pre>
# splunk list role
role: admin
capabilities: accelerate_datamodel admin_all_objects ...
default app:
grantable_roles:
imported_capabilities: accelerate_search change_own_password ..
imported_roles: power user
searchable_indexes: * _*
default_index: main os
role: can_delete
capabilities: delete_by_keyword dispatch_rest_to_indexers schedule_rtsearch
..
role: power
capabilities: edit_sourcetypes embed_report rtsearch schedule_search search_process_config_refresh
..
role: splunk-system-role
capabilities:
..
role: user
capabilities: accelerate_search change_own_password ..
..
</pre></code>
Note: The above output is truncated for better readability
<h3>7. Add Role using Splunk CLI (Not Possible)</h3>
Using splunk CLI command, you cannot add a new role.
However, you can add a new role using REST API.
Few reference links for you to explore this further:
<ul>
<li><a href="https://docs.splunk.com/Documentation/Splunk/6.6.2/RESTREF/RESTaccess" target=_blank>REST API Reference Manual</a></li>
<li><a href="https://www.splunk.com/blog/2009/12/10/poke-at-our-api.html" target=_blank>splunk _internal call tool</a></li>
</ul>
<h3>8. Delete Role using Splunk CLI</h3>
Use splunk remove role command as shown below to remove an existing role.
<code><pre>
# splunk remove role splunkreadonly
Role removed.
</pre></code>
<h1>III. User Management using Splunk Web</h1>
<h3>9. List All users from Console</h3>
To view all the users from the console, login to splunk web -> Click on Settings, which will display the following setting menu.
Under Users and Authentication section at the bottom, click on “Access Controls“ link:<br />
<br />
<img src="./pictures/splunk-1-settings-menu.png" width=550 height=493 title="Splunk Settings Menu"/><br />
<br />
This will display the following access control menu, from where you can either add user or role.<br />
<br />
<img src="./pictures/splunk-2-access-control-menu.png" width=550 height=347 title="Splunk Access Control Menu"/><br />
<br />
Click on Users, which will display all available users in splunk as shown below.<br />
<br />
<img src="./pictures/splunk-3-list-users.png" width=580 height=419 title="Splunk List Users"/><br />
<h3>10. Add New User from Console</h3>
To add a new user: Settings -> Users and Authentication -> Access Controls -> Users -> New
<br />
Click on New from the user list. This will display the following dialog where you can enter information about this new user.<br />
<br />
<img src="./pictures/splunk-4-add-new-user-part-1.png" width=580 height=863 title="Splunk Add New User"/><br />
<br />
In the above, apart from entering users basic information, you can also select the role that you want to assign to the user.<br />
<br />
At the bottom of the screen, after you select the role for the user, you'll see a textbox where you can enter the password for the user (this is not shown in the above screen)<br />
<br />
Once the user is created, it will be displayed in the user list as shown below.<br />
<br />
<img src="./pictures/splunk-5-new-user-added.png" width=580 height=787 title="Splunk New User Added"/><br />
<h1>IV. Role Management from Splunk Web</h1>
<h3>11. List All Roles from Console</h3>
To view all the users from the console, login to splunk web -> Click on Settings -> Users and Authentication -> Click on “Access Controls“ -> Click on “Role&ldquo.<br />
<br />
This will display all available roles in splunk as shown below.<br />
<br />
<img src="./pictures/splunk-6-list-roles.png" width=455 height=837 title="Splunk List Roles"/><br />
<h3>12. Add New Role from Console</h3>
To add a new role: Settings -> Users and Authentication -> Access Controls -> Roles -> New<br />
<br />
Enter the role name and other basic information as shown below.<br />
<br />
In our example, we are creating a role called splunkreadonly.<br />
<br />
<img src="./pictures/splunk-7-add-new-role-part-1.png" width=558 height=513 title="Splunk Add Role"/><br />
<br />
For the new role that you are creating, you can also inherit capabilities from existing roles.<br />
<br />
Apart from inheriting capabilities from existing roles, you can also explicitly specify capabilities fort the new role as shown below.
<br />
<img src="./pictures/splunk-7-add-new-role-part-5.png" width=550 height=291 title="Splunk Add Capabilities to Role"/><br />
<br />
Once the role is created, it will be displayed in the role list as shown below:<br />
<br />
<img src="./pictures/splunk-8-new-role-added.png" width=485 height=398 title="Splunk New Role Added"/><br />
<br />
<h3>Link:</h3>
<a href="https://www.thegeekstuff.com/2019/03/splunk-user-and-role-cli-web" target=_blank>The Geek Stuff :: 12 Splunk User and Role Administration Examples for both CLI and Web</a>
</html>
<html>
<h3>Array_builder</h3>
<table>
</table>
</html>
<html>
<h3>Console</h3>
<table>
<tr><td>Clear line</td><td>Shift + Esc</td></tr>
<tr><td>Clear shell</td><td>Ctrl + L</td></tr>
<tr><td>Inspect current object</td><td>Ctrl + I</td></tr>
<tr><td>Help of any object</td><td>Ctrl + l</td></tr>
</table>
</html>
<html>
<h3>Editor</h3>
<table>
<tr><td>Close file</td><td>Ctrl + W</td></tr>
<tr><td>New file</td><td>Ctrl + N</td></tr>
<tr><td>Open file</td><td>Ctrl + O</td></tr>
<tr><td>Help of any object</td><td>1) Ctrl + l<br />2) alternativ: { next to an object <br /> unter Tools →Preferences → Help kann das Verhalten angepasst werden</td></tr>
</table>
</html>
<html>
<h3>Global</h3>
<table>
<tr><td>Close pane</td><td>Shift + Ctrl + F4</td></tr>
<tr><td>Control</td><td>Ctrl + F6</td></tr>
<tr><td><h4>Debug:</h4></td><td>
<ul>
<li>Debug :: Ctrl + F5</li>
<li>Debug continue :: Ctrl + F12 </li>
<li>Debug exit :: Ctrl + Shift + F12</li>
<li>Debug step into :: Ctrl + F11</li>
<li>Debug step over :: Ctrl + F10</li>
<li>Debug step return :: Ctrl + Shift + F11</li>
</ul>
</td></tr>
<tr><td>Run</td><td><u>gesamtes File:</u> F5 <br /> bzw. “Run“ → “ Run“<br /> <u>chunk of code:</u> F9 <i>(currently highlighted)</i><br /> ansonsten aktuelle Zeile</td></tr>
<tr><td>Quit Spyder</td><td>Ctrl + q</td></tr>
<tr><td>Run Analysis</td><td> F8</td></tr>
<tr><td>Auto Completion</td><td> Tab</td></tr>
</table
</html>
<html>
<b>** Not supported on all flavors. **</b><br />
<br />
To see inode contents (file size, allocated blocks,<br />
file type, user, group, file mode, last accessed, last<br />
modified etc) of a file:<br />
<br /><code>
$ stat file1 file2 fileN<br />
</code><br />
This tip generously supported <br />
by: sachin_m_joshi@yahoo.com<br />
</html>
<html>
<ul>
</li><h3>Quantil</h3>
Oberbegriff für <b>Quartil</b>, <b>Terzil</b> und <b>Quintil</b>.</li>
</ul>
</html>
<html>
<h3>Lageparameter im Überblick</h3>
<ul>
<li>Unter dem Begriff Lageparameter werden alle statistischen Maßzahlen zusammengefasst, die eine Aussage über die Lage einer Verteilung machen.</li>
<li>Im Folgenden ein Überblick über einige populäre Lageparameter.
<ul>
<li>Arithmetisches Mittel x=x1+x2+ +xnn=1n i=1xi</li>
<li>Geometrisches Mittel xgeom=n xn</li>
<li>Harmonisches Mittel xharm=n1x1+ +1xn</li>
<li>Median ~x= xn+12für n ungerade12(xn2+xn2+1) für n gerade</li>
<li>Modus xd=H&aml;ufigster Beobachtungswert</li>
</ul></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.mathebibel.de/median" target=_blank>Mathebibel :: Median</a></li>
</ul>
</html>
<html>
<h3>Diskrete Verteilungen</h3>
<ul>
<li><details><summary><b>Diskrete Gleichverteilung</b></summary>
</details></li>
<li><details><summary><b>Bernoulli-Verteilung (Null-Eins-Verteilung)</b></summary>
</details></li>
<li><details><summary><b>Binomialverteilung</b></summary>
</details></li>
<li><details><summary><b>Negative Binomialverteilung (Pascal-Verteilung)</b></summary>
</details></li>
<li><details><summary><b>Geometrische Verteilung</b></summary>
</details></li>
<li><details><summary><b>Hypergeometrische Verteilung</b></summary>
</details></li>
<li><details><summary><b>Poisson-Verteilung</b></summary>
<code><pre><math>
P( x | λ ) =
<mfrac>
<mrow>
<msup><mi>λ</mi><mi>x</mi></msup>
<msup><mi>e</mi><mi><mo>−</mo><mi>λ</mi></mi></msup>
</mrow>
<mrow>x!</mrow>
</mfrac> , für x = 0, 1, 2, …
</math></pre></code>
</details></li>
<li><details><summary><b>Logarithmische Verteilung</b></summary>
</details></li>
</ul>
<h3>Stetige Verteilungen</h3>
<ul>
<li><details><summary><b>Stetige Gleichverteilung (Rechteckverteilung, Uniformverteilung)</b></summary>
</details></li>
<li><details><summary><b>Dreiecksverteilung (Simpson-Verteilung)</b></summary>
</details></li>
<li><details><summary><b>Normalverteilung (Gauß-Verteilung)</b></summary>
<br />
Bezeichnung: <b>N(μ, σ)</b> <br />
<code><pre><math>
P(x | μ, σ) =
<mfrac>
<mrow>
<mn>1</mn>
</mrow>
<mrow>
<mi>σ</mi>
<msqrt>
<mrow>
<mn>2</mn><mo>*</mo><mi>π</mi>
</mrow>
</msqrt>
</mrow>
</mfrac>
<mrow>
<msup><mi>e</mi>
<mfrac>
<msup>
<mrow><mo>− </mo>( <mi>x</mi><mo> − </mo><mi>μ</mi> )</mrow>
<mn>2</mn>
</msup>
<mrow><mn>2</mn>
<msup>
<mi>σ</mi><mn>2</mn>
</msup>
</mrow>
</mfrac>
</msup>
</mrow>
</math>
</pre></code>
</details></li>
<li><details><summary><b>Logarithmische Normalverteilung</b></summary>
</details></li>
<li><details><summary><b>Exponentialverteilung</b></summary>
</details></li>
<li><details><summary><b>Chi-Quadrat-Verteilung</b></summary>
</details></li>
<li><details><summary><b>Studentsche t-Verteilung</b></summary>
</details></li>
<li><details><summary><b>F-Verteilung (Fisher-Verteilung)</b></summary>
</details></li>
<li><details><summary><b>Gammaverteilung</b></summary>
</details></li>
<li><details><summary><b>Beta-Verteilung</b></summary>
</details></li>
<li><details><summary><b>Logistische Verteilung</b></summary>
</details></li>
<li><details><summary><b>Weibull-Verteilung</b></summary>
<code><pre><math>
P( x | λ, k ) =
<mrow>
<mo>{</mo>
<mtable>
<mtr><mtd>
<mrow><mfrac><mi>k</mi><mi>λ</mi></mfrac></mrow>
<msup> <mrow> ( <mfrac><mn>x</mn><mn>λ</mn></mfrac> ) </mrow><mrow><mi>k</mi><mo>−
</mo><mn>1</mn></mrow></msup><msup><mi>e</mi><mrow><mo>−</mo><msup><mrow> ( <mfrac>
<mi>x</mi><mi>λ</mi></mfrac> )</mrow><mi>k</mi> </msup> </mrow></msup> </mtd><mtd>
, für x ≥ 0
</mtd></mtr>
<mtr><mtd columnalign="left"> 0 </mtd><mtd>
, für x < 0
</mtd></mtr>
</mtable>
</mrow>
</math></pre></code>
</details></li>
<li><details><summary><b>Cauchy-Verteilung (Cauchy-Lorentz-Verteilung, Lorentz-Verteilung)</b></summary>
</details></li>
<li><details><summary><b>Pareto-Verteilung</b></summary>
</details></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Liste_univariater_Wahrscheinlichkeitsverteilungen" target=_blank>Wikipedia</a></li>
</li>
</html>
<html>
<ul>
<li>dt. Mittlerer absoluter Fehler</li>
<li>MAE = <math><mstyle displaystyle=true>
<mfrac><mi>1</mi><mi>n</mi></mfrac>
<munderover><mo>∑</mo>
<mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mi>n</mi>
</munderover>
n
</math></li>
</ul>
</html>
<html>
ME = <math><mstyle displaystyle=true>
<mfrac><mi>1</mi><mi>n</mi></mfrac>
<munderover><mo>∑</mo>
<mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mi>n</mi>
</munderover>
<msub>
<mi>y</mi>
<mn>i</mn>
</msub> −
<msub>
<mi>x</mi>
<mn>i</mn>
</msub>
</math>
<h3>Links:</h3>
<a href="https://en.wikipedia.org/wiki/Mean_absolute_error" target=_blank>Wikipedia :: Mean absolute error</a>
</html>
<html>
<table>
<tr><th>Statistik-<br />funktion</th><th>entsprechende<br />Python/<b>Pandas</b>-Funktion</th><th>entsprechende<br />R - Funktion</th></tr>
<tr><td>Minimum</td><td><center>min()</center></td><td><center>???</center></td></tr>
<tr><td>Maximum</td><td><center>max()</center></td><td><center>???</center></td></tr>
<tr><td>Mittelwert</td><td><center>mean()</center></td><td><center>???</center></td></tr>
<tr><td>Standard-<br />weichung</td><td><center>std()</center></td><td><center>???</center></td></tr>
<tr><td>Varianz</td><td><center>var()</center></td><td><center>???</center></td></tr>
<tr><td>Perzentile</td><td><center>percentile()</center></td><td><center>???</center></td></tr>
<tr><td>Zentralwert <br /> (<i>Median</i>)</td><td><center>median()</center></td><td><center><code><b>median()</b></code></center></td></tr>
<tr><td>Durchschnitt, <br /><i>gewichteter ˜</i></td><td><center>average()</center></td><td><center>???</center></td></tr>
<!-- tr><td></td><td><center></center></td><td><center></center></td></tr -->
</table>
<h3>Links:</h3>
<ul>
<li><a href="https://www.tutorialspoint.com/numpy/numpy_statistical_functions.htm" target=_blank>Tutorialspoint :: Python - NumPy - Statistical Functions</a></li>
<!-- li><a href="" target=_blank></a></li -->
</ul>
</html>
<html>
<ul>
<li>Paradoxon aus der Statistik;</li>
<li>Die Bewertung verschiedener Gruppen scheint unterschiedlich auszufallen,<br />
je nachdem man die Ergebnisse der Gruppe kombiniert oder nicht;</li>
<!--li></li>
<li></li>
<li></li-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Simpson-Paradoxon" target=_blank>Wikipedia :: Simpson-Paradoxon</a></li>
</ul>
</html>
<html>
<ul>
<li><h3>Spannweite (engl. range) </h3>
R=xmax xmin
</li>
<li><h3>Interquartilsabstand (engl. interquartile range) </h3>
IQR=Q0,75 − Q0,25
</li>
<li><h3>Mittlere absolute Abweichung (engl. average absolute deviation)</h3>
D=1n i=1|xi x|
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.mathebibel.de/streuungsparameter" target=_blank>Mathebibel :: Streuungsparameter</a></li>
</ul>
</html>
<html>
auch: Scheinkorrelation, engl. spurious correlations
</html>
<html>
<ul>
<li>gGmbH := gemeinnützige Gesellschaft mit beschränkter Haftung</li>
<br />
<li><details><summary><b>e.V. und Spendenquittung</b></summary>
<ul>
<li>Die Bezeichnung “e.V.“ sagt <u><b>nichts</b></u> über die Ausgabe einer Spendenquittung aus.</li>
<li>Es kommt darauf an, ob der Verein vom Finanzamt als gemeinnützig anerkannt ist<br />
oder nicht, d.h. welcher Stufe der Gemeinnützigkeit (A oder B) dem Verein vom<br />
Finanzamt verliehen wurde.</li>
<li>Die einzige Möglichkeit (so scheint es aktuell [2021] zu sein) ist es, in der jeweiligen<br />
Satzung zu schauen, ob die Begriffe:
<ul>
<li>“<em>Gemeinnützigkeit</em>“,</li>
<li>“<em>gemeinnützig</em>“,</li>
<li>“<em>Wohltätigkeit</em>“, oder</li>
<li>“<em>wohltätig</em>“</li>
</ul>
genannt werden.</li>
</ul></details></li>
<li><details><summary><b>Medikamente steuerlich absetzen</b></summary>
<ul>
<li>unter “Außergewöhnliche Belastungen“ angeben;</li>
<li>die Medikamente sind <u><b>nur</b></u> mit Rezept(‐schein) oder<br />
Attest steuerlich absetzbar;</li>
<li>die maximale Grenze (z.B. bei mir jetzt [2021] ca. 1900 Euro, <br />
real: 661 Euro) richtet sich nach dem Einkommen, dem Familienstand<br />
(ledig/verheiratet/geschieden/verwitwet) u.a. abhängig;</li>
<li><em><b>Wichtig!</b></em><br />
Einem Arzt steht von der KK (nur) ein bestimmtes Budget<br />
für die Vergabe von Medikamenten zur Verfügung (Stich‐<br />
wort “<em>Arzneimittelbudgetierung</em>“) </li>
</ul></details></li>
<li><details><summary><b>Immer die Nebenkosten‐Abrechnung mitliefern!</b></summary>
<ul>
<li>selbst dann, wenn ich Geld zurückerhalte bzw. <br />
‐erhalten habe;</li>
<li>es geht dabei um die “<em>Handwerkerleistungen</em>“, <br />
die von der Steuer absetzbar sind;</li>
</ul></details></li>
<li><details><summary><b>Fahrten zur Arbeit(sstelle) auflisten</b></summary>
<ul>
<li>falls innerhalb eines Jahres verschiedene Arbeitsstellen angefahren werden;</li>
<li>die Liste muss die Arbeitsstellen:
<ul>
<li>einzelnd, dediziert in Form von Einzelnachweisen/‐einträgen enthalten;</li>
<li>die Angaben müssen so genau wie möglich sein:
<ul>
<li>Zeitraum</li>
<lI>komplette Adresse (PLZ nicht vergessen!)</li>
</ul>
</li>
</ul>
</li>
</ul></details></li>
<li><details><summary><b>Bewerbungskosten</b></summary>
<ul>
<li>Steuererklärung: Anlage N;</li>
<li>Bewerbungskosten können z.B. sein:
<ul>
<li>Kosten für Kopien</li>
<li>Bewerbungsfotos</li>
<li>Bewerbungsmappen</l>
<li>Fachbücher a la “Wie bewerbe ich mich richtig“</li>
<li>Bewerbungskurse bzw. ‐seminare</li>
<li>Übernachtungskosten</li>
<li>Fahrtkosten</li>
<li>Verpflegungsmehraufwendungen</li>
<li>Kosten für entsprechende Kleidung für das Vorstellungsgespräch etc.</li>
</ul>
</li>
</ul></details></li>
<li><details><summary><b>Kontoführungsgebühren</b></summary>
<ul>
<li>???</li>
</ul></details></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.juraforum.de/forum/t/muss-ein-e-v-spendenquittungen-ausstellen.170482/" target="_blank" rel="noreferrer noopener">Jura‐Forum :: Muss ein e.V. eine Spendenquittung ausstellen</li>
<li><a href="https://www.vlh.de/wissen-service/der-gemeinnuetzige-verein-und-die-steuererklaerung.html" target="_blank" rel="noreferrer noopener">VLH :: Der gemeinnützige Verein und die Steuererklärung</a></li>
<li><a href="https://de.wikipedia.org/wiki/Budgetierung_(Gesundheitswesen)" target="_blank" rel="noreferrer noopener">Wikipedia :: Budgetierung (Gesundheitswesen)</a></li>
<li><a href="https://www.helpster.de/bewerbungskosten-in-der-steuererklaerung-angeben-so-geht-s_9649" target="_blank" rel="noreferrer noopener">Helpster :: Steuererklärung ‐ Bewerbungskosten</a></li>
<li><a href="https://www.steuerklassen.com/einkommensteuererklaerung/spenden-und-mitgliedsbeitraege/" target="_blank" rel="noreferrer noopener">Steuerklassen.com :: EST ‐ Spenden & Mitgliedsbeträge</a></li>
</ul>
</html>
<html>
<ul>
<li>auch: Einpunktmaß;</li>
<li>benannt nach dem Physiker Paul Dirac;</li>
<li>ist ein spezielles Maß in der Maßtheorie</li>
<li><h3>Definition</h3>
Es sei ein messbarer Raum ( Ω , A ) gegeben, also eine Grundmenge Ω<br />
zusammen mit einer darauf definierten σ-Algebra A . Zu jedem Punkt z ∈ Ω<br />
wird eine zugehörige Abbildung δ<sub>z</sub> definiert, die jeder Menge A ∈ A den<br />
Wert 1 zuordnet, wenn sie z enthält, und den Wert 0, wenn sie z nicht <br />
enthält:<br />
<br />
<b>
<math xmlns = "http://www.w3.org/1998/Math/MathML">
<mi>δ<sub>z</sub> ( A )</mi>
<mo> := </mo>
<mrow>
<mo> { </mo>
<mtable columnalign="left">
<mtr>
<mtd><mi>1</mi><mi>, falls z ∈ A</mi></mtd>
</mtr>
<mtr>
<mtd><mi>0</mi><mi>, sonst</mi></mtd>
</mtr>
</mtable>
</mrow>
</math>
</b>
<br /><br />
Die Abbildung δ<sub>z</sub> : A → [ 0 , 1 ] ist dann ein Maß und wird Diracmaß oder <br />
Punktmaß im Punkt z genannt. Wegen δ<sub>z</sub> ( &Omega ) = 1 ist δ<sub>z</sub> sogar ein<br />
Wahrscheinlichkeitsmaß und ( Ω , A , δ<sub>z</sub> ) ein Wahrscheinlichkeitsraum.<br />
Damit lässt sich die Dirac-Verteilung definieren. Beim Diracmaß δ<sub>z</sub> ist die<br />
Einheitsmasse im Punkt z konzentriert. Es folgt, dass das Maß endlich ist, <br />
insbesondere ist der Maßraum σ-endlich. </li>
<li></li>
<!--li></li>
<li></li-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Diracma%C3%9F" target=_blank>Wikipedia.de</a></li>
</ul>
</html>
<html>
To check content of an object <br />
file(binary file ) we can't use vi<br />
or cat command, for that use strings<br />
command. <br />
<br /><code>
% strings [name of binary file]<br />
</code><br />
It will print all the printable strings <br />
present in object file. Basically <br />
strings command looks for ASCII strings <br />
in executable file and print it.<br />
<br />
Great for core files and other binary error files.<br />
<br />
This tip generously supported <br />
by: aggarami@pcsbom.patni.com<br />
</html>
<html>
<ul>
<li> Subprime-Kredite sind Kredite an Schuldner mit schlechter Bonität. </li>
</ul>
</html>
<html>
<h3>sudo: Sorry, you must have a tty to run sudo Error on a Linux and Unix</h3>
This is done in Fedora, RHEL, CentOS, many other Linux <br />
distribution, and Unix-like systems for security concern as<br />
it will show the password in clear text format.<br />
<h4>What is the fix on a Linux or Unix bash shell?</h4>
You have to run your ssh command as follows to avoid error<br />
that read as sudo:
<code><pre>
ssh -t hostname sudo command
ssh -t user@hostname sudo command
ssh -t user@box.example.com sudo command1 /path/to/file
</pre></code>
Sample session:<br />
<img src="./pictures/Linux-and-Unix-tty-to-run-sudo-if-I-can-sudo-without-a-password.png" heigth=412 width=598 /><br />
Fig.01: Linux and Unix tty to run sudo if I can sudo without a password over ssh<br />
<br />
The -t option force pseudo-tty allocation. This can be <br />
used to execute arbitrary screen-based programs on<br />
a remote machine, which can be very useful, e.g., when<br />
implementing menu services. Multiple -t options force<br />
tty allocation, even if ssh has no local tty.
<h4>The requiretty option in sudoers file</h4>
The requiretty if set in sudo config file sudoers, sudo <br />
will only run when the user is logged in to a real tty. <br />
When this flag is set, sudo can only be run from a login<br />
session and not via other means such as cron, shell/<br />
perl/python or cgi-bin scripts. This flag is set on many<br />
distores by default. Edit /etc/sudoers, file, enter:
<code><pre>
# visudo
</pre></code>
Find line that read as follows:
<code><pre>
Defaults requiretty
</pre></code>
Either comment it out the line or delete the line:
<code><pre>
#Defaults requiretty
</pre></code>
Save and close the file.
<h4>How Do I run command without using the -t option?</h4>
You can use the su command instead of the sudo <br />
command as follows:
<code><pre>
## NOTE: RHEL/CentOS specific syntax ##
su --session-command="/path/to/command1 arg1 arg2"
## others ##
su -c '/path/to/command1 arg1 arg2'
</pre></code>
OR
<code><pre>
ssh user@server1.nixcraft.in su --session-command="/path/to/command1 arg1 arg2"
</pre></code>
OR
<code><pre>
ssh user@server1.nixcraft.in su -c '/path/to/command1 arg1 arg2'
</pre></code>
You can run /scripts/job5143 as vivek user using the same syntax:
ssh user@server1.nixcraft.in su --session-command="/scripts/job1 /nas" vivek
</pre></code>
OR
<code><pre>
ssh user@server1.nixcraft.in su vivek -c "/scripts/job1 /nas"
</pre></code>
Another option is to use the following syntax (see below in comments):
<code><pre>
echo -e "\n"|sudo -S command
</pre></code>
See man pages for more info :: visudo(8)
<h3></h3>
<a href="https://www.cyberciti.biz/faq/linux-unix-bsd-sudo-sorry-you-must-haveattytorun/" target=_blank>nixCraft :: (sudo) Missing tty</a>
</html>
<html>
<ul>
<li><h3>Files</h3>
<table>
<tr>
<td>/etc/sudo.conf
</td>
<td>Sudo front-end configuration
</td>
</tr>
<tr>
<td>/etc/sudoers
</td>
<td>List of who can run what
</td>
</tr>
<tr>
<td>/etc/sudoers.tmp
</td>
<td>Default temporary file used by visudo
</td>
</tr>
</table>
</li>
<li><h3>Table of possible entries and their values</h3>
<ul>
<li>Edit the sudoer file (<b><code>sudo visudo</code></b>) <br />
and look for the following line:
<pre><code>Defaults env_reset </code></pre>
</li>
</ul>
Following entries can be added to that line (separated by comma):<br />
<table>
<tr>
<td>Increase sudo password timeout
</td>
<td><code><pre>timestamp_timeout=XX</pre></code>
</td>
</tr>
<tr>
<td>Number of times an user<br />
can enter incorrect passwords
</td>
<td><code><pre>passwd_tries=N</pre></code>
</td>
</tr>
<tr>
<td>Displaying asteriscs <br />
when entering password
</td>
<td><code><pre>pwfeedback</pre></code>
</td>
</tr>
</table>
</li>
<li>For the subsequent commands with sudo, you <br />
don't have to enter the password for a certain<br />
time.<br />
</li>
<li>Let's call it sudo password timeout.<br />
<br />
Different distributions have different timeout. <br />
It could be 5 minutes or 15 minutes.<br />
</li>
<li>You can change the behavior and set a <br />
sudo password timeout of your choice.<br />
<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://itsfoss.com/sudo-tips/"
target="_blank" rel="noreferrer noopener">
IT's FOSS :: 7 Sudo Tips and Tweaks for Linux Users</a>
</li>
</ul>
</html>
<html>
To set the sudo password timeout value, use the <b>passwd_timeout</b> <em>(timestamp_timeout)</em> <br />
parameter. First open the /etc/sudoers file with super user privileges using sudo and visudo<br />
commands like so:<br />
<ul>
<li><b>Editieren des Files /etc/sudoers:</b>
<pre><code>$ sudo cp /etc/sudoers /etc/sudoers.bak <em> # (Vorher am Besten eine Sicherungskopie erstellen) </em>
$ sudo visudo</code></pre>
</li>
<li><b>Nach folgender Zeile suchen:</b>
<pre><code>Defaults env_reset</code></pre>
</li>
<li><b>An diese Zeile den String “timestamp_timeout“ anfügen bzw. anpassen:</b>
<pre><code>Defaults env_reset,<b>timestamp_timeout=20</b></code></pre>
Mit dieser Einstellung bleibt das sudo‐Passwort 20 Minuten aktiv.<br />
<br />
Folgende Einstellungen sind auch möglich:
<table>
<tr><td align=center>0</td><td>Für jeden Befehl wird der Passwort‐Prompt angezeigt</td>
</tr>
<tr><td align=center>−1</td><td> Dauerhafte Deaktivierung des Password‐Prompts</td>
</tr>
</table>
</li>
<li><b>Aktivierung der Änderung für das aktuelle Terminal:</b>
<pre><code>$ reset</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.tecmint.com/set-sudo-password-timeout-session-longer-linux/" target="_blank" rel="noreferrer noopener">TecMint :: How to Keep 'sudo' Password Timeout Session Longer in Linux</li>
</ul>
</html>
<html>
Die meisten Applikatiionen geben ein “Feedback“ bei <br />
einer Password-Eingabe in Form von Sternen, Asterisks<br />
(“password feedback“) aus.<br />
<br />
Unter Linux und beim Aufruf von sudo ist das ‐ in der <br />
Regel ‐ nicht der Fall.<br />
<br />
Damit dies auch bei der Eingabe von sudo‐Befehlen <br />
zu sehen ist, sind folgende Schritte durchzuführen:<br />
<ul>
<li><b>Editieren des Files /etc/sudoers</b><br />
<code><pre>$ sudo cp /etc/sudoers /etc/sudoers.bak # <em>(Vorher am Besten eine Sicherungskopie erstellen)</em> </pre></code>
<code><pre>$ sudo visudo</pre></code></li>
<li><b>Nach folgender Zeile suchen:</b>
<code><pre>Defaults env_reset</pre></code></li>
<li><b>An diese Zeile den String “pwfeedback“ anfügen:</b>
<code><pre>Defaults env_reset,<b>pwfeedback</b></pre></code></li>
<li><b>Aktivierung der Änderung für das aktuelle Terminal:</b>
<code><pre>$ reset</pre></code>
<h3>Link:</h3>
<a href="https://www.tecmint.com/show-asterisks-sudo-password-in-linux/" target=_blank>TecMint :: Show asterisks while typing sudo password</a>
</html>
<html>
Für einen User einen Account so einrichten, dass er bestimmte Programme, <br />
für die Root-Rechte nötig sind, als normaler User starten kann. <br />
<br />
Vorab sind mehrere Informationen nötig:
<ul>
<li>Benutzername des Benutzers (Groß- und Kleinschreibung beachten)</li>
<li>Passwort des Benutzers</li>
<li>Passwort von Root</li>
</ul>
Um das Verhalten von Ubuntu zu imitieren, geht man wie folgt vor:
<ul>
<li><b>Root werden:</b><br />
<code><b>su</b></code>
</li>
<br />
<li><b>Passwort von Root eingeben</b></li>
<br />
<li> <b>visudo starten</b><br />
<code><b>visudo</b></code><br />
<br />
Damit wird die Datei /etc/sudoers bearbeitet.<br />
Suchen, ob bereits ein Eintrag für die Gruppe admin existiert<br />
Wenn nicht vorhanden folgende Zeile anfügen:<br />
<code><b>%admin ALL=(ALL) ALL</b></code><br />
</li>
<br />
<li><b>Editor beenden</b></li>
<br />
<li><b>Neue Gruppe anlegen:</b><br />
<code><b>groupadd admin</b></code>
</li><br />
<li><b>Benutzer zur neuen Gruppe hinzufügen:</b><br />
<code><b># usermod -a -G admin [user]</b></code><br />
# dabei [user] durch den Benutzername ersetzen, z.B.: <code><b>usermod -a -G admin benutzer1</b></code><br />
</li>
</ul>
Um diese Änderungen wirksam werden zu lassen, sollte man <br />
den Benutzer einmal abmelden (logout) und wieder anmelden. Ab<br />
sofort kann der Benutzer sudo so benutzen, wie unter Ubuntu.
<br />
<h3>Weitere (nützliche) Befehle:</h3>
<ul>
<li><b>visudo ‐c | ‐‐check</b><br />
Enable check-only mode. <br />
The existing sudoers file will be checked for syntax errors, owner and mode.<br />
A message will be printed to the standard output describing the status of <br />
sudoers unless the -q option was specified. If the check completes success‐<br />
fully, visudo will exit with a value of 0. If an error is encountered, visudo wil<br />
xit with a value of 1.
</li>
</ul>
<h3>Links:</h3>
<a href="https://it-muecke.de/node/566" target=_blank>IT-Mücke</a>
</html>
<html>
<ol>
<li><h3>Erste Möglichkeit:</h3>
In diesem Fall folgenden Aufruf verwenden:
<code><pre>
sudo ‐E visudo
</pre></code>
<b>aus der sudo‐Manpage:</b><br />
<code><pre>
‐E, ‐‐preserve‐env
Indicates to the security policy that the user wishes to preserve their existing environment variables.
The security policy may return an error if the user does not have permission to preserve the environ‐
ment.
</pre></code>
Dauerhaft geht es mit folgenden zusätzlichen Eintrag im File <b>/etc/sudoers</b>:
<code><pre>
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
<u><em><b>Defaults editor=/usr/bin/vi </b></em></u># <em>diese Zeile hinzufügen</em>
Defaults env_reset,pwfeedback
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin: …
</pre></code>
<br />
<b>Anmerkung:</b><br />
Ich habe die Einstellungen für die (Umgebungs‐)Variablen “VISUAL“<br />
bzw. “EDITOR“ geändert, aber zu diesem Zeitpunkt [08.01.2022]<br />
waren sie entweder nicht belegt oder bereits mit <code>/usr/bin/vi</code> gesetzt.<br />
</li>
<br />
<li><h3>Zweite Möglichkeit:</h3>
Type
<code><pre>
sudo update-alternatives --config editor
</pre></code>
You will get a text like below.<br />
<br />
There are 4 choices for the alternative editor (providing /usr/bin/editor).
<code><pre>
Selection Path Priority Status
------------------------------------------------------------
* 0 /bin/nano 40 auto mode
1 /bin/ed -100 manual mode
2 /bin/nano 40 manual mode
3 /usr/bin/vim.basic 30 manual mode
4 /usr/bin/vim.tiny 10 manual mode
</pre></code>
Press enter to keep the current choice[*], or type selection number: 3<br />
<br />
Find vim.basic or vim.tiny selection number. Type it and press enter. <br />
Next time when you open visudo your editor will be vim<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://askubuntu.com/questions/531184/change-the-default-editor-when-sudo-visudo"
target="_blank" rel="noreferrer noopener">
Ask Ubuntu ‐ Forum :: Change the default editor when sudo visudo</a>
</li>
<li><a href="https://askubuntu.com/questions/539243/how-to-change-visudo-editor-from-nano-to-vim"
target="_blank" rel="noreferrer noopener">
Ask Ubuntu ‐ Forum :: How to change visudo editor from nano to vim?</a>
</li>
</ul>
</html>
Do you hate always having to type: /bin/su root
Do you wish you only had to do it once?
Well, here is a way to "suspend" root and bring it back.
Use the "suspend" and "fg" commands to switch
from root to login ID, and back to root:
foo 15% /bin/su
Password:
foo 1#
foo 2# suspend
stopped
foo 16% fg
/bin/su
foo 3#
And that's it.....
Set and alias in root's .cshrc or .profile to shorten
the word "suspend" if that is too much to type.
alias sus 'suspend'
<html>
<ul>
<li>sp_locklogin '<i><User></i>', 'unlock'</li>
</ul>
</html>
<html>
<code><pre>sp_displaylogin <i><UserName></i></pre></code>
z.B. <code>sp_displaylogin 'sa_mueller'</code>
</html>
<html>
<ul>
<li><b>sp_helpdb</b> :: <br />
Auflisten aller installierten DBs mit Angaben deren Grösse,Besitzer,<br>
DB-ID, Create-Date und deren Status<br></li>
<br>
<li><b>sp_helpdevice</b> :: <br />
Auflisten aller verfügbaren Geräte und jeweils der verfügbare Speicher</li>
<br>
<li><b>sp_helpuser</b> :: <br />
Informationen über einen Datenbank-User oder über alle User ausgeben<br>
<code>sp_helpuser [name_in_db]</code></li>
<br>
<li><b>sp_helpconstraint</b> :: <br />
Auflisten der Informationen bzgl. der integrity constraints, die<br>
in der entsprechenden Tabellen eingestellt sind<br>
<code>sp_helpconstraint [objname][, detail]</code></li>
<br>
<li><b>sp_help</b> :: <br />
Auflisten des Objekt-Namen, Besitzer und Typ. Ist das Objekt eine<br>
Tabelle, so werden auch die Spalten und Indizes angezeigt<br>
<code>sp_help <table_name></code></li>
<br>
<li><b>sp_helpindex</b> :: <br />
Auflisten der Indizes für eine bestimmte Tabelle<br>
<code>sp_helpindex <table_name></code></li>
<br>
<li><b>sp_displayroles</b> :: <br />
Auflisten der dem User zugewiesenen Rollen<br>
<code>sp_displayroles [ <tUserName> ]</code></li>
<br>
<li><b>die aktuell verwendete DB anzeigen:</b> <br />
<code>select db_name()</code></li>
<br />
<li><b>Datenbanken im Server auflisten:</b> :: <br />
<code>select [ * | name ] from sysdatabases;</code></li>
</ul>
<br>
<h3>Locks</h3>
- Locks verhindern, dass Daten, auf die von mehreren Session gleichzeitig zugegriffen werden, verändert werden
können.<br>
<br>
<table border="1">
<tr>
<td>sp_lock </td>
<td>zur Identifizierung der Locks, deren Typ und auf welche Tabellen sie angewendet werden</td>
</tr>
<tr>
<td>sp_who</td>
<td> zur Identifizierung der gelockten Prozesse, deren SPIDs, Stati, usw.</td>
</tr>
<tr>
<td>dbcc lock_release</td>
<td> um Locks zu löschen</td>
</tr>
<tr>
<td>kill spid</td>
<td> alternativer Befehl, um Locks zu löschen</td>
</tr>
<tr>
<td>lock table table_name <br>in [ exclusive | share ] mode </td>
<td>um einen "expliziten" Lock zu setzen</td>
</tr>
</table>
<br>
<br>
Quelle:<br>
u.a. Mx Operations Guide<br>
</html>
<html>
<code><pre>
00:0055:00000:00012:2018/02/19 18:32:01.52 server
AUDIT PROCESS EXCEPTION: Can't allocate space
for either syslogs or the current sysaudit table in database
'sybsecurity' because the corresponding segment is full/has
no free extents. Please refer to Security Administration
Guide for details.
</pre></code>
<h3>Lösung:</h3>
Habe einmal <b>sp_nlbAuditThreshold</b> ausgeführt und <br />
dann wieder alle dropthreshold neu gesetzt:
<ul>
<li>use sybsecurity<br />
go</li>
<br />
<li>sp_dropthreshold sybsecurity, aud_seg_01, 250<br />
go</li>
<br />
<li>sp_dropthreshold sybsecurity, aud_seg_02, 250<br />
go</li>
<br />
<li>sp_dropthreshold sybsecurity, aud_seg_03, 250<br />
go</li>
<br />
<li>sp_addthreshold sybsecurity, aud_seg_01, 250, sp_nlbAuditThreshold<br />
go</li>
<br />
<li>sp_addthreshold sybsecurity, aud_seg_02, 250, sp_nlbAuditThreshold<br />
go</li>
<br />
<li>sp_addthreshold sybsecurity, aud_seg_03, 250, sp_nlbAuditThreshold<br />
go</li>
</ul>
Das muß – vermutlich – auf allen neuen ASE–Servern<br />
g(also MXPROD3 / UAT / DEV / usw) gemacht werden.
<h3>Grund für die Aktion:</h3>
Wegen des Audits ist die DB 'sybsecurity' vollgelaufen, <br />
was eigentlich kein Problem ist, da Sybase normalerweise <br />
(per sp_nlbAuditThreshold) diese (Audits) in die audit_archive <br />
verschiebt. Nur ist es so, daß bei der Installation von Sybase<br />
dieses (die Einstellung) vergessen wurde (oder – warum auch<br />
immer – nicht funktioniert hat)
</html>
<html>
<code><pre>
ERROR: Mounting of databases failed:
Password:
Msg 5161, Level 16, State 1:
Server 'MXPROD3', Line 1:
There are no available device numbers. ASE allows a maximum of
50 devices and all the device numbers upto the maximum have
been used.</pre></code>
<h3>⇒ Lösung:</h3>
<ul>
<li>Wert überprüfen:<br />
<code><pre>Select count(*) from master..sysdevices</pre></code>
(hier war er “50“)</li><br />
<li>Wert erhöhen (von 50 auf z.B. 100):<br />
<code><pre>sp_configure 'number of devices' 100</pre></code></li><br />
<li>Anpassung erlauben:<br />
<code><pre>sp_configure 'allow updates',1</pre></code></li><br />
<!--- <li></li><br /> -->
</ul>
</html>
<html>
<ol>
<li><code><pre>select * from syslogins</pre></code></li>
<li><code><pre>sp_droplogin</pre></code></li>
<li><code><pre>sp_helpuser</pre></code></li>
<li><code><pre>sp_dropalias</pre></code></li>
</ol>
</html>
<html>
<ul>
<li>auf DB einloggen, in “master“ bleiben</li>
<li><code><pre>sp_drop database</pre></code></li>
<li><code><pre>sp_drop devices</pre></code></li>
</ul>
</html>
<html>
<table><border="1">
<tr><th>Role</th><th>Definition</th></tr>
<tr><td>sa_role</td><td>Performs system administration</td></tr>
<tr><td>sso_role</td><td>Performs security administration</td></tr>
<tr><td>oper_role</td><td>Performs operator functions</td></tr>
<tr><td>replication_role</td><td>Used by replication processes</td></tr>
<tr><td>sybase_ts_role</td><td>Used to perform undocumented maintenance tasks</td></tr>
<tr><td>dtm_tm_role</td><td>Used in externally coordinated XA transactions</td></tr>
<tr><td>ha_role</td><td>Controlls High Availability Companion Server actions</td></tr>
<tr><td>mon_role</td><td>Provides access to monitoring tables</td></tr>
<tr><td>js_admin_role</td><td>Allows for administration of the Job Scheduler</td></tr>
<tr><td>js_client_role</td><td>Executes Job Scheduler tasks</td></tr>
<tr><td>js_user_role</td><td>Creates and runs jobs in the Job Scheduler</td></tr>
<tr><td>messaging_role</td><td>Administers and executes Real Time Messaging</td></tr>
<tr><td>navigator_role</td><td>Used if you have Navigation Server</td></tr>
<tr><td>web_services</td><td>Administers Web Services</td></tr>
</table>
</html>
<html>
Bei einer SQL-Abfrage erschien folgende Fehlermeldung:<br />
<code><b>Msg 3606, Level 16, State 0: <br />
Arithmetic overflow occurred</b></code><br />
<br />
<ul>
<li>in ASE einloggen</li>
<br />
<li><code><b>sp_helpdb</b></code><br />
⇒ Ergebnis? Worauf ist zu achen?</li>
<br />
<li><code><b>select show_role()<br />go</b></code></li>
<br />
<li>da die Rolle "sybase_ts_role" benötigt wird, <br />
die Rolle zuweisen:<br />
<code><b>grant ... ?<br />go</b></code></li>
<br />
<li>auf der master-DB folgenden Befehl absetzen:<br />
<code><b>dbcc usedextents(0,0,0)</b></code></li>
<br />
</ul>
</html>
<html>
<p>
Bei einem dbcc-Aufruf <br />
<b><code>J.COM.SHELL.DATABASE.REP.DBCC</code></b>
<br /> im Rahmen des EODs brach der Befehl <br />
<b><code>dbcc.ksh -s MXTST11 -d MX_TST11_REP</code></b><br />
mit <b><code>“exit 8“</code></b> ab.
</p>
<p>
⇒ Verzeichnis $HOME/dba/log<br />
→ File <b><code>dbcc.ksh.<<i>aktuelles Datum</i>></code></b> (oder Datum des Laufs)
</p>
<p>
<h4>⇒ Fehlermeldung:</h4>
<code>Msg 1105, Level 17, <i>???</i>: <br />
Server 'MXTST11', Line 1:<br />
Can't allocate space for object 'scan_REP' in database<br />
'dbccdb' because 'scanseg' segment is full / has no free<br />
extents. if you ran out of space in syslogs, <u>dump the <br />
transaction log.</u> Otherwie, use ALTER DATABASE to increase<br />
the size of the segment.</code>
</p>
<p>
<h4>⇒ Lösung:</h4>
<ol>
<li>in DB einloggen</li>
<li><b><code>use dbcc</code></b></li>
<li><b><code>sp_helpsegement scanseg</code></b></li>
<li><i> ??? dump tran dbccdb with no_log ??? </i></li>
</ol>
</html>
<html>
<ul>
<li><h3>nur die ersten 10 Einträge anzeigen:</h3>
<code>select top 10 * from <TableName></code></li>
<li><h3>User wechseln:</h3>
<code>setuser '<UserName>'</code></li>
<li><h3>Ermitteln, auf welcher DB man sich befindet:</h3>
<code>select db_name()</code></li>
<li><h3>Liste der eingerichteten User-Accounts ausgeben:</li>
<code>select * from master..syslogins</code>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</html>
<html>
<a href="http://www.admindot.eu/index.php/how-to-check-free-space-in-sybasease-database/" target="_blank">http://www.admindot.eu/index.php/how-to-check-free-space-in-sybasease-database/</a>
</html>
<html>
<h3>Identiy overflow</h3>
<code>select o.name as Name,<br>
next_identity(o.name) as Next,<br>
power(10., c.prec - 1) * 8 as Limit,<br>
power(10., v.prec) - 1 as MaxVal<br>
from sysobjects o, syscolumns c<br>
where o.type='U'<br>
and o.id = c.id<br>
and c.status & 128 > 0<br>
and convert(int, next_identity (o.name)) >= power(10., c.prec - 1) * 8<br>
order by o.name</code><br>
<br>
<h3>Vorgehensweise, um Identity-Werte zu "komprimieren"</h3>
<b>Achtung:</b><br>
Bei dem Vorgang muss die Option "select into/bulk copy" (zeitlich begrenzt)<br>
gesetzt sein, um bcp benutzen zu können. Danach muss die Option wieder<br>
zurückgesetzt / de-aktiviert werden.<br>
<br>
<b>1) Verbindung zu Sybase-Server und prüfe die Differenz zwischen dem höchsten<br>
Wert der Identity-Spalte und der tatsächlichen Anzahl der Zeilen</b><br>
<br>
isql -U<username> -P<password> -S<server> -D<database_name>
select max(M_IDENTITY), count(*) from <table_name><br>
<br>
<b>2) Backup der Tabelle</b><br>
<br>
bcp [[database.]owner.]table_namne[:slice_number] out datafile<br>
[-Uusername][-Ppassword][-Iinterfaces_file][-Sserver] -c<br>
<br>
<b>3) Verbindung zum Sybase-Server und Kürzen der Tabelle</b><br>
<br>
isql -U<username> -P<password> -S<server> -D<database_name><br>
truncate table <table_name><br>
<br>
<b>4) Zurücksetzen der Identity-Zahl</b><br>
<br>
sp_chgattribute "table_name", "identity_burn_max", 0, "0"<br>
<br>
<b>5) Einspielen der Daten</b><br>
<br>
bcp [[database.]owner.]table_namne[:slice_number] in datafile<br>
[-Uusername][-Ppassword][-Iinterfaces_file][-Sserver] -c<br>
<br>
<b>6) Verbindung zum Sybase-Server aufbauen und Überprüfen, ob der Vorgang erfolgreich war</b><br>
<br>
isql -U<username> -P<password> -S<server> -D<database_name><br>
select max(M_IDENTITY), count(*) from table_name<br>
<br>
<br>
Quelle:<br>
Mx Operations Guide<br>
</html>
<html>
<h3>isql <br />
[-b] [-e] [-F] [-p] [-n] [-v] [-w] [-W] [-X] [-Y] [-Q] <br />
[-c cmdend] <br /></h3>
<ul>
<li><b>-c</b> <i>cmdend</i><br />
Ändert den Befehlsabschluß;<br />
Defaultmäßig ist es der String “go“, auf einer separaten Zeile<br />
Keine SQL-reservierten Worte oder Control-Characters<br />
Beispiel: “;“<br />
</li><br />
<li><b>-w</b> <i>width</i><br />
Ändert die Länge der Ausgabezeile (Default: 80 Zeichen ?);<br />
Beispiel: “-w 120“<br />
</li>
<br />
</ul>
</html>
<html>
<a href="https://www.database-blog.de/category/sybase-ase/" target="_blank">https://www.database-blog.de/category/sybase-ase/</a>
</html>
<html>
<code><pre>
declare @nn int,
@theDelay char(8),
@theString varchar(50)
select @nn = 1, @theDelay = "00:00:01", @theString = ""
while @nn < 5
begin
waitfor delay @theDelay
select @theString = convert(varchar,@nn) + " - " + convert(varchar,getdate(),109)
print @theString
select @nn = @nn + 1
end
</pre></code
</html>
<html>
Hier eine kleine Sammlung an nützlichen Tipps rund um<br />
die Sybase Datenbank für die alltägliche Benutzung. Ist man be‐<br />
reits an Oracle gewöhnt, kommt man mit ein bisschen Ein‐<br />
gewöhnung auch ganz gut mit der Sybase Datenbank zurecht.<br />
<br />
<ul>
<li><b>Datenbanken in der Systemumgebung aufspüren per dblocate:</b><br />
<code><pre>
[sybase@server]$ dblocate
SQL Anywhere Server Enumeration Utility Version 16.0.0.807
Server Name Address
----------- -------
sapdb01 sybaseprod.domain.org:2640
sapdb02 sybasekons.domain.org:2650
sapdb03 sybaseentw.domain.org:2640
</pre></code>
</li>
<li><b>Sybase Shell Login ähnlich sqlplus bei Oracle:</b><br />
<code><pre>
dbisql -d1 -nogui -c "uid=;pwd=;dbn=sapdb03;eng=sapb01;links=tcpip"
</pre></code>
</li>
<li><b>Systable auslesen und die Ausgabe in eine Datei umlenken:</b><br />
<code><pre>
(DBA)> select * from sys.systable; output to systable.txt;
Execution time: 0.015 seconds
Exporting data to "/sybase/systable.txt.txt"
428 rows written to "/sybase/systable.txt.txt"
Execution time: 0.44 seconds
(DBA)> exit
</pre></code>
</li>
<li><b>Systembenutzer auslesen und die Ausgabe in eine Datei umlenken:</b><br />
<code><pre>
(DBA)> select * from sys.sysuser; output to syuser.txt
Execution time: 0.016 seconds
Exporting data to "/sybase/syuser.txt"
118 rows written to "/sybase/syuser.txt"
Execution time: 0.033 seconds
(DBA)> exit
</pre></code>
</li>
<li><b>Auch ein select count sieht recht vertraut aus:</b><br />
<code><pre>
(SYBASEUSER)> select count(*) from ZSYBASEUSER_TABELLE01;
select count(*) from ZSYBASEUSER_TABELLE01;
count()
--------------------
9
(1 rows)
Execution time: 0.019 seconds
-- Execution time: 0.019 seconds
(SYBASEUSER)>
</pre></code>
</li>
<li><b>Datenbankupgrade (logisch) nach einer Systemkopie oder einem Sybase Softwareupgrade:</b><br />
<code><pre>
(DBA)> alter database upgrade;
Database upgrade started
Creating system views
Creation of system views completed
Creating DBO views
Creation of DBO views completed
Creating system procedures
Creation of system procedures completed
Creating system views
Creation of system views completed
Setting option values
Setting option values completed
Creating migration procedures
Creation of migration procedures completed
Creating jConnect procedures
Creation of jConnect procedures completed
29 row(s) affected
Execution time: 7.595 seconds
(DBA)>
</pre></code>
</li>
<li><b>Sybase Datenbankoptionen ändern:</b><br />
hier zum Beispiel Ausführungspläne als html Reports ablegen.<br />
<code><pre>
(DBA)>set option public.Query_Plan_As_HTML_Directory='/sybase/data/sapnlsdb01/html';
SET TEMPORARY OPTION QUERY_PLAN_AS_HTML = 'ON';
(DBA)>
</pre></code>
</li>
<li><b>Einen VIEW SYBASEUSER.ZSYBASEUSER_TABELLE01 für eine Tabelle erstellen:</b><br />
<code><pre>
(DBA)>create view SYBASEUSER.ZSYBASEUSER_TABELLE01 as select * from SYBASEUSER.ZSYBASEUSER_TABELLE01__V0001;
(DBA)>commit;
</pre></code>
</li>
<li><b>Einen VIEW SYBASEUSER.ZSYBASEUSER_TABELLE01 für eine Tabelle löschen:</b><br />
<code><pre>
(DBA)>drop view "SYBASEUSER.ZSYBASEUSER_TABELLE01";
(DBA)>commit;
</pre></code>
</li>
<li><b>Einem Sybase User ein neues Passwort geben:</b><br />
<code><pre>
(DBA)>grant connect to SYBASEPROD identified by 'password';
</pre></code>
</li>
<li><b>Einem Sybaser User Berechtigungen erteilen:</b><br />
<code><pre>
(DBA)>grant resource to PSYBASEPROD;
(DBA)>grant select on sys.systable to PSYBASEPROD;
</pre></code>
</li>
<li><b>Eine Tabelle einem anderen Benutzer zuordnen:</b><br />
<code><pre>
(DBA)>alter table SYBASEUSER.ZSYBASEUSER_TABELLE01 alter owner to SYBASENEW preserve permissions preserve foreign keys;
(DBA)>commit;
</pre></code>
</li>
<li><b>Einen Index als Schemauser droppen:</b><br />
(Hier wird der Tabellenmame und der Indexname der Tabelle komplett mit angegeben)<br />
<code><pre>
use 'SID';
setuser 'SAPSCHEMA';
set quoted_identifier on;
drop index "TABELLENNAME"."INDEXNAME";
</pre></code>
</li>
<li><b>Eine Tabelle umbennenn:</b><br />
<code><pre>
(DBA)>sp_iqrename "SYBASEUSER.ZSYBASEUSER_TABELLE01", "SYBASENEW.ZSYBASEUSER_TABELLE01";
(DBA)>commit;
</pre></code>
</li>
<li><b>Einen Index neu aufbauen:</b><br />
<code><pre>
(DBA)>sp_iqrebuildindex '"SYBASEUSER.ZSYBASEUSER_INDEX01"' , 'column "Z_WHERE_CLAUSE" 0' ;
(DBA)>commit;
</pre></code>
</li>
<li><b>Sybase Datenbankversion per isql bestimmen:</b><br />
<code><pre>
(DBA)> select @@version;
@@version
------------------------------------------------------------------------------------------------------
SAP IQ/16.0.0.807/140507/P/sp08/Enterprise Linux64 - x86_64 - 2.6.18-194.el5/64bit/2014-05-07 18:02:42
(1 rows)
Execution time: 0.062 seconds
(DBA)>
</pre></code>
</li>
<li><b>Datenbank-ID bestimmen:</b><br />
<code><pre>
(DBA)> select @@servername, getdate()
@@servername getdate()
---------------------------------------------------------------------------------
sapdb01 2015-07-14 16:32:39.579
(1 rows)
Execution time: 0.013 seconds
(DBA)>
</pre></code>
(Es wäre auch möglich, die <b><em>getdate()</em></b>‐Spalte an den Anfang zu stellen.)<br />
</li>
</ul>
Als reines Nachschlagekompendium bietet sich das Sybase Infocenter an.
<br />
<b>Link:</b><br />
<a href="http://www.patrick-wessel.de/sap/nuetzliche-sybase-helferlein" target="_blank">www.patrick-wessel.de/sap/nuetzliche-sybase-helferlein</a><br />
<br />
</html>
<html>
<ul>
<li>Sämtliche Parameter mit Einstellung anzeigen:<br />
<code>
1> sp_configure <br />
</code></li>
<br />
<li>Einen Parameter mit seiner aktuellen Einstellung anzeigen:<br />
<code>
1> sp_configure '<Parameter>'<br />
</code></li>
<br />
<li>Einen Parameter mit einem bestimmten Wert setzen:<br />
<code>
1> sp_configure '<Parameter>', <Wert><br />
</code></li>
<br />
<li>Man kann diesen Befehl auch verwenden, um den Default-Wert zu setzen:<br />
<code>
1> sp_configure user log cache size default<br />
</code></li>
<br />
<h3>How to configure parameters in Sybase</h3>
There are three types of paramaters in Sybase:<br>
<ol>
<li> Dynamic :: dynamic parameter changes take affect immediately</li>
<li> Static :: static parameter changes take effect when server is restarted</li>
<li> Read-only :: read-only parameters cannot be changed</li>
</ol>
<br />
Dynamic and static parameters we can change in two ways:<br>
<h4>1. Modifying configuration file</h4>
This file should be placed in $SYBASE_ASE folder and named by default
<server_name>.cfg:<br>
<br>
echo $SYBASE_ASE<br>
<br>
/usr/local/sybase/ASE-15_0<br>
<br>
In my case it's called ASE_2k.cfg:<br>
head -20 ASE_2k.cfg<br>
<br>
##############################################################################
<br>
#<br>
# Configuration File for the Sybase SQL Server<br>
#<br>
# Please read the System Administration Guide (SAG)<br>
# before changing any of the values in this file.<br>
#<br>
##############################################################################
<br>
[Configuration Options]<br>
[General Information]<br>
config file version = DEFAULT<br>
[Backup/Recovery]<br>
recovery interval in minutes = DEFAULT<br>
print recovery information = DEFAULT<br>
tape retention in days = DEFAULT<br>
<br>
If we are not sure what is the name of parameter file our server is using, we
can check it :<br>
1> select value2 from master..syscurconfigs where config = 114<br>
2> go<br>
<br>
value2<br>
/usr/local/sybase/ASE-15_0/ASE_2k.cfg<br>
(1 row affected)<br>
<br>
During startup Sybase makes backup configuration file ,and deletes old backup
file if present.<br>
Backup file name is <server_name>.bak in my case it is ASE_2k.bak.<br>
<h4>2. Using command: sp_configure <parameter_name></h4>
parameter value eg:<br>
1> sp_configure user log cache size 4096<br>
2> go<br>
<br>
Parameter Name Default Memory Used Config Value Run Value Unit
Type<br>
user log cache size 2048 0 4096
2048 bytes static<br>
(1 row affected)<br>
<br>
Configuration option changed. Since the option is static, Adaptive Server
must<br>
be rebooted in order for the change to take effect.<br>
Changing the value of user log cache size to 4096
increases the amount of<br>
memory ASE uses by 126 K.<br>
(return status = 0)<br>
<br>
We can use this command to reset parameter to
it&aposs default value:<br>
1> sp_configure user log cache size default<br>
2>go<br>
<br>
Parameter Name Default Memory Used Config Value Run Value Unit
Type<br>
user log cache size 2048 0 2048
2048 bytes static<br>
(1 row affected)<br>
Configuration option changed. Since the option is static, Adaptive Server
must<br>
be rebooted in order for the change to take effect.<br>
Changing the value of "user log cache size" to 2048 reduces the amount
of<br>
memory ASE uses by 126 K. The reduced memory may be reused when this
configure<br>
value changes, but will not be released until ASE restarts.<br>
(return status = 0)<br>
<br>
When we are changing parameters by sp_configure command,<br>
Sybase is backuping old config file and creating new ASE_2K.cfg with modifed
values:<br>
diff ASE_2k.025 ASE_2k.cfg<br>
203c203<br>
< user log cache size = 4096<br>
<br>
> user log cache size = DEFAULT<br>
<br>
Backuped files filenames are like: ASE_2K.<number> , number after reaching 999
it switch back to 001.<br>
Command sp_configure can be used also to:<br>
- display configuration paramater values<br>
sp_configure ["parameter_name"|"group_name"]<br>
<br>
1> sp_configure user log cache size<br>
2> go<br>
<br>
Parameter Name Default Memory Used Config Value Run Value Unit Type<br>
user log cache size 2048 0 2048 2048 bytes
static<br>
(1 row affected)<br>
(return status = 0)<br>
<br>
- reading and writing configuration files:<br>
sp_configure "configuration file", 0, {write|restore|verify|read},
filename<br>
<br>
Where:<br>
"write" :: writes the current active configuration into the given file
name<br>
"restore" :: creates a file with a given name
that contains currently configured, but not necessarily active, configuration
values<br>
"verify" :: performs validation checking on values in the file<br>
"read" :: performs the verify and reads the
values that pass validation into the server. Only works if changes made within
the file are dynamic<br>
<br>
Link:<br>
<a href="http://www.admindot.eu/index.php/how-to-configure-parameters-in-sybase/" target="_blank">Admindot :: How to configure parameters in sybase</a><br>
<br>
</html>
<html>
<ul>
<li>Eigenes Password ändern:<br />
<code><pre>sp_password '<altes PWD>','<neues PWD>'</pre></code></li>
<br />
<li>Password eines anderen Users ändern:<br />
<code><pre>sp_password '<eigenes PWD>','<neues PWD für User>', <User></pre></code></li>
</ul>
</html>
<html>
<h3>Adding users to databases</h3>
<ul>
<li><b><u>!Wichtig!</u></b><br />
Als erstes muss der User im ASE-Server angelegt sein, so <br />
daß sich dieser User überhaupt auf der ASE anmelden<br />
kann. <br />
⇒ Aufruf von <code><b>sp_addlogin</b></code></li>
<br />
<li>Damit der User auch die auf dem ASE-Server sich befindlichen<br />
DBs benutzen kann, muss der User mittels <code><b>sp_adduser</b></code> einer<br />
bestimmten resp. der gewünschten DB hinzugefügt werden. <br />
⇒ Syntax:<code><pre>sp_adduser loginame [, name_in_db [, grpname]]</pre></code>
Where:
<ul>
<li>loginame<br />
is the login name of an existing user.</li>
<li>name_in_db<br />
<li>specifies a name that is different from the login name by which the user is to be known inside the database.</li>
<li> Use name_in_db to accommodate users' preferences. For example, if there are five Adaptive Server users named Mary, each must have a different login name. Mary Doe might log in as 'maryd', Mary Jones as 'maryj', and so on. However, if these users do not use the same databases, each might prefer to be known simply as 'mary' inside a particular database.
<li> If no name_in_db parameter is given, the name inside the database is the same as loginame.</li>
<li><b>Note</b><br />
This capability is different from the alias mechanism described in “Using aliases in databases“, which maps the identity and permissions of one user to another.</li>
<li> grpname <br /> ‐ is the name of an existing group in the database. If you do not specify a group name, the user is made a member of the default group “public“. Users remain in “public“ even if they are a member of another group. See “Changing a user's group membership“.</li>
</ul>
<br />
<li>sp_adduser adds a row to the sysusers system table in the current database. When a user has an entry in the sysusers table of a database, he or she:
<ul>
<li>Can issue use database_name to access that database</li>
<li>Will use that database by default, if the default database parameter was issued as part of create login</li>
<li>Can use alter login to make that database the default</li>
</ul<
<li>This example shows how a database owner can give access permission to “maryh“ of the engineering group “eng,“ which already exists:
<code><pre>sp_adduser maryh, mary, eng </pre></code>
</li>
<li>This example shows how to give “maryd“ access to a database, keeping her name in the database the same as her login name:
<code><pre>sp_adduser maryd </pre></code>
</li>
<li>This example shows how to add “maryj“ to the existing “eng“ group, keeping her name in the database the same as her login name by using null in place of a new user name:
<code><pre>sp_adduser maryj, null, eng </pre></code>
</li>
</ul>
<li>Users who have access to a database still need permissions to read data, modify data, and use certain commands. These permissions are granted with the grant and revoke commands, discussed in Chapter 6, “Managing User Permissions“.</li>
</ul>
<h3>Link:</h3>
<a href="http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01672.1572/html/sec_admin/BCFIJEEG.htm" target=_blank>Sybase - Infocenter :: Adding users to databases</a>
</html>
<html>
<ul>
<li>zur Verfügung stehende Befehle:
<ul>
<li><u>Zwischen den Netzwerken wechseln:</u><br />
<b><code>nmcli connection up <i>Verbindung</i></code></b><br />
<b><code>nmcli c up <i>Verbindung</i></code></b><br />
<b><code>nmcli c u <i>Verbindung</i></code></b></li>
<li><u>Netzwerk löschen:</u><br />
<b><code>nmcli connection delete <i>Verbindung</i></code></b></li>
<li><u>aktuell vorhandene Netzwerke auflisten:</u><br />
<b><code>nmcli connection </code></b></li>
<li><u>Auflisten der aktuellen Aktionen des NetworkManagers:</u><br />
<b><code>nmcli monitor</code></b></li>
<li><u>Verbindung mit Editor des NetworkManagers ändern:</u><br />
<b><code>nmcli connection edit</code></b><br />
VORSICHT! Der Editor hat seine eigenen Befehle.</li>
</ul></li>
<br />
<li>Es steht eine graphische (NCurses‐) Oberfläche<br />
zur Verfügung: <b>Nmtui</b></li>
</ul>
<h3>Links:</h3>
<a href="" target=_blank></a>
<a href="[41854" target=_blank>LinuxUser 11/2018 :: zusätzliche Infos</a>
</html>
[So Mär 23 07:57:06 2025] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PC00.LPCB.EC0._Q37.PNOT], AE_NOT_FOUND (20220331/psargs-332)
[So Mär 23 07:57:06 2025] ACPI Error: Aborting method \_SB.PC00.LPCB.EC0._Q37 due to previous error (AE_NOT_FOUND) (20220331/psparse-529)
<html>
In tcsh, the TAB key will automatically <br />
complete any name in the current <br />
directory for any application (for pico, <br />
cd, rm, chown)... It will even complete <br />
paths from root.<br />
<br />
Soo... If you want to open your .cshrc <br />
from root you do..<br />
<br />
“pico /ho“[TAB] -> “pico /home/“<br />
Then continue with “yuo“[tab] -> “yourusername“<br />
Then you get “pico /home/yourusername/“<br />
And then type “.cs“[TAB] -> “.cshrc“ <br />
So in the end you get “pico /home/yourusername/.cshrc“<br />
In a lot less stokes...<br />
<br />
But say there are 2 users called <br />
yourusername and yourothername.<br />
<br />
Well, then the shell will beep, and if <br />
you hit TAB again, you will get a listing <br />
off all the files that start with “you“. <br />
You can then continue to the point where<br />
the names differ, and then hit TAB.<br />
<br />
This also works for commands.<br />
</html>
<html>
<meta at-Befehl />
<ul>
<li><b>Syntax:</b><br />
<code><pre>at <em>ZEITANGABE</em></pre></code>
</li>
<li><b>mögliche Zeitangaben:</b><br />
<table>
<tr><th>Format</th><th>Bedeutung</th></tr>
<tr><td align="center">today</td><td>Heute</td></tr>
<tr><td align="center">tomorrow</td><td>Morgen</td></tr>
<tr><td align="center">noon tomorrow</td><td>Um 12:00 Uhr am nächsten Tag; mit at kann auch "teatime" (= 16:00 Uhr) oder "midnight" (= Mitternacht) verwendet werden.</td></tr>
<tr><td align="center">now</td><td>Jetzt</td></tr>
<tr><td align="center">now + 10min</td><td>In zehn Minuten; möglich sind auch Angaben zu Stunden ("hours"), Tagen ("days"), Wochen ("weeks") und Monaten ("months") .</td></tr>
<tr><td align="center">20:15</td><td>Heute um 20:15 Uhr</td></tr>
<tr><td align="center">09:00pm</td><td>Heute um 21:00 Uhr (mit Angabe von "am" heute um 9.00 Uhr morgens, ohne Angabe die Zeit im 24-Stunden-Format).</td></tr>
<tr><td align="center">2/23/10</td><td>Am 23. Februar 2010; mögliche Schreibweisen für das Datum sind z.B. "2.23.10" und "22310"; der Monat steht hier vor dem Tag.</td></tr>
<tr><td align="center">2010-02-23</td><td>Am 23. Februar 2010; das vermutlich etwas weniger verwirrende ISO-Format und alternativ "10-02-23" können auch verwendet werden. </td></tr>
</table>
</li>
<li><b>einen oder mehrere Befehl(e) zu einer bestimmten Zeit ausführen (lassen):</b><br />
<ul>
<li>gewünschte Zeit an‐/eingeben:<br />
<code><pre>at <em>ZEITANGABE</em></pre></code>
</li>
<li>Anschließend gibt man die gewünschten Befehle ein. Dazu wird <br />
der at‐Prompt angezeigt:
<code><pre>at ></pre></code>
</li>
<li>… und schließt die Eingabe mit Strg + D ab, was durch den String<br />
<code><pre><EOT></pre></code>
(<em>End‐of‐Text</em>) angezeigt wird.<br />
<br />
</li>
</ul>
<li><b>die laufenden Anweisungen auflisten:</b><br />
<code><pre>atq</pre></code>
Dabei werden allerdings nur die Jobnummer und die Ausführungszeit ausgegeben, nicht aber, <br />
welches Kommando ausgeführt werden soll.<br />
<br />
</li>
<li><b>Anzeigen der Jobnummer, der Ausführungszeit & und des auszuführenden Befehls:</b><br />
<code><pre>at ‐c <em>JOB_ID</em> </pre></code>
</li>
<li><b>Aufträge löschen:</b><br />
<code><pre>atrm <em>JOB_ID</em></pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.ubuntuusers.de/at/" target="_blank" rel="noreferrer noopener">Ubuntu‐Users :: Wiki ‐ at‐Befehl</a></li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://www.baeldung.com/linux/find-command-regex"
target="_blank" rel="noreferrer noopener">
Baeldung :: Linux Find Command With Regular Expressions</a>
</li>
</ul>
</html>
<html>
<ul>
<li>If you have accidentally output binay<br>
info to your terminal.<br>
</li>
<li>For ex.
<pre><code># cat BinFile</code></pre>
</li>
<li>You dont have to kill the<br>
terminal and start a new one.<br>
</li>
<li>Just type at the prompt:
<pre><code># tput reset</code></pre>
</li>
<li>Works for me on Linux.<br>
</li>
<li>This tip generously supported <br>
by: sarada@ece.iisc.ernet.in
</li>
</ul>
</html>
<html>
The cat (short for “concatenate“) command is one of the most <br />
frequently used flexible commands on Linux, Apple Mac OS X, Unix, *BSD <br />
(FreeBSD / OpenBSD / NetBSD) operating systems.<br />
<br />
The cat command is used for:
<ul>
<li>Display text file on screen</li>
<li>Read text file</li>
<li>Create a new text file</li>
<li>File concatenation</li>
<li>Modifying file</li>
<li>Combining text files</li>
<li>Combining binary files</li>
</ul>
<h3>Purpose</h3>
Basic file operation on a text file such as displaying or creating new files.
<h3>cat command syntax</h3>
The basic syntax is as follows:
<ul>
<li><pre><code>cat filename</code></pre>
z.B. <pre><code>cat file1</code></pre>
</li>
<li><pre><code>cat > filename</code></pre>
z.B. <pre><code>cat > file2</code></pre>
</li>
<li><pre><code>cat [options] filename</code></pre>
</li>
<li><pre><code>cat file3 | command</code></pre>
z.B. <pre><code>cat file4 | grep something</code></pre>
</li>
</ul>
<h3>cat command examples</h3>
The cat command examples usage for linux unix users
It is a standard Unix program used to concatenate and display files. The cat command display file contents to a screen. Also, you can use cat command for quickly creating a file. The cat command can read and write data from standard input and output devices. Please note that some of the following option will only work with GNU version of the cat command.
<h3>Display A File With cat Command</h3>
To view a file, enter:
<pre><code>cat filename
cat /path/to/file
cat /etc/passwd</code></pre>
Sample outputs:
<pre><code>root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
....
...
..hplip:x:109:7:HPLIP system user,,,:/var/run/hplip:/bin/false
vivek:x:1000:1000:Vivek Gite,,,:/home/vivek:/bin/bash
bind:x:110:118::/var/cache/bind:/bin/false
haldaemon:x:111:119:Hardware abstraction layer,,,:/var/run/hald:/bin/false
sshd:x:112:65534::/var/run/sshd:/usr/sbin/nologin
mysql:x:113:121:MySQL Server,,,:/var/lib/mysql:/bin/false</code></pre>
<h3>Create A File With cat Command</h3>
To create a file called “foo.txt“, enter:
<pre><code>cat > foo.txt</code></pre>
Type the following text:
<pre><code>This is a test.
Unix is the best.
<control-D></code></pre>
You need to press [CTRL] + [D] i.e. hold the control key down, then tap d. The > symbol tells the Unix / Linux system that what is typed is to be stored into the file called foo.txt (see stdout for more information). To view a file you use cat command as follows:
<pre><code>cat foo.txt</code></pre>
<h3>Viewing A Large File With cat Command And Shell Pipes</h3>
If the file is too large to fit on the computer scree, the text will scroll down at high speed. You will be not able to read. To solve this problem pass the cat command output to the more or less command as follows:
<pre><code>cat bigfile | more
cat bigfile | less</code></pre>
The more and less command acts as shell filters. However, you can <br />
skip the cat command and directly use the Linux / Unix more & less command like this:
<pre><code>more bigfile
less bigfile</code></pre>
<h3>How To Combine Two Or More Files Using cat Command</h3>
You can combine two files and creates a new file called report.txt, enter:
<pre><code>cat score.txt names.txt > report.txt
cat report.txt</code></pre>
<h3>How To Append Data To A Text File</h3>
To append (add data to existing) data to a file called foo.txt, enter:
<pre><code>cat >> foo.txt</code></pre>
Type the text:
A champion is someone who gets up, even when he can't
<code><control-D></code>
<h3>Task: Number All Output Lines</h3>
Type the following command:
cat -n filename
cat --number filename
Sample outputs:
Unix / Linux Number All C Progam Code Ouput Lines
Fig.01: Number all output lines with cat command
<h3>How To View Non-printing Characters</h3>
To display TAB characters as ^I, enter:
<code><pre>
cat -T filename
</code></pre>
To display $ at end of each line, enter:
<code><pre>
cat -E filename
cat --show-ends filename
</code></pre>
Use ^ and M- notation, except for LFD and TAB and show all nonprinting:
<code><pre>
cat -v filename
cat --show-nonprinting filename
</code></pre>
To show all, enter:
<code><pre>
cat -A fileName
</code></pre>
OR
<code><pre>
cat -vET fileName
</code></pre>
Sample outputs:
<code><pre>
Unix / Linux cat: View Non-printing Characters Such as Tabs, New Line, End Of Line
Fig.02: Unix / Linux cat command: View Non-printing Characters
</code></pre>
<h3>Viewing All Files</h3>
You can simply use the shell wildcard as follows:
cat *
To view only (c files) *.c files, enter:
cat *.c
Another option is bash for loop, or ksh for loop:
<code><pre>
#!/bin/bash
for f in /source/project10/*.pl
do
echo "***** [Start $f ] ****"
cat -n "$f"
echo "***** [End $f ] ****"
done
</code></pre>
OR same using the ksh shell:
<code><pre>
#!/bin/ksh
for f in $(ls /source/project10/*.pl)
do
print "*** [Start $f ] ****"
cat "$f"
print "*** [End $f ] ****"
done
</code></pre>
<h3>Print Files</h3>
You can directly send a file to to the printing device such as /dev/lp
cat resume.txt > /dev/lp
On modern systems /dev/lp may not exists and you need to print a file using tool such as lpr:
cat resume.txt | lpr
OR
lpr resume.txt
<h3>Joining Binary Files</h3>
You can concatenate binary files. In good old days, most FTP / HTTP downloads were limited to 2GB. Sometime to save bandwidth files size were limited to 100MB. Let us use wget command to grab some files (say large.tar.gz was split to 3 file on remote url):
<code><pre>
wget url/file1.bin
wget url/file2.bin
wget url/file3.bin
</code></pre>
Now combine such files (downloaded *.bin) with the cat command easily:
<code><pre>
cat file1.bin file2.bin file3.bin > large.tar.gz
### extract it
tar -zxvf large.tar.gz
</code></pre>
Another example with the rar command under Unix and Linux:
<code><pre>
### First combine the files, and use the > shell redirection output to put the DVD image in a file ###
cat file.rar.001 file.rar.002 file.rar.003 file.rar.004 file.rar.005 > dvd.rar
## next unrar it ##
unrar e dvd.rar
## enjoy dvd ##
mplayer myfile.avi
</code></pre>
<h3>Fooling Programs</h3>
You can use the cat command to fool many programs. In this example <br />
bc thinks that it is not running on terminals and it will not displays its <br />
copyright message. The default output:
<code><pre>
bc -l
</code></pre>
Samples session:
<code><pre>
bc 1.06.95
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
4+5
9
quit
</code></pre>
Now try with the cat command:
<code><pre>
bc -l | cat
</code></pre>
Samples session:
<code><pre>
4+5
9
quit
</code></pre>
<h3>Testing Audio Device</h3>
You can send files to sound devices such as /dev/dsp or /dev/audio<br />
to make sure sound output and input is working:
<code><pre>
cat filename >/dev/dsp
cat recording.au >/dev/audio
</code></pre>
You can simply use the following command for recording voice sample<br />
and play back with it cat command:
<code><pre>
dd bs=8k count=4 </dev/audio >testing123.au
cat testing123.au >/dev/audio
</code></pre>
<h3>Gathering Linux System Information</h3>
<code><pre>
### To see CPU information ###
cat /proc/cpuinfo
### To see memory information ###
cat /proc/meminfo
### To see Linux kernel version ###
cat /proc/version
</code></pre>
<h3>Display Large Blocks of Textual Data In A Script</h3>
You can use a here document for displaying large blocks of textual data <br />
in a script such as help:
<code><pre>
cat <<HELPEOF
Usage:
opt1 : Do this
opt2 : Do that
HELPEOF
</code></pre>
Another working example:
<code><pre>
#!/bin/bash
# Author: Vivek Gite <http://www.cyberciti.biz/
# -----------------------------------------------
#Set default to my-dev-box
BASEDIR="/home/vivek/projects/bash/nginx-keepalived/chroot"
# Now switch to prod
[[ $HOSTNAME == "lb2.nixcraft.net.in" ]] && BASEDIR="/etc/nixcraft/nginx/lb2"
[[ $HOSTNAME == "lb2.nixcraft.net.in" ]] && BASEDIR="/etc/nixcraft/nginx/lb1"
_profile="$BASEDIR/redhat.conf"
_etc_files="$BASEDIR/redhat.etc.files.conf"
_etc_dirs="$BASEDIR/redhat.etc.dirs.conf"
_hooks="$BASEDIR/hooks.sh"
usage(){
cat <<EOF
Usage $0
-e | --enable: Enable the nginx-chroot environment
-E | --upgrade: Upgrade bind and libs in the nginx-chroot environment
-p | --php: Enable the php-cgi in the nginx-chroot environment
-P | --phpupgrade: Upgrade the php-cgi in the nginx-chroot environment
-i | --info: Display the php-cgi and nginx environment information such as version, users, connections etc
EOF
}
rootuser(){
local uid=$(id -u)
[[ $uid -ne 0 ]] && { echo "Only root may enable the nginx-chroot environment to the system."; exit 2; }
}
## function code removed to keep script short and sweet ##
enable_nginix_chroot(){
:
}
upgrade_nginx_chroot(){
:
}
enable_php_cgi_nginx_chroot(){
:
}
upgrade_php_cgi_nginx_chroot(){
:
}
get_nginx_chroot_info(){
:
}
# Make sure only root run this script
rootuser
# Load local hooks
[ -f "${_hooks}" ] && . ${_hooks}
# Load os specifc paths
source ${_profile}
# Main logic
case $1 in
-e|--enable) enable_nginix_chroot ;;
-E|--upgrade) upgrade_nginx_chroot;;
-p|--php) enable_php_cgi_nginx_chroot;;
-P|--phpupgrade) upgrade_php_cgi_nginx_chroot;;
-i|--info) get_nginx_chroot_info;;
*) usage; exit 9999;
esac
</code></pre>
<h3>Print Files In Reverse</h3>
No cat cannot print in reverse order but cat command can concatenate and print files in reverse:
<code><pre>
tac fileName
cat fileName | tac
tac <<<"$myFileName"
</code></pre>
See “how to use a here documents to write data to a file in bash script“ for more info.
<h3>cat command options</h3>
From the cat(1) command man page:
<code><pre>
Option Meaning
-A Equivalent to -vET.
-b Number nonempty output lines.
-e Equivalent to -vE.
-E Display $ at end of each line.
-n Number all output lines.
-s Suppress repeated empty output lines.
-t Equivalent to -vT.
-T Display TAB characters as ^I.
-v Show nonprinting i.e. use ^ and M- notation, except for LFD and TAB.
--help Display this help and exit.
--version Output version information and exit.
</code></pre>
<b>Link:</b><br />
<a href="https://www.cyberciti.biz/faq/linux-unix-appleosx-bsd-cat-command-examples/" target="_blank">Cyberciti:: cat - command - examples</a>
</html>
<html>
<h3>1. Overview</h3>
<p>
UEFI is a modern replacement for the aging BIOS firmware. It offers several advantages, including faster boot times, support for larger hard drives, and improved security features.
</p>
<p>
In this tutorial, we'll employ several tools and techniques available to check for the boot method in Linux. First, we'll start with the simple dmesg utility to look for the entries regarding EFI. Then, we'll use efibootmgr and efivar to check for the EFI variables.
</p>
<p>
Lastly, we'll resort to a manual approach by checking the EFI mount point and the NVRAM EFI variables.
</p>
<h3>2. Checking the Boot Method</h3>
<p>
To check the boot method used to boot a Linux machine, we can examine the system's configuration or settings to determine whether it follows the traditional BIOS boot method or the newer EFI/UEFI boot method.
</p>
<p>
For that purpose, we can use the various utilities, which we'll explore in the following sections.
</p>
<h4>2.1. dmesg</h4>
<p>
The dmesg command displays the messages related to the kernel as well as the firmware-related information.
</p>
<p>
By default, i's readily available on most Linux distributions. So, we'll simply print out the log and grep the EFI entries from it:
</p>
<pre><code>$ sudo dmesg | grep -i "EFI v"
[ 0.000000] efi: EFI v2.25 by American Megatrends
…
</code></pre>
<p>
As we can see, the presence of the entry indicates that we're currently booted using UEFI. In contrast, the absence of the entry signifies that we're using the legacy boot.
</p>
<h4>2.2. efibootmgr</h4>
<p>
The efibootmgr tool provides information about the UEFI boot entries in the system's NVRAM (Non-Volatile Random Access Memory).
</p>
<p>
By default, it's not installed on most Linux distributions. Therefore, we can install it from the package repository using a package manager like apt:
</p>
<pre><code>$ sudo apt install efibootmgr -y
</code></pre>
<p>
Once installed, let's verify it:
</p>
<pre><code>$ efibootmgr ––version
version 17
</code></pre>
<p>
Now, let' use it to check whether we're using UEFI:
</p>
<pre><code>$ sudo efibootmgr
EFI boot variables are not supported on this system
</code></pre>
<p>
As we can, we're not booted using UEFI. In this scenario, we're running Ubuntu on KVM, which is using the legacy boot. However, let's check it out on a system that's booted using UEFI:
</p>
<pre><code>$ sudo efibootmgr
BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0001, 0003, 0000
…
Boot0001* debian
</code></pre>
<p>
On UEFI booted systems, efibootmgr will lay out the entire booting sequence. The BootOrder variable specifies the preferred order of boot options, while the BootCurrent variable specifies the currently selected boot option.
</p>
<h4>2.3. efivar</h4>
<p>
efivar is another handy utility that allows us to interact with the UEFI environment variables.
</p>
<p>
Like efibootmgr, it might not be preinstalled on most Linux machines. However, it should be available in the official package repositories under the canonical name efivar:
</p>
<pre><code>$ sudo apt install efivar -y
</code></pre>
<p>
Once installed, let's verify it:
</p>
<pre><code>$ which efivar
/usr/bin/efivar
</code></pre>
<p>
Now, if we were to run this command on a machine that's booted through legacy boot, it would print nothing:
</p>
<pre><code>$ sudo efivar -l
</code></pre>
<p>
On the other hand, on UEFI systems, it spits out the EFI NVRAM variables:
</p>
<pre><code>$ sudo efivar -l
Boot0001 (UEFI Hard Drive)
Boot0002 (DVD/CDROM)
Boot0003 (Generic USB Drive)
BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0001,0003,0000
…
</code></pre>
<h4>2.4. EFI Mount Point</h4>
<p>
UEFI systems typically have an EFI System Partition (ESP) mounted at /boot/efi or /efi directory. Therefore, we can use a tool like lsblk or df to check for block devices mounted on those mount points:
</p>
<pre><code>$ df -h | grep -i efi
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 390M 16M 374M 4% /boot/efi
</code></pre>
<p>
Similarly, we can also use lsblk:
</p>
<pre><code>$ lsblk | grep -i efi
vda1 2:1 0 390M 0 part /boot/efi
</code></pre>
<h4>2.5. Manually Checking the EFI NVRAM Variables</h4>
<p>
Alternatively, we can manually examine the EFI NVRAM variables in the /sys/firmware/efi/vars directory.
</p>
<p>
To check if we're using UEFI on Linux, you can navigate to the /sys/firmware/efi/vars/ directory using the command line or a file manager. If the directory exists and is populated with files and subdirectories, it indicates that the system is booted using UEFI:
</p>
<pre><code>total 0
-rw-r--r-- 1 root root 256 May 27 10:01 BootCurrent-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root root 256 May 27 10:02 BootOrder-8be4df61-93ca-11d2-aa0d-00e098032b8c
…
</code></pre>
<p>
The efibootmgr and efivar tools are front-ends to this specific directory for easier management.
</p>
<h3>3. Conclusion</h3>
<p>
In this article, we covered how to check whether a Linux system is booted through UEFI. For that purpose, we used different tools such as dmesg, efibootmgr, and efivar.
</p>
<p>
Apart from that, we also discussed how we could verify the boot method without any tools by examining the /sys/firmware/efi/vars directory.
</p>
<h3>Links:</h3>
<ul>
<li><a href="https://www.baeldung.com/linux/uefi-check-machine-boot-method"
target="_blank" rel="noreferrer noopener">
Baeldung :: How to Check Whether a Machine Is Booted Using the UEFI</a>
</li>
</ul>
</html>
<html>
Am Beispiel folgendes Directory:<br>
<pre><code>drwx------ 2 jam users 4096 5. Mai 2012 Pr?sentationen</code></pre>
<b>Lösung:</b><br>
<u>1) Zuerst die Inode-Nr. ermitteln:</u>
<pre><code>jam@linux-188m:> ls -lisa Pr* # File ist ein "normales File"</code></pre>
oder
<pre><code>jam@linux-188m:> ls -lisd Pr*/ # File ist ein "Directory"</code></pre>
<u>2) Gefundene Inode-Nummer überprüfen:</u>
<pre><code>jam@linux-188m:> find . -inum 1444221 -ls
1444221 4 drwx------ 2 jam users 4096 Mai 5 2012 ./Pr\302\204sentationen</code></pre>
<u>3) File (über die Inode-Nummer) umbenennen:</u>
<pre><code>find . -inum 1444221 -exec mv -i {} Praesentationen \;</code></pre>
</html>
<html>
<code><pre>
./configure
make
make install
</pre></code>
<h3>Link:</h3>
<a href="https://robots.thoughtbot.com/the-magic-behind-configure-make-make-install" target="_blank">The magic behind configure, make, make install </a>
</html>
<html>
To check the number of fields and the <br />
consistancy of the file here is simple <br />
command:<br />
<code><pre>
nawk -F "delimiter" '{print NF}' file_name | sort -u | more
</pre></code>
</html>
<html>
To find out BIOS version under Linux operating systems<br />
use the <b><code>dmidecode</code></b> command which is a tool to analyze <br />
BIOS data. You must log in as root user to run <b><code>dmidecode</code></b><br />
command.
<h3>Linux find out BIOS version command</h3>
Type the following command:
<code><pre>
## run as root user ##
dmidecode | less
## or use sudo ##
sudo dmidecode | less
</pre></code>
Sample outputs:
<code><pre>
dmidecode 2.10
SMBIOS 2.5 present.
45 structures occupying 1832 bytes.
Table at 0xCFF6A000.
Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
Vendor: Phoenix Technologies LTD
Version: 2.1
Release Date: 06/23/2008
Address: 0xE4F00
Runtime Size: 110848 bytes
ROM Size: 1024 kB
Characteristics:
PCI is supported
PNP is supported
BIOS is upgradeable
BIOS shadowing is allowed
ESCD support is available
Boot from CD is supported
Selectable boot is supported
EDD is supported
3.5"/2.88 MB floppy services are supported (int 13h)
ACPI is supported
USB legacy is supported
LS-120 boot is supported
ATAPI Zip drive boot is supported
BIOS boot specification is supported
Targeted content distribution is supported
</pre></code>
Another output from my laptop:
<code><pre>
sudo dmidecode | less
</pre></code>
Sample outputs:
<code><pre>
BIOS Information
Vendor: Dell Inc.
Version: A02
Release Date: 02/03/2010
Address: 0xF0000
Runtime Size: 64 kB
ROM Size: 2112 kB
Characteristics:
ISA is supported
PCI is supported
PC Card (PCMCIA) is supported
PNP is supported
BIOS is upgradeable
BIOS shadowing is allowed
Boot from CD is supported
Selectable boot is supported
3.5"/720 KB floppy services are supported (int 13h)
Print screen service is supported (int 5h)
8042 keyboard services are supported (int 9h)
Serial services are supported (int 14h)
Printer services are supported (int 17h)
CGA/mono video services are supported (int 10h)
ACPI is supported
USB legacy is supported
AGP is supported
Smart battery is supported
BIOS boot specification is supported
Function key-initiated network boot is supported
Targeted content distribution is supported
BIOS Revision: 0.2
Firmware Revision: 0.2
Handle 0x0100, DMI type 1, 27 bytes
System Information
Manufacturer: Dell Inc.
Product Name: Precision M6500
Version: Not Specified
Serial Number: 55Lxxxx
UUID: 4a2yzzzeC-3500-xxx-yyy-Bzzzzyyy5y
Wake-up Type: Power Switch
SKU Number: Not Specified
Family:
</pre></code>
<h3>How to check BIOS firmware version in Linux</h3>
In this example display BIOS version using the -s option:
<code><pre>
sudo dmidecode -s bios-version
</pre></code>
Let us try a bash for loop example to get more info:
<code><pre>
for d in system-manufacturer system-product-name bios-release-date bios-version
do
echo "${d^} : " $(sudo dmidecode -s $d)
done
</pre></code>
<h3>Linux Find Out BIOS Version using dmidecode command</h3>
Use the dmidecode command on Linux to find out BIOS version, release date and more
It is possible to print all bios related info using the following syntax too:
<code><pre>
sudo dmidecode --type bios
</pre></code>
Sample outputs:
<code><pre>
# dmidecode 3.1
Getting SMBIOS data from sysfs.
SMBIOS 3.0.0 present.
Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
Vendor: American Megatrends Inc.
Version: GL702ZC.305
Release Date: 05/10/2018
Address: 0xF0000
Runtime Size: 64 kB
ROM Size: 16 MB
Characteristics:
PCI is supported
BIOS is upgradeable
BIOS shadowing is allowed
Boot from CD is supported
Selectable boot is supported
BIOS ROM is socketed
EDD is supported
5.25"/1.2 MB floppy services are supported (int 13h)
3.5"/720 kB floppy services are supported (int 13h)
3.5"/2.88 MB floppy services are supported (int 13h)
Print screen service is supported (int 5h)
Serial services are supported (int 14h)
Printer services are supported (int 17h)
ACPI is supported
USB legacy is supported
Smart battery is supported
BIOS boot specification is supported
Targeted content distribution is supported
UEFI is supported
BIOS Revision: 5.12
</pre></code>
<h3>Conclusion</h3>
The dmidecode command summarizes information about your system's hardware (laptop/desktop/server) as described in your system BIOS. It works with i386, x86-64, ia64 and arm64. For more info see the official project homepage here.
<h3>Links:</h3>
<a href="https://www.cyberciti.biz/faq/check-bios-version-linux/" target=_blank>nixCraft :: Linux Find Out BIOS Version Using a Command Line Option</a>
</html>
<html>
Finding only hidden files (starting with .) in a directory.<br />
<br />
<code>
ls -a | grep "^\." <br />
</code>
OR<br />
<code>
ls -a | awk '$0~/^\./ {print $0}'
</code>
</html>
<html>
<b>ACHTUNG!</b><br />
Seit GPG Version 2.1 wird das File <code><b>~/.gnupg/secring.gpg</b></code> nicht <br />
mehr verwendet resp. ist nicht mehr zu verwenden!<br />
<ul>
<h3>Infos</h3>
<li>GPG steht für “GNU Privacy Guard“ und ist die <br />
wohl am weitesten verbreitete Implementierung<br />
von PGP (“Pretty Good Privacy“).
</li>
<li>Letzteres stellt einen Standard dar, mit dem u.a.<br />
Emails verschlüsselt verschickt werden können, <br />
sofern die Software sowohl beim Sender wie<br />
auch beim Empfänger installiert ist.
</li>
<li>GPG gehört bei fast allen Linux-Distributionen<br />
zum Standard, muss also nicht extra installiert<br />
werden.
</li>
<li>GPG nutzt ‐ ebenso wie SSH ‐ zum Verschlüs‐<br />
seln der Daten ein Schlüsselpaar: <br />
<ul>
<li>Der <b><em>private</em></b> Schlüssel bleibt auf dem eigenen<br />
Rechner und kann zum Entschlüsseln von<br />
Nachrichten verwendet werden;</li>
<li>Der <b><em>öffentliche</em></b> Schlüssel hingegen wird üb‐<br />
licherweise frei verteilt. Mit ihm können Nach‐<br />
richten an den Eigentümer des Schlüssels<br />
verschlüsselt, jedoch nicht entschlüsselt wer‐<br />
den.
</li>
</ul>
</li>
</ul>
<ul>
<li><h3>Erstellen eines GPG-Schlüsselpaars</h3>
<code><pre>gpg ‐‐gen‐key</pre></code>
<code><pre>
gpg (GnuPG) 2.2.27; Copyright (C) 2021 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Hinweis: "gpg ‐‐full‐generate‐key" ruft den erweiterten Dialog auf.
GnuPG erstellt eine User‐ID, um Ihren Schlüssel identifizierbar zu machen.
Ihr Name ("Vorname Nachname"):
</pre></code>
</li>
</ul>
<ul>
<li><h3>Erstellen eines Widerrufungs‐Zertifikats</h3>
<code><pre>gpg ‐‐gen‐revoke vorname.nachname@email.de</pre></code>
</li>
</ul>
<ul>
<li><h3>GPG-Schlüsselbund verwalten</h3>
<b>Schlüssel auflisten:</b><br />
Mit folgender Anweisung kann man alle öffentlichen Schlüssel auflisten, die im eigenen Schlüsselbund (“Public Key Ring“) gespeichert sind:
<ul>
<li><u>Öffentliche Schlüssel auflisten:</u>
<code><pre>gpg ‐‐list‐keys</pre></code>
Alle öffentlichen Schlüssel sind in der Datei <code><b>~/.gnupg/pubring.gpg</b></code> abgelegt.
</li>
<li><u>Private Schlüssel auflisten:</u>
<code><pre>gpg ‐‐list‐secret‐keys</pre></code>
Alle privaten Schlüssel (“Secret Keys“) werden hingegen in der Datei <code><b>~/.gnupg/secring.gpg</b></code> gespeichert.
</li>
</ul>
<br />
<b>Schlüssel exportieren:</b><br />
<u>Eigenen Schlüssel exportieren:</u>
<code><pre>gpg ‐a ‐o ~/my-public-key.txt ‐‐export vorname.nachname@email.de</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.grund-wissen.de/linux/ssh-und-gpg.html"
target="_blank" rel="noreferrer noopener">
Grundwissen.de :: Sichere Datenübertragung mit ssh und gpg <em>[Veraltete Beschreibung]</em></a>
</li>
<li><a href="https://www.howtogeek.com/427982/how-to-encrypt-and-decrypt-files-with-gpg-on-linux/"
target="_blank" rel="noreferrer noopener">
HowTo‐Geek :: How to Encrypt and Decrypt Files With GPG on Linux</a>
</li>
<li><a href="https://wiki.ubuntuusers.de/GnuPG/"
target="_blank" rel="noreferrer noopener">
Ubuntu‐Users :: GnuPG</a>
</li>
<li><a href="https://gnupg.org"
target="_blank" rel="noreferrer noopener">
GnuPG :: Homepage</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<code><pre>
<li>cat /dev/null > bigfile</li>
<li>cp /dev/null bigfile</li>
<li>: > bigfile</li>
<li>> bigfile</li>
</pre></code>
</ul>
</html>
<html>
The bash shell saves commands entered from terminal to a history file.<br />
You can recall the list of commands previously typed. The history com–<br />
mand displays bash commands that you executed prior. These commands<br />
make up your command history. By default, history shows a numbered list<br />
of the 500 most recent commands, from earliest to most recent. The value<br />
of the HISTSIZE variable is used as the number of commands to save in a<br />
history list.
<h3>How to display current history</h3>
Just type the history command:
<code><pre>
history
history | less
history | more
history | grep 'find'
</pre></code>
<h3>How to find out the number of commands saved in history</h3>
Use echo command or printf command :
<code><pre>echo "$HISTSIZE"</pre></code>
OR
<code><pre>printf "%d\n" $HISTSIZE</pre></code>
Sample outputs:
<code><pre>
1000
</pre></code>
The value of the HISTSIZE variable indicates that the 1000 number of com–
mands saved in a history list.
<h3>Where are my bash history commands stored</h3>
The history is initialized from the file named by the variable <b>HISTFILE</b>. The <br />
default is <b>~/.bash_history</b> file. To view current settings run:
<code><pre>echo "$HISTFILE"</pre></code>
OR
<code><pre>printf "%s\n" "$HISTFILE"</pre></code>
Sample outputs:
<code><pre>
/home/vivek/.bash_history
</pre></code>
<h3>How to disable BASH shell history on Linux or Unix</h3>
You can remove HISTFILE shell variable by typing the following unset command:
<code><pre>unset HISTFILE</pre></code>
Add above line to the end of to a new /etc/profile.d/disable.history.sh file or ~/.bash_profile:
<code><pre>echo 'unset HISTFILE' >> /etc/profile.d/disable.history.sh</pre></code>
OR
<code><pre>echo 'unset HISTFILE' >> ~/.bash_profile</pre></code>
<h3>How to permanently disable bash history using set command</h3>
Another option is to pass the +o history option to the set builtin command:
<code><pre>set +o history</pre></code>
Again add set +o history to the end of to a new <b>/etc/profile.d/disable.history.sh</b><br />
file or <b>~/.bash_profile</b>. See how to set and use shell option in bash for more info.<br />
<h3>How to clear the bash history</h3>
Type the following command in your current session:
<code><pre>history -c</pre></code>
To delete a single command number 42 from history in Linux/Unix:
<code><pre>history -d 42</pre></code>
<h3>How to disable bash shell history on Linux</h3>
See <a href="https://www.cyberciti.biz/howto/shell-primer-configuring-your-linux-unix-osx-environment/" target="_blank">Shell Primer: Master Your Linux, OS X, Unix Shell Environment</a> <br />
for more info.<br />
<br />
This entry is 1 of 5 in the Bash HISTORY Tutorial series. Keep reading the <br />
rest of the series:
<ol>
<li> How to disable bash shell history in Linux</li>
<li> <a href="https://www.cyberciti.biz/faq/delete-command-from-history-linux-unix-osx-bash-shell/" target="_blank">How to delete a single command from history on Linux/Unix Bash shell</a></li>
<li> <a href="https://www.cyberciti.biz/faq/clear-the-shell-history-in-ubuntu-linux/" target="_blank">Clear Shell History In Ubuntu Linux</a></li>
<li> <a href="https://www.cyberciti.biz/faq/howto-flush-clearing-command-line-cache/" target="_blank">Clear Linux / UNIX BASH Shell Command Line Cache / History</a></li>
<li> <a href="https://www.cyberciti.biz/faq/unix-linux-bash-history-display-date-time/" target="_blank">Bash History: Display Date And Time For Each Command</a></li>
</ol>
<br />
<h3>Link:</h3>
<a href="www.cyberciti.biz/faq/disable-bash-shell-history-linux/" target="_blank">nixCraft :: How to disable bash shell history in Linux</a><br />
<br />
</html>
<html>
First, you need to setup a normal user account. Next, configure SSH keys for login. Once you have SSH Keys configured, you need to disable password login for all users include root. In this guide, shows you how to generate an ssh key and disable password authentication on the Linux or Unix-based system. For demo purpose I am using a Ubuntu Linux here.
<h3>Step 1 :: Login to the remote server</h3>
Use the ssh command or client such as Putty:
<code><pre>
$ ssh root@server-ip-here
$ ssh root@server1.cyberciti.biz
</pre></code>
<h3>Step 2 :: Create a new user account</h3>
Type the following command on Linux based system to create a new user named vivek:
<code><pre>
# useradd -m -s /bin/bash vivek
</pre></code>
Set the user's password:
<code><pre>
# passwd vivek
</pre></code>
Sample outputs:
<code><pre>
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
</pre></code>
Add user to sudo (Ubuntu/Debian) or wheel (RHEL/CentOS) supplementary/secondary group:
<code><pre>
# usermod -aG sudo vivek
</pre></code>
OR for RHEL/CentOS Linux:
<code><pre>
# usermod -aG wheel vivek
</pre></code>
The above command allows people in group wheel or sudo to run all commands. Verify it:
<code><pre>
# su - vivek
$ id vivek
</pre></code>
Sample outputs:
<code><pre>
uid=1000(vivek) gid=1000(vivek) groups=1000(vivek),27(sudo)
</pre></code>
Exit a login shell:
$ logout
<h3>How to disable ssh password login/authentication for SSH</h3>
Please note that you can add existing users to sudo or wheel group too. No need to create a new user account:
<code><pre>
# usermod -aG sudo userNameHere #Debian/Ubuntu
# usermod -aG wheel userNameHere #CentOS/RHEL
</pre></code>
<h3>Step 3 :: Install ssh keys on a remote machine</h3>
All command must be executed on local system/desktop/macos/freebsd workstation. Create the key pair:
<code><pre>
$ ssh-keygen -t rsa
</pre></code>
Install the public key in remote server:
<code><pre>
$ ssh-copy-id -i $HOME/.ssh/id_rsa.pub vivek@server1.cyberciti.biz
</pre></code>
Sample outputs:
<code><pre>
/usr/local/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/Users/vivek/.ssh/id_rsa.pub"
/usr/local/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/local/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
vivek@ln.cbzc01's password:
Number of key(s) added: 1
</pre></code>
Now try logging into the machine, with: "ssh 'vivek@server1.cyberciti.biz'"
and check to make sure that only the key(s) you wanted were added.
Test ssh keybase login:
$ ssh vivek@server1.cyberciti.biz
Sample outputs:
Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 4.8.6-x86_64-linode78 x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
To run a command as administrator (user "root"), use "sudo ".
See "man sudo_root" for details.
vivek@ubuntu:~$
To run a command as administrator (user “root“), use “sudo {command}“. For example:
$ sudo ls /root/
To gain root shell, enter:
$ sudo -s
See How To Setup SSH Keys on a Linux / Unix System for more information.
<h3>Step 4 :: Disable root login and password based login</h3>
Edit the /etc/ssh/sshd_config file, enter:
$ sudo vi /etc/ssh/sshd_config
Find ChallengeResponseAuthentication and set to no:
ChallengeResponseAuthentication no
Find PasswordAuthentication set to no
PasswordAuthentication no
Find UsePAM and set to no:
UsePAM no
Find PermitRootLogin and set to no:
PermitRootLogin no
Save and close the file. Reload the ssh server:
# /etc/init.d/ssh reload
OR
$ sudo systemctl reload ssh
OR Use the following on RHEL/CentOS Linux
# /etc/init.d/sshd reload
<h3>Step 5 :: Verification</h3>
Try to login as root:
$ ssh root@server1.cyberciti.biz
Permission denied (publickey).
Try to login with password only:
$ ssh vivek@server1.cyberciti.biz -o PubkeyAuthentication=no
Permission denied (publickey).
And there you have it, password authentication for SSH disabled including root user. Your server will now only accept key based login and the root user can not login with password.
<h3>Link:</h3>
<a href="https://www.cyberciti.biz/faq/how-to-disable-ssh-password-login-on-linux/" target="_blank">nixCraft</a>
</html>
<html>
Link:<br />
<a href="https://www.cyberciti.biz/faq/scp-exclude-files-when-using-command-recursively-on-unix-linux/" target="_blank">Cyberciti</a>
</html>
<html>
Standard error (also known as stderr) is the default error output device. <br />
Use <b>stderr</b> to write all system error messages. The number two (2) <br />
denotes the stderr. The default stderr is the screen or monitor. Standard<br />
output (also known as stdout) is used by a command to writes (display)<br />
its output. The default stdout is the screen. It is denoted by one number (1).
<h3>2> is input redirection symbol and syntax is:</h3>
<ol>
<li> To redirect stderr (standard error) to a file:<br />
<code> command 2> errors.txt</code></li>
<li> To redirect both stderr and stdout (standard output):<br />
<code> command &> output.txt</code></li>
</ol>
You must replace command with the command you want to run. Let<br />
us see some examples that explains redirection of standard error in bash.
<h3>How to redirect standard error in bash</h3>
Run find command and save all error messages to find.error.txt file:
<code><pre>
find / -name "*.conf" 2> find.error.txt
</pre></code>
You can view find.error.txt with the cat command:
<code><pre>
cat find.error.txt
</pre></code>
Sample outputs:
<code><pre>
find: '/boot/grub2': Permission denied
find: ''/proc/tty/driver': Permission denied
find: '/proc/1/task/1/fd': Permission denied
find: '/proc/1/task/1/fdinfo': Permission denied
...
..
find: '/proc/963/task/963/ns': Permission denied
find: '/proc/963/task/1078/fd': Permission denied
find: '/proc/963/task/1078/fdinfo': Permission denied
....
..
find: '/var/spool/postfix/public': Permission denied
find: '/var/spool/postfix/saved': Permission denied
find: '/var/spool/postfix/trace': Permission denied
find: '/usr/share/polkit-1/rules.d': Permission denied
find: '/usr/libexec/initscripts/legacy-actions/auditd': Permission denied
</pre></code>
You need to use <code><b>'2>'</b></code> when you want to redirect stderr to a file. <br />
You can redirect stdout to file named results.txt and stderr to file named errors.txt:
<code><pre>
find / -name "*.conf" >results.txt 2>error.txt
</pre></code>
Verify results with the cat command:
<code><pre>
cat results.txt
cat error.txt
</pre></code>
This is useful in shell scripts or any other purpose.
<h3>How to redirect standard error and standard output in bash</h3>
You can send both stdout and stderr to a file named output.txt:
<code><pre>
command &>output.xt
find / -name "*.pl" &>filelist.txt
</pre></code>
Please note that both errors and actual output of the find command stored into a file:
<code><pre>
cat filelist.txt
</pre></code>
Sample outputs:
<code><pre>
/usr/bin/rsyslog-recover-qi.pl
/usr/lib/grub/i386-pc/gmodule.pl
/usr/lib/firmware/dsp56k/concat-bootstrap.pl
/usr/share/doc/GeoIP-1.5.0/fetch-geoipdata-city.pl
/usr/share/doc/GeoIP-1.5.0/fetch-geoipdata.pl
/usr/share/doc/postfix-2.10.1/examples/smtpd-policy/greylist.pl
find: '/usr/share/polkit-1/rules.d': Permission denied
find: '/usr/libexec/initscripts/legacy-actions/auditd': Permission denied
</pre></code>
<h3>Summary</h3>
<table border="1">
<tr><th>Command</th><th>Description/Purpose</th></tr>
<tr><td>command 2>filename</td><td>Redirect stderr to filename</td></tr>
<tr><td>command >output 2>filename</td><td>Redirect stderr to file named filename <br />and stdout to file named output</td></tr>
<tr><td>command &> filename</td><td>Redirect stderr and stdout to filename</td></tr>
<tr><td>command 2>&-</td><td>Just suppress error messages.<br /> No file created. No error message displayed on screen</td></tr>
<tr><td>command 2>&1
<code><pre>
die(){
echo "$1" 2>&1
}
die "File not found"
</pre></code></td><td>Redirect error messages to standard output. <br /><br />Useful in shell script when you need <br />to forcefully display error messages on screen</td></tr>
</table>
For more info see bash man page online or read it at the cli:
<cde><pre>man bash</pre></code>
<h3>Link:</h3>
<a href="https://www.cyberciti.biz/faq/how-to-redirect-standard-error-in-bash/" target="_blank">nixCraft :: How to redirect standard error in bash</a>
</html>
<html>
In System V, you can use the following command<br />
to see who is accessing a particular file system:<br />
<br /><code>
fuser <file system><br />
</code><br />
For example, to see who is accessing the /cdrom directory:<br />
<br /><code>
fuser /cdrom<br />
</code><br />
This command is useful if you wish to unmount <br />
a file system but the system is unable to do so<br />
because it is being used.<br />
<br />
This tip generously supported <br />
by: anthony-leong@usa.net<br />
</html>
<html>
<ul>
<li>mit Hilfe des Programms <b>display-im6</b>:
<pre><code>for i in $(\ls -1 ./pictures/SSL-TLS-BeginnersTutorial-0*); do echo ${i}; display-im6 -verbose ${i}; done</code></pre>
</li>
</ul>
</html>
<html>
<ul>
<li><pre><code>soffice --headless --nologo --nofirststartwizard --norestore --convert-to jpg:<em>draw_jpg_Export</em> "<em>full_path_and_filename_source_draw_document</em>.odg" --outdir <em>path_to_output_folder</em></code></pre>
</li>
<li>Name of filter can be <em>draw_png_Export</em> or <a href="https://ask.libreoffice.org/t/what-are-the-5-x-graphics-import-export-filters/15180?u=johnsun" target="_blank" rel="noreferrer noopener">any other</a>;
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://stackoverflow.com/questions/76054978/code-or-command-line-for-converting-odg-open-document-graphic-to-png-jpeg-et"
target="_blank" rel="noreferrer noopener">
StackOverflow :: Code or command-line for converting ODG (open document graphic) to PNG, JPEG, etc? (Windows and/or macOS)</a>
</li>
</ul>
</html>
<html>
<p>
<code><b>/sbin/iptables</b></code> command for IPv4 packet filtering and NAT. Network address translation (NAT) modifyies IP address information in IP packet headers while in transit across a routing device.</p>
<p>
To see NAT rules type any one of the following command.
</p>
<h3>Syntax</h3>
The syntax is as follows for iptables command as root user to display IPv4 rules:
<code><pre>
iptables -t nat -L
iptables -t nat -L -n -v | grep 'something'
iptables -t nat -L -n -v
</pre></code>
Sample outputs:
<code><pre>
Chain PREROUTING (policy ACCEPT 867 packets, 146K bytes)
pkts bytes target prot opt in out source destination
0 0 DROP all -- vlan2 * 0.0.0.0/0 192.168.1.0/24
Chain POSTROUTING (policy ACCEPT 99 packets, 6875 bytes)
pkts bytes target prot opt in out source destination
0 0 MASQUERADE all -- * vlan2 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 99 packets, 6875 bytes)
pkts bytes target prot opt in out source destination
Chain WANPREROUTING (0 references)
pkts bytes target prot opt in out source destination
root@tswitch:/tmp/home/root#
</pre></code>
Understanding iptables nat rules listing options
<ul>
<li><b>‐t nat</b> :<br />This option specifies the packet matching table which the command should operate on. In this example, I am working on nat table. It is consulted when a packet that creates a new connection is encountered. <br />
It consists of four built-ins:
<ul>
<li><em><b>PREROUTING</b></em> for altering packets as soon as they come in</li>
<li><em><b>INPUT</b></em> for altering packets destined for local sockets</li>
<li><em><b>OUTPUT</b></em> for altering locally-generated packets before routing</li>
<li><em><b>POSTROUTING</b></em> for altering packets as they are about to go out</li>
</ul>
<li><b>‐L</b> :<br />List all rules in the selected chain.
<li><b>‐n</b> :<br />Numeric output. IP addresses and port numbers will be printed in numeric format. By default, the program will try to display them as host names, network names, or services (whenever applicable).
<li><b>‐v</b> :<br />Verbose output. This option makes the list command show the interface name, the rule options (if any), and the TOS masks. The packet and byte counters are also listed, with the suffix 'K', 'M' or 'G' for 1000, 1,000,000 and 1,000,000,000 multipliers respectively.
</ul>
<h3>Linux Iptables List and Show All NAT IPTables IPv6 Rules Command</h3>
IPv6 NAT support is available since the Linux kernel version 3.7. Listing all IPv6 NAT iptables rules as follows:
<code><pre>
ip6tables -t nat -L
ip6tables -t nat -L -n -v | grep 'something'
ip6tables -t nat -L -n -v
</pre></code>
Outputs:
<code><pre>
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all fd9d:bc11:xxx::/48 anywhere policy match dir out pol none
</pre></code>
Here is another command:
<code><pre>
$ sudo iptables -t nat -L -n -v
</pre></code>
Sample outputs:
<code><pre>
Chain PREROUTING (policy ACCEPT 294K packets, 17M bytes)
pkts bytes target prot opt in out source destination
165K 9879K DNAT tcp -- * * 0.0.0.0/0 192.168.203.146 tcp dpt:443 to:10.105.28.42:443
166K 9982K DNAT tcp -- * * 0.0.0.0/0 192.168.203.146 tcp dpt:80 to:10.105.28.42:80
0 0 DNAT tcp -- * * 0.0.0.0/0 192.168.203.146 tcp dpt:443 to:10.105.28.42:443
0 0 DNAT tcp -- * * 0.0.0.0/0 192.168.203.146 tcp dpt:80 to:10.105.28.42:80
22034 1322K DNAT tcp -- * * 0.0.0.0/0 192.168.203.146 tcp dpt:444 to:10.105.28.45:444
22073 1324K DNAT tcp -- * * 0.0.0.0/0 192.168.203.146 tcp dpt:81 to:10.105.28.45:81
31328 1880K DNAT tcp -- * * 0.0.0.0/0 192.168.203.146 tcp dpt:445 to:10.105.28.44:445
19424 1165K DNAT tcp -- * * 0.0.0.0/0 192.168.203.146 tcp dpt:82 to:10.105.28.44:82
Chain INPUT (policy ACCEPT 199K packets, 12M bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 387 packets, 24906 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 252K packets, 15M bytes)
pkts bytes target prot opt in out source destination
93223 5593K MASQUERADE all -- * * 10.105.28.0/24 !10.105.28.0/24 /* generated for LXD network lxdbr0 */
</pre></code>
<h3>Say hello netstat-nat</h3>
The netstat-nat command display the natted connections on a Linux iptable firewall:
<code><pre>
# netstat-nat -n
</pre></code>
To display SNAT connections, run:
<code><pre>
# netstat-nat -S
</pre></code>
To display DNAT connections, type:
<code><pre>
# netstat-nat -D
</pre></code>
Please note that you may get the following message on the latest version of Linux:
Could not read info about connections from the kernel, make sure netfilter is enabled in kernel or by modules.
(https://www.nixcraft.com/t/could-not-read-info-about-connections-from-the-kernel-make-sure-netfilter-is-enabled-in-kernel-or-by-modules/3842)
Then use the conntrack command:
<code><pre>
sudo conntrack -L # List/dump
sudo conntrack -L -n # Filter source NAT connections
sudo conntrack -L -g # Filter destination NAT connections
sudo conntrack -L -j # Filter any NAT connection
</pre></code>
<h3>Summing up</h3>
You need to use either iptables or ip6tables command as follows:
<code><pre>
sudo iptables -t nat -L # IPv4 rules
sudo ip6tables -t nat -L # IPv6 rules
sudo conntrack -L -j
</pre></code>
For more information see the following man pages using the man command as follows:
<code><pre>
man iptables #IPv4
man ip6tables #IPv6
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://www.cyberciti.biz/faq/howto-iptables-show-nat-rules/" target="_blank" rel="noreferrer noopener">
nixCraft :: How To ‐ iptables show NAT rules</a></li>
</ul>
</html>
<html>
<h3>Procedure to find process by name on Linux</h3>
<ol>
<li>Open the terminal application.</li>
<li>Type the pidof command as follows to find PID for firefox process:<br />
<code> pidof firefox</code></li>
<li>Or use the ps command along with grep command as follows:<br />
<code> ps aux | grep -i firefox</code></li>
<li> To look up or signal processes based on name use:<br />
<code> pgrep firefox</code></li>
</ol>
<h3>Linux find process by name using pgrep command</h3>
pgrep command looks through the currently running processes and lists the process IDs which match the selection criteria to screen. All the criteria have to match. For example, will only list the processes called sshd AND owned by root user:
<code><pre>
$ pgrep -u root sshd
</pre></code>
Just look up pid for firefox process:
<code><pre>
$ pgrep firefox
</pre></code>
<h3>How to use 'ps aux | grep command'</h3>
ps command shows information about a selection of the active processes:
<code><pre>
$ ps aux
$ ps aux | grep -i 'search-term'
$ ps aux | grep 'firefox'
$ ps aux | grep 'sshd'
</pre></code>
OR use the following syntax instead of using egrep command in pipes:
<code><pre>
$ ps -fC firefox
$ ps -fC chrome
</pre></code>
The -C option asks ps command to select PIDs by command name.
<h3>Using pidof command to grab PIDs for any named program on Linux</h3>
The pidof command finds the process id's (pids) of the named programs such as sshd, firefox and more. For example:
<code><pre>
$ pidof sshd
$ pidof firefox
</pre></code>
<h3>A note about top/htop command</h3>
To display Linux processes use top command or htop command:
<code><pre>
$ top
</pre></code>
OR
<code><pre>
$ htop
</pre></code>
<h3>Link:</h3>
<a href="https://www.cyberciti.biz/faq/linux-find-process-name/" target="_blank">nixCraft :: Linux find process by name</a>
</html>
<html>
<ul>
<li>in das File <code><b>/etc/profile</b></code><br />
oder im lokalen <code><b>~/.profile</b></code><br /> folgende Zeilen eintragen:<br />
<code><pre>
TMOUT = 0
export TMOUT
</pre></code></li>
</ul>
</html>
<html>
If you need to maintain an application that generate<br />
a lot of logfiles or tmp files with running numbers<br />
as part of the filename and uses a common extension.<br />
These two command together will help to maintain it<br />
for a window of time.<br />
<br />
It compress those files that are more than 24hrs and<br />
have it remove after 120hrs. You need to put it in<br />
daily cron.
<code><pre>
find $LOGDIR -name '*.ext' -mtime +0 -exec compress {} \;
find $LOGDIR -name '*.Z' -mtime +5 -exec rm -f {} \;
</pre></code>
You can change the time to suit your needs and use<br />
wherever compressing utility you have to save space.<br />
If you need to maintain directories created by<br />
application here are help;
<code><pre>
find $LOGDIR -type d -mtime +0 -exec compress -r {} \;
find $LOGDIR -type d -mtime +5 -exec rm -f {} \
</pre></code>
The compression is to save space while waiting to be<br />
deleted. Application developers may need to read<br />
these files/directories so keep those files/directories<br />
for a certain amount of time before deleting.<br />
<br />
This tip generously supported <br />
by: tyl@computer.org
</html>
<html>
<meta NAT />
Network address translation (NAT) modifyies IP address<br />
information in IP packet headers while in transit across<br />
a routing device.<br />
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://www.informatik-aktuell.de/betrieb/it-security/nmap-portscanner-hacking-tool-alleskoenner-teil-i.html"
target="_blank" rel="noreferrer noopener">
Informatik-aktuell :: Nmap - Teil I</a>
</li>
<li><a href="https://www.informatik-aktuell.de/betrieb/it-security/nmap-portscanner-hacking-tool-alleskoenner-teil-ii.html"
target="_blank" rel="noreferrer noopener">
Informatik-aktuell :: Nmap - Teil II</a>
</li>
<li><a href="https://nmap.org/book/port-scanning-tutorial.html"
target="_blank" rel="noreferrer noopener">
Nmap - Homepage :: Tutorial "Port scanning"</a>
</li>
</ul>
</html>
<html>
<p>nmap is short for <b>Network Mapper</b>. <br />
<br />
It is an open source security tool for network exploration,<br />
security scanning and auditing. However, nmap command<br />
comes with lots of options that can make the utility more<br />
robust and difficult to follow for new users. The purpose of<br />
this post is to introduce a user to the nmap command line<br />
tool to scan a host and/or network, so to find out the possible<br />
vulnerable points in the hosts. You will also learn how to use<br />
Nmap for offensive and defensive purposes. Let us see some<br />
common nmap command examples.
</p>
<h3>What is Nmap and what is it used for?</h3>
From the man page:
<p>
<em>Nmap (“Network Mapper“) is an open source tool for network exploration and security auditing. It was designed to rapidly scan large networks, although it works fine against single hosts. Nmap uses raw IP packets in novel ways to determine what hosts are available on the network, what services (application name and version) those hosts are offering, what operating systems (and OS versions) they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics. While Nmap is commonly used for security audits, many systems and network administrators find it useful for routine tasks such as network inventory, managing service upgrade schedules, and monitoring host or service uptime.</em><br />
</p>
It was originally written by Gordon Lyon and it can answer the following questions easily:
<ul>
<li> What computers did you find running on the local network?</li>
<li> What IP addresses did you find running on the local network?</li>
<li> What is the operating system of your target machine?</li>
<li> Find out what ports are open on the machine that you just scanned?</li>
<li> Find out if the system is infected with malware or virus.</li>
<li> Search for unauthorized servers or network service on your network.</li>
<li> Find and remove computers which don't meet the organization's minimum level of security.</li>
</ul>
<h3>Sample setup (LAB)</h3>
Port scanning may be illegal in some jurisdictions. So setup a lab as follows:<br />
<img src="./pictures/nmap_cyberciti_01.png" height=270 width=565 /><br /> <!-- height=359 width=754 -->
<br />
Where,
<ul>
<li><b>wks01</b> is your computer either running Linux/OS X or Unix like operating system. It is used for scanning your local network. The nmap command must be installed on this computer.</li>
<li><b>server1</b> can be powered by Linux / Unix / MS-Windows operating systems. This is an unpatched server. Feel free to install a few services such as a web-server, file server and so on.</li>
<li><b>server2</b> can be powered by Linux / Unix / MS-Windows operating systems. This is a fully patched server with firewall. Again, feel free to install few services such as a web-server, file server and so on.</li>
<li>All three systems are connected via switch.</li>
</ul>
<h3>How do I install nmap?</h3>
See:
<ul>
<li><a href="https://www.cyberciti.biz/faq/install-nmap-debian-ubuntu-server-desktop-system/
target="_blank" rel="noreferrer noopener">
Debian / Ubuntu Linux: Install nmap Software For Scanning Network
</a>
</li>
<li><a href="https://www.cyberciti.biz/faq/howto-install-nmap-on-centos-rhel-redhat-enterprise-linux/
target="_blank" rel="nreferrer noopener">
CentOS / RHEL: Install nmap Network Security Scanner
</a>
</li>
<li><a href="https://www.cyberciti.biz/faq/installing-nmap-network-port-scanner-under-openbsd-using-pkg_add/
target="_blank" rel="noreferrer noopener">
OpenBSD: Install nmap Network Security Scanner
</a>
</li>
</ul>
<h3>#1: Scan a single host or an IP address (IPv4)</h3>
<code><pre>
<b>### Scan a single ip address ###</b>
nmap 192.168.1.1
<b>## Scan a host name ###</b>
nmap server1.cyberciti.biz
<b>## Scan a host name with more info###</b>
nmap -v server1.cyberciti.biz
</pre></code>
Sample outputs:<br />
<img src="./pictures/redhat-nmap-command-output.png" height=176 width=592 /><br />
<h3>#2: Scan multiple IP address or subnet (IPv4)</h3>
<code><pre>
nmap 192.168.1.1 192.168.1.2 192.168.1.3
## works with same subnet i.e. 192.168.1.0/24
nmap 192.168.1.1,2,3
</pre></code>
You can scan a range of IP address too:
<code><pre>
nmap 192.168.1.1-20
</pre></code>
You can scan a range of IP address using a wildcard:
<code><pre>
nmap 192.168.1.*
</pre></code>
Finally, you scan an entire subnet:
<code><pre>
nmap 192.168.1.0/24
</pre></code>
<h3>#3: Read list of hosts/networks from a file (IPv4)</h3>
The -iL option allows you to read the list of target systems<br />
using a text file. This is useful to scan a large number of<br />
hosts/networks. Create a text file as follows:
<code><pre>
cat > /tmp/test.txt
</pre></code>
Sample outputs:
<code><pre>
server1.cyberciti.biz
192.168.1.0/24
192.168.1.1/24
10.1.2.3
localhost
</pre></code>
The syntax is:
<code><pre>
nmap -iL /tmp/test.txt
</pre></code>
<h3>#4: Excluding hosts/networks (IPv4)</h3>
When scanning a large number of hosts/networks you can exclude hosts from a scan:
<code><pre>
nmap 192.168.1.0/24 --exclude 192.168.1.5
nmap 192.168.1.0/24 --exclude 192.168.1.5,192.168.1.254
</pre></code>
OR exclude list from a file called /tmp/exclude.txt
<code><pre>
nmap -iL /tmp/scanlist.txt --excludefile /tmp/exclude.txt
</pre></code>
<h3>#5: Turn on OS and version detection scanning script (IPv4)</h3>
<code><pre>
nmap -A 192.168.1.254
nmap -v -A 192.168.1.1
nmap -A -iL /tmp/scanlist.txt
</pre></code>
<h3>#6: Find out if a host/network is protected by a firewall</h3>
<code><pre>
nmap -sA 192.168.1.254
nmap -sA server1.cyberciti.biz
</pre></code>
<h3>#7: Scan a host when protected by the firewall</h3>
<code><pre>
nmap -PN 192.168.1.1
nmap -PN server1.cyberciti.biz
</pre></code>
<h3>#8: Scan an IPv6 host/address</h3>
The -6 option enable IPv6 scanning. The syntax is:
<code><pre>
nmap -6 IPv6-Address-Here
nmap -6 server1.cyberciti.biz
nmap -6 2607:f0d0:1002:51::4
nmap -v A -6 2607:f0d0:1002:51::4
</pre></code>
<h3>#9: Scan a network and find out which servers and devices are up and running</h3>
This is known as host discovery or ping scan:
<code><pre>
nmap -sP 192.168.1.0/24
</pre></code>
Sample outputs:
<code><pre>
Host 192.168.1.1 is up (0.00035s latency).
MAC Address: BC:AE:C5:C3:16:93 (Unknown)
Host 192.168.1.2 is up (0.0038s latency).
MAC Address: 74:44:01:40:57:FB (Unknown)
Host 192.168.1.5 is up.
Host nas03 (192.168.1.12) is up (0.0091s latency).
MAC Address: 00:11:32:11:15:FC (Synology Incorporated)
Nmap done: 256 IP addresses (4 hosts up) scanned in 2.80 second
</pre></code>
<h3>#10: How do I perform a fast scan?</h3>
<code><pre>
nmap -F 192.168.1.1
</pre></code>
<img src="./pictures/Practical-Examples-of-NMAP-Commands-for-Linux-System.png" height=240 width=450 /><br /> <!-- height=314 width=599 -->
<h3>#11: Display the reason a port is in a particular state</h3>
<code><pre>
nmap --reason 192.168.1.1
nmap --reason server1.cyberciti.biz
</pre></code>
<h3>#12: Only show open (or possibly open) ports</h3>
<code><pre>
nmap --open 192.168.1.1
nmap --open server1.cyberciti.biz
</pre></code>
<h3>#13: Show all packets sent and received</h3>
<code><pre>
nmap --packet-trace 192.168.1.1
nmap --packet-trace server1.cyberciti.biz
</pre></code>
<h3>#14: Show host interfaces and routes</h3>
This is useful for debugging (ip command or route command or netstat command like output using nmap)
<code><pre>
nmap --iflist
</pre></code>
Sample outputs:
<code><pre>
Starting Nmap 5.00 ( http://nmap.org ) at 2012-11-27 02:01 IST
************************INTERFACES************************
DEV (SHORT) IP/MASK TYPE UP MAC
lo (lo) 127.0.0.1/8 loopback up
eth0 (eth0) 192.168.1.5/24 ethernet up B8:AC:6F:65:31:E5
vmnet1 (vmnet1) 192.168.121.1/24 ethernet up 00:50:56:C0:00:01
vmnet8 (vmnet8) 192.168.179.1/24 ethernet up 00:50:56:C0:00:08
ppp0 (ppp0) 10.1.19.69/32 point2point up
**************************ROUTES**************************
DST/MASK DEV GATEWAY
10.0.31.178/32 ppp0
209.133.67.35/32 eth0 192.168.1.2
192.168.1.0/0 eth0
192.168.121.0/0 vmnet1
192.168.179.0/0 vmnet8
169.254.0.0/0 eth0
10.0.0.0/0 ppp0
0.0.0.0/0 eth0 192.168.1.2
</pre></code>
<h3>#15: How do I scan specific ports?</h3>
<code><pre>
nmap -p [port] hostName
</pre></code>
Examples:
<code><pre>
## Scan port 80
nmap -p 80 192.168.1.1
## Scan TCP port 80
nmap -p T:80 192.168.1.1
## Scan UDP port 53
nmap -p U:53 192.168.1.1
## Scan two ports ##
nmap -p 80,443 192.168.1.1
## Scan port ranges ##
nmap -p 80-200 192.168.1.1
## Combine all options ##
nmap -p U:53,111,137,T:21-25,80,139,8080 192.168.1.1
nmap -p U:53,111,137,T:21-25,80,139,8080 server1.cyberciti.biz
nmap -v -sU -sT -p U:53,111,137,T:21-25,80,139,8080 192.168.1.254
## Scan all ports with * wildcard ##
nmap -p "*" 192.168.1.1
## Scan top ports i.e. scan $number most common ports ##
nmap --top-ports 5 192.168.1.1
nmap --top-ports 10 192.168.1.1
</pre></code>
Sample outputs:
<code><pre>
Starting Nmap 5.00 ( http://nmap.org ) at 2012-11-27 01:23 IST
Interesting ports on 192.168.1.1:
PORT STATE SERVICE
21/tcp closed ftp
22/tcp open ssh
23/tcp closed telnet
25/tcp closed smtp
80/tcp open http
110/tcp closed pop3
139/tcp closed netbios-ssn
443/tcp closed https
445/tcp closed microsoft-ds
3389/tcp closed ms-term-serv
MAC Address: BC:AE:C5:C3:16:93 (Unknown)
Nmap done: 1 IP address (1 host up) scanned in 0.51 seconds
</pre></code>
<h3>#16: The fastest way to scan all your devices/computers for open ports ever</h3>
<code><pre>
nmap -T5 192.168.1.0/24
</pre></code>
<h3>#17: How do I detect remote operating system?</h3>
You can identify a remote host apps and OS using the -O option:
<code><pre>
nmap -O 192.168.1.1
nmap -O --osscan-guess 192.168.1.1
nmap -v -O --osscan-guess 192.168.1.1
</pre></code>
Sample outputs:
<code><pre>
Starting Nmap 5.00 ( http://nmap.org ) at 2012-11-27 01:29 IST
NSE: Loaded 0 scripts for scanning.
Initiating ARP Ping Scan at 01:29
Scanning 192.168.1.1 [1 port]
Completed ARP Ping Scan at 01:29, 0.01s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 01:29
Completed Parallel DNS resolution of 1 host. at 01:29, 0.22s elapsed
Initiating SYN Stealth Scan at 01:29
Scanning 192.168.1.1 [1000 ports]
Discovered open port 80/tcp on 192.168.1.1
Discovered open port 22/tcp on 192.168.1.1
Completed SYN Stealth Scan at 01:29, 0.16s elapsed (1000 total ports)
Initiating OS detection (try #1) against 192.168.1.1
Retrying OS detection (try #2) against 192.168.1.1
Retrying OS detection (try #3) against 192.168.1.1
Retrying OS detection (try #4) against 192.168.1.1
Retrying OS detection (try #5) against 192.168.1.1
Host 192.168.1.1 is up (0.00049s latency).
Interesting ports on 192.168.1.1:
Not shown: 998 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
MAC Address: BC:AE:C5:C3:16:93 (Unknown)
Device type: WAP|general purpose|router|printer|broadband router
Running (JUST GUESSING) : Linksys Linux 2.4.X (95%), Linux 2.4.X|2.6.X (94%), MikroTik RouterOS 3.X (92%), Lexmark embedded (90%), Enterasys embedded (89%), D-Link Linux 2.4.X (89%), Netgear Linux 2.4.X (89%)
Aggressive OS guesses: OpenWrt White Russian 0.9 (Linux 2.4.30) (95%), OpenWrt 0.9 - 7.09 (Linux 2.4.30 - 2.4.34) (94%), OpenWrt Kamikaze 7.09 (Linux 2.6.22) (94%), Linux 2.4.21 - 2.4.31 (likely embedded) (92%), Linux 2.6.15 - 2.6.23 (embedded) (92%), Linux 2.6.15 - 2.6.24 (92%), MikroTik RouterOS 3.0beta5 (92%), MikroTik RouterOS 3.17 (92%), Linux 2.6.24 (91%), Linux 2.6.22 (90%)
No exact OS matches for host (If you know what OS is running on it, see http://nmap.org/submit/ ).
TCP/IP fingerprint:
OS:SCAN(V=5.00%D=11/27%OT=22%CT=1%CU=30609%PV=Y%DS=1%G=Y%M=BCAEC5%TM=50B3CA
OS:4B%P=x86_64-unknown-linux-gnu)SEQ(SP=C8%GCD=1%ISR=CB%TI=Z%CI=Z%II=I%TS=7
OS:)OPS(O1=M2300ST11NW2%O2=M2300ST11NW2%O3=M2300NNT11NW2%O4=M2300ST11NW2%O5
OS:=M2300ST11NW2%O6=M2300ST11)WIN(W1=45E8%W2=45E8%W3=45E8%W4=45E8%W5=45E8%W
OS:6=45E8)ECN(R=Y%DF=Y%T=40%W=4600%O=M2300NNSNW2%CC=N%Q=)T1(R=Y%DF=Y%T=40%S
OS:=O%A=S+%F=AS%RD=0%Q=)T2(R=N)T3(R=N)T4(R=Y%DF=Y%T=40%W=0%S=A%A=Z%F=R%O=%R
OS:D=0%Q=)T5(R=Y%DF=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)T6(R=Y%DF=Y%T=40%W=
OS:0%S=A%A=Z%F=R%O=%RD=0%Q=)T7(R=N)U1(R=Y%DF=N%T=40%IPL=164%UN=0%RIPL=G%RID
OS:=G%RIPCK=G%RUCK=G%RUD=G)IE(R=Y%DFI=N%T=40%CD=S)
Uptime guess: 12.990 days (since Wed Nov 14 01:44:40 2012)
Network Distance: 1 hop
TCP Sequence Prediction: Difficulty=200 (Good luck!)
IP ID Sequence Generation: All zeros
Read data files from: /usr/share/nmap
OS detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 12.38 seconds
Raw packets sent: 1126 (53.832KB) | Rcvd: 1066 (46.100KB)
</pre></code>
See also: <a href="https://www.cyberciti.biz/faq/find-out-remote-webserver-name/"
target="_blank" rel="noreferrer noopener">
Fingerprinting a web-server</a> and a
<a href="https://www.cyberciti.biz/tips/howto-remotely-determine-dns-server-version.html"
target="_blank" rel="noreferrer noopener">
dns server</a> command line tools for more information.
<h3>#18: How do I detect remote services (server / daemon) version numbers?</h3>
<code><pre>
nmap -sV 192.168.1.1
</pre></code>
Sample outputs:
<code><pre>
Starting Nmap 5.00 ( http://nmap.org ) at 2012-11-27 01:34 IST
Interesting ports on 192.168.1.1:
Not shown: 998 closed ports
PORT STATE SERVICE VERSION
22/tcp open ssh Dropbear sshd 0.52 (protocol 2.0)
80/tcp open http?
1 service unrecognized despite returning data.
</pre></code>
<h3>#19: Scan a host using TCP ACK (PA) and TCP Syn (PS) ping</h3>
If firewall is blocking standard ICMP pings, try the following host discovery methods:
<code><pre>
nmap -PS 192.168.1.1
nmap -PS 80,21,443 192.168.1.1
nmap -PA 192.168.1.1
nmap -PA 80,21,200-512 192.168.1.1
</pre></code>
<h3>#20: Scan a host using IP protocol ping</h3>
<code><pre>
nmap -PO 192.168.1.1
</pre></code>
<h3>#21: Scan a host using UDP ping</h3>
This scan bypasses firewalls and filters that only screen TCP:
<code><pre>
nmap -PU 192.168.1.1
nmap -PU 2000.2001 192.168.1.1
</pre></code>
<h3>#22: Find out the most commonly used TCP ports using TCP SYN Scan</h3>
<code><pre>
### Stealthy scan ###
nmap -sS 192.168.1.1
### Find out the most commonly used TCP ports using TCP connect scan (warning: no stealth scan)
### OS Fingerprinting ###
nmap -sT 192.168.1.1
### Find out the most commonly used TCP ports using TCP ACK scan
nmap -sA 192.168.1.1
### Find out the most commonly used TCP ports using TCP Window scan
nmap -sW 192.168.1.1
### Find out the most commonly used TCP ports using TCP Maimon scan
nmap -sM 192.168.1.1
</pre></code>
<h3>#23: Scan a host for UDP services (UDP scan)</h3>
Most popular services on the Internet run over the TCP protocol. DNS, SNMP, and DHCP are three of the most common UDP services. Use the following syntax to find out UDP services:
<code><pre>
nmap -sU nas03
nmap -sU 192.168.1.1
</pre></code>
Sample outputs:
<code><pre>
Starting Nmap 5.00 ( http://nmap.org ) at 2012-11-27 00:52 IST
Stats: 0:05:29 elapsed; 0 hosts completed (1 up), 1 undergoing UDP Scan
UDP Scan Timing: About 32.49% done; ETC: 01:09 (0:11:26 remaining)
Interesting ports on nas03 (192.168.1.12):
Not shown: 995 closed ports
PORT STATE SERVICE
111/udp open|filtered rpcbind
123/udp open|filtered ntp
161/udp open|filtered snmp
2049/udp open|filtered nfs
5353/udp open|filtered zeroconf
MAC Address: 00:11:32:11:15:FC (Synology Incorporated)
Nmap done: 1 IP address (1 host up) scanned in 1099.55 seconds
</pre></code>
<h3>#24: Scan for IP protocol</h3>
This type of scan allows you to determine which IP protocols (TCP, ICMP, IGMP, etc.) are supported by target machines:
<code><pre>
nmap -sO 192.168.1.1
</pre></code>
<h3>#25: Scan a firewall for security weakness</h3>
The following scan types exploit a subtle loophole in the TCP and good for testing security of common attacks:
<code><pre>
## TCP Null Scan to fool a firewall to generate a response ##
## Does not set any bits (TCP flag header is 0) ##
nmap -sN 192.168.1.254
## TCP Fin scan to check firewall ##
## Sets just the TCP FIN bit ##
nmap -sF 192.168.1.254
## TCP Xmas scan to check firewall ##
## Sets the FIN, PSH, and URG flags, lighting the packet up like a Christmas tree ##
nmap -sX 192.168.1.254
</pre></code>
See <a href="https://www.cyberciti.biz/tips/linux-iptables-10-how-to-block-common-attack.html"
target="_blank" rel="noreferrer noopener"> how to block Xmas packkets, syn-floods and other conman attacks</a> with iptables.
<h3>#26: Scan a firewall for packets fragments</h3>
The -f option causes the requested scan (including ping scans) to use tiny fragmented IP packets. The idea is to split up the TCP header over
several packets to make it harder for packet filters, intrusion detection systems, and other annoyances to detect what you are doing.
<code><pre>
nmap -f 192.168.1.1
nmap -f fw2.nixcraft.net.in
nmap -f 15 fw2.nixcraft.net.in
## Set your own offset size with the --mtu option ##
nmap --mtu 32 192.168.1.1
</pre></code>
<h3>#27: Cloak a scan with decoys</h3>
The -D option it appear to the remote host that the host(s) you specify as <a href="https://www.cyberciti.biz/tips/nmap-hide-ipaddress-with-decoy-ideal-scan.html" target="_blank" rel="noreferrer noopener">decoys are scanning the target network too</a>. Thus their IDS might report 5-10 port scans from unique IP addresses, but they won't know which IP was scanning them and which were innocent decoys:
<code><pre>
nmap -n -Ddecoy-ip1,decoy-ip2,your-own-ip,decoy-ip3,decoy-ip4 remote-host-ip
nmap -n -D192.168.1.5,10.5.1.2,172.1.2.4,3.4.2.1 192.168.1.5
</pre></code>
<h3>#28: Scan a firewall for MAC address spoofing</h3>
<code><pre>
### Spoof your MAC address ##
nmap --spoof-mac MAC-ADDRESS-HERE 192.168.1.1
### Add other options ###
nmap -v -sT -PN --spoof-mac MAC-ADDRESS-HERE 192.168.1.1
### Use a random MAC address ###
### The number 0, means nmap chooses a completely random MAC address ###
nmap -v -sT -PN --spoof-mac 0 192.168.1.1
</pre></code>
<h3>#29: How do I save output to a text file?</h3>
The syntax is:
<code><pre>
nmap 192.168.1.1 > output.txt
nmap -oN /path/to/filename 192.168.1.1
nmap -oN output.txt 192.168.1.1
</pre></code>
<h3>#30 Scans for web servers and pipes into Nikto</a> for scanning</h3>
In this namp examples, I am going to use the <a href="https://cirt.net/Nikto2" target="_blank" rel="noreferrer noopener">Nikto</a>:
<code><pre>
nmap -p80 192.168.1.2/24 -oG - | /path/to/nikto.pl -h -
nmap -p80,443 192.168.1.2/24 -oG - | /path/to/nikto.pl -h -
</pre></code>
<h3>#31 Speed up nmap</h3>
Pass the -T option:
<code><pre>
nmap -v -sS -A -T4 192.168.2.5
</pre></code>
Sample outputs:
<code><pre>
Starting Nmap 7.40 ( https://nmap.org ) at 2017-05-15 01:52 IST
NSE: Loaded 143 scripts for scanning.
NSE: Script Pre-scanning.
Initiating NSE at 01:52
Completed NSE at 01:52, 0.00s elapsed
Initiating NSE at 01:52
Completed NSE at 01:52, 0.00s elapsed
Initiating ARP Ping Scan at 01:52
Scanning 192.168.2.15 [1 port]
Completed ARP Ping Scan at 01:52, 0.01s elapsed (1 total hosts)
Initiating SYN Stealth Scan at 01:52
Scanning dellm6700 (192.168.2.15) [1000 ports]
Discovered open port 5900/tcp on 192.168.2.15
Discovered open port 80/tcp on 192.168.2.15
Discovered open port 22/tcp on 192.168.2.15
Completed SYN Stealth Scan at 01:53, 4.62s elapsed (1000 total ports)
Initiating Service scan at 01:53
Scanning 3 services on dellm6700 (192.168.2.15)
Completed Service scan at 01:53, 6.01s elapsed (3 services on 1 host)
Initiating OS detection (try #1) against dellm6700 (192.168.2.15)
Retrying OS detection (try #2) against dellm6700 (192.168.2.15)
NSE: Script scanning 192.168.2.15.
Initiating NSE at 01:53
Completed NSE at 01:53, 30.02s elapsed
Initiating NSE at 01:53
Completed NSE at 01:53, 0.00s elapsed
Nmap scan report for dellm6700 (192.168.2.15)
Host is up (0.00044s latency).
Not shown: 996 filtered ports
PORT STATE SERVICE VERSION
22/tcp open ssh (protocol 2.0)
| fingerprint-strings:
| NULL:
|_ SSH-2.0-OpenSSH_7.4p1 Ubuntu-10
| ssh-hostkey:
| 2048 1d:14:84:f0:c7:21:10:0e:30:d9:f9:59:6b:c3:95:97 (RSA)
|_ 256 dc:59:c6:6e:33:33:f2:d2:5d:9b:fd:b4:9c:52:c1:0a (ECDSA)
80/tcp open http nginx 1.10.0 (Ubuntu)
| http-methods:
|_ Supported Methods: GET HEAD
|_http-server-header: nginx/1.10.0 (Ubuntu)
|_http-title: Apache2 Ubuntu Default Page: It works
443/tcp closed https
5900/tcp open vnc VNC (protocol 3.7)
1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at https://nmap.org/cgi-bin/submit.cgi?new-service :
SF-Port22-TCP:V=7.40%I=7%D=5/15%Time=5918BCAA%P=x86_64-apple-darwin16.3.0%
SF:r(NULL,20,"SSH-2\.0-OpenSSH_7\.4p1\x20Ubuntu-10\n");
MAC Address: F0:1F:AF:1F:2C:60 (Dell)
Device type: general purpose
Running (JUST GUESSING): Linux 3.X|4.X|2.6.X (95%), OpenBSD 4.X (85%)
OS CPE: cpe:/o:linux:linux_kernel:3 cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:2.6.32 cpe:/o:openbsd:openbsd:4.0
Aggressive OS guesses: Linux 3.11 - 4.1 (95%), Linux 4.4 (95%), Linux 3.13 (92%), Linux 4.0 (90%), Linux 2.6.32 (89%), Linux 2.6.32 or 3.10 (89%), Linux 3.2 - 3.8 (89%), Linux 3.10 - 3.12 (88%), Linux 2.6.32 - 2.6.33 (87%), Linux 2.6.32 - 2.6.35 (87%)
No exact OS matches for host (test conditions non-ideal).
Uptime guess: 0.000 days (since Mon May 15 01:53:08 2017)
Network Distance: 1 hop
TCP Sequence Prediction: Difficulty=252 (Good luck!)
IP ID Sequence Generation: All zeros
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
TRACEROUTE
HOP RTT ADDRESS
1 0.44 ms dellm6700 (192.168.2.15)
NSE: Script Post-scanning.
Initiating NSE at 01:53
Completed NSE at 01:53, 0.00s elapsed
Initiating NSE at 01:53
Completed NSE at 01:53, 0.00s elapsed
Read data files from: /usr/local/bin/../share/nmap
OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 46.02 seconds
Raw packets sent: 2075 (95.016KB) | Rcvd: 50 (3.084KB)
</pre></code>
<h3>#32: Not a fan of command line tools?</h3>
Try <a href="https://nmap.org/zenmap/" target="_blank" rel="noreferrer noopener">Zenmap</a> the official network mapper front end:
<em>Zenmap is the official Nmap Security Scanner GUI. It is a multi-platform (Linux, Windows, Mac OS X, BSD, etc.) free and open source application which aims to make Nmap easy for beginners to use while providing advanced features for experienced Nmap users. Frequently used scans can be saved as profiles to make them easy to run repeatedly. A command creator allows interactive creation of Nmap command lines. Scan results can be saved and viewed later. Saved scan results can be compared with one another to see how they differ. The results of recent scans are stored in a searchable database.</em>
You can install zenmap using the following apt-get command:
<code><pre>
$ sudo apt-get install zenmap
</pre></code>
Sample outputs:
<code><pre>
[sudo] password for vivek:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
zenmap
0 upgraded, 1 newly installed, 0 to remove and 11 not upgraded.
Need to get 616 kB of archives.
After this operation, 1,827 kB of additional disk space will be used.
Get:1 http://debian.osuosl.org/debian/ squeeze/main zenmap amd64 5.00-3 [616 kB]
Fetched 616 kB in 3s (199 kB/s)
Selecting previously deselected package zenmap.
(Reading database ... 281105 files and directories currently installed.)
Unpacking zenmap (from .../zenmap_5.00-3_amd64.deb) ...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for man-db ...
Setting up zenmap (5.00-3) ...
Processing triggers for python-central ...
</pre></code>
Type the following command to start zenmap:
<code><pre>
$ sudo zenmap
</pre></code>
Sample outputs:<br />
<img src="./pictures/nmap-usage-examples-output.png" height=480 width=444 /><br /> <!-- height=640 width=592 -->
<h3>Link:</h3>
<ul>
<li><a href="https://www.cyberciti.biz/networking/nmap-command-examples-tutorials/"
target="_blank" rel="noreferrer noopener">
Cyberciti :: Nmap ‐ Beispiele
</a>
</li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://praxistipps.chip.de/ordner-auf-usb-stick-mit-passwort-schuetzen_17671" target=_blank>Chip - Artikel</a></li>
</ul>
</html>
<html>
<ul>
<li>ein von Michael E. geschriebenes Portscanner-Script;</li>
<li><code><pre>#!/bin/bash
if [ $# -lt 1 ]
then
echo 'Please provide a port number parameter for this script'
echo 'e.g. $0 22?'
exit
fi
for i in ls /proc
do
pfiles $i | grep AF_INET | grep $1
if [ $? -eq 0 ]
then
echo Is owned by pid $i
fi
done
</pre></code></li>
</ul>
</html>
<html>
<h3>To find the execution time of a process</h3>
The 'time' command will tell you the answer:<br />
<b><code>man time</code></b><br />
<br />
<b>Syntax:</b><br />
<b><code>time <executable/command (with arguments)></code></b><br />
<br />
For Ex:<br />
<b><code>$ /usr/bin/time find / -name csh.1 -print</code></b><br />
→ Ausgabe:
<code><pre>
real 1:15.5
(time elapsed between invocation and termination)
user 0.3
(time spent in user process code)
sys 3.3
(time spent in system code)
</pre></code>
The executable/command is run by the 'time'<br />
as a child process and then elapsed, user,<br />
system time are reported.<br />
<br />
There is a csh version of 'time'. It will<br />
report the time in different format.<br />
<br />
In Solaris 'ptime' gives more accurate results.<br />
<br />
<b><code>/usr/proc/bin/ptime command/executable [ arg ... ]</code></b><br />
<br />
This tip generously supported <br />
by: M.Nithyanandham@blr.spcnl.co.in<br />
</html>
<html>
<p>Mittlerweile lassen sich Festplatten mit mehr als nur fünf RAID-Leveln zum Schutz vor Datenverlust versehen. Anwender können wählen zwischen höchstem Schutz und bester Performance. Ein paar RAID-Klassen haben sich als meist genutzte durchgesetzt, wie RAID 1, 5 oder 6. Andere, wie 2, 4 oder 7, sind eher Exoten.
</p>
<p>
<b>RAID</b> steht für <b><em>“Redundant Array of Inexpensive bzw. Independent Disks“</em></b>. Ein Disk-Array ist eine Anzahl gewöhnlicher Festplatten, das im Verbund wie ein einziges großes Laufwerk arbeitet. Der Begriff RAID drückt aus, dass bei Ausfall einer Platte kein anderes Medium in seiner Funktion betroffen ist. Werden Daten auf ein Platten-Array geschrieben, wird gleichzeitig ein Fehlercode erzeugt und ebenfalls auf dem RAID abgelegt. Beschädigte Daten lassen sich mittels Fehlercode wiederherstellen. Während bei einzelnen Harddisks von MTBF (“Mean Time Between Failure“) gesprochen wird, handelt es sich bei RAID um MTBDL (“Mean Time Between Data Loss“). Der Ausfall einer einzelnen oder gar mehrerer Platten bleibt ohne Auswirkung und ist somit nicht mehr von Interesse. RAID-Klassen sorgen dafür, dass Daten nicht verloren gehen und die Serververfügbarkeit auch bei einem Harddisk-Ausfall gewährleistet bleibt.
</p>
<p>
Mittlerweile haben sich einige RAID-Level als meist genutzte herauskristallisiert, wie die Level 1, 5, 6 und 0. Andere wiederum sind eher in Vergessenheit geraten und kommen nicht so flächendeckend zum Einsatz. Dazu gehören 2,4 oder 7. Und RAID-Klassen sind nur in bestimmten Produkten integriert, wie beispielsweise “RAID X“ in IBMs “XIV“ oder “BeyondRAID“ im “Drobo“ von Data Robotics.
</p>
<ul>
<li><h3>RAID 0 ‐ Data-Striping</h3>
<p>
Eigentlich ist “RAID 0“ kein RAID-Level, weil das Wichtigste fehlt: die Redundanz. Mindestens zwei Laufwerke werden zu einem logischen Verbund (Stripeset) zusammengefasst. Der Vorteil von RAID 0 liegt in der Belegung der
gesamten Kapazität mit produktiven Daten und im durch den parallelen Zugriff über mehrere Kanäle multiplizierten Datendurchsatz. Dieser lässt sich nur erzielen, wenn seriell gelesen oder geschrieben wird. Die zu schreibenden Daten erfahren eine Aufteilung in Blöcke, die dann paritätisch auf die einzelnen Laufwerke verteilt werden.
</p>
<p>
Die Gefahr des Datenverlustes verdoppelt sich mit dem Einsatz zweier Laufwerke für ein Stripeset und erhöht sich mit dem Hinzufügen jeder weiteren Festplatte. Sollte eines der beteiligten Laufwerke ausfallen, so sind auch die auf den anderen gespeicherten Daten nutzlos.
</p>
</li>
<li><h3>RAID 1 ‐ Mirroring und Duplexing</h3>
<p>
“RAID 1“ ist die Spiegelung (“Mirroring“, “Duplexing“) von zwei oder mehreren Festplatten. Damit wird gleichzeitig die höchste Schutzstufe mit dem geringsten Aufwand erreicht. Durch Schreiben der Daten auf zwei getrennte, physikalisch gleiche Laufwerke (oder Laufwerks-Verbunde) ist kein Rechenaufwand notwendig, weder beim Erzeugen noch bei der eventuell notwendigen Rekonstruktion. Diese erfolgt durch einfaches Kopieren der dann noch einfach vorhandenen Daten. Die meisten am Markt vorhandenen Controller unterstützen den Austausch fehlerhafter Festplatten im laufenden Betrieb (Hot-Swap) und damit eine unterbrechungsfreie Reparatur.
</p>
<p>
Ein RAID-1-Verbund lässt sich auf zwei Arten erzeugen. Beim Mirroring werden zwei Festplatten über denselben I/O-Kanal beschrieben, beim Duplexing geschieht dies über zwei getrennte Kanäle. Das heißt, dass der komplette Inhalt einer Harddisk auf ein anderes Laufwerk überspielt wird. Vom Standpunkt der Sicherheit ist diese Methode optimal. Allerdings auch sehr teuer, denn die Redundanz verbraucht 50 Prozent der vorhandenen Kapazität.
</p>
</li>
<li><h3>RAID 1E, RAID 1E0</h3>
<p>
Auf einer “RAID 1E“ konfigurierten Plattengruppe werden Daten in kleinere Abschnitte zerlegt, geschrieben und dann auf den jeweils nächsten Datenträger gespiegelt. Ist die letzte Platte beschrieben, beginnt der Schreibvorgang wieder bei der ersten. Wie bei RAID 1 kann auf RAID 1E nur der halbe physikalische Speicherplatz genutzt werden. Datenverlust tritt hier auf, wenn zwei logisch aufeinanderfolgende oder die erste und letzte Platte zum selben Zeitpunkt ausfallen.
</p>
<p>
“RAID 1E0“ verteilt die zu schreibenden Daten auf zwei oder mehr RAID-1E-Gruppen. Auch hier wird der nutzbare Speicherplatz auf die Hälfte der Physik reduziert, zwei nebeneinanderliegende oder die erste und letzte Platte dürfen nicht zusammen ausfallen, um Datenverlust zu vermeiden.
</p>
</li>
<li><h3>RAID 2 - Hamming Code ECC</h3>
<p>
“RAID 2“ wird derzeit von keinem Hersteller am Markt unterstützt und bietet vor allem im Vergleich zu “RAID 5“ ein unakzeptables Preis-/Leistungsverhältnis.
</p>
<p>
Ein RAID-2-Verbund besteht aus zwei oder mehr Datenplatten und einer oder mehr ECC-Platten (“Error Correction Code“). Jedes Bit eines Wortes wird verteilt auf die Datenplatten geschrieben, ein ECC nach dem Hamming-Algorithmus erzeugt und dieser auf die entsprechenden Platten abgelegt. Dadurch wird es möglich, “on the fly“, also bei jedem Lesezugriff, die Daten auf Integrität zu überprüfen und nötigenfalls sofort zu korrigieren. Da das Schreiben der Daten und des ECC über separate Kanäle auf getrennte Festplatten geschieht, sind dadurch extrem hohe Transferraten möglich. Allerdings lassen sich diese nur erreichen, wenn die einzelnen Platten synchronisiert werden und dies wiederum ist ein nicht zu rechtfertigender Aufwand.
</p>
</li>
<li><h3>RAID 3 ‐ Data-Striping plus Parity</h3>
<p>
In “RAID 3“-Stripesets werden Blöcke über mindestens zwei Laufwerke verteilt, während Kontrollinformationen (“Parity“) auf einer separaten Festplatte gespeichert werden.
Bei “RAID 3“ ist der Controller für die Berechnung der Kontrollinformationen zuständig. Diese werden bei jedem Schreibvorgang erzeugt und beim Lesen überprüft. Der dabei erstellte zusätzliche Index kommt ebenfalls auf das Parity-Laufwerk. Mit einem Rechenalgorithmus (XOR-Verknüpfung) ist es möglich, beim Ausfall einer Disk die fehlenden Daten zusammen mit der Prüfsumme zu rekonstruieren.
</p>
<p>
Die Daten bleiben in diesem Falle zwar 100-prozentig verfügbar, allerdings steht während der Rekonstruktionsphase nur eine sehr geringe Bandbreite zur Verfügung. Für das Rückrechnen und -schreiben arbeiten aktuelle Laufwerke derzeit mit einer Datenübertragung von circa fünf bis sieben GByte/h.
</p>
<p>
Die nutzbare Kapazität hängt bei RAID 3 von der Zahl der Laufwerke ab. Für die Kontrollinformationen ist insgesamt die Kapazität eines Einzellaufwerkes erforderlich. In einem RAID-3-System mit drei 146-GByte-Festplatten stehen demnach 292 GByte also 66,7 Prozent der Bruttokapazität zur Verfügung, bei vier Harddisks 438 GByte (entspricht 75 Prozent), bei fünf Drives 584 GByte (entspricht 80 Prozent).
</p>
<p>
Die meisten Controller lassen nur die Nutzung gleichartiger und gleich großer Festplatten zu. Manche Controller tolerieren auch unterschiedliche Disk-Typen, jedoch beschränkt sich die nutzbare Kapazität dann auf das kleinste am Kanal vorhandene Laufwerk. Beim Einsatz von drei 181-GByte- und zwei 146-GByte-Festplatten beträgt die verfügbare Kapazität insgesamt nur 584 GByte, da auf den großen Laufwerken auch nur 146 GByte genutzt werden.
</p>
<p>
RAID 3 findet heute kaum noch Verwendung, da durch die Erzeugung der Kontrollinformationen auf dieser Festplatte ein “Hot Spot“ mit sehr hoher I/O-Rate entstehen kann. Darüber hinaus ist es nicht möglich, die Daten gleichmäßig über alle vorhandenen Laufwerke zu verteilen.
</p>
</li>
<li><h3>RAID 4 ‐ Data plus Parity</h3>
<p>
Prinzipiell funktioniert “RAID 4“ wie “RAID 3“. Die Blöcke werden hier allerdings nicht verteilt auf die Festplatten geschrieben, sondern in Gänze auf einem Laufwerk abgelegt. Auch verzichtet man auf das Synchronisieren der Festplattenköpfe, um die Nachteile von RAID 3 bei der Verarbeitung kleiner Dateien zu umgehen. Die Prüfsumme wird auf einem extra Laufwerk gespeichert. Speziell beim Schreiben kleiner File-Größen entpuppt sich das Parity-Drive als Flaschenhals. Bei jeder Schreiboperation muss zunächst die Checksumme errechnet, die Parity-Informationen auf dem Laufwerk gefunden und angesteuert werden. Vorteile bietet RAID 4 in Umgebungen, in denen vor allem Lesezugriffe anfallen. In der Praxis verwendete fast nur NetApp dieses Verfahren.
</p>
</li>
<li><h3>RAID 5 ‐ Data- and Parity-Striping</h3>
<p>
Auch in “RAID 5“-Stripesets werden Daten und Kontrollinformationen (Parity) über mindestens drei Laufwerke verteilt. Diese Schutzklasse stellt den derzeit besten Kompromiss zwischen nutzbarer Kapazität, Leistung und Rekonstruktion der Daten dar.
</p>
<p>
Der Controller ist für die Berechnung der Kontrollinformationen zuständig, die bei jedem Schreibvorgang erzeugt und beim Lesen überprüft werden. Der dabei entstehende zusätzliche Index wird ebenfalls über alle Laufwerke verteilt. Die Parität wird durch eine Exklusiv-oder-Verknüpfung realisiert. Ein Laufwerk innerhalb des RAIDs darf vollständig ausfallen, ohne dass Daten verloren gehen. Das System kann weiterhin auf das Array und die Daten der fehlerhaften Platte zugreifen, weil ihre Daten aufgrund der Exklusiv-oder-Operation unter Zuhilfenahme der Parität aus den verbliebenen Platten errechnet werden können. Ansonsten verhält sich RAID 5 wie RAID 3, was die Rekonstruktion von Daten eventuell ausgefallener Festplatten und die dafür benötigte Zeit angeht.
</p>
<p>
RAID 5 stellt den besten Kompromiss zwischen Datenschutz, Verfügbarkeit und Leistung dar, da es keine Hot Spots durch die Verteilung der Kontrolldaten gibt und der Zugriff auf alle Festplatten gleichzeitig erfolgen kann. Für die Parität muss auch in größeren Umgebungen maximal die Kapazität eines Laufwerks “geopfert“ werden.
</p>
</li>
<li><h3>RAID 6/RAID DP ‐ Double-Parity</h3>
<p>
“RAID 6“ stellt eine Erweiterung des “RAID 5“-Aufbaus dar. Während in einem RAID-5-Stripeset lediglich ein Satz an Kontrollinformationen abgelegt wird, sind dies im RAID 6 derer zwei. Dies kompensiert den Ausfall von bis zu zwei Laufwerken. Versagen bei RAID 5 gleichzeitig zwei Disk, sind die Daten hier nicht mehr zu rekonstruieren. Das Schreiben zweier Kontrollinformationssätze beugt diesem Katastrophenfall vor.
</p>
<p>
Diese Sicherheit muss allerdings mit einigen Nachteilen erkauft werden. Zunächst gilt für die Kapazität die Formel “n+2“. Das heißt, die nutzbare Kapazität beträgt beispielsweise bei vier Festplatten 50 Prozent, bei fünf Laufwerken 60 Prozent und bei sechs Drives 66,7 Prozent. Des Weiteren benötigt das Anlegen weiterer Kontrolldaten Bandbreite des Kanals und Rechenleistung des Controllers. Dies verringert im Vergleich zu RAID 5 die Gesamtleistung des Systems. Manche Hersteller haben daher begonnen, spezielle RAID-6-ASICs für Controller anzubieten, um die Leistung wieder an RAID 5 anzugleichen.
</p>
<p>
Netapp nutzt unter anderem den Begriffe “RAID DP“. Dieser beschreibt die Dual-Parity-Konfiguration, die sich auch mit RAID 5 verbinden lässt. Das heißt, es werden jeweils zwei Festplatten bzw. deren Kapazität für die Parity-Information genutzt.
</p>
</li>
<li><h3>RAID TP</h3>
<p>
Analog zu RAID DP mit doppelter Parität setzen manche Hersteller eine dritte Paritätspartition, das “RAID TP“, Triple Parity, in RAID-Gruppen ein. Diese verhindert Datenverlust selbst bei Ausfall dreier Datenträger pro RAID-Gruppe und ermöglicht so den Einsatz von mehr Platten pro Gruppe. Damit lassen sich Arrays noch kostengünstiger konfigurieren.
</p>
</li>
<li><h3>RAID 7</h3>
<p>
“RAID 7“ ähnelt “RAID 5“ und schreibt in Datenblöcken. Allerdings kommt hier in der Steuereinheit des RAID-Controllers ein lokales Echtzeitbetriebssystem zum Einsatz. Neben mehreren Pufferspeichern werden schnelle Datenbusse eingesetzt, die von der Datenübertragung entkoppelt sind. Dies führt zu einer deutlich schnelleren Übertragungsrate. In der Praxis ist RAID 7 aber eher unüblich - unter anderem wegen der hohen Kosten.
</p>
</li>
<li><h3>RAIDn</h3>
<p>
Das von RAID 6 verwendete Verfahren zur Generierung mehrfacher, unabhängiger Paritätsinformationen lässt sich grundsätzlich auch dazu nutzen, den Ausfall von nahezu beliebig vielen Disks aufzufangen. Derart aufgebaute Arrays bezeichnet man üblicherweise als “RAID n+m“ oder “RAID (n,m)“. Dabei steht n für die Gesamtzahl der Platten im Verbund und m bezeichnet die Zahl der Laufwerke, die ohne Datenverlust ausfallen dürfen. Die Nutzkapazität des Arrays entspricht n-m Disks. Vorteil einer solchen Konfiguration: Die Ausfallsicherheit lässt sich gegenüber “RAID 5“ weiter erhöhen, ohne die hohe Redundanz und damit die Kosten von Kombiverfahren wie “RAID 51“ in Kauf nehmen zu müssen.
</p>
<p>
Eine industrielle Implementierung einer solchen Technik liefert Tandberg Data in seinen Netzwerk-Speichersubsystemen der “ValueNAS“-Serie aus. Hier kommen für die Generierung der zusätzlichen Paritätsinformationen allerdings keine Reed-Solomon-Codes zum Einsatz, sondern vom Tochter-Unternehmen Inostor patentierte, eigene Algorithmen. Bei “RAIDn“ kann der Anwender die Anzahl der Laufwerke, die ausfallen können, frei definieren. Beim Einsatz von beispielsweise zehn Platten erlaubt RAIDn, die Daten von beliebig ausfallenden Laufwerken mit nur drei Reserveplatten vollständig zu rekonstruieren. Bei gleichem Hardware-Einsatz stehen gegenüber RAID 51 sieben anstatt vier nutzbarer Disks zur Verfügung. Die Kosten für die Datensicherheit verringern sich laut Tandberg entsprechend um 30 bis 50 Prozent.
</p>
<p>
RAIDn ist in Form einer in C geschriebenen Software-Library implementiert, die derzeit als (über insmod ladbares) Kernel-Modul für Linux vorliegt. Tandberg/Inostor zufolge könnte aber bei Bedarf auch auf andere Betriebssysteme portiert werden, wie etwa Sun “Solaris“ oder auch Microsoft “Windows“.
</p>
</li>
<li><h3>RAID 10/RAID 0+1</h3>
<p>
Bei “RAID 10“ bzw. “RAID 0+1“ handelt es sich um eine Kombination der beiden RAID-Level 0 und 1. Bei RAID-10 werden die Daten zunächst wie bei RAID 1 auf zwei Laufwerke getrennt geschrieben und dann über die Laufwerke verteilt. Bei RAID 0+1 verhält es sich genau umgekehrt. Zuerst schreibt das System die Daten verteilt auf die Disks und spiegelt dann erst. Die Reihenfolge dieser Vorgänge ist dabei nicht von Belang und nur abhängig vom verwendeten Controller.
</p>
<p>
Beide Varianten bieten Datensicherheit auf höchstem Performance-Niveau. Für den Aufbau werden jedoch mindestens vier Platten gleichen Typs benötigt. Dies macht aber nur wirklich Sinn, wenn die Geschwindigkeit absolute Priorität hat, denn nachdem die Hälfte der vorhandenen Kapazität zur Spiegelung benötigt wird, ist diese Kombination preislich eher unattraktiv.
</p>
</li>
<li><h3>Matrix RAID</h3>
<p>
Für Endverbraucher hat sich Intel eine preiswerte und flexible RAID-Lösung einfallen lassen ‐ das so genannte “Matrix RAID“. Matrix RAID erlaubt die Mischung mehrerer RAID-Typen auf einer Laufwerksgruppe. So kann ein Abschnitt zweier Laufwerke in RAID 1, also als Spiegel aufgesetzt und zur Speicherung wichtiger und performanter Daten genutzt werden, während auf den verbleibenden Abschnitten die Daten lediglich in RAID 0, also gestriped aber ohne Sicherung abgelegt sind. Bei Verwendung von drei oder mehr Festplatten bietet sich zusätzlich auch die Belegung mit RAID-3- oder RAID-5-geschützten Abschnitten an.
</p>
<p>
Es werden nicht mehr physikalische Festplatten gestriped oder gespiegelt, sondern einzelne Partitionen auf mindestens zwei Laufwerke. So lassen sich beide Harddisks beispielsweise in jeweils zwei Partitionen einteilen, von denen dann zwei in ein RAID-0-Stripeset und zwei in eine RAID-1-Spiegelgruppe verwandelt werden. Die Verwaltung übernimmt ein von Intel eigens für PC-Mainboards entwickelter Chip, die Einrichtung geschieht über das BIOS-Setup des Rechners. So lassen sich beispielsweise wichtige Daten, das Betriebssystem und die Hauptanwendungen redundant abspeichern, während geschwindigkeitsrelevante Informationen von einem schnellen RAID 0 profitieren.
</p>
</li>
<li><h3>RAID 30</h3>
<p>
“RAID 30“ wurde von AMI entwickelt und stellt die gestripte Variante von RAID 3 dar. Sie bietet Datensicherheit, einen hohen Durchsatz und empfiehlt sich zur sequentiellen Übertragung großer Dateien. RAID 30 benötigt mindestens sechs Festplatten und kommt in der Praxis nur sehr selten zum Einsatz.
</p>
</li>
<li><h3>RAID 50</h3>
<p>
“RAID 50“ wurde von AMI entwickelt und ist die gestripte Version von RAID 5. Sie empfiehlt sich, wenn neben Datensicherheit und schnellen Zugriffszeiten auch eine hohe Transferrate benötigt wird. RAID 50 benötigt mindestens sechs Festplatten und kommt in der Praxis nur sehr selten zum Einsatz.
</p>
</li>
<li><h3>RAID 51</h3>
<p>
“RAID 51“, auch RAID 15 genannt, entspricht einem gespiegelten RAID 5. Die Geschwindigkeit gleicht die eines RAID-5-Arrays. Zwar erreicht diese Anordnung eine sehr hohe Datensicherheit, hat aber in der Praxis keinerlei Relevanz.
</p>
</li>
<li><h3>RAID X</h3>
<p>
Diese nicht standardisierte RAID-Technik wird ausschließlich auf dem von IBM vertriebenen XIV-Array genutzt. Hier gibt es keine eigentlichen RAID-Gruppen. Die zu speichernden Daten werden in ein GByte große Teile zerlegt, die die Maschine dann auf zwei unabhängigen Festplatten speichert. Beim Ausfall einer Platte steht immer noch die Kopie des Datenabschnittes auf einem anderen Datenträger zur Verfügung und lässt sich von dort wieder doppeln. Fällt während der Wiederherstellungsphase einer Festplatte allerdings ein weiteres Laufwerk aus, auf dem sich die Kopien der Abschnitte des vorher beschädigten Datenträgers befinden, sind diese Informationen unwiederbringlich vernichtet. Daher ist RAID X keine ideale Lösung für den Enterprise-Einsatz.
</p>
</li>
<li><h3>RAID‐Z</h3>
</li>
<li><h3>BeyondRAID</h3>
<p>
Diese Technologie wird ausschließlich auf den Drobo-Systemen der Firma Data Robotics eingesetzt. Bei der Entwicklung wurde vor allem auf Flexibilität und einfache Konvertierung zwischen Schutzklassen Wert gelegt. BeyondRAID agiert auf zwei Laufwerken wie RAID 1, auf drei oder mehr Laufwerken wie RAID 5, wobei hier die Besonderheit dabei liegt, dass im Gegensatz zu allen anderen RAID-Schutzklassen auch unterschiedlich große Datenträger in einer RAID-Gruppe verwendet werden können. Drobo-Systeme mit fünf Platten oder mehr unterstützen darüber hinaus auch doppelte Redundanz entsprechend RAID 6. Ebenfalls entgegen aller anderen RAID-Arten lassen sich BeyondRAID-Festplatten in anderen Drobo-Systemen selbst in anderer Reihenfolge ohne Datenverlust einsetzen.</p>
</li>
<li><h3>JBOD</h3>
<p>
Bei der JBOD-Konfiguration werden einzelne Platten am RAID-Controller zur Serverseite auch als einzelne Laufwerke gemeldet. JBOD ist kein RAID-Level, wird aber von den meisten Controllern unterstützt.
</p>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.speicherguide.de/storage-hardware/disk-subsysteme/raid-level-im-ueberblick-13981.aspx" target=_blank>Speicherguide :: Raid-Level im Überblick</a></li>
<li><a href="https://en.wikipedia.org/wiki/Standard_RAID_levels" target=_blank>Wikipedia.en :: Standard RAID levels</a></li>
<li><a href="https://en.wikipedia.org/wiki/Non-standard_RAID_levels" target=_blank>Wikipedia.en :: Non-Standard RAID levels</a></li>
<!--li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li-->
</ul>
</html>
<html>
rsync is free and open source tool. It is useful to copy local or<br />
remote file. It reduces the amount of data sent over the network<br />
by sending only the differences between the source files and the<br />
existing files in the destination. You can use any one of the fol–<br />
lowing options to add a total progress indicator when copying files<br />
from serverA to serverB or vice versa.<br />
<ul>
<li> <b>rsync</b> command to with --progress option.</li>
<li> <b>pv</b> command – monitor the progress of data or <br />
data transfer through a pipe. <br />
This is a recommend option for most users.</li>
</ul>
<h3>rsync command to show progress bar</h3>
You need to use the --progress or -P option which show progress <br />
during file transfer. The syntax is as follows:
<code><pre>
rsync --progress source dest
rsync -P source dest
rsync [options] --progress source dest
rsync -av --progress /path/to/*.mp3 /nfs
rsync -av --progress /path/to/*.avi -e user@remote.example.com:/data
###############################################################
## The following only works with the latest version of rsync ##
###############################################################
rsync -av --info=progress2 source dest
rsync -av --info=progress2 /path/to/*.avi -e user@remote.example.com:/data
</pre></code>
## See the pv command below for more info & syntax ##
<h3>Examples</h3>
To copy file from /foo/*.tar.gz to a remote server called server1.cyberciti.biz, enter:
<code><pre>
rsync -av -P /foo/*.tar.gz nixcraft@server1.cyberciti.biz:~
</pre></code>
OR
<code><pre>
rsync -av --progress /foo/*.tar.gz nixcraft@server1.cyberciti.biz:~
</pre></code>
In this example, copy files from a remote server:
<code><pre>
rsync -av --progress root@nas01:/tmp/*Office* .
</pre></code>
Sample outputs:
<code><pre>
receiving file list ...
2 files to consider
MacOffice2011wSP2_English.dmg
1036923510 100% 14.72MB/s 0:01:07 (xfer#1, to-check=1/2)
Office Mac Home and Student 2011 - 1PC-1User Keys.html
2230 100% 23.67kB/s 0:00:00 (xfer#2, to-check=0/2)
sent 64 bytes received 1037052576 bytes 15363742.81 bytes/sec
total size is 1036925740 speedup is 1.00
</pre></code>
The --info=progress2 option shows statistics based on the whole transfer,<br />
rather than individual files. Use this flag without outputting a filename (e.g. <br />
avoid -v or specify &ndash, –info=name0 if you want to see how the<br />
transfer is doing without scrolling the screen with a lot of names.
<code><pre>
rsync -av --info=progress2 root@nas01:/tmp/*Office* .
</pre></code>
Sample outputs:
<code><pre>
sending incremental file list
MacOffice2011wSP2_English.dmg
1,036,923,510 99% 39.90MB/s 0:00:24 (xfr#1, to-chk=0/2)
sent 1,037,176,846 bytes received 35 bytes 40,673,603.18 bytes/sec
total size is 1,036,925,740 speedup is 1.00
</pre></code>
In this example copy from local computer to remote server:
<code><pre>
$ rsync -v --progress debian-9-openstack-amd64.qcow2 vivek@centos7:~/virt/
</pre></code>
<h3>How to rsync show progress bar Linux and Unix command</h3>
Use pv command to monitor progress of rsync command
The pv command allows you to see the progress of data through a <br />
pipeline. It provides the following info:
<ul>
<li> Time elapsed</li>
<li> Percentage completed (with progress bar)</li>
<li> Current throughput rate</li>
<li> Total data transferred</li>
<li> ETA</li>
</ul>
Falls nicht installiert, dann aufrufen:
<code><pre>sudo apt-get install pv</pre></code>
The syntax is:
<code><pre>
rsync options source dest | pv -lpes Number-Of-Files
</pre></code>
So if you have 42 files in /tmp/software and you would like to copy them<br />
to /nas10, enter:
<code><pre>
rsync -vrltD --stats --human-readable /tmp/software /nas10 | pv -lep -s 42
</pre></code>
OR
<code><pre>
rsync -vrltD --stats --human-readable /tmp/software /nas10 | pv -lep -s 42 >/dev/null
</pre></code>
Sample outputs:<br 7>
<img src="./pictures/rsync-pv-shell-pipe-command.gif" width=594 heigth=397>
<h3>Link:</h3>
<a href="https://www.cyberciti.biz/faq/show-progress-during-file-transfer/" target="_blank">nixCraft :: Show progress during file transfer</a>
</html>
<html>
If you want a job to run on the last <br />
sunday of every month, you can use <br />
the following syntax from within cron:<br />
<code><pre>
18 * * * 0 [`date "+%d"` -gt 24] && /path/to/script
</pre></code>
i.e. on sundays at 18:00 check if the day <br />
of the month is greater than 24. <br />
if so run the job (if 23 is specified the job <br />
will run on the last 2 sundays of the month)<br />
<b>NOTE: </b><br />
There back-ticks around the date
command, not single quotes.
This tip generously supported by: <br />
duncan.ferguson@egg.com
</html>
<html>
<ul>
<li><b>bash</b> :=: Bourne again shell</li>
<br />
<li><b>dash</b> :=: Debian Almquist shell</li>
<br />
<li><b>fish</b> :=: Friendly Interactive shell</li>
</ul>
</html>
<html>
<meta update-alternatives />
<ul>
<li>Es kommt vor, dass die Standardeinstellung z.B. für<br />
den Editor sich geändert hat (z.B. nach einer (Neu-)<br />
Installation eines anderen Editors, wie z.B. beim De–<br />
fault-Editor für GIT).<br />
<br />
Im Verzeichnis <code><b>/etc/alternatives</b></code> verwaltet Li–<br />
nux / Debian die “Zuordnungen“ zu den einzelnen<br />
Gruppen, wie z.B. “Editor“, “Session–Manager u.a.<br />
</li>
<br />
<li>Befehl, um alle Master‐Alternativen (und deren Status) aufzulisten:
<pre><code>sudo upate-alternatives --get-selections</pre></code>
</li>
<li>Befehl, um die Alternativen für eine Gruppe auf–<br />
zulisten:
<pre><code>sudo upate-alternatives --list <em>GRUPPEN-NAME</em></pre></code>
</li>
<li>Befehl, um die Alternative neu zu setzen:
<pre><code>sudo upate-alternatives --config <em>GRUPPEN-NAME</em></pre></code>
</li>
</ul>
</html>
<html>
To suppress the blank lines in a text file:<br />
<code><pre> sed '/^$/d' <text_file></pre></code>
or
<code><pre>awk 'NF>0' <text_file>   # gib alle Zeilen aus, deren Anzahl von Feldern größer als Null sind</pre></code>
<br />
This tip generously supported <br />
by: M.Nithyanandham@blr.spcnl.co.in<br />
</html>
(Mache Notizen um 03 Uhr nachts ...)
Always keep a notebook of what you do as root. That way,
when you can't remember what you did at 3am (small wonder),
all you have to do is trace your steps back.
This can be kept online as well.
<html>
<ul>
<li>Taskwarrior (Befehl: task) ‐ A command line todo manager.</li>
<li>Timewarrior (Befehl: timew) ‐ A command line time tracker.</li>
</ul>
<h3>Taskwarrior</h3>
<h4>Installation</h4>
<code><pre>-------- on Debian --------
$ sudo apt-get install task/wheezy-backports
</pre></code>
<h3>Synopsis:</h3>
task <filter> <command> [ <mods> | <args> ]<br />
<br />
Die <em>“command“</em>s unterteilen sich in:<ul>
<li>READ commands</li>
<li>WRITE commands</li>
<li>MISCELLANEOUS commands</li>
<li>HELPER commands</li>
</ul>
<b>Anmerkung:</b><br />
Die Task‐Beschreibungen am besten von Anfang an in <br />
doppelten Anführungszeichen schreiben. Dadurch kön‐<br />
nen auch mehrzeilige Beschreibungen erstellt werden.<br />
<table>
<tr><th>Befehle</th><th>Beschreibung</th></tr>
<tr><td><code><b>task</b></code> </td><td> </td></tr>
<tr><td><code><b>task add <em>“Ordix: Lineare Regression“</em></b></code> </td><td> den Task “Ordix: Lineare Regression“ der Liste hinzufügen</td></tr>
<tr><td><code><b>task add priority:H <em>write Article</em></b></code> </td><td> den Task “write Article“ der Liste mit Priorität H hinzufügen</td></tr>
<tr><td><code><b>task add priority:H due:2d \<br /><em>“RealPython: Managing Dependencies“</em></b></code> </td><td> den Task “RealPython: Managing Dependencies“ der Liste mit Priorität H <br /> und dem Fälligkeitsdatum in zwei Tagen hinzufügen</td></tr>
<tr><td><code><b>task list</b></code> </td><td> die aktuelle Task-Liste anzeigen</td></tr>
<tr><td><code><b>task <em>#</em> done</b></code> </td><td> Task mit der ID <em>#</em> als “erledigt“ markieren und somit aus der Liste entfernen</td></tr>
<tr><td><code><b>task commands</b></code> </td><td> Zeigt alle unterstützten Befehle an, bei jedem mit einigen Details</td></tr>
<tr><td><code><b>task next</b></code> </td><td> (Default) Zeigt eine Seite der wichtigsten Tasks, nach Dringlichkeit sortiert (berechneter Wert)</td></tr>
<tr><td><code><b>task <em>#</em> delete</b></code> </td><td> Aus der Liste löschen</td></tr>
<tr><td><code><b>task 12 modify due:eom </b></code> </td><td> Das Fälligkeitsdatum des Tasks 12 ändern. Es wird auf Ende des Monats (“eom“) gesetzt.</td></tr>
<tr><td><code><b>task modify 2 +Statistics</b></code> </td><td> Der Task mit der ID 2 wird geändert. Er bekommt den Tag “Statistics“ angeheftet. </td></tr>
<tr><td><code><b>task modify 1 -Python</b></code> </td><td> Der Task mit der ID 1 wird geändert. Ihm wird der Tag “Python“ entfernt.</td></tr>
<tr><td><code><b>task add recur:<em>frequency</em> “<em>TASK</em>“</b></code> </td><td> Specifies the frequency of a recurrence of a task. </td></tr>
<tr><td><code><b>task project:Home +weekend garden list</b></code> </td><td> Suchen des Tasks des Projects “Home“ mit dem Tag <em>“weekend“</em> und der Beschreibung <em>“garden“</em></td></tr>
<tr><td><code><b>task colors legend </b></code> </td><td> Anzeigen der Farbeinstellungen</td></tr>
<tr><td><code><b>task calendar </b></code> </td><td>gibt einen Überblick der Einträge für die nächsten vier Monate in Kalenderform</td></tr>
<tr><td><code><b>task due.before:2wks long</b></code> </td><td> Auflisten aller Tasks innerhalb der nächsten zwei Wochen (Fälligkeitsdatum in zwei Wochen) </td></tr>
<tr><td><code><b>task add +nocolor “<em>TASK</em>“</b></code> </td><td> Der Task wird nur “schwarz auf weiß“ angezeigt, keine Farben</td></tr>
<tr><td><code><b>task uuids</b></code> </td><td>Shows the UUIDs of matching tasks, as a comma-separated (wohl eher “blank‐separated“) list </td></tr>
<tr><td><code><b>task purge <em>ID</em></b></code> </td><td>Removes the specified tasks from the data files.<br />
Causes permanent loss of data.</td></tr>
<tr><td><code><b>task execute</b></code> </td><td>Executes external commands and scripts </td></tr>
<!--tr><td><code><b></b></code> </td><td> </td></tr>--!>
<!--tr><td><code><b></b></code> </td><td> </td></tr>--!>
<!--tr><td><code><b></b></code> </td><td> </td></tr>--!>
<!--tr><td><code><b></b></code> </td><td> </td></tr>--!>
<!--tr><td><code><b></b></code> </td><td> </td></tr>--!>
<!--tr><td><code><b></b></code> </td><td> </td></tr>--!>
<!--tr><td><code><b></b></code> </td><td> </td></tr>--!>
</table>
<h3>Konfigurationsfiles:</h3>
<ul>
<li>˜/.taskrc</li>
<li>Um die Farben abzuschalten, folgende Zeile in das o.g. KonfigFile eintragen:
<code><pre>
color=off
</pre></code></li>
</ul>
<h3>Besonderheit:</h3>
<ul>
<li>task (resp. taskwarrior) hat eine eigene Shell, die sog. <code><b>tasksh</b></code><br />
→ muß aber anscheinend separat installiert werden;</li>
<br />
<li><h3>hilfreiche Befehle:</h3>
<ul>
<li><h4>Nicht mehr benötigte Tasks purgen:</h4>
Zuerst die uuids auflisten und in ein File umleiten:
<code><pre>
task command uuids > ./uuids-List.txt
</pre></code>
Dann im vi die Blanks durch CR ersetzen:
<code><pre>
:%s/ /^M/g <em># Wichtig! Das “^M“ durch die Tastenkombination Ctl‐V Ctrl‐M erzeugen</em>
</pre></code>
Nach dem Abspeichern den folgenden Befehl aufrufen:
<code><pre>
for i in $(cat uuids-List.txt); do echo ${i}; echo "y" | task purge ${i}; done
</pre></code>
</li>
<li><code><pre>
task $(task list | grep -w "Finanzmanagement" | grep ^" 8" | awk -F' ' '{ print $1 }') done
</pre></code></li>
<li>Befehle für Aufruf aus .bashrc:<br />
<code><pre>
# Taskwarrior starten
taskwarrior_PID=$(ps -ef | grep Taskwarrior | grep -v grep | awk -F' ' '{ print $2 }')
if [ -z "`echo "$taskwarrior_PID"`" ]; then
xterm -title "Taskwarrior - Liste der Tasks" -bg white -fg black -fa 'Noto Mono' -fs 14 -geometry 120x25 -hold -e 'watch -n 60 -x task list due.before:2wks' &
fi
task_outdated_PID=$(ps -ef | grep "Abgelaufene Tasks" | grep -v grep | awk -F' ' '{ print $2 }')
if [ -z "`echo "$task_outdated_PID"`" ]; then
xterm -bg white -fg black -fa 'Noto Mono' -fs 14 -geometry 120x25 -title "Abgelaufene Tasks" -e 'watch -n 60 -x task list due.before:today && read' &
fi
tasks_for_today_PID=$(ps -ef | grep "Tasks, die heute aktuell sind" | grep -v grep | awk -F' ' '{ print $2 }')
if [ -z "`echo "$tasks_for_today_PID"`" ]; then
xterm -bg white -fg black -fa 'Noto Mono' -fs 14 -geometry 120x25 -title "Tasks, die heute aktuell sind" -e 'watch -n 60 -x task list due:today && read' &
fi
</pre></code>
</ul></li>
<li>Weitere Infos über einen Task ausgeben: <code>task <em><filter></em> information</code><br />
Ausgabe:
<code><pre>
task Stochastik information
Name Value
ID 1
Description 20220218_0_Stochastik_Buch_Henze-StochastikFuerEinsteiger_Kap-03
Status Pending
Entered 2022-02-20 14:38:52 (12min)
Due 2022-02-20 16:38:52
Last modified 2022-02-20 14:38:52 (12min)
Virtual tags DUE DUETODAY LATEST MONTH PENDING QUARTER READY TODAY UNBLOCKED WEEK YEAR
UUID 3de0be3d-07ba-4aca-9158-10e4d465b85f
Urgency 8.766
due 0.73 * 12 = 8.77
------
8.766
</pre></code></li>
</ul>
<h3>Timewarrior</h3>
Timewarrior is a time tracking utility that offers simple stopwatch features as well as<br />
sophisticated calendar-based backfill, along with flexible reporting. It is a portable,<br />
well supported and very active Open Source project.<br />
<table>
<tr><th>Befehl</th><th>Funktion</th></tr>
<tr><td>timew-config</td><td>get and set Timewarrior configuration</td></tr>
<tr><td>timew-config</td><td>Timewarrior configuration file and override options</td></tr>
<tr><td>timew-dates</td><td>date formats supported by Timewarrior</td></tr>
<tr><td>timew-dom</td><td>Timewarrior DOM</td></tr>
<tr><td>timew-durations</td><td>duration formats supported by Timewarrior</td></tr>
<tr><td>timew-hints</td><td>Timewarrior hints</td></tr>
<tr><td>timew-ranges</td><td>date and time ranges supported by Timewarrior</td></tr>
<tr><td>timew-undo</td><td>revert Timewarrior commands</td></tr>
</table>
<h3>Links:</h3>
<h4>Taskwarrior:</h4>
<ul>
<li><a href="https://taskwarrior.org/" target="_blank" rel="noreferrer noopener">Taskwarrior :: Homepage</a></li>
<li><a href="http://taskwarrior.org/docs" target="_blank" rel="noreferrer noopener">Taskwarrior :: Documentation</a></li>
<li><a href="https://taskwarrior.org/download/" target="_blank" rel="noreferrer noopener">Taskwarrior :: Download-Page</a></li>
<li><a href="https://www.fossmint.com/taskwarrior-manage-todo-list-from-linux-terminal/" target="_blank" rel="noreferrer noopener">FossMint :: Taskwarrior - ToDo-List from Linux terminal</a></li>
</ul>
<h4>Timewarrior:</h4>
<ul>
<li><a href="https://timewarrior.net/" target="_blank" rel="noreferrer noopener">Timewarrior :: Homepage</a></li>
<li><a href="https://kalilinuxtutorials.com/timewarrior/" target="_blank" rel="noreferrer noopener">Kali‐Linux Tutorials :: Timewarrior</a></li>
<li><a href="https://www.redhat.com/sysadmin/timewarrior-command-line" target="_blank" rel="noreferrer noopener">Red Hat :: Timewarrior</a></li>
</html>
<html>
Ever want to reverse the entire case <br />
of a text file:<br />
<br />
o reverse the case of a text file:
<code><pre>tr 'a-zA-Z' 'A-Za-z' < inputfile</pre></code>
This tip generously supported by: <br />
vikram.kalsi@seepz.tcs.co.in
</html>
<html>
<ul>
<li>two Ubuntu VMs have the same IP address<br />
<br />
⇒ try restarting network manager:
<pre><code>sudo systemctl restart NetworkManager</code></pre>
</li>
</ul>
</html>
<html>
<li>Virtual Network Computing, kurz VNC, ist eine Software, die den<br />
Bildschirminhalt eines entfernten Rechners (Server) auf einem <br />
lokalen Rechner (Client) anzeigt und im Gegenzug Tastatur‐ und<br />
Mausbewegungen des lokalen Rechners an den entfernten Rechner<br />
sendet.</li>
<li>Damit kann man auf einem entfernten Rechner arbeiten, als säße<br />
man direkt davor.</li>
<li>VNC implementiert das Remote Framebuffer Protocol und ist damit,<br />
im Gegensatz zu anderer Fernwartungssoftware, plattformunabhän‐<br />
gig benutzbar. </li>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Virtual_Network_Computing" target="_blank" rel="noreferrer noopener">Wikipedia</a></li>
</ul>
</html>
<html>
<ul>
<li>Befehl:
<code><pre>fc-list [:lang=<em>xx</em>]
</pre></code></li>
<li>Mögliche Optionen:
<table>
<tr><td> ‐v, ‐‐verbose </td><td> display entire font pattern verbosely</td></tr>
<tr><td> ‐b, ‐‐brief </td><td> display entire font pattern briefly</td></tr>
<tr><td> ‐f, ‐‐format=FORMAT </td><td> use the given output format</td></tr>
<tr><td> ‐q, ‐‐quiet </td><td> suppress all normal output, exit 1 if no fonts matched</td></tr>
<tr><td> ‐V, ‐‐version </td><td> display font config version and exit</td></tr>
<tr><td> ‐h, ‐‐help </td><td> display this help and exit</td></tr>
</table></li>
<li>Beispiel:<br />
Um die Liste derjenigen Fonts ausgeben, die die Hindi-Sprache umfassen:
<code><pre>$ fc-list :lang=hi
</pre></code>
Analog für Tamil:
<code><pre>$ fc-list :lang=ta
</pre></code>
</li>
<li>Um z.B. xterm mit dem ausgewählten Fonts aufzurufen:
<code><pre>
xterm -fa 'Liberation Mono' -fs 10
</pre></code>
</li>
<li>Die Endung “ttf“ steht für “truetype fonts“</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.cyberciti.biz/tips/quickly-list-all-available-fonts.html" target=_blank>nixCraft :: List all available fonts</a></li>
<li><a href="https://ostechnix.com/find-installed-fonts-commandline-linux/" target=_blank>OSTechnix :: Find installed fonts</a></li>
<li><a href="https://linuxhint.com/best_fonts_ubuntu_linux/" target=_blank>Linux Hint :: Best fonts for Ubuntu</a></li>
<li><a href="https://wiki.netbsd.org/tutorials/how_to_use_ttf_fonts_in_xterm/" target=_blank>Netbsd.org :: Tutorial - How to use ttf fonts in xterm</a></li>
</ul>
</html>
<html>
<ul>
<li><pre><code>sed -n -e "$(( $(wc -l < <em>FILE</em>)-1 ))d" <em>FILE</em></code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://stackoverflow.com/questions/13380607/how-to-use-sed-to-remove-the-last-n-lines-of-a-file"
target="_blank" rel="noreferrer noopener">
StackOverflow :: How to use sed to remove the last n lines of a file (Post von lzc)</a><br />
[lzc :: <em>ist ein kleines L!</em>]
</li>
</ul>
</html>
<html>
<ul>
<li>UA string, “User Agent String“</li>
<br />
<li>um anonym zu bleiben:<br />
Firefox :: about:config <br />
→ Anlegen von Variable “general.useragent.override“<br />
→ den Wert “true“ zuweisen</li>
</ul>
<h3>Links:</h3>
<a href="http://www.linux-user.de/qr/40507" target=_blank>Linux User 11/2018, S. 88ff</a><br />
<a href="https://www.whoishostingthis.com/tools/user-agent/" target=_blank>WhoIs HostingThis?</a><br />
<a href="https://hacks.mozilla.org/2010/09/final-user-agent-string-for-firefox-4/" target=_blank>Mozilla Hacks :: Final User Agent String for Firefox 4</a><br />
<a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent" target=_blank>Developer Mozilla :: Browser detection using the user agent</a></br />
<a href="https://hacks.mozilla.org/2013/09/user-agent-detection-history-and-checklist/" target=_blank>Mozilla Hacks :: User-Agent detection, history and checklist</a><br />
</html>
<html>
<ul>
<li><code><b>netstat -an | grep <portID></b></code></li><br />
<li><code><b>netstat -anu -f inet -P tcp | grep 8092 | grep LISTEN</b></code><br />
⇒ Beispielausgabe: <br /><code><b>2.109.14.68.8092 *.* syb157 190939 0 0 2621440 0 LISTEN</b></code><br />
⇒ hier ist der Prozess mit der PID <code><b>190939</b></code> der Übeltäter</li><br />
<li><code><b>netstat -un -P tcp | grep <portID></b></code><br />
/* Dann wurde die Prozess-ID genommen, die am häufigsten vorkam */</li><br />
<li><code><b>netstat -tulpen | grep <portID></b></code><br />
wobei:
<ul>
<li>‐t, ‐‐tcp<br />
<li>‐u, ‐‐udp<br />
<li>‐l, ‐‐list<br />
<li>‐p, ‐‐program <br />
Show the PID and name of the program to which each socket belongs.</li></ul>
<b>Achtung!</b><br />Nicht alle Optionen sind überall vorhanden.</li><br />
<li><code><b>lsof ‐i:<portID></b></code><br />
In virtuellen Umgebungen ist das Tool nicht brauchbar, <br />
da es für die Arbeit den Zugriff auf den Kernel braucht.</li><br />
<li><code><b>nmap -sT <IP-Adresse></b></code>
<br />Portscanner;
<br />Für einen ersten Scan nach offenen TCP-Ports wird lediglich <br />
der Parameter “‐sT“ und die IP-Adresse des Zielsystems be‐<br />
nötigt. Damit scannt nmap alle Well Known TCP-Ports (1-1024)<br />
und alle Ports aus der Datei etc/services. </li>
</ul>
<h3>Link:</h3>
<a href="https://forum.ubuntuusers.de/topic/kann-man-sehen-welcher-prozess-einen-bestimmt/" target=_blank>Ubuntu-Users :: Forum</a><br />
<a href="http://www.admin-magazin.de/News/Tipps/ADMIN-Tipp-Welcher-Prozess-benutzt-den-Port" target=_blank>ADMIN-Tipp: Welcher Prozess benutzt den Port?</a><br />
<a href="http://www.nwlab.net/tutorials/netstat/offene-ports-netstat.html" target=_blank>network lab :: Einsatz von nmap (Windows und Linux)</a>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://www.howtogeek.com/272049/how-to-access-.onion-sites-also-known-as-tor-hidden-services/"
target="_blank" rel="noreferrer noopener">
How-To Geek :: How to Access .onion Sites (Also Known as Tor Hidden Services)
</li>
</ul>
</html>
<html>
<table>
<tr><th>Command</th><th>Function</th></tr>
<tr><td>at</td><td>allows user to schedule task</td></tr>
<tr><td>atq</td><td>lists queued jobs for the logged-in user, or all users if run as sudo</td></tr>
<tr><td>atrm</td><td>removes jobs by specified job number</td></tr>
<tr><td>batch</td><td>instructs the system to only run the job at the specified time if system load is at a certain level (load average of <1.5)</td></tr>
<tr><td>All Keybindings</td><td>[ ctrl + a ] + ?</td></tr>
</table>
</html>
<html>
<ul>
<li><h3>Advanced Calculations with bc</h3>
</li>
<br />
<li><h3>BC AND NOT BEFORE AD</h3>
Fire up our old friend and often forgotten bc.
<code><pre>
% bc
</pre></code>
Enter your arthimetic expression
<code><pre>
20+20
</pre></code>
Will return
<code><pre>
40
</pre></code>
but the best part is, use the
“obase“ and “ibase“ commands for all
your conversion needs.
For example, type:
<code><pre>
obase=16
</pre></code>
then type:
<code><pre>
255
</pre></code>
This will output “FF“.
Next, if you type:
<code><pre>
obase=2
</pre></code>
Then a dot (or period), it stands for “the last number“)
<br />
It will return “11111111“, that's 255 in binary!
<br />
If you need hex to dec,
just type <code><pre>ibase=16</pre></code>and <code><pre>obase=10</pre></code>
<br />
Have fun!
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.shell-tips.com/linux/how-to-use-bc/" target="_blank" rel="noreferrer noopener">Shell‐Tips :: How to use bc</a></li>
</ul>
</html>
<html>
<ul>
<li>chroot steht für “<b><u>ch</u></b>ange <b><u>root</u></b>“ und ist eine Funktion unter Unix-Systemen,<br />
um das Rootverzeichnis zu ändern.</li>
<li>Sie wirkt sich nur auf den aktuellen Prozess und seine Kindprozesse aus.</li>
<li>“chroot“ selbst kann sich beziehen:<br />
<ul>
<li>sowohl auf den Systemaufruf <em>chroot(2)</em></li>
<li>als auch auf das Dienstprogramm <em>chroot(8)</em></li>
</ul></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Chroot" target="_blank" rel="noreferrer noopener">Wikipedia</a></li>
<li><a href="https://www.linuxwiki.de/chroot" target="_blank" rel="noreferrer noopener">LinuxWiki.org :: chroot</a></li>
<li><a href="https://www.geeksforgeeks.org/chroot-command-in-linux-with-examples/" target="_blank" rel="noreferrer noopener">Geeks for Geeks :: chroot ‐ With examples</a></li>
<!--
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
-->
</ul>
</html>
<html>
<ul>
<li>To delete/remove jobs (from the job list) or to tell the shell <b>not</b> <br />
to send a HUP signal use disown command. <br />
Das Programm “lebt“ weiter, es wird “nur“ von der aktuellen Shell abgekoppelt.<br />
<br />This command is part of bash or ksh93 shell.</li>
<br />
<li><b>Syntax</b><br />
The basic syntax is as follows:
<code><pre>
disown jobID
</pre></code>
OR
<code><pre>
disown jobID1 jobID2 ... jobIDN
</pre></code>
OR
<code><pre>
disown [options] jobID1 jobID2 ... jobIDN
</pre></code></li>
<li><b>disown command options : </b><br />
From the bash(1) command man page:
<table>
<tr><th>Option</th><th>Description</th></tr>
<tr><td>-a</td><td>Delete all jobs if jobID is not supplied.</td></tr>
<tr><td>-h</td><td>Mark each jobID so that SIGHUP is not <br />
sent to the job if the shell receives a SIGHUP.</td></tr>
<tr><td>-r</td><td>Delete only running jobs.</td></tr>
</table></li>
<br />
</ul>
<h3>Links:</h3>
<a href="https://www.cyberciti.biz/faq/unix-linux-disown-command-examples-usage-syntax/" target=_blank>nixCraft :: disown</a><br />
<a href="https://www.slashroot.in/disown-command-linux-explained-example-usage" target=_blank>SlashRoot :: disown cmd explained</a><br />
</html>
<html>
fg := <code><b>kill -SIGSTOP PID </b></code><br />
bg := <code><b>kill -SIGCONT PID</b></code>
</html>
<html>
<ul>
<li><h3>alle Files auflisten, die die Zahlen von 22 bis 28 im Filenamen enthalten:</h3>
<pre><code>find . -iname "*Udemy*Linux*Security*2[2-8]*"</code></pre>
z.B.
<pre><code>./2024-07-07_Sonntag/Udemy_LinuxSecurityEngineer-Kurs_22-Working-with-VPN-Connections.html
./2024-07-07_Sonntag/Udemy_LinuxSecurityEngineer-Kurs_23-Preparing-for-Attacks.html
./2024-07-07_Sonntag/Udemy_LinuxSecurityEngineer-Kurs_24-Planning-System-Security-Audits.html
./2024-07-07_Sonntag/Udemy_LinuxSecurityEngineer-Kurs_25-Understanding-Threat-Classification-Data.html
./2024-07-07_Sonntag/Udemy_LinuxSecurityEngineer-Kurs_26-Understanding-Major-Threat-Categories.html
./2024-07-07_Sonntag/Udemy_LinuxSecurityEngineer-Kurs_27-Auditing-Systems-Through-Scanning-and-Testing.html
./2024-07-07_Sonntag/Udemy_LinuxSecurityEngineer-Kurs_28-Creating-Backups-As-a-Security-Tool.html</code></pre>
</li>
<!-- <li>
<pre><code></code></pre>
</li>
-->
</ul>
<h2>Dateien nach Zeit suchen</h2>
<ul>
<li><h3>alle Dateien finden, die in den letzten 50 Tagen geändert wurden:</h3>
<pre><code>$ find / -mtime 50</code></pre>
Mit dem Befehl find können Benutzer nach Dateien suchen, die innerhalb einer bestimmten Zeit geändert wurden. Der obige Befehl druckt alle Dateien in Ihrem System aus, die vor 50 Tagen geändert wurden.
</li>
<li><h3>alle Dateien finden, auf die in den letzten 50 Tagen zugegriffen wurde:</h3>
<pre><code>$ find / -atime 50</code></pre>
Das -eine Zeit Option zeigt die Dateien an, auf die innerhalb eines definierten Zeitrahmens zugegriffen wurde. Der obige Befehl listet alle Dateien Ihres Systems auf, auf die vor 50 Tagen zugegriffen wurde.
</li>
<li><h3>alle Dateien finden, die in den letzten 50-100 Tagen geändert wurden:</h3>
<pre><code>$ find / -mtime +50 –mtime -100</code></pre>
<ul>
<li>Der Befehl find in Linux ermöglicht es Benutzern, nach allen Dateien zu suchen, die in einem bestimmten Zeitraum geändert wurden.
</li>
<li>Die Operatoren + und – werden in Verbindung mit verwendet -mtime dafür.
</li>
<li>Der obige Befehl findet alle Dateien, die Sie in den letzten 50 bis 100 Tagen geändert haben.
</li>
<li>["-100" :: vom Zeitpunkt <u>weniger als</u> 100 Tage in die Vergangenheit, <br />
"+50" :: vom Zeitpunkt <u>mehr als</u> 50 Tage in der Vergangenheit]
</li>
</ul>
</li>
<li><h3>alle Dateien finden, die in der letzten 1 Stunde geändert wurden [<em>wohl eher "created"</em>]:</h3>
<pre><code>$ finden / -cmin -60</code></pre>
Dieser Befehl sucht und listet alle Dateien auf, die in der letzten Stunde geändert wurden. Sie können / durch ein bestimmtes Verzeichnis ersetzen, um Ihre Suche einzugrenzen. Ändern Sie 60 in eine andere Zahl wie 120, um Dateien zu finden, die in dieser Zeit geändert wurden (2 Stunden für 120).
</li>
<li><h3>alle Dateien finden, die in der letzten 1 Stunde geändert wurden:</h3>
<pre><code>$ finden / -mmin -60</code></pre>
Der obige Befehl zeigt alle Dateien an, die innerhalb der letzten 1 Stunde geändert wurden. Wechseln Sie 60 zu einer anderen Zahl, um den für Ihren Zweck erforderlichen Zeitrahmen zu ändern.
</li>
<li><h3>alle Dateien finden, auf die in der letzten 1 Stunde zugegriffen wurde:</h3>
<pre><code>$ finden / -amin -<em>ZeitraumInMin</em></code></pre>
Dieser Befehl zeigt alle Dateien an, auf die in<br />
der letzten Stunde zugegriffen wurde;
</li>
<li><h3>To find the 10 biggest folders in current directory:</h3>
<pre><code>du -h | sort -hr | head -n 10</code></pre>
</li>
<li><h3>To find the 10 biggest files and folders in current directory:</h3>
<pre><code>du -ah | sort -hr | head -n 10</code></pre>
</li>
</ul>
<h2>cat-Befehl in -exec-Option verwenden:</h2>
<ul>
<li>
<pre><code>find ./11* -type f -iname "AWS*.html" -exec bash -c 'cat /media/mueller/MUELLER/StuffToDo/StuffToDo-Template.html > {}' \; -print</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://ciksiti.com/de/chapters/5847-50-simple-and-useful-examples-of-find-command-in-linux"
target="_blank" rel="noreferrer noopener">
CikSiti - Best Tech Tips :: 50 einfache und nützliche Beispiele für den Find-Befehl in Linux</a>
</li>
</ul>
</html>
<html>
<h2>journalctl - Abfragen des Systemd-Journals</h2>
<ul>
<li><h3>Syntax:</h3>
<pre><code>journalctl [<em>OPTIONEN …</em>] [<em>ÜBEREINSTIMMUNGEN …</em>]</code></pre>
</li>
<li><h3>Beschreibung:</h3>
<p>
journalctl kann zur Abfrage der Inhalte des Journals von systemd(1), wie von<br />
systemd‐journald.service(8) geschrieben, benutzt werden.<br />
</p>
<p>
Beim Aufruf ohne Parameter wird der gesamte Inhalt des Journals angezeigt, <br />
beginnend mit dem ältesten gesammelten Eintrag.
</p>
</li>
<li><h3>Optionen:</h3>
<pre><code>–b</code></pre>
</li>
</li>
</ul>
</html>
<html>
Speziell wenn eine Datenbankinstanz abgestürzt ist, oder <br />
mit <code>kill -9</code> beendet wurde, kann es passieren, <br />
dass das Shared memory <b>nicht</b> mehr aufgeräumt wird. <br />
Dann muss man erst mal nach dem blockierten resp. blockierenden<br />
Segment suchen und dann dieses Segment löschen. <br />
<h3>Anzeigen des aktuell belegten Shared memorys: </h3>
<code><pre>
$ ipcs -[ b | o | m ]
</pre></code>
Die Ausgabe des Befehles sieht etwa so aus:
<code><pre>
IPC status from <running system> as of Fri Jun 9 12:19:56 CEST 2017
T ID KEY MODE OWNER GROUP NATTCH SEGSZ
Shared Memory:
m 16777246 0x22c08bcd --rw------- syb157 dba 0 140521168896
m 24 0x1f08c88 --rw-rw-r-- root root 1 4192
m 23 0x1f08797 --rw-rw-r-- root root 1 4192
m 19 0x1f08c95 --rw-rw-r-- root root 1 4192
m 15 0x1f08784 --rw-rw-r-- root root 1 4192
m 14 0x1f08c8d --rw-rw-r-- root root 1 4192
m 10 0x1f0875b --rw-rw-r-- root root 1 4192
m 8 0x1f0873c --rw-rw-r-- root root 1 4192
m 7 0x1f085ae --rw-rw-r-- root root 1 4192
m 6 0x1f0871f --rw-rw-r-- root root 1 4192
m 4 0x1f087a4 --rw-rw-r-- root root 1 4192
m 3 0x31f08648 --rw-rw-rw- root root 3 131164
m 2 0xc6629c9 --rw-rw-rw- root root 2 609260
m 0 0x6347849 --rw-rw-rw- root root 2 65544
</pre></code>
Danach kann man dann den blockierten Speicherbereich löschen mit
<code><pre>
$ ipcrm –m {ID}
</pre></code>
oder
<code><pre>
$ ipcrm –M {KEY}
</pre></code>
Unter RH7 klappt das wie folgt:
<code><pre>
syb157@nlbmindbsve01:/appdata/dbfs/home/syb157/ASE-15_0/install$ <b>ipcs -m </b>
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x06347849 0 root 666 65544 2
0x010501d1 65537 root 664 4192 1
0x0c6629c9 98306 root 666 1203136 2
0x31052be4 131075 root 666 131176 3
0xd3028845 126451716 723 600 6144000000 0
0x010501be 196613 root 664 4192 1
0x0105ebfa 229382 root 664 4192 1
0x010501c3 262151 root 664 4192 1
0x010501cc 294920 root 664 4192 1
0x010501c9 360457 root 664 4192 1
0x010501cd 425994 root 664 4192 1
0x0105f4c6 524299 root 664 4192 1
0x0105f4c4 557068 root 664 4192 1
0x0105f4c8 622605 root 664 4192 1
0xd302c47d 64454670 723 600 2621440000 0
[root@nlbmindbsve01 ~]# <b>ipcs -m </b>
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x06347849 0 root 666 65544 2
0x010501d1 65537 root 664 4192 1
0x0c6629c9 98306 root 666 1203136 2
0x31052be4 131075 root 666 131176 3
0xd3028845 126451716 723 600 6144000000 0
0x010501be 196613 root 664 4192 1
0x0105ebfa 229382 root 664 4192 1
0x010501c3 262151 root 664 4192 1
0x010501cc 294920 root 664 4192 1
0x010501c9 360457 root 664 4192 1
0x010501cd 425994 root 664 4192 1
0x0105f4c6 524299 root 664 4192 1
0x0105f4c4 557068 root 664 4192 1
0x0105f4c8 622605 root 664 4192 1
0xd302c47d 64454670 723 600 2621440000 0
[root@nlbmindbsve01 ~]# <b>ipcrm shm 126451716 </b>
resource(s) deleted
[root@nlbmindbsve01 ~]# <b>ipcs -m </b>
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x06347849 0 root 666 65544 2
0x010501d1 65537 root 664 4192 1
0x0c6629c9 98306 root 666 1203136 2
0x31052be4 131075 root 666 131176 3
0x010501be 196613 root 664 4192 1
0x0105ebfa 229382 root 664 4192 1
0x010501c3 262151 root 664 4192 1
0x010501cc 294920 root 664 4192 1
0x010501c9 360457 root 664 4192 1
0x010501cd 425994 root 664 4192 1
0x0105f4c6 524299 root 664 4192 1
0x0105f4c4 557068 root 664 4192 1
0x0105f4c8 622605 root 664 4192 1
0xd302c47d 64454670 723 600 2621440000 0
[root@nlbmindbsve01 ~]# <b>ipcrm shm 64454670 </b>
resource(s) deleted
[root@nlbmindbsve01 ~]#
</pre></code>
</html>
<html>
<ul>
<li><b>welcher Prozess an den Port mit der Nr. Port-Nr "in Beschlag" genommen</b>
<code><pre>lsof -i :<i><Port-Nr></i></pre></code>
bzw.
<code><pre>lsof -n -i :<i><Port-Nr></i></pre></code>
<b>Beispiel:</b>
<code><pre>lsof -n -i :11070</code></pre></li>
</ul>
</html>
<html>
GNU Screen ist ein Terminalmultiplexer, der mehrere separate “Bildschirme“ auf<br />
einem einzelnen, physischen, zeichenbasierten Terminal darstellt. Jedes<br />
virtuelle Terminal emuliert ein DEC VT100, ergänzt um verschiedene ANSI-X3.64-<br />
und ISO-2022-Funktionen. Screen-Sitzungen können abgetrennt und später auf<br />
einem anderen Terminal fortgesetzt werden.<br />
<br />
Screen unterstützt eine Menge weiterer Funktionen, beispielsweise<br />
konfigurierbare Ein- und Ausgabekonvertierung, konfigurierbare<br />
Protokollierung, Unterstützung der seriellen Schnittstelle und mehrere<br />
Benutzer.<br />
<br />
Es können beliebig viele konsolenbasierte Applicationen<br />
innerhalb eines Terminals laufen;<br />
<br />
ein screen-Terminal bleibt solange aktiv, bis es explizit geschlossen wird,<br />
dh. es ist möglich, ein Terminal von einem laufenden Programm zu<br />
entkoppeln (die Wirkung ist einem "nohup" ähnlich)<br />
<br />
Alternativen: mutt, tmux<br />
<h3>Aufruf: </h3>
<code><pre>screen [ ‐d | -r | -ls | -x | -c <user>]</pre></code>
<h3>Optionen:</h3>
<ul>
<li>‐d :: (“de‐tach“) eine screen-Sitzung vom Terminal “abhängen“</li>
<br />
<li> -r :: (“re-Attach“) eine alte screen-Sitzung wird (nach erneutem Login) wieder aufgenommen</li>
<br />
<li> -ls :: Auflisten der derzeit existierenden screen-Sitzungen des Users</li>
<br />
<li> -x :: Hinzuschalten zu einer laufenden Sitzung</li>
<br />
<li> -c :: Verbinden zur screen-Sitzung des Users <user>:<br />
* Hierzu wird zuerst in den Kommando-Modus gewechselt: C-a :<br />
* dann den Zugang für einen User freischalten:<br />
<code><b>
multiuser on<br />
acladd <userNamen>
</b></code></li>
</ul>
<h3>Befehle in screen:</h3>
Ähnlich wie bei vi muss eine Tastenkombination gedrückt werden<br />
um in den sog. "<b>Befehlsmodus</b>" (<code><i>command mode</i></code>) zu gelangen: <code><b>Ctrl - a</b></code>
<table>
<tr><th>Tastenkürzel</th><th>Bedeutung / Aktion</th></tr>
<tr>
<td>screen -R projectx</td><td>reattach to the screen session named "projectx" or create it fresh now.</td>
</tr>
<tr>
<td>Ctrl-a c</td><td>Neues Terminal erzeugen ("create")</td>
</tr>
<tr>
<td>Ctrl-a Shift-k</td><td>Terminal schliessen (“kill“) [Alternativ: exit ]</td>
</tr>
<tr>
<td>Ctrl-a n</td><td>zum nächsten Terminal wechseln ("next")</td>
</tr>
<tr>
<td>Ctrl-a p</td><td>zum vorherigen Terminal wechseln ("previous")</td>
</tr>
<tr>
<td>Ctrl-a <<i>Nr</i>></td><td>zum n-ten Terminal wechseln</td>
</tr>
<tr>
<td>Ctrl-a w</td><td>Die Liste wird in der letzten Fensterzeile, <br />
in der Status-Zeile angezeigt</td>
</tr>
<tr>
<td>Ctrl-a Shift-2 <br />[steht für: Ctrl-a "]</td><td>Die Liste der Fenster wird in einer Liste <br />innerhalb des Screen-Fensters angezeigt</td>
</tr>
<tr>
<td>Ctrl-a d</td><td>Terminal verlassen, ohne es zu beenden ("detach").</td>
</tr>
<tr>
<td>Ctrl-a A</td><td>Einem Terminal einen (sprechenden) Namen geben</td>
</tr>
<tr>
<td>Ctrl-a ?</td><td>Übersicht derTastaturkürzel</td>
</tr>
<tr>
<td>Ctrl-a Ctrl-a</td><td>zum zuletzt benutzten Terminal wechseln</td>
</tr>
<tr>
<td>Ctrl-a d</td><td>Terminal verlassen, ohne es zu beenden ("detach")</td>
</tr>
<tr>
<td>Ctrl-a r</td><td>Sitzung wieder aufnehmen ("recover")</td>
</tr>
<tr>
<td>Ctrl-a x</td><td>Sitzung sperren</td>
</tr>
<tr>
<td>Ctrl-a H</td><td>Logging der Bildschirmausgabe starten/stoppen</td>
</tr>
<tr>
<td>Ctrl-a M</td><td>Terminalausgaben-Überwachung</td>
</tr>
</table>
<br />
<b>Note:</b><br />
in the above list, "Ctrl-a c" means pressing the Ctrl and a keys at the same<br />
time, followed by c. Ctrl-a is called the command key, and all screen commands <br />
start with this key sequence.<br />
<h3>Konfigurationsdatei:~/.screenrc</h3>
Beispiel-Inhalt von .screenrc:<br />
<code><pre>
hardstatus alwayslastline "%{wb} %w %= %{wb}%D, %d-%m-%Y %c "
vbell on
startup_message off
bind s
bind k
bind ^k
bind .
bind ^\
bind \\
bind ^h
bind h
</pre></code>
=> Erklärung der Einstellungen:<br />
%d-%m-%Y :: Angeben des aktuellen Tages, Monat, Jahr (in YYYY)<br />
<br />
%c :: Angeben der aktuellen Uhrzeit, im 24-Std-Format<br />
<br />
%D :: Angeben des aktuellen Wochentages<br />
<br />
vbell on :: falls Fehler, dann wird visuell Meldung gemacht<br />
<br />
%w :: Angeben sämtlicher Nummern und deren Fensternamen<br />
<br />
%{wb} :: Schrift-/Hintergrundfarben, hier: weiss auf blau<br />
<br />
%{kb} :: Schrift-/Hintergrundfarben, hier: schwarz auf blau<br />
<br />
%H :: Hostname<br />
<br />
%= :: Auffüllen des Strings mit Leerzeichen, so dass die maximale<br />
Zeichenlänge erreicht wird<br />
<br />
<b>The message line</b><br />
<br />
Screen zeigt Informations-Nachrichten und andere in einer Nachrichten-<br />
zeile (message line). <br />
<br />
Die Nachrichtenzeile wird automatisch nach ein paar Sekunden<br />
Verzögerung entfernt.<br />
<br />
echo '<esc>^Hello world from window '$WINDOW'<esc>\\'<br />
<br />
wobei '<esc>' ist ein Escape-Zeichen (Strg-V, ESC), <br />
'^' ist das Caret/Zirkumflex, <br />
und '\\' wird in einem single backslash verwandelt.<br />
<br />
z.B. echo '^[^Hello world from window '$WINDOW'^[\\'<br />
<br />
''Anmerkung:''<br />
die Option -c ist falsch, es ist eine Erweiterung von -r;<br />
dummerweise werden zwei verschiedene /var/run-Verzeichnisse verwendet:<br />
bei root ist es /var/run/screens, bei jam ist es /var/run/uscreens/S-jam!!!<br />
<br />
Anscheinend ist das Tool so von SuSE kompiliert worden -> Nachfragen!!<br />
<br />
Alternative zu "screen": tmux<br />
<br />
<h3>Links:</h3>
<a href="https://www.rackaid.com/blog/linux-screen-tutorial-and-how-to/" target=_blank>rackAID :: screen</a><br />
---------------------------------------------------------------------------------------------------------------------------------------<br />
<br />
ein weiterer Artikel: noch einarbeiten!! (insbesondere der shared mode)<br />
<br />
Using Multiuser Sessions in GNU Screen<br />
<br />
18 July 2009 by ddouthitt 4 Comments<br />
<br />GNU Screen is a fantastic utility; however, if you want to use multiuser<br />
sessions - that is to share your screen session with another user<br />
- you'll have to set it up.<br />
<br />
First, you have to make sure that multiuser capabilities are in the screen<br />
binary. We'll assume for purposes of this article that screen has<br />
already been compiled with multiuser capabilities - it appears that most <br />
prepackaged versions of GNU screen should have these capabilities <br />
already built in.<br />
<br />
Make sure that the screen binary is properly configured to use the multiuser<br />
capabilities with these steps:<br />
<br />
* Make screen suid: chmod u+s $(which screen). <br />
This can be dangerous: <br />
you have to trust screen not to have anything in it <br />
(such as bugs) that will permit a user to take over as root.<br />
* Make sure that the directory /var/run/screen exists and has permissions of 755.<br />
<br />
Now that screen is set up, run the initial screen session and prep it for multiuser access:<br />
<br />
* As a regular user, run GNU screen.<br />
* Start multiuser mode with the multiuser on screen command.<br />
* Allow a user to access the session by using the screen command acladd user<br />
with the appropriate user name or names.<br />
<br />
Finally, the user who wants to access your screen session needs to run screen on<br />
the same system thusly:<br />
<br />
screen -x shareduser/<br />
<br />
This assumes that you ran the initial screen session as shareduser -<br />
and don't leave off the final slash as that is necessary to make this work.<br />
<br />
If you want to give this session a name (to separate it from your normal<br />
screen session perhaps), then use this command to start the session:<br />
<br />
screen -S shared<br />
<br />
Then let the other user use this command to connect:<br />
<br />
screen -x shareduser/shared<br />
<br />
That is, the user running the screen session is shareduser and the session<br />
name is shared.<br />
<br />
There are more screen commands that are useful in multiuser mode; they are<br />
described the manual in section 8.4. There is also another web page that<br />
provides some tips on using screen, mostly focusing on multiuser mode -<br />
including how to create read-only users.<br />
<br />
Actually, it does work in HP-UX. Believe or not, just last night I used the<br />
multiuser session capability of a screen session that was running on HP-UX.<br />
Remember that GNU screen must be compiled to support multi-user sessions. If<br />
the capability is not in the binary, then it won't work.<br />
<br />
(http://administratosphere.wordpress.com/2009/07/18/using-multiuser-sessions-in-gnu-screen/)<br />
<br />
und noch einer:<br />
http://tuxtraining.com/2009/01/23/gnu-screen-working-with-the-scrollback-buffer<br />
<br />
</html>
<html>
<h3>screen - Übungen</h3>
<ol>
<li><details><summary>Starte screen und dann zwei weitere Sessions</summary><br />
<b>Befehle :</b><br />
<ul><li><code><b>screen</b></code></li>
<li><code><b>Ctrl-a c</b></code>, 2*mal eingeben</li></ul><br /></details></li>
<li><details><summary>Wie lautet das Konfigurationsfile?</summary><br />
<code><b>.screenrc</b></code>, es liegt im Homeverzeichnis des aufrufenden Users<br /><br /></details></li>
<li><details><summary>Gib den Sessions die Bezeichnung “First“, “Second“ und “Third“ <br />
in der angegebenen Reichenfolge</summary><br /><code><b>Ctrl-a Shift-a</b></code>, den angegebenen Namen löschen und den neuen Namen eingeben<br /><br /></details></li>
<li><details><summary>Mit welchem Befehl gehe ich <br />
a) vorwärts<br />
b) rückwärts<br />
von einem Fenster zum nächsten?</summary><br />a) vorwärts :: <code><b>Ctrl-a n</b></code><br />b) rückwärts :: <code><b>Ctrl-a p</b></code><br /><br /></details></li>
<li><details><summary>Gibt es alternative Befehle? Wenn ja, wie lauten sie?</summary><br />
a) vorwärts :: <code><b>Ctrl-a spacebar</b></code><br />
b) rückwärts :: <code><b>Ctrl-a backspace</b></code><br /><br />
<br /></details></li>
<li><details><summary>Mit welcher Tastenfolge wird das Session-Fenster gesperrt?</summary><br /><code><b>Ctrl-a x</b></code><br /><br /></details></li>
<li><details><summary>Wie wird – innerhalb von screen – die Liste der aktuellen Fenster angezeigt?</summary><br /><code><b>Ctrl-a Shift-2</b></code><br /><br /></details></li>
<li><details><summary>Wie lautet die <code><b>screen</b></code>‐Option, um sich alle aktuell <br />
laufenden Screen‐Sessions anzuzeigen?</summary><br /><code><b>‐ls</b></code><br />⇒ <code><b>screen ‐ls</b></code><br /><br /></details></li>
<li><details><summary>Wie richtet / aktiviert man ein (zusätzliches) Screen‐<br />
Passwort zum Sperren der Screen-Session ein?</summary><br />In einem der Fenster folgendes eingeben:<br />
<code><b>Ctrl–a Shift–.</b></code> (Punkt-Taste drücken, so dass der Doppelpunkt erscheint)<br />
es zeigt sich dann:<br />
<img src="./pictures/screen_password_01.png" width=301 heigth=61 /><br />
<img src="./pictures/screen_password_02.png" width=320 heigth=72 /><br />
<img src="./pictures/screen_password_03.png" width=359 heigth=76 /><br />
<img src="./pictures/screen_password_04.png" width=346 heigth=84 /><br />
<img src="./pictures/screen_password_05.png" width=357 heigth=61 /><br />
<img src="./pictures/screen_password_06.png" width=536 heigth=101 /><br />
Quelle: <a href="http://damien.krotkine.com/2011/09/01/protect-a-screen-session-with-a-password.html" target=_blank>Damien Krotkine :: protect a screen session with a password</a><br />
<br /></details></li>
<li><details><summary>Es ist möglich, das aktuelle Fenster zu splitten. Wie geht das?</summary><br />Das Splitting erfolgt, wenn man eingibt:
<ul>
<li>in dem gewünschten Screen-Fenster eingeben: <code><b>Ctrl-a Shift-.</b> (Control-a & Shift-Punkt)</code></li>
<li>⇒ es erscheint der Doppelpunkt</li>
<li>⇒ jetzt ist einzugeben: <code><b>split</b></code> (horizontaler Split) bzw. <code><b>split -v</b></code> (vertikaler Split)</li>
</ul>
Danach ist das Fenster geteilt. <br />
<br /></details></li>
<li><details><summary>Wenn das Fenster geteilt ist, wie kann man in die anderen Fenster wechseln?
</summary></br>Mit “<b>Ctrl-a Shift-.</b>“ und der Eingabe <b>focus</b> wechselt man zwischen diesen Fenstern hin und her.<br />
Zusätzlich kann das Zielfenster mittels der folgenden Optionen <br />
noch genauer angegeben werden:<br />
<img src="./pictures/screen_focus.png" width=587 height=70/><br />
Beim neuen Fenster muss noch angegeben werden, welches Fenster in dem neuen angegeben werden soll. Daher ist hier z.B. “<b>Ctrl-a 2</b>“ für das Fenster mit der Bezeichnung “2“ auszuwählen;<br />
Mit “<b>Ctrl-a Shift-.</b>“ und der Eingabe <b>remove</b> wird das aktuelle Fenster gelöscht.<br />
<br />
Aus der man-page von screen:<br />
<pre><b>split [-v]</b>
Split the current region into two new ones. All regions on the display are resized
to make room for the new region. The blank window is displayed on the new region.
Splits are made horizontally unless -v is used. Use the "remove" or the "only" com‐
mand to delete regions. Use "focus" to toggle between regions.
</pre><br /><br /></details></li>
<li><details><summary>Mit welcher Befehlskombination werden all "regions" (Sub-Fenster) <br />
beendet/gelöscht, bis auf das aktuelle (Sub-)Fenster?</summary><br />
Befehlskombination:<code><pre><b>Ctrl - a Shift-q</b></pre></code><br />
<br /></details></li>
<li><details><summary>Was muss man machen, um die Maus verwenden zu können?</summary>
<br />In das File <code><b>~/.screenrc</b></code> die <br />
Zeile <code><pre> mousetrack on
</pre></code> eintragen.<br />
<br /></details></li>
<li><details><summary>Was ist wie einzustellen, um mit dem Aufruf von screen gleich<br />
die gewünschten Fenster eingerichtet zu bekommen?</summary><br />
Am Ende vom Konfigurationsfile <code><b>.screenrc</b></code> screen mit der Option <code><b>‐t</b></code> aufrufen.<br />
<br />
<b>Beispiel:</b><br />
<code><b>screen -t python 5 python3</b></code><br />
<br />
Die Syntax ist dabei: <code><b>screen -t <i><u>FensterName</u></i> <i><u>FensterNummer</u></i> [<i><u>aufzurufendes Programm</u></i>]</b></code>
<br /><br /></details></li>
<li><details><summary>Mit welcher Befehlskombination werden Fenster geschlossen?</summary><br />
<code><pre><b>Ctrl - a Shift - k</b></pre></code><br /><br /></details></li>
<!-- li><details><summary>Frage</summary><br />Antwort<br /><br /></details></li -->
</ol>
</html>
<html>
<ul>
<li>Terminal‐Multiplexer, ähnlich screen;</li>
<li>tmux in xterm‐Session:<code><pre>
xterm -fg black -bg white -ah -T tmux-Sessions -n tmux-Sessions -geometry 200x50 -e tmux
</pre></code></li>
<li>Aufruf: <code><pre>tmux</pre></code>
Dabei werden die Login-Files
<ul>
<li>/etc/bash.bashrc
</li>
<li>/etc/profile
</li>
<li>~/.bash_profile
</li>
</ul>
(in dieser Reihenfolge) gelesen.<br />
</li>
<br />
<li>tmux‐Fenster schliessen:
<code><pre><b>exit</b></pre></code></li>
<li>Präfix:
<code><pre>Ctrl+b</pre></code>
</li>
<li>bereits vorhandene Session umbenennen:
<code><pre>tmux rename‐session <em><SESSION‐NAME></em></pre></code>
Shortcut:
<code><pre>Ctrl+b $</pre></code>
</li>
<li>neue Session aufrufen:
<code><pre>tmux new‐session ‐s <em><SESSION‐NAME></em></pre></code>
bzw.
<code><pre>tmux new ‐s <em><SESSION‐NAME></em></pre></code>
</li>
<li>aktuell vorhandene Sessions auflisten:
<code><pre>tmux [ ls | list‐sessions ]</pre></code>
</li>
<li>aktuelle Session abhängen (um sie im Hintergrund weiterlaufen zu lassen):
<code><pre>Ctrl+b d</pre></code>
</li>
<li>Session wieder anhängen:
<code><pre>tmux [ attach | attach ‐t <em><SESSION‐NAME></em> ]</pre></code>
</li>
<li>Alternative zu “exit“ zum Schliessen einer Session:
<code><pre>tmux kill‐session ‐ <em><SESSION‐NAME></em> ]</pre></code>
</li>
<li><h3>Tastenkombinationen zur Bearbeitung von <em>panes</em></h3>
<table>
<thead>
<tr>
<th>Prefix Command</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center"><code><pre><b>Ctrl+b %</b></pre></code></td>
<td>Divides the current window in half vertically.</td>
</tr>
<tr>
<td align="center"><code><pre><b>Ctrl+b</strong></code> <code><strong>"</b></pre></code></td>
<td>Divides the current window in half horizontally</td>
</tr>
<tr>
<td align="center"><code><pre><b>Ctrl+b</strong></code> <code><strong>o</b></pre></code></td>
<td>Cycles through open panes</td>
</tr>
<tr>
<td align="center"><code><pre><b>Ctrl+b</strong></code> <code><strong>q</b></pre></code></td>
<td>Momentarily displays pane numbers in each pane</td>
</tr>
<tr>
<td align="center"><code><pre><b>Ctrl+b</strong></code> <code><strong>x</b></pre></code></td>
<td>Closes the current pane after prompting for confirmation</td>
</tr>
<tr>
<td align="center"><code><pre><b>Ctrl+b</strong></code> <code><strong>&</b></pre></code></td>
<td>Closes the current window after prompting for confirmation</td>
</tr>
<tr>
<td align="center"><code><pre><b>Ctrl+b</strong></code> <code><strong>Space</b></pre></code></td>
<td>Cycles through the various pane layouts</td>
</tr>
<tr>
<td align="center"><code><pre><b>Ctrl+b</strong></code> <code><strong>{</b></pre></code></td>
<td>Move the current pane to left</td>
</tr>
<tr>
<td align="center"><code><pre><b>Ctrl+b</strong></code> <code><strong>}</b></pre></code></td>
<td>Move the current pane to right</td>
</tr>
<tr>
<td align="center"><code><pre><b>Ctrl+b</strong></code> <code><strong>⇑</b></pre></code></td>
<td>Switch to the pane above the current pane</td>
</tr>
<tr>
<td align="center"><code><pre><b>Ctrl+b</strong></code> <code><strong>⇓</b></pre></code></td>
<td>Switch to the pane below the current pane</td>
</tr>
<tr>
<td align="center"><code><pre><b>Ctrl+b</strong></code> <code><strong>⇐</b></pre></code></td>
<td>Switch to the pane on the left side of the current pane</td>
</tr>
<tr>
<td align="center"><code><pre><b>Ctrl+b</strong></code> <code><strong>⇒</b></pre></code></td>
<td>Switch to the pane on the right side of the current pane</td>
</tr>
<tr>
<td align="center"><code><pre><b>Ctrl+b</strong></code> <code><strong>z</b></pre></code></td>
<td>Toggle pane zoom</td>
</tr>
<tr>
<td align="center"><code><pre><b>Ctrl+b</strong></code> <code><strong>!</b></pre></code></td>
<td>Combine and Convert all the panes into single window</td>
</tr>
</tbody>
</table>
</li>
<li><h3>Synchroniseren der Fenster:</h3>
Mit dem Befehl<br />
<code><pre>Ctrl+b :setw synchronize-panes</pre></code>
wird tmux dazu angewiesen, einen Befehl, den man in einem Pane eingibt,<br />
automatisch in allen anderen Panes (gleichzeitig) auszuführen.<br />
<br />
Mit der Anweisung<br />
<code><pre>Ctrl+b :setw synchronize-panes off</pre></code>
wird diese Fähigkeit wieder abgeschaltet.<br />
</li>
<!--
<li></li>
<li></li>
<li></li>
<li></li>
-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.golinuxcloud.com/tmux-commands/" target="_blank" rel="noreferrer noopener">GoLinuxCloud :: Complete tutorial on tmux commands with examples from scratch</a></li>
<li><a href="https://www.golinuxcloud.com/tmux-config/" target="_blank" rel="noreferrer noopener">GoLinuxCloud :: 10 practical examples of tmux configuration with examples</a></li>
<li><a href="https://www.golinuxcloud.com/tmux-cheatsheet/" target="_blank" rel="noreferrer noopener">GoLinuxCloud :: List of 50+ tmux cheatsheet and shortcuts commands</a></li>
<li><a href="https://how-to.dev/how-to-create-tmux-session-with-a-script" target="_blank" rel="noreferrer noopener">How To Dev :: How to create tmux session with a script</a></li>
<li><a href="https://medium.com/@bingorabbit/tmux-propagate-to-all-panes-9d2bfb969f01"_blank" rel="noreferrer noopener">Medium‐Blog Ibrahim AbdelFattah (<em>bingorabbit</em>) :: tmux, propagate to all panes</a></li>
</ul>
</html>
<html>
<ul>
<li>Eintrag in <b><em>$HOME/.bash_profile</em></b>:<br />
<code><pre>
if [[ -z "$TMUX" ]]; then
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM=gnome-256color
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM=xterm-256color
fi
else
export TERM=screen-256color
</pre></code>
</li>
<li>Eintrag in <b><em>$HOME/.tmux.config</em></b>:<br />
<code><pre>
# Session & bestimmte Fenster / Windows gleich beim Aufruf erstellen
new -s MAIN
neww -n "Wiki-Download" -c "Downloads"
neww -n "grep-Wiki"
neww -n "StuffToDo" -c "/media/mueller/INT-256GB/StuffToDo/$(date +%Y-%m-%d_%A)"
neww -n "StuffToDo" -c "/media/mueller/INT-256GB/StuffToDo/$(date +%Y-%m-%d_%A)"
set-option -g default-terminal "screen-256color"
# Enabling scrolling / mouse support
set-option -g mouse on
# Status bar settings ["rot" auf "schwarz"]
set-option -g status-bg colour236
set-option -g status-fg colour202
set-option -g status-left ""
set-option -g status-right " #[fg=red,bright,bg=colour236]\#{host_short} #[fg=default,bg=colour236]%H:%M"
# Setting the windows title correctly
set-option -g set-titles on
set-option -g terminal-overrides "xterm*:smcup@:rmcup@"
set-option -g allow-rename on
# Set bind key to reload configuration file
bind r source-file ~/.tmux.conf \; display “.tmux.conf reloaded!“
# Set different background color for active window
set -g window-status-current-bg magenta
</pre></code>
</li>
<li><h3>Customize the status bar</h3>
Tmux's status bar is fully customizable. You can change the colors of each section and what is displayed. There are so many options that it would require another article to cover them, so I'll start with the basics.
The standard green color for the entire status bar makes it difficult to see the different sections. It's particularly difficult to see how many windows you have open and which one is active.
You can change that by updating the status bar colors. First, enter command mode by typing Ctrl+B : (or Ctrl+A : if you made the prefix configuration change above). Then change the colors with these commands:
<ul>
<li>Change the status bar background color:
<code><pre>set -g status-bg cyan</pre></code>
</li>
<li>Change inactive window color:
<code><pre>set -g window-status-style bg=yellow</pre></code>
</li>
<li>Change active window color:
<code><pre>set -g window-status-current-style bg=red,fg=white</pre></code>
</li>
</ul>
Add these commands to your configuration file for permanent changes.
</li>
<li><h3>Copy & Paste</h3>
<code><pre>
set-option -g mouse on
setw -g mode-keys vi
set-option -s set-clipboard off
bind P paste-buffer
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X rectangle-toggle
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel 'xclip -se c -i'
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'xclip -se c -i'
</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.man7.org/linux/man-pages/man1/tmux.1.html" target="_blank" rel="noreferrer noopener">Linux Man Page :: Tmux</a></li>
<li><a href="https://rakhesh.com/linux-bsd/basic-tmux-configuration/" target="_blank" rel="noreferrer noopener">rakesh.com :: Basic tmux configuration</a></li>
<li><a href="https://www.golinuxcloud.com/tmux-config/" target="_blank" rel="noreferrer noopener">
GoLinuxCloud :: 10 practical examples of tmux configuration with examples</a></li>
<li><a href="https://tmuxguide.readthedocs.io/en/latest/tmux/tmux.html" target="_blank" rel="noreferrer noopener">TMUX Guide</a></li>
<li><a href="https://admin-magazin.de/News/Tipps/Tmux-beim-Einloggen-starten" target="_blank" rel="noreferrer noopener">Admin‐Magazin :: Tmux beim Einloggen
starten</a></li>
<li><a href="https://dev.to/iggredible/tmux-tutorial-for-beginners-5c52" target="_blank" rel="noreferrer noopener">DEV Community :: Tmux Tutorial for Beginners</a></li>
<li><a href="https://dev.to/iggredible/useful-tmux-configuration-examples-k3g" target="_blank" rel="noreferrer noopener">DEV Community :: Useful Tmux Configuration Examples </a></li>
<li><a href="https://www.rockyourcode.com/copy-and-paste-in-tmux/" target="_blank" rel="noreferrer noopener"></a>Rock Your Code :: Copy and Paste in Tmux</li>
</ul>
</html>
<html>
You can set the maximum character length of each status line 'section' with
<code><pre>
status–<position>–length
</pre></code>, so for your particular case, add:<br />
<code><pre>
set –g status–left–length 20 <em># could be any number</em>
</pre></code>
to your <b>.tmux.conf</b> and it will no longer be cut off.<br />
<br />
<h3>Links:</h3>
<ul>
<li><a href="https://stackoverflow.com/questions/72539284/how-to-extend-the-length-of-session-name-in-tmux"
target=_blank" rel="referrer reopener">
Stackoverflow ::
</li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://unix.stackexchange.com/questions/373688/what-does-c-bm-or-right-clicking-a-tmux-pane-do"
target="_blank" rel="noreferrer noopener">
UNIX – StackExchange :: What does Ctrl+b m … ?</a>
</li>
</ul>
</html>
<html>
<code><pre>alias watch="while ( true ) ; do clear; ls -latr; sleep 5; done" </pre></code>
</html>
<html>
<ul>
<li>VPN-Client & ‐Server</li>
<br />
<li>In-Kernel-Implementierung;</li>
<br />
<li>verwendet, wie SSH, private & öffentliche Schlüssel;</li>
<br />
<li>verwendeter Verschlüsselungsalgorithmus: Curve25519;</li>
<br />
<li>für Debian “Buster“ ist ein Backport notwendig;</li>
<br />
<!--
<li></li>
<br />
<li></li>
<br />
<li></li>
<br />
<li></li>
<br />
-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="http://www.linux-community.de/ausgaben/linuxuser/2018/11/tunnelbauer/" target=_blank>LinuxUser 11/2018, S. 24ff</a></li>
<li><a href="http://www.linux-user.de/qr/41598" target=_blank>LinuxUser 11/2018, zusätzliche Infos</a></li>
<li>LinuxUser Spezial 01/2019 - Heft</li>
<li><a href="https://www.thomas-krenn.com/de/wiki/WireGuard_Grundlagen" target=_blank>Thomas Krenn :: Wireguard - Grundlagen</a></li>
<!--li><a href="" target=_blank></a></li>
<a href="" target=_blank></a></li>
<a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li-->
</ul>
</html>
<html>
<b>System diagnostic and configuration</b><br>
/usr/sbin/prtdiag<br>
/usr/sbin/prtconf<br>
<br>
<b>Server name information</b><br>
uname -a<br>
cat /etc/hosts<br>
<br>
<b>CPU info</b><br>
/usr/sbin/psrinfo -p -v<br>
/usr/bin/mpstat<br>
<br>
<b>Disk statistics</b><br>
/usr/bin/iostat -E<br>
<br>
<b>Active process statistics</b><br>
/usr/bin/prstat -a<br>
<br>
<b>????</b><br>
/usr/bin/pradmin<br>
<br>
<br>
<h3>Zones</h3>
<br>
<b>Enter a zone</b><br>
zlogin localzonename<br>
<br>
<b>Administer zones</b><br>
zoneadm<br>
<br>
<b>Configure zones. Configure zone app1</b><br>
zonecfg ‐z zone_1<br>
zonecfg:zone_1> set pool=pool_1<br>
zonecfg:zone_1> verify<br>
<br>
<br>
<h3>Sun Cluster</h3><br>
<br>
<b>Cluster status</b><br>
cluster status<br>
<br>
<b>Manage cluster resources</b><br>
/usr/cluster/bin/clrs<br>
<br>
<b>List resources</b><br>
clrs list<br>
<br>
<b>Show status of resources</b><br>
clrs status<br>
<br>
<b>Start/stop resource</b><br>
clrs enable <resource><br>
clrs disable <resource><br>
<br>
<b>Set resource monitoring on/off</b><br>
clrs monitor <resource><br>
clrs unmonitor <resource><br>
<br>
<b>Get configuration</b><br>
clrs export -o filename<br>
<br>
<b>Manage resource groups</b><br>
/usr/cluster/bin/clrg<br>
<br>
<b>List resource groups</b><br>
clrg list<br>
<br>
<b>Show status of resource groups</b><br>
clrg status<br>
<br>
<b>Switch resource group from node to node</b><br>
clrg switch -n <node>:<zone> <resource group><br>
<br>
<b>Get configuration</b><br>
clrg export -o filename<br>
<br>
<h3>Link:</h3>
<a href="http://teemu.wikidot.com/solaris" target=_blank>Teemu :: Solaris</a>
</html>
<html>
<ul>
<li>Der senkrechte Strich im T steht für eine Spezialisierung, etwas, in das man vertieft eingedrungen ist und so viel Erfahrungen gesammelt hat, dass man sich “Könner“ nennen kann.</li>
<li>Der waagerechte Oberstrich symbolisiert Breitenwissen: die Fähigkeit, rechts und links vom eigenen Spezialwissen das Umfeld wahrzunehmen. Breitenwissen ermöglicht es, sich effektiv und effizient in Teams einbringen zu können, weil die Bedeutung der verschiedenen Disziplinen für die Lösung von Aufgaben erkannt und akzeptiert ist.</li>
<li>Das eigene Spezialistenwissen ‐ und das Bewusstsein, dass man es hat und dass es im Team gebraucht wird ‐ ermöglicht es, dieses nicht nur einzubringen, sondern auch Verantwortung dafür zu übernehmen, dass es beachtet wird.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.print.de/news-de/t-shaped-skills-qualifikationen-in-die-breite-und-in-die-tiefe-foerdern/" target=_blank>print.de :: T-shaped skills</a></li>
<li><a href="https://en.wikipedia.org/wiki/T-shaped_skills" target=_blank>Wikipedia.en</a></li>
</ul>
</html>
<html>
Temporal Convolutional Networks
</html>
<html>
Die <b>Total Expense Ratio</b> (Abkürzung: TER) <br />
oder Gesamtkostenquote ist eine Kennzahl, die Auf-<br />
schluss darüber gibt, welche Kosten bei einem Invest- <br />
mentfonds jährlich zusätzlich zum Ausgabeaufschlag<br />
anfallen.<br />
</html>
<html>
<ul>
<li>Akronym für “Tom's Obvious, Minimal Language“</li>
<li>Dateiformat für Konfigurationsfiles;</li>
<li>Augenmerk wurde gelegt auf einfache Lesbarkeit;</li>
<li>vereinfachte Semantik;</li>
<li><b>Ziel von TOML:</b>
<ul>
<li>es soll einfach zu parsen sein;</li>
<li>es soll sich eindeutig in ein assoziatives Daten‐<br />
feld umwandeln lassen;</li>
</ul></li>
<li><b>Syntax:</b>
<code><pre><em># Kommentar</em>
[Abschnittsname]
key = “value“ <em>(‐Paare)</em></pre></code></li>
<!--li></li>
<li></li>
<li></li>
<li></li-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/TOML" target=_blank>Wikipedia</a></li>
</ul>
</html>
Time-based One-Time Password (TOTP) algorithm
<html>
<ul>
<li><b>FU Hagen</b> :: Finanzmanagement mit Excel</li>
<li><b>FU Hagen</b> :: Parametrische Statistik</li>
<li><b>FU Hagen</b> :: Logische & funktionale Programmierung</li>
<li><b>OpenHPI</b> :: Kurs “Computational Learning Theory and Beyond“</li>
<li><b>EDX</b> :: Foundations of Modern Finance I</li>
<li><b>EDX</b> :: Statistics</li>
<li><b>Französisch</b> :: Audio</li>
<li><b>Französisch</b> :: Vokabeln</li>
<li><b>Französisch</b> :: Ecoute-Plus</li>
<li><b>Französisch</b> :: Buch “Übungen für zwischendurch“</li>
<li><b>Business Englisch</b> :: Audio</li>
<li><b>Business Englisch</b> :: Vokabeln</li>
<li><b>Business Englisch</b> :: BusinessEnglisch-Plus</li>
<li><b>Italienisch</b> :: Adesso-Plus</li>
<li><b>Fraunhofer</b> :: Data Science</li>
<li><b>BTA</b> :: Blockchain</li>
<li><b>LinuxFoundation</b> :: Kubernetes</li>
<li><b>Brett Slatkin</b> :: Effektiv Python programmieren</li>
<li><b>MLP Repetitorium</b> :: Statistik</li>
<li><b>Dormann</b> :: Parametrische Statistik</li>
<!--li><b></b> :: </li-->
<!--li><b></b> :: </li-->
<!--li><b></b> :: </li-->
<!--li><b></b> :: </li-->
<!--li><b></b> :: </li-->
<!--li><b></b> :: </li-->
</ul>
</html>
<html>
Ever want to tar and compress a file all in one command:<br />
<pre>
tar cf - /home/foo | compress > foo.tar.Z
</pre>
gzip can be used the same way: <br />
<pre>
tar cf - /home/foo | gzip > foo.tar.Z
</pre>
If you wanted to capture the output so you had an <br />
index file of what the tar file contains:<br /><br />
<b>For sh, ksh use:</b><br />
<pre>
tar cvf - /home/foo 2>foo.idx | compress > foo.tar.Z
</pre>
<b>For csh use:</b><br />
<pre>
(tar cvf - /home/foo | compress > /foo.tar.Z) >&foo.idx
</pre>
and an index file will be created.<br />
</html>
<html>
To tar only files (not subdirectories) in the<br />
current directory use this command:<br />
<code><pre>$ tar cvf files.tar ./`ls -l | grep -v '^d' | awk '{ print $9 }'`</pre></code><br />
This tip generously supported <br />
by: rrs@assc.com.ve<br />
</html>
Have you ever started a long
running task, and after some time
decide you want to be alerted
when it finishes?
Add this to your .bashrc:
function aldo { while ps -ao pid | grep -q " ${1}$"; do sleep 1 ; done; echo $'\a'; }
Then find the pid of a long
running process (say 253) and
on a different terminal:
501$ aldo 253
Will treat you to a pleasant beep when the task finishes.
<html>
tcsh has a nice built in variable:<br />
<br /><code>
set rmstar<br />
</code><br />
Whenever you type the command:<br />
<br /><code>
% rm *<br />
</code><br />
The shell will ask you to confirm, this prevents you <br />
from deleting all your files accidentally.<br />
<br />
Add "set rmstar" in you .cshrc file for your own benefit.<br />
</html>
https://www.techylib.com/en/view/eyelashesnectarine/murex_mlc_technicals
(für das PDF Techylib_Murex-MLC-Technicals.pdf)
<html>
Zu deiner Sicherheit empfiehlt Telegram, dass du ein Pass‐<br />
wort (für die zweistufige Bestätigung) einrichtest:<br />
<br />
<code><b>Einstellungen</b></code><br />
<br />
<code><b> → Privatsphäre & Sicherheit</b></code><br />
<br />
<code><b> → Zweistufige Bestätigung</b></code><br />
</html>
<html>
<ul>
<li><h3>Install Telegram with package manager</h3>
To install Telegram on Ubuntu, Debian, and Linux Mint:
<pre><code>$ sudo apt install telegram-desktop</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://linuxconfig.org/how-to-install-telegram-on-linux"
target="_blank" rel="noreferrer noopener">
Linux Config :: How to install Telegram on Linux</a>
</li>
</ul>
</html>
<html>
<ul>
<li>Die Anmeldung mittels QR-Code bestätigen:
<ul>
<li>Einstellungen
</li>
<li>→ Geräte
</li>
<li>→ “QR-Code scannen“ auswählen
</li>
<li>→ QR-Code dann scannen
</li>
<li>
</li>
</ul>
</li>
</ul>
</html>
<html>
<h3>Reaktionen und Spoiler</h3>
<h4>Reaktionen</h4>
<ul>
<li>Bewege den Mauszeiger über eine Nachricht, um den Knopf für Reaktionen anzuzeigen.</li>
<li>Klicke auf den Knopf, um eine schnelle ???‐Reaktion zu senden.<br />
Mehr Reaktionen gibt es, wenn du den Mauszeiger über ??? bewegst.</li>
<li>Inhaber und Admins von Gruppen oder Kanälen finden eine Einstellung<br />
im Gruppen‐ oder Kanalprofil unter “…“ → Verwalten → Reaktionen.</li>
</ul>
<h4>Spoiler</h4>
<ul>
<li>Wähle Text aus, den Du geschrieben hast. Dann Rechtsklick → Formatieren → Spoiler, <br />
um den hervorgehoben Text zu verstecken.</li>
<li>Klicke auf die Spoiler‐Animation, um den Text im Chat anzuzeigen.</li>
<li>Spoiler verstecken den Text im Chat, in der Chatliste und bei Benachrichtigungen.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://telegram.org/blog/reactions-spoilers-translations/de" target="_blank" rel="noreferrer noopener">Telegram :: Blog</li>
</ul>
</html>
<html>
Telegram Einstellungen<br />
→ Privatspäre und Sicherheit<br />
→ Aktive Sitzungen
</html>
<html>
<code><pre>
mueller@Debian-Laptop:~/programming/terraform-doc$ ./terraform-docs --help
A utility to generate documentation from Terraform modules in various output formats
Usage:
terraform-docs [PATH] [flags]
terraform-docs [command]
Available Commands:
asciidoc Generate AsciiDoc of inputs and outputs
completion Generate shell completion code for the specified shell (bash or zsh)
help Help about any command
json Generate JSON of inputs and outputs
markdown Generate Markdown of inputs and outputs
pretty Generate colorized pretty of inputs and outputs
tfvars Generate terraform.tfvars of inputs
toml Generate TOML of inputs and outputs
version Print the version number of terraform-docs
xml Generate XML of inputs and outputs
yaml Generate YAML of inputs and outputs
Flags:
-c, --config string config file name (default ".terraform-docs.yml")
--footer-from string relative path of a file to read footer from (default "")
--header-from string relative path of a file to read header from (default "main.tf")
-h, --help help for terraform-docs
--hide strings hide section [all, data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
--lockfile read .terraform.lock.hcl if exist (default true)
--output-check check if content of output file is up to date (default false)
--output-file string file path to insert output into (default "")
--output-mode string output to file method [inject, replace] (default "inject")
--output-template string output template (default "<!-- BEGIN_TF_DOCS -->\n{{ .Content }}\n<!-- END_TF_DOCS -->")
--output-values inject output values into outputs (default false)
--output-values-from string inject output values from file into outputs (default "")
--read-comments use comments as description when description is empty (default true)
--recursive update submodules recursively (default false)
--recursive-path string submodules path to recursively update (default "modules")
--show strings show section [all, data-sources, footer, header, inputs, modules, outputs, providers, requirements, resources]
--sort sort items (default true)
--sort-by string sort items by criteria [name, required, type] (default "name")
-v, --version version for terraform-docs
Use "terraform-docs [command] --help" for more information about a command.
</pre></code>
The default name of the configuration file is <b><em>.terraform-docs.yml</em></b>. The path order for locating it is:
<ol>
<li>root of module directory</li>
<li>.config/ folder at root of module directory (since v0.15.0)</li>
<li>current directory</li>
<li>.config/ folder at current directory (since v0.15.0)</li>
<li>$HOME/.tfdocs.d/</li>
</ol>
if .terraform-docs.yml is found in any of the folders above, that will take precedence and will override the other ones.
</html>
<html>
<pre><code>
Error: Invalid block definition: A block definition must have block content delimited by "{" and "}", starting on the same line as the block header.
</code></pre>
⇒ es gibt folgende Gründe für die Fehlermeldung:
<ol>
<li>{ must be in the same line as variable “counter“, for example
<pre><code>variable “counter“ {
default = 1
}</code></pre>
</li>
<li>es fehlt ein Gleichheitszeichen, z.B.
<pre><code>provider "aws" {
region "frankfurt" # <<<< hier fehlt das Gleichheitszeichen
}</code></pre>
→ es muss so heissen:
<pre><code>provider "aws" {
region = "frankfurt"
}</code></pre>
</li>
</ol>
</html>
<html>
<ul>
<li>The terraform script help to automate the application<br />
to manage the infra with AWS.</li>
<br />
<li>Terraform is an infrastructure as code tool that lets you<br />
define both cloud and on‐prem resources in human-readable<br />
config files that you can version, reuse, and share. You can<br />
then use a consistent workflow to provision and manage all<br />
of your framework in your entire lifecycle. </li>
<br />
<li>Terraform can manage low-level components like compute,<br />
storage, and networking resources, as well as high‐level<br />
components like DNS entries and SaaS features. </li>
<br />
<li>An advantage of using infrastructure as a code tool is that<br />
your config can be treated as your memorandum. Breaking<br />
down your infrastructure into components makes it easier to<br />
read and update your infrastructure as you grow. This, in turn,<br />
helps make knowledge sharing and bringing new team mem‐<br />
bers up to speed easier.</li>
<br />
<li>Terraform supports powerful constructs called modules that<br />
allow you to reuse infrastructure code. This enables you to<br />
provide infrastructure as building blocks that other teams<br />
can leverage. You can use Terraform script for creating<br />
<b>AWS EC2 instances</b> that use only the instance types your<br />
company has standardized on.</li>
<br />
<li>A service team can then include your module and be in<br />
compliance. This approach creates enablement and<br />
promotes self‐service.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://sidtechtalks.in/terraform-script-for-aws-with-examples/" target="_ blank" rel="noreferrer noopener">
Sid Tech Talks :: Get Started with Terraform Script for AWS ‐ with Examples</a></li>
</ul>
</html>
<html>
<ul>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://phoenixnap.com/kb/how-to-install-terraform"
target="_blank" rel="noreferrer noopener">
PhoenixNap :: How to Install Terraform on Windows, Linux, and MacOS</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
-->
</html>
<html>
<ul>
<li><h3>Configure AWS</h3>
<ol type="(a)">
<li>AWS CLI Installation: Install AWS CLI according to your OS flavor</li>
<br />
<li>AWS CLI Configuration: After installation, you would be able to run the AWS command.</li>
</ol>
<br />
To configure your system you have to make sure to have the<br />
AWS account wherein you will fetch the access and secret key.<br />
<br />
After the command AWS configure it will ask for an access key, secret key, region, and format:
<img src="./pictures/terraform_aws-configure-768x316.png" height=272 width=576 /> <!-- height=316 width=768 -->
</li>
<br />
<li><h3>Write Configuration</h3>
<h4>File <em>terraform_settings</em>:</h4>
This file contains Terraform settings, including the required providers Terraform<br />
will use to provision your infrastructure. For each provider, the source attribute de‐<br />
fines an optional hostname, a namespace, and the provider type.
<code><pre>
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
versio = "~> 4.0"
}
}
required_version = ">= 0.13"
}
</pre></code>
<h4>File <em>provider_settings</em>:</h4>
The provider block configures the specified provider, in this case aws. A provider<br />
is a plugin that Terraform uses to create and manage your resources.
<code><pre>
provider “aws“ {
profile = “simran“
region = “us‐west‐2“
access_key = “2e67b9d7‐3d36‐4230‐acac‐126f“
secret_key = “0c501b68‐4162‐4db2‐ab1a‐e0b6“
}</pre></code>
<h4>File <em>resource_settings</em>:</h4>
Use resource blocks to define components of your infrastructure. A resource<br />
might be a physical or virtual component such as an EC2 instance, or it can be<br />
a logical resource such as a Heroku application.
<code><pre>
// Creating of AWS EC2 instance using AMi-ID specific to us-west 2
resource "aws_instance" "app_server" {
ami = " ami-830c94e3"
instance_type = "t2.micro"
tags = {
Name = "AppServerInstance"
}
}
</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://sidtechtalks.in/terraform-script-for-aws-with-examples/" target="_ blank" rel="noreferrer noopener">
Sid Tech Talks :: Get Started with Terraform Script for AWS ‐ with Examples</a></li>
</ul>
</html>
<html>
Das Beispiel zeigt eine mögliche Konfiguration für<br />
einen Azure Provider. Dabei werden die subscription_id<br />
und der Name zu einer Zertifikats-Datei (certificate)<br />
übergeben.<br />
<code><pre>
provider “azure“ {
subscription_id = “56e13f3e‐44d4‐4670‐be12‐1e7b“
certificate = file(“my_cert.crt“)
}</pre></code>
</html>
<html>
Dieses Beispiel zeigt eine mögliche Konfiguration für <br />
einen GCP Provider (GCP ‐ Google Cloud Platform).<br />
Dieser erhält in der Beispiel-Konfiguration den Namen google.<br />
Die Zugangsdaten zur Authentifizierung werden aus einer Datei im<br />
JSON-Format gelesen (credentials = file(...)). Weitere Angaben sind<br />
der Name des passenden Projekts (project) und die Region (region)<br />
der Google Cloud Platform.<br />
<br />
<code><pre>
provider “google“ {
credentials = file(“account.json“)
project = “my‐project‐id“
region = “us‐central1“
}
</pre></code>
</html>
<html>
<code><pre>
provider “openstack“ {
user_name = “tux“
tenant_name = “tux‐project“
password = “f1c25939‐c09a‐4d3f‐8eeb‐83a7“
auth_url = “https://my‐cloud:5000/v3.0“
region = “South‐2“
}</pre></code>
</html>
<html>
Was macht der Befehl?
</html>
<html>
Auf der Cmd-Line folgende Befehle eingeben:
<ul>
<li><code><b>sudo apt-get install texlive-lang-german</b></code>
</li>
</ul>
<em>Beim angegebenen Link ist ein weiteres Repo ange–<br />
geben. Ich habe es ignoriert und der obige Befehl <br />
lief dennoch durch.
</em>
<h3>Link:</h3>
<a href="https://tex.stackexchange.com/questions/157172/ngerman-sty-not-found">StackExchange</a>
</html>
The -exec extension to the find command is a very useful and
flexible utility.
You can use it to get a nice list of all the files in a directory
tree:
find . -type f -exec ll {} \;
or to copy all the files in a directory tree into one, large
directory:
find . -type f -exec cp -p {} /newdir \;
Or say now that you've copied all those files into one directory
there are too many .bak files to delete all at once with the 'rm'
command (yes, that's possible):
find . -name \*bak -exec rm {} \;
There are also bunches of other useful exensions to the 'find'
command. Check out the man page, and you'll find a great tool
for basic sysadmin stuff.
This tip generously supported
by: emathias@wwa.com
<html>
Here is one way to find out the<br>
next available UID on a system.<br>
<br>
It takes both the password and<br>
group files and finds the next<br>
available UID and displays it.<br>
<br>
(No cats were harmed in the making
of this script)<br>
<br><code>
#!/bin/bash<br>
awk -F":" '{ print $3 }' /etc/passwd > number_list<br>
awk -F":" '{ print $3 }' /etc/group >> number_list<br>
A=` sort -g number_list | tail -1`<br>
A=`expr $A + 1`<br>
echo "New Available UID is $A"<br>
</code>
</html>
<html>
<script type="text/javascript">
alert("Hallo Welt!");
</script>
<table><border=1>
<tr><th>Thema</th><th>Datum : </th><th>Kommentare</th></tr>
<tr><td>OpenHPI :: Computational Learning Theory and Beyond</td><td>
<select name="doneOrNotDone">
<option> </option>
<option>done</option>
</select> </td></td></td>
<tr><td>Chinesisch</td><td>
<select name="doneOrNotDone">
<option> </option>
<option>done</option>
</select> </td><td></td>
</tr>
<tr><td>Italienisch</td><td>
<label>
Vokabeln: <input type="checkbox" name="italienisch_vokabel" value=""><br />
Grammatik: <input type="checkbox" name="italienisch_grammatik" value="">
</label></td><td></td>
</tr>
<tr><td>Französisch - Vokabeln</td><td>
<select name="doneOrNotDone">
<option> </option>
<option>done</option>
</select> </td><td></td>
</tr>
<tr><td>Französisch - Grammatik</td><td>
<select name="doneOrNotDone">
<option> </option>
<option>done</option>
</select> </td><td></td>
</tr>
<tr><td>Maß‐ und Integrationstheorien 1145</td><td>
<select name="doneOrNotDone">
<option> </option>
<option>done</option>
</select> </td><td>Mentoriat in <b>Berlin</b></td>
</tr>
<tr><td>Mathematische Grundlagen <br />der Kryptografie 1321</td><td>
<select name="doneOrNotDone">
<option> </option>
<option>done</option>
</select> </td><td></td>
</tr>
<tr><td>Gewöhnliche Differentialgleichungen 1334</td><td>
<select name="doneOrNotDone">
<option> </option>
<option>done</option>
</select> </td><td></td>
</tr>
<tr><td>Stochastische Prozesse 1364</td><td>
<select name="doneOrNotDone">
<option> </option>
<option>done</option>
</select> </td><td></td>
</tr>
<tr><td>Einführung in die objektorientierte <br />
Programmierung (Java) 1618</td><td>
<select name="doneOrNotDone">
<option> </option>
<option>done</option>
</select> </td><td></td>
</tr>
<tr><td>Mathematische Grundlagen 1141</td><td>
<select name="doneOrNotDone">
<option> </option>
<option>done</option>
</select> </td><td></td>
</tr>
<tr><td>Analysis 1144</td><td>
<select name="doneOrNotDone">
<option> </option>
<option>done</option>
</select> </td><td></td>
</tr>
<tr><td>Einführung in die Stochastik 1146</td><td>
<select name="doneOrNotDone">
<option> </option>
<option>done</option>
</select> </td><td></td>
</tr>
<tr><td>Theoretische Elektrotechnik II <br />
(Elektromagnetische Felder) 2224</td><td>
<select name="doneOrNotDone">
<option> </option>
<option>done</option>
</select> </td><td></td>
</tr>
<tr><td>Beschreibende Statistik <br />(CD-ROM) 76896</td><td>
<select name="doneOrNotDone">
<option> </option>
<option>done</option>
</select> </td><td></td>
</tr>
<tr><td>Maurice :: <br />
Symmetrische & Asymmetrische Kryptographie</td><td>
<select name="doneOrNotDone">
<option> </option>
<option>done</option>
</select> </td><td></td>
</tr>
<tr><td>Buch “Schnelleinstieg Dgl.“</td><td>
<select name="doneOrNotDone">
<option> </option>
<option>done</option>
</select> </td><td></td>
</tr>
<tr><td>OpenHPI-Kurs :: Einführung in die Algorithmik</td><td>
<select name="doneOrNotDone">
<option> </option>
<option>done</option>
</select> </td><td></td>
</tr>
<tr><td>OpenHPI-Kurs :: Einführung in die IDE</td><td>
<select name="doneOrNotDone">
<option> </option>
<option>done</option>
</select> </td><td></td>
</tr>
<tr><td>Workshop “Kryptographie für Entwickler“ ‐ Nachbearbeitung</td><td>
<select name="doneOrNotDone">
<option> </option>
<option>done</option>
</select> </td><td></td>
</tr>
</table>
</html>
/***
|''Name:''|GermanTranslationPlugin|
|''Description:''|Translation of TiddlyWiki into German|
|''Author:''|BesimKaradeniz (besim (at) karadeniz (dot) de)|
|''Version:''|2.8.0|
|''Date:''|May 29, 2013|
|''Comments:''|Visit the home of this translation on [[TiddlyWikiDeutsch|http://www.karadeniz.de/tiddlywiki/]] |
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]] |
|''~CoreVersion:''|2.8.0|
***/
//{{{
//--
//-- TiddlyWiki German Translation - based on lingo.js commit 8bf8ca077c
//-- Maintainer: Besim Karadeniz <besim(-at-)karadeniz(-dot-)de>
//-- Web: www.karadeniz.de/tiddlywiki/
//--
if (config.options.txtUserName == "YourName")
merge(config.options,{txtUserName: "IhrName"});
merge(config.tasks,{
save: {text: "speichern", tooltip: "\u00C4nderungen in dieses TiddlyWiki speichern", action: saveChanges},
importTask: {text: "importieren", tooltip: "Tiddler und Plugins aus anderen TiddlyWiki-Dateien und Servern importieren", content: '<<importTiddlers>>'},
tweak: {text: "optimieren", tooltip: "Erscheinungsbild und Reaktion des TiddlyWiki optimieren", content: '<<options>>'},
upgrade: {text: "upgraden", tooltip: "Upgraden des Kerncodes von TiddlyWiki", content: '<<upgrade>>'},
plugins: {text: "Plugins", tooltip: "Installierte Plugins verwalten", content: '<<plugins>>'}
});
// Optionen, die im Options-Panel oder/in Cookies eingestellt werden koennen
merge(config.optionsDesc,{
txtUserName: "Ihr Benutzername zum Unterzeichnen Ihrer Eintr\u00E4ge",
chkRegExpSearch: "Regul\u00E4re Ausdr\u00FCcke in der Suche aktivieren",
chkCaseSensitiveSearch: "Gro\u00DF-/Kleinschreibung in der Suche aktivieren",
chkIncrementalSearch: "Inkrementelle Zeichen-f\u00FCr-Zeichen-Suche",
chkAnimate: "Animationen aktivieren",
chkSaveBackups: "Beim Speichern ein Backup erstellen",
chkAutoSave: "Automatisch speichern",
chkGenerateAnRssFeed: "RSS-Feed beim Speichern generieren",
chkSaveEmptyTemplate: "Leere Vorlage beim Speichern generieren",
chkOpenInNewWindow: "Externe Links in einem neuen Fenster \u00F6ffnen",
chkToggleLinks: "Klick auf ge\u00F6ffnete Tiddler l\u00E4sst diese schlie\u00DFen",
chkHttpReadOnly: "Bearbeitungsfunktionen ausblenden, wenn Zugriff via HTTP",
chkForceMinorUpdate: "Bearbeitungen als kleine \u00C4nderungen mit Beibehaltung von Datum und Zeit behandeln",
chkConfirmDelete: "L\u00F6schbest\u00E4tigung vor dem L\u00F6schen von Tiddlern",
chkInsertTabs: "Benutzen Sie die Tabulatortaste, um Tabulatorzeichen einzuf\u00FCgen anstelle jeweils zum n\u00E4chsten Feld zu springen",
txtBackupFolder: "Verzeichnisname f\u00FCr Backup Dateien:",
txtMaxEditRows: "Maximale Zahl von Zeilen in einer Textbox eines Tiddlers:",
txtTheme: "Name des zu verwendenden Themes",
txtFileSystemCharSet: "Standard-Zeichensatz beim Speichern von \u00C4nderungen (nur Firefox/Mozilla)"});
merge(config.messages,{
customConfigError: "Beim Laden von Plugins sind Fehler aufgetreten. Siehe PluginManager f\u00FCr Details",
pluginError: "Fehler: %0",
pluginDisabled: "Nicht ausgef\u00FChrt, da durch 'systemConfigDisable'-Tag deaktiviert",
pluginForced: "Ausgef\u00FChrt, da durch 'systemConfigForce'-Tag erzwungen",
pluginVersionError: "Nicht ausgef\u00FChrt, da dieses Plugin eine neuere Version von TiddlyWiki erfordert",
nothingSelected: "Nichts ausgew\u00E4hlt. Sie m\u00FCssen zuerst ein oder mehrere Elemente ausw\u00E4hlen",
savedSnapshotError: "Es scheint, dass dieses TiddlyWiki inkorrekt gespeichert wurde. Bitte besuchen Sie http://www.tiddlywiki.com/#Download f\u00FCr Details",
subtitleUnknown: "(unbekannt)",
undefinedTiddlerToolTip: "Der Tiddler '%0' existiert noch nicht",
shadowedTiddlerToolTip: "Der Tiddler '%0' existiert noch nicht, hat aber einen vordefinierten Schatteneintrag",
tiddlerLinkTooltip: "%0 - %1, %2",
externalLinkTooltip: "Externer Link zu %0",
noTags: "Es gibt keine getaggten Tiddler",
notFileUrlError: "Sie m\u00FCssen zun\u00C4chst dieses TiddlyWiki in eine Datei speichern, bevor \u00C4nderungen gespeichert werden k\u00F6nnen",
cantSaveError: "\u00C4nderungen k\u00F6nnen nicht gespeichert werden. M\u00F6gliche Gr\u00FCnde:\n- Ihr Browser unterst\u00FCtzt das Abspeichern nicht (Firefox, Internet Explorer, Safari und Opera k\u00F6nnen dies mit richtiger Konfiguration)\n- Der Pfadname zu Ihrem TiddlyWiki enth\u00E4lt ung\u00FCltige Zeichen\n- Die TiddlyWiki-HTML-Datei wurde verschoben oder umbenannt",
invalidFileError: "Die originale Datei '%0' scheint kein g\u00FCltiges TiddlyWiki zu sein",
backupSaved: "Backup gespeichert",
backupFailed: "Fehler beim Speichern des Backup",
rssSaved: "RSS-Feed gespeichert",
rssFailed: "Fehler beim Speichern des RSS-Feed",
emptySaved: "Leere Vorlage gespeichert",
emptyFailed: "Fehler beim Speichern der leeren Vorlage",
mainSaved: "TiddlyWiki-Datei gespeichert",
mainDownload: "Herunterladen/speichern der TiddlyWiki-Datei",
mainDownloadManual: "MIT DER RECHTEN MAUSTASTE HIER KLICKEN zum herunterladen/speichern der TiddlyWiki-Datei",
mainFailed: "Fehler beim Speichern der TiddlyWiki-Datei. Ihre \u00C4nderungen wurden nicht gespeichert",
macroError: "Fehler im Makro <<%0>>",
macroErrorDetails: "Fehler beim Ausf\u00FChren von Makro <<%0>>:\n%1",
missingMacro: "Kein entsprechendes Makro vorhanden",
overwriteWarning: "Ein Tiddler namens '%0' existiert bereits. W\u00E4hlen Sie OK zum \u00DCberschreiben",
unsavedChangesWarning: "WARNUNG! Ungespeicherte \u00C4nderungen im TiddlyWiki vorhanden\n\nW\u00E4hlen Sie OK zum Speichern\nW\u00E4hlen Sie ABBRECHEN/CANCEL zum Verwerfen",
confirmExit: "--------------------------------\n\nUngespeicherte \u00C4nderungen im TiddlyWiki vorhanden. Wenn Sie fortfahren, werden Sie diese \u00C4nderungen verlieren\n\n--------------------------------",
saveInstructions: "SaveChanges",
unsupportedTWFormat: "Nicht unterst\u00E4tztes TiddlyWiki-Format '%0'",
tiddlerSaveError: "Fehler beim Speichern von Tiddler '%0'",
tiddlerLoadError: "Fehler beim Laden von Tiddler '%0'",
wrongSaveFormat: "Speichern im Speicherformat '%0' nicht m\u00F6glich. Standardformat zum Speichern wird verwendet.",
invalidFieldName: "Ung\u00FCltiger Dateiname %0",
fieldCannotBeChanged: "Feld '%0' kann nicht ge\u00E4ndert werden",
loadingMissingTiddler: "Es wird versucht, den Tiddler '%0' vom Server '%1' bei\n\n'%2' im Workspace '%3' abzurufen",
upgradeDone: "Das Upgrade auf Version %0 ist komplett\n\nKlicken Sie auf 'OK' zum Neuladen des aktualisierten TiddlyWiki",
invalidCookie: "Ung\u00FCltiger Cookie '%0'"});
merge(config.messages.messageClose,{
text: "schlie\u00DFen",
tooltip: "diesen Textbereich schlie\u00DFen"});
config.messages.backstage = {
open: {text: "Backstage", tooltip: "\u00D6ffnen Sie den Backstage-Bereich f\u00FCr Arbeiten an Entwicklungs- und Bearbeitungsaufgaben"},
close: {text: "schlie\u00DFen", tooltip: "Backstage-Bereich schlie\u00DFen"},
prompt: "Backstage: ",
decal: {
edit: {text: "bearbeiten", tooltip: "Den Tiddler '%0' bearbeiten"}
}
};
config.messages.listView = {
tiddlerTooltip: "Klick f\u00FCr den vollen Text dieses Tiddlers",
previewUnavailable: "(Vorschau nicht vorhanden)"
};
config.messages.dates.months = ["Januar", "Februar", "M\u00E4rz", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November","Dezember"];
config.messages.dates.days = ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"];
config.messages.dates.shortMonths = ["Jan", "Feb", "M\u00E4r", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"];
config.messages.dates.shortDays = ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"];
// Suffixe f\u00FCr Datum (englischsprachig), z.B. "1st","2nd","3rd"..."30th","31st"
config.messages.dates.daySuffixes = ["st","nd","rd","th","th","th","th","th","th","th",
"th","th","th","th","th","th","th","th","th","th",
"st","nd","rd","th","th","th","th","th","th","th",
"st"];
config.messages.dates.am = "am";
config.messages.dates.pm = "pm";
merge(config.messages.tiddlerPopup,{
});
merge(config.views.wikified.tag,{
labelNoTags: "keine Tags",
labelTags: "Tags: ",
openTag: "\u00D6ffne Tag '%0'",
tooltip: "Zeige Tiddlers mit Tags '%0'",
openAllText: "\u00D6ffne alle",
openAllTooltip: "Alle diese Tiddler \u00F6ffnen",
popupNone: "Keine anderen Tiddler mit '%0' getaggt"});
merge(config.views.wikified,{
defaultText: "Der Tiddler '%0' existiert noch nicht. Doppelklicken zum Erstellen",
defaultModifier: "(fehlt)",
shadowModifier: "(vordefinierter Schatten-Tiddler)",
dateFormat: "DD. MMM YYYY",
createdPrompt: "erstellt am"});
merge(config.views.editor,{
tagPrompt: "Geben Sie die Tags durch Leerstellen getrennt ein, [[benutzen Sie doppelte eckige Klammern]] falls n\u00F6tig, oder w\u00E4hlen Sie vorhandene",
defaultText: "Geben Sie den Text f\u00FCr '%0' ein"});
merge(config.views.editor.tagChooser,{
text: "Tags",
tooltip: "W\u00E4hlen Sie vorhandene Tags zum Hinzuf\u00FCgen zu diesem Tiddler aus",
popupNone: "Es sind keine Tags definiert",
tagTooltip: "Tag '%0' hinzuf\u00FCgen"});
merge(config.messages,{
sizeTemplates:
[
{unit: 1024*1024*1024, template: "%0\u00a0GB"},
{unit: 1024*1024, template: "%0\u00a0MB"},
{unit: 1024, template: "%0\u00a0KB"},
{unit: 1, template: "%0\u00a0B"}
]});
merge(config.macros.search,{
label: "suchen",
prompt: "Dieses TiddlyWiki durchsuchen",
placeholder: "",
accessKey: "F",
successMsg: "%0 Tiddler gefunden, die %1 enthalten",
failureMsg: "Keine Tiddler gefunden, die %0 enthalten"});
merge(config.macros.tagging,{
label: "Tagging: ",
labelNotTag: "kein Tagging",
tooltip: "Liste der Tiddler, die mit '%0' getaggt sind"});
merge(config.macros.timeline,{
dateFormat: "DD. MMM YYYY"});
merge(config.macros.allTags,{
tooltip: "Tiddler, die mit '%0' getagged sind, anzeigen",
noTags: "Keine getaggten Tiddler vorhanden"});
config.macros.list.all.prompt = "Alle Tiddler in alphabetischer Reihenfolge";
config.macros.list.missing.prompt = "Tiddler, auf die verwiesen wird, die aber nicht existieren";
config.macros.list.orphans.prompt = "Tiddler, auf die nicht von anderen Tiddlern verwiesen wird";
config.macros.list.shadowed.prompt = "Tiddler, f\u00FCr die Standardeintr\u00E4ge existieren";
config.macros.list.touched.prompt = "Tiddlers, die lokal ver\u00E4ndert wurden";
merge(config.macros.closeAll,{
label: "alle schlie\u00DFen",
prompt: "Alle angezeigten Tiddler schlie\u00DFen (au\u00DFer denen, die gerade bearbeitet werden)"});
merge(config.macros.permaview,{
label: "Permaview",
prompt: "Erzeugt einen URL, mit dem auf alle gerade ge\u00F6ffneten Tiddler verwiesen werden kann"});
merge(config.macros.saveChanges,{
label: "\u00C4nderungen speichern",
prompt: "Alle \u00C4nderungen speichern",
accessKey: "S"});
merge(config.macros.newTiddler,{
label: "Neuer Tiddler",
prompt: "Neuen Tiddler erstellen",
title: "Neuer Tiddler",
accessKey: "N"});
merge(config.macros.newJournal,{
label: "Neues Journal",
prompt: "Neuen Tiddler mit aktuellem Datum und aktueller Zeit erstellen",
accessKey: "J"});
merge(config.macros.options,{
wizardTitle: "Erweiterte Optionen ver\u00E4ndern",
step1Title: "Diese Optionen werden mit Cookies in Ihrem Browser gespeichert",
step1Html: "<input type='hidden' name='markList'></input><br><input type='checkbox' checked='false' name='chkUnknown'>Unbekannte Optionen anzeigen</input>",
unknownDescription: "//(unbekannt)//",
listViewTemplate: {
columns: [
{name: 'Option', field: 'option', title: "Option", type: 'String'},
{name: 'Description', field: 'description', title: "Beschreibung", type: 'WikiText'},
{name: 'Name', field: 'name', title: "Name", type: 'String'}
],
rowClasses: [
{className: 'lowlight', field: 'lowlight'}
]}
});
merge(config.macros.plugins,{
wizardTitle: "Plugins verwalten",
step1Title: "Aktuell geladene Plugins",
step1Html: "<input type='hidden' name='markList'></input>",
skippedText: "(Dieses Plugin wurde nicht ausgef\u00FChrt, da es nach dem Start hinzugef\u00FCgt wurde)",
noPluginText: "Es sind keine Plugins installiert",
confirmDeleteText: "Wollen Sie wirklich folgende Plugins l\u00F6schen:\n\n%0",
removeLabel: "systemConfig-Tag entfernen",
removePrompt: "systemConfig-Tag entfernen",
deleteLabel: "l\u00F6schen",
deletePrompt: "Diese Tiddler endg\u00FCltig l\u00F6schen",
listViewTemplate: {
columns: [
{name: 'Selected', field: 'Selected', rowName: 'title', type: 'Selector'},
{name: 'Tiddler', field: 'tiddler', title: "Tiddler", type: 'Tiddler'},
{name: 'Description', field: 'Description', title: "Beschreibung", type: 'String'},
{name: 'Version', field: 'Version', title: "Version", type: 'String'},
{name: 'Size', field: 'size', tiddlerLink: 'size', title: "Gr\u00F6\u00DFe", type: 'Size'},
{name: 'Forced', field: 'forced', title: "Erzwungen", tag: 'systemConfigForce', type: 'TagCheckbox'},
{name: 'Disabled', field: 'disabled', title: "Deaktiviert", tag: 'systemConfigDisable', type: 'TagCheckbox'},
{name: 'Executed', field: 'executed', title: "Geladen", type: 'Boolean', trueText: "Ja", falseText: "Nein"},
{name: 'Startup Time', field: 'startupTime', title: "Startzeit", type: 'String'},
{name: 'Error', field: 'error', title: "Status", type: 'Boolean', trueText: "Fehler", falseText: "OK"},
{name: 'Log', field: 'log', title: "Log", type: 'StringList'}
],
rowClasses: [
{className: 'error', field: 'error'},
{className: 'warning', field: 'warning'}
]},
listViewTemplateReadOnly: {
columns: [
{name: 'Tiddler', field: 'tiddler', title: "Tiddler", type: 'Tiddler'},
{name: 'Description', field: 'Description', title: "Beschreibung", type: 'String'},
{name: 'Version', field: 'Version', title: "Version", type: 'String'},
{name: 'Size', field: 'size', tiddlerLink: 'size', title: "Gr\u00F6\u00DFe", type: 'Size'},
{name: 'Executed', field: 'executed', title: "Geladen", type: 'Boolean', trueText: "Ja", falseText: "Nein"},
{name: 'Startup Time', field: 'startupTime', title: "Startzeit", type: 'String'},
{name: 'Error', field: 'error', title: "Status", type: 'Boolean', trueText: "Fehler", falseText: "OK"},
{name: 'Log', field: 'log', title: "Log", type: 'StringList'}
],
rowClasses: [
{className: 'error', field: 'error'},
{className: 'warning', field: 'warning'}
]}
});
merge(config.macros.toolbar,{
moreLabel: "mehr",
morePrompt: "Weitere Funktionen anzeigen",
lessLabel: "weniger",
lessPrompt: "Zus\u00E4tzliche Befehle verstecken",
separator: "|"
});
merge(config.macros.refreshDisplay,{
label: "aktualisieren",
prompt: "Gesamte TiddlyWiki-Ansicht aktualisieren"
});
merge(config.macros.importTiddlers,{
readOnlyWarning: "Sie k\u00F6nnen nicht in eine schreibgesch\u00FCtzte TiddlyWiki-Datei importieren. Versuchen Sie diese \u00FCber eine file:// URL zu \u00F6ffnen",
wizardTitle: "Tiddler aus anderer Datei oder anderem Server importieren",
step1Title: "Schritt 1: Server oder TiddlyWiki-Datei ausfindig machen",
step1Html: "Typ des Servers ausw\u00E4hlen: <select name='selTypes'><option value=''>W\u00E4hlen...</option></select><br>URL oder Pfadnamen eingeben: <input type='text' size=50 name='txtPath'><br>...oder nach einer Datei browsen: <input type='file' size=50 name='txtBrowse'><br><hr>...oder einen vordefinierten Feed ausw\u00E4hlen: <select name='selFeeds'><option value=''>W\u00E4hlen...</option></select>",
openLabel: "\u00D6ffnen",
openPrompt: "Verbindung zu dieser Datei oder Server starten",
statusOpenHost: "Verbindung zum Host starten",
statusGetWorkspaceList: "Liste von vorhandenen Workspaces abrufen",
step2Title: "Schritt 2: Workspace ausw\u00E4hlen",
step2Html: "Einen Workspace-Namen eingeben: <input type='text' size=50 name='txtWorkspace'><br>...oder ein Workspace ausw\u00E4hlen: <select name='selWorkspace'><option value=''>W\u00E4hlen...</option></select>",
cancelLabel: "abbrechen",
cancelPrompt: "Diesen Import abbrechen",
statusOpenWorkspace: "Workspace wird ge\u00F6ffnet",
statusGetTiddlerList: "Abrufen der Liste von vorhandenen Workspaces",
errorGettingTiddlerList: "Fehler beim Abrufen der Liste der Tiddler, klicken Sie auf ABBRECHEN/CANCEL, um es nochmal zu probieren",
errorGettingTiddlerListHttp404: "Fehler beim Abrufen der Tiddler von der URL, bitte stellen Sie sicher, dass der URL existiert. Klicken Sie auf ABBRECHEN/CANCEL, um es nochmal zu probieren.",
errorGettingTiddlerListHttp: "Fehler beim Abrufen der Tiddler von der URL, bitte stellen Sie sicher, dass der URL existiert und <a href='http://enable-cors.org/'>CORS</a>-kompatibel ist",
errorGettingTiddlerListFile: "Fehler beim Abrufen der Tiddler aus der lokalen Datei, bitte stellen Sie sicher, dass die Datei im gleichen Verzeichnis ist wie Ihr TiddlyWiki. Klicken Sie auf ABBRECHEN/CANCEL, um es nochmal zu probieren.",
step3Title: "Schritt 3: Zu importierende Tiddler ausw\u00E4hlen",
step3Html: "<input type='hidden' name='markList'></input><br><input type='checkbox' checked='true' name='chkSync'>Links dieser Tiddler zum Server erhalten, um nachfolgende \u00C4nderungen synchronisieren zu k\u00F6nnen</input><br><input type='checkbox' checked='false' name='chkSave'>Speichern der Details dieses Servers in einem 'systemServer'Tiddler namens:</input> <input type='text' size=25 name='txtSaveTiddler'>",
importLabel: "importieren",
importPrompt: "Diese Tiddler importieren",
confirmOverwriteText: "Wollen Sie wirklich folgende Tiddler \u00FCberschreiben:\n\n%0",
step4Title: "Schritt 4: Importieren von %0 Tiddler",
step4Html: "<input type='hidden' name='markReport'></input>",
doneLabel: "Erledigt",
donePrompt: "Diesen Assistenten schlie\u00DFen",
statusDoingImport: "Tiddler werden importiert",
statusDoneImport: "Alle Tiddler importiert",
systemServerNamePattern: "%2 auf %1",
systemServerNamePatternNoWorkspace: "%1",
confirmOverwriteSaveTiddler: "Der Tiddler '%0' existiert bereits. Klicken Sie auf 'OK' um ihn mit den Details dieses Servers zu \u00FCberschreiben, oder 'Abbrechen', um ihn unver\u00E4ndert zu lassen",
serverSaveTemplate: "|''Eingabe:''|%0|\n|''URL:''|%1|\n|''Workspace:''|%2|\n\nDieser Tiddler wurde automatisch erstellt, um Details dieses Servers aufzuzeichnen",
serverSaveModifier: "(System)",
listViewTemplate: {
columns: [
{name: 'Selected', field: 'Selected', rowName: 'title', type: 'Selector'},
{name: 'Tiddler', field: 'tiddler', title: "Tiddler", type: 'Tiddler'},
{name: 'Size', field: 'size', tiddlerLink: 'size', title: "Gr\u00F6\u00DFe", type: 'Size'},
{name: 'Tags', field: 'tags', title: "Tags", type: 'Tags'}
],
rowClasses: [
]}
});
merge(config.macros.upgrade,{
wizardTitle: "Upgraden des Kerncodes von TiddlyWiki",
step1Title: "Update oder Reparatur dieses TiddlyWiki auf die aktuellste Version",
step1Html: "Sie sind dabei, auf die aktuellste Version des TiddlyWiki-Kerncodes upzugraden (von <a href='%0' class='externalLink' target='_blank'>%1</a>). Ihre Inhalte werden w\u00E4hrend dem Upgrade erhalten bleiben.<br><br>Bitte beachten Sie, dass Kerncode-Updates mit \u00E4lteren Plugins kollidieren k\u00F6nnen. Wenn Sie Probleme mit der aktualisierten Datei beobachten, besuchen Sie bitte <a href='http://www.tiddlywiki.org/wiki/CoreUpgrades' class='externalLink' target='_blank'>http://www.tiddlywiki.org/wiki/CoreUpgrades</a>",
errorCantUpgrade: "Upgrade dieses TiddlyWiki nicht m\u00F6glich. Sie k\u00F6nnen nur lokal abgespeicherte TiddlyWiki-Dateien upgraden",
errorNotSaved: "Sie m+ssen zun\u00E4chst \u00C4nderungen speichern, bevor Sie ein Upgrade starten k\u00F6nnen",
step2Title: "Upgrade-Details best\u00E4tigen",
step2Html_downgrade: "Sie sind dabei, von der TiddlyWiki-Version %1 auf die Version %0 downzugraden.<br><br>Der Downgrade auf eine fr\u00FChere Version von TiddlyWiki wird nicht empfohlen",
step2Html_restore: "Dieses TiddlyWiki scheint bereits die aktuellste Version des Kerncodes (%0) einzusetzen.<br><br>Sie k\u00F6nnen mit dem Upgrade fortsetzen, um sicherzustellen, dass der Kerncode nicht korrumpiert oder besch\u00E4digt wurde",
step2Html_upgrade: "Sie sind dabei, von der TiddlyWiki-Version %1 auf die Version %0 upzugraden",
upgradeLabel: "upgraden",
upgradePrompt: "Vorbereiten des Upgrade-Prozesses",
statusPreparingBackup: "Backup vorbereiten",
statusSavingBackup: "Backup-Datei speichern",
errorSavingBackup: "Ein Problem mit dem Speichern der Backup-Datei ist aufgetreten",
statusLoadingCore: "Kerncode laden",
errorLoadingCore: "Fehler beim Laden des Kerncodes",
errorCoreFormat: "Fehler im neuen Kerncode",
statusSavingCore: "Neuen Kerncode speichern",
statusReloadingCore: "Neuen Kerncode neu laden",
startLabel: "starten",
startPrompt: "Upgrade-Prozess starten",
cancelLabel: "abbrechen",
cancelPrompt: "Upgrade-Prozess abbrechen",
step3Title: "Upgrade abgebrochen",
step3Html: "Sie haben den Upgrade-Prozess abgebrochen"
});
merge(config.macros.annotations,{
});
merge(config.commands.closeTiddler,{
text: "schlie\u00DFen",
tooltip: "Diesen Tiddler schlie\u00DFen"});
merge(config.commands.closeOthers,{
text: "andere schlie\u00DFen",
tooltip: "Alle anderen Tiddler schlie\u00DFen"});
merge(config.commands.editTiddler,{
text: "bearbeiten",
tooltip: "Diesen Tiddler bearbeiten",
readOnlyText: "betrachten",
readOnlyTooltip: "Quellcode dieses Tiddlers betrachten"});
merge(config.commands.saveTiddler,{
text: "fertig",
tooltip: "\u00C4nderungen an diesem Tiddler speichern"});
merge(config.commands.cancelTiddler,{
text: "abbrechen",
tooltip: "\u00C4nderungen an diesem Tiddler verwerfen",
warning: "Wollen Sie wirklich \u00C4nderungen in '%0' verwerfen?",
readOnlyText: "fertig",
readOnlyTooltip: "Diesen Tiddler normal anzeigen"});
merge(config.commands.deleteTiddler,{
text: "l\u00F6schen",
tooltip: "Diesen Tiddler l\u00F6schen",
warning: "Wollen Sie '%0' wirklich l\u00F6schen?"});
merge(config.commands.permalink,{
text: "Permalink",
tooltip: "Permalink f\u00FCr diesen Tiddler"});
merge(config.commands.references,{
text: "Referenzen",
tooltip: "Alle Tiddler zeigen, die auf diesen verweisen",
popupNone: "Keine Referenzen"});
merge(config.commands.jump,{
text: "springen",
tooltip: "Zu anderem, ge\u00F6ffneten Tiddler springen"});
merge(config.commands.fields,{
text: "Felder",
tooltip: "Erweiterte Felder dieses Tiddlers anzeigen",
emptyText: "Keine erweiterten Felder f\u00FCr diesen Tiddler vorhanden",
listViewTemplate: {
columns: [
{name: 'Field', field: 'field', title: "Feld", type: 'String'},
{name: 'Value', field: 'value', title: "Wert", type: 'String'}
],
rowClasses: [
],
buttons: [
]}});
merge(config.shadowTiddlers,{
DefaultTiddlers: "[[GettingStarted]]",
MainMenu: "[[GettingStarted]]",
SiteTitle: "Mein TiddlyWiki",
SiteSubtitle: "ein wiederverwendbares nichtlineares, pers\u00F6nliches ~Web-Notizbuch",
SiteUrl: "",
SideBarOptions: '<<search>><<closeAll>><<permaview>><<newTiddler>><<newJournal "DD. MMM YYYY" "Journal">><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel "Optionen \u00bb" "Optionen von TiddlyWiki \u00E4ndern">>',
SideBarTabs: '<<tabs txtMainTab "Zeitachse" "Zeitachse" TabTimeline "Alles" "Alle Tiddler" TabAll "Tags" "Alle Tags" TabTags "Mehr" "Weitere Listen" TabMore>>',
TabMore: '<<tabs txtMoreTab "Fehlend" "Fehlende Tiddler" TabMoreMissing "Waisen" "Verwaiste Tiddler" TabMoreOrphans "Schatten" "Tiddler mit Schatteneintr\u00E4gen" TabMoreShadowed>>'
});
merge(config.annotations,{
AdvancedOptions: "Dieser Schatten-Tiddler bietet Zugang zu diversen erweiterten Optionen",
ColorPalette: "Diese Werte in diesem Schatten-Tiddler legen das Farbschema der Benutzerschnittstelle des TiddlyWiki fest",
DefaultTiddlers: "Die in diesem Schatten-Tiddler aufgelisteten Tiddler werden automatisch beim Start des TiddlyWiki angezeigt",
EditTemplate: "Die HTML-Vorlage in diesem Schatten-Tiddler legt das Aussehen von Tiddler w\u00E4hrend ihrer Bearbeitung fest",
GettingStarted: "Dieser Schatten-Tiddler bietet eine einfache Bedienungsanleitung",
ImportTiddlers: "Dieser Schatten-Tiddler bietet Zugang zum Import von Tiddler",
MainMenu: "Dieser Schatten-Tiddler dient als Container f\u00FCr das Hauptmen\u00FC in der linksseitigen Spalte des Bildschirms",
MarkupPreHead: "Dieser Tiddler wird an der Spitze der <head>-Sektion der HTML-Datei des TiddlyWiki eingef\u00FCgt",
MarkupPostHead: "Dieser Tiddler wird am Ende der <head>-Sektion der HTML-Datei des TiddlyWiki eingef\u00FCgt",
MarkupPreBody: "Dieser Tiddler wird an der Spitze der <body>-Sektion der HTML-Datei des TiddlyWiki eingef\u00FCgt",
MarkupPostBody: "Dieser Tiddler wird am Ende der <body>-Sektion der HTML-Datei des TiddlyWiki unmittelbar nach dem Scriptblock eingef\u00FCgt",
OptionsPanel: "Dieser Schatten-Tiddler dient als Container f\u00FCr das einblendbare Optionsfeld in der rechtsseitigen Seitenleiste",
PageTemplate: "Die HTML-Vorlage in diesem Schatten-Tiddler legt das allgemeine Aussehen des TiddlyWiki fest",
PluginManager: "Dieser Schatten-Tiddler bietet Zugang zum Plugin-Manager",
SideBarOptions: "Dieser Schatten-Tiddler dient als Container f\u00FCr das Optionsfeld in der rechtsseitigen Seitenleiste",
SideBarTabs: "Dieser Schatten-Tiddler dient als Container f\u00FCr das Tab-Panel in der rechtsseitigen Seitenleiste",
SiteSubtitle: "Dieser Schatten-Tiddler enth\u00E4lt den zweiten Teil der Seiten\u00FCberschrift",
SiteTitle: "Dieser Schatten-Tiddler enth\u00E4lt den ersten Teil der Seiten\u00FCberschrift",
SiteUrl: "Dieser Schatten-Tiddler sollte den vollst\u00C4ndigen Ziel-URL der Ver\u00F6ffentlichung enthalten",
StyleSheetColors: "Dieser Schatten-Tiddler enth\u00E4lt CSS-Definitionen bez\u00FCglich der Farbe von Seitenelementen. ''DIESEN TIDDLER NICHT BEARBEITEN'', f\u00FCgen Sie Ihre \u00C4nderungen stattdessen in den StyleSheet-Schatten-Tiddler ein",
StyleSheet: "Dieser Tiddler kann benutzerspezifische CSS-Definitionen enthalten",
StyleSheetLayout: "Dieser Schatten-Tiddler enth\u00E4lt CSS-Definitionen bez\u00FCglich dem Aussehen von Seitenelementen. ''DIESEN TIDDLER NICHT BEARBEITEN'', f\u00FCgen Sie Ihre \u00C4nderungen stattdessen in den StyleSheet-Schatten-Tiddler ein",
StyleSheetLocale: "Dieser Schatten-Tiddler enth\u00E4lt CSS-Definitionen bez\u00FCglich lokale \u00DCbersetzungen",
StyleSheetPrint: "Dieser Schatten-Tiddler enth\u00E4lt CSS-Definitionen zum Drucken",
SystemSettings: "Dieser Tiddler wird zum Speichern von Konfigurationsoptionen f\u00FCr dieses TiddlyWiki-Dokument genutzt",
TabAll: "Dieser Schatten-Tiddler enth\u00E4lt den Inhalt des 'Alles'-Tab in der rechtsseitigen Seitenleiste",
TabMore: "Dieser Schatten-Tiddler enth\u00E4lt den Inhalt des 'Mehr'-Tab in der rechtsseitigen Seitenleiste",
TabMoreMissing: "Dieser Schatten-Tiddler enth\u00E4lt den Inhalt des 'Fehlend'-Tab in der rechtsseitigen Seitenleiste",
TabMoreOrphans: "Dieser Schatten-Tiddler enth\u00E4lt den Inhalt des 'Waisen'-Tab in der rechtsseitigen Seitenleiste",
TabMoreShadowed: "Dieser Schatten-Tiddler enth\u00E4lt den Inhalt des 'Schatten'-Tab in der rechtsseitigen Seitenleiste",
TabTags: "Dieser Schatten-Tiddler enth\u00E4lt den Inhalt des 'Tags'-Tab in der rechtsseitigen Seitenleiste",
TabTimeline: "Dieser Schatten-Tiddler enth\u00E4lt den Inhalt des 'Zeitachse'-Tab in der rechtsseitigen Seitenleiste",
ToolbarCommands: "Dieser Schatten-Tiddler legt fest, welche Befehle in Tiddler-Toolbars angezeigt werden",
ViewTemplate: "Die HTML-Vorlage in diesem Schatten-Tiddler legt das Aussehen der Tiddler fest"
});
// Uebersetzungen von Schatten-Tiddlern ausserhalb der offiziellen lingo.js
merge(config.shadowTiddlers,{
OptionsPanel: "Diese [[Interface-Einstellungen|InterfaceOptions]] zur Anpassung von TiddlyWiki werden in Ihrem Browser gespeichert\n\nIhr Benutzername zum Unterzeichnen Ihrer Eintr\u00E4ge. Bitte als WikiWord (z.B. KlausBrandm\u00FCller) schreiben\n\n<<option txtUserName>>\n<<option chkSaveBackups>> [[Backups speichern|SaveBackups]]\n<<option chkAutoSave>> [[Automatisch speichern|AutoSave]]\n<<option chkRegExpSearch>> [[RegExp Suche|RegExpSearch]]\n<<option chkCaseSensitiveSearch>> [[Gro\u00DF-/Kleinschreibung in Suche|CaseSensitiveSearch]]\n<<option chkAnimate>> [[Animationen aktivieren|EnableAnimations]]\n\n----\[[Erweiterte Optionen|AdvancedOptions]]\nPluginManager\nImportTiddlers",
GettingStarted: "Um mit diesem TiddlyWiki zu starten, sollten Sie folgende Tiddler modifizieren:\n* SiteTitle & SiteSubtitle: Den [[Titel|SiteTitle]] und [[Untertitel|SiteSubtitle]] der Site, wie oben angezeigt (nach dem Speichern werden diese auch in der Titelzeile des Browsers angezeigt)\n* MainMenu: Ihr Inhaltsverzeichnis (f\u00FCr gew\u00F6hnlich Links)\n* DefaultTiddlers: Beinhaltet die Namen der Tiddler, die Sie angezeigt haben m\u00F6chten, wenn das TiddlyWiki ge\u00F6ffnet wird.\nSie sollten zudem Ihren Benutzernamen zum Unterzeichnen Ihrer Bearbeitungen eingeben: <<option txtUserName>>",
InterfaceOptions: "Die [[Interface-Einstellungen|InterfaceOptions]] werden angezeigt, wenn Sie rechts auf 'Optionen' klicken. Sie werden mit einem Cookie in Ihrem Browser gespeichert, um sie zwischen den Aufrufen zu sichern. N\u00E4here Informationen zu den einzelnen Funktionen finden Sie, wenn Sie die Funktion selbst anklicken.",
WikiWord: "Ein WikiWord ist ein Wort, das aus mehreren einzelnen W\u00F6rtern zusammengesetzt ist, in dem jedes Wort mit einem Gro\u00DFbuchstaben beginnt und eine individuelle Seite bezeichnet.",
SaveBackups: "[[Backups speichern|SaveBackups]] ist eine Funktion, mit der automatisch bei jedem Abspeichern ein Backup erstellt wird.",
AutoSave: "[[Automatisches Speichern|AutoSave]] speichert automatisch \u00C4nderungen jedes Mal, wenn Sie einen Tiddler bearbeiten. Damit sinken die Chancen, dass Sie Daten verlieren. Beachten Sie jedoch, dass bei aktivierter [[Backup-Funktion|SaveBackups]] nat\u00FCrlich auch eine Menge Backup-Dateien erstellt werden. Entscheiden Sie sich deshalb f\u00FCr die eine oder andere Funktion.",
RegExpSearch: "Mit der [[RegExp Suche|RegExpSearch]] k\u00F6nnen Sie mit regul\u00E4ren Suchausdr\u00FCcken flexible Suchanfragen vornehmen.",
CaseSensitiveSearch: "Die Unterscheidung der [[Gro\u00DF-/Kleinschreibung in Suche|CaseSensitiveSearch]] tut genau dies.",
EnableAnimations: "Diese Funktion aktiviert Animationen, wenn Sie einen Tiddler \u00F6ffnen oder schlie\u00DFen.",
GenerateAnRssFeed: "Wenn Sie [[RSS-Feed generieren|GenerateAnRssFeed]] aktivieren, speichert TiddlyWiki automatisch einen RSS-2.0-g\u00FCltigen Feed, so bald Ihr TiddlyWiki gespeichert wird. Der Feed hat den gleichen Dateinamen wie das TiddlyWiki, lediglich jedoch mit der Endung '.xml'.",
OpenLinksInNewWindow: "Diese Funktion \u00F6ffnet externe Links in einem neuen ~Browser-Fenster.",
SaveEmptyTemplate: "Diese Funktion erwirkt, dass beim Abspeichern von \u00C4nderungen eine leere Vorlage von TiddlyWiki erzeugt wird. Dies ist als Hilfe gedacht f\u00FCr Entwickler, die Adaptionen von TiddlyWiki bereitstellen. Die Funktion ist nicht erforderlich, wenn Sie ein normaler Benutzer sind.",
HideEditingFeatures: "Ist diese Funktion aktiviert, werden die Bearbeitungsfunktionen ausgeblendet, wenn das TiddlyWiki \u00FCber HTTP aufgerufen wird. Der Benutzer hat dann die M\u00F6glichkeit, den Tiddler zwar betrachten zu k\u00F6nnen, aber nicht zu bearbeiten.",
MinorChanged: "Manchmal ist es sinnvoll, dass bei kleinen \u00C4nderungen der Tiddler in der Zeitachse nicht automatisch an den Anfang gesetzt wird. Mit Aktivierung dieser Funktion werden alle Bearbeitungen von Tiddlern als kleine \u00C4nderungen betrachtet und das \u00C4nderungsdatum nicht ge\u00E4ndert.",
ConfirmBeforeDeleting: "Bei Aktivierung dieser Funktion fordert TiddlyWiki eine Best\u00E4tigung des Benutzers an, wenn ein Tiddler gel\u00F6scht werden soll."});
//}}}
<html>
Einen neuen Tiddler aufmachen und folgendes abspeichern: <br />
<code><pre><<version>></pre></code>
Aktuelle Version ist 2.8.0
</html>
<html>
<a href="http://www.karadeniz.de/tiddlywiki/" target="_blank">http://www.karadeniz.de/tiddlywiki/</a>
</html>
<html>
<code><pre>
ls -1 /media/mueller/INT-256GB/StuffToDo/$(date +%Y-%m-%d_%A) > /tmp/todolist.txt
ls -1 /media/mueller/INT-256GB/StuffToDo/$(date +%Y-%m-%d_%A) > /tmp/todolist.txt
whiptail --textbox /tmp/todolist.txt 20 40
rm -f /tmp/todolist.txt
</pre></code>
</html>
<html>
<ol>
<li><b>plain editor</b></li>
Windows: Notepad++<br />
Unix: ??<br />
<br />
<li><b>web browsers</b></li>
JavaScript-Programm mit mind. drei verschiedenen<br />
Web-Browsern testen<br />
<table>
<tr><th>Rendering engine</th><th>Web browser</th></tr>
<tr><td>Trident</td><td>Internet Explorer (IE)</td></tr>
<tr><td>Gecko</td><td>Firefox / Netscape / Mozilla</td></tr>
<tr><td>Presto</td><td>Opera</td></tr>
<tr><td>KHTML</td><td>Safari / Konqueror</td></tr>
</table>
<li><b>automation building tool</b></li>
<b> Grunt</b><br />
Links:<br />
http://www.thegeekstuff.com/2014/08/grunt-introduction/<br />
http://www.thegeekstuff.com/2014/10/grunt-contrib-watch-automate/<br />
</ol>
</html>
<html>
<ul>
<li>von der Fa. Business‐DNA (CH) entwickelt;</li>
<li>hierarchische DB, XML-basierend</li>
<li><b>vorhandene Tools:</b><br />
<ol>
<li>TopEase Designer</li>
<li>TopEase XChange Server</li>
</ol></li>
<!--li></li>
<li></li>
<li></li>
<li></li-->
</ul>
<ul>
<li><a href="https://confluence.topease.ch/confluence/display/DOC/" target=_blank>TopEase :: Homepage</a></li>
<li><a href="https://confluence.topease.ch/confluence/display/DOC/Downloads" target=_blank>TopEase :: Downloads</a></li>
<li><a href="https://www.youtube.com/channel/UC20QoIjnXj7sGC3U73G0KyQ" target=_blank>YouTube</a></li>
<!--li>
<li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li>
<li><a href="" target=_blank></a></li>
</li-->
</ul>
</html>
<html>
In the .login file add the commands:<br />
------------------------------------<br />
<br /><code>
echo login time `date` >> .daylogs/masterlog<br />
<br />
grep -i "sun" .daylogs/masterlog > .daylogs/sunday.log<br />
grep -i "mon" .daylogs/masterlog > .daylogs/monday.log<br />
grep -i "tue" .daylogs/masterlog > .daylogs/tuesday.log<br />
grep -i "wen" .daylogs/masterlog > .daylogs/wensday.log<br />
grep -i "thu" .daylogs/masterlog > .daylogs/thursday.log<br />
grep -i "fri" .daylogs/masterlog > .daylogs/friday.log<br />
grep -i "sat" .daylogs/masterlog > .daylogs/saturday.log<br />
</code><br />
In the .logout file add this line <br />
-----------------------------------<br />
<br /><code>
echo logout time `date`>> .daylogs/masterlog<br />
</code><br />
This script assumes you have a hidden <br />
directory called .daylogs this helps keep it <br />
out of sight and away from prying eyes and <br />
if you keep root ownership of the directory <br />
change the mode to:<br />
<br /><code>
chmod 744 .daylogs<br />
</code><br />
This will not allow anyone to get in to the <br />
directory to look around. <br />
<br />
</html>
<html>
<ul>
<li>Ein American Depositary Receipt (auch American Depository Receipt, abgekürzt ADR) <br />
oder American Depositary Share ist ein auf Dollar lautender, von US-amerikanischen<br />
Depotbanken (depositary banks) in den USA ausgegebener Hinterlegungsschein, der<br />
eine bestimmte Anzahl hinterlegter Aktien eines ausländischen Unternehmens verkör‐<br />
pert und an deren Stelle am US-Kapitalmarkt gehandelt werden kann. </li>
<br />
<li>Aufgrund chinesischer Gesetze, die ausländische Investitionen einschränken, verkaufen<br />
z.B. chinesische Firmen, die im Ausland an die Börse gehen wollen, typischerweise Anteile<br />
an Holdinggesellschaften, die an Orten wie den Kaimaninseln oder den Bahamas ansässig<br />
sind, anstatt direkt Aktien der jeweiligen (hier: chinesischen) Firma selbst anzubieten.<br />
<br />
Dieses Konstrukt ermöglicht es ausländischen Investoren in Aktien zu investieren, und auch<br />
an ihren Kursbewegungen zu partizipieren ‐ aber ohne jegliche Rechte im Falle einer Insol‐<br />
venz oder eines staatlichen Eingriffs.</li>
<br />
<!--
<li></li>
<li></li>
<li></li>
-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/American_Depositary_Receipt" target=_blank>Wikipedia :: ADR</a></li>
<li>UMWA‐Börsenbrief, 2021-07-26</li>
</html>
<html>
<ul>
<li>Die Geschäfte, die wir machen, <br />
werden als “<b>Stillhaltergeschäfte</b>“ bezeichnet</li>
<li>Optionen :: <br />
1 Kontrakt :=: 100 Aktien</li>
<li>“Gültigkeitsdauer“ ::<br />
am besten <b>DAY</b> (die Order ist nur am gleichen Tag gültig)</li>
<li>Ermittlung der “Miete“ ::<br />
1 Kontrakt · 100 Aktien · Optionspreis</li>
<li><b>Put</b> (Optionsverkauf) ::<br />
Einstellung “LMT“ (Limit) <br />
→ Der Betrag, den ich mindestens haben will<br />
<br />
<b>Call</b> (Optionskauf) ::<br />
Einstellung “LMT“ (Limit) <br />
→ Der Betrag, den ich höchstens zahlen will (?)</li>
<li>In IBKR Trader Workstation :: <br />
Kontostand :=: “Nettoliquidierungswert“</li>
<li>am Verfallstag tritt eine der folgenden Situationen ein: <br />
<ul>
<li>Put-Strikeprice < Aktienkurs ::<br />
die Option verfällt</li>
<li>Put-Strikeprice > Aktienkurs :: <br />
die Option wird ausgeführt → ich kaufe die Aktien</li>
</ul></li>
<li></li>
<li></li>
</ul>
</html>
<html>
<ul>
<li><b>IBKR → Portfolio‐Tab → Spalte “⌀‐Kurs“ :: </b><br />
Das ist der durchschnittliche Kaufkurs, zu dem ich das Finanzinstrument <br />
gekauft (Aktie, Call) bzw. verkauft (Put) habe.</li>
<br />
<li><b>“Kurswert“ :: </b><br />
Wert der Position zum aktuellen Kurs</li>
<br />
<li><b>Ändern der Einstellungen bzgl. des Header‐/Icon‐Menüs :: </b><br />
Auf beliebigen Eintrag gehen<br />
→ RMT <br />
→ den Eintrag “Symbolleiste konfigurieren“ auswählen<br />
<br />
Darüber läßt sich auch die Schriftgröße einstellen</li>
<br />
<li><b>“Gesamt“‐Zeile :: </b><br />
die Gesamtsumme, in Euro umgerechnet, <br />
während die Einzelposten in US-$ sind</li>
<br />
<li><b>“Konto“‐Icon ::</b><br />
die Zeile “Barwert“ zeigt die aktuelle Liquidität in Cash auf dem Konto an<br />
→ jede Aktion in Puts u. / o. in Aktien schmälert diese Cash‐Quote<br />
<br />
⇒ diese Cash-Quote in US-$ umrechnen<br />
⇒ davon die laufenden Puts abziehen<br />
⇒ das Ergebnis ist die wirkliche Cash‐Quote</li>
<br />
<li><b>Die Frage nach der Höhe einer Cash-Position :: </b><br />
Den Cash-Bestand dem VIX (Ticker: PRTUSVI) anpassen<br />
→ dh. steht der VIX bei einem Wert von 20, <br />
dann die Cash‐Quote bei 20% des Depot‐Bestandes behalten.</li>
<br />
<!--li></li>
<li></li>
<li></li>
<li></li>
<li></li-->
</ul>
</html>
<html>
<ul>
<li>Trading‐Gebühren: $14.50;<br />
bei Trading‐Kosten von über $30 werden $10 davon abgezogen</li>
<li>Kontoanzeige IBKR ‐ TWS:<br />
“Barwert in Euro“ := aktuelle Liquidität</li>
<li>Kontoanzeige IBKR ‐ TWS:<br />
?Akt. verfügbares Guthaben? Nettoliquidierungswert ?</li>
<li>empfohlene Depot‐Aufteilung <em>(in Prozent)</em>:
<table>
<tr><th>Depot‐<br />Anteil:</th><td width=25em><center>60</center></td><td width=25em><center>30</td><td width=25em><center>10</td></tr>
<tr><th>Qualität <br />der Aktien:</th><td width=25em><center>A</td><td width=25em><center>B</td><td width=25em><center>C</td></tr></table>
(Einteilung gemäß AQUB-Analyse resp. ‐Liste)<br />
<br />
</li>
<li><em><b>ProRealTime:</b></em> Stochastik:<br />
blaue Linie :: langsame Stochastik<br />
rote Linie :: schnelle Stochastik</li>
<li></li>
</ul>
</html>
<html>
<ul>
<li>20.000 € Verlustgegenrechnung (?)</li>
<li>IB-KontoWechsel, Dublin oder LUX</li>
<li></li>
<li></li>
</ul>
</html>
<html>
<ul>
<li>Kandidaten “kiw“, u.a.
<ul>
<li><b><em>BB, Blackberry</em></b></li>
<li><b><em>NOK, Nokia</em></b></li>
</ul>aktuell (2021-02-16) ist es noch zu früh, <br />
die Stochastik muß noch die untere Grenze von unten her durchbrechen</li>
<li>Call‐Verkauf überlegenswert, wenn:
<ul>
<li>der aktuelle Kurs ist unter dem gewünschten Strikepreis</li>
und
<li>der Kurs ist fallend</li>
</ul></li>
<!--
<li></li>
<li></li>
<li></li>
-->
</ul>
</html>
<html>
<ul>
<li><b>“Merke: Je steiler ein Pfeil in den Himmel geschossen wird, <br />
desto schneller kommt er wieder herunter. “</b><br/>
<br />
Wenn ein Aktienkurs nach einer guten Nachricht (extrem) steigt (wie z.B. am <br />
18.11.2020 bei der Boing-Aktie, nachdem bekannt gegeben worden war, dass<br />
der Flieger 737 MAX mit neuer Steuersoftware freigegeben wurde), _nicht_ <br />
sofort mit auf den fahrenden Zug aufspringen, es kann passieren, dass der<br />
Zug stehenbleibt und wieder zurückfährt bzw. der Pfeil unverzüglich wieder<br />
gen Erde zurückkommt.</li>
</ul>
</html>
<html>
<ul>
<li>CQG:
<ul>
<li>Schnittstelle zur (entsprechenden) Börse;
</li>
<li>darüber findet die Datenlieferung und auch<br />
die Trade-Eingabe statt;
</li>
<li>
</li>
</ul>
</li>
<li>Für alle die noch keine Erfahrung in dem Breiche haben, <br />
bitte die DEMO nutzen und einfach mal Erahrung sammeln. <br />
Es ist kostenfrei und wirklich ein guter und einfacher Einsteig: <a href="https://www.whselfinvest.de/de-de/trading-plattform/bester-broker/cfd-forex-futures-aktien/kostenlose-demo-stagge" target="_blank" rel="noreferrer noopener">WHSelfinvest - Kostenloses Demokonto [Stagge]</a>
</li>
<li>CQG → Dann Börse und dann die Börse wo der Future gehandelt. Entweder CME oder EUREX
</li>
<li>DAX Future = 25 Euro pro Punkt
</li>
<li>Mini = 5 Euro pro Punkt
</li>
<li>Micro = 1 Euro pro Punkt
</li>
<li>https://www.whselfinvest.de/en-de/trading/futures-broker/low-commissions/swing-daytrading-scalping
</li>
<li>https://www.whselfinvest.de/en-de/trading/futures-broker/low-commissions/margin-exchange-fee-contract-details-futures?sheet=4
</li>
<li>Als Tipp für den Anfang - immer mit Mirco im Echtgeld anfangen. <br />
Dort werden in der Regel nur wenige Euro oder USD bewegt. Grö–<br />
ßere Kontrakte kann man immer noch handeln, wenn die Um–<br />
setzung und Anwendung mit dem Micro sitzt.
</li>
<li>OCO :: <br />
Kombination aus zwei Aufträgen, bei der nach Ausführung einer<br />
Order die zweite automatisch gelöscht wird. Die One-cancels-the-<br />
other-Order (OCO-Order) setzt sich aus zwei separaten Aufträgen<br />
zusammen, die beide Bestandteile eines Ordertickets sind.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><b>WHSelfinvest - Webinar:</b><br />
"Wie trade ich Gold Rush und Co. mit dem NanoTrader - die Anleitung"<br />
Mittwoch, 3. April 2024, 19:00 - 20:00 MESZ<br />
</li>
</ul>
</html>
<html>
<ul>
<li>ProRealTime kostet 20,- EUR mtl.</li>
<br />
<li>Nach dem Start mit dem Echtgeldhandel werden für Marktdaten bei Interactive Brokers <br />
weitere 14,50$ mtl. entstehen. Diese sind allerdings abhängig von Deiner Aktivität. Ab <br />
30$ Gebühren durch den Handel zahlst Du nur noch 4,50$ mtl., was bei einer mittleren <br />
Aktivität ohne Probleme möglich ist.</li>
<br />
<li>Beim Handel generell durch das Kaufen und Verkaufen entstehen Gebühren. Diese sind <br />
unterschiedlich und liegen pro Trade bei ca. 1$ + Börsengebühren (0,15-0,80$)</li>
</ul>
Zudem sind Gewinne natürlich zu versteuern. Das sind alle Kosten, die entstehen.
</html>
<html>
<ul>
<li>
</li>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.finanztrends.de/aktienmarkt-maximum-pain-trading-theorie-erklaert/"
target="_blank" rel="noreferrer noopener">
Finanztrends :: Aktienmarkt: Maximum Pain Trading Theorie, erklärt! </a>
</li>
<li><a href="https://optionstradingiq.com/options-max-pain-theory/"
target="_blank" rel="noreferrer noopener">
Options Trading IQ :: Options Max Pain Theory Explained & How People Trade It </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li><h3>Notiz in die TWS einfügen</h3>
Mit der rechten Maustaste die Zeile der Aktie anklicken.<br />
Dann: “<em>Bearbeiten</em>“ ⇒ “<em>Text einfügen</em>“ ⇒ “<em>speichern</em>“.
</ul>
</html>
<html>
<ul>
<li><h3>Put</h3>
<ul>
<li>“Verkaufsoption“
</li>
<li>
</li>
</ul
</li>
<br />
<li><h3>Call</h3>
<ul>
<li>“Kaufoption“
</li>
<li>
</li>
</ul
</li>
<br />
<li>
<table
<tr>
<th align="center" width=150><b>Aktivität</b>
</th>
<th align="center" width=275><b>Put</b>
</th>
<th align="center" width=275<b>Call</b>
</th>
</tr>
<tr>
<td align="center"> <b>Kauf </b>
</td>
<td>
<ul>
<li>Der <b>Käufer</b> (der Option) hat das Underlying;
</li>
<li>Der <b>Käufer</b> bekommt das Recht, das Under–<br />
lying zum <em>Strikeprice</em> an den Verkäufer der Option <u>abzugeben</u>;
</li>
</ul>
</td>
<td valign="top">
<ul>
<li>Der <b>Käufer</b> bekommt das Recht, das Under–<br />
lying zum <em>Strikeprice</em> vom Verkäufer der Option zu <u>erwerben</u>;
</li>
</ul>
</td>
</tr>
<tr>
<td align="center"> <b>Verkauf </b>
</td>
<td>
</td>
<td>
<ul>
<li><b>Empfehlung:</b> der Verkäufer des Calls besitzt<br />
das entsprechende Underlying (z.B. die Aktien)<br />
<em>(das nennt sich dann “Covered Call“)</em>
</li>
<li>Der <b>Verkäufer</b> erhält die Optionsprämie;
</li>
</ul>
</td>
</tr>
</table>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>GTC</h3>
<ul>
<li>“Good‐till‐cancelled“
</li>
<li>Die Order bleibt so lange im Orderbuch, bis sie ausgeführt wird.<br />
Allerdings wird sie bei IB am Quartalsende automatisch entfernt,<br />
falls sie bis dahin nicht ausgeführt wurde.<br />
</li>
</ul>
</li>
<li><h3>OCA</h3>
<ul>
<li>“One cancels the other“
</li>
<li>Es werden zwei (sich ausschliessende?) Order eingestellt. Wird<br />
eine ausgeführt, wird die andere automatisch gecancelled.
</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li>Trendfolge-Indikatoren</li>
<li>von Usern erstellt</li>
<li>sind ein visueller Indikator, der die Erkennung und Verfolgung steigender<br />
Trends vereinfacht</li>
<li>Sie können dabei helfen:
<ul>
<li>Trendumkehrung zu erkennen;</li>
<li>steigende Trends zu erkennen und zu verfolgen;</li>
<li>die Intensität eines Trends zu messen;</li>
<li>potentielle Ein- und Ausstiegspunkte zu finden;</li>
</ul></li>
<li>in ProRealTime unter dem Menüpunkt “Indicators“<br />
⇒ PRT Bands (on price) zu finden</li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</html>
<html>
<ul>
<li><h3>Pound Shorter</h3>
https://www.investui.de/de-de/investieren/geldanlage/gelegenheiten/markteffekte
https://www.whselfinvest.de/de-de/trading-plattform/kostenlose-trading-strategien/handelssysteme/61-rene-wolfram-pound-short-sell<br />
https://beste-trading-plattformen.de/trading-plattform-futures-forex-cfd-aktien-nanotrader/die-pound-shorter-strategie
</li>
<li><h3>ETF-Hamster-2.0</h3>
</li>
<li><h3>YTD-Effekt</h3>
</li>
<li><h3>“5 Tage bestimmen das Börsenjahr“</h3>
</li>
<li><h3>EUR–USD–Steuerstichtag</h3>
</li>
<li><h3>200 Tage–Linie</h3>
</li>
<li><h3>Burger oder Bratwurst</h3>
</li>
<li><h3>Halloween-Effekt</h3>
</li>
<li><h3>Quartals-Trick</h3>
</li>
<li><h3>Gerade in Ungnade</h3>
</li>
<li><h3>Wahlgeschenk</h3>
</li>
<li><h3>Bund Future-Bombe</h3>
</li>
<li><h3>Renten-Futures Long am Monatsende</h3>
</li>
<li><h3>Monatsultimo</h3>
</li>
<li><h3>Turnaround Tuesday</h3>
</li>
<li><h3>Friday Gold Rush</h3>
</li>
<li><h3>Heisse Hexen</h3>
</li>
<li><h3>Morning-Break-Out</h3>
</li>
<li><h3>FX-Fool</h3>
</li>
<li><h3>Euroboost</h3>
</li>
<li><h3>Eurobust</h3>
</li>
<li><h3>Sommerloch-Short</h3>
</li>
<li><h3>Zinsdifferenz EURUSD</h3>
</li>
<li><h3>Darvas–Strategie</h3>
</li>
<li><h3></h3>
</li>
<li><h3></h3>
</li>
<li><h3></h3>
</li>
</ul>
</html>
<html>
<ul>
<li><details><summary><b>1. Interactive Brokers - Wie kaufe ich eine Aktie</b></summary>
Es gibt drei verschiedene Wege, eine Aktie direkt zu kaufen:<br />
<br />
<ul type="I">
<li>In die TWS einloggen<br />
→ Menübutton “Order“ anklicken<br />
→ Fenster “Orderticket“ öffnet sich<br />
→ Eingabe im Feld “Finanzinstrument“ links oben, das Kürzel des gewünschten Unternehmens eingeben<br />
→ neues Fenster, die Suchergebnisse, wird angezeigt<br />
→ hier den Eintrag “Aktie (SMART)“ auswählen <br />
→ …<br />
</li>
<br />
<li>In der Watchlist den gewünschten Wert auswählen, markieren und RMT drücken<br />
→ es öffnet sich ein kleines Fenster<br />
→ links oben, auf den Button “Kaufen“klicken<br />
→ unter dem gewünschten Wert wird eine weitere Zeile eingefügt<br />
→ diese Zeile stellt das Orderticket in komprimierter Form dar<br />
→ dabei gilt:<br />
<ul>
<li>“LMT“ :=: Limit (‐Order)</li>
<li>“DAY“ :=: die Order ist für den aktuellen Tag (also bis zum Ende des aktuellen Tages) gültig</li>
<li>“SMART“ :=: dies gibt das Routingsziel an (an welcher Börse die Order ausgeführt wird)</li>
</ul>
→ falls die Darstellung über “Orderticket“ gewünscht ist, dann:<br />
    das Konto‐Feld markieren → RMT drücken → “Ändern“ auswählen<br />
→ “Orderticket“ anklicken</li>
<br />
<li>In der Watchlist die gewünschte Aktie aussuchen & markieren<br />
→ auf den Button “Order“ in der Menüleiste klicken<br />
→ das Fenster “Orderticket“ erscheint<br />
→ Überprüfen, ob bei “Aktion“ der Eintrag “Kauf“ angetickt ist<br />
→ im Feld “Ausstehende Menge“ die gewünschte Menge eintragen<br />
(wenn mgl. gleich in 100er Schritten handeln, damit später mit <br />
diesen Aktien (Call‐)Optionengehandelt werden können <br />
[1 Optionskontrakt :=: 100 Aktien])<br />
→ Bereich “Orderbeschreibung“:<br />
<ul>
<li>Feld “Ordertyp“ :: LMT eintragen bzw. belassen</li>
<li>Feld “Limitkurs“ :: beim Öffnen des Orderticket orientiert sich der Limitkurs<br />
am aktuellen Briefkurs “MKT“ :: Die Aktie wird mit dem Kurs bei der <br />
nächsten Markt‐/Preisfeststellung gekauft.<br />
!!Optionen immer mit Limit ordern!!]</li>
<li>Feld “Routingziel“ :: Auf “SMART“ belassen resp. einstellen<br />
(IB schaut sich alle Börsenplätze an und kauft an derjenigen Börse, die den günstigsten<br />
Preis, den vorteilhaftesten Kurs bietet)<br />
</li>
</ul>
→ Bereich “Gültigkeitsdauer“:<br />
am besten auf “DAY“ einstellen bzw. belassen<br />
    (“GTC“ :=: “Good‐till‐cancelled“ : <br />
    Die Order bleibt so lange im Orderbuch bis sie ausgeführt wird. Allerdings wird sie bei IB<br />
    am Quartalsende automatisch entfernt, falls sie bis dahin nicht ausgeführt wurde;)<br />
→ Button “Vorschau“ anklicken<br />
→ Eingaben überprüfen / kontrollieren<br />
→ Im Bereich “Mitteilungen“ können u.U. Warnungen / Hinweise angegeben<br />
sein. Diese auf jeden Fall beachten!<br />
→ Falls alles den eigenen Vorstellungen entspricht, dann auf den Button “Übermitteln“ klicken<br />
→ Nach der Ausführung der Order blinkt der Button “Handelsprotokoll“<br />
→ das Protokoll kann die Trades der letzten sieben Tage anzeigen<br />
</li>
</ul>
</details><br /></li>
<li><details><summary><b>2. Interactive Brokers - Wie verkaufe ich eine Aktie</b></summary>
<br />
</details><br /></li>
<li><details><summary><b>3. ProRealTime - Wie kaufe ich eine Aktie</b></summary>
<br />
</details><br /></li>
<li><details><summary><b>4. ProRealTime - Wie verkaufe ich eine Aktie</b></summary>
<br />
</details><br /></li>
</ul>
</html>
<html>
<ul>
<li><details><summary><b>1. Interactive Brokers - Wie kann ich mich in die Kontoverwaltung einloggen</b></summary>
<br />
</details><br /></li>
<li><details><summary><b>2. Interactive Brokers - Wie kann ich die Größe des Paper-Trading-Depots anpassen</b></summary>
<br />
</details><br /><ul>
<li><details><summary><b>2.1 Interactive Brokers - Wie kann ich mein Paper-Trading-Depot aktivieren/anlegen</b></summary>
<br />
<a target="popup" onclick="window.open
('', 'popup', 'width=580,height=360,scrollbars=no, toolbar=no,status=no,
resizable=yes,menubar=no,location=no,directories=no,top=10,left=10')
"href="../../INT-256GB/MWM_Trading/Tutorial_IB_Anleitung_Paper-Trading_aktivieren.pdf">Tutorial‐Dokument</a>
"href="../../INT-256GB/MWM_Trading/Tutorial_IB_Anleitung_Paper-Trading_aktivieren.pdf">Tutorial‐Dokument</a>
<br />
</details><br /></li></ul>
</li><!-- Ende Abschnitt 2 -->
<li><details><summary><b>3. Interactive Brokers - Wie kann ich Geld einzahlen</b></summary>
<br />
<em><u>Um sicherzustellen, dass jeweils die aktuellsten Bankinformationen verwendet werden</u></em> und<br />
die Einzahlung schnellstmöglich meinem Konto zugeordnet wird, wird empfohlen, vor <br />
jeder Überweisung immer eine Einzahlungsbenachrichtigung zu erstellen.<br />
<h3>Erstellen einer Einzahlungsbenachrichtigung</h3>
<ul>
<li>Anmelden bei Interactive Brokers, in der Kontoverwaltung mit Ihrem zweiten Benutzernamen,<br />
Ihrem zweiten Passwort und gegebenenfalls Ihrem zweiten Sicherheitssystem an.</li>
<li>Man landet im “Client Portal“. Hier das <em>Hamburger‐Icon</em> anklicken,<br />
dann erscheint auf der linken Seite ein Menü</li>
<li>Hier auf "Transfer & Zahlen" klicken und dann auf "Guthaben übertragen"</li>
<li>Es erscheint folgende Seite:<br />
<img src="./pictures/IKBR_Guthabentransfers_GuthabenUebertragen.png" height=220 width=566 /></li>
<li>Klicken Sie Im Auswahlmenü "Art der Transaktion" auf "Einzahlung aurufen"</li>
<li>Wählen Sie die entsprechende Währung aus</li>
<li>Neben der Frage "Möchten Sie eine bereits gespeicherte Bankverbindung verwenden?"<br />
auf "JA" oder "NEIN" klicken und dann gegebenenfalls die Details der Bank eingeben</li>
<li>Dann den genauen Betrag der Einzahlung angeben</li>
<li>Als nächstes auf "Weiter" klicken, um die Kontonummer und die Anweisungen für die<br />
Überweisung anzeigen zu lassen.</li>
</ul>
<h3>Bankverbindung bzgl. Überweisung</h3>
Wie oben bereits geschrieben, kann die Bankverbindung sich jederzeit ändern (wie<br />
z. B. beim Brexit)<br />
<br />
aktueller Stand (2021-05-19):<br />
Interactive Brokers Ireland Ltd,<br />
10 Earlsfort Terrace<br />
,Dublin 2 D02 T380 <br />
BIC CHASDEFXXXX<br />
IBAN DE72501108006231412815
<h3>Statusanzeige Ihrer Einzahlung</h3>
In der Kontoverwaltung kann man den Status aller Einzahlungs- und<br />
Auszahlungsbenachrichtigungen (Ausstehend, Verfügbar, Genehmigt, Abgewiesen,<br />
usw) wie folgend ansehen:
<ul>
<li>Klicken Sie auf "Transfer & Zahlen"</li>
<li>Wählen Sie dann "Transaktionsverlauf"</li>
</ul>
<br />
</details><br /></li>
<li><details><summary><b>4. Interactive Brokers - Wie kann ich Geld auszahlen</b></summary>
<br />
</details><br /></li>
<li><details><summary><b>5. Interactive Brokers - Prolog - Marktdaten einrichten</b></summary>
<br />
Defaultmäßig werden die Kurse mit einer Verspätung von 15 Minuten aktualisiert.<br />
Dann können folgende zwei Situationen eintreten:
<ol>
<li>Der Kurs läuft <b>gegen</b> uns</li>
<li>Der Kurs läuft <b>für</b> uns</li>
</ol>
<br />
</details><br /><ul>
<li><details><summary><b>5.1 Interactive Brokers - Marktdaten einrichten</b></summary>
<h3>Einrichtung der Marktdatenabonnements für die Trader Workstation</h3>
Dazu muß man in die “Kontoverwaltung“ von <em>Interactive Brokers</em>:<br />
<br />
Einloggen in <em>Interactive Brokers</em> ) (die Login-Seite):<br />
<img src="./pictures/InteractiveBrokers_ClientPortal_Login.png" height=325 width=406 /><br />
→ das “Client Portal“ (<em>Eingangsseite</em>) erscheint:<br />
<img src="./pictures/InteractiveBrokers_Eingangsseite.png" height=527width=970 /><br />
→ Headerzeile: <em>Menü</em> (das “Hamburger-Zeichen“ links)<br />
→ neues Menü, linke Seite<br />
→ Auswählen: “Einstellungen“ (ggfs. runterscrollen)<br />
→ Anzeige Untermenü: “Benutzereinstellungen“<br />
→ Links-Klick (LMT)<br />
→ Neues Fenster:<br />
<img src="./pictures/Marktdaten_Benutzereinstellungen.png" height=266 width=657 /><br />
→ Bereich “Handelsplattform“<br />
→ bei Eintrag “Marktdatenabonnements“ auf das Zahnrad klicken<br />
→ Bereich “Aktuelle GFIS‐Abonnements“:<br />
<div style="text-indent:15px;">das sind unsere aktuell abonnierten Marktdaten</div>
→ auf das Zahnrad klicken<br />
→ Tab “Nordamerika“ auswählen (sollte schon vorselektiert sein)<br />
→ auf “Kurspakete“ klicken<br />
→ Untermenü erscheint ‐ eine Lister der zur Verfügung stehenden Pakete<br />
→ Es werden folgende zwei Pakete benötigt:<br />
<br />
<ol>
<li>US Securities Snapshot and Futures Value Bundle<br />
($30 pro Monat, wird mit getätigten Geschäften gegengerechnet)</li>
<br />
<li>US Equity and Options Add-On Streaming Bundle<br />
(“Echzeitstreams“, $4,50 pro Monat)</li>
</ol><br />
→ Tab “Weltweit“ auswählen<br />
→ hier folgendes Paket auswählen:<br />
<br />
<ul>
<li>UK Physical Metals and Commodities</li>
</ul><br />
→ den Button “Weiter“ (unten rechts) anklicken<br />
→ der Fragebogen zum Non-Professional-Status erscheint<br />
→ alle Fragen sollten mit “Nein“ zu beantworten sein (10 Fragen)<br />
→ nach unten scrollen<br />
→ die persönlichen Angaben werden angezeigt<br />
→ weiter nach unten scrollen, zum Abschnitt “Beschäftigungsverhältnis“<br />
→ Folgende Angaben sind zu machen:<br />
<br />
<ol>
<li>Webseite des Arbeitgebers (gibt es keine, dann “www“ eingeben)</li>
<li>Titel oder Position</li>
<li>Dienstgrad</li>
<li>Berufliche Funktion (Beschreibung)</li>
<li>Berufsbranche</li>
</ol>
<div style="text-indent:12px;">[alle Angaben sind obligatorisch!]</div>
<br />
→ ganz nach unten scrollen<br />
→ Bestätigen, dass die vorstehenden Fragen wahrheitsgemäß<br />
<div style="text-indent:12px;">beantwortet wurden ˜ “Ja“</div>
→ Bereich “Unterschrift“: <br />
<div style="text-indent:12px;">Unterschrieben wird, indem der eigene Name ausgewählt wird</div>
→ Auf “Weiter“ klicken<br />
→ Die folgende Seite ist mit juristischen Texten ausgefüllt<br />
<div style="text-indent:12px;">(Kleingedrucktes zu den Marktdatenanbindungen;</div>
<div style="text-indent:12px;">kann man durchlesen, muss man aber nicht …)</div>
→ ganz nach unten scrollen<br />
→ “Unterschrift“ : <br />
<div style="text-indent:12px;">Einfach den Namen per Tastatur eingeben, handschriftlich nicht notwendig</div>
→ auf “Weiter“klicken<br />
→ Bestätigung der Marktdatenabonnements<br />
→ auf “Ok“ klicken<br />
<br />
<hr />
<hr />
<br />
Sofern Du die Marktdaten kostenfrei auch im Paper-Trading-Konto nutzen möchtest, <br />
gehe bitte nach der Freischaltung im Live-Konto wie folgt vor:<br />
<br />
<ul>
<li>logge dich in deine Kontoverwaltung bei Interactive Brokers ein
</li>
<li>klicke hier oben rechts auf das "Account / Porträt"-Symbol (rechts neben "Hilfe")
</li>
<li>klicke nun auf "Einstellungen"
</li>
<li>auf der linken Seite gibt es den Menüpunkt "Paper-Trading-Konto"
</li>
<li>über diesen Punkt aktivierst du dein Paper-Trading
</li>
<li>dort findest du eine Option “Echtzeit-Marktdatenabonnements mit Paper-Trading-Konto teilen?“. Hier musst du nur auf “JA“ umstellen
</li>
<li>unter "Wählen Sie den Benutzer aus, dessen Marktdaten Sie teilen möchten" wählst du deinen Nutzeraccount vom Echtgeld-Konto aus
</li>
</ul>
<br />
Dort findest Du eine Option, die Marktdaten auf das Paper-Trading-Konto kostenfrei<br />
zu übernehmen.
<br />
</details><br /></li>
</li>
</html>
<html>
<ul>
<li><b>Anmerkung:</b><br />
Steht im Optionstrader vor einem Kurs ein kleines “c“, so bezeichnet<br />
das den letzten Kurs <b><u>vom Vortag</u></b>! Daraus folgt, dass am aktuellen<br />
Tag bisher <b>keine</b> Kursfeststellung stattgefunden hat!
</li>
<br 7>
<li><details><summary><b>1. Interactive Brokers - Übersicht Optiontrader</b></summary>
<br />
Menüpunkt “Optiontrader“ anklicken [Basisinstrument ausgewählt]<br />
→ neues Fenster erscheint <br />
<br />
Der untere Bereich ist in zwei Hälften unterteilt:<br />
<ul>
<li><b>linke Hälfte</b> :: Call-Kurse</li>
<li><b>rechte Hälfte</b> :: Put-Kurse</li>
</ul>
<br />
Beim “Überfliegen“ der einzelnen Kurse erscheint immer ein<br />
kleines Fenster, das folgende Infos anzeigt:<br />
<ul>
<li><b>rote Farbe</b> :: Verkaufs-Kurse (<em>“Sell“</em>)</li>
<li><b>blaue Farbe</b> :: Kauf-Kurse (<em>“Buy“</em>)</li>
</ul>
Gleichzeitig ist dann entsprechend auch ein <em>“Buy“</em> bzw. <br />
ein <em>“Sell“</em> zu lesen.<br />
<br />
<b>Liste der Basispreise (<em>Strike price</em>) verlängern:</b><br />
→ Spalte “Basispreise“, den Downward-Pfeil anklicken<br />
<br />
→ neues Fenster erscheint gewünschte Basispreise auswählen<br />
→ “schließen“ drücken
<br />
</details><br /></li>
<li><details><summary><b>2. Interactive Brokers - Wie verkaufe ich einen Put</b> Nochmal anschauen!!!</summary>
<br />
OptionTrader öffnen: Icon in Header-Menü anklicken
→ neues Fenster erscheint<br />
→ das Finanzinstrument auswählen: Tickersymbol eingeben → Return drücken<br />
→ Bsp. <em>Verkauf Put, 39.5 P, 2019‐12‐27</em>: <br />
→ in Spalte “Basispreise“ in den gewünschten Abschnitt (z.B. “Dec 27'19“) wechseln<br />
→ gewünschten Basispreis auswählen und markieren<br />
→ in den rechten Bereich, in der Spalte “Geldkurs“ die Zeile für den gewünschten Basispreis wechseln<br />
→ LMT drücken<br />
→ es öffnet sich die komprimierte Orderansicht oberhalb des Kursbereichs (eine neue Zeile)<br />
→ jetzt Orderticket öffnen: die komprimierte Orderansicht markieren<br />
→ RMT drücken<br />
→ ein kleines Menü erscheint<br />
→ hier den Eintrag <em>“verändern“</em> auswählen<br />
→ es erscheint ein Untermenü, das den Eintrag “Orderticket“ enthät<br />
→ Drücken der LMT auf diesen Eintrag<br />
→ neues Fenster erscheint (links oben steht “Orderticket“)<br />
→ die (vorhandenen) Einträge überprüfen:
<ul>
<li>Aktion → <em>Verkauf</em></li>
<li>Finanzinstrument</li>
<li>Ausstehende Menge</li>
<li>Ordertyp → <b>immer</b> mit Limit (“LMT“) arbeiten!</li>
<li>Limitkurs → immer an dem Geldkurs ausrichten (resp. der Limitkurs entspricht dem Geldkurs)</li>
<li>Routingziel → am besten ist “SMART“</li>
<li>Gültigkeitsdauer → hier ist “DAY“ zu empfehlen</li>
</ul>
<br />
</details><br /></li>
<ul>
<li><details><summary><b>2.1 Interactive Brokers - Wie kaufe ich einen verkauften Put zurück</b></summary>
<br />
<br />
</details><br /></li>
<li><details><summary><b>2.2 Interactive Brokers - Wie rolle ich einen Put weiter</b></summary>
<br />
<br />
</details><br /></li>
<li><details><summary><b>2.3 Interactive Brokers - Grundlagen - Was muss ich beim "Rollen" von Optionen beachten</b></summary>
<br />
<br />
</details><br /></li>
</ul>
<li><details><summary><b>3. Interactive Brokers - Wie verkaufe ich einen Call</b></summary>
<br />
<b>Voraussetzung:</b><br />
Ich besitze die Aktien, die ich jetzt wieder zum Verkauf anbiete.<br />
<br />
Aufruf TWS<br />
→ in der Kopfleiste “Optiontrader“ anklicken<br />
→ Instrument eingeben<br />
→ die Laufzeit aussuchen<br />
→ im linken Bereich befinden sich die dazugehörigen Calls<br />
→ Spalte “Geldkurs“<br />
→ Cursor in der Spalte auf gewünschten Eintrag legen, das Feld wird rot unterlegt<br />
→ ein kleines PopUp mit “Sell Leg“ erscheint<br />
→ den gewünschten Wert anklicken<br />
→ es erscheint die komprimierte Ansicht:<br />
<img src="../TiddlyWiki/pictures/Orderansicht_komprimiert.png" height=59 width=952 /><br /> <!-- height=118 width=1905 -->
→ Cursor in die Zeile “legen“, anklicken<br />
→ RMT, neues Menü erscheint<br />
→ auf Eintrag “Ändern“ gehen<br />
→ Untermenü mit Eintrag “Orderticket“ erscheint<br />
→ diesen Eintrag anklicken<br />
→ ein neues Fenster, das “Orderticket“, erscheint<br />
→ in diesem Fenster folgende Einstellungen überprüfen:<br />
<ul>
<li>das richtige <b><em>Finanzinstrument</em></b> ausgewählt?</li>
<li>die richtige <b><em>Aktion</em></b> ausgewählt? (→ “Verkauf“)</li>
<li>die richtige <b><em>Menge</em></b> angegeben?</li>
<li>im Abschnitt <b><em>Orderbeschreibung</em></b>:
<ul>
<li>“Ordertyp“ : immer LMT angeben</li>
<li>“Limitkurs“ : Kurs in der Nähe vom Geldkurs nehmen <br />
        (für gewöhnlich ist der Vorschlag am besten;<br />
        der Limitkurs sollte über dem Geldkurs liegen (+ 1))</li>
<li>“Routingziel“ : SMART</li>
<li>“Gültigkeitsdauer“ : DAY</li>
</ul></li>
</ul>
→ Button “Vorschau“ anklicken<br />
→ ein neues Fenster erscheint<br />
→ Betrag := Limitkurs * #Kontrakte ( * 100 Aktien )<br />
→ Button “Übermitteln“ anklicken<br />
→ das Feld “Status“ (auf der rechten Fensterseite) ändert seine Farbe<br />
→ im Tab “Offen“ könnte die Order stehen, weil sie im <br />
  Markt noch nicht ausgeführt wurde / werden konnte<br />
→ falls gewünscht, kann der Limitkurs noch (dem Geldkurs) angepasst<br />
  werden,indem auf das Feld vom Limitkurs geklickt wird<br />
→ es erscheint ein "senkrechtes Lineal", das die Marktpreise, den Brief‐<br />
  und den Geldkurs anzeigt.<br />
→ man muss nur noch auf den Geldkurs klicken<br />
→ rechts erscheint ein rotes Feld, “Aktualisieren“<br />
→ durch Anklicken dieses Feldes wird der Geldkurs als Limitkurs über‐<br />
  nommen und die Order ist aktiv im Markt<br />
<br />
</details><br /></li>
<ul>
<li><details><summary><b>3.1 Interactive Brokers - Wie kaufe ich einen verkauften Call zurück</b></summary>
<br />
<ul>
<li>diese Aktion führt dazu, den Call vorzeitig zu schließen;</li>
</ul>
<br />
<ol>
<li>Trader Workstation öffnen;</li>
<li>Zeile mit gewünschten, zurückzukaufenden Call markieren;</li>
<li>RMT, dann erscheint ein neues kleines Fenster:<br />
<img src="../TiddlyWiki/pictures/verkauftenCallzurueckkaufen-01.png" height=272 width=243 /><br /> <!-- height=363 width=324 -->
</li>
<li>den Button “Schließen“ anklicken (“<em>Schließen der Position</em>“)</li>
<li>Es zeigt sich die komprimierte Anzeige:<br />
<img src="../TiddlyWiki/pictures/verkauftenCallzurueckkaufen-02.png" height=32 width=1055 /><br /><!-- height=42 width=1407 -->
</li>
<li>RMT → ein neues Fenster mit Menü öffnet sich;</li>
<li>hier den Menüpunkt “Ändern“ auswählen;</li>
<li>im neu angezeigten Untermenü den Eintrag “Orderticket“ auswählen;<br />
<img src="../TiddlyWiki/pictures/verkauftenCallzurueckkaufen-03.png" height=205 width=338 /><br /><!-- height=273 width=451 -->
</li>
<li>Es öffnet sich das Orderticket‐Fenster:<br />
<img src="../TiddlyWiki/pictures/verkauftenCallzurueckkaufen-04.png" height=370 width=748 /><br /><!-- height=738 width=1496 -->
</li>
<li>Einstellung überprüfen & ggfs. anpassen:<br />
<ul>
<li>Finanzinstrument</li>
<li>Aktion (muß “Kauf“ sein)</li>
<li>Ordertyp: “LMT“</li>
<li>Limitkurs (er orientiert sich am Briefkurs,<br />
    und muß u.U. angepasst werden)</li>
<li>Gültigkeitsdauer: “DAY“<br />
    (dh. die Order verschwindet am Tagesende,<br />
    wenn sie bis dahin nicht ausgeführt wurde)
</li>
</ul>
</li>
<li>Auf den “Vorschau“‐Button klicken und die Ein‐<br />
stellungen nochmal überprüfen<br />
→ auf den Button “Überprüfen“ klicken;
</li>
<li>Der Eintrag wird noch bis zum nächsten Tag angezeigt;</li>
</ol>
<br />
</details><br /></li>
<li><details><summary><b>3.2 Interactive Brokers - Wie rolle ich einen Call weiter</b></summary>
<br />
<br />
</details><br /></li>
</ul>
<li><details><summary><b>4. Interactive Brokers - Wie kaufe ich einen Put</b></summary>
<br />
<br />
</details><br /></li>
<ul>
<li><details><summary><b>4.1 Interactive Brokers - Wie verkaufe ich einen gekauften Put</b></summary>
<br />
<br />
</details><br /></li>
</ul>
<li><details><summary><b>5. Interactive Brokers - Wie kaufe ich einen Call</b></summary>
<br />
<br />
</details><br /></li>
<ul>
<li><details><summary><b>5.1 Interactive Brokers - Wie verkaufe ich einen gekauften Call</b></summary>
<br />
<br />
</details><br /></li>
</ul>
<li><details><summary><b>6. Interactive Brokers - Wie löse ich eine gekaufte Option ein</b></summary>
<br />
<br />
</details><br /></li>
</ul>
</html>
<html>
<ul>
<li><details><summary><b>1. Grundlagen - Mit dem Tausch von EUR-USD auch noch Geld verdienen</b></summary>
<br />
</details><br /></li>
<li><details><summary><b>2. Interactive Brokers - EUR in USD tauschen</b></summary>
<br />
</details><br /></li>
<li><details><summary><b>3. Interactive Brokers - USD in EUR tauschen</b></summary>
<br />
</details><br /></li>
<li><details><summary><b>4. ProRealTime - Währungen mit Rabatt direkt über ProRealTime tauschen</b></summary>
<br />
</details><br /></li>
</ul>
</html>
<html>
<h3>Verkauf einer Put‐Option</h3>
Verkauf einer Put‐Option mit einem Strikgepreis u.U. weit <b>unter</b><br />
dem aktuellen Kurs des Underlyings.<br />
<br />
Ich habe das Underlying <u>nicht</u>, möchte es aber für gewöhnlich<br />
haben, aber zu einem günstigeren Kurs.<br />
<br />
Bsp. AT&T: aktueller Kurs 28 $<br />
→ ich verkaufe eine Put‐Option mit einem Strike‐Preis von 25 $.<br />
<br />
Vllt. gibt es einen AT&T‐Besitzer, der sich gegen einen fallenden<br />
Aktienkurs über die 25 $ hinaus absichern will und diese Put‐Op‐<br />
tion kauft. D.h. dass er bei einem fallenden Kurs über 25 $ auf<br />
jeden Fall diesen Betrag bekommen würde.<br />
<br />
Die Option übt er erst dann aus, wenn der Aktienkurs tatsächlich<br />
unter die 25 $‐Grenze fallen würde. Solange das nicht der Fall ist,<br />
der Kurs der Aktie ist über 25 $, wird er die Option <u>nicht</u> ausüben,<br />
denn auf dem Börsenmarkt bekommt er immer noch mehr als die<br />
25 $, wenn er sie dort verkauft.<br />
<br />
</html>
<html>
Do you find trouble in transferring multibyte binary <br>
data files to Windows and then read through HexEditor?<br>
(Or some such windows based application )<br>
<br>
Try Solaris/HP-UX command /usr/bin/od to generate <br>
octal and hexadecimal Dump!<br>
<br>
-x Interpret words in hex.<br>
<br>
$ od -x Raw_File_Name<br>
<br>
will generate Hex View on stdout.<br>
<br>
For more usage on the command explore "man od".<br>
<br>
This tip generously supported by: <br>
tcs2@ideacellular.com<br>
</html>
<html>
<p>
Triage (vom französischen Verb <em>trier = sortieren</em>) steht u.a. für<br />
die Priorisierung von Verletztengruppen bei Massenunfällen<br />
und Katastrophen.<br />
</p>
<p>
Es bezeichnet ein nicht gesetzlich kodifiziertes oder methodisch<br />
spezifiziertes Verfahren zur Priorisierung medizinischer Hilfe-<br />
leistung, insbesondere bei unerwartet hohem Aufkommen an<br />
Patienten und objektiv unzureichenden Ressourcen. Die auf-<br />
geschobene beziehungsweise abwartende medizinische Hilfe<br />
ist in diesem Fall unvermeidlich. Ohne eine strukturierte Triage<br />
(Einstufung) besteht die Gefahr einer politisch oder ideologisc<br />
motivierten unethischen Selektion.
</p>
<p>
Triage ist ein aus der Militärmedizin herrührender Begriff für die<br /> ‐ ethisch schwierige ‐ Aufgabe, etwa bei einem Massenanfall<br />
von Verletzten oder anderweitig Erkrankten darüber zu entschei-<br />
den, wie die knappen personellen und materiellen Ressourcen<br />
aufzuteilen sind.
</p>
<p>
Strukturierte Triage-Instrumente werden auch in Notaufnahmen<br />
eingesetzt und dort auch als <em><b>Ersteinschätzung</b></em> bezeichnet.
</p>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Triage" target=_blank>Wikipedia</a></li>
</ul
</html>
<html>
<table>
<tr><td><code>
<math mathsize="1.25em">
<mi>sin</mi><mo>(</mo><mi>x</mi><mo>)</mo> <mo linebreak = 'newline' >=</mo>
<msqrt><mrow><mn>1</mn><mo>-</mo><msup><mi>cos</mi><mn>2</mn></msup><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mn> </mrow></msqrt>
<mo linebreak='newline'
linebreakstyle='before'
indentshift='2.6em'>=</mo>
<mfrac>
<mrow>
<mi>tan</mi><mo>(</mo><mi>x</mi><mo>)</mo>
</mrow>
<mrow>
<msqrt><mo>(</mo><mn>1</mn><mo>+</mo>
<msup>
<mrow><mi>tan</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow><mrow><mn>2</mn></mrow>
</msup>
<mo>)</mo>
</msqrt>
</mrow>
</mfrac>
<mo>=</mo>
<mfrac>
<mrow>
<mn>1</mn>
</mrow>
<mrow>
<msqrt>
<mo>(</mo><mn>1</mn><mo>+</mo>
<msup>
<mrow><mi>cot</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow><mn>2</mn>
</msup><mo>)</mo>
</msqrt>
</mrow>
</mfrac>
</math>
</code>
<br />
</td></tr>
<tr><td><code><!-- cos(x) = sqrt(1- sin(x)^2) = 1/sqrt(1+tan(x)^2) = cot(x)/sqrt(1+cot(x)^2) -->
<math mathsize="1.25em">
<mi>cos</mi><mo>(</mo><mi>x</mi><mo>)</mo>
<mo>=</mo>
<msqrt><mn>1</mn> − <msup><mrow>
<mi>sin</mi><mo>(</mo><mi>x</mi><mo>)</mo>
</mrow>
<mn>2</mn>
</msup>
</msqrt>
<mo>=</mo>
<mfrac>
<mrow>
<mn>1</mn>
</mrow>
<mrow>
<msqrt><mn>1</mn>+ <msup><mrow>
<mi>tan</mi><mo>(</mo><mi>x</mi><mo>)</mo>
</mrow>
<mn>2</mn>
</msup>
</msqrt>
</mfrac>
<mo>=</mo>
<mfrac>
<mrow>
<mi>cot</mi><mo>(</mo><mi>x</mi><mo>)</mo>
</mrow>
<mrow>
<msqrt><mn>1</mn> + <msup><mrow>
<mi>cot</mi><mo>(</mo><mi>x</mi><mo>)</mo>
</mrow>
<mn>2</mn>
</msup>
</msqrt>
</mrow>
</mfrac>
</math>
</code>
<br />
</td></tr>
<tr><td><code> <!-- tan(x) = sin(x)/sqrt(1-sin(x)^2) = sqrt(1-cos(x)^2)/cos(x) = 1/cot(x) -->
<math mathsize="1.25em">
<mi>tan</mi><mo>(</mo><mi>x</mi><mo>)</mo>
<mo>=</mo>
<mfrac>
<mrow>
<mi>sin</mi><mo>(</mo><mi>x</mi><mo>)</mo>
</mrow>
<mrow>
<msqrt><mn>1</mn> − <msup><mrow><mi>sin</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow><mn>2</mn></msup></msqrt>
</mrow>
</mfrac>
<mo>=</mo>
<mfrac>
<msqrt><mn>1</mn> − <msup><mrow><mi>cos</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow><mn>2</mn></msup></msqrt>
<mrow><mi>cos</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow>
</mfrac>
<mo>=</mo>
<mfrac>
<mn>1</mn>
<mrow>
<mi>cot</mi><mo>(</mo><mi>x</mi><mo>)</mo>
</mrow>
</mfrac>
</math>
</code>
<br />
</td></tr>
<tr><td><code> <!-- cot(x) = sqrt(1-sin(x)^2)/sin(x) = cos(x)/sqrt(1-cos(x)^2) = 1/tan(x) -->
<math mathsize="1.25em">
<mi>cot</mi><mo>(</mo><mi>x</mi><mo>)</mo>
<mo>=</mo>
<mfrac>
<mrow><msqrt><mn>1</mn><mo>−</mo><msup><mrow><mi>sinus</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow><mn>2</mn></msup></msqrt></mrow>
<mrow><mi>sin</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow>
</mfrac>
<mo>=</mo>
<mfrac>
<mrow><mi>cos</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow>
<mrow><msqrt><mn>1</mn><mo>−</mo><msup><mrow><mi>cos</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow><mn>2</mn></msup></msqrt></mrow>
</mfrac>
<mo>=</mo>
<mfrac>
<mn>1</mn>
<mrow><mi>tan</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow>
</mfrac>
</math>
</code>
<br />
</td></tr>
</table>
<code><pre>
sin(x)^2 + cos(x)^2 = 1<br />
sec(x)^2 - tan(x)^2 = 1<br />
csc(x)^2 - cot(x)^2 = 1<br />
sin(x)*csc(x) = 1<br />
cos(x)*sec(x) = 1<br />
tan(x)*cot(x) = 1<br />
tan(x) = sin(x)/cos(x)<br />
cot(x) = cos(x)/sin(x)<br />
<br />
sin(x+y) = sin(x)*cos(y) + cos(x)*sin(y)<br />
sin(x-y) = sin(x)*cos(y) - cos(x)*sin(y)<br />
cos(x+y) = cos(x)*cos(y) - sin(x)*sin(y)<br />
cos(x-y) = cos(x)*cos(y) + sin(x)*sin(y)<br />
tan(x+y) = (tan(x)+tan(y))/(1-tan(x)*tan(y))<br />
tan(x-y) = (tan(x)-tan(y))/(1+tan(x)*tan(y))<br />
cot(x+y) = (cot(x)*cot(y) - 1)/(cot(y)+cot(x))<br />
cot(x-y) = (cot(x)*cot(y) + 1)/(cot(y)-cot(x))<br />
<br />
sin(x+y+z) = sin(x)*cos(y)*cos(z) + cos(x)*sin(y)*cos(z) + cos(x)*cos(y)*sin(z) - sin(x)*sin(y)*sin(z)<br />
cos(x+y+z) = cos(x)*cos(y)*cos(z) - sin(x)*sin(y)*cos(z) - sin(x)*cos(y)*sin(z) - cos(x)*sin(y)*sin(z)<br />
<br />
sin(2x) = 2*cos(x)*sin(x)<br />
cos(2x) = cos(x)^2 - sin(x)^2<br />
sin(3x) = 3*sin(x) - 4*sin(x)^3<br />
cos(3x) = 4*cos(x)^3 - 3*cos(x)<br />
sin(4x) = 8*cos(x)^3*sin(x) - 4*cos(x)*sin(x)<br />
cos(4x) = 8*cos(x)^4 - 8*cos(x)^2 + 1<br />
<br />
sin(nx) = n*cos(x)^(n-1)*sin(x) - BK(n,3)*cos(x)^(n-3)*sin(x)^3 + BK(n,5)*cos(x)^(n-5)*sin(x)^5 - ...<br />
cos(nx) = cos(x)^n - BK(n,2)*cos(x)^(n-2)*sin(x)^2 + BK(n,4)*cos(x)^(n-4)*sin(x)^4 - ...<br />
wobei "BK(n, ...)" für den <b>Binomialkoeffizienten</b> steht<br />
<br />
tan(2x) = 2*tan(x)/(1-tan(x)^2)<br />
cot(2x) = (cot(x)^2-1)/(2*cot(x))<br />
tan(3x) = (3*tan(x) - tan(x)^3)/(1-3*tan(x)^2)<br />
cot(3x) = (cot(x)^3-3*cot(x))/(3*cot(x)^2-1)<br />
tan(4x) = (4*tan(x)-4*tan(x)^3)/(1-6*tan(x)^2+tan(x)^4)<br />
cot(4x) = (cot(x)^4-6*cot(x)^2+1)/(4*cot(x)^3-4*cot(x))<br />
<br />
sin(x/2) = sqrt((1-cos(x))/2)<br />
cos(x/2) = sqrt((1+cos(x))/2)<br />
tan(x/2) = sqrt((1-cos(x))/(1+cos(x)) = (1-cos(x))/sin(x) = sin(x)/(1+cos(x))<br />
cot(x/2) = sqrt((1+cos(x))/(1-cos(x)) = (1+cos(x))/sin(x) = sin(x)/(1-cos(x))<br />
<br />
sin(x)+sin(y) = 2*sin((x+y)/2)*cos((x-y)/2)<br />
sin(x)-sin(y) = 2*cos((x+y)/2)*sin((x-y)/2)<br />
cos(x)+cos(y) = 2*cos((x+y)/2)*cos((x-y)/2)<br />
cos(x)-cos(y) = -2*sin((x+y)/2)*sin((x-y)/2)<br />
tan(x)+tan(y) = sin(x+y)/(cos(x)*cos(y))<br />
tan(x)-tan(y) = sin(x-y)/(cos(x)*cos(y))<br />
cot(x)+cot(y) = sin(x+y)/(sin(x)*sin(y))<br />
cot(x)-cot(y) = sin(x-y)/(sin(x)*sin(y))<br />
<br />
sin(x)*sin(y) = (cos(x-y)-cos(x+y))/2<br />
cos(x)*cos(y) = (cos(x-y)+cos(x+y))/2<br />
sin(x)*cos(y) = (sin(x-y)+sin(x+y))/2<br />
sin(x)*sin(y)*sin(z) = (sin(x+y-z)+sin(-x+y+z)+sin(x-y+z)-sin(x+y+z))/4<br />
sin(x)*sin(y)*cos(z) = (-cos(x+y-z)+cos(-x+y+z)+cos(x-y+z)-cos(x+y+z))/4<br />
sin(x)*cos(y)*cos(z) = (sin(x+y-z)-sin(-x+y+z)+sin(x-y+z)+sin(x+y+z))/4<br />
cos(x)*cos(y)*cos(z) = (cos(x+y-z)+cos(-x+y+z)+cos(x-y+z)+cos(x+y+z))/4<br />
sin(x)^2 = (1 - cos(2*x))/2<br />
sin(x)^3 = (3*sin(x) - sin(3*x))/4<br />
sin(x)^4 = (cos(4*x) - 4*cos(2*x) + 3)/8<br />
cos(x)^2 = (1 + cos(2*x))/2<br />
cos(x)^3 = (cos(3*x) + 3*cos(x))/4<br />
cos(x)^4 = (cos(4*x) + 4*cos(2*x) + 3)/8<br />
sin(x)^2*cos(x) = cos(x) - cos(x)^3<br />
sin(x)*cos(x)^2 = sin(x) - sin(x)^3<br />
sin(x)^2*cos(x)^2 = cos(x)^2 - cos(x)^4<br />
</pre></code>
<br />
© Arndt Bruenner 1. 11. 2006<br />
Version: 1. 11. 2006<br />
<br />
<h3>Link: </h3>
<ul>
<li><a href="http://arndt-bruenner.de/mathe/Allgemein/trigsimpl.htm" target="_blank">Arndt Brünner :: Trigonometrische Zusammenhänge, Vereinfachungen, Formeln</a></li>
<li><a href="https://matheguru.com/allgemein/formelsammlung-trigonometrie.html" target="_blank>MatheGuru :: Formelsammlung Trigonometrie</a></li>
<li><a href="http://elsenaju.info/Rechnen/Trigonometrie-Tabellen.htm" target="_blank">Jürgen Brandes :: Zusammenhänge trigonometrischer Funktionen. Reduktionsformeln, Additionstheoreme, Summe, Differenz, Produkte und Potenzen trigonometrischer Funktionen</li>
</ul>
</html>
Various unix processes can
produce fast growing logs that
sometimes need to be trimmed
instead of deleted, for reference
or troubleshooting. And you
likely have no desire to edit the
files. Here is a handy ksh
script that will quickly trim
the log so it keeps recent
information and lets you keep as
many lines as you think you might
need. I call it trimlog:
#! /bin/sh
# trimlog
filesize=`cat $1|wc -l`
trim=`expr $filesize - $2`
if [ $trim -gt 0 ]
then
sed "1,$trim d" $1 > /tmp/$1
mv /tmp/$1 $1
echo $1 trimmed by $trim lines
fi
Use it by feeding in the name of
the log you want to trim followed
by the number of lines you want to
keep:
# trimlog oracle_listener.log 10000
Of course you can't use it in
the /tmp directory. There are
probably newer and more efficient
ways to do this, but this works.
<html>
On Tru64 Unix (at least on 4.0F), some non-root-user <br />
drop an error message on the root's Mail account <br />
when cronjobs used:<br />
<br />
su - foo -c /usr/bin/bar<br />
<br />
Even some Compaq technicians could<br />
not tell that this results from<br />
terminal settings in the .profile,<br />
which are invalid on non-interactive<br />
terminals. The error messages<br />
(2 in fact) looks like this:<br />
<br />
stty: tcgetattr: not a typewriter<br />
Not a terminal.<br />
<br />
The solution is to wrap commands<br />
like "stty dec" and "tset -I -Q"<br />
with a check on terminal capabilities:<br />
<br />
if tty -s<br />
then<br />
stty dec<br />
tset -I -Q<br />
fi<br />
<br />
This tip generously supported <br />
by: nils@poppendiek.de<br />
</html>
I use this script in
tru64 unix -Alpha
servers to send jobs to
all printers.
#!/bin/ksh
# this script is sending
# the required printing
# job to all printers
# already configured in
# your system,
cat /etc/printcap|grep "|" |cut -f 1 -d "|" | while read line anything
do
echo " sending file $1 to printer $line "
echo " lpr -P$line " $1
sleep 1
echo " to stop printing, press ctrl+c"
clear
lpr -P$line $1
done
This tip generously supported
by: shadia@dohms.gov.ae
<html>
To check the system calls and signals coming into<br>
and going out of a process use <b>/usr/bin/truss</b><br>
<br>
Syntax: <br><code>
truss pid <br>
</code><br>
This tip generously supported <br>
by: bareddy_sm@yahoo.com
</html>
<html>
<ul>
<li>dt., Lehnübertragung : Tippfehlerdomain</li>
<li>eine Form von Cybersquatting;</li>
<li>beruht darauf, daß eine Person eine URI in einem<br />
Webbrowser versehentlich falsch eintippt und dann<br />
auf eine alternative Seite geführt wird, die dem Ty‐<br />
posquatter gehört</li>
<!--
<li></li>
<li></li>
<li></li>
-->
</ul>
</html>
<html>
<ul>
<li>der "gesamte" Client ist gestoppt, deaktiviert;<br />
erkennbar daran, dass das Icon ein kleiner roter Kreis mit einem weissen Punkt darin ist</li>
<br />
<li>"System Overview" → "Clients" <br />
→ hier den Status von "Stop" auf "Go" setzen:<br />
Zeile markieren → RMT drücken → "Go" auswählen</li>
</ul>
</html>
<html>
<ul>
<li>Mit dem Namen “Betsy Ross“ wird die erste offizielle Flagge der<br />
USA bezeichnet (13 Sterne, 13 Streifen).</li>
<li>Angeblich tauchte 1776 George Washington beim Schneider‐Ehepaar<br />
Elisabeth und John Ross auf, um diese Flagge in Auftrag zu geben.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Betsy_Ross" target="_blank" rel="noreferrer noopener">Wikipedia :: Betsy Ross</a></li>
</ul>
</html>
<html>
<!--
<head>
<title>USB‐Anschluss: Das bedeuten die verschiedenen Farben</title>
</head>
-->
<body>
<!--
<h1>USB‐Anschluss: Das bedeuten die verschiedenen Farben?</h1>
-->
Ein USB‐Anschluss kann verschiedene Farben haben. Generell gibt es blaue,<br />
gelbe, schwarze, orange und rote Anschlüsse.<br />
<br />
Die verschiedenen Farben bei einem USB‐Anschluss geben an, welche Lade‐<br />
und Übertragungsgeschwindigkeiten dieser unterstützt.<br />
<ul>
<li><b>Schwarz:</b><br />
Schwarze USB‐Anschlüsse stehen für die USB 2.0 Standardanschlüsse.<br />
Hieran können Sie bedenkenlos alle USB‐Geräte anschließen (Maus,<br />
Tastatur, alte USB‐Sticks). Beachten Sie aber, dass USB 3.0 kompa‐<br />
tible Geräte die volle Geschwindigkeit nicht ausnutzen können! <br />
Maximal sind mit USB 2.0 480 Mbit/s drin.<br />
</li>
<li><b>Blau:</b><br />
Bei einem blauen USB‐Anschluss handelt es sich um einen USB 3.0<br />
Port. Damit sind Geschwindigkeiten von bis zu 5 Gbit/s möglich.<br />
Damit Sie die volle Übertragungsgeschwindigkeit ausnutzen können,<br />
sollten Sie unbedingt Geräte, die USB 3.0 kompatibel sind (externe<br />
Festplatte, USB‐Stick), an diesen Port anschließen.<br />
</li>
<li><b>Gelb:</b><br />
Solche USB‐Anschlüsse verfügen über eine permanente Stromversor‐<br />
gung, selbst wenn Ihr PC oder Laptop ausgeschaltet ist. Dieser Port<br />
kann also auch als Ladestation für Smartphone dienen. Eine allgemeine<br />
Aussage über die Geschwindigkeit des USB‐Anschlusses lässt sich nicht<br />
treffen. Hier müssen Sie im jeweiligen Handbuch nachschauen, welcher<br />
USB‐Standard unterstützt wird.<br />
</li>
<li><b>Rot/Orange:</b><br />
Auch bei roten oder orangenen Anschlüssen kann es sich teilweise um<br />
einen USB 2.0‐Anschluss oder um einen 3.0‐Anschluss handeln. Es kann<br />
deshalb durchaus der Fall sein, dass bestimmte Hersteller sich nicht<br />
ganz an die "Regel" der unterschiedlichen Farben für USB‐Anschlüsse<br />
halten. So sind beispielsweise bestimmte ASUS‐Boards mit schwarzen<br />
und roten Ports ausgestattet, obwohl alle USB‐Anschlüsse nur USB 2.0<br />
kompatibel sind. Lesen Sie im Zweifel im Handbuch nach.<br />
</li>
<li><b>Blaugrün:</b><br />
Dieser Anschluss ist aufgrund von USB Type C nur wenig verbreitet und<br />
gibt an, dass USB 3.1 unterstützt wird. Damit sind Geschwindigkeiten<br />
von bis zu 10 Gbit/s möglich. Alle Unterschiede zwischen USB 3.1 und<br />
3.0 haben wir Ihnen in einem anderen Artikel erklärt.<br />
</li>
</ul>
Die USB‐Anschlüsse sind jedoch nicht immer einheitlich markiert. Manchmal<br />
verzichten Hersteller auf die Farben und markieren die verschiedenen USB‐<br />
Ports mit Symbolen. Im Zweifel sollte man also im Handbuch nachschauen, um<br />
welchen USB‐Anschluss es sich handelt. <br />
<h3>Links:</h3>
<ul>
<li><a href="https://praxistipps.chip.de/usb-anschluss-das-bedeuten-die-verschiedenen-farben_27764"
target="_blank" rel="noreferrer noopener">
CHIPS.de :: USB‐Anschluss ‐ Was bedeuten die verschiedenen Farben?</a>
</li>
</ul>
</body>
</html>
<html>
<h3>Rückengymnastik: 12 Übungen für einen gesunden Rücken</h3>
<ol>
<li><h4>Vierfüsslerstand</h4>
<img src="./pictures/rueckengymnastik_vierfuesslerstand.png" height=228 width=545 />
<details><summary></summary><br />
Für die erste Rückenübung begeben Sie sich in einen Vierfüßerstand: Dabei sind die Arme gestreckt und berühren senkrecht unter den Schultern den Boden ‐ die Knie stehen unter den Hüften. Strecken Sie nun das linke Bein nach hinten und den rechten Arm nach vorne aus. Beachten Sie folgende Tipps:
<ul>
<li>Arm und Bein sollten eine Linie mit dem Rumpf bilden.
</li>
<li>Halten Sie den Oberkörper parallel zum Boden und verdrehen Sie ihn nicht.
</li>
<li>Vermeiden Sie ein Hohlkreuz, spannen Sie die Bauchmuskulatur an.
</li>
<li>Richten Sie den Blick auf den Boden.
</ul>
Halten Sie diese Position für 10 bis 15 Sekunden und wechseln Sie dann die Seite. Führen Sie die Übung insgesamt fünfmal pro Seite durch.<br />
<br />
Alternative: Strecken Sie im Vierfüßerstand das linke Bein und den rechten Arm aus. Führen Sie anschließend den rechten Ellenbogen und das linke Knie unter dem Körper zusammen, sodass sich diese leicht berühren. Anschließend strecken Sie Arm und Bein wieder aus.<br />
<br />
Wiederholen Sie diese Bewegung fünfmal und wechseln Sie dann die Seite. Führen Sie insgesamt drei Serien durch.<br />
<br />
</details>
</li>
<li><h4>Rumpfheber</h4>
<img src="./pictures/rueckengymnastik-rumpfheber.png" height=239 width=596 />
<details><summary></summary><br />
Die Rückenübung "Rumpfheber" erfolgt in Bauchlage. So geht's:<br />
<br />
<ul>
<li>Legen Sie sich flach auf den Boden und spannen Sie Bauch, Rücken und Po an.
</li>
<li>Die Arme sind nach vorne ausgestreckt, die Fußspitzen aufgestellt.
</li>
<li>Heben Sie nun den Oberkörper leicht an, der Blickt bleibt dabei auf den Boden gerichtet.
</li>
</ul>
<br />
Halten Sie diese Position für mindestens 10 bis 15 Sekunden und legen Sie den Oberkörper anschließend wieder ab. Führen Sie die Übung insgesamt sechsmal durch.<br />
<br />
Alternative: Anstatt die Arme ruhig in der Luft zu halten, können Sie diese auch leicht in der Luft pendeln lassen: Bewegen Sie dazu im schnellen Wechsel den rechten Arm kurz nach oben, den linken Arm kurz nach unten und umgekehrt.<br />
<br />
</details>
</li>
<li><h4>Rumpfheber (Alternative)</h4>
<img src="./pictures/rueckengymnastik_rumpfheber-alternative.png"
height=204 width=515 /><!-- height=242 width=610 -->
<details><summary></summary><br />
Eine weitere alternative Variante des Rumpfheber ist diese Übung:<br />
<ul>
<li>Legen Sie sich auf den Bauch und öffnen Sie die Beine leicht.
</li>
<li>Die Arme liegen neben dem Oberkörper, die Handflächen zeigen nach oben.
</li>
<li>Spannen Sie Bauch, Rücken und Po an und heben Sie die Beine und den Oberkörper leicht vom Boden ab.
</li>
<li>Achten Sie darauf, dass Sie den Kopf nicht überstrecken, sondern dieser in Verlängerung der Wirbelsäule bleibt.
</li>
</ul>
Halten Sie diese Position für 10 bis 15 Sekunden. Führen Sie die Übung insgesamt sechsmal durch.<br />
<br />
</details>
</li>
<li><h4>Rückenschaukel</h4>
<img src="./pictures/rueckengymnastik_rueckenschaukel.png"
height=204 width=305 /> <!-- height=407 width=610 -->
<details><summary></summary><br />
Die Rückenschaukel ist eine klassische Übung der Rückengymnastik:<br />
<ul>
<li>Legen Sie sich auf den Boden und achten Sie darauf, dass der Rücken flach aufliegt und Sie kein Hohlkreuz machen. Pressen Sie die Wirbelsäule aber auch nicht auf die Matte.
</li>
<li>Winkeln Sie Beine an, sodass zwischen Ober- und Unterschenkel ein 90-Grad-Winkel entsteht.
</li>
<li>Umfassen Sie die Schienbeine anschließend mit den Armen und ziehen Sie die Beine zum Körper heran.
</li>
<li>Heben Sie nun den Kopf und die Schultern leicht vom Boden ab und schaukeln Sie langsam etwa 15-mal vor und zurück.
</li>
</ul>
Führen Sie die Übung insgesamt dreimal durch.
<br />
</details>
</li>
<li><h4>Brücke</h4>
<img src="./pictures/rueckengymnastik_bruecke.png"
height=204 width=305 /><!-- height=407 width=610 -->
<details><summary></summary><br />
Die "Brücke" wird ebenfalls in Rückenlage ausgeführt. Bei der Rückenübung gehen Sie folgendermaßen vor:
<ul>
<li>Legen Sie sich auf den Rücken und stellen Sie beide Beine auf.
</li>
<li>Die Arme liegen neben dem Körper, die Handflächen zeigen nach unten.
</li>
<li>Heben Sie nun das Becken an und achten Sie darauf, dass Ihr Körper (Schulter, Becken und Knie) eine gerade Linie bildet.
</li>
</ul>
Halten Sie diese Position für etwa 10 bis 15 Sekunden und senken Sie dann das Becken langsam wieder ab. Führen Sie die Übung insgesamt sechsmal durch.<br />
<br />
Alternative: Wenn Ihnen das zu einfach ist, heben Sie zusätzlich im Wechsel das linke und das rechte Bein an und strecken Sie es nach vorne aus. Auch hier ist es wichtig, dass das Bein eine gerade Linie mit dem übrigen Körper bildet.<br />
<br />
</details>
</li>
<li><h4>Schulterpartie kräftigen</h4>
<img src="./pictures/rueckengymnastik_schultern-kraeftigen.png"
height=207 width=313 /> <!-- height=414 width=616 -->
<details><summary></summary><br />
Diese Rückenübung dient der Stärkung der Schulterpartie:
<ul>
<li>Stellen Sie sich gerade hin und öffnen Sie Ihre Beine schulterbreit.
</li>
<li>Heben Sie nun die Arme seitlich nach oben und winkeln Sie den Unterarm so an, dass ein 90-Grad-Winkel entsteht. Achten Sie dabei darauf, dass sich die Ellenbogen auf Schulterhöhe befinden.
</li>
<li>Strecken Sie nun die Arme senkrecht nach oben, der Nacken bleibt dabei gerade und der Blick geht geradeaus.
</li>
<li>Führen Sie die Hände anschließend wieder in die Ausgangsposition zurück.
</li>
</ul>
Achten Sie darauf, die Übung langsam und kraftvoll auszuführen. Wiederholen Sie die Übung zehnmal und führen Sie nach einer kurzen Pause zwei weitere Serien durch.
Alternative: Ist Ihnen die Übung an sich zu einfach, können Sie kleine Hanteln oder Wasserflaschen hinzunehmen.
<br />
</details>
</li>
<li><h4>Rücken entspannen</h4>
<img src="./pictures/rueckengymnastik_ruecken-entspannen.png"
height=205 width=306 /><!-- height=410 width=611 -->
<details><summary></summary><br />
Für diese Übung gehen Sie in den Vierfüßerstand:
<ul>
<li>Die Arme sind gestreckt und berühren senkrecht unter den Schultern den Boden, die Knie stehen unter den Hüften.
</li>
<li>Atmen Sie ruhig und tief ein und wieder aus. Bewegen Sie beim Ausatmen den Oberkörper langsam nach hinten und setzen Sie sich mit dem Gesäß auf die Fersen.
</li>
<li>Die Hände bleiben dabei in der Ausgangsposition, sodass die Arme gestreckt und der Rücken gedehnt werden. Der Blick ist nach unten gerichtet.
</li>
<li>Kehren Sie beim Einatmen wieder in den Vierfüßerstand zurück.
</li>
</ul>
Führen Sie die Übung insgesamt fünfmal durch.
<br />
</details>
</li>
<li><h4>Brustdehner</h4>
<img src="./pictures/rueckengymnastik_brustdehner.png"
height=204 width=305 /><!-- height=407 width=610 -->
<details><summary></summary><br />
Diese Dehnübung wird im Stehen ausgeführt:
<ul>
<li>Stellen Sie sich aufrecht hin und öffnen Sie die Beine schulterbreit.
</li>
<li>Nehmen Sie die Arme zur Seite, drehen Sie die Handflächen zur Decke und winkeln Sie die Arme leicht an.
</li>
<li>Führen Sie die Arme nun langsam nach oben, bis sich die Handflächen ungefähr auf Höhe der Schultern befinden.
</li>
<li>Federn Sie nun mit den Armen leicht zurück, bis Sie einen Dehnungsreiz verspüren.
</li>
</ul>
Halten Sie diese Position für 10 bis 15 Sekunden. Lockern Sie danach kurz die Muskulatur und führen Sie die Übung noch fünfmal durch.
<br />
</details>
</li>
<li><h4>Crunches</h4>
<img src="./pictures/rueckengymnastik_sit-ups.png"
height=204 width=305 /><!-- height=407 width=610 -->
<details><summary></summary><br />
Crunches, eng verwandt mit den Sit-ups, trainieren zwar in erster Linie nicht die Rücken-, sondern die gerade Bauchmuskulatur ‐ doch diese stellt ein wichtiges Gegengewicht zur Rückenmuskulatur dar. Deshalb sollte bei Rückenproblemen auch das Bauchmuskeltraining nicht vernachlässigt werden.
<ul>
<li>Legen Sie sich mit dem Rücken auf den Boden und stellen Sie die Füße auf, damit der untere Rücken nicht ins Hohlkreuz geht.
</li>
<li>Verschränken Sie die Arme hinter dem Kopf und heben Sie Kopf und Oberkörper leicht an. Der Blick bleibt dabei zur Decke gerichtet.
</li>
<li>Achten Sie darauf, Ihren Kopf mit den Händen nur leicht zu unterstützen und nicht nach oben zu ziehen.
</li>
</ul>
Wiederholen Sie die Übung zehnmal. Führen Sie nach einer kurzen Pause zwei weitere Serien durch.
<br />
</details>
</li>
<li><h4>Wirbelsäule dehnen</h4>
<img src="./pictures/rueckengymnastik_wirbelsaeule-dehnen.png"
height=204 width=305 /><!-- height=407 width=610 -->
<details><summary></summary><br />
Für diese Dehnübung für den Rücken können Sie liegen bleiben:
<ul>
<li>Legen Sie sich mit dem Rücken auf den Boden, stellen Sie die Beine auf und legen Sie die Arme im rechten Winkel zum Körper ab.
</li>
<li>Kippen Sie nun beide Knie zur rechten Seite, der Kopf wird nach links gedreht.
</li>
<li>Achten Sie dabei darauf, dass der Rücken auf dem Boden liegen bleibt.
</li>
<li>Halten Sie diese Position für 10 Sekunden und kippen Sie dann die Beine auf die linke Seite. Der Blick geht nun nach rechts.
</li>
</ul>
Führen Sie die Übung insgesamt fünfmal pro Seite durch.
<br />
</details>
</li>
<li><h4>Seitstütz</h4>
<img src="./pictures/rueckengymnastik_seitstuetz.png"
height=204 width=305 /><!-- height=407 width=610 -->
<details><summary></summary><br />
Der Seitstütz ist zu Beginn vielleicht etwas anstrengender:
<ul>
<li>Legen Sie sich auf die rechte Seite und stützen Sie sich mit dem rechten Unterarm ab.
</li>
<li>Strecken Sie die Beine übereinander aus und heben Sie die Hüfte an. Die linke Hand legen Sie an die Hüfte.
</li>
<li>Achten Sie bei der Übungsausführung darauf, dass Beine und Rumpf eine Linie bilden.
</li>
</ul>
Halten Sie die Position für 10 bis 15 Sekunden und wechseln Sie dann die Seite. Führen Sie die Übung insgesamt fünfmal pro Seite durch.
<br />
</details>
</li>
<li><h4>Katzenbuckel</h4>
<img src="./pictures/rueckengymnastik_katzenbuckel.png"
height=204 width=305 /><!-- height=407 width=610 -->
<details><summary></summary><br />
Ein Klassiker unter den Rückenübungen ist der Katzenbuckel:
<ul>
<li>Gehen Sie in den Vierfüßerstand: Die Arme sind gestreckt und berühren senkrecht unter den Schultern den Boden, die Knie stehen unter den Hüften.
</li>
<li>Drücken Sie nun den Brustkorb nach unten und nehmen Sie den Kopf leicht in den Nacken (Hohlkreuz). Halten Sie diese Position kurz.
</li>
<li>Rollen Sie anschließend den Rücken nach oben und beugen das Kinn in Richtung Brust (Buckel).
</li>
</ul>
Halten Sie auch diese Position einige Sekunden. Führen Sie die Übung insgesamt zehnmal durch.
<br />
</details>
</li>
</ol>
<hr>
<hr>
<h3>So kannst du einem Witwenbuckel vorbeugen</h3>
Wenn du einen sitzenden Beruf ausübst, solltest du in erster Linie<br />
auf einen ergonomischen Arbeitsplatz achten. <br />
<br />
Achte auch in deiner Freizeit darauf, dich regelmäßig zu bewegen.<br />
Ein Yoga‐ oder Pilateskurs können beispielsweise die Rückenge‐<br />
sundheit fördern.<br />
<br />
Bei extremen Fällen helfen Physiotherapie und Massagen gegen<br />
den Witwenbuckel.<br />
<h3>Übungen gegen den Witwenbuckel</h3>
<ul>
<li>Stelle dich locker hin und öffne deine Arme, als willst du jeman‐<br />
den umarmen. Schiebe sie dann etwas nach hinten, bis du eine<br />
Spannung in den Schulterblättern spürst. Halte diese Position 30<br />
Sekunden lang.<br />
</li>
<li>Lege deine Oberarme eng an den Körper und ziehe dann deine<br />
Unterarme so weit nach oben wie möglich. Dabei entsteht eine<br />
Art W. Achte darauf, dass dein Kopf gerade ist. Diese Übung<br />
30 Sekunden halten.<br />
</li>
<li>Verschrenke deine Hände hinter dem Rücken und ziehe sie<br />
dann so weit wie möglich nach unten und hinten, bis du eine<br />
Spannung zwischen den Schultern spürst. Halte diese Position<br />
30 Sekunden.<br />
</li>
<li>Setze dich mit angewinkelten Beinen gerade hin. Greife mit<br />
beiden Händen an den Hinterkopf und drücke die Ellenbogen<br />
langsam nach vorne zu deinem Kinn. Achte darauf, dass dein<br />
Rücken gerade bleibt. Halte die Position 30 Sekunden.<br />
</li>
<li>Fitnesstrainer Dima Kreis empfiehlt unter anderem folgende<br />
Übung: Knie dich gerade vor einem Stuhl nieder und lege deine<br />
Ellenbogen darauf ab. Greife an deinen Hinterkopf und ziehe<br />
dann deinen Körper nach hinten, dabei ziehst du auch deinen<br />
Kopf nach hinten.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.fitforfun.de/news/hast-du-auch-einen-witwenbuckel-effektive-uebungen-fuer-eine-bessere-haltung-514600.html"
target="_blank" rel="noreferrer noopener">
Fit for fun :: Effektive Übungen für eine bessere Haltung</a>
</li>
<li><a href="https://www.gesundheit.de/fitness/fitness-uebungen/rueckenuebungen/galerie-rueckenuebungen"
target="_blank" rel="noreferrer noopener">
gesundheit.de :: Rückengymnastik: 12 Übungen fü einen gesunden Rücken </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
<br /><br /><br /><br />
</html>
<html>
A port is nothing but an endpoint of communication used in computer networks. You have physical or wireless connections at the hardware level. At software or operating system level a port act as a logical construct that acts as communication port of network service such as SSH, HTTPD and more. TCP and UDP are the most common port. TCP is an acronym for Transmission Control Protocol. UDP is an acronym for User Datagram Protocol. See the several difference between UDP and TCP internet protocols here. This page shows Linux commands to find out which process is listing upon a TCP or UDP port.
<h3>Linux Find Out Which Process Is Listening Upon a Port</h3>
You can the following programs to find out about port numbers and its associated process:
<ol>
<li><b>netstat command or ss command</b> ‐ a command-line tool that displays network connections, routing tables, and a number of network interface statistics.</li>
<li><b>fuser command</b> ‐ a command line tool to identify processes using files or sockets.</li>
<li><b>lsof command</b> ‐ a command line tool to list open files under Linux / UNIX to report a list of all open files and the processes that opened them.
<li><b>/proc/$pid/ file system</b> ‐ Under Linux /proc includes a directory for each running process (including kernel processes) at /proc/PID, containing information about that process, notably including the processes name that opened port.</li>
</ol>
You must run above command(s) as the root user.
Linux netstat command find out which process is listing upon a port
Type the following command:
# netstat -tulpn
Sample outputs:
<code><pre>
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 1138/mysqld
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 850/portmap
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1607/apache2
tcp 0 0 0.0.0.0:55091 0.0.0.0:* LISTEN 910/rpc.statd
tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN 1467/dnsmasq
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 992/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1565/cupsd
tcp 0 0 0.0.0.0:7000 0.0.0.0:* LISTEN 3813/transmission
tcp6 0 0 :::22 :::* LISTEN 992/sshd
tcp6 0 0 ::1:631 :::* LISTEN 1565/cupsd
tcp6 0 0 :::7000 :::* LISTEN 3813/transmission
udp 0 0 0.0.0.0:111 0.0.0.0:* 850/portmap
udp 0 0 0.0.0.0:662 0.0.0.0:* 910/rpc.statd
udp 0 0 192.168.122.1:53 0.0.0.0:* 1467/dnsmasq
udp 0 0 0.0.0.0:67 0.0.0.0:* 1467/dnsmasq
udp 0 0 0.0.0.0:68 0.0.0.0:* 3697/dhclient
udp 0 0 0.0.0.0:7000 0.0.0.0:* 3813/transmission
udp 0 0 0.0.0.0:54746 0.0.0.0:* 910/rpc.statd
</pre></code>
TCP port 3306 was opened by mysqld process having PID # 1138. You can verify this using /proc, enter:
# ls -l /proc/1138/exe
Sample outputs:
lrwxrwxrwx 1 root root 0 2010-10-29 10:20 /proc/1138/exe -> /usr/sbin/mysqld
You can use grep command or egrep command to filter out information:
# netstat -tulpn | grep :80
Sample outputs:
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1607/apache2
<h3>A note about ss command</h3>
Some Linux distro considered the nestat command as deprecated and therefore should be phased out in favor of more modern replacements such as ss command. The syntax is:
$ sudo ss -tulpn
$ sudo ss -tulpn | grep :3306
Linux Find Out Which Process Is Listening Upon a Port
Click to enlarge image
Video demo
<h3>fuser command</h3>
Find out the processes PID that opened tcp port 7000, enter:
<code><pre>
# fuser 7000/tcp
</pre></code>
Sample outputs:
<code><pre>
7000/tcp: 3813
</pre></code>
Finally, find out process name associated with PID # 3813, enter:
<code><pre>
# ls -l /proc/3813/exe
</pre></code>
Sample outputs:
<code><pre>
lrwxrwxrwx 1 vivek vivek 0 2010-10-29 11:00 /proc/3813/exe -> /usr/bin/transmission
</pre></code>
/usr/bin/transmission is a bittorrent client, enter:
# man transmission
</pre></code>
OR
# whatis transmission
</pre></code>
Sample outputs:
<code><pre>
transmission (1) - a bittorrent client
</pre></code>
<h3>Find Out Current Working Directory Of a Process</h3>
To find out current working directory of a process called bittorrent or pid 3813, enter:
<code><pre>
# ls -l /proc/3813/cwd
</pre></code>
Sample outputs:
<code><pre>
lrwxrwxrwx 1 vivek vivek 0 2010-10-29 12:04 /proc/3813/cwd -> /home/vivek
</pre></code>
OR use pwdx command, enter:
<code><pre>
# pwdx 3813
</pre></code>
Sample outputs:
<code><pre>
3813: /home/vivek
</pre></code>
<h3>Find Out Owner Of a Process on Linux</h3>
Use the following command to find out the owner of a process PID called 3813:
<pre><code># ps aux | grep 3813</code></pre>
OR
<pre><code># ps aux | grep '[3]813'</code></pre>
Sample outputs:
<pre><code>vivek 3813 1.9 0.3 188372 26628 ? Sl 10:58 2:27 transmission</code></pre>
OR try the following ps command:
<pre><code># ps -eo pid,user,group,args,etime,lstart | grep '[3]813'</code></pre>
Sample outputs:
<pre><code>3813 vivek vivek transmission 02:44:05 Fri Oct 29 10:58:40 2010</code></pre>
Another option is /proc/$PID/environ, enter:
<pre><code># cat /proc/3813/environ</code></pre>
OR
<pre><code># grep --color -w -a USER /proc/3813/environ</code></pre>
Sample outputs (note ‐colour option):<br />
<img src=./pictures/pid-owner.png><br />
Fig.01: grep output
<h3>lsof Command Example</h3>
<b>Note (JM):</b>
Funktioniert <u>nicht</u> in virtualisierten Umgebungen, <br />
da der benötigte Kernel nicht “greifbar“ ist<br />
<br />
Type the command as follows:
lsof -i :portNumber
lsof -i tcp:portNumber
lsof -i udp:portNumber
lsof -i :80
lsof -i :80 | grep LISTEN
Sample outputs:
apache2 1607 root 3u IPv4 6472 0t0 TCP *:www (LISTEN)
apache2 1616 www-data 3u IPv4 6472 0t0 TCP *:www (LISTEN)
apache2 1617 www-data 3u IPv4 6472 0t0 TCP *:www (LISTEN)
apache2 1618 www-data 3u IPv4 6472 0t0 TCP *:www (LISTEN)
apache2 1619 www-data 3u IPv4 6472 0t0 TCP *:www (LISTEN)
apache2 1620 www-data 3u IPv4 6472 0t0 TCP *:www (LISTEN)
Now, you get more information about pid # 1607 or 1616 and so on:
# ps aux | grep '[1]616'
Sample outputs:
www-data 1616 0.0 0.0 35816 3880 ? S 10:20 0:00 /usr/sbin/apache2 -k start
I recommend the following command to grab info about pid # 1616:
# ps -eo pid,user,group,args,etime,lstart | grep '[1]616'
Sample outputs:
1616 www-data www-data /usr/sbin/apache2 -k start 03:16:22 Fri Oct 29 10:20:17 2010
Where,
1616 : PID
www-date : User name (owner ‐ EUID)
www-date : Group name (group ‐ EGID)
/usr/sbin/apache2 -k start : The command name and its args
03:16:22 : Elapsed time since the process was started, in the form [[dd-]hh:]mm:ss.
Fri Oct 29 10:20:17 2010 : Time the command started.
<h3>Help: I Discover an Open Port Which I Don't Recognize At All</h3>
The file /etc/services is used to map port numbers and protocols to service names. Try matching port numbers:
<pre><code>$ grep port /etc/services
$ grep 443 /etc/services</code></pre>
Sample outputs:
<pre><code>https 443/tcp # http protocol over TLS/SSL
https 443/udp</code></pre>
<h3>Check For rootkit</h3>
I strongly recommend that you find out which processes are really running, especially servers connected to the high speed Internet access. You can look for rootkit which is a program designed to take fundamental control (in Linux / UNIX terms “root“ access, in Windows terms “Administrator“ access) of a computer system, without authorization by the system's owners and legitimate managers. See how to detecting / checking rootkits under Linux.
<h3>Keep an Eye On Your Bandwidth Graphs</h3>
Usually, rooted servers are used to send a large number of spam or malware or DoS style attacks on other computers.
<h3>See also:</h3>
See the following man pages for more information:<br />
<code>$ man ps</code><br />
<code>$ man grep</code><br />
<code>$ man lsof</code><br />
<code>$ man netstat</code><br />
<code>$ man fuser</code><br />
<h3>Link:</h3>
<a href="https://www.cyberciti.biz/faq/what-process-has-open-linux-port/" target=_blank>nixCraft :: Process - Listening - Port</a>
</html>
<html>
<ul>
<li>zu verwendendes Theme: <b>ansi‐light</b></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://computingforgeeks.com/bat-cat-command-with-syntax-highlighting-and-git-integration/" target="_blank" rel="noreferrer noopener">
Computing for Geeks :: Bat</a></li>
<li><a href="https://www.geekpills.com/operating-system/linux/bat-advance-cat-in-linux" target="_blank" rel="noreferrer noopener">
Geek Pills :: Bat ‐ Advance cat in Linux</a></li>
<li><a href="https://www.linode.com/docs/guides/how-to-install-and-use-the-bat-command-on-linux/" target="_blank" rel="noreferrer noopener">
Linode :: Bat ‐ How to install & how to use</a></li>
<!--
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
-->
</ul>
</html>
<html>
<ul>
<li>
<ul><li><b>upper part</b>: shows statistics about the processes and resource usage</li>
<li><b>lower part</b>: displays a list of currently running processes</li></ul>
<li>to browse through the list: use the arrow keys <br />
or the page up and page down keys</li>
<li><b>top Command Help</b>: h</li>
<li><b>Set Interval for Refreshing the Screen</b>:
<ul>
<li>Default 3 sec</li>
<li>Wert ändern: Taste d</li>
</ul>
<li><b>Display Processes for a Specific User</b>:</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://vitux.com/how-to-use-the-ubuntu-linux-top-command/" target="_blank" rel="noreferrer noopener">VITUX Linux Compendium :: How to Use the Linux Top command</a></li>
</ul>
</html>
<html>
<ul>
<li><h3>Devices auflisten:</h3>
<code><pre>lsblk [‐a]</pre></code>
Der Befehl zeigt in einer Baumstruktur übersichtlich an, welche<br />
Partition zu welcher Festplatte gehört und wie groß sie sind.<br />
</li>
<li><h3>Neben der Devices auch die UUID u.a. anzeigen:</h3>
<code><pre>blkid -o list</pre></code>
Der Befehl zeigt zusätzlich noch die UUID, den Dateisystemtyp<br />
und die Bezeichnung der Partition an (sofern vergeben).<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.giga.de/downloads/linux-mint/tipps/linux-festplatten-anzeigen-so-gehts/"
target="_blank" rel="noreferrer noopener">
GIGA :: Linux‐Festplatten anzeigen ‐ so geht's</a>
</li>
<li><a href="https://vitux.com/get-debian-system-and-hardware-details-through-the-command-line/"
target="_blank" rel="noreferrer noopener">
VITUX :: Get Debian system and hardware details through the command line</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<code><pre>
mueller@Debian-Laptop:~$ sudo lpc status
Deskjet-F4200-series:
Drucker ist am Gerät 'hp' Geschwindigkeit -1
in Warteschlange einreihen erlaubt
<b>Drucken ist abgeschaltet</b> <<<
Keine Einträge
Dienst verfügbar
mueller@Debian-Laptop:~$ <b>sudo cupsenable Deskjet-F4200-series</b>
mueller@Debian-Laptop:~$ sudo lpc status
Deskjet-F4200-series:
Drucker ist am Gerät 'hp' Geschwindigkeit -1
in Warteschlange einreihen erlaubt
<b>Drucken ist eingeschaltet</b> <<<
Keine Einträge
Dienst verfügbar
mueller@Debian-Laptop:~$
</pre></code>
</html>
<html>
<ol>
<li>“Position“ / Pfad im zip-File ermitteln:
<pre><code>unzip -l <em><File></em>.zip </code></pre>
</li>
<li>File extrahieren:
<pre><code>unzip -p <em><File></em>.zip Path/to/regarded/file.txt > file.txt</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://unix.stackexchange.com/questions/14120/extract-only-a-specific-file-from-a-zipped-archive-to-a-given-directory"
target="_blank" rel="noreferrer noopener">
Unix & Linux Stackexchange :: Extract only a specific file from a zipped archive to a given directory</a>
</li>
</ul>
</html>
<html>
<h3>Situation:</h3>
In einem Verzeichnis, das über NFS gemountet ist,<br />
liegt eine Datei namens “.nfsXXXXX“, die auch durch<br />
wiederholtes Löschen nicht verschwindet.
<h3>Ursache & Lösung:</h3>
Die Ursache war ein Prozess (hier: less-Viewer), der die ur-<br />
sprügliche Datei geöffnet hatte und sie nicht mehr frei gab<br />
resp. gegeben hatte. Ein automatisierter Prozeß (hier: <br />
Murex-Importtask) nahm alle 30 Sekunden dieses File,<br />
importierte es und legte es im File “processed“. Da der less-<br />
Prozeß weiterhin den Filehandle offen resp. im Besitz hatte, <br />
wurde durch den NFS-Daemon ein neues File, zwar mit Prä‐<br />
ffix “.nfs“, aber mit neuem Suffix an die ursprüngliche Stelle<br />
erzeugt. <br />
<br />
Als <b>Lösung</b> muß zuerst der Prozeß gefunden werden, der<br />
auf das .nfs-File zugreift. Nachdem man diesen Prozeß ge‐<br />
killt hat (kill ‐9 ist notwendig), ist es möglich, das .nfs-File<br />
zu löschen.
</html>
<html>
If you need a reminder to leave your terminal, type the following command:
<code><pre>
leave +hhmm
</pre></code>
Where,<br />
<table>
<tr><td> hhmm </td><td> The time of day is in the form hhmm where hh is a time in hours (on a 12 or 24 hour clock), <br />
and mm are minutes. All times are converted to a 12 hour clock, and assumed to be in the<br />
next 12 hours.</td></tr>
</table>
<br />
<h3>Links:</h3>
<ul>
<li><a href="https://www.cyberciti.biz/open-source/command-line-hacks/20-unix-command-line-tricks-part-i/" target="_blank" rel="noreferrer noopener">nixCraft :: Command Line Hacks</a></li>
</ul>
</html>
<html>
<p>
Auf der Grundebene nutzt ein Computer das Binärsystem <br />
(auch Dual- oder Zweiersystem), welches nur zwischen 0 <br />
und 1 unterscheidet. Bis 1996 hatte man jedoch keine eigen‐<br />
ständigen Präfixe für vielfache Zweierpotenzen, sondern nur<br />
für das übliche Dezimalsystem (auch Zehnersystem), welches<br />
zwischen den Zahlen 0 bis 9 unterscheidet.</p>
<p>
Aus diesem Grund hat man auch für die Speicherkapazität die<br />
gängigen Vorsätze des Dezimalsystems (SI-Präfixe) verwendet ‐<br />
also Kilo für 1.000 (10<sup>3</sup>), Mega für 1 Million (10<sup>6</sup>) und Giga für 1<br />
Milliarde (10<sup>9</sup>). Die Hersteller von Festplatten, Speichersticks und<br />
CD-Rohlingen verwenden diese nach wie vor, da sie als internatio‐<br />
nale Maßeinheit gelten. Da jedoch ein Kilobyte aus 1024 Bytes (2<sup>10</sup>)<br />
besteht und nicht aus 1000 Bytes (10<sup>3</sup>), entsteht hier eine Lücke <br />
zwischen der eigentlichen und der realen Speicherkapazität. Die<br />
Differenz wächst dazu prozentual mit der Größe des Speicherme‐<br />
diums.</p>
<p>
Seit 1996 gibt es jedoch die Binär-Vorsätze (IEC-Präfixe), welche<br />
sich aus der ersten Silbe der Dezimal-Präfixe und einem angehän‐<br />
gten “bi“ für “binär“ zusammensetzen ‐ also Kibi statt Kilo, Mebi <br />
statt Mega und Gibi statt Giga.</p>
<h3>Unterschied Gigabyte und Gibibyte ‐ Dezimal- und Binär‐Präfixe</h3>
<p>
Durch die verwendeten Zehnerpotenzen (10<sup>n</sup>) anstelle der korrekten<br />
Zweierpotenzen (2<sup>n</sup>) kann (je nach Berechnung und Ausgabe des <br />
Betriebssystems) eine Abweichung zwischen der angegebenen und <br />
der angezeigten Speicherkapazität entstehen. <br />
<br />
In folgender Tabelle kann man die Differenz nachvollziehen:</p>
<table>
<tr><th>SI-Einheit (Dezimalsystem) </th><th>IEC-Einheit (Binärsystem)</th><th>Unterschied in Prozent</th></t>
<tr><td>1 Kilobyte (kB) = 10<sup>3</sup> Byte<br />= 1000 Byte </td><td>1 Kibibyte (KiB) = 2<sup>10</sup> Byte<br /> = 1024 Byte </td><td><center>2,4</center></th></t>
<tr><td>1 Megabyte (MB) = 10<sup>6</sup> Byte<br /> = 1 Million Byte </td><td>1 Mibibyte (MiB) = 2<sup>20</sup> Byte<br /> = 1024<sup>2</sup> Byte</td><td><center>4,9</center></th></t>
<tr><td>1 Gigabyte (GB) = 10<sup>9</sup> Byte<br /> = 1 Milliarde Byte </td><td>1 Gibibyte (GiB) = 2<sup>30</sup> Byte<br /> = 1024<sup>3</sup> Byte </td><td><center>7,4</center></th></t>
<tr><td>1 Terabyte (TB) = 10<sup>12</sup> Byte <br />= 1 Billion Byte </td><td>1 Tebibyte (TiB) = 2<sup>40</sup> Byte<br /> = 1024<sup>4</sup> Byte </td><td><center>10</center></th></t>
<tr><td>1 Petabyte (PB) = 10<sup>15</sup> Byte<br /> = 1 Billiarde Byte </td><td>1 Pebibyte (PiB) = 2<sup>50</sup> Byte<br /> = 1024<sup>5</sup> Byte </td><td><center>12,6</center></th></t>
</table>
<h3>Die vermeintliche “Gigabyte‐Lüge“</h3>
<p>
Häufig werden die Hersteller von Speichermedien für die sogenan‐<br />
nte “Gigabyte-Lüge“ verantwortlich gemacht, was jedoch so nicht <br />
ganz korrekt ist. Denn auch wenn die Hersteller weiterhin die Dezimal‐<br />
Präfixe aufgrund ihrer Geltung als internationale Maßeinheit nutzen, <br />
haben vor allem die Betriebssysteme über Jahre hinweg die falschen <br />
Werte angezeigt.</p>
<p>
So berechnet Windows intern korrekt auf Basis von Zweierpotenzen <br />
(Binärsystem), gibt den Wert dann jedoch mit dem Dezimal-Vorsatz <br />
(Mega, Giga, Tera etc.) an. So werden unter Windows aus den vom <br />
Hersteller korrekt angegebenen 500 Gigabyte (ca. 465 Gibibyte) plötz‐<br />
lich 465 Gigabyte.</p>
<p>
Apple verwendet seit OS X 10.6 nur noch die dezimale Angabe wie <br />
Berechnung, sodass eine 500-Gigabyte-Festplatte im System auch <br />
korrekt mit 500 GB angezeigt wird. Viele Linux-Distributionen lassen <br />
dem Nutzer die Wahl zwischen der Anzeige in Gigabyte oder Gibibyte<br />
und berechnen die Größe des Speichermediums demnach wahlweise<br />
im Dezimal- oder Binär-Verfahren.</p>
<h3>Links:</h3>
<ul>
<li><a href="https://www.giga.de/downloads/windows-10/specials/gibibyte-mebibyte-kibibyte-was-soll-das-sein/" target=_blank>Giga :: Gibibyte, Mebibyte, Kibibyte ‐ Was soll das sein?</a></li>
<!-- li><a href="" target=_blank></a></li -->
</ul>
</html>
<html>
<code><pre>
apropos -s <SECTION> -r .*
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://unix.stackexchange.com/questions/593339/how-to-display-a-list-of-all-man-pages-available-on-the-system"
target="_blank" rel="noreferrer noopener">
Unix Stachexchange :: How to display a list of all `man` pages available on the system?</a>
</li>
</ul>
</html>
<html>
mit Hilfe der Brace expansion <code>{ … }</code> ::
<code><pre>mkdir -p test1/{first,second,third}</pre></code>
→ Ergebnis:
<code><pre>
mueller@Debian-Laptop:/tmp$ ls -lR test1/
test1/:
insgesamt 0
drwxr-xr-x 1 mueller mueller 0 Dez 29 09:41 first
drwxr-xr-x 1 mueller mueller 0 Dez 29 09:41 second
drwxr-xr-x 1 mueller mueller 0 Dez 29 09:45 third
test1/first:
insgesamt 0
test1/second:
insgesamt 0
test1/third:
insgesamt 0
mueller@Debian-Laptop:/tmp$
</pre></code>
</html>
<html>
https://www.vultr.com/docs/introduction-to-doas-on-openbsd<br />
<br />
https://github.com/slicer69/doas (Linux-Port)<br />
</html>
<html>
<h3>Kpcli</h3>
<ul>
<li>habe diesen gewählt, weil dem KeePass und dem KeePassX<br />
ähnelt resp. deren Funktionalität in der Shell auf der Command<br />
Line bereitstellt.
</li>
<li>lt. Doku ist er auch unter Microsoft Windows einsetzbar (falls<br />
bestimmte Pakete installiert sind):<br />
<code>
Microsoft Windows<br />
    - As of v2.4, Microsoft Windows is also supported.<br />
    - Tested and compiled on Strawberry Perl 5.16.2 on Windows 7.<br />
</code>
</li>
<li>Liste der Befehle:
<code><pre>
kpcli:/> help
attach -- Manage attachments: attach <em><path to entry|entry number></em>
cd -- Change directory (path to a group)
cl -- Change directory and list entries (cd+ls)
clone -- Clone an entry: clone <em><path to entry></em> <em><path to new entry></em>
close -- Close the currently opened database
cls -- Clear screen ("clear" command also works)
copy -- Copy an entry: copy <em><path to entry></em> <em><path to new entry></em>
edit -- Edit an entry: edit <em><path to entry|entry number></em>
export -- Export entries to a new KeePass DB (export <em><file.kdb></em> [<em><file.key></em>])
find -- Finds entries by Title
help -- Print helpful information
history -- Prints the command history
icons -- Change group or entry icons in the database
import -- Import a password database (import <em><file></em> <em><path></em> [<em><file.key></em>])
ls -- Lists items in the pwd or specified paths ("dir" also works)
mkdir -- Create a new group (mkdir <em><group_name></em>)
mv -- Move an item: mv <em><path to a group|or entries></em> <em><path to group></em>
new -- Create a new entry: new <em><optional path&|title></em>
open -- Open a KeePass database file (open <em><file.kdb></em> [<em><file.key></em>])
purge -- Purges entries in a given group base on criteria.
pwck -- Check password quality: pwck <em><entry|group></em>
pwd -- Print the current working directory
quit -- Quit this program (EOF and exit also work)
rename -- Rename a group: rename <em><path to group></em>
rm -- Remove an entry: rm <em><path to entry|entry number></em>
rmdir -- Delete a group (rmdir <em><group_name></em>)
save -- Save the database to disk
saveas -- Save to a specific filename (saveas <em><file.kdb></em> [<em><file.key></em>])
show -- Show an entry: show [-f] [-a] <em><entry path|entry number></em>
stats -- Prints statistics about the open KeePass file
ver -- Print the version of this program
vers -- Same as "ver -v"
xp -- Copy password to clipboard: xp <em><entry path|number></em>
xu -- Copy username to clipboard: xu <em><entry path|number></em>
xw -- Copy URL (www) to clipboard: xw <em><entry path|number></em>
xx -- Clear the clipboard: xx
Type "help <em><command></em>" for more detailed help on a command.
</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://kpcli.sourceforge.io/"
target="_blank" rel="noreferrer noopener">
Kpcli :: Homepage</a>
</li>
<li><a href="https://opensource.com/article/18/4/3-password-managers-linux-command-line"
target="_blank" rel="noreferrer noopener">
Opensource :: 3 password managers for the Linux command line</a>
</li>
<li><a href="https://www.passwordstore.org/"
target="_blank" rel="noreferrer noopener">
pass :: the standard unix password manager</a>
</li>
<li><a href="https://www.howtogeek.com/devops/how-to-use-pass-a-command-line-password-manager-for-linux-systems/"
target="_blank" rel="noreferrer noopener">
How-To-Geek :: How to Use Pass, a Command-Line Password Manager for Linux Systems </a>
</li>
</ul>
</html>
<html>
<h2>How to test the network speed/throughput between two Linux servers</h2>
You can test the network speed (throughput) between Ubuntu/CentOS/Debian/Fedora or Unix box using the iperf command. Iperf commands show info about bandwidth, delay, jitter, and datagram loss. From the man page:
iperf is a tool for performing network throughput measurements. It can test either TCP or UDP throughput. To perform an iperf test the user must establish both a server (to discard traffic) and a client (to generate traffic).
Here is my sample setup:
Fig.01 Test network speed between two Linux computers
<h3>Step 1 :: Installation</h3>
You need to install iperf as per your Linux distro version. There are two versions of iperf:
<ul>
<li> iperf</li>
<li> iperf3</li>
</ul>
The iperf/iperf3 works on Linux, Unix, Windows, *BSD and other operating systems.
Install iperf on a Ubuntu/Debian Linux server
Type the following apt-get command/[nixmcd name=“apt“] to install iperf on both servers:
<code><pre>
$ sudo apt-get update
$ sudo apt-get install iperf
</pre></code>
Sample outputs:
<code><pre>
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
iperf
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 51.0 kB of archives.
After this operation, 184 kB of additional disk space will be used.
Get:1 http://mirrors.linode.com/ubuntu xenial/universe amd64 iperf amd64 2.0.5+dfsg1-2 [51.0 kB]
Fetched 51.0 kB in 0s (4921 kB/s)
Selecting previously unselected package iperf.
(Reading database ... 26108 files and directories currently installed.)
Preparing to unpack .../iperf_2.0.5+dfsg1-2_amd64.deb ...
Unpacking iperf (2.0.5+dfsg1-2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up iperf (2.0.5+dfsg1-2) ...
</pre></code>
A note about installing iperf3 on a Debian/Ubuntu Linux
It is also possible to install iperf3 (latest version) as follows:
<code><pre>$ sudo apt-get install iperf3</pre></code>
Sample outputs:
<code><pre>
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libiperf0
The following NEW packages will be installed:
iperf3 libiperf0
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 58.5 kB of archives.
After this operation, 238 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.linode.com/ubuntu xenial/universe amd64 libiperf0 amd64 3.0.11-1 [50.4 kB]
Get:2 http://mirrors.linode.com/ubuntu xenial/universe amd64 iperf3 amd64 3.0.11-1 [8090 B]
Fetched 58.5 kB in 0s (4796 kB/s)
Selecting previously unselected package libiperf0:amd64.
(Reading database ... 26120 files and directories currently installed.)
Preparing to unpack .../libiperf0_3.0.11-1_amd64.deb ...
Unpacking libiperf0:amd64 (3.0.11-1) ...
Selecting previously unselected package iperf3.
Preparing to unpack .../iperf3_3.0.11-1_amd64.deb ...
Unpacking iperf3 (3.0.11-1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libiperf0:amd64 (3.0.11-1) ...
Setting up iperf3 (3.0.11-1) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
</pre></code>
<h3>Install iperf on a Fedora Linux server</h3>
Type the following [nixmcd name=“dnf“] to install iperf on both servers:
<code><pre>
$ sudo dnf install iperf
</pre></code>
<h3>A note about installing iperf3 on a CentOS/RHEL/SL/Oracle Linux</h3>
Type the following command:
$ sudo dnf install iperf3
Install iperf on a CentOS/RHEL/Oracle/Scientific Linux server
Type the following [nixmcd name=“yum“] to install iperf on both servers (first turn on EPEL repo for CentOS/RHEL):
$ sudo yum install iperf
Sample outputs:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.snu.edu.in
* epel: mirror01.idc.hinet.net
* extras: centos.mirror.snu.edu.in
* updates: centos.mirror.snu.edu.in
Resolving Dependencies
--> Running transaction check
---> Package iperf.x86_64 0:2.0.8-1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=====================================================================
Package Arch Version Repository Size
=====================================================================
Installing:
iperf x86_64 2.0.8-1.el7 epel 321 k
Transaction Summary
=====================================================================
Install 1 Package
Total download size: 321 k
Installed size: 396 k
Is this ok [y/d/N]: y
Downloading packages:
iperf-2.0.8-1.el7.x86_64.rpm | 321 kB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : iperf-2.0.8-1.el7.x86_64 1/1
Verifying : iperf-2.0.8-1.el7.x86_64 1/1
Installed:
iperf.x86_64 0:2.0.8-1.el7
Complete!
<h3>A note about installing iperf3 on a CentOS/RHEL/SL/Oracle Linux</h3>
Type the following command:
$ sudo yum install iperf3
<h3>Step 2 :: Start an iperf server on serverA (server mode)</h3>
Type the following command to run iperf in server mode:
iperf -s
OR
iperf3 -s
Sample outputs:
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
<h3>A note about firewall config</h3>
Please note that you must open TCP port 5001 on the serverA. See how to use ufw to open a port on Ubuntu/Debian Linux:
$ sudo ufw allow from 192.168.149.0/24 to 192.168.149.69 port 5001 proto tcp
It is also possible to change the port by passing the -p option as follows (e.g. open and use TCP port 2323):
iperf -s -p 2323
<h3>Step 3 :: Start an iperf server on serverB (client mode)</h3>
Type the following command to run in client mode, connecting to 192.168.149.69:
iperf -c {ip-address-of-serverA-here}
iperf -c {ip-address-of-serverA-here} -p {tcp-port}
iperf -c 192.168.149.69 -p 2323
iperf -c 192.168.149.69
OR
iperf3 -c {ip-address-of-serverA-here}
iperf3 -c {ip-address-of-serverA-here} -p {tcp-port}
iperf3 -c 192.168.149.69 -p 2323
iperf3 -c 192.168.149.69
Sample outputs:
Fig.02: Linux network speed test result
Fig.02: Linux network speed test result
<h3>How to use UDP rather than TCP</h3>
On the server side:
iperf -s -u
On the client side:
iperf -c 192.168.149.69 -u
See also: How To Install Speedtest-cli On a CentOS / RHEL / Scientific / Fedora Linux To Check Internet Speed From the Bash Shelll
How to set number of parallel client threads to run (client mode options)
Pass the -P option:
iperf -c 192.168.149.69 -P 3
You can also set time in seconds to transmit for (default 10 secs) as follows:
iperf -c 192.168.149.69 -P 3 -t 30
Sample outputs:
------------------------------------------------------------
Client connecting to 192.168.149.69, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[ 5] local 192.168.181.40 port 54198 connected with 192.168.149.69 port 5001
[ 3] local 192.168.181.40 port 54194 connected with 192.168.149.69 port 5001
[ 4] local 192.168.181.40 port 54196 connected with 192.168.149.69 port 5001
[ ID] Interval Transfer Bandwidth
[ 5] 0.0-30.0 sec 2.26 GBytes 647 Mbits/sec
[ 3] 0.0-30.0 sec 2.89 GBytes 828 Mbits/sec
[ 4] 0.0-30.5 sec 1.91 GBytes 539 Mbits/sec
[SUM] 0.0-30.5 sec 7.07 GBytes 1.99 Gbits/sec
Here is output from iperf3:
## on the server side ##
iperf3 -s
## on the client side ##
iperf3 -c 192.168.149.69
Sample outputs:
Connecting to host 192.168.149.69, port 5201
[ 4] local 192.168.181.40 port 55522 connected to 192.168.149.69 port 5201
[ ID] Interval Transfer Bandwidth Retr Cwnd
[ 4] 0.00-1.00 sec 235 MBytes 1.97 Gbits/sec 32 609 KBytes
[ 4] 1.00-2.00 sec 230 MBytes 1.93 Gbits/sec 21 670 KBytes
[ 4] 2.00-3.00 sec 159 MBytes 1.33 Gbits/sec 19 635 KBytes
[ 4] 3.00-4.00 sec 235 MBytes 1.97 Gbits/sec 7 686 KBytes
[ 4] 4.00-5.00 sec 229 MBytes 1.92 Gbits/sec 86 757 KBytes
[ 4] 5.00-6.00 sec 206 MBytes 1.73 Gbits/sec 6 537 KBytes
[ 4] 6.00-7.00 sec 210 MBytes 1.76 Gbits/sec 5 556 KBytes
[ 4] 7.00-8.00 sec 235 MBytes 1.97 Gbits/sec 10 617 KBytes
[ 4] 8.00-9.00 sec 245 MBytes 2.06 Gbits/sec 11 670 KBytes
[ 4] 9.00-10.00 sec 234 MBytes 1.96 Gbits/sec 10 713 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-10.00 sec 2.17 GBytes 1.86 Gbits/sec 207 sender
[ 4] 0.00-10.00 sec 2.16 GBytes 1.86 Gbits/sec receiver
<h3>Getting help</h3>
Type the following command:
<code><pre>
$ man iperf
$ iperf --help
Usage: iperf [-s|-c host] [options]
iperf [-h|--help] [-v|--version]
Client/Server:
-f, --format [kmKM] format to report: Kbits, Mbits, KBytes, MBytes
-i, --interval # seconds between periodic bandwidth reports
-l, --len #[KM] length of buffer to read or write (default 8 KB)
-m, --print_mss print TCP maximum segment size (MTU - TCP/IP header)
-o, --output <filename> output the report or error message to this specified file
-p, --port # server port to listen on/connect to
-u, --udp use UDP rather than TCP
-w, --window #[KM] TCP window size (socket buffer size)
-B, --bind <host> bind to <host>, an interface or multicast address
-C, --compatibility for use with older versions does not sent extra msgs
-M, --mss # set TCP maximum segment size (MTU - 40 bytes)
-N, --nodelay set TCP no delay, disabling Nagle's Algorithm
-V, --IPv6Version Set the domain to IPv6
Server specific:
-s, --server run in server mode
-U, --single_udp run in single threaded UDP mode
-D, --daemon run the server as a daemon
Client specific:
-b, --bandwidth #[KM] for UDP, bandwidth to send at in bits/sec
(default 1 Mbit/sec, implies -u)
-c, --client <host> run in client mode, connecting to <host>
-d, --dualtest Do a bidirectional test simultaneously
-n, --num #[KM] number of bytes to transmit (instead of -t)
-r, --tradeoff Do a bidirectional test individually
-t, --time # time in seconds to transmit for (default 10 secs)
-F, --fileinput <name> input the data to be transmitted from a file
-I, --stdin input the data to be transmitted from stdin
-L, --listenport # port to receive bidirectional tests back on
-P, --parallel # number of parallel client threads to run
-T, --ttl # time-to-live, for multicast (default 1)
-Z, --linux-congestion <algo> set TCP congestion control algorithm (Linux only)
Miscellaneous:
-x, --reportexclude [CDMSV] exclude C(connection) D(data) M(multicast) S(settings) V(server) reports
-y, --reportstyle C report as a Comma-Separated Values
-h, --help print this message and quit
-v, --version print version information and quit
[KM] Indicates options that support a K or M suffix for kilo- or mega-
The TCP window size option can be set by the environment variable
TCP_WINDOW_SIZE. Most other options can be set by an environment variable
IPERF_<long option name>, such as IPERF_BANDWIDTH.
</pre></code>
See iperf home page for more info.
<br />
<b>Link:</b><br />
<a href="https://www.cyberciti.biz/faq/how-to-test-the-network-speedthroughput-between-two-linux-servers/" target="_blank">Cyberciti :: How to test the network speed/throughput between two Linux servers</a>
</html>
<html>
https://www.redhat.com/sysadmin/dnf-apt-users
</html>
<html>
<ul>
<li>usprünglich: Zetabyte Filesystem</li>
<li>Doku:<br />
<ul>
<li>iX 02/2017 :: ZFS, Teil 1: Konzepte und Grundlagen</li>
<li>Vortrag <a href="https://www.youtube.com/wathc?v=dcV2PaMTAJ4" target=_blank>“The birth of ZFS“</a></li>
<li><a href="http://www.oracle.com/technetowrk/articles/serversstoragge-admin/zfs-sadow-migration-2220997.html " target=_blank>Shadow Migration unter Solaris</a></li>
<li><a href="http://docs.oracle.com/cd/E19253-01/820-2313" target=_blank>ZFS-Dokumentation von Oracle</a></li>
<li><a href="https://pthree.org/2012/04/17/install-zfs-on-debian-gnulinux/" target=_blank>Dokumentation ZFS on Linux</a></li></ul>
</li>
</ul>
</html>
<html>
<h3>Symbole für Zugriffsrechte</h3>
<table>
<tr>
<th>Zeichen</th><th>Bedeutung</th><th>Beschreibung</th>
</tr>
<tr>
<td>r</td><td>Lesen (read)</td><td><ul>
<li>Erlaubt lesenden Zugriff auf die Datei.
</li>
<li>Bei einem Verzeichnis können damit die Namen der enthaltenen Dateien<br />
und Ordner abgerufen werden (nicht jedoch deren weitere Daten wie z.B.<br />
Berechtigungen, Besitzer, Änderungszeitpunkt, Dateiinhalt etc.).<br />
</li>
</td>
</tr>
<tr>
<td>w </td><td>Schreiben (write)</td><td><ul>
<li>Erlaubt schreibenden Zugriff auf eine Datei.
</li>
<li> Für ein Verzeichnis gesetzt, können Dateien oder Unterverzeichnisse an‐<br />
gelegt oder gelöscht werden, sowie die Eigenschaften der enthaltenen<br />
Dateien/Verzeichnisse verändert werden.<br />
</li>
</td>
</tr>
<tr>
<td>x </td><td>Ausführen (execute) </td><td><ul>
<li>Erlaubt das Ausführen einer Datei, wie das Starten eines Programms.
</li>
<li>Bei einem Verzeichnis ermöglicht dieses Recht, in diesen Ordner zu<br />
wechseln und weitere Attribute zu den enthaltenen Dateien abzuru‐<br />
fen (sofern man die Dateinamen kennt ist dies unabhängig vom Le‐<br />
serecht auf diesen Ordner). Statt x kann auch ein Sonderrecht ange‐<br />
führt sein.<br />
</li>
</td>
</tr>
</table>
<h3>Sonderrechte</h3>
Die oben gezeigten Dateirechte kann man als Basisrechte bezeichnen.<br />
Für besondere Anwendungen gibt es zusätzlich noch besondere Datei-<br />
rechte. Der Einsatz dieser ist nur dann ratsam, wenn man genau weiß<br />
was man tut, da dies unter Umständen zu Sicherheitsproblemen führen<br />
kann.<br>
<table>
<tr>
<th>Zeichen</th><th>Bedeutung</th><th>Beschreibung</th>
</tr>
<tr>
<td>s</td><td>Set-UID-Recht (SUID-Bit)</td><td><ul>
<li>Das Set-UID-Recht (“Set User IDd“ bzw. “Setze Benutzerkennung“)<br />
sorgt bei einer Datei mit Ausführungsrechten dafür, dass dieses <br />
Programm immer mit den Rechten des Dateibesitzers läuft. <br />
</li>
<li>
Bei Ordnern ist dieses Bit ohne Bedeutung.<br />
</li>
</td>
</tr>
<tr>
<td>s (S) </td><td>Set-GID-Recht (SGID-Bit) </td><td><ul>
<li>Das Set-GID-Recht (“Set Group ID“ bzw. “Setze Gruppenken-<br />
nung“) sorgt bei einer Datei mit Ausführungsrechten dafür, dass<br />
dieses Programm immer mit den Rechten der Dateigruppe läuft. <br />
</li>
<li>
Bei einem Ordner sorgt es dafür, dass die Gruppe an Unterordner<br />
und Dateien vererbt wird, die in diesem Ordner neu erstellt werden.<br />
</li>
</td>
</tr>
<tr>
<td>t (T) </td><td>Sticky-Bit </td><td><ul>
<li>Das Sticky-Bit (“Klebrig“ auf modernen Systemen nur noch eine einzige<br />
Funktion: Wird es auf einen Ordner angewandt, so können darin erstel-<br />
lte Dateien oder Verzeichnisse nur vom Dateibesitzer gelöscht oder<br />
umbenannt werden. Verwendet wird dies z.B. für /tmp. Der Besitzer<br />
des Hauptordners behält allerdings das Recht zum Umbenennen und<br />
Löschen. In den meisten Fällen macht es nur Sinn bei Ordnern mit <br />
Schreibrecht von “anderen“ (z.B. (1)777), um zu verhindern, dass <br />
andere Benutzer untergeordnete “fremde“ Dateien oder Ordner löschen<br />
oder umbenennen.<br />
</li>
</td>
</tr>
</table>
Die Symbole für die Sonderrechte erscheinen an der dritten Stelle der<br />
Zugriffsrechte, die normalerweise dem Zeichen x (für executable) vorbe-<br />
halten ist, und ersetzen ggf. dieses. Die Set-UID/GID-Rechte werden<br />
anstelle des x für den Besitzer bzw. die Gruppe angezeigt, das Sticky-<br />
Bit anstelle des x für andere. Wenn das entsprechende Ausführrecht<br />
gesetzt ist, wird ein Kleinbuchstabe verwendet, ansonsten ein Groß‐<br />
buchstabe.<br>
<br>
Für weitere Einzelheiten zu den Sonderrechten siehe auch Setuid, Set-<br />
gid und Sticky Bit.<br>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.ubuntuusers.de/Rechte/"
target="_blank" rel="noreferrer noopener">
UbuntuUsers :: Rechte </a>
</li>
</ul>
</html>
<html>
<meta at-Befehl at-Kommando "at cmd" "at command" />
<ul>
<li>Die at‐Jobs werden in einer Datei gespeichert,<br />
so dass sie auch einen Restart einer Maschine <br />
“überleben“.
</li>
<li><h3>Verzeichnis, in der die Datei .SEQ für die Protokollierung der Job-IDs abgelegt ist:</h3>
<ul>
<li><b>Debian/Ubuntu</b><br />
<pre><code>/var/spool/cron/atjobs</code></pre>
</li>
<li><b>Fedora</b><br />
<pre><code>/var/spool/at</code></pre>
</li>
<li>Die Sequenz-Nummer steht im Hexadezimal-<br />
Format;
</li>
<!--
<li><b></b><br />
<pre><code></code></pre>
</li>
-->
</ul>
</li>
<li><h4>Command to list the user's pending jobs:</h4>
<pre><code>at ‐l</code></pre>
oder
<pre><code>atq</code></pre>
Beispielausgabe:
<pre><code>21 Sun Oct 20 13:13:00 2024 = mueller
24 Sun Oct 20 15:13:00 2024 a mueller
</code></pre>
<em>Bedeutung des Eintrags </em><code>=</code> <em>bzw. </em> <code>a</code><em>:</em><br />
<ul>
<li>die Spalte zeigt die verwendete Queue an;
</li>
<li><code>=</code> :: der Task liegt in der Queue der aktuell ausgeführten Tasks;
</li>
<li><code>a</code> :: der Task liegt in der Queue a
</li>
</ul>
</li>
<li><h4>Schedule a job for the coming Monday at a time <br />
twenty minutes later than the current time:</h4>
<pre><code>at Monday +20 minutes</code></pre>
</li>
<li><h4>Schedule a job to run at 1:45 Aug 12 2020:</h4>
<pre><code>at 1:45 081220</code></pre>
</li>
<li><h4> Schedule a job to run at 3pm four days from now:</h4>
<pre><code>at 3pm + 4 days</code></pre>
</li>
<li><h4>Schedule a job to shutdown the system at 4:30 today:</h4>
<pre><code># echo “shutdown ‐h now“ | at ‐m 4:30</code></pre>
</li>
<li><h4>Schedule a job to run five hour from now:</h4>
<pre><code>at now +5 hours</code></pre>
</li>
<li><h4>Deleting jobs:</h4>
<pre><code> at ‐r <em><No. of job></em></code></pre>
oder
<pre><code>atrm <em><No. of job></em></code></pre>
</li>
<li><h4>Beispiele:</h4>
<ul>
<li><pre><code>echo 'export DISPLAY=:0 && xterm -e "whiptail --msgbox "FERTIG! Zeit ist um!" 0 0" ' | at now +2 min</code></pre>
</li>
<li><pre><code>at now + 10min -f pomodoro.txt</code></pre>
wobei im File <code>pomodoro.txt</code> z.B. folgendes eingetragen ist:
<pre><code>xterm -display :0 -e /usr/bin/dialog --msgbox "Done!" 0 0 &</code></pre></li>
</ul>
</li>
<!--
<li><h4></h4>
<pre><code>
</code></pre>
</li>
<li><h4></h4>
<pre><code>
</code></pre>
</li>
<li><h4></h4>
<pre><code>
</code></pre>
</li>
-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.geeksforgeeks.org/at-command-in-linux-with-examples/"
target="_blank" rel="noreferrer noopener">
Geeks for geeks :: at command</a>
</li>
<li><a href="https://phoenixnap.com/kb/linux-at-command"
target="_blank" rel="noreferrer noopener">
PhoenixNap :: at command</a>
</li>
<li><a href="https://unix.stackexchange.com/questions/92095/reset-atq-list-to-zero"
target="_blank" rel="noreferrer noopener">
Unix StackExchange :: Reset atq list to zero?</a>
</li>
<li><a href="https://unix.stackexchange.com/questions/537131/editing-a-job-in-at-command"
target="_blank" rel="noreferrer noopener">
Unix StackExchange :: Editing a job in At command </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<code><pre>
curl <em><Homepage vom Ecoute Newsletter></em> ‐o EcouteNewsletter_<em>YYYY‐MM</em>.html
</pre></code>
</html>
<html>
You can continue getting a partially downloaded file using curl command.<br />
You need to pass the -C or --continue-at <offset> option resume a pre‐<br />
vious file transfer at the given offset.<br />
<br />
curl resume broken download.<br />
<br />
<h3>COMMAND command</h3>
The syntax is as follows to to automatically find out where/how to resume<br />
the transfer using curl command:<br />
<br />
<code><b>curl -C ‐ </em>url</em></b></code><br />
<br />
OR<br />
<br />
<code><b>curl -L -O -C ‐ </em>url</em></b></code><br />
<br />
OR<br />
<br />
<code><b>curl -L -o 'filename-here' -C ‐ </em>url</em></b></code><br />
<br />
In this example, finish a download started by a previous instance of curl command:<br />
<br />
<code><b>curl -L -O -C - http://ftp.ussg.iu.edu/linux/centos/6.5/isos/x86_64/CentOS-6.5-x86_64-bin-DVD1.iso</b></code><br />
<br />
If there is a file named CentOS-6.5-x86_64-bin-DVD1.iso in the current directory,<br />
curl will assume that it is the first portion of the remote file, and will ask the server<br />
to continue the retrieval from an offset equal to the length of the local file. Thus, it<br />
will result in saving both time and bandwidth.<br />
<h3>Another example</h3>
You can continue a previous file transfer at the given offset. The given offset<br />
is the exact number of bytes that will be skipped, counting from the beginning<br />
of the source file before it is transferred to the destination. The syntax is:<br />
<br />
curl -C offset url<br />
<br />
In this example, retrieve ifdata-welcome-0.png file using the following command:<br />
<code><pre>
## Get first 20000 bytes ##
curl -o file.png --header "Range: bytes=0-20000" http://www.cyberciti.biz/media/images/misc/static/2012/11/ifdata-welcome-0.png
## Resume at 20001 offset and download the rest of the file ##
curl -o file.png -C 20001 http://www.cyberciti.biz/media/images/misc/static/2012/11/ifdata-welcome-0.png
## View an image file using a local image viewer ##
ls -lh file.png
open file.png
</pre></code>
Sample outputs from ls command:
<code><pre>
-rw-r--r--@ 1 vivek wheel 30K Feb 28 23:24 file.png
</pre></code>
<h3>Understanding options</h3>
<ul>
<li>-L :: Follow location if HTTP 3xx status code found. For example, redirect url.</li>
<li>-O :: Write output to a local file named like the remote file we get. <em>(es findet keine Umbennung statt)</em><br />
Only the file part of the remote file is used, the path is cut off.</li>
<li>-C :: Continue/Resume a previous file transfer.</li>
<li>-C offsetAT :: Continue/Resume a previous file transfer at the given offset.</li>
<li>-o 'filename' :: Write/Save output to “filename“ instead of stdout/screen.</li>
<li>‐#, ‐‐progress bar :: Default ist “progress meter“</li>
</ul>
<br />
Link:<br />
<a href="https://www.cyberciti.biz/faq/curl-command-resume-broken-download/">https://www.cyberciti.biz/faq/curl-command-resume-broken-download/</a>
</html>
<html>
<h2>Versionierung für Etc-Dateien :: etckeeper</h2>
<p>
Im Etc-Verzeichnis von Linux- und Unix-Systemen sieht es oft aus wie bei Hempels unterm Sofa. Für etwas Ordnung sorgt der Etckeeper.
</p>
<p>
Weil unter Unix alles seinen Ort hat, befinden sich Konfigurationsdateien seit mehr als 40 Jahren unter “ferner liefen“, das heißt konkret in einem Verzeichnis namens “etc“. Da es sich nur im konventielle Textdateien handelt, muss sich jeder Administrator selber darum kümmern, das System nicht zu verkonfigurieren. Im Klartext bedeutet das “/etc/config.conf.bak“ und Co oder, wenn es ganz strukturiert läuft, die Verwendung von RCS zur Versionskontrolle.
</p>
<p>
Einfacher und besser geht das Gleiche aber mit Etckeeper, einem Tool von Joey Hess, das automatisch ausgefeilte Versionskontrollsysteme (VCS) wie Git, Mercurial oder Bazar verwendet, um über Änderungen an der Konfiguration Buch zu halten. Nach der Installation initialisiert man zuerst das Repository mit:
<code><pre>
# cd /etc
# etckeeper init
</pre></code>
<p>
Das verwendete VCS lässt sich in “/etc/etckeeper/etckeeper.conf“ ändern, indem man die Variable VCS etwa auf “bzr“ oder “hg“ setzt. Die Default-Einstellung unter Debian Linux ist Git, bei Ubuntu ist es Bazaar.
</p>
<p>
Auf Debian- und Ubuntu-Systemen wird bei der Installation ein Hook in das Apt-Paketmanagement eingehängt, der dazu führt, dass die Konfigurationsdateien neu installierter Pakete automatisch unter VCS-Kontrolle stehen. Über die Variable “AVOID_DAILY_AUTOCOMMITS“ lässt einschalten, dass Etckeeper einmal am Tag neue Änderungen in das Repository übernimmt. Ansonsten sollte man seine Änderungen am besten mit Kommentar von Hand commiten. Dank Etckeeper muss man dafür nicht die Syntax des verwendeten VCS bemühen, sondern kann dies direkt mit dem Tool selbst tun, etwa:
<code><pre>
# etckeeper commit "Domainname geändert"
</pre></code>
</p>
<em>(Oliver Fromm)</em>
<h3>Links:</h3>
<ul>
<li><a href="https://www.admin-magazin.de/News/Tipps/ADMIN-Tipp-Versionierung-fuer-Etc-Dateien" target=_blank>ADMIN ‐ Tipp :: Versionskontrolle für /etc-Dateien</a></li>
</ul>
</html>
<html>
<img src="./pictures/logadm.cf_Beispiel.jpg" width=682 height=179>
</html>
<html>
<meta charset="utf-8" mail />
<ul>
<li>um die Befehle innerhalb von mail zu lesen: <br />
<code><b>info mail</b></code>, Kap. 3.5.2 ff</li>
<li><h3>mail‐Programm aufrufen:</h3>
<code><pre>
mail
</pre></code></li>
<li><h3>Die als aktuell markierte Mail löschen:</h3>
<code><pre>
d <em># bzw. delete</em>
</pre></code></li>
<li><h3>Eine beliebige Mail löschen:</h3>
<code><pre>
d <id> <em># bzw. delete <id></em>
</pre></code></li>
<li><h3>Eine (beliebige) Mail zum Lesen öffnen:</h3>
<code><pre>
<id> <em># die Nummer der gewünschten Mail eingeben</em>
</pre></code></li>
<li><h3>Die aktuell in der Mail‐box vorhandenen Mails auflisten (die Kopfzeilen):</h3>
<code><pre>
h <em># bzw. headers</em>
</pre></code></li>
<li><h3>die als aktuell markierte Mail (“>“) zum Lesen öffnen:</h3>
<code><pre>
p <em># bzw. print</em>
</pre></code></li>
<li><h3>Das Mail‐Programm beenden:</h3>
<code><pre>
q <em># bzw. quit</em>
</pre></code></li>
<li><h3>Shell‐Befehl, um die Anzahl der in <em>mail</em> vorhandenen Mails anzuzeigen:</h3>
<code><pre>messages
</pre></code></li>
<li><h3>Zur ersten ungelöschten Nachricht springen:</h3>
<code><pre>^
</pre></code> <em>(circumflex)</em></li>
<li><h3>Zur letzten ungelöschten Nachricht springen:</h3>
<code><pre>$
</pre></code></li>
<li><h3>Anzeigen der Nummer der aktuellen Nachricht:</h3>
<code><pre>=
</pre></code></li>
<!--
<li><h3></h3>
<code><pre>
</pre></code></li>
<li><h3></h3>
<code><pre>
</pre></code></li>
-->
</ul>
</html>
<html>
<head>
<meta charset="utf-8" rsync />
</head>
<body>
<h2>!Achtung! habe die Option ‐i hinzugefügt!</h2>
<b>Optionen:</b>
<table>
<tr><td>‐a, ‐‐archive </td><td> archive mode<br />
Die Option <b>‐a</b> beinhaltet folgende Optionen <b>‐rlptgoD</b> und kopiert somit Unterverzeichnisse, <br />
Symbolische Links und Rechte von Usern, Gruppen und Andere sowie die Zeitstempel <br />
der Dateien und Ordner von der Quelle.<br />
Kurz gesagt “‐a“ macht eine 1zu1 Kopie von Quelle zum Ziel und ist gerade für backups<br />
ideal geeignet.</td></tr>
<tr><td>‐v, ‐‐verbose </td><td> increase verbosity</td></tr>
<tr><td>‐p, ‐‐perms </td><td> preserve permissions</td></tr>
<tr><td>‐n, ‐‐dry‐run </td><td> performs a trial run with no changes made</td></tr>
<tr><td>‐z, ‐‐compress </td><td> compress file data during the transfer</td></tr>
<tr><td>‐h, ‐‐human‐readable </td><td> output numbers in a human‐readable format</td></tr>
<tr><td>‐u, ‐‐update </td><td> skip files that are newer on the receiver</td></tr>
<tr><td>‐P, ‐‐progress </td><td> show progress during transfer</td></tr>
<tr><td>‐i, ‐‐itemize‐changes </td><td>It is most commonly used in combination with option “‐‐dry‐run;<br />
option to see what an rsync command is going to do before one actually runs it</td></tr>
<tr><td>‐‐exclude 'dir1' </td><td> exclude the directory 'dir1'</td></tr>
<tr><td>‐‐delete </td><td> Löschen von Files (am Ziel), die in der Quelle nicht mehr vorhanden sind</td></tr>
<tr><td>‐‐files–from </td><td>Die zu verabeitenden Files aus dem angegeben File lesen;<br />
bei Verzeichnissen ist erforderlich:<br />
<ul>
<li>‐r, ‐‐recursive
</li>
</ul></td></tr>
</table>
<b>Beispiel:</b><br />
rsync -avpz Wiki.html /media/5637-0479/TiddlyWiki<br />
<br />
-->Abgleich der Datei <i>Wiki.html</i> aus dem aktuellen Ver-<br />
zeichnis mit dem File in dem Verzeichnis <em>/media/5637-0479/TiddlyWiki</em>
<br />
<table>
<tr><td> <b><code>rsync -av <u>/var/www</u> /mnt/backup </code></b>
</td><td> *Kopiert den <b>Ordner</b> www*<br />
Kopiert alle Daten inkl. Unterordner von <b>/var/www</b> nach <b>/mnt/backup/www</b> <br />
und behält dabei die Rechte und Zeitstempel der Dateien und Ordner bei.<br />
<br />
Wenn statt "/media/mueller/INTENSO/" die Pfadangabe "/media/mueller/INTENSO" (!ohne </br />
Slash hinter "INTENSO") genommen worden wäre, so wäre im Zielverzeichnis <b>_ZUERST_</b> das</br />
Verzeichnis "INTENSO" angelegt worden und danach erst die Files in diesem Verzeichnis</br />
angelegt worden.</br />
</td></tr>
<tr><td> <b><code>rsync -av <u>/var/www/</u> /mnt/backup </code></b>
</td><td> *Kopiert <u>nur</u> den <b>Inhalt des Ordners</b> www*<br />
Kopiert alle Daten inkl. Unterordner von <b>/var/www/</b> nach <b>/mnt/backup/</b> <br />
und behält dabei die Rechte und Zeitstempel der Dateien und Ordner bei.</td></tr>
</table>
⇒ der Unterschied zwischen diesen beiden Statements liegt im "/" (Slash) <br />
nach dem Quellverzeichnis <b><code>/var/www</code> </b> bzw. <b><code>/var/www<u>/</u></code></b> <br />
(bei dem ersten fehlt es, beim zweiten ist es angegeben)<br />
<br />
⇒ d.h. ohne zusätzliches Slash wird das Quellverzeichnis auf der Zielseite neu angelegt;<br />
während es beim zweiten Statement <b>nicht</b> angelegt wird.<br />
<h3>weiteres Beispiel:</h3>
<b><code>rsync -avizhp --exclude 'Musik' --progress --update ‐‐delete /media/mueller/INTENSO/ /media/mueller/Elements/myData/USB-Stick_INTENSO_2020-01-19/ | tee -a </i>rsync-Logfile_INTENSO</i></code></b><br />
bzw.<br />
<!--
<b><code>rsync -avizhp --progress --update --delete /media/mueller/INT-256GB/ /media/mueller/Elements/myData/USB-Stick_CONRAD_2020-01-19/ | tee -a </i>rsync-Logfile_CONRAD</i></code></b><br />
<b><code>rsync -avizhp --progress --update --delete /media/mueller/INT-256GB/ /media/mueller/Elements/myData/USB-Stick_CONRAD_2020-01-19/ | tee -a </i>rsync-Logfile_CONRAD</i></code></b><br />
<br />
<b><code>rsync -avuphiz --progress --exclude 'StuffToDo' --exclude 'Norwegisch' --exclude 'DrData' --exclude 'PaukMitLatein' --exclude 'OpenSAP' /media/mueller/INT-256GB/ /media/mueller/Elements/myData/USB-Stick_CONRAD_2022-04-30/ | tee <i>rsync-LogFile-CONRAD.txt</i></code></b><br />
<b><code>rsync -avuphiz --progress --exclude 'StuffToDo' --exclude 'Norwegisch' --exclude 'DrData' --exclude 'PaukMitLatein' --exclude 'OpenSAP' /media/mueller/INT-256GB/ /media/mueller/Elements/myData/USB-Stick_CONRAD_2022-04-30/ | tee <i>rsync-LogFile-CONRAD.txt</i></code></b><br />
-->
<br />
(1) <b><code>rsync -avuphiz --progress /media/mueller/INT-256GB/ --exclude '.Trash-1000' /media/mueller/Elements/myData/SD-Card_INT-256GB_2023-11-25/ | tee <i>rsync-LogFile-INT-256GB.txt</i></code></b><br />
<br />
(2) <b><code>rsync -avuphiz --progress --delete /media/mueller/MUELLER/StuffToDo/ /media/mueller/Elements/myData/USB-Stick_MUELLER_2022-04-30/StuffToDo/ | tee rsync-LogFile-MUELLER.txt</i></code></b><br />
<br />
(3) <em>Das File ~/.bash_alias sichern</em><br />
<br />
(4) <b>Podcast-Verzeichnis sichern: <br />
<code>rsync -avuphizPr --files-from=../.rsync-PodcastsDir.txt --exclude 'MusicaItaliana' --exclude 'StillGotTheBlues' --exclude 'Saga' --exclude 'RobertPalmer' --exclude 'INXS' --exclude 'Talk-Talk' --exclude 'ZZ-Top' . /media/mueller/Elements/myData/Podcasts/</code></b><br />
<br />
→ Das Verzeichnis INTENSO wurde <b>NICHT</b> im ZielVerzeichnis USB-Stick_INTENSO_2020-01-19/ </br />
angelegt, sondern alle Daten & Verzeichnisse, die in INTENSO liegen, wurden im Zielverzeichnis <br />
abgelegt (analog für das Verzeichnis INT-256GB)</br />
</br />
• Befehl zum Ersetzen von “INTENSO“ durch “INT-256GB“ (oder umgekehrt):
<code><pre>
!!:gs/<em>old</em>/<em>new</em>/:p
</pre></code>
• Das Datum im Verzeichnisnamen aktualisieren:
<code><pre>
mv USB-Stick_INT-256GB_2021-{10-24,$(date +%m-%d)}
mv USB-Stick_INT-256GB_2021-{10-24,$(date +%m-%d)}
</pre></code>
bzw.
<code><pre>
for i in $(ls -1d USB-Stick_[CI]*/)
do
echo -ne "vorher: ${i} \t"
new=${i//????-??-??/$(date +%Y-%m-%d)}
mv ${i} ${new}
echo "nachher: ${new}"
done
touch USB-Stick_[CI]*
</pre></code>!! Aufpassen! Es ist eine Eins bei <b>ls ‐1d</b>!!) (verbesserungswürdig)
<h3>Links:</h3>
<ul>
<li><a href="https://www.shellbefehle.de/befehle/rsync/" target=_blank rel="noreferrer noopener">Shellbefehle :: rsync</a></li>
<li><a href="https://linuxize.com/post/how-to-exclude-files-and-directories-with-rsync/" target="_blank" rel="noreferrer noopener">Linuxe :: How to exclude files & directories with rsync</a></li>
</ul>
</body>
</html>
<html>
s-tui is a free and open source terminal UI for monitoring your computer. <br />
It allows to monitor CPU temperature, frequency, power and utilization in<br />
a graphical way from the terminal. It is written in Python and need root<br />
permission to use the s-tui. It is useful for:
<ul>
<li>Watch your CPU temperature/utilization/frequency/power</li>
<li>See performance dips caused by thermal throttling</li>
<li>No need to use X-server. Perfect for headless usage including Raspberry PI</li>
</ul>
Let us see how to install and use s-tui on a Linux based system.
<h3>Step 1 – Install pip</h3>
Type the following command to install pip, a package management for<br />
Python using apt command/apt-get command:<br /><br />
<code>$ sudo apt install python-pip stress</code><br />
<h3>Step 2 – Install s-tui</h3>
Type the following command to install it:<br /><br />
<code>$ sudo pip install s-tui</code><br />
<br />
Arch Linux users can type the following command to install it:<br /><br />
<code>$ sudo yaourt -S s-tui</code><br />
<h3>Step 3 – Use it</h3>
Simply type the following command:<br /><br />
<code>$ sudo s-tui</code>
<h3<Getting help</h3>
s-tui has many more option. Type the following command to see them:<br /><br />
<code>$ s-tui --help</code><br />
<br />
<b>Link:</b><br />
<a href="https://www.cyberciti.biz/python-tutorials/monitor-linux-cpu-temperature-frequency-power-in-a-graphical-way/" target="_blank">nixCraft :: Monitor Linux CPU temperature, frequency, power in a graphical way</a>
</html>
<html>
<ul>
<li>Folgende Optionen stehen zur Verfügung:
<table>
<tr><td><code><b>‐‐display</b></code> </td><td></td></td>
<tr><td><code><b>‐‐query</b></code> </td><td></td></td>
<tr><td><code><b>‐‐list</b></code> </td><td></td></td>
<tr><td><code><b>‐‐get-selections</b></code> </td><td> Listet alle Master‐Alternativen (Link-Gruppen?) mit Namen und deren Status auf</td></td>
<tr><td><code><b>‐‐config</b></code> </td><td></td></td>
<tr><td><code><b>‐‐set</b></code> </td><td></td></td>
<tr><td><code><b>‐‐set-selections</b></code> </td><td></td></td>
<tr><td><code><b>‐‐install</b></code> </td><td></td></td>
<tr><td><code><b>‐‐remove</b></code> </td><td></td></td>
<tr><td><code><b>‐‐all</b></code> </td><td></td></td>
<tr><td><code><b>‐‐remove‐all</b></code> </td><td></td></td>
<tr><td><code><b>‐‐auto</b></code> </td><td></td></td>
</table></li>
</li>
<li>graphisches Tool: galternatives</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.debian.org/DebianAlternatives" target=_blank>Debian :: alternatives‐System</a></li>
<li><a href="https://packages.debian.org/search?keywords=galternatives" target=_blank>Debian :: Package galternatives</a></li>
<li><a href="https://debian-administration.org/article/91/Using_the_Debian_alternatives_system" target=_blank>Debian Administration :: Using the Debian alternatives system</a></li>
</ul>
</html>
<html>
Ein von der Homepage der HVB heruntergeladenes zip-File<br />
ließ sich nicht entpacken (entzippen):<br />
<img src="./pictures/zipFile-Fehlermeldung.png" width=685 height=280 />
<h3>Lösung:</h3>
Mit dem <b>7-zip</b>-Archiver <b><i>7z</i></b> hat es - bisher - am besten geklappt, da<br />
er _ALLE_ Files aus dem Archiv holt (im Gegensatz zu funzip, s.u.).
<code><pre>
7z e Dokumente_202008080949.zip
</pre></code>
7z verarbeitet auch Sonderzeichen (wie ß).<br />
<br />
Neben dem Befehl “e“ für die Extraktion der Archiv‐<br />
Files gibt es u.a. noch:
<ul>
<li> <b>l</b> :: List contents of archive</li>
<li><b>rn</b> :: Rename files in archive</li>
<li><b>x</b> :: Extract files with full paths</li>
<!--li><b></b> ::</li-->
</ul>
<h3>weitere Lösung:</h3>
Habe das Kommando 'funzip' verwendet:
<code><pre>
mueller@Debian-Laptop:/media/mueller/INT-256GB/EMT_tmp$ funzip
mueller@Debian-Laptop:/media/mueller/INT-256GB/EMT_tmp$ funzip
fUnZip (filter UnZip), version 3.95 of 20 January 2009
usage: ... | funzip [-password] | ...
... | funzip [-password] > outfile
funzip [-password] infile.zip > outfile
funzip [-password] infile.gz > outfile
Extracts to stdout the gzip file or first zip entry of stdin or the given file.
</pre></code><br />
→ Befehl:
<code><pre>
funzip Dokumente_202007160925.zip > Kapitalmassnahme.pdf
</pre></code>
<br />
<b>Anmerkung:</b><br />
Der Befehl extrahiert <em>IMMER</em> nur das erste File im Archiv, <br />
der Rest wird ignoriert.<br />
<br />
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.ubuntuusers.de/7z/" target=_blank>Ubuntu-Users Wiki :: 7z</a></li>
<li><a href="https://7ziphelp.com/7zip-for-linux" target=_blank>7zip Help :: 7-Zip for Linux</a></li>
</ul>
<br />
</html>
Geben Sie den Text für 'Neuer Tiddler' ein
<html>
There are many cases where a vendor will tell your <br />
that with each new upgrade of the operating system<br />
one does not need to wipe the disk clean.<br />
<br />
Whenever possible, and given the chance, wipe<br />
clean the system disk with a "newfs" or "mkfs",<br />
depending on your unix flavor.<br />
<br />
If a version number leaps an entire number<br />
for example, Version 5.3 -> version 6.2, it<br />
is highly recommended that the disk be wiped<br />
clean. In some cases it can be safe to<br />
upgrade without wiping a system disk if the<br />
version is not a full leap for example,<br />
Version 5.2 -> Versions 5.3<br />
<br />
Past history has shown that in some cases the<br />
following could happen if a system disk wasn't<br />
wiped clean first:<br />
<br />
<ol>
<li>New versions mixed with older patches can<br />
cause the system to become unstable.<br />
<br />
<li>Old configuration files are not compatible with<br />
the newer O.S.<br />
<br />
<li>Some 3rd party software or device drivers wouldn't <br />
be compatible.<br />
<br />
<li>Loss of unknown modified system files.<br />
<br />
<li>The new kernel will not be able to compile sometimes.<br />
<br />
</ol>
</html>
<html>
If you have a server with alot of filesystems<br />
on it (oracle/SAP environments) then this<br />
little awk command can come in useful. It can<br />
obviously be used in many other situations also. In<br />
this example, the file structure is /oracle/PRD/xxxx.<br />
<br /><code>
awk '/PRD/{ print "umount " $3 }' /etc/vfstab | /sbin/sh<br />
</code><br />
If you run it without piping it to 'sh', then it<br />
will show you what the command will do. <br />
You can replace the 'umount' with whatever<br />
command you like. It's a quick and easy though.<br />
<br />
<br />
</html>
<html>
<ul>
<li>Aufruf des Macro-Editors: ALT + F11</li>
</ul>
<br />
<h3>Links:</h3>
<ul>
<li>http://www.pricederivatives.com/en/</li>
<li>http://www.anthony-vba.kefra.com/<br />
u.a. http://www.anthony-vba.kefra.com/vba/vba5.htm</li>
<li>https://theexcelninja.wordpress.com/2012/10/14/excel-monte-carlo-simulation/</li>
<li>https://iversity.org/en/courses/monte-carlo-methods-in-finance</li>
<li>Buch:<br />
Implementing Models of Financial Derivatives: <br />
Object Oriented Applications with VBA, with CD-ROM<br />
Nick Webber<br />
ISBN: 978-0-470-71220-7, 78 Euro<br />
(http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0470712201.html)</li>
</ul>
<br />
</html>
<html>
<ul>
<li><h3>Alle Leerzeilen löschen</h3>
<pre><code>:g/^\s*$/d</code></pre>
</li>
<li><h3>Alle Leerzeilen löschen, die nur <br />
aus Strings der Art "10/73" bestehen:</h3>
<pre><code>:g/\d\{,2}\/\d\{,2}/d</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://blog.bmarwell.de/2009/08/26/vim-alle-zeilen-mit-einem-bestimmten-muster-loschen.html"
target="_blank" rel="noreferrer noopener">
Benjamin Marwell :: VIM: Alle Zeilen mit einem bestimmten Muster löschen </a>
</li>
</ul>
</html>
<html>
<ul>
<li><a href="https://www.cyberciti.biz/reviews/astering-vim-quickly-from-wtf-to-omg-in-no-time/"
target="_blank" rel="noreferrer noopener">
Cyberciti Buchtip</a>
</li>
<li><a href="https://vim.rtorr.com/"
target="_blank" rel="noreferrer noopener">
https://vim.rtorr.com/</a>
</li>
<li><a href="https://www.vim.page/vim-commands-cheat-sheet"
target="_blank" rel="noreferrer noopener">
Vim Commands Cheat Sheet</a>
</li>
</ul>
</html>
<html>
https://www.linux.com/learn/vim-tips-working-external-commands<br />
https://ganz-sicher.net/blog/linux-distributionen/bash-nutzliche-befehle-und-kniffe/<br />
https://www-user.tu-chemnitz.de/~hot/VIM/VIM/vikurz.html<br />
https://svenseidel.net/blog/2011/06/16/vim-automatische-sicherheitskopien/<br />
https://www-user.tu-chemnitz.de/~hot/VIM/VIM/Tipps_und_Tricks.html<br />
http://www.selflinux.org/selflinux/html/vim03.html<br />
http://stefanjahn.de/unix:vim:meine_.vimrc<br />
</html>
<html>
<ol>
<li></li>
<li></li>
<li>
<table>
<tr><th>magic</th><th>nomagic</th><th>Anzahl des Auftretens des Atoms</th></tr>
<tr><td>*</td><td>\* </td><td>0 bis unendlich, so groß wie möglich</th></tr>
<tr><td>\+ </td><td>\+ </td><td>1 bis unendlich, so groß wie möglich</th></tr>
<tr><td>\= </td><td>\= </td><td>0 oder 1</th></tr>
<tr><td>\? </td><td>\? </td><td>0 oder 1</th></tr>
<tr><td>\{n,m} </td><td>\{n,m} </td><td>n bis m, so groß wie möglich</th></tr>
<tr><td>\{n} </td><td>\{n} </td><td>n</th></tr>
<tr><td>\{n,} </td><td>\{n,} </td><td>n bis unendlich, so groß wie möglich</th></tr>
<tr><td>\{,m} </td><td>\{,m} </td><td>0 bis m, so groß wie möglich</th></tr>
<tr><td>\{} </td><td>\{} </td><td>0 bis unendlich, so groß wie möglich (äquivalent zu *)</th></tr>
<tr><td>\{-n,m} </td><td>\{-n,m} </td><td>n bis m, so klein wie möglich</th></tr>
<tr><td>\{-n} </td><td>\{-n} </td><td>n</th></tr>
<tr><td>\{-n,} </td><td>\{-n,} </td><td>n bis unendlich, so klein wie möglich</th></tr>
<tr><td>\{-,m} </td><td>\{-,m} </td><td>0 bis m, so klein wie möglich</th></tr>
<tr><td>\{-} </td><td>\{-} </td><td>0 bis unendlich, so klein wie möglich</th></tr>
</table>
</li>
<li>
<table>
<tr><th>magic </th><th>nomagic </th><th>Bedeutung</th></tr>
<tr><td>^ </td><td>^ </td><td>Zeilenbeginn, sofern es das erste Zeichen des Musters ist</td></tr>
<tr><td>$ </td><td>$ </td><td>Zeilenende, sofern es vor \| oder am Musterende steht</td></tr>
<tr><td>. </td><td>\. </td><td>beliebiges einzelnes Zeichen</td></tr>
<tr><td>\< </td><td>\< </td><td>Beginn eines Wortes</td></tr>
<tr><td>\> </td><td>\> </td><td>Ende eines Wortes</td></tr>
<tr><td>\s </td><td>\s </td><td>Whitespace‐ (Leerzeichen oder Tabulator)</td></tr>
<tr><td>\S </td><td>\S </td><td>kein Whitespace‐Zeichen (Gegenstück zu \s)</td></tr>
<tr><td>\d </td><td>\d </td><td>Ziffer ([0‐9])</td></tr>
<tr><td>\D </td><td>\D </td><td>keine Ziffer ([^0‐9])</td></tr>
<tr><td>\x </td><td>\x </td><td>Hexadezimal‐Ziffer ([0‐9A-Fa-f])</td></tr>
<tr><td>\X </td><td>\X </td><td>keine Hexadezimal‐Ziffer ([^0‐9A-Fa-f])</td></tr>
<tr><td>\o </td><td>\o </td><td>Oktal‐Ziffer ([0-7])</td></tr>
<tr><td>\O </td><td>\O </td><td>keine Oktal‐Ziffer ([^0-7])</td></tr>
<tr><td>\w </td><td>\w </td><td>Zeichen im Wort (word character, [0‐9A‐Za‐z_])</td></tr>
<tr><td>\W </td><td>\W </td><td>kein Zeichen im Wort (non‐word character, [^0‐9A‐Za‐z_])</td></tr>
<tr><td>\h </td><td>\h </td><td>Zeichen am Wortanfang (head of word character, [A‐Za‐z_])</td></tr>
<tr><td>\H </td><td>\H </td><td>kein Zeichen am Wortanfang (non‐head of word character, [^A‐Za‐z_])</td></tr>
<tr><td>\a </td><td>\a </td><td>Buchstabe ([A‐Za‐z])</td></tr>
<tr><td>\A </td><td>\A </td><td>kein Buchstabe ([^A‐Za‐z])</td></tr>
<tr><td>\l </td><td>\l </td><td>Kleinbuchstabe ([a‐z])</td></tr>
<tr><td>\L </td><td>\L </td><td>kein Kleinbuchstabe ([^a‐z])</td></tr>
<tr><td>\u </td><td>\u </td><td>Großbuchstabe ([A‐Z])</td></tr>
<tr><td>\U </td><td>\U </td><td>kein Großbuchstabe ([^A‐Z])</td></tr>
<tr><td>\e </td><td>\e </td><td>das Zeichen ESC (Escape)</td></tr>
<tr><td>\t </td><td>\t </td><td>das Zeichen HT (Horizontal-Tabulator)</td></tr>
<tr><td>\r </td><td>\r </td><td>das Zeichen CR (Carriage Return)</td></tr>
<tr><td>\b </td><td>\b </td><td>das Zeichen BS (Backspace)</td></tr>
<tr><td>~ </td><td>\~ </td><td>entspricht der zuletzt spezifizierten Ersetzungs‐Zeichenkette</td></tr>
</table>
</li>
</ol>
<h3>Beispiele:</h3>
<ul>
<li>gesuchter String: “<code><b> 3 Min.</b></code>“<br />
besteht aus:
<ul>
<li>4 Leerzeichen,</li>
<li>der Zahl “3“, es können aber auch zwei‐ oder mehrstellige Ziffern/Zahlen sein,</li>
<li>ein Leerzeichen,</li>
<li>dem String “Min“,</li>
<li>und dem Punkt, “.“</li>
</ul>
⇒ Regexp:
<code><pre>^\s\{4}\d\+\sMin\.</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www-user.tu-chemnitz.de/~hot/VIM/VIM/regexp.html"
target="_blank" rel="noreferrer noopener">
TU Chemnitz :: Reguläre Ausdrücke bei VIM</a>
</li>
</ul>
</html>
<html>
<table border="1">
<tr>
<th>magic
</th>
<th>nomagic
</th>
<th>Bedeutung
</th>
</tr>
<tr>
<td>^
</td>
<td>^
</td>
<td>Zeilenbeginn, sofern es das erste Zeichen des Musters ist
</td>
</tr>
<tr>
<td>$
</td>
<td>$
</td>
<td>Zeilenende, sofern es vor \| oder am Musterende steht
</td>
</tr>
<tr>
<td>.
</td>
<td>\.
</td>
<td>beliebiges einzelnes Zeichen
</td>
</tr>
<tr>
<td>\<
</td>
<td>\<
</td>
<td>Beginn eines Wortes
</td>
</tr>
<tr>
<td>\>
</td>
<td>\>
</td>
<td>Ende eines Wortes
</td>
</tr>
<tr>
<td>\s
</td>
<td>\s
</td>
<td>Whitespace-Zeichen (Leerzeichen oder Tabulator)
</td>
</tr>
<tr>
<td>\S
</td>
<td>\S
</td>
<td>kein Whitespace-Zeichen (Gegenstück zu \s)
</td>
</tr>
<tr>
<td>\d
</td>
<td>\d
</td>
<td>Ziffer ([0-9])
</td>
</tr>
<tr>
<td>\D
</td>
<td>\D
</td>
<td>keine Ziffer ([^0-9])
</td>
</tr>
<tr>
<td>\x
</td>
<td>\x
</td>
<td>Hexadezimal-Ziffer ([0-9A-Fa-f])
</td>
</tr>
<tr>
<td>\X
</td>
<td>\X
</td>
<td>keine Hexadezimal-Ziffer ([^0-9A-Fa-f])
</td>
</tr>
<tr>
<td>\o
</td>
<td>\o
</td>
<td>Oktal-Ziffer ([0-7])
</td>
</tr>
<tr>
<td>\O
</td>
<td>\O
</td>
<td>keine Oktal-Ziffer ([^0-7])
</td>
</tr>
<tr>
<td>\w
</td>
<td>\w
</td>
<td>Zeichen im Wort (word character, [0-9A-Za-z_])
</td>
</tr>
<tr>
<td>\W
</td>
<td>\W
</td>
<td>kein Zeichen im Wort (non-word character, [^0-9A-Za-z_])
</td>
</tr>
<tr>
<td>\h
</td>
<td>\h
</td>
<td>Zeichen am Wortanfang (head of word character, [A-Za-z_])
</td>
</tr>
<tr>
<td>\H
</td>
<td>\H
</td>
<td>kein Zeichen am Wortanfang (non-head of word character, [^A-Za-z_])
</td>
</tr>
<tr>
<td>\a
</td>
<td>\a
</td>
<td>Buchstabe ([A-Za-z])
</td>
</tr>
<tr>
<td>\A
</td>
<td>\A
</td>
<td>kein Buchstabe ([^A-Za-z])
</td>
</tr>
<tr>
<td>\l
</td>
<td>\l
</td>
<td>Kleinbuchstabe ([a-z])
</td>
</tr>
<tr>
<td>\L
</td>
<td>\L
</td>
<td>kein Kleinbuchstabe ([^a-z])
</td>
</tr>
<tr>
<td>\u
</td>
<td>\u
</td>
<td>Großbuchstabe ([A-Z])
</td>
</tr>
<tr>
<td>\U
</td>
<td>\U
</td>
<td>kein Großbuchstabe ([^A-Z])
</td>
</tr>
<tr>
<td>\e
</td>
<td>\e
</td>
<td>das Zeichen ESC (Escape)
</td>
</tr>
<tr>
<td>\t
</td>
<td>\t
</td>
<td>das Zeichen HT (Horizontal-Tabulator)
</td>
</tr>
<tr>
<td>\r
</td>
<td>\r
</td>
<td>das Zeichen CR (Carriage Return)
</td>
</tr>
<tr>
<td>\b
</td>
<td>\b
</td>
<td>das Zeichen BS (Backspace)
</td>
</tr>
<tr>
<td>~
</td>
<td>\~
</td>
<td>entspricht der zuletzt spezifizierten Ersetzungs-Zeichenkette
</td>
</tr>
</table>
<h3>Links:</h3>
<ul>
<li><a href="https://www-user.tu-chemnitz.de/~hot/VIM/VIM/regexp.html"
target="_blank" rel="noreferrer noopener">
TU Chemnitz :: Reguläre Ausdrücke bei VIM</a>
</li>
</ul>
</html>
<html>
<meta deleting empty lines />
Use either of the following commands to<br />
delete all empty lines:
<pre><code>:g/^$/d
:v/./d</code></pre>
If you want to delete all lines that are empty<br />
or that contain only whitespace characters<br />
(spaces, tabs), use either of:
<pre><code>:g/^\s*$/d
:v/\S/d</code></pre>
In the second command, v operates on lines<br />
that do not match, and \S matches anything<br />
that is not a whitespace, and d deletes the<br />
flagged lines (all lines that have no characters,<br />
or that have only whitespace characters).<br />
<br />
You may want to condense multiple blank lines<br />
into a single blank line. The following will delete<br />
all trailing whitespace from each line, then re–<br />
place three or more consecutive line endings<br />
with two line endings (a single blank line):
<pre><code>:%s/\s\+$//e
:%s/\n\{3,}/\r\r/e</code></pre>
The e substitute flag means that no error is <br />
displayed if the pattern is not found. In the<br />
second command, \n in the search pattern<br />
finds newline, while \r in the replacement <br />
inserts a newline.<br />
<br />
Another solution is to join consecutive lines<br />
found between non-blank lines:
<pre><code>:v/\S/,/\S/-j</code></pre>
<h3>Handling IDEOGRAPHIC SPACE</h3>
In CJK languages (Chinese, Japanese, Korean), <br />
the Unicode character IDEOGRAPHIC SPACE <br />
may be used. If you have 'encoding' utf-8 (and <br />
do not have the 'l' flag in 'cpoptions'), you can <br />
use \u3000 in a search pattern to specify the <br />
UTF-16 hex code for IDEOGRAPHIC SPACE. :help /\]<br />
<br />
In that case, the following will delete all empty<br />
lines, or lines that contain only combinations<br />
of space, tab or IDEOGRAPHIC SPACE:
<pre><code>:g/^[ \t\u3000]*$/d</code></pre>
An alternative procedure, which should work <br />
in other encodings, would be to enter the CJK<br />
space directly into the pattern. That is, you<br />
would type the following, but instead of '#'<br />
you would enter a CJK space:
<pre><code>:g/^[ \t#]*$/d</code></pre>
If you're not sure how to type the character, <br />
position your cursor on an example of the<br />
character that you already have in the buffer.<br />
Then type yl to yank the character. Then, <br />
enter the above :g command, but instead<br />
of '#' type Ctrl-R " (Control-R then double-<br />
quote, which will insert the contents of the<br />
unnamed register containing the yanked<br />
character). <br />
<h3>Links:</h3>
<ul>
<li><a href="https://vim.fandom.com/wiki/Remove_unwanted_empty_lines"
target="_blank" rel="noreferrer noopener">
Fandom – VIM Tips Wiki :: Remove unwanted empty lines</a>
</li>
</ul>
</html>
<html>
<ul>
<li>http://de.uwenku.com/question/p-bsxypedz-r.html
</li>
<li>https://qastack.com.de/unix/54996/automatically-create-matching-braces-in-vim
</li>
<li>https://im-coder.com/fuegen-sie-automatisch-eine-passende-klammer-in-vim-ein.html
</li>
</ul>
</html>
<html>
<ul>
<li>Show value of <em>{option}</em>:
<pre><code>:se[t] {option}?</code></pre>
</li>
<li>Highlight search:
<pre><code>:set hlsearch</code></pre>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://vimhelp.org/options.txt.html"
target="_blank" rel="noreferrer noopener">
Vim Help</a>
</li>
</ul>
</html>
<html>
<head>
<title>Unix :: VIM - Short Infos</title>
</head>
<body>
<h1>Unix :: VIM - Short Infos</h1>
<ul>
<li><b>Farben de-/aktivieren:</b></summary>
<ul>
<li>Aktivieren:
<pre><code>:syntax on</code></pre>
</li>
<li>Deaktivieren:
<pre><code>:syntax off</code></pre>
</li>
</ul>
</li>
<li><b>Die Skripte auflisten, die VIM geladen<br />
  (<em>sourced</em>) hat:</b></summary>
<ul>
<li><pre><code>:script[names]</code></pre>
</li>
</ul>
</li>
<li><b>Infos über <em>.vimrc</em> ausgeben:</b></summary>
<pre><code>:version</code></pre>
</li>
<li><b>Den Pfad zum akutell verwendeten File<br />
  <em>.vimrc</em> ausgeben:</b></summary>
<pre><code>:echo $MYVIMRC</code></pre>
</li>
<li><b>Zwischen mehreren Files wechseln: …</b></summary>
<ul>
<li><pre><code>:n</code> <em>(vorwärts, das nächste File)</em></pre>
</li>
<li><pre><code>:N</code> <em>(rückwärts, das vorherige File)</em></pre>
</li>
</ul>
</li>
<li><b>Die Register auflisten: … </b></summary>
<pre><code>:reg[ister]</code></pre>
</li>
<li><b>Die (aktuellen) Buffer auflisten: … </b></summary>
<pre><code>:ls | :files | :buffers</code></pre>
</li>
<li><b>Open file as normal user, save as<br />
  root user: </b></summary>
<pre><code>:w !sudo tee %</code></pre>
</li>
<li><b>What command should you use for<br />
  editing files that require superuser<br />
  privileges?</b></summary>
<ul>
<li>instead of <code>sudo vim</code> :: <code>sudoedit</code>
</li>
<li>entspricht <code>sudo –e</code>
</li>
</ul>
<br />
</li>
<li><b>Show diff before saving the file: … </b></summary>
<pre><code>:w !diff % -</code></pre>
</li>
<li><b>Select All Text in Vim </b></summary>
<ul>
<li><pre><code>ggVG</code></pre>
</li>
<li>Following is another representation of what happens:
<ul>
<li>gg: Move cursor to the top
</li>
<li>V: Start selecting entires lines (from the top, because of gg)
</li>
<li>G: Move cursor to the last line, selecting everything
</li>
</ul>
</li>
</ul>
<br />
</li>
<li><b>Starting from the cursor's position,<br />
  select to the <em><u>beginning</u></em> of the next word: … </b></summary>
<pre><code>vw</code></pre>
</li>
<li><b>Starting from the cursor's position, <br />
  select to the <em><u>end</u></em> of current word: … </b></summary>
<pre><code>ve</code></pre>
</li>
<!--
<li><b></b>
<pre><code></code></pre>
<br />
</li>
<li><b></b>
<pre><code></code></pre>
<br />
</li>
<li><b></b>
<pre><code></code></pre>
<br />
</li>
<li><b></b>
<pre><code></code></pre>
<br />
</li>
-->
</ul>
</body>
<footer>
<h3>Links:</h3>
<ul>
<li><a href="https://stackoverflow.com/questions/20165202/what-is-the-difference-between-buffers-and-registers-in-vim"
target="_blank" rel="noreferrer noopener">
StackOverflow :: What is the difference between buffers and registers in vim?</a>
</li>
<li><a href="https://www.baeldung.com/linux/vim-registers"
target="_blank" rel="noreferrer noopener">
Baeldung :: Using Vim Registers</a>
</li>
<li><a href="https://linuxhandbook.com/vim-buffers/"
target="_blank" rel="noreferrer noopener">
LHB :: Complete Guide to Buffers in Vim</a>
</li>
<li><a href="https://linuxhandbook.com/pro-vim-tips/"
target="_blank" rel="noreferrer noopener">
LHB :: 11 Pro Vim Tips to Get Better Editing Experience </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
</ul>
-->
</footer>
</html>
<html>
You can split screen into multiple windows in vi.<br />
(Depending on your version of VI)<br />
<br />
<ul>
<li><h3>To create an empty window enter the command:</h3>
<code><pre> :new</pre></code>
(besser als <code><pre> :split</pre></code>
da ":new" ein leeres Fenster aufmacht)<br />
</li>
<li><h3>To move between the screens use the commands:</h3>
<b>Move to lower window:</b><code><pre> ctrl‐w j</pre></code>
<b>Move to upper window: </b><code><pre>ctrl‐w k</pre></code>
</li>
<li><h3>To make the current window the only window<br />
on the screen closing all other windows:</h3>
<code><pre> :only</pre></code>
</li>
</ul>
VIM supports this feature and can be found at:<br />
<a href="http://www.math.fu-berlin.de/~guckes/vim/" target=_blank>FU Berlin :: vim</a><br />
<br />
This tip generously supported<br />
by: mailalokagg@yahoo.co.in<br />
<br />
s.a. <br />
http://www.linux.com/learn/tutorials/442415-vim-tips-using-viewports<br />
<br />
<h3>weitere vim-Optionen:</h3>
-o[N] Open N windows (default: one for each file)<br />
-O[N] Like -o but split vertically<br />
So type this to open files split horizontally, for example:<br />
vim -o file1.txt file2.txt file3.txt<br />
</html>
<html>
<h3>How to enable vim syntax colors option</h3>
<ol>
<li> Edit ~/.vimrc file by typing the command: vi ~/.vimrc</li>
<li> Append the following option</li>
<li> syntax on</li>
<li> Save and close the file</li>
<li> Test it by running vim command: vim foo.sh</li>
</ol>
Let us see steps in details.
<h3>Turn on color syntax highlighting in vim</h3>
Open a file, for example open existing file called file.c, enter:<br />
<code><b>$ vi file.c</b></code>
<br />
Now press ESC key, type “: syntax on“ i.e. type as follows:<br />
<code><b>:syntax on</b></code>
<br />
Here is C source code editing while syntax highlighting is on in vi or vim:<br />
Fig.01: Turn on or off color syntax highlighting in vi or vim
<h3>Turn off color syntax highlighting in vim</h3>
To turn it back off, press ESC key, type :
<code><pre><b>:syntax off</b></pre></code>
<h3>How do I make the syntax highlighting permanent under vim?</h3>
You can edit ~/.vimrc file and add append vim command syntax on to it. This ensures that vim will start with color syntax highlighting option:
<code><b>$ cd ~<br />
$ vi .vimrc
</b></code>
Append the following line:
<code><b>syntax on</b></code>
Save and close the file. You should now be able to use vim to edit files with syntax on options.
<h3>How to set and use a vim color scheme</h3>
You can find installed color schemes in the following path:
<code><b>/usr/share/vim/vim*/colors/</b></code>
Use the ls command to list it:
<code><b>$ ls -l /usr/share/vim/vim*/colors/</b></code>
Sample outputs:
<code><pre>
total 76
-rw-r--r-- 1 root root 2476 Jul 27 01:43 blue.vim
-rw-r--r-- 1 root root 2990 Jul 27 01:43 darkblue.vim
-rw-r--r-- 1 root root 548 Jul 27 01:43 default.vim
-rw-r--r-- 1 root root 2522 Jul 27 01:43 delek.vim
-rw-r--r-- 1 root root 2812 Jul 27 01:43 desert.vim
-rw-r--r-- 1 root root 1666 Jul 27 01:43 elflord.vim
-rw-r--r-- 1 root root 2452 Jul 27 01:43 evening.vim
-rw-r--r-- 1 root root 1958 Jul 27 01:43 industry.vim
-rw-r--r-- 1 root root 3555 Jul 27 01:43 koehler.vim
-rw-r--r-- 1 root root 2460 Jul 27 01:43 morning.vim
-rw-r--r-- 1 root root 2006 Jul 27 01:43 murphy.vim
-rw-r--r-- 1 root root 1037 Jul 27 01:43 pablo.vim
-rw-r--r-- 1 root root 2673 Jul 27 01:43 peachpuff.vim
-rw-r--r-- 1 root root 2904 Jul 27 01:43 README.txt
-rw-r--r-- 1 root root 1393 Jul 27 01:43 ron.vim
-rw-r--r-- 1 root root 2720 Jul 27 01:43 shine.vim
-rw-r--r-- 1 root root 2445 Jul 27 01:43 slate.vim
-rw-r--r-- 1 root root 1629 Jul 27 01:43 torte.vim
-rw-r--r-- 1 root root 1840 Jul 27 01:43 zellner.vim
</pre></code>
To use torte color scheme type the following in vim text editor:
<code><b>:colorscheme torte</b></code>
Sample outputs:
How to turn on or off color syntax highlighting and colors in vim
Using a vim color scheme
<h3>Summary</h3>
Add command in ~/.vimrc:<br />
<table border="1">
<tr><th>vim Command</th><th> Description/Purpose</th></tr>
<tr><td>syntax on</td><td> Enabling vi/vim syntax colors</td></tr>
<tr><td>syntax off</td><td> Disabling vi/vim syntax colors</td></tr>
<tr><td>colorscheme foo</td><td>Specifying a colorscheme called foo. <br />Use 'usr/share/vim/vim*/colors' to find installed color scheme</td></tr>
</table>
Please note that on most Linux distro vi is a symbolic link to vim.
<br />
<h3>Link:</h3>
<ul>
<li><a href="https://www.cyberciti.biz/faq/turn-on-or-off-color-syntax-highlighting-in-vi-or-vim/"
target="_blank" rel="noreferrer noopener">
Cyberciti.biz :: Turn On or Off Color Syntax Highlighting In vi or vim Editor</a>
</li>
</ul>
</html>
<html>
<ul>
<li><a href="https://vimhelp.org/options.txt.html"
target="_blank" rel="noreferrer noopener">
Bram Moolenaar :: VIM Reference Manual </a>
</li>
</ul>
</html>
<html>
<ul>
<li>Kommentarzeilen beginnen mit “
</li>
<br />
<li>gibt an, ob die Statuszeile unten angezeigt werden soll :
<code><pre>set laststatus</pre></code>
(0 := nein, 1 := nur wenn es mehr als 2 Fenster sind, 2 := immer)
</li>
<br />
<li>Farbe aus‐ resp. einschalten:
<code><pre>set syntax=[off | on]</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.freecodecamp.org/news/vimrc-configuration-guide-customize-your-vim-editor/"
target="_blank" rel="noreferrer noopener">
FreeCodeCamp :: Vimrc ‐ Configuration Guide</a>
</li>
</ul>
</html>
<html>
As a system admin, I need to use additional hard drives for to provide more storage space or to separate system data from user data. This procedure, adding physical block devices to virtualized guests, describes how to add a hard drive on the host to a virtualized guest using VMWare software running Linux as guest.<br />
<br />
It is possible to add or remove a SCSI device explicitly, or to re-scan an entire SCSI bus without rebooting a running Linux VM guest. This how to is tested under Vmware Server and Vmware Workstation v6.0 (but should work with older version too). All instructions are tested on RHEL, Fedora, CentOS and Ubuntu Linux guest / hosts operating systems.
<h3>Step # 1: Add a New Disk To Vm Guest</h3>
First, you need to add hard disk by visiting vmware hardware settings menu.
Click on VM > Settings
Fig.01: Vmware Virtual Machine Settings
Fig.01: Vmware Virtual Machine Settings
Alternatively you can press CTRL + D to bring settings dialog box.
Click on Add+ to add new hardware to guest:
Fig.02: VMWare adding a new hardware
Fig.02: VMWare adding a new hardware
Select hardware type Hard disk and click on Next
Fig.03 VMware Adding a new disk wizard
Fig.03 VMware Adding a new disk wizard
Select create a new virtual disk and click on Next
Fig.04: Vmware Wizard Disk
Fig.04: Vmware Wizard Disk
Set virtual disk type to SCSI and click on Next
Fig.05: Vmware Virtual Disk
Fig.05: Vmware Virtual Disk
Set maximum disk size as per your requirements and click on Next
Fig.06: Finalizing Disk Virtual Addition
Fig.06: Finalizing Disk Virtual Addition
Finally, set file location and click on Finish.
<h3>Step # 2: Rescan the SCSI Bus to Add a SCSI Device Without rebooting the VM</h3>
A rescan can be issued by typing the following command:
echo "- - -" > /sys/class/scsi_host/host#/scan
fdisk -l
tail -f /var/log/message
Sample outputs:
Linux Vmware Rescan New Scsi Disk Without Reboot
Fig.01:Linux Vmware Rescan New Scsi Disk Without Reboot
Replace host# with actual value such as host0. You can find scsi_host value using the following command:
# ls /sys/class/scsi_host
Output:
host0
Now type the following to send a rescan request:
echo "- - -" > /sys/class/scsi_host/host0/scan
fdisk -l
tail -f /var/log/message
Sample Outputs:
<code><pre>
Jul 18 16:29:39 localhost kernel: Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Jul 18 16:29:39 localhost kernel: Type: Direct-Access ANSI SCSI revision: 02
Jul 18 16:29:39 localhost kernel: target0:0:1: Beginning Domain Validation
Jul 18 16:29:39 localhost kernel: target0:0:1: Domain Validation skipping write tests
Jul 18 16:29:39 localhost kernel: target0:0:1: Ending Domain Validation
Jul 18 16:29:39 localhost kernel: target0:0:1: FAST-40 WIDE SCSI 80.0 MB/s ST (25 ns, offset 127)
Jul 18 16:29:39 localhost kernel: SCSI device sdb: 2097152 512-byte hdwr sectors (1074 MB)
Jul 18 16:29:39 localhost kernel: sdb: Write Protect is off
Jul 18 16:29:39 localhost kernel: sdb: cache data unavailable
Jul 18 16:29:39 localhost kernel: sdb: assuming drive cache: write through
Jul 18 16:29:39 localhost kernel: SCSI device sdb: 2097152 512-byte hdwr sectors (1074 MB)
Jul 18 16:29:39 localhost kernel: sdb: Write Protect is off
Jul 18 16:29:39 localhost kernel: sdb: cache data unavailable
Jul 18 16:29:39 localhost kernel: sdb: assuming drive cache: write through
Jul 18 16:29:39 localhost kernel: sdb: unknown partition table
Jul 18 16:29:39 localhost kernel: sd 0:0:1:0: Attached scsi disk sdb
Jul 18 16:29:39 localhost kernel: sd 0:0:1:0: Attached scsi generic sg1 type 0
Jul 18 16:29:39 localhost kernel: Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Jul 18 16:29:39 localhost kernel: Type: Direct-Access ANSI SCSI revision: 02
Jul 18 16:29:39 localhost kernel: target0:0:2: Beginning Domain Validation
Jul 18 16:29:39 localhost kernel: target0:0:2: Domain Validation skipping write tests
Jul 18 16:29:39 localhost kernel: target0:0:2: Ending Domain Validation
Jul 18 16:29:39 localhost kernel: target0:0:2: FAST-40 WIDE SCSI 80.0 MB/s ST (25 ns, offset 127)
Jul 18 16:29:39 localhost kernel: SCSI device sdc: 2097152 512-byte hdwr sectors (1074 MB)
Jul 18 16:29:39 localhost kernel: sdc: Write Protect is off
Jul 18 16:29:39 localhost kernel: sdc: cache data unavailable
Jul 18 16:29:39 localhost kernel: sdc: assuming drive cache: write through
Jul 18 16:29:39 localhost kernel: SCSI device sdc: 2097152 512-byte hdwr sectors (1074 MB)
Jul 18 16:29:39 localhost kernel: sdc: Write Protect is off
Jul 18 16:29:39 localhost kernel: sdc: cache data unavailable
Jul 18 16:29:39 localhost kernel: sdc: assuming drive cache: write through
Jul 18 16:29:39 localhost kernel: sdc: unknown partition table
Jul 18 16:29:39 localhost kernel: sd 0:0:2:0: Attached scsi disk sdc
Jul 18 16:29:39 localhost kernel: sd 0:0:2:0: Attached scsi generic sg2 type 0
</pre></code>
How Do I Delete a Single Device Called /dev/sdc?
In addition to re-scanning the entire bus, a specific device can be added or existing device deleted using the following command:
# echo 1 > /sys/block/devName/device/delete
# echo 1 > /sys/block/sdc/device/delete
How Do I Add a Single Device Called /dev/sdc?
To add a single device explicitly, use the following syntax:
<code><pre>
# echo "scsi add-single-device <H> <B> <T> <L>" > /proc/scsi/scsi
</pre></code>
Where,
<code><pre>
<H> : Host
<B> : Bus (Channel)
<T> : Target (Id)
<L> : LUN numbers
</pre></code>
For e.g. add /dev/sdc with host # 0, bus # 0, target # 2, and LUN # 0, enter:
<code><pre>
# echo "scsi add-single-device 0 0 2 0" > /proc/scsi/scsi
# fdisk -l
# cat /proc/scsi/scsi
</pre></code>
<b>Sample Outputs:</b>
<code><pre>
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 02 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
</pre></code>
<h3>Step #3: Format a New Disk</h3>
Now, you can create partition using fdisk and format it using mkfs.ext3 command:
<code><pre>
# fdisk /dev/sdc
### [if you want ext3 fs] ###
# mkfs.ext3 /dev/sdc3
### [if you want ext4 fs] ###
# mkfs.ext4 /dev/sdc3
</pre></code>
<h3>Step #4: Create a Mount Point And Update /etc/fstab</h3>
# mkdir /disk3
Open /etc/fstab file, enter:
# vi /etc/fstab
Append as follows:
/dev/sdc3 /disk3 ext3 defaults 1 2
For ext4 fs:
/dev/sdc3 /disk3 ext4 defaults 1 2
Save and close the file.
Optional Task: Label the partition
You can label the partition using e2label command. For example, if you want to label the new partition /backupDisk, enter
# e2label /dev/sdc1 /backupDisk
See “The importance of Linux partitions“
<br />
<b>Link:</b><br />
<a href="https://www.cyberciti.biz/tips/vmware-add-a-new-hard-disk-without-rebooting-guest.html" target="_blank">Cyberciti :: VMware - Add a new hard disk without rebooting guest</a>
</html>
<html>
<ul>
<li>RCLI := Remote Command Line Interface</li>
<h3>Die wichtigsten Befehle unter Linux</h3>
Für die ESX-Service-Konsole lassen sich viele Linux-Befehle verwenden, <br />
weil diese auf Red Hat Linux basiert. Im Folgenden finden Sie eine Liste <br />
der am häufigsten verwendeten Linux-Befehle sowie einige VMware-spe‐<br />
zifische Varianten.<br />
<br />
<li><b>find/cat/grep</b><br /> Diese Befehle werden für die Suche und Anzeige von Dateien sowie für die Detailsuche verwendet. Mit Find wird nach bestimmten Dateien gesucht, während der Befehl cat die Inhalte von Dateien anzeigt und Dateien miteinander verknüpft. Der Befehl grep wiederum dient zur Suche nach bestimmten Textabschnitten innerhalb einer Datei. So können Administratoren diese Befehle für die Suche nach bestimmten Elementen der Infrastruktur verwenden, beispielsweise für die Suche nach Snapshot-Dateien. Darüber hinaus ermöglichen sie auch die Anzeige von Protokoll- und Konfigurationsdateien sowie die Suche nach Informationen innerhalb von Dateien.</li>
<li><b>tail</b><br /> Zeigt den letzten Teil einer Text-basierten Datei an und ermöglicht zudem die Überwachung der Ausgabe in die Datei in Echtzeit. Mit diesem Befehl lassen sich Protokolldateien in Echtzeit überwachen.
</li>
<li><b>service</b><br /> Dient zum Starten, Anhalten und Neustarten der auf dem Host-Server ausgeführten Services (oder Programme). Zu den häufig verwendeten ESX-Services zählen mgmt-vmware, vmware-vpxa, firewall, vmware-hostd und vmware Web Access. Der Befehl ermöglicht das erneute Starten nicht mehr reagierender Services sowie einen Neustart nach Änderungen an der Konfiguration.
</li>
<li><b>nano und vi</b><br /> Für die Bearbeitung von Textdateien. Im Vergleich zu vi ist nano ein benutzerfreundlicher und einfacherer Editor. Allerdings verfügt vi über mehr Funktionen und ist leistungsstäker. Mit Texteditoren lassen sich die Konfigurationsdateien auf einem EXS-Host bearbeiten.
</li>
<li><b>Su und sudo</b><br /> Mit diesen Befehlen lässt sich der Zugriff auf Dateien steuern und eine Verwendung des Root-Account verhindern. Su gewährt Benutzerkonten mit Zugriffsbeschränkungen die Rechte eines Superusers (oder Root-Users). Sudo führt die Befehle unter dem Namen eines anderen Nutzers aus. Dies kann in der Konfigurationsdatei “sudoers“ festgelegt werden.
</li>
<li><b>ls</b><br /> Zeigt Datei- und Verzeichnisinformationen an. Mithilfe bestimmter Schalter (z. B. ltr) lassen sich detaillierte Informationen zu einer Datei anzeigen, beispielsweise Eigentümer, Größe, Berechtigungen sowie Datum und Uhrzeit der letzten Änderung.
</li>
<li><b>df und vdf</b><br /> Für die Anzeige von Informationen über das Dateisystem (Partitionen), einschließlich des freien Festplatten-Speichers. Die Anzeige von Virtual Machine File System (VMFS)-Laufwerken ist mit dem Befehl df nicht möglich. Vdf ist die VMware-Variante dieses Befehls, mit der auch Informationen zu VMFS-Laufwerken angezeigt werden. Beide Befehle verwenden den Schalter H, der die Ausgabe in lesbarer Form anzeigt (also als 2 GB statt als 2,016,044).
</li>
<li><b>ps und kill</b><br /> Mit diesen Befehlen kann das Beenden nicht mehr reagierender VMs erzwungen werden, falls diese sich weder hoch- noch herunterfahren lassen. Ps zeigt den Status des Hosts oder auf diesem gerade ausgeführte Prozesse an. Der Befehl kann viele Schalter verwenden, nutzt meist jedoch EF. Dieser zeigt sämtliche Informationen zu allen aktuell laufenden Prozessen an. Der Befehl kill wird hÄufig zusammen mit dem Befehl ps verwendet, um das Beenden bestimmter laufender Prozesse zu erzwingen.
</li>
<li><b>ping und vmkping</b><br /> Diese Befehle ermöglichen eine grundlegende Fehlersuche im Netzwerk. Mit Ping lassen sich die Verbindungen zu anderen Hosts und Geräten im Netzwerk testen. Dazu wird ein Internet Control Message Protocol-Paket versandt und auf eine Antwort gewartet. Bei Vmkping handelt es sich um die VMware-spezifische Variante des Befehls Ping. Sie nutzt den IP-Stack des VMkernel, um den VMkernel-Port eines anderen ESX-Hosts “anzupingen“. So ermöglicht der Befehl eine Fehlersuche in vMotion und bei Problemen mit dem Netzwerk-Storage.</li>
<h3>Die wichtigsten VMware ESX- und ESXi-Befehle</h3>
Diese VMware ESX- und ESXi-Befehle lassen sich über die ESX-Service-Konsole (lokal oder aus der Ferne mithilfe von Secure Shell) sowie über RCLI (in VMware Infrastructure 3) und vSphere CLI (in vSphere) ausführen. Beachten Sie die Umbenennung vieler Befehle von der alten Version esxcfg- in vicfg- (also zum Beispiel statt esxcfg-nics.pl jetzt vicfg-nics.pl) in RCLI und vSphere CLI. Die Funktionsweise beider Befehle ist identisch, allerdings plant VMware die Migration von esxcfg- auf vicfg-.
<li><b>vmkfstools</b><br /> Der vielseitige Befehl vmkfstools ist so etwas wie das Schweizer Taschenmesser für virtuelle Laufwerke. Er ermöglicht das Kopieren, Konvertieren, Umbenennen, Importieren und Exportieren sowie die Anpassung der Größe von Dateien auf virtuellen Laufwerken.
</li>
<li><b>Esxtop</b><br /> Für die Suche nach Fehlern bei Performance-Problemen. Der Befehl liefert Performance-Statistiken für Nutzung von CPU, Speicher, Laufwerk und Netzwerk in Echtzeit sowie als historische Daten.
</li>
<li><b>Esxcfg-nics</b><br /> Dieser Befehl dient zur Anzeige und Konfiguration von Netzwerk-Karten (Network Interface Cards, NICs). Er zeigt den NIC-Status an und bietet eine Möglichkeit für die Konfiguration von Geschwindigkeit und Duplex-Modus der Netzwerkkarten.
</li>
<li><b>Esxcfg-vswitch</b><br /> Für die Anzeige und Konfiguration virtueller Schalter. Mit diesem Befehl können Sie das Netzwerk konfigurieren, falls eine Verwendung des vSphere Client nicht möglich ist. Der Befehl konfiguriert Port-Gruppen und verknüpft diese mit physischen NICs (als uplinks bezeichnet). Zudem ermöglicht er die Konfiguration von virtuellen LAN-IDs, Cisco Discovery Protocol (CDP) und der MTU von vSwitches.
</li>
<li><b>Esxcfg-vswif und esxcfg-vmknic</b><br /> Diese beiden Befehle dienen zur Anzeige und Konfiguration spezieller Port-Gruppen auf vSwitches. Esxcfg-vswif konfiguriert die Netzwerk-Schnittstellen der ESX-Service-Konsole, die auch als vswif Ports bezeichnet werden.
</li>
<li><b>Esxcfg-vmknic</b><br /> Konfiguriert die VMkernel-Netzwerkschnittstellen, die für vMotion und zur Verbindung mit Network File System- und iSCSI-Netzwerk-Storage-Geräten erforderlich sind.
</li>
<li><b>Vmware-cmd</b><br /> Dieser vielseitig einsetzbare Befehl dient zum Verwalten und Abrufen von Informationen von virtuellen Maschinen. Er ermöglicht die Änderung des Energiestatus von VMs, die Verwaltung von Snapshots, das An- und Abmelden von VMs sowie das Abrufen oder Festlegen verschiedener VM-Informationen.
</li>
<li><b>Vimsh und vmware-vim-cmd</b><br /> Über die Funktionsweise dieser komplexen Befehle sollten Sie sich absolut im Klaren sein, bevor Sie sie anwenden. Bei vimsh handelt es sich um eine möchtige Shell für die Ausführung von Befehlen. Sie bietet außerdem die Möglichkeit zur Anzeige und Konfiguration vieler Einstellungen. VMware-vim-cmd ist eine Art Frontend von vimsh und ermöglicht die Verwendung des Befehls ohne Kenntnis aller Switches, die für vimsh benötigt werden.
</li>
<li><b>Vihostupdate und esxupdate</b><br /> Aktualisieren und Patchen von ESX- und ESXi-Hosts. Esxupdate wird für die ESX-Service-Konsole und vihostupdate für die RCLI/vSphere CLI verwendet. Darüber hinaus ermöglicht vihostupdate35 das Patchen von Hosts für die ESX- und ESXi-Version 3.5.
</li>
<li><b>Svmotion</b><br /> ist ein RCLI/vSphere CLI-Befehl für die Initiierung von Storage vMotion-Sitzungen. So lässt sich die virtuelle Festplatte einer VM während des Betriebs in einen anderen Datenspeicher verschieben. In Version 3.5 von ESX stellte dieser Befehl die einzige Möglichkeit zur Initiierung einer Storage vMotion-Sitzung dar. Diese Funktion wurde in vSphere der vSphere Client GUI hinzugefügt.
</li>
<li><b>Esxcfg-mpath</b><br /> Für die Anzeige und das Festlegen aller Pfade von einem Host zu seinen Storage-Geräten.
</li>
<li><b>Esxcfg-rescan</b><br /> Mit diesem Befehl kann ein Host einen bestimmten Storage-Adapter erneut scannen und so neue Storage-Geräte erkennen. Er ist ein sehr praktisches Tool zur Identifizierung neu hinzugefügter Storage-Geräte sowie bei der Entfernung oder Änderung von Geräten im Storage-Netzwerk.
</li>
<li><b>Esxcfg-scsidevs und esxcfg-vmhbadevs</b><br /> Anzeigen von Informationen über die mit einem Host verbundenen Storage-Geräte. Esxcfg-vmhbadevs wurde in ESX 3.5 verwendet und in vSphere durch esxcfg-scsidevs ersetzt.
</li>
<li><b>Esxcfg-firewall</b><br /> Für die Anzeige von Informationen über und zur Konfiguration der integrierten Firewall, mit der die ESX-Service-Konsole geschützt ist. Der Befehl öffnet und blockiert bestimmte TCP/IP-Ports für die Kommunikation der Service-Konsole mit anderen Netzwerk-Geräten.
</li>
<li><b>esxcfg-info</b><br /> Über den Befehl esxcfg-info lassen sich jede Menge Informationen über den Host abrufen, auf dem er ausgeführt wird. Es besteht die Möglichkeit zur Umleitung der Informationen in eine Textdatei, um auf diese Weise die Host-Konfiguration zu dokumentieren.
</li>
<li><b>Esxcfg-auth</b><br /> Dient zur Konfiguration der Authentifizierung der Service-Konsole an einem ESX-Host. Er ermöglicht die Authentifizierung an einem externen LDAP- oder Active-Directory-Server sowie das Festlegen verschiedener lokaler Sicherheitseinstellungen.
</li>
<li><b>vm-support</b><br /> Bei Vm-support handelt es sich um ein leistungsstarkes Tool zur Erfassung von Informationen, das in der Regel für die Fehlersuche verwendet wird. Der Befehl fasst viele Konfigurationsdaten, Protokolldateien und Ausgaben vieler Befehle in einer einzigen .tgz-Archivdatei zusammen. Er kann darüber hinaus zur Anzeige von VM-Daten sowie zum erzwungenen Beenden von VMs verwendet werden, falls diese nicht mehr reagieren.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.computerweekly.com/de/tipp/Die-25-wichtigsten-Befehle-fuer-VMware-ESX-und-ESXi" target=_blank>ComputerWeekly :: Die 25 wichtigsten Befehle für VMware ESX und ESXi</a></li>
<li><a href="https://www.vmware.com/pdf/vsphere4/r40_u1/vsp_40_u1_vcli.pdf" target=_blank>Installations- und Referenzhandbuch zur VSphere-Befehlszeilenschnittstelle</a></li>
<li><a href="https://www.vmware.com/pdf/vsphere4/r40_u1/vsp_40_u1_esx_server_config.pdf" target=_blank>ESX-Konfigurationshandbuch (Anhänge)</a></li>
<li><a href="http://www.oreillynet.com/linux/cmd/" target=_blank>Verzeichnis von Linux-Befehlen</a></li>
</ul>
</html>
<html>
<ul>
<li><b>VUCA</b> := <br />
die Abkürzung für eine Zustandsbeschreibung schwieriger Rahmenbedingungen:<br />
<br />
<ul>
<li><em><b>Volatility</b></em> (Unbeständigkeit)</li>
<li><em><b>Uncertainty</b></em> (Unsicherheit)</li>
<li><em><b>Complexity</b></em> (Komplexität)</li>
<li><em><b>Ambiguity</b></em> (Mehrdeutigkeit)</li>
</ul>
</li>
</ul>
</html>
<html>
Der Begriff <b>“Wert im Risiko“</b> oder englisch <b>“Value at Risk (VaR)“</b> <br />
bezeichnet ein Risikomaß für die Exposure bspw. eines Portfolios<br />
von Wertpapieren. Der Value at Risk gibt an, welche Verlust-<br />
höhe innerhalb eines gegebenen Zeitraums mit einer gege-<br />
benen Wahrscheinlichkeit nicht überschritten wird.<br />
<br />
Ein Value at Risk von 10 Mio. EUR bei einer Haltedauer von <br />
1 Tag und einem Konfidenzniveau von 97,5 % bedeutet, dass <br />
der potentielle Verlust der betrachteten Risikoposition von <br />
einem Tag auf den nächsten mit einer Wahrscheinlichkeit von <br />
97,5 % den Betrag von 10 Mio. EUR nicht überschreiten wird.<br />
<br />
Das Value at Risk ist heute ein Standardrisikomaß im Finanzsektor. <br />
Mittlerweile wird das Konzept auch in Industrie- und Handelsunter-<br />
nehmen für die Quantifikation diverser, meist finanzwirtschaftlicher<br
/>
Risiken, eingesetzt.<br />
<br />
Link:<br />
<a href="https://de.wikipedia.org/wiki/Value_at_Risk" target=_blank>Wikipedia :: VaR, Value at Risk</a><br />
<a href="http://www.math-it.org/Publikationen/ValueAtRisk.pdf" target=_blank>Math-IT :: Value at Risk (PDF)</a><br />
<br />
</html>
<html>
<h3>Fehlermeldung:</h3>
<ul>
<li><pre><code>Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:
mount -t vboxsf -o uid=1000,gid=1000,_netdev vagrant /vagrant
The error output from the command was:
/sbin/mount.vboxsf: mounting failed with the error: No such device</code></pre>
</li>
</ul>
<h3>Lösung:</h3>
<ul>
<li><pre><code>vagrant plugin install vagrant-vbguest</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://stackoverflow.com/questions/28328775/virtualbox-mount-vboxsf-mounting-failed-with-the-error-no-such-device"
target="_blank" rel="noreferrer noopener">
StackOverflow :: VirtualBox: mount.vboxsf: mounting failed with the error: No such device [closed] </a><br />
⇒ Antwort von <b><em>kenorb</em></b>, <em>"answered Jun 8, 2016 at 14:56"</em>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li><pre><code>ubuntu: Warning: Connection reset. Retrying …
ubuntu: Warning: Remote connection disconnect. Retrying … </code></pre>
</li>
<li>When you are stuck with your vagrant machine<br />
the way described above there is no need to <br />
boot in gui mode (and is impossible without an<br />
X server).<br />
<br />
While your VM is booting, in a separate terminal<br />
window, just find out the id of the running machine:
<pre><code>vboxmanage list runningvms</code></pre>
This will result in something like this:
<pre><code>"projects_1234567890" {5cxxxx-cxxx-4xxx-8xxx-5xxxxxxxxxx}</code></pre>
Quite often, the VM is simply waiting for you<br />
to select an option in the bootloader.<br />
<br />
You can send the appropriate keycode (in <br />
the case, Enter) to the vm with controlvm:
<pre><code>vboxmanage controlvm projects_1234567890 keyboardputscancode 1c</code></pre>
That's it. Your virtual machine will continue<br />
the boot process.
</li>
<li><h3>Alternative</h3>
<pre><code>vagrant destroy <em>VM</em>
vagrant up <em>VM</em></code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://stackoverflow.com/questions/22575261/vagrant-stuck-connection-timeout-retrying"
target="_blank" rel="noreferrer noopener">
StackOverflow :: Vagrant stuck connection timeout retrying</a>
</li>
</ul>
</html>
<html>
<ul>
<li>ist eine freie Ruby–Anwendung zum Erstellen und<br />
Verwalten virtueller Maschinen;
</li>
<li>es ermöglicht einfache Softwareverteilung (engl. Deployment)<br />
insbesondere in der Software– und Webentwicklung;
</li>
<li>es dient als Wrapper zwischen Virtualisierungssoftware wie Virtual–<br />
Box, KVM/QEMU, VMware und Hyper-V und Software-Configuration-<br />
Management-Anwendungen bzw. Systemkonfigurationswerkzeugen<br />
wie Chef, Saltstack und Puppet;
</li>
<li>wird über eine Shell gesteuert;
</li>
<li>die gesamte Konfiguration erfolgt in einem Vagrantfile, das<br />
ein spezielles Ruby–Programm enthält;
</li>
<li><h3>Anmerkung!</h3>
Um eine virtuelle Maschine zu starten, muss man im (Kopf–)–<br />
Verzeichnis der jeweiligen Umgebung sein!<br />
<br />
Am besten zuerst den Befehl
<pre><code>vagrant global-status</code></pre>
eingeben, er zeigt in der letzten Spalte den<br />
Umgebungspfad an:
<pre><code>mueller@HPLaptop:~$ vagrant global-status
id name provider state directory
-----------------------------------------------------------------------------------------------------------------
f861c57 controller virtualbox poweroff /home/mueller/clt2024-linux-security-grundlagen-main/environment/vagrant
e3eba56 node1 virtualbox poweroff /home/mueller/clt2024-linux-security-grundlagen-main/environment/vagrant
f838185 ctrlnode virtualbox poweroff /home/mueller/heiseKurs
8d29079 centos virtualbox poweroff /home/mueller/heiseKurs
</code></pre>
</li>
<li><h3>Sitzung beginnen</h3>
Um eine virtuelle Maschine zu starten, führt man den Befehl <br />
<pre><code>vagrant up [<em>VM-id]</em>]</code></pre>
aus. Anschließend kann, falls nötig, mit<br />
<pre><code>vagrant ssh</code></pre>
eine SSH-Sitzung gestartet werden.
</li>
<li><h3>Snapshorts erstellen/auflisten/zurückspielen</h3>
<ul>
<li><pre><code>vagrant snapshot save debian debian-ansible-20250503</pre></code>
</li>
<li><pre><code>vagrant snapshot list debian </pre></code>
</li>
<li><pre><code>vagrant snapshot restore debian debian-ansible-20250503</pre></code>
</li>
</ul>
</li>
<li><h3>Sitzung beenden</h3>
<ul>
<li>Maschine mit allen Abhängigkeiten komplett “zerstören“:
<pre><code>vagrant destroy [–f]</code></pre>
</li>
<li>Maschine anhalten/stoppen:
<pre><code>vagrant halt</code></pre>
</li>
<li>Maschine in einen Ruhezustand versetzen:
<pre><code>vagrant suspend</code></pre>
</li>
<li>Maschine neu starten:
<pre><code>vagrant reload</code></pre>
</li>
</ul>
</li>
<li>
<h3>Sonstiges</h3>
<ul>
<li>die vorhanden (Vagrant–)Boxes auflisten:
<pre><code>vagrant box list</code></pre>
</li>
<li>den Status sämtlicher virtueller Maschinen anzeigen:
<pre><code>vagrant global-status</code></pre>
</li>
<li>Update VMs via vagrant:
<pre><code>vagrant rsync ; vagrant provision</pre></code>
<em>aus dem CLT 2024-Workshop <a href="https://github.com/svalabs/clt2024-linux-security-grundlagen"
target="_blank" rel="noreferrer noopener">
Linux Security-Grundlagen</a></em><br />
<br />
</li>
<li>die SSH-Einstellungen bzgl. vagrant eines Hosts ermitteln<br />
(<em>outputs OpenSSH valid configuration to connect to the<br />
machine</em>):
<pre><code>vagrant ssh-config <em>HOST</em></code></pre>
</li>
<li><a href="https://app.vagrantup.com/boxes/search"
target="_blank" rel="noreferrer noopener">
Liste der verfügbaren “Vagrant‐Boxes“</a>
</li>
<br />
<li>die wichtigsten Befehle sind mit <code><b>*</b></code> markiert<br />
<code><pre>
Usage: vagrant [options] <command> [<args>]
-h, --help Print this help.
Common commands:
autocomplete manages autocomplete installation on host
box manages boxes: installation, removal, etc.
cloud manages everything related to Vagrant Cloud
* destroy stops and deletes all traces of the vagrant machine
global-status outputs status Vagrant environments for this user
* halt stops the vagrant machine
help shows the help for a subcommand
init initializes a new Vagrant environment by creating a Vagrantfile
login
package packages a running vagrant environment into a box
plugin manages plugins: install, uninstall, update, etc.
port displays information about guest port mappings
powershell connects to machine via powershell remoting
provision provisions the vagrant machine
push deploys code in this environment to a configured destination
rdp connects to machine via RDP
* reload restarts vagrant machine, loads new Vagrantfile configuration
resume resume a suspended vagrant machine
serve start Vagrant server
snapshot manages snapshots: saving, restoring, etc.
* ssh connects to machine via SSH
ssh-config outputs OpenSSH valid configuration to connect to the machine
* status outputs status of the vagrant machine
* suspend suspends the machine
* up starts and provisions the vagrant environment
upload upload to machine via communicator
* validate validates the Vagrantfile
version prints current and latest Vagrant version
winrm executes commands on a machine via WinRM
winrm-config outputs WinRM configuration to connect to the machine
For help on any individual command run `vagrant COMMAND -h`
Additional subcommands are available, but are either more advanced
or not commonly used. To see all subcommands, run the command
`vagrant list-commands`.
--[no-]color Enable or disable color output
--machine-readable Enable machine readable output
-v, --version Display Vagrant version
--debug Enable debug output
--timestamp Enable timestamps on log output
--debug-timestamp Enable debug output with timestamps
--no-tty Enable non-interactive output
</pre></code>
</li>
<li><b>Parameter <code>config.vm.hostname</code></b>:: <br />
<ul>
<li>Auf Underscores verzichten!
</li>
<li>Ansonsten erscheint eine Fehlermeldung ähnlich der folgenden:
<code><pre>
There are errors in the configuration of this machine. Please fix
the following errors and try again:
vm:
* The hostname set for the VM 'default' should only contain letters, numbers,
hyphens or dots. It cannot start with a hyphen or dot.
</pre></code>
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://developer.hashicorp.com/vagrant/downloads?product_intent=vagrant"
target="_blank" rel="noreferrer noopener">
Hashicorp :: Download page – Vagrant </a>
</li>
<li><a href="https://runebook.dev/en/docs/vagrant/-index-"
target="_blank" rel="noreferrer noopener">
Runebook.dev :: Vagrant 2.2</a>
</li>
<li><a href="https://de.wikipedia.org/wiki/Vagrant_(Software)"
target="_blank" rel="noreferrer noopener">
Wikipedia :: Vagrant (Software)</a>
</li>
<li><a href="https://www.linuxjournal.com/content/introducing-vagrant"
target="_blank" rel="noreferrer noopener">
Linux Journal :: Introducing Vagrant</a>
</li>
</ul>
<br /><br /><br /><br />
</html>
<html>
<ul>
<li>Meldung bei <code>vagrant up <em>VM-Name</em></code>:
<pre><code>Vagrant gathered an unknown Ansible version:
and falls back on the compatibility mode '1.8'.
Alternatively, the compatibility mode can be specified in your Vagrantfile:
<a href="https://www.vagrantup.com/docs/provisioning/ansible_common.html#compatibility_mode"
target="_blank" rel="noreferrer noopener">https://www.vagrantup.com/docs/provisioning/ansible_common.html#compatibility_mode</a></code></pre>
</li>
</ul>
</html>
<html>
<ul>
<li>Meldung bei <code>vagrant up <em>VM-Name</em>:
<pre><code>Vagrant is currently configured to create VirtualBox synced folders with
the `SharedFoldersEnableSymlinksCreate` option enabled. If the Vagrant
guest is not trusted, you may want to disable this option. For more
information on this option, please refer to the VirtualBox manual:
https://www.virtualbox.org/manual/ch04.html#sharedfolders
This option can be disabled globally with an environment variable:
VAGRANT_DISABLE_VBOXSYMLINKCREATE=1
or on a per folder basis within the Vagrantfile:
config.vm.synced_folder '/host/path', '/guest/path', SharedFoldersEnableSymlinksCreate: false</code></pre>
</li>
</ul>
</html>
<html>
<ul>
<li><pre><code>grep .vm.box Vagrantfile</code></pre>
</li>
<li>⇒ Ausgabe:
<pre><code>config.vm.box = "bento/fedora-40"
config.vm.box_version = "202407.23.0"
# config.vm.box_check_update = false</code></pre>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>Core valuation adjustment</h3>
<ul>
<li>Credit Valuation Adjustment (CVA)</li>
<br />
<li>Debit Valuation Adjustment (DVA)</li>
<br />
<li>Bilateral Valuation Adjustment (BVA)</li>
<br />
<li>Funding Valuation Adjustment (FVA)</li>
</ul>
<li><h3>Other valuation adjustments</h3>
<ul>
<li>Collateral Valuation Adjustment (COLVA)</li>
<br />
<li>Capital Valuation Adjustment (KVA)</li>
</br/>
<li>Margin Valuation Adjustment (MVA)</li>
</ul>
</ul>
<h3>XVA</h3>
XVA is the sum of all the adjustments applied to a trade e.g. CVA + DVA + FVA + KVA + ... .<br />
<br />
<b>Quelle:</b><br />
Centrus_CreditValueAdjustment_DebtValueAdjustment_CVA-DVA_WP_-CVADVA-4.pdf
</html>
<html>
Get the value of the last parameter<br />
passed into a korn shell script.
<code><pre>
eval last=\${$#}
</pre></code>
Now <b>$last</b> is the last parameter passed in.
</html>
<html>
Um innerhalb des Exchange-Workflows die Einträge<br />
besser lesen zu können, kann man die <b>Lupe</b><br />
verwenden.<br />
<br />
Aufruf: Drücken der mittleren Maustaste resp. des Rades<br />
</html>
<html>
Be sure to check all vital systems and<br />
processes once returning from a vacation.<br />
<br />
Don't ignore your log files or backup<br />
reports. You may have alot of email<br />
from automated jobs. <b>READ ALL OF THEM!</b><br />
</html>
<html>
Afraid that root user or someone may snoop into your personal<br />
text files? Try password protection to a file in vim, type:<br />
<code><pre>
vim +X filename
</pre></code>
Or, before quitting in vim use the vim command <code><pre>:X</pre></code>
to encrypt your file and vim will prompt for a password.<br />
<br />
Link:<br />
<a href="https://www.cyberciti.biz/open-source/command-line-hacks/20-unix-command-line-tricks-part-i/">https://www.cyberciti.biz/open-source/command-line-hacks/20-unix-command-line-tricks-part-i/</a>
</html>
<html>
Do you ever lose your way in multiple levels of parentheses<br />
or braces? If you program in Perl or C, you know what I<br />
mean. Let the vi command <pre><code>%</code></pre> help you. <br />
<br />
Move the cursor to a parenthesis or brace and type <code>%</code>. vi will move the<br />
cursor to the corresponding character. Hit <code>%</code> again and vi<br />
will return to the original parenthesis or brace.<br />
<br />
For extra power, issue <code>/{</code> to find the first open brace.<br />
Hit <code>%</code> twice to find the corresponding brace and return.<br />
Hit <code>n</code> to find the next open brace. This allows you to<br />
zip through the file checking your program structure.<br />
<br />
It makes you feel sorry for Windows-based editors!<br />
</html>
<html>
Try saving a man page to a file for viewing with vi.<br />
<br />
You will see a whole bunch of <br />
control characters.<br />
<br />
How can you save a man page <br />
in a form readable by vi?<br />
<code><pre>
$ man ls | col -b > readable_file.txt
</pre></code>
This tip generously supported by: <br />
kmehta@legato.com
</html>
<html>
If you get the error while opening a file in vi,<br />
<code><br />
"There is not enough space in the file system.<br />
[Press return to continue]"<br />
</code><br />
and you know that you have space in your home directory,<br />
than simply use this command in vi, say<br />
<code><br />
:set dir=</export/home/foobar><br />
</code><br />
then press:<br />
<code><br />
:e .<br />
</code><br />
You will be able to see the entire file.<br />
<br />
This tip generously supported by: <br />
kramakri@visa.com<br />
</html>
<html>
VI editor is a very powerful editor.<br>
<br>
Suppose you want to copy line numbers 1-10 and 23-77 of<br>
file A and paste them on file B at the same time, what will<br>
you do ?? Here I am giving a tip to do this :-<br>
<br>
Place the cursor on line no. 1<br>
Press ESCAPE<br>
Press Shift "(Shift double quotes)<br>
Press a<br>
Press 10yy [the number of lines you want to copy]<br>
<br>
Now place the cursor on line no. 23<br>
Press ESCAPE<br>
Press Shift "(Shift double quotes)<br>
Press b<br>
Press 55yy [the number of lines you want to copy]<br>
<br>
Now the first 10 lines have been copied in buffer "a" and next<br>
55 lines have been copied in buffer "b".<br>
<br>
Now press " : " (COLON) to get the vi prompt.<br>
Hit e "Destination file name"<br>
<br>
Once you enter the Destination file go to the line where you<br>
want the first 10 lines in buffer "a" to be inserted.<br>
<br>
Press ESCAPE.<br>
Press Shift "(Shift double quotes)<br>
Press a.<br>
Press p.<br>
<br>
The first 10 lines in buffer "a" gets inserted.<br>
<br>
Now go to the line where you want the rest 55 lines in buffer<br>
"b" to be inserted.<br>
<br>
Press ESCAPE.<br>
Press Shift "(Shift double quotes)<br>
Press b.<br>
Press p.<br>
<br>
The rest 55 lines in buffer "b" gets inserted.<br>
<br>
This tip generously supported <br>
by: ardhendu99@yahoo.com
</html>
<html>
While writing shell scripts in vi, have you ever considered<br>
the time wasted by going in and out of vi to test your<br>
commands by executing them on the command line.<br>
<br>
To increase your productivity, it would be a lot quicker if you<br>
could execute these commands from within the editor and view<br>
their output before writing them to your script.<br>
<br>
This is possible and quite straight forward. Enter the<br>
following within vi<br>
<br><code>
:!testscript</code><br>
(i.e. colon exclamation mark)<br>
<br>
Then enter your command as you would at the $ or # prompt.<br>
<br>
The command executes, the result is displayed and you are prompted<br>
to press return to continue.<br>
<br>
This tip generously supported<br>
by: michael.byrne@nuinternational.com<br>
</html>
<html>
Indent your lines or remove the indentation in the vi<br>
editor.<br>
<br>
<<   Shifts the current line to the left by one shift width.<br>
<br>
>>   Shifts the current line to the right by one shift width.<br>
<br>
You can set the shift width by command<br>
<code><pre>
:set sw <em># (sw :=: shiftwidth)</em>
</pre></code>
For example, the command to set the shift width to 4<br>
characters is<br>
<code><pre>
:set sw=4
</pre></code>
This tip generously supported<br>
by: neetas@noida.hcltech.com<br>
</html>
<html>
In vi editor you can reverse<br />
the order of lines by just<br />
executing the following<br />
ed command at the : prompt.<br />
<code><pre>
g/^/m0
</pre></code>
This tip generously supported by:<br />
ashutosh.tiwari@ind.xerox.com<br />
</html>
<html>
<table border="1">
<tr><td>:tabe {File} </td><td>File in neuem Tab öffnen</td></tr>
<tr><td>:tabc </td><td>Aktuellen Tab schließen</td></tr>
<tr><td>:tabo </td><td>Alle anderen Tabs schließen</td></tr>
<tr><td>:tabm [N] </td><td>Tab vor Tab N bewegen. <br />Beim Weglassen von N wird das Tab an die letzte Stelle bewegt</td></tr>
<tr><td>:tabp </td><td>Zum vorherigen Tab wechseln</td></tr>
<tr><td>:tabn </td><td>Zum nächsten Tab wechseln</td></tr>
<tr><td>:tabdo {cmd} </td><td>{cmd} in allen Tabs ausführen</td></tr>
</table>
<h3>Quelle:</h3>
Vim_CheatSheet.pdf
</html>
<html>
<table border="1">
<tr><td>gqq </td><td>Aktuelle Zeile formatieren</td></tr>
<tr><td>gqap </td><td>Aktuellen Absatz formatieren</td></tr>
<tr><td>v_gq </td><td>Markierten Bereich formatieren</td></tr>
</table>
Anstelle von “gq“ kann auch “gw“ verwendet werden.<br />
Nach dem Formatieren steht dann der Cursor wieder an <br />
derselben Stelle wie zuvor.
<h3>Links:</h3>
<ul>
<li>Vim_CheatSheet.pdf
</li>
<li>vim-commands-cheat-sheet-by-pnap.pdf
</li>
</ul>
</html>
<html>
<ul>
<li><h3>Wichtig!</h3>
Der ursprüngliche vi bietet(e) <em>kein</em> Folding an.<br />
<br />
Standardmäßig ist eine abgespeckte VIM-Version installiert (<code><b><em>vim‐tiny</em></b></code>), die über<br />
wesentlich weniger Funktionen verfügt als das Original (z.B. kein Verzeichnis‐<br />
browser).<br />
<br />
Will man ernsthaft mit VIM arbeiten, sollte das folgende Paket installiert werden:
<code><pre>
vim
</pre></code>
</li>
<li>To activate folding in your text, you will need to set the option
<code><pre>
foldmethod
</pre></code>
Folgende Werte stehen für diese Option zur Verfügung:
<ul>
<li> <b>manual</b> ‐ folds must be defined by entering commands (such as zf)</li>
<li> <b>indent</b> ‐ groups of lines with the same indent form a fold</li>
<li> <b>syntax</b> ‐ folds are defined by syntax highlighting</li>
<li> <b>expr</b> ‐ folds are defined by a user-defined expression</li>
<li> <b>marker</b> ‐ special characters can be manually or automatically added to your text to flag the start and end of folds</li>
<li> <b>diff</b> ‐ used to fold unchanged text when viewing differences (automatically set in diff mode)</li>
</ul>
<br />
Anscheinend ist die Option schon automatisch auf <code><b>manual</b></code> gesetzt.
<table border="1">
<tr>
<td align="center"> <b>zf#j<code></b>
</td>
<td> Erzeuge Faltung<br />
Mit <b>zf6j</b> kann man zum Beispiel die nächsten 6 Zeilen einklappen.
</td>
</tr>
<tr>
<td align="center"> <b>zo</b> </td><td> Open one fold under the cursor. When a count is given, that<br />
many folds deep will be opened. In Visual mode one level of<br />
folds is opened for all lines in the selected area.<br />
</td>
</tr>
<tr>
<td align="center"> <b>zO</b> </td><td> Open all folds under the cursor recursively. Folds that don't<br />
contain the cursor line are unchanged.<br />
In Visual mode it opens all folds that are in the selected<br />
area, also those that are only partly selected.<br />
</td>
</tr>
<tr>
<td align="center"> <b>zR</b>
</td>
<td> Open all folds. This sets 'foldlevel' to highest fold level.
</td>
</tr>
<tr>
<td align="center"> <b>zc</b> </td><td> Close one fold under the cursor. When a count is given, that<br />
many folds deep are closed. In Visual mode one level of folds<br />
is closed for all lines in the selected area.<br />
'foldenable' will be set.<br />
</td>
</tr>
<tr>
<td align="center"> <b>zC</b> </td><td> Close all folds under the cursor recursively. Folds that<br />
don't contain the cursor line are unchanged.<br />
In Visual mode it closes all folds that are in the selected<br />
area, also those that are only partly selected.<br />
'foldenable' will be set.<br />
</td>
</tr>
<tr>
<td align="center"><b>:<<em>Startzeile</em>>,<<em>Endzeile</em>>fo</b>
</td>
<td>Faltung im Command Modus erzeugen; <br />
<br />
z.B. <code>:4,10fo</code><br />
</td>
</tr>
<tr>
<td align="center"><b>zf<em>#</em>j</b>
</td>
<td>Creates a fold from the cursor down # lines<br />
<br />
mit “#“ ist die Angabe der zusätzlichen Zeilen gemeint;<br/>
z.B. <code>zf11j</code>, d.h. es werden weitere 11 Zeilen in die Fal‐<br />
tung mit einbezogen;<br />
<br />
Mit <b>zf6j</b> kann man zum Beispiel die nächsten 6 Zeilen<br />
einklappen.<br>
<br />
</td>
</tr>
<tr>
<td align="center"><b>zo</b> # <em>Buchstabe O</em></b>
</td>
<td>Öffne aktuelle Faltung
</td>
</tr>
<tr>
<td align="center"><b>zO</b># <em>Buchstabe O</em>
</td>
<td>Öffne sämtliche Faltungen, die sich in <br />
  der aktuellen Faltung befinden
</td>
</tr>
<tr>
<td align="center"><b>zR</b>
</td>
<td>Öffne sämtliche Faltungen im File
</td>
</tr>
<tr>
<td align="center"><b>zM</b>
</td>
<td>Das Gegenteil (sämtliche offenen Faltungen im File schließen)
</td>
</tr>
<tr>
<td align="center"><b>zc</b>
</td>
<td>Schliesse aktuelle Faltung
</td>
</tr>
<tr>
<td align="center"><b>zC</b>
</td>
<td>Schliesse sämtliche Faltungen, die<br />
  sich in der aktuellen Faltung befinden
</td>
</tr>
<tr>
<td align="center"><b>za</b>
</td>
<td>Toggle fold at cursor
</td>
</tr>
<tr>
<td align="center"><b>zA</b>
</td>
<td>- When on a closed fold: open it recursively.<br />
  - When on an open fold: close it recursively<br />
    and set 'foldenable'.
</td>
</tr>
<tr>
<td align="center"><b>zm</b>
</td>
<td>Increase foldlevel by one
</td>
</tr>
<tr>
<td align="center"><b>zr</b>
</td>
<td>Reduce foldlevel, decreases the foldlevel by one.
</td>
</tr>
<tr>
<td align="center"><b>zR</b>
</td>
<td>Reduce foldlevel to 0, decreases the foldlevel<br />
  to zero i.e. all folds will be open.
</td>
</tr>
<tr>
<td align="center"><b>zx</b>, <b>zX</b>
</td>
<td>Force update folds
</td>
</tr>
<tr>
<td align="center"><b>zf/</b>
</td>
<td>String creates a fold from the cursor to string
</td>
</tr>
<tr>
<td align="center"><b>zj</b>
</td>
<td>Moves the cursor to the next fold
</td>
</tr>
<tr>
<td align="center"><b>zk</b>
</td>
<td>Moves the cursor to the previous fold.
</td>
</tr>
<tr>
<td align="center"><b>zv</b>
</td>
<td>View cursor line: Open just enough folds to<br />
  make the line in which the cursor is located<br />
  not folded
</td>
</tr>
<tr>
<td align="center"><b>zd</b>
</td>
<td>Deletes the fold at the cursor.
</td>
</tr>
<tr>
<td align="center"><b>zE</b>
</td>
<td>Deletes all folds
</td>
</tr>
<tr>
<td align="center"><b>[z</b>
</td>Move to start of open fold
</td>
</tr>
<tr>
<td align="center"><b>]z</b>
</td>
<td>Move to end of open fold
</td>
</tr>
<tr>
<td align="center"><b>zfa}</b>
</td>
<td>Möchte man zB. einen kompletten Codeblock,<br>
  welcher in geschweiften Klammern einge–<br />
  schlossen ist, einklappen, benutzt man folgen–<br />
  den Befehl
</td>
</tr>
<tr>
<td align="center"><b>|:mkview|</b>
</td>
<td>The manual folds are lost when you abandon<br />
  the file. To save the folds use the command
</td>
</tr>
<tr>
<td align="center"><b>|:loadview|</b>
</td>
<td>The view can be restored later with
</td>
</tr>
</table>
<br>
Befindet man sich mit dem Cursor über der eingeklappten Zeile,<br>
kann man mit <b>zo</b> die Zeilen wieder vollständig aufklappen.<br>
<br>
Möchte man zB. einen kompletten Codeblock, welcher in geschweiften<br>
Klammern eingeschlossen ist, einklappen, benutzt man folgenden Befehl: <b>zfa}</b><br>
<br>
<h3>Link:</h3>
<ul>
<li><a href="https://wiki.ubuntuusers.de/VIM/" target="_blank" rel="noreferrer noopener">Ubuntu‐Users Wiki: VIM</a></li>
<li><a href="https://wiki.ubuntuusers.de/VIM/#Folding" target="_blank" rel="noreferrer noopener">Ubuntu‐Users Wiki: VIM ‐ Folding</a></li>
<li><a href="https://vim.help/28-folding" target="_blank" rel="noreferrer noopener">VIM Reference Manual :: Chapter 28 ‐ Folding</a></li>
<li><a href="http://vim.wikia.com/wiki/Folding" target="_blank" rel="noreferrer noopener">VimWikia.com: Folding</a></li>
<li><a href="http://www.hyperblog.de/hoergen.php/2009/02/15/vim_mal_praktisch" target="_blank" rel="noreferrer noopener">HyperBlog: Vim mal praktisch</a></li>
<li><a href="https://www.baeldung.com/linux/vi-text-code-folding"
target="_blank" rel="noreferrer noopener">
Baeldung :: Text and Code Folding in Vi</a>
</li>
<li><a href="https://stackoverflow.com/questions/2362914/fold-function-in-vim"
target="_blank" rel="noreferrer noopener">
StackOverflow :: Fold function in vim</a>
</li>
<li><a href="https://vim-jp.org/vimdoc-en/fold.html#fold-commands"
target="_blank" rel="noreferrer noopener">
vim-jp :: fold - Vim Documentation</a>
</li>
</ul>
</html>
<html>
<body>
<table width=400 border="1">
<tr>
<th>Aktion
</th>
<th>Befehl
</th>
</tr>
<tr>
<td>Tasten‐Befehls‐Präfix
</td>
<td><pre><code>Strg+w</code></pre>
</td>
</tr>
<tr>
<td>Fenster waagerecht teilen<br />
</td>
<td><pre><code>:split</pre></code>
<pre><code>Strg+ws</pre></code>
</td>
</tr>
<tr>
<td>To open a split window with an empty buffer: … <br />
</td>
<td><pre><code>:new</pre></code>
<pre><code>Strg+wn</pre></code>
</td>
</tr>
<tr>
<td>Aktuelles Fenster wird einziges Fenster<br />
</td>
<td><pre><code>:on[ly]</pre></code>
<pre><code>Strg+wo</pre></code>
</td>
</tr>
<tr>
<td>In das untere Fenster wechseln<br />
</td>
<td><pre><code>Strg+wj </pre></code>
</td>
</tr>
<tr>
<td>In das obere Fenster wechseln<br />
</td>
<td><pre><code>Strg+wk</pre></code>
</td>
</tr>
<tr>
<td>Fenster senkrecht teilen<br />
</td>
<td><pre><code>:vsplit</pre></code>
<pre><code>Strg+wv</pre></code>
</td>
</tr>
<tr>
<td>In das linke Fenster wechseln<br />
</td>
<td><pre><code>Strg+wh </pre></code>
</td>
</tr>
<tr>
<td>In das rechte Fenster wechseln<br />
</td>
<td><pre><code>Strg+wl</pre></code>
</td>
</tr>
<tr>
<td>Das Fenster schließen<br />
</td>
<td><pre><code>:close</pre></code>
<pre><code>Strg+wc</pre></code>
</td>
</tr>
<tr>
<td>In das nächste Fenster vorwärts <br />
  (zyklisch) wechseln<br />
</td>
<td><pre><code>Strg+w Strg+w</pre></code>
<pre><code>Strg+w w</pre></code>
</td>
</tr>
<tr>
<td>jump in the opposite direction: … <br />
</td>
<td><pre><code>Strg+w W</pre></code>
</td>
</tr>
<tr>
<td>Das aktuelle Fenster maximal ver– <br />
  größern<br />
</td>
<td><pre><code>Strg+w_ </pre></code>
</td>
</tr>
<tr>
<td>Alle Fenster gleich groß machen: … <br />
</td>
<td><pre><code>Strg+w= </pre></code>
</td>
</tr>
<tr>
<td>jump to the n-th window: … <br />
</td>
<td><pre><code>Strg+w<em>No.</em>w</pre></code>
</td>
</tr>
<tr>
<td>go to the previous, last accessed window: … <br />
</td>
<td><pre><code>Strg+w p</pre></code>
</td>
</tr>
<tr>
<td>go to the top left window: … <br />
</td>
<td><pre><code>Strg+w t </pre></code>
</td>
</tr>
<tr>
<td>go to the bottom right window: … <br />
</td>
<td><pre><code>Strg+w b</pre></code>
</td>
</tr>
<tr>
<td>give the maximum available vertical<br />
  space to the active window (<em>Window<br />
  vergrößern</em>): … <br />
</td>
<td><pre><code>Strg+w | </pre></code>
</td>
</tr>
</table>
<br style=“clear:both;“ />
</body>
<footer>
<h3>Link:</h3>
<ul>
<li>[1] HyperBlog: Vim mal praktisch [<em>scheint nicht mehr zu existieren</em>]</a>
</li>https://www.baeldung.com/linux/vim-windows
<li>[2] <a href="https://www.baeldung.com/linux/vim-windows"
target="_blank" rel="noreferrer noopener">
Baeldung :: Working With Vim Windows</a>
</li>
</ul>
</footer>
<br /><br /><br /><br />
</html>
<html>
<ul>
<li>gleichzeitig die Klammern <code>(</code>, <code>)</code> und<br />
das Apostrophe-Zeichen "löschen":
<pre><code>:%s/[(\)']//g</code></pre>
</li>
</ul>
</html>
<html>
<ul>
<li>[1] If a "-" appears immediately after the "{", then a shortest match
first algorithm is used (see example below). In particular, "\{-}" is
the same as "*" but uses the shortest match first algorithm. BUT: A
match that starts earlier is preferred over a shorter match: "a\{-}b"
matches "aaab" in "xaaab".
</li>
<li><table border="1">
<tr>
<th>Example
</th>
<th>matches
</th>
</tr>
<tr>
<td>ab\{2,3}c
</td>
<td>"abbc" or "abbbc"
</td>
</tr>
<tr>
<td>a\{5}
</td>
<td>"aaaaa"
</td>
</tr>
<tr>
<td>ab\{2,}c
</td>
<td>"abbc", "abbbc", "abbbbc", etc.
</td>
</tr>
<tr>
<td>ab\{,3}c
</td>
<td>"ac", "abc", "abbc" or "abbbc"
</td>
</tr>
<tr>
<td>a[bc]\{3}d
</td>
<td>"abbbd", "abbcd", "acbcd", "acccd", etc.
</td>
</tr>
<tr>
<td>a\(bc\)\{1,2}d
</td>
<td>"abcd" or "abcbcd"
</td>
</tr>
<tr>
<td>a[bc]\{-}[cd]
</td>
<td>"abc" in "abcd"
</td>
</tr>
<tr>
<td>a[bc]*[cd]
</td>
<td>"abcd" in "abcd"
</td>
</tr>
</table>
The } may optionally be preceded with a backslash: \{n,m\}.
</li>
</ul>
<h3>\@= :: Matches the preceding atom with zero width</h3>
<ul>
<li>
Like "(?=pattern)" in Perl.
Example matches
foo\(bar\)\@= "foo" in "foobar"
foo\(bar\)\@=foo nothing
*/zero-width*
When using "\@=" (or "^", "$", "\<", "\>") no characters are included
in the match. These items are only used to check if a match can be
made. This can be tricky, because a match with following items will
be done in the same position. The last example above will not match
"foobarfoo", because it tries match "foo" in the same position where
"bar" matched.
Note that using "\&" works the same as using "\@=": "foo\&.." is the
same as "\(foo\)\@=..". But using "\&" is easier, you don't need the
parentheses.
</li>
</ul>
<h3>\@! :: Matches with zero width if the preceding atom does NOT match at the current position. |/zero-width|</h3>
<ul>
<li>
Like "(?!pattern)" in Perl.
Example matches
foo\(bar\)\@! any "foo" not followed by "bar"
a.\{-}p\@! "a", "ap", "app", "appp", etc. not immediately
followed by a "p"
if \(\(then\)\@!.\)*$ "if " not followed by "then"
Using "\@!" is tricky, because there are many places where a pattern
does not match. "a.*p\@!" will match from an "a" to the end of the
line, because ".*" can match all characters in the line and the "p"
doesn't match at the end of the line. "a.\{-}p\@!" will match any
"a", "ap", "app", etc. that isn't followed by a "p", because the "."
can match a "p" and "p\@!" doesn't match after that.
You can't use "\@!" to look for a non-match before the matching
position: "\(foo\)\@!bar" will match "bar" in "foobar", because at the
position where "bar" matches, "foo" does not match. To avoid matching
"foobar" you could use "\(foo\)\@!...bar", but that doesn't match a
bar at the start of a line. Use "\(foo\)\@<!bar".
Useful example: to find "foo" in a line that does not contain "bar":
/^\%(.*bar\)\@!.*\zsfoo
This pattern first checks that there is not a single position in the
line where "bar" matches. If ".*bar" matches somewhere the \@! will
reject the pattern. When there is no match any "foo" will be found.
The "\zs" is to have the match start just before "foo".
</li>
</ul>
<h3>\@<= Matches with zero width if the preceding atom matches just before what follows. |/zero-width|</h3>
<ul>
<li>
Like "(?<=pattern)" in Perl, but Vim allows non-fixed-width patterns.
Example matches
\(an\_s\+\)\@<=file "file" after "an" and white space or an
end-of-line
For speed it's often much better to avoid this multi. Try using "\zs"
instead |/\zs|. To match the same as the above example:
instead |/\zs|. To match the same as the above example:
an\_s\+\zsfile
At least set a limit for the look-behind, see below.
"\@<=" and "\@<!" check for matches just before what follows.
Theoretically these matches could start anywhere before this position.
But to limit the time needed, only the line where what follows matches
is searched, and one line before that (if there is one). This should
be sufficient to match most things and not be too slow.
In the old regexp engine the part of the pattern after "\@<=" and
"\@<!" are checked for a match first, thus things like "\1" don't work
to reference \(\) inside the preceding atom. It does work the other
way around:
Bad example matches
\%#=1\1\@<=,\([a-z]\+\) ",abc" in "abc,abc"
However, the new regexp engine works differently, it is better to not
rely on this behavior, do not use \@<= if it can be avoided:
Example matches
\([a-z]\+\)\zs,\1 ",abc" in "abc,abc"
</li>
</ul>
<h3>\@123<= :: Like "\@<=" but only look back 123 bytes</h3>
<ul>
<li>This avoids trying lots of matches that are known to fail and make executing the pattern very
slow. Example, check if there is a "<" just before "span":
/<\@1<=span
This will try matching "<" only one byte before "span", which is the
only place that works anyway.
After crossing a line boundary, the limit is relative to the end of
the line. Thus the characters at the start of the line with the match
are not counted (this is just to keep it simple).
The number zero is the same as no limit.
</li>
</ul>
<h3>\@/<! :: Matches with zero width if the preceding atom does NOT match just before what follows</h3>
<ul>
<li> Thus this matches if there is no position in the
current or previous line where the atom matches such that it ends just
before what follows. |/zero-width|
Like "(?<!pattern)" in Perl, but Vim allows non-fixed-width patterns.
The match with the preceding atom is made to end just before the match
with what follows, thus an atom that ends in ".*" will work.
Warning: This can be slow (because many positions need to be checked
for a match). Use a limit if you can, see below.
Example matches
\(foo\)\@<!bar any "bar" that's not in "foobar"
\(\/\/.*\)\@<!in "in" which is not after "//"
</li>
</ul>
<h3>\@123<! :: Like "\@<!" but only look back 123 bytes</h3>
<ul>
<li>This avoids trying lots of
matches that are known to fail and make executing the pattern very
slow.
</li>
</ul>
<h3>\@> :: Matches the preceding atom like matching a whole pattern</h3>
<ul>
<li>Like "(?>pattern)" in Perl.
Example matches
\(a*\)\@>a nothing (the "a*" takes all the "a"'s, there can't be
another one following)
This matches the preceding atom as if it was a pattern by itself. If
it doesn't match, there is no retry with shorter sub-matches or
anything. Observe this difference: "a*b" and "a*ab" both match
"aaab", but in the second case the "a*" matches only the first two
"a"s. "\(a*\)\@>ab" will not match "aaab", because the "a*" matches
the "aaa" (as many "a"s as possible), thus the "ab" can't match.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>[1] Abschnitt aus VIM - Helppage <code>:help non-greedy</code>
</li>
<li>[2] <a href="https://stackoverflow.com/questions/1305853/how-can-i-make-my-match-non-greedy-in-vim"
target="_blank" rel="noreferrer noopener">
StackOverflow :: How can I make my match non greedy in vim?</a>
</li>
<li>[3] <a href="https://medium.com/@wpcarro/non-greedy-regular-expressions-7dfb5177d57e"
target="_blank" rel="noreferrer noopener">
William Carroll :: Non-Greedy Regular Expressions [Medium]</a>
</li>
<li>[4] <a href="https://blog.kiprosh.com/regular-expressions-greedy-vs-non-greedy/"
target="_blank" rel="noreferrer noopener">
kiprosh :: Regular Expressions - Greedy vs non-greedy</a>
</li>
<!--
https://vimtricks.com/p/vimtrick-minimize-greed/
https://renenyffenegger.ch/notes/development/vim/script/regular_expressions/non_greedy
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<head>
<meta charset="utf-8" />
<style>
code {
font-family: Consolas,"courier new";
font-size: 95%;
color: red;
background-color: #f1f1f1;
padding: 2px;
}
</style>
</head>
<body>
<ul>
<li>wurde mit Vim-Version 7.0 eingeführt;
</li>
</ul>
<table>
<tr>
<td>Opening a tab
</td>
<td><code>:tabnew [ file ]</code>
</td>
<tr>
</tr>
<td>Opening VIM with files in tabs:</summary><br />
</td>
<td><code>vim –p file-1 file-2 …</code>
</td>
</tr>
<tr>
<td>Moving to the <b>next</b> tab
</td>
<td><code>:tabn</code><br />
<br />
Alternative: <code>gt</code>
</td>
</tr>
<tr>
<td>Moving to the <b>previous</b> tab
</td>
<td><code>:tabp</code><br />
<br />
Altenative: <code>gT</code><br />
</td>
<tr>
</tr>
<td>Close current tab:</summary><br />
</td>
<td><code>:tabclose</code><br />
bzw.<br />
<code>:tabc</code><br />
</td>
</tr>
<tr>
<td>Close all OTHER tabs (leave ONLY currently selected tab)
</td>
<td><code>:tabonly</code><br />
bzw.<br />
<code>:tabo</code><br />
</td>
</tr>
<tr>
<td>List of tabs currently in VIM:</summary><br />
</td>
<td><code>:tabs</code><br />
</td>
</tr>
<tr>
<td>Switchting to the n-th tab
</td>
<td><code><em>n</em>gt</code><br />
<br />
The number specified is absolute, not relative;<br />
</td>
</tr>
<tr>
<td>Switch to the <b>first</b> tab
</td>
<td><code>:tabr</code><br />
bzw.<br />
<code>:tabrewind</code><br />
</td>
</tr>
<tr>
<td>Switch to the <b>last</b> tab
</td>
<td><code>:tabl</code><br />
bzw.<br />
<code>:tablast</code><br />
</td>
</tr>
<tr>
<td>Move the current tab to after N tabs from the start
</td>
<td> <code>:tabm</code><br />
bzw.<br />
<code>:tabmove</code><br />
</td>
</tr>
</table>
<ul>
<li>The default maximum number of <br />
open tabs when invoking VIM is <br /
10 tabs;
</li>
<li>This setting can be changed by <br />
editing the config file, .vimrc<br />
and adjusting the option <b>tabpagemax</b><br />
e.g. <code>set tabpagemax=15</code>
</li>
</ul>
<!--
<li><details><summary>Das aktuelle Fenster maximal vergrößern</summary><br />
Strg+w_ </details><br />
</li>
<li><details><summary>Alle Fenster gleich groß machen</summary><br />
Strg+w= </details><br />
</li>
-->
<h3>Link:</h3>
<ul>
<li><a href="https://webdevetc.com/blog/tabs-in-vim/"
target="_blank" rel="noreferrer noopener">
WebDevTec :: Beginners Guide to Tabs in VIM</a>
</li>
<li><a href="https://www.linux.com/training-tutorials/vim-tips-using-tabs/"
target="_blank" rel="noreferrer noopener">
Linux.com :: Vim tips: Using tabs</a>
</li>
<li><a href="https://learnbyexample.github.io/tips/vim-tip-21/"
target="_blank" rel="noreferrer noopener">
GitHub – Learning by example :: Vim tip 21: working with tabs</a>
</li>
<li><a href="https://superuser.com/questions/271680/vim-plugin-presenting-a-list-of-open-tabs"
target="_blank" rel="noreferrer noopener">
StackExchange - SuperUser :: Vim plugin presenting a list of open tabs</a>
</li>
</ul>
</body>
</html>
<html>
<table>
<tr>
<th>Befehl
</th>
<th>Aktion
</th>
</tr>
<tr>
<td>vim -p {datei1} {datei2} {datei3}
</td>
<td>vim mit allen genannten Files, jedes in einem eigenen Tab-Fenster, laden
</td>
</tr>
<tr>
<td>tabe {datei}
</td>
<td>Neues Tab öffnen und Datei {datei} laden.
</td>
</tr>
<tr>
<td>gt
</td>
<td>Zum nächsten Tab springen
</td>
</tr>
<tr>
<td>gT
</td>
<td>Zum vorherigen Tab springen
</td>
</tr>
<tr>
<td>tabr
</td>
<td>Zum ersten Tab springen
</td>
</tr>
<tr>
<td>tabl
</td>
<td>Zum letzten Tab springen
</td>
</tr>
<tr>
<td>tabm {n}
</td>
<td>Verschiebt das aktuelle Tab auf Position {n}|
</td>
</tr>
<tr>
<td>tabdo {vi cmd}
</td>
<td>Führt das Kommando in allen geöffneten Tabs aus
</td>
</tr>
<tr>
<td>tabn / tabp
</td>
<td>zum nächsten / vorherigen Tab wechseln
</td>
</tr>
</table>
</html>
<html>
<h3>Execute external commands in Vim</h3>
<ul>
<li>To do this, in the command mode of Vim, just input colon (:) followed by <br />
a bang (!) and finally the shell command possibly followed by the further <br />
informations:
<code><pre>:! <em>ShellBefehl</em></pre></code><br />
Beispiel:
<code><pre>:! <em>date</em></pre></code><br />
</li>
<li>This feature can come in really handy in situations where, say, <br />
you are writing a code or script, and want to quickly know whether<br />
or not the code/script contains any compile-time or syntax errors.<br />
<br />
Moving on, in case the requirement is to add the output to the file, <br />
use the <code><b>':read !'</b></code> command (also <code><b>':r !'</b></code> possible). Here's an example:
<code><pre>
:read ! wc %
</pre></code>
The <code><b>':read !'</b></code> command inserts the output of the external command<br />
on a new line below the current line in the file being edited. If you<br />
want, you can also specify a particular line number ‐ the output will<br />
be added after that particular line.<br />
<br />
For example, the following command will add the output of 'wc' after<br />
the second line the file.
<code><pre>
:2read ! wc %
</pre></code>
<b>Note:</b><br />
Use '$' to insert after the last line and '0' to insert before the first line.<br />
<br />
Now, here's the command that'll help you save the file without needing<br />
to close it first (which means no loss of unsaved changes) and then<br />
opening it with, say, sudo. (wenn man keine Permissions auf dem File hat)<br />
<code><pre>
:w ! sudo tee %
</pre></code>
</li>
</ul>
<h3>Access Shell in Vim</h3>
<ul>
<li>In addition to executing individual commands, you can also have <br />
yourself dropped in a newly‐launched shell from within Vim. For this, <br />
all you have to do is to run the following command from the editor:
<code><pre>
:shell
</pre></code>
or
<code><pre>
:sh
</pre></code>
and type 'exit' when you are done with the shell work - this<br />
will bring you back into the Vim session from where you left<br />
initially.
<!--
<li></li>
<li></li>
<li></li>
-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.howtoforge.com/tutorial/how-to-access-shell-or-run-external-commands-from-within-vim/" target=_blank>HowToForge :: How to access shell or run external commands from within vim</a></li>
</ul>
</html>
<html>
<ul>
<li>Um alle Leerzeilen in einer Textdatei zu löschen:
<pre><code>g/^$/d</code></pre>
</li>
</ul>
<!--
<h3>Links:</h3>
<ul>
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
</ul>
-->
</html>
<html>
Vim lässt sich selbstverständlich auch als Hexeditor nutzen. <br />
Dafür wird (normalerweise) gleichzeitig mit Vim das kleine <br />
Programm <b>xxd</b> installiert. Dieses sollte also auf jedem System zu<br />
finden sein, auf dem Vim installiert ist.<br />
<br />
Wenn man Binärdateien öffnet, sollte man die Option -b von<br />
Vim nutzen, was den Binärmodus anschaltet:<br />
<br /> <code>
vim -b datei.bin<br />
</code><br />
xxd kann nun mittels eines Filters auf die geöffnete Datei <br />
angewendet werden:<br />
<br /><code>
:%!xxd<br />
</code><br />
Damit wird aus dem folgenden Inhalt<br />
<code>
Ein Test<br />
</code><br />
die Hex-Repräsentation<br />
<code>
00000000: 4569 6e20 5465 7374 0a Ein Test.<br />
</code> <br />
Die Zahl vor dem Doppelpunkt ist das Offset des <br />
ersten Zeichens in der Zeile (in hexadezimaler<br />
Schreibweise), also das wievielte Zeichen es ist. <br />
Danach folgt die hexadezimale Repräsentation<br />
der Zeile bestehend aus (bis zu) 16 Bytes. Danach<br />
sieht man die ASCII-Repräsentation der Zeile.<br />
Nun kann man die hexadezimale Repräsentation<br />
beliebig ändern, wobei jedoch die ASCII-Repräsentation<br />
so bleibt, wie sie war. Sie wird nicht automatisch geändert.<br />
<br />
Wenn man mit der Bearbeitung fertig ist, kann man <br />
xxd mit der Option -r aufrufen um wieder zur normalen<br />
Ansicht zurück zu kehren:<br />
<br /><code>
:%!xxd -r<br />
</code><br />
Für die xxd Kommandos kann man sich nun Mappings<br />
erstellen. Dafür fügt man die beiden folgenden Zeilen in<br />
die ~/.vimrc ein:<br />
<br /><code>
map <leader>hex :%!xxd<CR><br />
map <leader>nhex :%!xxd -r<CR><br />
</code><br />
Nun kann man mittels \hex in den <b>«Hexmodus»</b> wechseln<br />
und mit \nhex wieder zurück. (Den Leader kann man z.B.<br />
mit der Zeile let mapleader="," auf , setzen, so dass man<br />
die Befehle mit ,hex und ,nhex aufrufen kann)<br />
<br />
<b>Das Plugin hexman</b><br />
<br />
Das Bearbeiten von Dateien in der hexadezimalen<br />
Repräsentation wird durch das Plugin hexman erleichtert.<br />
Nachdem man die Datei hexman.vim ins Pluginverzeichnis<br />
(~/.vim/plugin) kopiert hat, kann man einfach folgende<br />
Befehle nutzen (Leader wird hier als \ angenommen):<br />
<table border="1">
<tr>
<td><b>\hm</b></td> <td>wechselt zwischen Hexmodus und normalem Modus</td>
</tr>
<tr>
<td><b>TAB</b></td> <td>bewegt den Cursor zum Anfang des nächsten ASCII Zeichens <br />
(da ein Zeichen ja aus 2 Hex-Ziffern besteht)</td>
</tr>
<tr>
<td><b>\hd</b></td> <td>löscht das Zeichen unter dem Cursor</td>
</tr>
<tr>
<td><b>\hl</b></td> <td> fügt ein ASCII-Zeichen vor dem Cursor ein</td>
</tr>
<tr>
<td><b>\hg</b></td> <td>Springt zu einem Offset</td>
</tr>
<table>
In der Statuszeile wird jeweils das aktuelle Offset (des Cursors) <br />
in dezimaler und hexadezimaler Schreibweise angezeigt. In der<br />
ASCII-Repräsentation wird die Spalte hervorgehoben, in der sich<br />
der Cursor in der Hex-Repräsentation befindet. Wenn man die<br />
Befehle des Plugins zum ndern von Werten benutzt, wird die<br />
ASCII-Repräsentation automatisch aktualisiert, so dass sie<br />
immer mit den Hexadezimalwerten überein stimmt.<br />
<br />
Auch hier ist ein Mapping vorteilhaft, welches einem das Ändern<br />
eines Zeichens mittels <b>\hc</b> erlaubt:<br />
<br /><code>
map <leader>hc <leader>hd <leader>hi<br />
</code><br />
(13. Juni 2009 von zimon)<br />
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://superuser.com/questions/1688802/how-do-you-view-dhcp-servers-within-virtualbox"
target="_blank" rel="noreferrer noopener">
SuperUser.com :: How do you view DHCP servers within Virtualbox</a>
</li>
<li><a href="https://www.thomas-krenn.com/de/wiki/Netzwerkkonfiguration_in_VirtualBox"
target="_blank" rel="noreferrer noopener">
Thomas-Krenn.com :: Netzwerkkonfigurationb in VirtualBox</a>
</li>
<li><a href="https://www.windowspro.de/wolfgang-sommergut/dhcp-server-ueberpruefen-dhcptest-dhcpcheck"
target="_blank" rel="noreferrer noopener">
WindowsPro :: DHCP-server überprüfen mit dhcptest & dhcpcheck</a>
</li>
<li><a href="https://qexe.de/question/so-konfigurieren-sie-den-integrierten-dhcp-server-in-virtualbox"
target="_blank" rel="noreferrer noopener">
Q :: So konfigurieren Sie den integrierten DHCP-server in VirtualBox</a>
</li>
<li><a href="https://www.ip-insider.de/so-ueberpruefen-sie-ihre-dhcp-dienste-a-520656/"
target="_blank" rel="noreferrer noopener">
IP-Insider :: So überprüfen Sie Ihre DHCP-Dienste</a>
</li>
<li><a href="https://www.pcwelt.de/article/1152249/virtualbox-tricks-fuer-profis-und-fortgeschrittene-virtualisierer-co.html"
target="_blank" rel="noreferrer noopener">
PC-Welt :: VirtualBox-Tricks für Profis und fortgeschrittene Virtualisierer</a>
</li>
<li><a href="https://administrator.de/forum/dhcp-server-ausfindig-machen-151145.html"
target="_blank" rel="noreferrer noopener">
Administrator.de :: DHCP-Server ausfindig machen</a>
</li>
<li><a href="https://www.wintotal.de/tipp/virtualbox-anleitung/"
target="_blank" rel="noreferrer noopener">
WinTotal :: VirtualBox - Anleitung</a>
</li>
</ul>
</html>
<html>
<ul>
<li>Fehlermeldung:
<pre><code>vboxdrv: loading out-of-tree module taints kernel.</code></pre>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://hatchjs.com/loading-out-of-tree-module-taints-kernel/"
target="_blank" rel="noreferrer noopener">
HatchJS.com :: How to Avoid Tainting Your Kernel When Loading Out-of-Tree Modules</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li><h3>Environment:</h3>
<ul>
<li>Virtualbox 7.0</li>
<li>metasploitable 2 for linux</li>
</ul>
</li>
<br />
<li>die Fehlermeldung trat beim Aufruf von Metasploitable auf;
</li>
<li><b>Meine Lösung</b>:<br />
<ol>
<li>In Virtualbox bei der VM die Anzahl der CPUs auf “2“<br />
und den RAM auf 2048 MB gesetzt;
</li>
<li>Entsprechende VM (hier: Metasploitable) runterfahren
</li>
<li>Befehle in der Powershell aufgerufen:
<code><pre>
PS C:\Program Files\Oracle\VirtualBox> ./VBoxManage modifyvm Metasploitable ‐‐acpi off
</pre></code>
<code><pre>
PS C:\Program Files\Oracle\VirtualBox> ./VBoxManage modifyvm Metasploitable ‐‐ioapic off
</pre></code>
</li>
</ol>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li>
<a href="https://askubuntu.com/questions/1411901/virtualbox-mp-bios-bug8254-timer-not-connected-to-io-apic"
target="_blank" rel="noreferrer noopener">
askUbuntu :: VirtualBox: "Mp‐bios bug:8254 timer not connected to io‐apic"</a>
</lI>
<li>
<a href="https://forums.hak5.org/topic/57433-metasploitable-kernel-panic/"
target="_blank" rel="noreferrer noopener">
hak5 :: Metasploitable Kernel Panic</a>
</lI>
</ul>
</html>
root@localhost:/usr/local/bin# sudo /sbin/vboxconfig
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
linux-headers-amd64 linux-headers-6.1.0-9-amd64
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
linux-headers-amd64 linux-headers-6.1.0-9-amd64
There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root. If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.
root@localhost:/usr/local/bin#
---------------------------------------------------------------------------------------------------------------
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (6.1.0-9-amd64) or it failed to
load. Please recompile the kernel module and install it by
sudo /sbin/vboxconfig
You will not be able to start VMs until this problem is fixed.
----------------------------------------------------------------------------------------------------------------
mueller@localhost:~/Downloads$ sudo /usr/lib/virtualbox/vboxdrv.sh setup
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
linux-headers-amd64 linux-headers-6.1.0-9-amd64
mueller@localhost:~/Downloads$
---------------------------------------------------------------------------------------------------------------
You should be able to install the kernel header files for the currently
running kernel by running the following in a terminal:
sudo apt-get install linux-headers-$(uname -r)
In general, the kernel header packages are named linux-header-*
where "*" indicates the version & variant (generic, server, etc.).
--------------------------------------------------------------------------------------------------------------
Nach der Installation der Kernel-Header-Files nochmal den Befehl
sudo /usr/lib/virtualbox/vboxdrv.sh setup
aufgerufen:
--------------------------------------------------------------------------------------------------------------
mueller@localhost:~/Downloads$ sudo /usr/lib/virtualbox/vboxdrv.sh setup
[sudo] Passwort fuer mueller:
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: You must sign these kernel modules before using VirtualBox:
vboxdrv vboxnetflt vboxnetadp
See the documentation for your Linux distribution..
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: Signing VirtualBox kernel modules.
vboxdrv.sh: failed:
System is running in Secure Boot mode, however your distribution
does not provide tools for automatic generation of keys needed for
modules signing. Please consider to generate and enroll them manually:
sudo mkdir -p /var/lib/shim-signed/mok
sudo openssl req -nodes -new -x509 -newkey rsa:2048 -outform DER -addext "extendedKeyUsage=codeSigning" -keyout /var/lib/shim-signed/mok/MOK.priv -out /var/lib/shim-signed/mok/MOK.der
sudo mokutil --import /var/lib/shim-signed/mok/MOK.der
sudo reboot
Restart "rcvboxdrv setup" after system is rebooted
.
mueller@localhost:~/Downloads$
---------------------------------------------------------------------------------------------------------
https://stackoverflow.com/questions/61248315/sign-virtual-box-modules-vboxdrv-vboxnetflt-vboxnetadp-vboxpci-centos-8
After some research, I found the solution.
Solution 1 : disable secure boot.
Solution 2 :
1- Install mokutil package
sudo dnf update
sudo dnf install mokutil
2- Create RSA key under new folder.
sudo -i
mkdir /root/signed-modules
cd /root/signed-modules
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=VirtualBox/"
chmod 600 MOK.priv
3- This command will ask you to add a password, you need this password after the next reboot.
sudo mokutil --import MOK.der
4- Reboot your system and a blue screen appear, select "Enroll MOK --> Continue -->" put the previous password and your system will start.
5- Put the previous commands in a script to run it later (after system update)
cd /root/signed-modules
vi sign-virtual-box
Add the following cmd to this script :
#!/bin/bash
for modfile in $(dirname $(modinfo -n vboxdrv))/*.ko; do
echo "Signing $modfile"
/usr/src/kernels/$(uname -r)/scripts/sign-file sha256 \
/root/signed-modules/MOK.priv \
/root/signed-modules/MOK.der "$modfile"
done
Use the below to find signfile if the above fails & edit script accordingly.
find /usr/src -name sign-file
5- Add exec permission and run the script
chmod 700 sign-virtual-box
./sign-virtual-box
6- Launch VirtualBOx
modprobe vboxdrv
For more info see this link (for ubuntu users) https://stegard.net/2016/10/virtualbox-secure-boot-ubuntu-fail/
------------------------------------------------------------------------------------------------------------------------------------------------
hat nicht so funktioniert, wie gehofft ...
mache jetzt folgendes:
sudo mkdir /root/signed-modules
sudo openssl req -nodes -new -x509 -newkey rsa:2048 -outform DER -addext "extendedKeyUsage=codeSigning" -keyout /root/signed-modules/MOK.priv -out /root/signed-modules/MOK.der
# eigener Befehl nach Infos aus Internet:
sudo openssl req -nodes -new -x509 -newkey rsa:2048 -outform DER -addext "extendedKeyUsage=codeSigning" -keyout /root/signed-modules/MOK.priv -out /root/signed-modules/MOK.der -days 36524 -subj "/CN=VirtualBox/"
sudo mokutil --import /var/lib/shim-signed/mok/MOK.der
sudo reboot
Restart "rcvboxdrv setup" after system is rebooted
.
(u.a. https://mta.openssl.org/pipermail/openssl-users/2022-September/015430.html)
<html>
<ul>
<li>Flickert der Bildschirm, dann in den Einstellungen<br />
der VM überprüfen, ob unter "Anzeige" das Kästchen<br />
von "3D-Beschleunigung aktivieren" angetickt ist.<br />
<em>(bei mir hat es heute (21.03.2024) das Problem<br />
gelöst)</em>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>Virtualbox: Vollbild aktivieren</h3>
Wenn man in Virtualbox eine virtuelle Maschine gestartet habt,<br />
kann man das Vollbild so aktivieren:<br />
<br />
<ul>
<li>Mit der Maus in die Menüleiste des Virtualbox‐Fensters fahren.
</li>
<li>Auf den Menüpunkt <em>Anzeige</em> klicken und den Eintrag <em>Vollbildmodus</em> auswählen.
</li>
<li>Es wird ein Hinweis angezeigt, auf den Button <em>Einschalten</em> klicken.
</li>
</ul>
<br />
Falls es nicht funktioniert, dann fehlen noch die sog. “Virtualbox Guest Additions“:<br />
<br />
Im Menü “Geräte“ in der Menüleiste der virtuellen Maschine<br />
den Menüeintrag mit dem Namen “Gastzusätze installieren“<br />
bzw. “Gasterweiterungen einlegen … “ auswählen, mit dem<br />
die ISO-Datei für Gastzusätze in der virtuellen Maschine an‐<br />
gehängt wird.<br />
<br />
Bei der Installation wurde eine Fehlermeldung zurückgegeben:<br />
<img src="./pictures/VirtualboxGuestAdditions-Fehlermeldung.jpg" height=395 width=669 /><br />
<br />
→ Habe dann folgendes nach-installiert:
<code><pre>sudo yum install kernel-devel elfutils-libelf-devel</pre></code>
Dann habe ich Virtualbox Guest Additions nochmal installiert (ein Update durch‐<br />
geführt).<br />
<br />
Daran denken, die Auflösung anzupassen (z.B. 1920 * 1200).<br />
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.giga.de/downloads/virtualbox/tipps/virtualbox-vollbild-fullscreen-aktivieren-so-gehts/"
target="_blank" rel="noreferrer noopener">
GIGA :: Virtualbox: Vollbild / Fullscreen aktivieren ‐ So geht's</a>
</li>
<li><a href="https://qastack.com.de/superuser/408101/virtual-box-not-filling-entire-screen"
target="_blank" rel="noreferrer noopener">
QA Stack :: Virtual Box ‐ füllt nicht den gesamten Bildschirm aus</a>
</li>
<li><a href="https://access.redhat.com/discussions/4452161"
target="_blank" rel="noreferrer noopener">
Red Hat :: </a>
</li><!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>im Linux-System die folgende Befehle ausführen:
<code><pre>
sudo apt update
sudo apt upgrade
sudo apt install build-essential dkms linux-headers-$(uname -r)
</pre></code>
</li>
<li>Rechner rebooten, damit die Updates aktiviert werden.
</li>
<li>unter Windows aus dem Geräte-Menü den <br />
Eintrag “Gasterweiterungen einlegen“ auswählen. <br />
</li>
<li><a href="https://itsfoss.com/virtualbox-guest-additions-ubuntu/"
target="_blank" rel="noreferrer noopener">
It's FOSS :: How to Install & Use VirtualBox Guest Additions on Ubuntu</a>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.tecchannel.de/a/gasterweiterungen-unter-virtualbox-installieren,3277711"
target="_blank" rel="noreferrer noopener">
Computerwoche TecChannel :: Oracle VirtualBox: Gasterweiterungen unter VirtualBox installieren</a>
</li>
<li><a href="https://de.ifixit.com/Anleitung/%C3%84nderung+des+Tastaur-Layouts+mit+dem+Terminal+unter+Kali+Linux/150168"
target="_blank" rel="noreferrer noopener">
IFIXIT :: Änderung des Tastaur‐Layouts mit dem Terminal unter Kali Linux</a>
</li>
<li><a href="https://www.pragmaticlinux.com/2022/04/install-the-virtualbox-guest-additions-in-ubuntu-22-04/"
target="_blank" rel="noreferrer noopener">
Pragmatic Linux :: Install the VirtualBox guest additions in Ubuntu 22.04</a>
</li>
<li><a href="https://itsfoss.com/virtualbox-guest-additions-ubuntu/"
target="_blank" rel="noreferrer noopener">
It's FOSS :: How to Install & Use VirtualBox Guest Additions on Ubuntu</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<meta Host-Key />
<ul>
<li><h3>Host‐Taste:</h3>
<ul>
<li>rechte Strg‐Taste</li>
<li>kann geändert werden:<br />
"Datei" → "Einstellungen" <br />
→ "Eingabe" <br />
→ Tab "Virtuelle Maschine" auswählen<br />
→ Eintrag "Host‐Tastenkombination" ändern<br />
<br />
Als Tasten eignen sich (nur) <code><b>[Strg]</b></code>, <code><b>[Alt]</b></code><br />
und <code><b>[Umschalt]</b></code>.<br />
<br />
<em>(Nach Problemen mit der Darstellung habe<br />
den Eintrag auf <code><b>[Alt]</b></code> geändert und es hat<br />
funktioniert! ;-))</em><br />
</ul>
</li>
<li><h3>in den normalen Fenstermodus zurückkehren:</h3>
<code><pre>
Host ‐ C
</pre></code>
</li>
<li><h3>Haupt‐Menü aufrufen:</h3>
<code><pre>
Host + Pos1
</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://praxistipps.chip.de/virtualbox-host-key-host-taste-aendern-so-gehts_93524"
target="_blank" rel="noreferrer noopener">
Chips - Praxistipps :: Virtualbox Host Key: Host‐Taste ändern ‐ so geht's</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li><h3>Downloading ISO image</h3>
das aktuelle ISO-Image der gewünschten Distribution,<br />
z.B. das Ubuntu-ISO-Image <code><b>ubuntu-22.04.3-desktop-amd64.iso</b></code>
</li>
<li><h3>VM anlegen</h3>
In VirtualBox double-click auf den Button “<em>New</em>“:<br />
<img src="./pictures/Virtualbox-VM-anlegen-01.png" height=142 width=752 /> <!-- height=189 width=1002 --><br />
</li>
<li><h3>Name & Betriebssystem angeben</h3>
Folgende Eingaben vornehmen:<br />
<br />
<ul>
<li>Im Feld “<em>Name</em>“ einen Namen für die VM eintragen,
</li>
<li>im Feld “<em>Ordner</em>“ das Verzeichnis angeben, in dem die VM abgespeichert werden soll
</li>
<li>und im Feld “<em>ISO Abbild</em>“ das gewünschte ISO-Image auswählen.
</li>
</ul>
<br />
<img src="./pictures/Virtualbox-VM-anlegen-02.png" height=285 width=593 /> <!-- height=378 width=791 --><br />
</li>
<li>Auf den Button “Vorwärts“ klicken;
</li>
<li><h3>Create a user profile</h3>
To enable the automatic install we need to prepopulate our<br />
username and password here in addition to our machine<br />
name so that it can be configured automatically during first<br />
boot.<br />
<br />
The default credentials are:<br />
<br />
<ul>
<li>Username: vboxuser
</li>
<li>Password: changeme
</li>
</ul>
<br />
It is important to change these values since the defaults<br />
will create a user without sudo access.<br />
<br />
<b>Ensure your Hostname has no spaces to proceed!</b><br />
<br />
<img src="./pictures/Virtualbox-VM-anlegen-03.png" height=294 width=591 /> <!-- height=392 width=788 --><br />
</li>
<li><h3>Installation von Guest Additions ISO</h3>
It is also recommended to check the Guest Additions box<br />
to install the default Guest Additions ISO that is downloa–<br />
ded as part of VirtualBox. Guest additions enables a num–<br />
ber of quality of life features such as changing resolution<br />
and dynamic screen resizing so it is highly recommended!<br />
<br />
<b>Note:</b><br />
If you choose not to use unattended install then this step<br />
will be skipped and you will go straight to the following<br />
screen. Once your machine has been created you will be<br />
able to create a username and password by proceeding<br />
through the standard installation flow on first boot.<br />
</li>
<li><h3>Definieren der Ressourcen der VM</h3>
Here we can specifiy how much of our host machine's<br />
memory and processors the virtual machine can use.<br />
<br />
For good performance it's recommended to provide<br />
your VM with around 8GB of RAM (althought 4GB<br />
will still be usable) and 4 CPUs. Try to remain in the<br />
green areas of each slider to prevent issues with your<br />
machine running both the VM and the host OS.<br />
<br />
<img src="./pictures/Virtualbox-VM-anlegen-04.png" height=295 width=590 /> <!-- height=393 width=787 --> <br />
</li>
<li><h3>Die Größe der virtuellen Hard Disk angeben</h3>
Then we need to specify the size of the hard disc<br />
for the virtual machine. For Ubuntu we recom–<br />
mend around 25 GB as a minimum. By default the<br />
hard disk will scale dynamically as more memory is<br />
required up to the defined limit. If you want to pre-<br />
allocate the full amount, check the “Pre-allocate<br />
Full Size“ check box. This will improve performan–<br />
ce but may take up unnecessary space.<br />
<br />
<img src="./pictures/Virtualbox-VM-anlegen-05.png" height=290 width=590 /> <!-- height=387 width=787 --> <br />
</li>
<li>Auf den Button “Vorwärts“ klicken;
</li>
<li><h3>Zusammenfassung der gemachten Einstellungen</h3>
<img src="./pictures/Virtualbox-VM-anlegen-06.png" height=284 width=592 /> <!-- height=378 width=789 --> <br />
</li>
<li>Auf den Button “Fertigstellen“ klicken, um die VM<br />
zu initialisieren.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://ubuntu.com/tutorials/how-to-run-ubuntu-desktop-on-a-virtual-machine-using-virtualbox"
target="_blank" rel="noreferrer noopener">
Ubuntu - Tutorial :: How to run an Ubuntu Desktop virtual machine using VirtualBox 7</a>
</li>
<li><a href="https://www.linuxvmimages.com/images/debian-12/"
target="_blank" rel="noreferrer noopener">
Linux VM ISO-Images (für Virtualbox) :: Debian 12</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li><h3>Downloading ISO image</h3>
das aktuelle ISO-Image der gewünschten Distribution,<br />
z.B. das Ubuntu-ISO-Image <code><b>ubuntu-22.04.3-desktop-amd64.iso</b></code>
</li>
<li><h3>VM anlegen</h3>
In VirtualBox double-click auf den Button “<em>New</em>“:<br />
<img src="./pictures/Virtualbox-VM-anlegen-01.png" height=142 width=752 /> <!-- height=189 width=1002 --><br />
</li>
<li><h3>Name & Betriebssystem angeben</h3>
Folgende Eingaben vornehmen:<br />
<br />
<ul>
<li>Im Feld “<em>Name</em>“ einen Namen für die VM eintragen,
</li>
<li>im Feld “<em>Ordner</em>“ das Verzeichnis angeben, in dem die VM abgespeichert werden soll
</li>
<li>und im Feld “<em>ISO Abbild</em>“ das gewünschte ISO-Image auswählen.
</li>
</ul>
<br />
<img src="./pictures/Virtualbox-VM-anlegen-02.png" height=285 width=593 /> <!-- height=378 width=791 --><br />
</li>
<li>Auf den Button “Vorwärts“ klicken;
</li>
<li><h3>Definieren der Ressourcen der VM</h3>
Here we can specifiy how much of our host machine's<br />
memory and processors the virtual machine can use.<br />
<br />
For good performance it's recommended to provide<br />
your VM with around 8GB of RAM (althought 4GB<br />
will still be usable) and 4 CPUs. Try to remain in the<br />
green areas of each slider to prevent issues with your<br />
machine running both the VM and the host OS.<br />
<br />
<img src="./pictures/Virtualbox-VM-anlegen-04.png" height=295 width=590 /> <!-- height=393 width=787 --> <br />
</li>
<li><h3>Die Größe der virtuellen Hard Disk angeben</h3>
Then we need to specify the size of the hard disc<br />
for the virtual machine. For Ubuntu we recom–<br />
mend around 25 GB as a minimum. By default the<br />
hard disk will scale dynamically as more memory is<br />
required up to the defined limit. If you want to pre-<br />
allocate the full amount, check the “Pre-allocate<br />
Full Size“ check box. This will improve performan–<br />
ce but may take up unnecessary space.<br />
<br />
<img src="./pictures/Virtualbox-VM-anlegen-05.png" height=290 width=590 /> <!-- height=387 width=787 --> <br />
</li>
<li>Auf den Button “Vorwärts“ klicken;
</li>
<li><h3>Zusammenfassung der gemachten Einstellungen</h3>
<img src="./pictures/Virtualbox-VM-anlegen-06.png" height=284 width=592 /> <!-- height=378 width=789 --> <br />
</li>
<li>Auf den Button “Fertigstellen“ klicken, um die VM<br />
zu initialisieren.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://ubuntu.com/tutorials/how-to-run-ubuntu-desktop-on-a-virtual-machine-using-virtualbox"
target="_blank" rel="noreferrer noopener">
Ubuntu - Tutorial :: How to run an Ubuntu Desktop virtual machine using VirtualBox 7</a>
</li>
<li><a href="https://www.linuxvmimages.com/images/debian-12/"
target="_blank" rel="noreferrer noopener">
Linux VM ISO-Images (für Virtualbox) :: Debian 12</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<!--
<li><h3>vdi-File hinzufügen</h3>
“Werkzeuge“ <br />
→ “Hinzufügen“ <br />
→ in den entsprechenden Ordner wechseln<br />
  und das vdi–File auswählen;
</li>
-->
<li><h3>VM erstellen</h3>
"neu" → "Einstellungen" (Name, Ordner, u.a.Type & Version) vornehmen<br />
→ Next → Abschnitt <b>"Hardware"</b> :: <br />
  die Hardware anpassen (z.B. CPU auf "2" setzen)<br />
→ Next → Abschnitt <b>"Virtuelle Festplatte"</b> :: <br />
  den Pkt. "Eine vorhandene virtuelle Festplattendatei verwenden" makieren<br />
→ u.U. in das entsprechende Verzeichnis der vdi-Datei wechseln<br />
  und die entsprechende vdi–Datei auswählen<br />
→ Zusammenfassung <br />
→ Fertigstellen
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.makeuseof.com/how-to-import-vdi-file-into-virtualbox/"
target="_blank" rel="noreferrer noopener">
MUO - Make Use Of :: How to Import a VDI File Into VirtualBox</a>
</li>
<li><a href="https://www.osboxes.org/guide/"
target="_blank" rel="noreferrer noopener">
OSBoxes :: How to attach/configure image with VirtualBox?</a>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>Step 1: Download and Import VirtualBox’s GPG Keys</h3>
<pre><code>wget -O- -q https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --dearmour -o /usr/share/keyrings/oracle_vbox_2016.gpg</code></pre>
Notice that the command produces no output.<br />
</li>
<li><h3>Step 2: Add VirtualBox Repository for Debian 12</h3>
<pre><code>echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle_vbox_2016.gpg] http://download.virtualbox.org/virtualbox/debian bookworm contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list</code></pre>
</li>
<li><h3>Step 3: Run System Update</h3>
</li>
<li><h3>Step 4: Install VirtualBox on Debian 12 (Bookworm)</h3>
</li>
<li><h3>Step 5: Install VirtualBox Extension Pack (Optional)</h3>
Important:<br />
The VirtualBox Extension Pack’s version is recommended to<br />
match the version of VirtualBox installed.<br />
<pre><code>vboxmanage -v | cut -dr -f1</code></pre>
⇒ installierte Version: Virtualbox 7.0.14
⇒ Download-Befehl:
<pre><code>wget https://download.virtualbox.org/virtualbox/7.0.14/Oracle_VM_VirtualBox_Extension_Pack-7.0.14.vbox-extpack</code></pre>
⇒ Extension Pack installieren:
<pre><code>sudo vboxmanage extpack install Oracle_VM_VirtualBox_Extension_Pack-7.0.10.vbox-extpack</code></pre>
</li>
<li><h3>Step 6: Add User to the vboxusers Group</h3>
<pre><code>sudo usermod -a -G vboxusers $USER</code></pre>
⇒ Überprüfen:
<pre><code>groups $USER</code></pre>
</li>
<li><h3>Step 7: Running VirtualBox on Debian 12</h3>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://linuxiac.com/how-to-install-virtualbox-on-debian-12-bookworm/"
target="_blank" rel="noreferrer noopener">
Linuxiac :: Anleitung</a>
</li>
</ul>
</ul>
</html>
<html>
<h3>Installation unter Debian 8 „Jessie“</h3>
VirtualBox 4.3.18 is packaged for Debian 8 "Jessie".<br />
<br />
The virtualbox-* packages were moved to contrib at VirtualBox 4.2, <br />
as a non-free compiler (Open Watcom) is required to build the BIOS.<br />
<ul>
<li>Add the "contrib" component to /etc/apt/sources.list, for example:<br />
<code>
# Debian 8 "Jessie"
deb http://httpredir.debian.org/debian/ jessie main contrib
</code>
</li>
<br />
<li>Update the list of available packages:<br />
<code>
# apt-get update
</code>
</li>
<br />
<li>Install the relevant linux-headers package and virtualbox package, for example:<br />
<code>
# apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') virtualbox
</code>
<br /><br />
This will also install virtualbox-dkms and other recommended packages. <br />
DKMS will build the VirtualBox modules for your system.
</li>
</ul>
VirtualBox can now be started. <br />
<br />
To not load the VirtualBox modules at system startup, <br />
edit <b>/etc/default/virtualbox</b> and set <b>LOAD_VBOXDRV_MODULE</b> to 0. <br />
<br />
Link:<br />
<a href="https://wiki.debian.org/VirtualBox#Debian_8_.22Jessie.22" target=_blank>Debian - Wiki :: Install Virtualbox</a>
<a href="https://tecadmin.net/install-virtualbox-debian-8-jessie/" target=_blank>TecAdmin :: Install Virtualbox on Deb 8</a><br />
<br />
</html>
<html>
Prerequisites:
<ol>
<li>Microsoft Visual C++ 20<em>??</em> Redistributable Package</li>
<li>Python Core (z.B. Vers. 3.11.1, Dec. 6, 2022)</li>
<li>win32api → in Admin-Powershell: <code><b>pip install pywin32</b></code></li>
</ol>
</html>
<html>
<ul>
<li><div style="color: #FF0000;">u.U. muss Virtualbox vorher aktualisiert werden!<br />
IMHO müssen die Version von Virtualbox und <br />
dem Extension Pack übereinstimmen!</div>
</li>
<li>Das zur VirtualBox-Version gehörende <b>Oracle VM <br />
VirtualBox Extension Pack</b> von der Seite<br />
<a href="https://www.virtualbox.org/wiki/Downloads"
target="_blank" rel="noreferrer noopener">
https://www.virtualbox.org/wiki/Downloads</a> herunterladen<br />
→ das File hat den Filetype <code>*.vbox-extpack</code>,<br />
  z.B. <code>Oracle_VM_VirtualBox_Extension_Pack-7.0.18.vbox-extpack</code></br>
</li>
<li>in Virtualbox anklicken:<br />
"Datei" → "Werkzeuge" → "Erweiterungspakete-Manager"
</li>
<li>falls eine ältere Version installiert ist, mit "Deinstallieren" diese<br />
Version entfernen;
</li>
<li>um die aktuelle Version zu installieren, auf den Button "Installieren"<br />
klicken → es erscheint ein Auswahl–Menü
</li>
<li>in das Verzeichnis wechseln, in der sich die heruntergeladene Da–<br />
tei befindet;
</li>
<li>das File anklicken/auswählen und auf den Button "Öffnen" klicken;<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://phoenixnap.com/kb/install-virtualbox-extension-pack"
target="_blank" rel="noreferrer noopener">
PhoenixNap :: How To Install VirtualBox Extension Pack</a>
</li>
</ul>
</html>
<html>
All images for VirtualBox and VMware have the same username <br />
and password.<br />
<br />
After logging into virtual machine that you've downloaded from<br />
here you can change “username“ & “password“ or create you<br />
new user:
<ul>
<li>Username :: <em><b>osboxes</b></em>
</li>
<li>Password :: <em><b>osboxes.org</b></em>
</li>
<li>For <b>Root</b> user account:<br />
Password :: <em><b>osboxes.org</b></em>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.osboxes.org/faq/what-are-the-credentials-for-virtual-machine-image/"
target="_blank" rel="noreferrer noopener">
OSboxes.org :: What are the credentials for virtual-machine image?</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener"
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener"
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener"
</a>
</li>
<li><a href=""
target="_blank" rel="noreferrer noopener"
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>Dies ist der Fall, wenn sich das Virtualbox‐Fenster<br />
im skalierten Anzeigemodus befindet.
</li>
<br />
<li>Um den skalierten Anzeigemodus zu verlassen und<br />
die Menüleiste wieder anzuzeigen, drücke <code><b>Host + C</b></code>.<br />
</li>
<br />
<li>Um das Menü im skalierten Anzeigemodus direkt<br />
anzuzeigen, benutze <code><b>Host + Pos1</b></code>.<br />
</li>
<li><h3>Alternative:</h3>
<ul>
<li>in Virtualbox:<br />
“Datei“<br />
→ “Einstellungen“<br />
→ “Eingabe“<br />
→ in den Tab “Virtuelle Maschine“ wechseln<br />
→ den Eintrag “Menüleiste zeigen“ suchen<br />
→ bei diesem Eintrag z.B. folgenden String eintragen: “Host +G“</li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://lerndoku.com/virtualbox-keine-menueleiste-sichtbar/"
target="_blank" rel="noreferrer noopener">
LernDoku.com :: Virtualbox keine Menüleiste sichtbar</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://praxistipps.chip.de/virtualbox-snapshot-erstellen-so-gehts_49914"
target="_blank" rel="noreferrer noopener">
Chip ‐ Praxistipps :: Virtualbox ‐ Snapshot erstellen</a>
</li>
</ul>
</html>
<html>
<ul>
<li>die VM muss dazu gestartet sein (der Login-Prompt wird angezeigt)
</li>
<li>Eingabe → Tastatur → Sprache - Tastatur auf Deutsch geändert
</li>
<li>Grafik-Controller auf VMSVGA geändert (Empfehlung von Virtualbox)
</li>
<li>Geräte
<ul>
<li>→ Drag & Drop auf "bidirektional" geändert
</li>
<li>→ Gemeinsame Zwischenablage auf "bidirektional" geändert
</li>
</ul>
</li>
<li>Eingabe
<ul>
<li>→ Tastatur
</li>
<li>→ Bildschirm-Tastatur
</li>
<li>→ "Layout" (das linke Icon in der unteren Statuszeile)<br />
  anklicken
</li>
<li>→ in der erscheinenden Layout-Liste das gewünschte<br />
  Layout anklicken (z.B. Deutsch T1)
</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li>Home-Dir von Virtualbox:
<code><pre>C:\Program Files\Oracle\VirtualBox\</pre></code>
</li>
<li><h3>“VBoxManage list vms“:</h3>
<ul>
<li>Lists all virtual machines currently registered with Oracle VM VirtualBox;
</li>
<li>By default this displays a compact list with each VM's name and UUID;
</li>
<li>If you also specify <code><b>‐‐long</b></code> or <code><b>‐l</b></code>, this will be a detailed list as with<br />
the <code><b>showvminfo</b></code>
</li>
</ul>
</li>
<li><h3>“VBoxManage list extpack“:</h3>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://docs.oracle.com/en/virtualization/virtualbox/6.0/user/vboxmanage-list.html"
target="_blank" rel="noreferrer noopener">
Oracle ‐ Docs :: VBoxManager list</a>
</li>
</ul>
</html>
<html>
<ul>
<li>Lösung: <br />
die Anzahl der Prozessoren von "1" auf "2" erhöhen;
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://askubuntu.com/questions/1398049/kernel-panic-not-syncing-attempted-to-kill-the-idle-task-i-got-this-error-whi"
target="_blank" rel="noreferrer noopener">
Ubuntu :: Kernel panic not syncing</a>
</li>
<li><a href="https://askubuntu.com/questions/1408595/kernel-panic-in-virtual-box-6-1-32"
target="_blank" rel="noreferrer noopener">
Ubuntu :: kernel panic in virtual box 6.1.32</a>
</ul>
</html>
<html>
<ul>
<li>Skopeo istein Tool, mit dem man Container-Images und Image-<br />
Repositories auf Linux-Systemen, unter Windows und MacOS<br />
bearbeiten, prüfen, signieren und übertragen kann.<br />
</li>
<br />
<li>Der Vorteil von Skopeo ist, daß man damit Images in einer Re‐<br />
mote Registry prüfen kann, ohne dass ein Download des ge‐<br />
samten Images mit allen Schichten erforderlich ist.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.redhat.com/de/topics/containers/what-is-skopeo"
target="_blank" rel="noreferrer noopener">
Red Hat :: Was ist Skopeo?</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li><b>Download</b> von der Seite <a href="code.visualstudio.com"
target="_blank" rel="noreferrer noopener"><em><b>code.visualstudio.com</b></em></a>,<br />
Version “Stable Build“ für Windows x64 (<em>User installer</em>) ausgewählt
</li>
<li>bei der <b>Installation</b> bei der Abfrage “Zusätzliche Aufgaben auswählen“<br />
am besten alle vier Einträge anticken (u.a. wird dann bei Auswahl <br />
einer Datei im File Explorer im erscheinenden Menü der Visual<br />
Studio Code angezeigt);
<li>auch als <code><b>VS Code</b></code> oder auch nur <code><b>Code</b></code> genannt;</li>
<li>Dadurch, dass die Pfadvariable bei der Installation aktualisiert wurde,<br />
ist es möglich, im Terminal einfach nur einzugeben:
<code><pre>C:\User\Mueller\code . </pre></code>
</li>
<li>schneller, leichtgewichtiger, plattformübergreifender Code‐Editor;</li>
<li>intergriert
<ul>
<li>einen Taskrunner</li>
<li>Git</li>
</ul></li>
<li>leichte Erweiterbarkeit (→ viele Extensions)</li>
<li><b>Language Features :</b>
<ol>
<li>Syntax‐Highlighting, <br />
Klammern‐Block‐Erkennung</li>
<li>Intellisense, statische Code‐Analyse (<code><b><em>linting</em></b></code>),<br />
Gliederung</li>
<li>Refactoring, find all references</li>
</ol></li>
<li><b>Sidebar ‐ Explorer :</b><br />
enthält zwei Bäume:
<ol>
<li>working files</li>
<li>Anzeigen der aktuell geöffneten File‐Ordnerstruktur</li>
</ol></li>
<li><b>Befehle: </b><br />
<ul>
<li><details><summary>Aufruf der Command Palette : </summary>F1 oder Ctrl ‐ P<br /><br /></details></li>
<li><details><summary>“goto line“ : </summary>Ctrl ‐ g<br /><br /></details></li>
<li><details><summary>die Befehls‐History anzeigen : </summary>Ctrl ‐ p oder Ctrl Tab<br /><br /></details></li>
<li><details><summary>Das erste Fenster anzeigen : </summary>Ctrl ‐ 1<br /><br /></details></li>
<li><details><summary>Das zweite Fenster anzeigen : </summary>Ctrl ‐2<br /><br /></details></li>
<li><details><summary>Das letzte Fenster anzeigen : </summary>Ctrl ‐ 3<br /><br /></details></li>
<li><details><summary>Schließen des aktuellen Fensters : </summary>Ctrl ‐ w<br /><br /></details></li>
<li><details><summary>Ausblenden der Sidebar : </summary>Ctrl ‐ b<br /><br /></details></li>
<li><details><summary>wo ist definiert, wer verwendet es : </summary>F12 bzw. Shift ‐ F12<br /><br /></details></li>
<li><details><summary>Error help (ist etwas unterstrichen, dann mit Cursor auf den Eintrag hinnavigieren und dann drücken : </summary>F8<br /><br /></details></li>
</ul></li>
<li></li>
<!--
<li></li>
<li></li>
<li></li>
-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.helmbergers.com/vscode-einfuehrung/" target=_blank>Helmbergers :: VSCode - Einführung</a></li>
<li><a href="https://www.helmbergers.com/vscode-git-github/" target=_blank>Helmbergers :: VSCode & Git</a></li>
<li><a href="https://www.helmbergers.com/vscode-videos/" target=_blank>Helmbergers :: VSCode ‐ Videos</a></li>
<li><a href="https://www.norberteder.com/tag/vscode/" target=_blank>Norbert Eder :: VSCode</a></li>
</ul>
</html>
<html>
<ul>
<li><table border="1">
<tr>
<th align="center" width=150>Action
</th>
<th align"center" width=150>Shortcut
</th>
</tr>
<tr>
<td>Show all commands
</td>
<td><pre><code>Ctrl + Shift + P</code></pre>
</td>
</tr>
<tr>
<td>Open file
</td>
<td><pre><code>Ctrl + O</code></pre>
</td>
</tr>
<tr>
<td>Open folder
</td>
<td><pre><code>Ctrl + K Ctrl + O</code></pre>
</td>
</tr>
<tr>
<td>Open recent
</td>
<td><pre><code>Ctrl + R</code></pre>
</td>
</tr>
<tr>
<td>
</td>
<td><pre><code></code></pre>
</td>
</tr>
</table>
</li>
</ul>
</html>
<html>
Information provided by the Sans Institute:<br>
<A HREF="http://www.sans.org">http://www.sans.org</A><br>
<br>
<br>
<u>The ten most commonly exploited UNIX vulnerabilities?</u><br>
<br>
Poor system administration practices<br>
<br>
Reusable/poor passwords<br>
<br>
Flawed SUID programs (e.g., rdist, binmail)<br>
<br>
HTTP servers and CGI application vulnerabilities<br>
<br>
Default "+" entries in the /etc/hosts.equiv file<br>
<br>
NFS/NIS vulverabilities sendmail program bugs<br>
<br>
Buffer overruns (e.g., gets(), syslog())<br>
<br>
SUID shell scripts <br>
<br>
</html>
<html>
<ul>
<li>IE oder Chrome aufrufen (FF scheint nicht zu funktionieren)</li>
<li>in Browserleiste eingeben: <a href="LogIn.WIFIonICE.de" target=_blank><b>LogIn.WIFIonICE.de</b></a></li>
<li>dann in Browserleiste eingeben: <a href="ICEportal.de" target=_blank><b>ICEportal.de</b></a></li>
</ul>
</html>
<html>
<table border="1" style="float:left;">
<tr><th>Keyboard <br />shortcut</th><th>... jump to ...</th></tr>
<tr><td align=center>g, h</td><td align=center>Home</td></tr>
<tr><td align=center>g, l</td><td align=center>Latest</td></tr>
<tr><td align=center>g, n</td><td align=center>New</td></tr>
<tr><td align=center>g, u</td><td align=center>Unread</td></tr>
<tr><td align=center>g, c</td><td align=center>Categories</td></tr>
<tr><td align=center>g, t</td><td align=center>Top</td></tr>
<tr><td align=center>g, b</td><td align=center>Bookmarks</td></tr>
<tr><td align=center>g, p</td><td align=center>Profile</td></tr>
<tr><td align=center>g, m</td><td align=center>Messages</td></tr>
<tr><td align=center>g, d</td><td align=center>Drafts</td></tr>
</table>
<table border="1" style="float:right;">
<tr><th>Keyboard <br />shortcut</th><th>... navigate to ...</th></tr>
<tr><td align=center>u</td><td align=center>Back</td></tr>
<tr><td align=center>#</td><td align=center>Go to post #</td></tr>
<tr><td align=center>k/j</td><td align=center>Move selection</td></tr>
<tr><td align=center>o or Enter</td><td align=center>Open selected topic</td></tr>
<tr><td align=center>shift+j/shift+k</td><td align=center>Next/previous section</td></tr>
</table>
<table border="1" style="float:right;">
<tr><th>Keyboard <br />shortcut</th><th>Application</th></tr>
<tr><td align=center>=</td><td>Open hamburger menu</td></tr>
<tr><td align=center>p</td><td>Open user menu</td></tr>
<tr><td align=center>.</td><td>Show updated topics</td></tr>
<tr><td align=center>/ or ctrl+alt+f</td><td>Search</td></tr>
<tr><td align=center>?</td><td>Open keyboard help</td></tr>
<tr><td align=center>x, r</td><td>Dismiss New/Posts</td></tr>
<tr><td align=center>x, t</td><td>Dismiss Topics</td></tr>
<tr><td align=center>shift+z shift+z</td><td>Log Out</td></tr>
</table>
<table border="1">
<tr><th>Keyboard <br />shortcut</th><th>Composing</th></tr>
<tr><td align=center>shift+c</td><td>Return to composer</td></tr>
<tr><td align=center>c</td><td>Create a new topic</td></tr>
<tr><td align=center>t</td><td>Reply as linked topic</td></tr>
<tr><td align=center>shift+r</td><td>Reply to topic</td></tr>
<tr><td align=center>r</td><td>Reply to post</td></tr>
<tr><td align=center>q</td><td>Quote post</td></tr>
</table>
<table border="1" style="left;">
<tr><th>Keyboard <br />shortcut</th><th>Action</th></tr>
<tr><td align=center>f</td><td>Toggle bookmark topic</td></tr>
<tr><td align=center>shift+p</td><td>Pin/Unpin topic</td></tr>
<tr><td align=center>shift+s</td><td>Share topic</td></tr>
<tr><td align=center>s</td><td>Share post</td></tr>
<tr><td align=center>l</td><td>Like post</td></tr>
<tr><td align=center>!</td><td>Flag post</td></tr>
<tr><td align=center>b</td><td>Bookmark post</td></tr>
<tr><td align=center>e</td><td>Edit post</td></tr>
<tr><td align=center>d</td><td>Delete post</td></tr>
<tr><td align=center>m, m</td><td>Mute topic</td></tr>
<tr><td align=center>m, r</td><td>Regular (default) topic</td></tr>
<tr><td align=center>m, t</td><td>Track topic</td></tr>
<tr><td align=center>m, w</td><td>Watch topic</td></tr>
<tr><td align=center>ctrl+p</td><td>Print topic</td></tr>
</table>
</table>
</html>
<html>
<ul>
<li>auch <b><em>Guardein</em></b></li>
<li>lat. guardianus „Wächter, Hüter“</li>
<li>ist der Titel eines Beamten, der in Mittelalter und Frühneuzeit die Erze und die<br />
Münzen untersuchte. Je nach Tätigkeitsschwerpunkt gab es den <b>Erzwardein</b><br />
(auch Erzprobierer), der die Erze untersuchte, und den <b>Münzwardein</b>, der die<br />
Münzen zu untersuchen hatte. Auch der Begriff „Berggegenprobierer“ war ge‐<br />
läufig.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Wardein" target="_blank" rel="noreferrer noopener">Wikipedia</a></li>
</ul>
</html>
<html>
Damit alle Grafiken und Bilder korrekt angezeigt werden, muss <br />
die automatische Bildgrößenanpassung deaktiviert sein. <br />
<ul>
<li>Im <b>Microsoft Internet Explorer</b>::<br />
Unter "Internetoptionen" -> "Erweitert" einstellen;</li>
<br />
<li> Im <b>Mozilla Firefox</b> :: <br />
In die Adressleiste "about:config" eintragen und mit "Enter" bestätigen.<br />
Anschließend die Einstellung "enable_automatic_image_resizing" <br />
(bzw. "browser.enable_automatic_image_resizing") auf "false" setzen.</li>
</ul>
</html>
<html>
Um auf einem DOS-/Windows-Rechner in der<br />
CMD-Shell (cmd) in ein LW zu wechseln:<br />
<br /><b> <code>
C:\Users\jemuelle>E: <cr><br />
E:\><br /></b>
</code> <br />
Der Buchstabe muss genauso geschrieben<br />
werden, wie das LW heisst (in dem obigen<br />
Bsp. ist es das E-LW)<br />
</html>
<html>
Did you ever just want to know what files search patterns were<br />
in but didn't want to see the search results?<br />
<br />
Turn this:
<code><pre>
$ grep quick *
story1.txt: The quick brown fox
story1.txt: The turtle was not quick.
recipe.txt: How to make soup quick.
</pre></code>
Into this:
<code><pre>
$ grep -l quick *
story1.txt
recipe.txt
</pre></code>
</html>
<html>
To get time on a remote UNIX machine within the same domain,<br />
you can use the command:
<code><pre>
% telnet <remote_machine> 13
Trying <IP address>...
Connected to <remote_machine>
Escape character is '^]'.
Fri Aug 27 19:20:27 1999
Connection closed by foreign host.
</pre></code>
You can create a handy alias for the following command<br />
to get the remote time:
<code><pre>
telnet <remote_machine> 13 | grep :
</pre></code>
This tip generously supported by: <br />
bhavin@informix.com
</html>
When you want to find out
where a process as ben
started on SUN server, use:
* /usr/proc/bin/pwdx [pid] *
It will give you the path of
the executable.
This tip generously supported
by: erik.vincent.teleglobe.ca
<html>
Here is how to find information about an ip owner<br />
<code><pre>
$ whois -h whois.arin.net 10.0.0.0
</pre></code>
</html>
<html>
To know who all have sent you mail.<br />
<br />
<code><pre>
---------------CUT HERE ----------
#!/bin/sh
: ${USER:=`expr "\`LANG=C id\`" : 'uid=[0-9]*(\([^)]*\).*'`}
for MBox in /var/mail/$USER /usr/spool/mail/$USER ""
do
[ -r "$MBox" ] && break
done
[ -z "$MBox" ] && exec echo "No mailbox"
exec grep "^From " "$@" "$MBox"
---------------CUT HERE ----------
</pre></code><br />
<br />
This tip generously supported <br />
by: pradeep@cdacb.ernet.in<br />
</html>
<html>
mv command across filesystems is slower on large files.<br />
<br />
WHY?<br />
<br />
mv would be slow if you are moving files across filesystem.<br />
<br />
The inode number changes only when a file is moved across<br />
file system.<br />
<br />
A new inode number means a new file is physically created on<br />
disk.<br />
<br />
It remains unchanged, if it is within the same filesystem.<br />
One can verify by using ls -il command on that file.<br />
<br />
mv uses rename() system call. If it fails, it uses copy routine<br />
(basicailly reads from a file and writes in another file).<br />
<br />
mv command across filesystem is more of a copy then mv.<br />
<br />
This tip generously supported <br />
by: dkotian1@rediffmail.com<br />
</html>
<html>
<meta 7zip />
<h3>Modi:</h3>
<ul>
<li><code><b>e</b></code> :: Inhalt extrahieren, <em>plain extraction</em> (Verzeichnisstruktur wird <b>NICHT</b> erzeugt)
</li>
<li><code><b>l</b></code> :: Inhalt auflisten
</li>
<li><code><b>x</b></code> :: Inhalt extrahieren, Verzeichnisstruktur wird 1‐zu‐1 angelegt
</li>
</ul>
<h3>Optionen:</h3>
<ul>
<li><code><b>‐o</b></code> :: Angabe des Output‐Verzeichnisses;<br />
    Angabe mit <b>kompletten</b> Pfad
</li>
</ul>
</html>
<html>
</ul>
<li>
<ol>
<li>Startmenü öffnen, entweder über den Klick auf das Windows-Logo oder über die Windows-Taste</li>
<li>Jetzt die App “Kalender“ öffnen</li>
<li>Jetzt in der linken Spalte ganz unten auf das “Zahnrad“‐Symbol klicken, um die Einstellungen zu öffnen</li>
<li>Jetzt auf der rechten Seite “Kalendereinstellungen“ anklicken</li>
<li>Jetzt im Bereich “Wochennummern“ das Drop-Down-Menü öffnen</li>
<li>Dort “Erster Tag des Jahres“ auswählen</li>
<li>Menü über erneuten Klick auf das Zahnrad schließen</li>
</ol>
</li>
<li>Die Kalenderwoche ist künftig an drei Stellen zu sehen:
<ol>
<li>Zum einen ist das in der Monatsansicht durch Zahlen vor der jeweiligen Woche. </li>
<li>Zum anderen ist das in der Tages- sowie der Wochenansicht, <br />
und zwar durch den Hinweis “Woche xx“ neben der Monatsangabe in der Kopfzeile.</li>
</ol>
</li>
<li>Damit dieser Kalender nicht jedesmal über das Startmenü aufgerufen<br />
werden muss, kann er als Verknüpfung auf dem Desktop oder in der Taskleiste abgelegt werden.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.winboard.org/threads/windows-10-kalenderwoche-im-kalender-anzeigen-so-geht-es.245704/" target="_blank" rel="noreferrer noopener">Winboard :: Windows 10 ‐ Kalenderwoche im Kalender anzeigen</a></li>
</ul>
</html>
<html>
<ul>
<li>Die Ursache des Windows-Fehlers 0x8007000d sind meistens beschädigte Systemdateien, wodurch ein Windows-Update nicht installiert werden konnte.
</li>
<li>Wie ihr den Fehler-Code behebt, zeigen wir euch hier.
</li>
<li><h3>Was bedeutet der Windows-Fehler 0x8007000d?</h3>
<ul>
<li>Der Windows-Fehler 0x8007000d kommt in Windows 11, 10, 8 und 7 vor allem bei Update-Problemen vor.
</li>
<li>Ursache sind meistens fehlerhafte Systemdateien oder seltener eingeschränkte Zugriffsberechtigungen.
</li>
</ul>
</li>
<li><h3>Lösung 1: „Windows Update Problembehandlung“ starten</h3>
<ul>
<li>Die automatisierte Problembehandlung von Windows kann das Problem beheben.
</li>
<li>Das geht so:
<ul>
<li>Öffnet die Einstellungen.
</li>
<li>auf „Update & Sicherheit“ > „Problembehandlung“ > „Zusätzliche Problembehandlung“ > „Windows Update“ klicken.
</li>
<li>auf „Problembehandlung ausführen“ klicken, um Windows nach Fehlern und Problemen suchen zu lassen.<br />
Werden welche gefunden, können sie repariert werden.
</li>
</ul>
</li>
</ul>
</li>
<li><h3>Lösung 2: Windows-Fehler 0x8007000d selbst reparieren</h3>
<ul>
<li>Gebt bestimmte Befehle in der Eingabeaufforderung (mit Administratorrechten) ein, um Windows-Systemdateien zu reparieren:
<ul>
<li>Drückt die Tastenkombination Windows + R, um das Ausführen-Fenster zu öffnen.
</li>
<li>Gebt cmd ein und drückt die Tastenkombination Strg + Umschalt + Enter.
</li>
<li>Bestätigt das Hinweisfenster mit „Ja“, um die Eingabeaufforderung mit Administratorrechten zu starten.
</li>
</ul>
</li>
<li>Arbeitet die Befehle von oben nach unten ab.
</li>
<li>Wartet jeweils, bis der Befehl zu 100 Prozent durchgeführt wurde.
</li>
<li>Danach sollte die Ursache des Fehlers 0x8007000d repariert sein:
<ul>
<li><pre><code>sfc /scannow</code></pre>
</li>
<li><pre><code>Dism /online /cleanup-image /StartComponentCleanup</code></pre>
</li>
<li><pre><code>Dism /online /cleanup-image /RestoreHealth</code></pre>
</ul>
</li>
<li>Falls weiterhin ein Problem mit der Funktion „Windows Update“ vorliegt, könnt ihr den Ordner „Software Distribution“ löschen, um den Dienst zurückzusetzen.<br />
⇒ s. Tiddler "Windows 11 :: Windows-Update reparieren und zuruecksetzen"
</li>
</ul>
<li>
<li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.giga.de/tipp/0x8007000d-windows-fehler-beheben/"
target="_blank" rel="noreferrer noopener">
GIGA :: 0x8007000d: Windows-Fehler beheben</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li><h3>Das richtige Administrator-Konto ist standardmäßig deaktiviert</h3>
Dies gilt für Windows 11 und 10:
<ul>
<li>Das Standard-Benutzerkonto gehört standardmäßig „nur“ zur Gruppe der Administratoren.
</li>
<li>Das Benutzerkonto hat damit „nur“ administrative Rechte, ist aber nicht das Administrator-Konto.
</li>
</ul><br />
Das Administrator-Konto kann helfen, wenn man sein Windows-Passwort vergessen sollte.
</li>
<li><h3>Per Eingabeaufforderung</h3>
Am schnellsten und einfachsten aktiviert man das Admin-Konto in Windows mit der Eingabeaufforderung:
<ul>
<li>Drückt die Tastenkombination [Windows] + [R], um das Ausführen-Fenster zu öffnen.
</li>
<li>Tippt cmd ein, bestätigt aber noch nicht.
</li>
<li>Haltet nun die beiden Tasten [Strg] + [Umschalt] gedrückt und bestätigt gleichzeitig mit [Enter].
</li>
<li>Bestätigt den Hinweis mit „Ja“, um die Eingabeaufforderung mit Administratorrechten zu öffnen.
</li>
<li>Gebt dort den Befehl net user administrator /active:yes ein und bestätigt mit [Enter].
</li>
<li>Optional: Setzt ein Passwort für das Admin-Konto mit dem Befehl: net user administrator PASSWORT. Gebt statt PASSWORT euer gewünschtes Kennwort ein.
</li>
</ul>
</li>
<li><h3>Über Computerverwaltung (<em>Nur Pro-Versionen</em>)</h3>
Alternativ könnt ihr das Administrator-Konto auch über die Computerverwaltung aktivieren, allerdings nur, wenn ihr mindestens die Pro-Version von Windows habt:
<ul>
<li>Drückt die Tastenkombination [Windows] + [R], um das Ausführen-Fenster zu öffnen.
</li>
<li>Tippt compmgmt.msc ein und drückt [Enter], um die Computerverwaltung zu öffnen.
</li>
<li>Navigiert zu „System“ > „Lokale Benutzer und Gruppen“ > „Benutzer“.
</li>
<li>Klickt rechts doppelt auf den Eintrag „Administrator“.
</li>
<li>Entfernt das Häkchen bei „Konto ist deaktiviert“ und bestätigt mit „OK“.
</li>
</ul>
</li>
<li><h3>Mit Administrator-Konto in Windows 10 oder 11 anmelden:</h3>
<ul>
<li>Öffnet das Startmenü mit der Windows-Taste oder per Maus.
</li>
<li>Klickt auf euer Benutzer-Profilbild.
</li>
<li>Wählt „Administrator“ aus, um euch mit dem Administrator-Konto in Windows anzumelden.
</li>
<li>Windows meldet euch nun ab und als Administrator an.
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.giga.de/tipp/windows-11-und-10-administrator-konto-aktivieren-so-geht-s/"
target="_blank" rel="noreferrer noopener">
Giga :: Windows 11 und 10: Administrator–Konto aktivieren – so geht's</a>
</li>
</ul>
</html>
<html>
<ul>
<li><div style="color: #ff0000;"> <b>!! Empfehlenswert:</b></div>
vor der Aktion alle nicht benötigten Speichermedien (insbes. <br />
USB‐Sticks) abmounten;
</li>
<li>als Admin eingeloggt
</li>
<li>Änderungen zum BIOS-Start gemacht (Settings geändert)
</li>
<li>Reboot
</li>
<li>→ BIOS aufgerufen
</li>
<li>Booteintrag geändert:<br />
den Eintrag “USB key: UEFI: KIOXIA TransMemory PMAP Partition 1“ <br />
mit dem Eintrag “Windows Boot Manager“ getauscht (Platztausch)
</li>
<li>→ Save & Exit
</li>
<li>→ Debian‐Installation erscheint
</li>
<li>Meldung über fehlende Firmware bzgl. der Netzwerk-HW<br />
erschienen:<br />
<em>iwlwifi-9000-pu-b0-jf-b0-[30-46].ucode</em>
</li>
<li>
</li>
<li>
</li>
<li>
</li>
<li>
</li>
<li>
</li>
<li>
</li>
<li>
</li>
</ul>
</html>
<html>
<ul>
<li><h3>Methode 1: Windows‐Taste + X Shortcut</h3>
<ol>
<li>Drücken Sie die Windows‐Taste + X.</li>
<li>Danach drüken zweimal auf die R‐Taste.</li>
</ol>
<br />
Mit dieser Tastenkombination fährt ihr PC direkt herunter. Selbst wenn<br />
im Hintergrund noch Programme aktiv sind, funktioniert dieser Shortcut<br />
einwandfrei.<br />
</li>
<li><h3>Methode 2: Alt‐Taste + F4</h3>
<ol>
<li>Drücken Sie die Alt‐Taste + F4.
<li>Wählen Sie "Herunterfahren" mit den Pfeiltasten aus.</li>
<li>Drücken Sie die Enter-Taste, um den PC runterzufahren.</li>
</ol>
<br />
Für diese Methode müssen Sie sich auf dem Desktop befinden. Andere<br />
Programme sollten geschlossen oder zumindest minimiert sein, da sonst<br />
diese Programme geschlossen werden, statt den Shutdown auszuführen.<br />
Ansonsten können Sie mit einem Klick auf die Taskleiste auch den<br />
Fokus auf den Desktop verschieben.<br />
<li><h3>Methode 3: Eigenen Shortcut erstellen</h3>
<ol>
<li>Rechtsklicken Sie auf Ihrem Desktop und fahren Sie mit dem Mauszeiger über "Neu".</li>
<li>Wählen Sie die Option "Verknüpfung" aus.</li>
<li>Schreiben Sie nun in die Suchzeile: shutdown /s /t 0</li>
<li>Benennen Sie den Shortcut bzw. die Verknüpfung. Sie erscheint auf Ihrem Desktop.</li>
<li>Rechtsklicken Sie auf die Verknüpfung und wählen Sie "Eigenschaften".</li>
<li>Hier können Sie eine Tastenkombination eingeben, die zukünftig für das Herunterfahren des Rechners genutzt werden soll.</li>
<li>Bestätigen Sie mit "OK".</li>
</ol>
<br />
Dieser Shutdown funktioniert ebenfalls, wenn andere Programme geöffnet<br />
sind. Legen Sie am besten eine Tastenkombination fest, die Sie nicht zu‐<br />
fällig im Alltag erwischen könnten.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.pc-magazin.de/ratgeber/windows-11-herunterfahren-shortcut-tastenkombination-verknuepfung-3202646.html"
target="_blank" rel="noreferrer noopener">
PC‐Magazin :: Ratgeber: Windows 11 herunterfahren: Mausklicks, Shortcuts und Verknüpfung</a>
</li>
</ul>
</html>
<html>
https://windowsarea.de/2024/10/windows-11-24h2-download-ist-verfuegbar-so-installiert-ihr-es-sofort/
</html>
<html>
<ul>
<li>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.giga.de/downloads/windows-10/tipps/windows-update-reparieren-und-zuruecksetzen-so-geht-s/"
target="_blank" rel="noreferrer noopener">
GIGA :: Windows–Update reparieren & zurücksetzen — so geht's </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li><h3>Lösung 1: Reparaturtools SFC und DISM nutzen</h3>
<ul>
<li>Windows verfügt über die Reparaturtools DISM (Deployment Image Servicing and Management) und SFC (System File Checker).
</li>
<li>Beide sind in der Lage, korrupte oder fehlende Windows-Systemdateien zu überprüfen, zu reparieren und zurückzusetzen.
</li>
<li>Gehen Sie wie folgt vor:
<ul>
<li>Schritt 1: Drücken Sie [Strg] + [R] und anschließend [Strg] + [Umschalt] + [Enter], um die Eingabeaufforderung mit Administratorrechten zu öffnen.
</li>
<li>Schritt 2: Tragen Sie in der Eingabeaufforderung den CMD-Befehl „sfc/scannow“ ein und drücken Sie [Enter].
</li>
<li>Schritt 3: Im Folgenden geben Sie die Befehle
<pre><code>DISM.exe /Online /Cleanup-image /Scanhealth</code></pre>
und
<pre><code>DISM.exe /Online /Cleanup-image /Restorehealth</code></pre>
ein. Drücken Sie jeweils nach jedem Befehl [Enter].
</li>
<li>Schritt 4: Führen Sie nun einen Neustart des Systems durch.
</li>
<li>Schritt 5: Sollte die Reparatur glücken, können Sie das Update installieren bzw. den Computer aktualisieren.
</li>
</ul>
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.ionos.de/digitalguide/server/konfiguration/0x80073712/"
target="_blank" rel="noreferrer noopener">
IONOS :: 0x80073712-Fehler in Windows lösen</a>
</li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://tiprelay.com/de/so-aktivieren-sie-das-administratorkonto-in-windows-11/"
target="_blank" rel="noreferrer noopener">
TipRelay.com :: So aktivieren Sie das Administratorkonto in Windows 11/</a>
</li>
</ul>
</html>
<html>
<meta "Windows 11" geecko \>
<ul>
<li>“Start“‐Button auf Taskleiste mit rechter Maustaste anklicken</li>
<li>→ neue Menüleiste erscheint</li>
<li>→ Eintrag “System“ anklicken</li>
<li>→ neues Fenster erscheint</li>
<li>→ im rechten Fensterbereich den Eintrag “Wiederherstellung“ <br />
  (“<em>Recovery</em>“) anklicken</li>
<li>→ in der Liste der Wiederherstellungsoptionen beim Eintrag<br />
  “Erweiterter Start“ auf die Auswahl “Jetzt neu starten“ anklicken</li>
<li>→ der Rechner rebootet und nach einiger Zeit erschein<br />
  das BIOS</li>
</ul>
</html>
<html>
<ul>
<li>Aktivierung : Tastenkombination <code><b>Alt + P</b></code></li>
<br />
<li>De-Aktivierung : Tastenkombination <code><b>Alt + P</b></code> nochmal drücken</li>
<li><h3>Links:</h3>
<ul>
<li><a href="https://praxistipps.chip.de/windows-vorschaufenster-fuer-dateien-aktivieren-so-gehts_37827" target=_blank>Chip - Praxistipps</a></li>
<li><a href="https://www.windowspower.de/dateivorschau-im-windows-explorer-aktivieren/" target=_blank>Windowspower :: Dateivorschau im Windows Explorer aktivieren</a></li>
</ul></li>
</ul>
</html>
<html>
<meta Netzwerk />
<code><pre>
ipconfig
</pre></code>
</html>
<html>
<meta Umgebunsvariable/>
<ul>
<li><h3>Befehl, um alle (Umgebungs‐)Variablen aufzulisten:</h3>
<code><pre>Get‐Childitem Env:</pre></code>
</li>
<li><h3>Befehl, um eine (neue) Variable zu setzen:</h3>
<code><pre>$Env:<em><variable‐name></em> = “<em><new‐value></em>“
</pre></code>
</li>
<li><h3>Befehl zum Anzeigen des Inhalts der Variablen:</h3>
<code><pre>
$Env:<em><variable‐name></em>
</pre></code>
</li>
<li>Keine Unterscheidung bzgl. der Groß‐ und Kleinschreibung;
</li>
<br />
<li><b>Liste aller Umgebungsvariablen:</b>
<table>
<tr align="center">
<th>Command<br />
Environment Variables</th><th>PowerShell<br />
Environment Variables</th><th width=44>Values</th>
</tr>
<tr>
<td>%ALLUSERSPROFILE%</td><td>$Env:ALLUSERSPROFILE</td><td>C:\ProgramData</td>
</tr>
<tr>
<td>%APPDATA%</td><td>$Env:APPDATA</td><td>C:\Users\(<em>user‐name</em>)\AppData\Roaming</td>
</tr>
<tr>
<td>%CD%</td><td>$Env:CD</td><td>Current directory full path</td>
</tr>
<tr>
<td>%CMDCMDLINE%</td><td></td><td>Returns exact command line used to start current cmd.exe session.</td>
</tr>
<tr>
<td>%CMDEXTVERSION%</td><td></td><td>Number of current command processor extensions.</td>
</tr>
<tr>
<td>%CommonProgramFiles%</td><td>$Env:CommonProgramFiles</td><td>C:\Program Files\Common Files</td>
</tr>
<tr>
<td>%CommonProgramFiles(x86)%</td><td>$Env:CommonProgramFiles(x86)</td><td>C:\Program Files (x86)\Common Files</td>
</tr>
<tr>
<td>%CommonProgramW6432%</td><td>$Env:CommonProgramW6432</td><td>C:\Program Files\Common Files</td>
</tr>
<tr>
<td>%COMPUTERNAME%</td><td>$Env:COMPUTERNAME</td><td>The computer name of the current local system.</td>
</tr>
<tr>
<td>%ComSpec%</td><td>$Env:ComSpec</td><td>C:\Windows\System32\cmd.exe</td>
</tr>
<tr>
<td>%DATE%</td><td></td><td>Current date in format determined by Date command</td>
</tr>
<tr>
<td>%DriverData%</td><td>$Env:DriverData</td><td>C:\Windows\System32\Drivers\DriverData</td>
</tr>
<tr>
<td>%ERRORLEVEL%</td><td></td><td>Number defining exit status of previous command or program</td>
</tr>
<tr>
<td>%HOMEDRIVE%</td><td>$Env:HOMEDRIVE</td><td>C:</td>
</tr>
<tr>
<td>%HOMEPATH%</td><td>$Env:HOMEPATH</td><td>\Users\(<em>user‐name</em>)</td>
</tr>
<tr>
<td>%LOCALAPPDATA%</td><td>$Env:LOCALAPPDATA</td><td>C:\Users\(<em>user‐name</em>)\AppData\Local</td>
</tr>
<tr>
<td>%LOGONSERVER%</td><td>$Env:LOGONSERVER</td><td>\\MicrosoftAccount</td>
</tr>
<tr>
<td>%NUMBER_OF_PROCESSORS%</td><td>$Env:NUMBER_OF_PROCESSORS</td><td>12</td>
</tr>
<tr>
<td>%OneDrive%</td><td>$Env:OneDrive</td><td>Current OneDrive folder location</td>
</tr>
<tr>
<td>%OS%</td><td>$Env:OS</td><td>Windows_NT</td>
</tr>
<tr>
<td>%Path%</td><td>$Env:path</td><td>C:\WINDOWS<br />
C:\WINDOWS\system32<br />
C:\WINDOWS\System32\Wbem<br />
C:\WINDOWS\System32\WindowsPowerShell\v1.0</td>
</tr>
<tr>
<td>%PATHEXT%</td><td>$Env:pATHEXT</td><td>COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC</td>
</tr>
<tr>
<td>%PROCESSOR_ARCHITECTURE%</td><td>$Env:pROCESSOR_ARCHITECTURE</td><td>AMD64</td>
</tr>
<tr>
<td>%PROCESSOR_IDENTIFIER%</td><td>$Env:pROCESSOR_IDENTIFIER</td><td>Intel64 Family 6 Model 158 Stepping 10, GenuineIntel</td>
</tr>
<tr>
<td>%PROCESSOR_LEVEL%</td><td>$Env:pROCESSOR_LEVEL</td><td>6</td>
</tr>
<tr>
<td>%PROCESSOR_REVISION%</td><td>$Env:pROCESSOR_REVISION</td><td>9e0a</td>
</tr>
<tr>
<td>%ProgramData%</td><td>$Env:programData</td><td>C:\ProgramData</td>
</tr>
<tr>
<td>%ProgramFiles%</td><td>$Env:programFiles</td><td>C:\Program Files</td>
</tr>
<tr>
<td>%ProgramFiles(x86)%</td><td>$Env:programFiles(x86)</td><td>C:\Program Files (x86)</td>
</tr>
<tr>
<td>%ProgramW6432%</td><td>$Env:programW6432</td><td>C:\Program Files</td>
</tr>
<tr>
<td>%PROMPT%</td><td></td><td>Code for current command prompt format. Code is usually $P$G</td>
</tr>
<tr>
<td>%PSModulePath%</td><td>$Env:pSModulePath</td><td>C:\Windows\system32\WindowsPowerShell\v1.0\Modules\</td>
</tr>
<tr>
<td>%PUBLIC%</td><td>$Env:pUBLIC</td><td>C:\Users\Public</td>
</tr>
<tr>
<td>%RANDOM%</td><td></td><td>Get random number between 0 and 32767</td>
</tr>
<tr>
<td>%SESSIONNAME%</td><td>$Env:SESSIONNAME</td><td>When logging on directly to machine, returns "Console".
When client connects via terminal server session, is combination of
connection name, followed by pound symbol {#} and session number.</td>
</tr>
<tr>
<td>%SystemDrive%</td><td>$Env:SystemDrive</td><td>C:</td>
</tr>
<tr>
<td>%SystemRoot%</td><td>$Env:SystemRoot</td><td>C:\Windows</td>
</tr>
<tr>
<td>%TEMP%</td><td>$Env:TEMP</td><td>C:\Users\(<em>user‐name</em>)\AppData\Local\Temp</td>
</tr>
<tr>
<td>%TIME%</td><td></td><td>Current time in format determined by Time command</td>
</tr>
<tr>
<td>%TMP%</td><td>$Env:TMP</td><td>C:\Users\(<em>user‐name</em>)\AppData\Local\Temp</td>
</tr>
<tr>
<td>%USERDOMAIN%</td><td>$Env:USERDOMAIN</td><td>Network domain name associated with the current user.</td>
</tr>
<tr>
<td>%USERDOMAIN_ROAMINGPROFILE%</td><td>$Env:USERDOMAIN_ROAMINGPROFILE</td><td>Network domain name associated with the current roaming profile.</td>
</tr>
<tr>
<td>%USERNAME%</td><td>$Env:USERNAME</td><td>(<em>user‐name</em>)</td>
</tr>
<tr>
<td>%USERPROFILE%</td><td>$Env:USERPROFILE</td><td>C:\Users\(<em>user‐name</em>)</td>
</tr>
<tr>
<td>%WINDIR%</td><td>$Env:WINDIR</td><td>C:\Windows</td>
</tr>
</table>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://learn.microsoft.com/de-de/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7.2"
target="_blank" rel="noreferrer noopener">
Microsoft ‐ Learn :: About environment variables</a>
</li>
<li><a href="https://www.elevenforum.com/t/complete-list-of-environment-variables-in-windows-11.11212/"
target="_blank" rel="noreferrer noopener">
Windows Eleven Forum :: Complete List of Environment Variables in Windows 11</a>
</li>
</ul>
</html>
<html>
<ul>
<li>aktuelle Execution-Policy anzeigen:
<code><pre>
get‐executionpolicy ‐list
</pre></code>
</li>
<li>die Execution-Policy ändern:
<code><pre>
set‐executionpolicy remotesigned
</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.script-example.com/wie-erstelle-ich-ein-PowerShell-Skript"
target="_blank" rel="noreferrer noopener">
Script‐example.com :: Windows PowerShell Skript erstellen und ausführen
</a>
</li>
</ul>
</html>
<html>
<table>
<tr>
<th>Keyboard Shortcut</th><th><center>Action</center>
</th>
</tr>
<tr>
<td>WIN‐Taste + E</td><td>Neues File Explorer (Datei-Explorer)-Fenster aufrufen
</td>
</tr>
<tr><td>Ctrl+X</td><td>“Cut“, Ausschneiden</td></tr>
<tr><td>Ctrl + Shift+N</td><td>New folder</td></tr>
<tr><td>Shift + F10, W, T</td><td>Create new text file</td></tr>
<tr><td>Alt+D</td><td>Select the address bar</td></tr>
<tr><td>Ctrl+E</td><td>Select the search box</td></tr>
<tr><td>Ctrl+F</td><td>Select the search box</td></tr>
<tr><td>Ctrl+N</td><td>Open a new window</td></tr>
<tr><td>Ctrl+W</td><td>Close the current window</td></tr>
<tr><td>Ctrl+mouse scroll wheel</td><td>Change the size and appearance of file and folder icons</td></tr>
<tr><td>Ctrl+Shift+E</td><td>Display all folders above the selected folder</td></tr>
<tr><td>Num Lock+asterisk (*)</td><td>Display all sub-folders under the selected folder</td></tr>
<tr><td>Num Lock+plus (+)</td><td>Display the contents of the selected folder</td></tr>
<tr><td>Num Lock+minus (-)</td><td>Collapse the selected folder</td></tr>
<tr><td>Alt+P</td><td>Display the preview pane</td></tr>
<tr><td>Alt+Enter</td><td>Open the Properties dialog box for the selected item</td></tr>
<tr><td>Alt+Right arrow</td><td>View the next folder</td></tr>
<tr><td>Alt+Up arrow</td><td>View the folder that the folder was in</td></tr>
<tr><td>Alt+Left arrow</td><td>View the previous folder</td></tr>
<tr><td>Backspace</td><td>View the previous folder</td></tr>
<tr><td>Right arrow</td><td>Display the current selection (if it's collapsed), or select the first sub-folder</td></tr>
<tr><td>Left arrow</td><td>Collapse the current selection (if it's expanded), or select the folder that the folder was in</td></tr>
<tr><td>End / Ende</td><td>Display the bottom of the active window</td></tr>
<tr><td>Home / Pos1</td><td>Display the top of the active window</td></tr>
<tr><td>F11</td><td>Maximize or minimize the active window</td></tr>
</table>
<h3>Links:</h3>
<ul>
<li><a href="https://www.thewindowsclub.com/file-explorer-keyboard-shortcuts-windows-10" target=_blank>The Windows Club :: File Explorer keyboard shortcuts ‐ Windows 10</a></li>
<li><a href="https://winaero.com/file-explorer-keyboard-shortcuts-every-windows-10-user-should-know/" target=_blank>Winaero :: File Explorer shortcuts every windows 10 user should know</a></li>
<li><a href="https://www.tenforums.com/tutorials/87219-how-right-click-using-keyboard-windows.html" target=_blank>Windows 10 Help Forums :: Keyboard shortcut for Right Mouse Click</a></li>
</ul>
</html>
<html>
<ul>
<li>SFC := System File Checker</li>
<br />
<li>DIMS := </li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://badawave.com/scan-and-fix-corrupt-files-in-windows-10-with-powershell/" target="_blank">Badawave.com :: Scan and fix files in Windows 10 with Powershell</a></li>
<li><a href="https://www.windowscentral.com/how-use-sfc-scannow-command-fix-problems-windows-10" target="_blank">WindowsCentral.com :: How to use SFC command to</a></li>
</ul>
</html>
<html>
<ul>
<li>
Grub2Win is completely free and open source. All modules are digitally signed for your security.
</li>
<li>
Safely multiboot Windows and Linux systems on both GPT and MBR disks.
</li>
<li>
Works with both EFI and BIOS firmware. Supports Windows 11, 10, 8, 7 and XP.
</li>
<li>
Grub2Win boots native GNU Grub version 2.06 code. Everything is installed to a single 20 MB directory on your Windows C: drive. The install also copies a few small boot modules to your EFI partition.
</li>
<li>
Automatically generates config files for PhoenixOS, Android, Ubuntu, Debian, Suse, Fedora, Manjaro, Mint, Clover and Windows. You can import Linux config files for most other distributions.
</li>
<li>
Please Note: ChromeOS is not supported by Grub2Win,
</li>
<li>
You can enter your own custom commands for each menu entry.
</li>
<li>
Grub2Win began in 2010. It has been downloaded more than a million times in 180 countries worldwide.
</li>
<li>
If you find Grub2Win useful, please consider making a small donation to be used for hardware and testing.
</li>
<li><b>Features:</b><br />
<ul>
<li>Supports both 64 and 32 bit EFI as well as BIOS firmware.</li>
<li>Installs to Windows 11, 10, 8, 7 and XP.</li>
<li>Requires just one directory on the Windows C: drive, about 20 MB disk space.</li>
<li>Works with all languages. Boot time help is available in 31 languages.</li>
<li>Simple Windows GUI easily sets up Grub2Win in seconds.</li>
<li>Lets you set your EFI firmware boot order from within Windows.</li>
<li>Preview and customize the 9 included graphic background themes. You can also create and customize your own background themes.</li>
<li>Works with all filesystems including Mac hfs and Btrfs.</li>
<li>Can search for and boot a partition by it's UUID or label. Supports advanced scripting.</li>
<li>Works with both GPT and MBR disks - up to 128 primary partitions per drive.</li>
<li>Supports extremely large (over 40 TB) disks and partitions.</li>
<li>Automatically generates config files for Windows, PhoenixOS, Android, Ubuntu, Debian, Suse, Fedora, Manjaro, Mint, Clover and more.</li>
<li>Import config files for most other Linux distributions.</li>
<li>Grub customization is done from Windows - Configuration in Linux is not required.</li>
<li>Includes open source GNU Grub 2.06 boot modules and libraries. Frequent releases and enhancements.</li>
<li>No adware or spyware - No hassles... It just works.</li>
</ul>
</li>
<ul>
</html>
<html>
<ul>
<li>
Grub2Win ist ein Dual-Boot Bootloader für gemischte Windows und<br />
Linux Systeme, der im Gegensatz zu anderen Linux eigenen Boot‐<br />
loader Programmen, den für die einwandfreie Funktionsfähigkeit von<br />
Windows Systemen wichtigen Windows MBR (Master Boot Record)<br />
nicht verändert.<br />
</li>
<br />
<li>
Windows Anwender die zusätzlich auch Linux auf dem selben Rechner<br />
verwenden, oder sich eine Linux basierte Windows Notfall-Umgebung<br />
fest installieren möchten (alternativ zur Installation auf CD/DVD oder<br />
USB Stick, wie beispielsweise mit YUMI möglich), können mit Grub2Win<br />
eine bootbare Linux Umgebung erstellen, ohne den Windows MBR oder<br />
die Windows Registry zu verändern.<br />
</li>
<br />
<li>
Grub2Win installiert sich auf dem Windows Systemlaufwerk “C:“, von wo<br />
aus beim Systemstart der Linux-Bootmanager Grub2 aufgerufen wird, mit<br />
dem Sie installierte Windows und Linux Umgebungen starten können. Hier‐<br />
bei unterstützt Grub2Win auch Laufwerke größer 4 TByte Speichervolumen,<br />
GPT‐Partitionen und die Dateisysteme Ext4, Ext3, Ext2, NTFS und FAT.<br />
</li>
<br />
<li>
Die Grub2Win Installation und Konfiguration erfolgt, indem Sie den Grub2‐<br />
Win‐Download in einen Ordner auf Ihrem Windows Systemlaufwerk ent‐<br />
packen und die grub2win.exe starten. Die grafische Benutzoberfläche der<br />
grub2win.exe erlaubt das Vornehmen weiterer Einstellungen, wie Boot-<br />
Timeouts, Grafikauflösung und Sprache und mit der Auswahl “Manage<br />
Boot Menu“ können weitere Systempartitionen dem Bootmenü hinzuge<br />
fügt werden.<br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.drwindows.de/news/software-vorstellungen/grub2win"
target="_blank" rel="noreferrer noopener">
DrWindows :: Grub2Win</a<
</li>
<li><a href="https://sourceforge.net/projects/grub2win/"
target="_blank" rel="noreferrer noopener">
Sourceforge :: Grub2Win</a>
</li>
</ul>
</html>
<html>
<ul>
<li>Editor zum Ändern der Gruppenrichtlinien:
<code><pre>
pgedit.msc
</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.giga.de/tipp/windows-10-11-gruppenrichtlinien-oeffnen-aendern-so-gehts/"
target="_blank" rel="noreferrer noopener">
Giga :: Windows 10/11 – Gruppenrichtlinien öffnen & ändern – so geht's</a>
</li>
<li>
<a href="https://www.deskmodder.de/wiki/index.php?title=Windows_11_und_10_Home_gpedit_Gruppenrichtlinie_installieren"
target="_blank" rel="noreferrer noopener">
Deskmodder.de :: Windows 11 und 10 Home : gpedit – Gruppenrichtlinie installieren</a>
</ul>
</html>
<html>
<h3>Wie lautet die Standardstartreihenfolge?</h3>
Die Standardeinstellungen für die Startreihenfolge des Computers<br />
werden im Werk konfiguriert. Durch die standardmäßige Startrei–<br />
henfolge wird festgelegt, was der Computer zuerst startet.<br />
<br />
<b>UEFI-Startreihenfolge :: </b><br />
<ul>
<li>Start-Manager des Betriebssystems</li>
<li>USB-Laufwerk</li>
<li>USB-CD- oder -DVD-Laufwerk</li>
<li>Netzwerkadapter</li>
</ul>
<b>Legacy-Startreihenfolge :: </b><br />
<ul>
<li>Start-Manager des Betriebssystems</li>
<li>Festplatte</li>
<li>USB-Laufwerk</li>
<li>USB-CD- oder -DVD-Laufwerk</li>
<li>USB-Netzwerkadapter</li>
<li>Netzwerkadapter</li>
</ul>
Um das System von einer DVD, einer CD oder einem USB-Gerät <br />
aus zu starten, müssen bootfähige Dateien darauf gespeichert<br />
sein. Andernfalls umgeht der PC das Gerät und lädt, was auf dem<br />
lokalen PC installiert ist.
<h3>Konfigurieren der Startreihenfolge</h3>
Sie könen die Startreihenfolge im Menü mit den BIOS-Einstellungen auf der Registerkarte Erweitert konfigurieren.
Verwenden Sie die folgenden Schritte, um die Startreihenfolge zu konfigurieren. Die aufgeführten Schritte gelten für die meisten Computer:
<ol>
<li>Schalten Sie den Computer ein oder starten Sie ihn neu.</li>
<li>Während der Bildschirm leer ist, drücken Sie die Taste F10, um das Menü mit den BIOS-Einstellungen zu öffnen.</li>
<li>Bei manchen Computern wird das Menü mit den BIOS-Einstellungen durch das Drücken der Taste F2 oder F6 aufgerufen.</li>
<li>Navigieren Sie nach dem öffnen des BIOS zu den Systemstarteinstellungen.</li>
<li>Notebooks: Wählen Sie Speicher > Startoptionen aus.</li>
<li>Desktop-Computer: Wählen Sie Systemkonfiguration > Startoptionen aus.</li>
<li>Folgen Sie den Anleitungen auf dem Bildschirm, um die Startreihenfolge zu ändern.</li>
</ol>
<h3>Zurücksetzen der Startreihenfolge auf die Standardeinstellungen</h3>
Führen Sie diese Schritte aus, um die Startreihenfolge zurückzusetzen.
<ol>
<li>Schalten Sie den Computer ein oder starten Sie ihn neu.</li>
<li>Während der Bildschirm leer ist, drücken Sie die Taste F10, um das BIOS-Einstellungsmenü zu öffnen.</li>
<li>Bei manchen Computern wird das BIOS-Einstellungsmenü durch das Drücken der Taste F2 oder F6 aufgerufen.</li>
<li>Wählen Sie im BIOS-Einrichtungsdienstprogramm die Registerkarte File (Datei) aus.</li>
<li>Wählen Sie Apply Defaults and Exit (Standardwerte übernehmen und beenden) aus. Das BIOS-Einrichtungsdienstprogramm wird geschlossen und der Computer startet Windows.</li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://support.hp.com/at-de/document/ish_3936044-3910496-16"
target="_blank" rel="noreferrer noopener">
HP-Support :: HP-PCs – Konfigurieren der Startreihenfolge im System-BIOS</a>
</li>
<li><a href="https://support.hp.com/at-de/document/ish_3936264-3919742-16"
target="_blank" rel="noreferrer noopener">
HP-Support :: HP Consumer-Notebooks – Informationen und Menüoptionen des BIOS-Setups</a>
</li>
</ul>
</html>
<html>
<ul>
<li>Powershell öffnen</li>
<br />
<li>CMDLET aufrufen:
<code><pre>Get‐FileHash [‐algorithm [md5 | sha1 | sha256]] <em><filename></em></pre></code>
Hiermit wird die Hash-Summe des angegebenen Files ermittelt. Ohne Angabe des<br />
Algorithmuses wird SHA256 verwendet.<br />
</li>
<br />
<li>Alternativ geht folgender Befehl:
<code><pre>certutil ‐hashfile <em><PATH_TO_FILE> <HASH_ALGORITHM></em></pre></code>
z.B.
<code><pre>certUtil ‐hashfile C:\file.img MD5</pre></code>
</li>
</ul>
<br />
<h3>Links:</h3>
<ul>
<li><a href="https://infosecscout.com/md5-checksum-on-windows/"
target="_blank" rel="noreferrer noopener">
InfoSecScout :: How to Do a MD5 Checksum on Windows? (No App Required)</a>
</li>
<li><a href="https://ladedu.com/de/md5-prufsumme-mit-windows-10-so-wirds-gemacht/"
target="_blank" rel="noreferrer noopener">
La De Du :: MD5 Checksum mit Windows Berechnen: So Geht's</a>
</li>
<li><a href="https://dekisoft.com/check-md5-sha-256-checksum-windows-11/"
target="_blank" rel="noreferrer noopener">
DekiSoft :: How to Check an MD5 or SHA-256 Checksum on Windows 11</a>
</li>
<li><a href="https://www.shellhacks.com/windows-md5-sha256-checksum-built-in-utility/"
target="_blank" rel="noreferrer noopener">
ShellHacks :: Windows: MD5/SHA256 CheckSum ‐ Built‐In Utility</a>
</li>
</ul>
</html>
<html>
<ul>
<li>die Helppage zu einem Befehl wird durch Angabe von <code><b>/?</b></code> aufgerufen:
<code><pre>
<em>z.B.</em> bcdedit /?
</pre></code>
</li>
</ul>
</html>
<html>
<ol>
<li>jpeg-Files im FileExplorer markieren</li>
<li>RMT drücken → es erscheint das (Befehls‐)Menü</li>
<li>aus diesem Menü den Eintrag “Print“ auswählen</li>
<li>neues Fenster erscheint: Titel “Print Pictures“</li>
<li>u.U. hier Anpassungen durchführen <em>(!darauf achten, <br />
dass der PDF‐Drucker ausgewählt ist!)</em></li>
<li>den Button “Print“ (rechts unten) anklicken</li>
</ol>
Sämtliche ausgewählte Files werden in <u>einem</u> File abgelegt.
</html>
<html>
<ul>
<li><h3>Key Takeaways</h3>
<ul>
<li>To find your Windows 11 OEM product key:
<ol>
<li>open Command Prompt or PowerShell as administrator,
</li>
<li>then enter:
<pre><code>wmic path softwarelicensingservice get OA3xOriginalProductKey</code></pre>
</li>
</ol>
</li>
<li>ShowKeyPlus can be used to find any Windows 11 product key, regardless of whether it is an OEM license or a retail license.
</li>
<li>OEM keys are tied to your PC's specific hardware, but retail licenses are transferrable between devices.
</li>
</ul>
</li>
<li>Windows 11 uses a product key to ensure your OS is genuine—in other words, not pirated. You can find the product key in use on your PC, which is particularly useful if you bought Windows yourself and need to reinstall it.
</li>
<li><h3>What Is a Windows Product Key?</h3>
<ul>
<li>A product key is Microsoft's way to ensuring that the copy of Windows being used is genuine. The key is provided to Microsoft when Windows 11 is activated, and Microsoft checks the key against its records. Windows will not be activated if the key is invalid.
</li>
<li>When you purchase a prebuilt computer or laptop, the original equipment manufacturer (OEM) installs Windows on the device for you. That kind of key is commonly referred to as an OEM key, an OEM product key, or an OEM license.
</li>
<li>Alternatively, there are retail licenses available for enthusiasts who build their own PCs or purchase different versions of Windows 11.
</li>
<li>Regardless of what kind of key you have, product keys are 25 characters long and composed of a mixture of capital letters and numbers.
</li>
</ul>
</li>
<li><h3>Find an OEM Product Key With Command Prompt</h3>
<ul>
<li>If your PC has an OEM license—in other words, if you purchased a computer that came with Windows preinstalled—you can find the license key using Command Prompt, or PowerShell. The command is the same in both programs.
</li>
<li>If you bought a retail license and installed it on a prebuilt PC or a laptop, you'll need to use the ShowKeyPlus method.
</li>
<li>Click the Start button, type command prompt or cmd into the search bar, and then hit Enter.
</li>
<li>In the window that appears, enter:
<pre><code>wmic path softwarelicensingservice get OA3xOriginalProductKey</code></pre>
</li>
<li>If you were successful, you should see a string of letters and numbers immediately under the command you entered. That is your product key!
<img src="./pictures/Windows11-Right_Size_Console-1.avif"
height= width= title="Command prompt displaying key" />
</li>
</ul>
</li>
<li><h3>Show a Retail Product Key Using ShowKeyPlus</h3>
<ul>
<li>If you purchased and installed Windows yourself, ShowKeyPlus is a good way to find your product key. ShowKeyPlus is a free application available on the Microsoft Store.
</li>
<li>To download it, click the Start button, type Microsoft Store in the search bar, then hit "Open."
<img src="./pictures/Windows11_MicrosoftStore.avif"
height= width= title="In start menu, type "Microsoft Store", then click open" />
</li>
<li>Once the Microsoft Store is open, go to the top of the page and enter ShowKeyPlus into the search bar, and hit enter.
<img src="./pictures/Windows11_IntoMicrosoft-store.avif"
height= width= title=""ShowKeyPlus" in a red box in the search bar" />
</li>
<li>On the ShowKeyPlus app page, click "Install." Once it is done installing, the "Install" button will change into an "Open" button. Click "Open."
<img src="./pictures/Windows11_Points_To_Install.avif"
heigt= width= title="Click install button" />
</li>
<li>ShowKeyPlus displays the currently installed key and the OEM key.
<img src="./pictures/Windows11_ShowKeyPlus-Image1.avif"
height= width= title="ShowKeyPlus Image1">
</li>
<li>If you're using an OEM copy of Windows 11, both the green and blue boxes display your product key. If you installed a version of Windows 11 you purchased yourself, the green box is the key currently in use.
</li>
<li>Once you have the key you can write it down or save it to a file on your computer. Be careful not to share it online. Retail licenses can be used on multiple devices (though not simultaneously), so someone may attempt to steal your product key to activate Windows.
</li>
<li>If you purchased a retail key, you can use it in the future to reinstall Windows. If your PC came running Windows and has an OEM key, you probably won't need to use it—OEM keys are tied to your hardware, and Windows will detect them automatically when it is installed.
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.howtogeek.com/784986/how-to-find-your-windows-11-product-key/"
target="_blank" rel="noreferrer noopener">
How-To Geek :: How to Find Your Windows 11 Product Key</a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>Windows Subsystem for Linux (WSL): <a><a href="https://aka.ms/wslusers" target="_blank" rel="noreferrer noopener">https://aka.ms/wslusers</a></li>
<li>Powershell: <a href="https://aka.ms/PSWindows" target="_blank" rel="noreferrer noopener">https://aka.ms/PSWindows</a></li>
</ul>
</html>
<html>
<p>
Änderungen an Rechnersystemen muss man fraglos dokumentieren. Das gilt erst recht, wenn verschiedene Gruppen - beispielsweise im Schichtbetrieb - die Computer administrieren. Ein <b>Windows-Editor</b> hat dafür eine clevere und bestechend einfache Lösung.
</p>
<p>
Schreibt man mit dem Standard-Texteditor von Windows (<b>Notepad</b> oder in neueren Windows-Versionen <b>Editor</b>) in die erste Zeile einer ansonsten leeren und beliebig benannten Datei den String
<code><pre>
.LOG
</pre></code>
dann behandelt Windows die Datei von da an wie ein Logbuch. Bei jedem Öffnen setzt es das aktuelle Datum und die Uhrzeit automatisch in die letzte Zeile ein und platziert den Cursor darunter. Hier können nun ohne Umschweife die aktuellen Änderungen protokolliert werden. Beim nächsten Öffnen entsteht ohne weiteres Zutun auf diese Weise der nächste Log-Eintrag mit Zeitstempel.
</p>
<p>
Kleiner Nachteil: Die Kopfzeile muss wieder gelöscht werden, wenn man die Datei nur zum Lesen öffnet.
</p>
<h3>Links:</h3>
<ul>
<li><a href="https://www.admin-magazin.de/News/Tipps/ADMIN-Tipp-Cleveres-Logbuch" target=_blank>ADMIN ‐ Tipp :: Cleveres Logbuch für txt‐Files unter Windows</a></li>
</ul>
</html>
<html>
<h3>Steps to Create Task Reminder Using Task Scheduler</h3>
<ol>
<li>Launch the Task Scheduler. You can do that by going to Start Menu,<br />
searching for task scheduler and then hitting Enter.</li>
<li>On the Task Scheduler window the right pane is labeled as Actions.<br />
Click on the option to Create Task.<br />
<img src="./pictures/Reminder_TaskScheduler.JPG" height=181 width=591 /></li>
<li>On the next dialog, go to General tab. Give your task a Name so that<br />
you can identify it among other if when you decide to make some changes<br />
later.</li>
<li>Next, switch the context to Triggers tab. Click on the New button on<br />
the bottom left of the window to define trigger details.</li>
<li>For the trigger, set a start date and time, choose the recurrence be‐<br />
havior and define advanced settings if any. Click on Ok when done.</li>
<li>Back on the Create Task window, switch to the Actions tab and create<br />
a New action.</li>
<li>Choose whether you want to Display a message or Send an email. I<br />
chose the former because that shows a pop up on top of whatever you<br />
may be doing when the reminder is triggered. Fill the Title and the Mes‐<br />
sage text boxes and hit on Ok.<br />
<br />“Display a message“ ist deprecated<br />
<br />
→ stattdessen:
<ul>
<li>Feld “Action“ :: <code><b>Start a program</b></code></li>
<li>Feld “Program / script“ :: <code><b>powershell</b></code></li>
<li>Feld “Add arguments (optional)“ :: <code><b>
-WindowStyle hidden -Command "& {[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); [System.Windows.Forms.MessageBox]::Show('<em><Msg‐Text></em>','<em><Title‐msg‐Text></em>')}"</b></code></li>
</li></ul>
<li><b>Note:</b><br />
If you want you can create multiple triggers and define multiple actions<br />
for a single task.<br />
<br />
With that done you can close all the windows that have been stacked. </li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://www.guidingtech.com/16536/task-reminders-windows-scheduler-no-third-party-tools/" target="_blank" rel="noreferrer noopener">Guiding Tech :: Create Task Reminders Using Windows Task Scheduler Instead of Third Party Tools</a></li>
<li><a href="https://www.tech-recipes.com/rx/56157/how-to-set-reminders-on-your-windows-10-desktop/" target="_blank" rel="noreferrer noopener">Tech Recipes ::
How to Set Reminders on Your Windows 10 Desktop</a></li>
<li><a href="https://www.howtogeek.com/123393/how-to-automatically-run-programs-and-set-reminders-with-the-windows-task-scheduler/" target="_blank" rel="noreferrer noopener">How‐to Geek :: How to Automatically Run Programs and Set Reminders With the Windows Task Scheduler</a></li>
<li><a href="https://windowsloop.com/display-popup-message-in-windows-10/" target="_blank" rel="noreferrer noopener">WindowsLoop :: How to Display Popup Message with Task Scheduler in Windows 10</a></li>
</ul>
</html>
<html>
<h2>Create an automatic reminder for a certain date and time</h2>
Follow these steps to schedule a reminder in Windows 7:
<ol>
<li> Open the start menu, and type "tasks" in the search field.</li>
<li> When Windows 7 loads the results, click on the "Schedule tasks" link: <br />
<br />
<center><img src="./pictures/Add-and-schedule-a-task-in-Windows-7-Task-Scheduler.jpg" height=92 width=148 /></center></li>
<li> In the Task Scheduler window that opens, click on the Action menu, and choose "Create Basic Task" to setup your reminder and launch the Basic Task wizard.</li>
<li> Type a name for your reminder, and click Next.<br />
<br />
<center><img src="./pictures/Choose-a-name-for-your-reminder.png" height=29 width=174 /></center></li>
<li> The next screen gives you a choice: if all you need is a one-time notification, choose "One Time"; for an appointment that repeats, choose "Daily" (more than once a week), "Weekly" (several times per month), or "Monthly" (more than once per year).</li>
<li> Click on the "Next" button, and pick a date and time for your reminder notification.<br />
<br />
<center><img src="./pictures/Choose-date-and-time-for-your-reminder-notification.jpg" height=145 width=200 /></center></li>
<li> Click Next, and choose "Display a message": with this choice, Windows 7 lets you type some text that will show up in your on-screen alert message.</li>
<li> Click on the Next button, and enter a Title for your reminder, and a Message you will want displayed in the alert box. (Note that you cannot type a new line with the Enter key, otherwise the Task Scheduler will instead load the next screen - if that happens, just click on the "Back" button to resume editing your reminder message.)<br />
<br />
<center><img src="./pictures/Display-a-title-and-message-for-your-reminder-popup-in-Windows-7.png" height=83 width=282 /></center></li>
<li> Click Next to finalize the reminder setup, and click Finish to save it.</li>
<li> And here is an example of a custom reminder from the Task Scheduler in Windows 7:<br />
<br />
<center><img src="./pictures/Sample-reminder-popup-alert-in-Windows-7.jpg" height=179 width=270 /></center></li>
</ol>
This is all it takes to create and setup a reminder popup message in Windows 7! If you need to go back and change your reminder's date, time, or title / message, see where the Task Scheduler stores Windows tasks you have created to edit its settings.
</html>
<html>
<ul>
<li>Pfad zu den Startmenü-Einträgen im Windows - Menu:
<code><pre>
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\
</pre></code>
</li>
<li>weitere (Unter-)Verzeichnisse bei der NordLB:<br />
Bank-Anwendungen\Murex ⇒
<ol>
<li>PROD </li>
<li>TEST </li>
<li>UAT </li>
</ol>
</li>
</ul>
</html>
<html>
<code><pre>
PS C:\Users\mueller\Desktop> Get-CimInstance -query "Select * from Win32_DiskDrive"
DeviceID Caption Partitions Size Model
-------- ------- ---------- ---- -----
\\.\PHYSICALDRIVE0 SDXC SCSI Disk Device 1 63861073920 SDXC SCSI Disk Device
\\.\PHYSICALDRIVE1 Lexar SSD NM620 512GB 3 512105932800 Lexar SSD NM620 512GB
</pre></code>
Bei dem ersten Eintrag handelt es sich um die externe SD‐Karte.<br />
<br />
Wenn es stimmt, was ich ermittelt habe, lässt sich aktuell [Stand: 02/2023]<br />
eine SD‐Karte <b>nicht</b> unter WSL 2 mounten.
<h3>Links:</h3>
<ul>
<li><a href="https://learn.microsoft.com/en-us/windows/wsl/wsl2-mount-disk"
target="_blank" rel="noreferrer noopener">
MicroSoft :: Mount a Linux disk in WSL 2</a>
</li>
</ul>
</html>
<html>
<ul>
<li>engl., Bodenerhebung, (An‐)Heben</li>
<br />
<li>damit ist das Heben auf eine höhere Rechte‐Ebene gemeint</li>
<br />
<li>z.B. kann man Elevation erreichen, indem man zum Beispiel<br />
die Powershell per Rechtsklick “<code><b>als Administrator ausführen“</b></code> <br />
bzw. “<code><b>Run as Administrator</b></code>“ startet.</li>
</ul>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.danielengberg.com/how-to-run-powershell-as-an-administrator/"
target="_blank" rel="noreferrer noopener">Daniel Engberg :: 3 Easy Ways to
Elevate Powershell to Admin (That I use)</a></li>
<li><a href="https://blog.expta.com/2017/03/how-to-self-elevate-powershell-script.html"
target="_blank" rel="noreferrer noopener">EXPTA Blog :: How to Self-Elevate a PowerShell Script</a></li>
<li><a href="https://stackoverflow.com/questions/60209449/how-to-elevate-a-powershell-script-from-within-a-script"
target="_blank" rel="noreferrer noopener">StackOverflow :: How to elevate a
Powershell script from within a script</a></li>
<!--
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
<li><a href="" target="_blank" rel="noreferrer noopener"></a></li>
-->
</ul>
</html>
<html>
<h3>Allgemeine PowerShell-Befehle</h3>
<ul>
<li>Statt des Cmdlets <code><b>Get-ChildItem</b></code> kann<br />
<code><b>dir</b></code> als Alias verwendet werden.</li>
</ul>
<ol>
<li>Navigation durch die Windows Registry wie durch ein Dateisystem:<br />
<code><b>cd hkcu:</b></code><br />
<br />
“hkcu“ steht dabei für “HKEY_CURRENT_USER“
<em>(die Anfangsbuchstaben)</em><br />
“hklm“ := “HKEY_LOCAL_MACHINE“</li>
<br />
<li>Rekursive Suche nach einem Textfragment in Dateien:<br />
<code><b>dir ‐r | select-string "Suchwort"</b></code><br />
<br />
Rekursive Suche nach Files mit bestimmten String im Filenamen:<br />
<code><b>dir ‐filter ∗Excel∗ [<em>weitere filter</em>] ‐r</b></code><br />
<br />
Beispiel: <code><b>dir ‐filter ∗Grundlagen∗ ∗KE‐2∗ ‐r</b></code></li>
<br />
<li>Ausgabe der fünf speicherhungrigsten Prozesse:<br />
<code><b>ps | sort ‐p ws | select ‐last 5</b></code></li>
<br />
<li>Neustart eines Dienstes (stoppen und wieder starten) am Beispiel DHCP:<br />
<code><b>Restart-Service DHCP</b></code></li>
<br />
<li>Alle Elemente eines Ordners ausgeben:<br />
<code><b>Get-ChildItem ‐Force</b></code><br />
<br />
Nur Directories (seitenweise) anzeigen:<br />
<code><b>dir ‐Directory | more</b></code></li>
<br />
<li>Elemente aus Verzeichnissen oder Ordnern rekursiv ausgeben:<br />
<code><b>Get-ChildItem ‐Force c:\directory ‐Recurse</b></code></li>
<br />
<li>Alle Dateien in einem Verzeichnis ohne einzelne Rückfragen löschen:<br />
<code><b>Remove-Item C:\tobedeleted ‐Recurse</b></code></li>
<br />
<li>Den aktuellen Computer neu starten:<br />
<code><b>(Get-WmiObject -Class Win32_OperatingSystem -ComputerName .).Win32Shutdown(2)</b></code></li>
<h3>Per PowerShell Informationen sammeln</h3>
<li>Informationen über Hersteller und Modell des Computers ausgeben:<br />
<code><b>Get-WmiObject -Class Win32_ComputerSystem</b></code></li>
<br />
<li>Informationen über das BIOS des aktuellen Computers ausgeben:<br />
<code><b>Get-WmiObject -Class Win32_BIOS -ComputerName</b></code> </li>
<br />
<li>Installierte Hotfixes (QFEs, Windows Updates) ausgeben:<br />
<code><b>Get-WmiObject -Class Win32_QuickFixEngineering -ComputerName</b></code></li>
<br />
<li>Benutzernamen des aktuell angemeldeten Benutzers ausgeben:<br />
<code><b>Get-WmiObject -Class Win32_ComputerSystem -Property UserName -ComputerName</b></code></li>
<br />
<li>Alle Namen der installierten Anwendungen auf dem aktuellen Computer ausgeben:<br />
<code><b>Get-WmiObject -Class Win32_Product -ComputerName . | Format-Wide -Column 1</b></code></li>
<br />
<li>Alle IP-Adressen des aktuellen Computers ausgeben:<br />
<code><b>Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter IPEnabled=TRUE -ComputerName . | Format-Table -Property IPAddress</b></code></li>
<br />
<li>Umfassenderen Bericht über die IP-Konfiguration des aktuellen Computers ausgeben:<br />
<code><b>Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter IPEnabled=TRUE -ComputerName . | Select-Object -Property [a-z]* -ExcludeProperty IPX*,WINS*</b></code></li>
<br />
<li>Netzwerkadapter des vorliegenden Computers mit aktiviertem DHCP ausgeben:<br />
<code><b>Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter "DHCPEnabled=true" -ComputerName</b></code></li>
<br />
<li>DHCP auf allen Netzwerkadaptern des aktuellen Computers aktivieren:<br />
<code><b>Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter IPEnabled=true -ComputerName . | ForEach-Object -Process {$_.EnableDHCP()}</b></code></li>
<h3>Softwareverwaltung über die PowerShell</h3>
<li>MSI-Paket auf einem anderen Computer installieren:<br />
<code><b>(Get-WMIObject -ComputerName TARGETMACHINE -List | Where-Object -FilterScript {$_.Name -eq "Win32_Product"}).Install(\\MACHINEWHEREMSIRESIDES\path\package.msi)</b></code></li>
<br />
<li>Eine installierte Anwendung durch ein MSI-basiertes Upgrade-Paket aktualisieren:<br />
<code><b>(Get-WmiObject -Class Win32_Product -ComputerName . -Filter "Name='name_of_app_to_be_upgraded'").Upgrade(\\MACHINEWHEREMSIRESIDES\path\upgrade_package.msi)</b></code></li>
<br />
<li>MSI-Paket vom aktuellen Computer entfernen:<br />
<code><b>(Get-WmiObject -Class Win32_Product -Filter "Name='product_to_remove'" -ComputerName . ).Uninstall()</b></code></li>
<h3>PowerShell-Befehle zur VM-Verwaltung</h3>
<li>Einen anderen Computer nach einer Minute herunterfahren:<br />
<code><b>Start-Sleep 60; Restart-Computer ‐Force ‐ComputerName TARGETMACHINE</b></code></li>
<br />
<li>Einen Drucker hinzufügen:<br />
<code><b>(New-Object -ComObject WScript.Network).AddWindowsPrinterConnection("\\printerserver\hplaser3")</b></code></li>
<br />
<li>Einen Drucker entfernen:<br />
<code><b>(New-Object -ComObject WScript.Network).RemovePrinterConnection("\\printerserver\hplaser3 ")</b></code></li>
<br />
<li>Eine Remote-Sitzung starten (Remote-Verwaltung muss aktiviert sein):<br />
<code><b>enter-pssession TARGETMACHINE</b></code></li>
<br />
<li>PowerShell verwenden, um ein Script auf einem anderen Server auszuführen:<br />
<code><b>invoke-command -computername machine1, machine2 -filepath c:\Script\script.ps1</b></code>
<h3>Bonus-Befehl</h3>
Um einen Prozess zu beenden, kann die Prozess-ID oder der Prozessname verwendet<br />
werden. Mit Hilfe des Parameters ‐processname ist die Nutzung von Platzhaltern möglich.<br />
Auf folgende Weise wird beispielsweise der Windows-Rechner beendet:<br />
<br />
<code><b>Stop-Process ‐processname calc*</b></code>
<h3>Links:</h3>
<ul>
<li><a href="https://www.computerweekly.com/de/tipp/PowerShell-Einstieg-Die-25-wichtigsten-Befehle-zur-Windows-Verwaltung" target=_blank>ComputerWeekly :: PowerShell‐Einstieg ‐ Die 25 wichtigsten Befehle zur Windows‐Verwaltung</a></li>
<li><a href="https://www.windowspro.de/script/text-seitenweise-ausgeben-powershell-more-less-head-tail" target="_blank" rel="noreferrer noopener">WindowsPro :: Powershell ‐ Text seitenweise ausgeben</a></li>
<li><a href="https://powershellcookbook.com/" target="_blank" rel="noreferrer noopener">PowerShell ‐ Cookbook online</a></li>
</ul>
</html>
<html>
<h3>Syntax loop statement ::</h3>
<code><pre>
for (<Initial iterator value>; <Condition>; <Code to repeat>)
{
<Statement list>
}
</pre></code>
where …
<ul>
<li> The Initial placeholder: starting value. </li>
<li> The Condition placeholder: the limit or condition to determine whether the loop should continue running or end. </li>
<li> The Repeat placeholder:<br />
accepts multiple commands. The commands provided in this placeholder are executed after each loop repeats and before the Condition is re-evaluated. </li>
<li> The Statement list placeholder: the main code that you intend to run will be placed.</li>
</ul>
<h3>Beispiele:</h3>
<code><pre>
for ($num = 0; $num -lt 10; $num++)
{
"I count $num "
}
</pre></code>
<code><pre>
for ($x='' ;$x.length -le 30;$x=$x+'x'){
Write-Host $x
Start-Sleep -Milliseconds 20
}
</pre></code>
The example will keep repeating the letter “x“ with each <br />
line containing one more character than the previous one <br />
until the number of characters in the line reaches 30.<br />
<br />
The value of $x was initiated with '' which contains zero <br />
characters. The limit based on the condition is up to when <br />
the number of characters contains in the value of $x <br />
reaches 30. After each iteration, one more letter “x“ is <br />
appended to the value of $x.<br />
<code><pre>
$colors = @("Green","Cyan","Red","Magenta","Yellow","White")
for (($x=''),($fgcolor = $colors | Get-Random) ;$x.length -le 30;($x=$x+'x'),($fgcolor = $colors | Get-Random)){
Write-Host $x -ForegroundColor $fgcolor
Start-Sleep -Milliseconds 20
}
</pre></code>
Concatenating Strings with Multiple Initial and Repeat Expressions
The Initial and Repeat placeholders in the for loop statement can accept multiple expressions.
Using the code in the previous example above, the code can be modified to add a new expression in the Repeat placeholder to pick a random color. The random color will then be used as the foreground color of the string to be displayed in the console.
As you can see in the first line, an array containing names of colors is defined. The for loop operation will randomly pick a color name from this array.
Notice that the Initial and Repeat placeholders now has two expressions. Each expression is enclosed in a parenthesis and separated with a comma.
<code><pre>
for ($counter = 1; $counter -le 100; $counter++ )
{
# ADD YOUR CODE HERE
Write-Progress -Activity "Update Progress" -Status "$counter% Complete:" -PercentComplete $counter;
}
</pre></code>
Displaying Progress
Perhaps the most common use of for loop is for showing progress indicators. This is mostly employed when running tasks for bulk items that may take time to complete. Like, creating a report for all mailbox sizes in your Exchange organization, or updating attributes of multiple users in Active Directory.
<code><pre>
for ($seconds=10; $seconds -gt -1; $seconds--) {
Write-Host -NoNewLine ("`rseconds remaining: " + ("{0:d4}" -f $seconds))
Start-Sleep -Seconds 1
}
</pre></code>
Displaying a Countdown Timer
This next code shows how to use the for loop to display a countdown timer. This countdown timer only shows the remaining seconds, starting from 10.
If you want to change the starting number, you only need to change the value of the $seconds variable in the Initial placeholder.
<code><pre>
# Set the number of minutes to countdown from
$minutes = 1
for ($minutes--; $minutes -gt -1; $minutes--)
{
for ($seconds = 59 ; $seconds -gt -1 ; $seconds--)
{
$remaining = ("{0}:{1}" -f ("{0:d4}" -f $minutes),("{0:d2}" -f $seconds))
Write-Host "`r$remaining" -NoNewline
Start-Sleep -Seconds 1
}
}
</pre></code>
Displaying a Countdown Timer (Nested For Loop)
What if you want to display the countdown timer using the minutes:seconds format? The nested for loop can be used to accomplish that. A nested for loop is simply defined as a for loop inside another for loop and so on.
The first for loop handles the countdown of the minute part of the timer. As you can see, there is a $minutes variable before the for loop where you need to indicate the number of minutes that the for loop will countdown from.
The second for loop handles the countdown of the seconds part of the timer. After each iteration, the loop pauses for 1 second before resuming. It will continue to do so until the $seconds value reaches 0.
<h3>Links:</h3>
<ul>
<li><a href="https://adamtheautomator.com/powershell-for-loop/" target="_blank" rel="noreferrer noopener">
Adam‐the‐automator :: Back to Basics: The PowerShell For Loop</a></li>
</ul>
</html>
<html>
<meta "PowerShell-Version ermitteln" />
<h3>Windows 10 :: </h3>
<ol>
<li>Drückt die Tastenkombination <code><b>Windows + R</b></code>.
</li>
<li>Gebt <code><b>powershell</b></code> ein und drückt <code><b>Enter</b></code>, um die PowerShell zu öffnen.
</li>
<li>Tippt dort den Befehl <code><pre>$PSVersionTable</pre></code> ein und drückt <code><b>Enter</b></code>.
</li>
<li>Als erster Eintrag wird euch die PowerShell-Version angezeigt (PSVersion). <br />
</li>
</ol>
<br />
Ist man nur an der PowerShell-Version interessiert, so reicht auch die Eingabe <code><pre>$PSVersionTable.PSVersion</pre></code>
Darunter seht ihr die Frameworks und Protokolle, welche die Basis der PowerShell sind.<br />
<br />
„CLRVersion“ (Common Language Runtime) ist die Laufzeitumgebung des .NET-Frameworks.<br />
<h3>Alternativen:</h3>
<ul>
<li><pre><code>$PSVersionTable</pre></code>
</li>
<li><pre><code>powershell.exe -command "write-host;write-host PowerShell-Versionen;write-host --------------------;write-host Std.-Version: (get-host).Version;if ((pwsh.exe -command "1") -eq "1"){pwsh.exe -command 'write-host Core-Version: (get-host).Version'} else {write-host Core-Version: nicht installiert}"</pre></code>
</li>
<li><pre><code>get‐host</pre></code>
</li>
<li><pre><code>$host</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.giga.de/downloads/windows-10/tipps/powershell-version-anzeigen/"
target="_blank" ref="noreferrer noopener">
Giga :: PowerShell‐Version anzeigen</a>
</li>
<li><a href="https://blog.devilatwork.de/welche-powershell-version-habe-ich-powershell-version-anzeigen/"
target="_blank" rel="noreferrer noopener">
Devil at work :: Welche PowerShell‐Version habe ich? ‐‐ PowerShell‐Version anzeigen</a>
</li>
</ul>
</html>
<html>
<h3>Windows 10 :: </h3>
<h4>Registry öffnen: </h4>
<ol>
<li>Drückt die Tastenkombination <code><b>Windows + R</b></code>, um den <code><b>Ausführen</b></code>-Dialog zu öffnen.</li>
<li>Tippt <code><b>regedit</b></code> ein und drückt <code><b>Enter</b></code>.</li>
<li>Bestätigt den Benutzerkontensteuerung-Hinweis mit <code><b>Ja</b></code>.</li>
</ol>
<h3>Links:</h3>
<ul>
<li><a href="https://www.giga.de/downloads/windows-10/tipps/windows-10-registry-oeffnen-bearbeiten/" target=_blank>Giga :: Windows 10‐Registry öffnen & bearbeiten</a></li>
</ul>
</html>
<html>
https://www.giga.de/downloads/windows-10/tipps/windows-10-schnellstart-deaktivieren/
</html>
<html>
Der einfachste und schnellste Weg den Bildschirm unter Windows 10<br />
abzufilmen, funktioniert ohne Programme oder Tools ‐ wenn man weiß,<br />
welche Tasten zu drücken sind.
<ul>
<li>Drücken Sie dazu die Tastenkombination <b>Win + G</b>.
</li>
<li>Es erscheint ein Menü, dass verschiedene Gaming Funktionen<br />
bietet: <br />
<img src="./pictures/Windows_ScreencastErstellen.png" height=207 width=701 /> <!-- height=413 width=1402 -->
</li>
<li>Drücken Sie den Kreis oben links. Alternativ können Sie auch<br />
die Tastenkombination <b>Windowstaste + Alt + R</b> verwenden.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://praxistipps.chip.de/windows-10-bildschirm-abfilmen-so-klappt-der-screencast_42476"
target="_blank" rel="noreferrer noopener">
Chip.de :: Praxistipp ‐ Bildschirm abfilmen ‐ so klappt der Screencast
</li>
</ul>
</html>
<html>
<h3>To configure how a service is started using the Windows interface </h3>
Click Start, click in the Start Search box, type services.msc, and then press ENTER.<br />
<br />
Optionally, export and save a list of the existing settings. To do this, right-click Services, select Export List, and save the settings list.<br />
<br />
In the details pane, right-click the service that you want to configure, and then click Properties.<br />
<br />
On the General tab, in Startup type, click Automatic, Manual, Disabled, or Automatic (Delayed Start).<br />
<br />
To specify the user account that the service can use to log on, click the Log On tab, and then do one of the following:<br />
<br />
To specify that the service uses the Local System account, click Local System account.<br />
<br />
To specify that the service uses the Local Service account, click This account, and then type NT AUTHORITY\LocalService.<br />
<br />
To specify that the service uses the Network Service account, click This account, and then type NT AUTHORITY\NetworkService.<br />
<br />
To specify another account, click This account, click Browse, and then specify a user account in the Select User dialog box. When you are finished, click OK.<br />
<br />
Type the password for the user account in Password and in Confirm password, and then click OK. If you <br />
select the Local Service account or Network Service account, do not type a password.<br />
<br />
<h3>To configure how a service is started using the command line</h3>
You can also manage services using the sc config command. For more information about the options <br />available, open a command prompt and type sc config /?. For examples and detailed descriptions of the command-line options, see the command-line reference at http://go.microsoft.com/fwlink/?linkid=53528.
<br />
<h3>Additional considerations</h3>
To perform this procedure, you must be a member of the Account Operators group, the Domain Admins group, the Enterprise Admins group, or you must have been delegated the appropriate authority. As a security best practice, consider using Run as to perform this procedure.<br />
<br />
Changing the default service settings might prevent key services from running correctly. It is especially important to use caution when changing the Startup Type and Log On As settings of services that are configured to start automatically.<br />
<br />
In most cases, we recommend that you do not change the Allow service to interact with desktop setting. If you allow the service to interact with the desktop, any information that the service displays on the desktop will also be displayed on an interactive user's desktop. A malicious user could then take control of the service or attack it from the interactive desktop.<br />
<br />
The Local Service account and Network Service account are configured with a null password. The password information you supply is ignored.<br />
<br />
We recommend that user accounts that are used to log on as a service have the Password never expires check box selected in their Properties dialog box and that they have strong passwords.<br />
<br />
If account lockout policy is enabled and the account is locked out, the service will not start.<br />
<br />
If you enable or disable a service and you encounter a problem starting the computer, you can start the <br />
computer in Safe Mode. In Safe Mode, core services that are required to start the operating system are<br />
started in a default scheme, regardless of any changes that are made to the service settings. After the <br />
computer is in Safe Mode, you can change the service configuration or restore the default configuration.<br />
<br />
If you specify an account that does not have permission to log on as a service, the Services snap-in <br />
automatically grants the appropriate permissions to that account on the computer that you are managing.
<h3>Additional references</h3>
For information about configuring the Windows Time service, see W32tm at http://go.microsoft.com/fwlink/?linkid=69453.<br />
<br />
For more information about the user accounts that a service uses to log on, see Default Settings for Services at http://go.microsoft.com/fwlink/?linkid=68107.<br />
<h3>Quelle:</h3>
Windows :: Microsoft Management Console
</html>
<html>
Wenn Ihre Tastatur über einen Nummernblock verfügt, können Sie <br />
das C mit Haken auch mit den Tastenkombinationen
<code><pre>[Alt] + [1][2][8]</pre></code> und <code><pre>[Alt] + [1][3][5]</pre></code>
erzeugen.
</html>
<html>
<ul>
<li>If you intend to change file extensions in Windows 11, first you'll need<br />
to change the options to show the hidden file extensions in the File<br />
Explorer of Windows 11.
</li>
<li>First, open Windows File Explorer on your Windows 11 PC by clicking<br />
the File Explorer icon on the Taskbar. <br />
<br />Alternatively, you can also press the Windows <em>(die Windows‐Taste links<br />
unten)</em> + E shortcut to open it.
</li>
<li>Then, click on the “View“<em>(Anzeigen)</em> drop-down in the File Explorer ribbon,
</li>
<li>Then expand the“Show“ <em>(Einblenden)</em> option, and click “File name exten‐<br />
sions“ <em>(Dateinamenerweiterungen)</em>. <em>(Dadurch wird der Eintrag aktiviert,<br />
was an dem Tick‐off vor dem Eintrag zu erkennen ist.)</em>
</li>
</ul>
Die eigentliche Änderung erfolgt wie folgt:
<ul>
<li>Das gewünschte File markieren, und dann die rechte Maustaste anklicken</li>
<li>In dem dann erscheinenden Menü den Eintrag "Weitere Optionen auswählen" auswählen</li>
<li>Das daraufhin erscheinende Menü hat weit unten den Eintrag "Umbenennen". Den dann anklicken.</li>
<li>Es ändert sich die Darstellung des zu ändernden Files, die Änderung kann vorgenommen werden.</li>
</ul>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://allthings.how/how-to-change-file-type-in-windows-11/"
target="_blank" rel="noreferrer noopener">
AllThings.how :: How to change the file type in Windows 11</a>
</li>
</ul>
</html>
<html>
<ul>
<li><b>Windows N:</b><br />
Multimedia support removed. <br />
This version is for the European market and has <br />
no Windows Media Player, Windows Media Cen–<br />
ter, and Windows DVD Maker. These components<br />
were removed due to sanctions by the European<br />
Union (EU) against Microsoft for violating anti-trust<br />
laws.
</li>
<li><b>Windows K:</b><br />
An edition especially for the South Korean market<br />
and comes pre-installed with links to other compe–<br />
ting instant messaging and media player software.
</li>
<li><b>Windows KN: </b><br />
A combination of K and N. It has links to other <br />
competing IM/MP software, but Windows Me–<br />
dia Player, Windows Media Center, or Windows<br />
DVD Maker have been removed.
</li>
<h3>Links:</h3>
<ul>
<li><a href="https://evert.meulie.net/faqwd/whats-the-difference-between-n-k-and-kn-editions-of-windows/"
target="_blank" rel="noreferrer noopener">
Evert Meulie :: What's the difference between N, K and KN editions of Microsoft Windows 7/8/8.1/10? </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
Task Manager ⇒ Tab “Performance“ ⇒ Feld “Uptime“
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://www.heise.de/ratgeber/Dezentrales-VPN-mit-Tinc-785436.html"
target="_blank" rel="noreferrer noopener">
Heise Online :: Dezentrales VPN mit Tinc </a>
</li>
<li><a href="https://www.heise.de/download/product/tinc-67747"
target="_blank" rel="noreferrer noopener">
Heise Download :: tinc </a>
</li>
<!--
<li><a href=""
target="_blank" rel="noreferrer noopener">
</a>
</li>
-->
</ul>
</html>
<html>
<ul>
<li>Es gibt folgende Typen von Windows Powershells:
<ul>
<li>die “normale“ Powershell, <br />
<img src="./pictures/WindowsPowerShell_icon.jpg" height=64 width=64 /></li>
<li>die Windows Powershell Integrated Scripting Environment, ISE,<br />
<img src="./pictures/WindowsPowerShell-ISE_icon.jpg" height=64 width=97 /></li>
</ul></li>
<!--
<li></li>
<li></li>
<li></li>
<li></li>-->
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://it-learner.de/wie-verwendet-man-die-powershell-ise/" target="_blank" rel="noreferrer noopener">it‐Learner :: Wie verwendet man die Powershell ISE</li>
</ul>
</html>
<html>
<ul>
<li><code><b>[Windows-Taste] + [Pause]</b></code><br />
Damit springt man unmittelbar zu den Basisinformationen des<br />
Rechners, in denen auch die Windows‐Version zu finden ist.<br />
</li>
<br />
<li><code><b>[Windows-Taste] + [R]</b></code><br />
Öffnet den Ausführen‐Dialog. Dann winver eintippen. Nach<br />
Betätigen der Return‐Taste wird die aktuelle Windows‐Ver‐<br />
sion angezeigt. <br />
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://praxistipps.chip.de/windows-welche-version-habe-ich_13453"
target="_blank" rel="noreferrer noopener">
Chip :: Praxistipp - Windows: Welche Version habe ich?</a>
</li>
</ul>
</html>
<html>
<ul>
<li><b>Anmerkung:</b><br />
Auf der Microsoft-Seite wird von “Verteilungen“ gesprochen.<br />
Gemeint sind damit die “Distributionen“.
</li>
<li><h3>Installieren einer Linux‐Distribution</h3>
In einer Powershell aufrufen:
<pre><code>wsl ‐‐install [<em><Distribution Name></em>]</code></pre>
Defaultmässig (ohne Angabe einer Distribution) wird<br />
die Ubuntu‐Distribution installiert.
</li>
<li><h3>Auflisten der verfügbaren Linux‐Distributionen</h3>
In einer Powershell aufrufen:
<pre><code>wsl ‐‐list ‐‐online</code></pre>
<details><summary>→ Ausgabe [<em>Stand: 06/2023</em>]:</summary>
<pre><code>
Nachstehend finden Sie eine Liste der gültigen Distributionen, die installiert werden können.
Führen Sie die Installation mithilfe des Befehls <code><b>wsl.exe --install <em><Distro></em></b></code> aus.
NAME FRIENDLY NAME
Ubuntu Ubuntu
Debian Debian GNU/Linux
kali-linux Kali Linux Rolling
Ubuntu-18.04 Ubuntu 18.04 LTS
Ubuntu-20.04 Ubuntu 20.04 LTS
Ubuntu-22.04 Ubuntu 22.04 LTS
OracleLinux_7_9 Oracle Linux 7.9
OracleLinux_8_7 Oracle Linux 8.7
OracleLinux_9_1 Oracle Linux 9.1
openSUSE-Leap-15.5 openSUSE Leap 15.5
SUSE-Linux-Enterprise-Server-15-SP4 SUSE Linux Enterprise Server 15 SP4
SUSE-Linux-Enterprise-Server-15-SP5 SUSE Linux Enterprise Server 15 SP5
openSUSE-Tumbleweed openSUSE Tumbleweed</code></pre>
</details>
</li>
<li><h3>Auflisten der installierten Linux‐Verteilungen</h3>
In einer Powershell aufrufen:
<pre><code>wsl ‐‐list ‐‐verbose</code></pre>
</li>
<li><h3>Festlegen der WSL‐Version auf 1 oder 2</h3>
In einer Powershell aufrufen:
<pre><code>wsl ––set–version <distribution name> <versionNumber></code></pre>
Um die Version von WSL (1 oder 2) festzulegen, auf<br />
der eine Linux-Distribution ausgeführt wird;
</li>
<li><h3>Festlegen der WSL‐Standardversion</h3>
In einer Powershell aufrufen:
<pre><code>wsl ‐‐set‐default‐version <em><Version></em></code></pre>
</li>
<li><h3>Festlegen der Standard‐Linux‐Verteilung</h3>
In einer Powershell aufrufen:
<pre><code>wsl ‐‐set‐default <em><Distribution Name></em></code></pre>
</li>
<li><h3>in das “Home“-Verzeichnis wechseln</h3>
<pre><code>wsl ~</code></pre>
The ~ can be used with wsl to start in the <br />
user's home directory.
</li>
<li><h3>Ausführen einer bestimmten Linux‐Verteilung über PowerShell oder CMD</h3>
<pre><code>wsl ‐‐distribution <em><Distribution Name></em> ‐‐user <em><User Name></em>
</code></pre>
</li>
<li><h3>Aktualisieren von WSL</h3>
In der Powershell aufrufen:
<pre><code>wsl ‐‐update</code></pre>
</li>
<li><h3>Überprüfen des WSL‐Status</h3>
In der Powershell aufrufen:
<pre><code>wsl ‐‐status</code></pre>
</li>
<li><h3>Überprüfen der WSL‐Version</h3>
In der Powershell aufrufen:
<pre><code>wsl ‐‐version</code></pre>
</li>
<li><h3>Help‐Befehl</h3>
<pre><code>wsl ‐‐help</code></pre>
</li>
<li><h3>Ausführen als ein bestimmter Benutzer</h3>
<pre><code>wsl --user <<em>USERNAME</em>></code></pre>
</li>
<li><h3>Ändern des Standardbenutzers für eine Verteilung</h3>
<pre><code><<em>DistributionName</em>> config --default-user <<em>USERNAME</em>></code></pre>
<ul>
<li>Ändert den Standardbenutzer zur Anmeldung <br />
bei der angegebenen Verteilung. <br />
</li>
<br />
<li>Der Benutzer muss innerhalb der Verteilung <br />
bereits vorhanden sein, um der Standardbe-<br />
nutzer zu werden.<br />
</li>
</ul>
</li>
<li><h3>Herunterfahren</h3>
In einer Powershell aufrufen:
<pre><code>wsl ‐‐shutdown</code></pre>
</li>
<li><h3>Terminate</h3>
In einer Powershell aufrufen:
<pre><code>wsl ‐‐terminate <em><Distrbution Name></em></code></pre>
</li>
<li><h3>Ermitteln der IP-Adresse</h3>
<ul>
<li><pre><code>wsl hostname -I</code></pre>
gibt die IP-Adresse Ihrer Linux-Distribution zu-<br />
rück, die über WSL 2 installiert wurde (die <br />
WSL 2-VM-Adresse)
</li>
<br />
<li><pre><code>ip route show | grep -i default | awk '{ print $3}'</code></pre>
gibt die IP-Adresse des Windows-Computers<br />
zurück, wie von WSL 2 (der WSL 2-VM) dar-<br />
gestellt
</li>
<br />
<li>Eine ausführlichere Erläuterung findet man unter <br />
<a href="https://learn.microsoft.com/de-de/windows/wsl/networking#identify-ip-address"
target="_blank" rel="noreferrer noopener">
Zugreifen auf Netzwerkanwendungen mit WSL: Identifizieren der IP-Adresse</a>
</li>
</ul>
</li>
<li><h3>Importieren einer Verteilung</h3>
In einer Powershell aufrufen:
<pre><code>wsl --import <<em>DISTRO-NAME</em>> <em><INSTALL-LOCATION</em>> <<em>FILE-NAME</em>> </code></pre>
Importiert die angegebene TAR-Datei als <br />
neue Distribution;
</li>
<li><h3>Exportieren einer Verteilung</h3>
<pre><code>wsl --export <<em>DISTRO-NAME</em>> <<em>FILE-NAME</em>> </code></pre>
</li>
<li><h3>Direktes Importieren einer Verteilung</h3>
<pre><code>wsl --import-in-place <<em>DISTRO-NAME</em>> <<em>FILE-NAME</em>></code></pre>
</li>
<li><h3>Aufheben der Registrierung oder Deinstallieren einer Linux‐Verteilung</h3>
<pre><code>wsl --unregister <<em>DISTRO-NAME</em>></code></pre>
Während Linux-Distributionen über den Microsoft <br />
Store installiert werden können, können sie <b>NICHT</b><br />
über den Store deinstalliert werden.
</li>
<li><h3>Bereitstellen eines Datenträgers oder Geräts</h3>
<pre><code>wsl ‐‐mount <em><DiskPath></em></code></pre>
</li>
<li><h3>Aufheben der Bereitstellung der Datenträger</h3>
</li>
<li><h3>Veraltete WSL‐Befehle</h3>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://learn.microsoft.com/de-de/windows/wsl/basic-commands"
target="_blank" rel="noreferrer noopener">
Microsoft :: Grundlegende Befehle für WSL</a>
</li>
</ul>
</html>
<html>
<h3>Links:</h3>
<ul>
<li><a href="https://bardimin.com/de/windows-de/fehlersuche/so-beheben-sie-internetverbindungsprobleme-in-wsl-2-ubuntu-windows-11/"
target="_blank" rel="noreferrer noopener">
Bardimin :: So beheben Sie Internetverbindungsprobleme in WSL 2 Ubuntu Windows 11</a>
</li>
</ul>
</html>
<html>
<ul>
<li><code><b>dir ‐Hidden</b></code> :: versteckte Files anzeigen
</li>
<br />
<li><code><b>dir /B</b></code> :: nur Filenamen auflisten
</li>
<br />
<li><code><b>dir ‐Path . ‐Filter <em>Search‐String</em> ‐Recurse</b></code> :: Rekursiv nach File suchen
</ul>
</html>
<html>
<table>
<tr><th>Keyboard Shortcuts</th><th>Action</th></tr>
<tr><td>WIN‐Taste + E</td><td>Neues File‐Explorer‐Fenster aufrufen</td></tr>
<tr><td>Shift + F10, N, T</td><td> Create new text file</td></tr>
<tr><td>Strg + T</td><td>Create new tab in file explorer</td></tr>
<tr><td>Strg + Shift + Esc </td><td>Task Manager aufrufen</td></tr>
</table>
<h3>Links:</h3>
<ul>
<li><a href="https://www.howtogeek.com/744485/how-to-open-file-explorer-on-windows-11/"
target="_blank" rel="noreferrer noopener">
How‐To Geek :: How to Open File Explorer on Windows 11</a>
</li>
<li><a href="https://praxistipps.chip.de/windows-11-task-manager-oeffnen-so-funktionierts_137790"
target="_blank" rel="noreferrer noopener">
Chip :: Praxistipp ‐ Windows 11: Task‐Manager öffnen ‐ so funktioniert's</a>
</li>
<li><a href="https://praxistipps.chip.de/windows-11-tastenkombinationen-in-der-uebersicht_134544"
target="_blank" rel="noreferrer noopener">
Chip :: Praxistipp ‐ Windows 11: Tastenkombinationen in der Übersicht</a>
</li>
</ul>
</html>
<html>
<ul>
<li>Aufruf eines Windows‐Terminals:
<code><pre>
wt[.exe]
</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href=https://learn.microsoft.com/de-de/windows/terminal/command-line-arguments""
target="_blank" rel="noreferrer noopener">
Microsoft ‐ Learn :: Windows‐Terminal</a>
</li>
</ul>
</html>
<html>
<ul>
<li>“ADR“ := American Depositary Receipt</li>
<li>hierbei handelt es sich um ein finanztechnisches Konstrukt;</li>
<li>ist ein auf Dollar lautender, von US-amerikanischen Depotbanken (depositary<br />
banks) in den USA ausgegebener Hinterlegungsschein, der eine bestimmte<br />
Anzahl hinterlegter Aktien eines ausländischen Unternehmens verkörpert<br />
und an deren Stelle am US-Kapitalmarkt gehandelt werden kann. </li>
<li>es wird der Wert der Aktie “gespiegelt“, aber nicht mit einem<br />
echten Wert hinterlegt.</li>
<li> auf Dollar lautende Aktienzertifikate auf ausländische Aktien</li>
<li>in den meisten Fällen handelt es sich um Holdings auf den Bahamas, <br />
welche von z.B. den chinesischen Firmen benutzt werden, um ihre Aktien<br />
außerhalb Chinas an einer Börse zu handeln.</li>
<li>diesen ADR‐Umweg nutzen hochkarätige chinesische Aktien wie z.B. <br />
Alibaba (BABA), Pinduoduo (PDD) oder Royal Dutch Shell(?).</li>
</ul>
<h3>Links:</h3>
<ul>
<li>UMWA-Börsenbrief, 2021-07-08</li>
<li><a href="https://de.wikipedia.org/wiki/American_Depositary_Receipt" target="_blank">Wikipedia :: ADR</a></li>
</ul>
</html>
<html>
<ul>
<li><b>AFFO</b><br />
Adjusted Fund From Operations<br />
<em>UMWA-Börsenbrief - 2021-09-03</em></li>
<li><b>BDC</b><br />
Business Development Companies<br />
<em>UMWA-Börsenbrief - 2021-07-02</em></li>
<li><b>BLS </b><br />
Bureau of Labor Statistics </li>
<li><b>BSE</b><br />
Die <b>Beijing Stock Exchange</b> (BSE) wird nach Shanghai und Shenzhen<br />
die dritte Börse auf dem chinesischen Festland. Die Grundidee ist eine<br />
Plattform für innovative kleine und mittlere Unternehmen (KMU), um<br />
Finanzierungskanäle zu erweitern.<br />
<br />
Letztendlich ist die BSE ein Teil der chinesischen Strategie, eine Gesellschaft<br />
mit mehr Chancengleichheit aufzubauen, was nicht nur aus sozialer Güte ge‐<br />
schieht: An der BSE sollen gezielt sogenannte “Select Tier“ Werte gelistet<br />
werden, also qualitativ hochwertige Unternehmen, die China zu noch mehr<br />
technologischem Fortschritt verhelfen. Der Handel auf dem Pekinger Parkett<br />
wird zunächst nur professionellen Anlegern offenstehen. Es ist allerdings<br />
davon auszugehen, dass Privatanleger ebenfalls Zugang bekommen, z. B.<br />
indirekt in Form von Investmentfonds.<br />
<br />
<img src="./pictures/EMT_ChinasBoersenplaetzeImUeberblick.jpg" height=259 width=381 /> <!-- height=518 width=762 -->
<br />
<em>EMT_2021_09_16.pdf</em>
</li>
<li><b>HEPA</b><br />
High-Efficiency Particulate Air<br />
<em>UMWA-Börsenbrief - 2020-08-14</em></li>
<li><b>MERV-13</b><br />
Minimum Efficiency Reporting Value-13<br />
<em>UMWA-Börsenbrief - 2020-08-14</em></li>
<li><b>CAGR</b><br />
Compound annual growth rate<br />
<br />
bezeichnet eine spezielle Wachstumsrate. Dazu betrachtest Du über<br />
einen Zeitraum von mehreren Jahren, wie stark eine bestimmte Kenn‐<br />
zahl im Durchschnitt pro Jahr gewachsen ist.<br />
<br />
<em>u.a. UMWA‐Börsenbrief ‐ 2020‐08‐14</em><br />
<em>UMWA‐Börsenbrief ‐ 2022‐03‐28</em></li>
<li><b>CBO</b><br />
<ul>
<li>Congressional Budget Office
</li>
<li>der US‐Rechnungshof
</li>
</ul>
</li>
<li><b>CFTC</b><br />
U.S. Commodity Futures Trading Commission
</li>
<li><b>CMBS</b><br />
<ul>
<li>“Commercial Mortgage Backed Securities“
</li>
<li>verbriefte Kredite auf Gewerbeimmobilien
</li>
</ul>
</lI>
<li><b>COTS</b><br />
“Commercial off–the–shelf“<br />
auch: <em>ready–made applications</em><br />
</li>
<li><b>CPI</b><br />
<ul>
<li>“Consumer Price Index“</li>
<li>US‐Verbraucherindex</li>
</ul>
</li>
<li><b>CRE</b><br />
<ul>
<li>“Commercial Real Estate“
</li>
<li>US-Gewerbeimmobilien
</li>
</ul>
</li>
<li><b>CSRC</b><br />
China Securities Regulatory Commission<br />
<em>UMWA-Börsenbrief - 2020-10-22</em>
</li>
<li><b>CoT‐Daten‐Report</b><br />
der Commitment of Traders‐Datenreport<br />
<em>UMWA-Börsenbrief - 2020-10-22</em><br />
Er stellt die Positionierung der Trader - eingeteilt in drei Gruppierungen - dar:
<ul>
<li>Die sogenannten “Commercials“ sind die professionellen Hedger</li>
<li>die Trades der “Large Speculators“ sind aufgrund ihrer Größe meldepflichtig,</li>
<li>während die Small Speculators die Gruppe der nicht-meldepflichtigen Trades <br />
repräsentieren.</li>
</ul>
Der Report wird von der US-Aufsichtsbehörde CFTC in der Regel freitags <br />
um 21:30h (an bestimmten Tagen auch erst am folgenden Montag) veröf‐<br />
fentlicht. Er enthält die Positionen bis zum vorhergehenden Dienstag)</li>
<li><b>NII</b><br />
Net Investment Income<br />
<em>UMWA-Börsenbrief - 2021-07-02</em></li>
<li><b>TNX</b><br />
Treasury Note Yield Index<br />
10-jährige Schatzbriefe<br />
<em>UMWA-Börsenbrief - 2020-10-22</em></li>
<li><b>FCA</b><br />
Financial Conduct Authority</li>
<li><b>FFO</b><br />
Fund From Operations</li>
<em>UMWA-Börsenbrief - 2021-09-03</em></li>
<li><b>FIAT</b><br />
Flexible average inflation targeting<br />
<em>MWA-Börsenbrief - 2021-10-28</em></li>
<li><b>SEC</b><br />
U.S. Securities and Exchange Comission</li>
<li><b>KID</b><br />
Key Information Documents;<br />
KIDs remain accessible on the website and are capable of being downloaded</li>
<li><b>PRIIP</b><br />
Packaged Retail and Insurance-based Investment Products (Regulation)</li>
<li><b>XLE</b><br />
Index für den US-Energie-Sektor</li>
<li><b>XLRE</b><br />
Index für den US-Real-Estate-Sektor</li>
<li><b>CBDC</b><br />
digitales Zentralbankgeld (<em>Central Bank Digital Currency</em>)</li>
<li><b>FSPO</b><br />
Financial Services and Pensions Ombudsman</li>
<li><b>PDT</b><br />
U.S. Pattern Day Trading (rule);<br />
The PDT rules restricts accounts with equity below USD 25,000 to no<br />
more than 3 Day Trades within any 5‐business day period.</li>
<li><b>OER</b><br />
Die eigentümeräquivalente Miete (<b><em>Owners' Equivalent Rent</em></b>) ist die <br />
Höhe der Miete, die gezahlt werden müsste, um ein derzeitiges Eigen‐<br />
heim als Mietobjekt zu ersetzen. Die OER gibt den Betrag der monat‐<br />
lichen Miete an, der den monatlichen Ausgaben für den Besitz einer<br />
Immobilie (z. B. Hypothek, Steuern usw.) entsprechen würde.
</li>
<li><b>PEPP</b><br />
Pandemic Emergency Purchase Programme<br />
Pandemie‐Not‐Kaufprogramm;<br />
Eine geldpolitische Maßnahme der Europäischen Zentralbank,<br />
die die Preisstabilität und die Effektivität der Geldpolitik in<br />
der Eurozone während der COVID‐19‐Pandemie<br />
sicherstellen soll.<br />
<br />
<em>FocusMoney ‐ Editorial - 38/2021</em>
<h3>weitere Links:</h3>
<ul>
<li><a href="https://www.bundesbank.de/de/aufgaben/geldpolitik/geldpolitische-wertpapierankaeufe/pandemic-emergency-purchase-programme-pepp--830356" target="_blank" rel="noreferrer noopener">Deutsche Bundesbank :: Pandemic Emergency Purchase Programme (PEPP)</a></li>
<li><a href="https://de.wikipedia.org/wiki/Pandemic_Emergency_Purchase_Programme" target="_blank" rel="noreferrer noopener">Wikipedia :: Pandemic Emergency Purchase Programme</a></li>
</ul>
</li>
<li><b>HSCEI</b><br />
Hang Seng China Enterprises Index (auch: “H‐Index“)<br />
<br />
Das ist ein Aktienindex, der die Kurse der so genannten H‐Aktien an der<br />
Hongkonger Börse abbildet. Er enthält die Aktienkurse von 50 Unterneh‐<br />
men des chinesischen Festlands, die in Hongkong gehandelt werden.<br />
<br />
<em>Wikipedia</em>
</li>
</li>
<li><b>PCE‐Rate</b><br />
<ul>
<li>engl., “Personal consumption expenditure“, or “Private consumption expenditure“</li>
<li>Das ist die Steigerung der inflationären Kosten, welche die<br />
Konsumenten gegenüber dem Vormonat zu tragen haben.<br />
(die persönlichen Verbraucherausgaben)<br />
</li>
</ul>
<br />
<em>UMWA-Börsenbrief, 04.10.2021</em>
</li>
<li><b>PCAOB</b><br />
Public Company Accounting Oversight Board<br />
<em>UMWA-Börsenbrief, 25.03.2022</em>
</li>
<li>
<b>PCE Core Deflator</b><br />
<ul>
<li>engl., “Personal consumption expenditure“, or “Private consumption expenditure“</li>
<li>Das ist das von der Fed bevorzugte Maß für Inflation.<br /></li>
</ul>
<br />
<em>UMWA-Börsenbrief, 28.03.2022</em>
</li>
<li><b>PMI</b><br />
U.S. Manufacturing Purchasing Managers Index<br />
<em>UMWA-Börsenbrief, 21.10.2021</em>
</li>
<li><b>RRF</b><br />
Recovery & Resilience Facility</li>
<li><b>€STR</b><br />
Euro Short Term Rate</li>
<li><b>TBL</b><br />
“Treasury Bonds Loc… “ (auch: T-Bonds)<br />
10-jährige US‐Staatsanleihen<br />
(mittel‐ bis langfristige Schuldverschreibungen eines Staates)<br />
<em>UMWA-Börsenbrief, 21.10.2021</em>
</li>
<li><b>TBT</b><br />
“Treasury Bonds Trr… “ (auch: T-Bonds)<br />
10-jährige US‐Staatsanleihen<br />
(mittel‐ bis langfristige Schuldverschreibungen eines Staates)<br />
<em>UMWA-Börsenbrief, 21.10.2021</em>
</li>
<li><b>YOY</b><br />
“Year over year“<br />
die Vergleichszahl zum Vortjahr<br />
<em>UMWA-Börsenbrief, 01.10.2021</em>
<li><b>WTI</b><br />
Rohöl, “West Texas Intermediate“<br />
<em>UMWA-Börsenbrief, 22.04.2020</em>
</li>
<li><b>IEA</b><br />
Internationale Energieagentur;<br />
<em>UMWA-Börsenbrief, 11.11.2021</em>
</li>
<li><b>Loan‐to‐Value‐Verhältnis</b><br />
???<br />
</li>
<li><b>MOF</b><br />
<ul>
<li>“metallorganisches Gerüst“ (engl. <a href="https://energyfactor.exxonmobil.eu/de/science-technology/100-mio-tonnen-co2/" target="_blank" rel="noreferrer noopener">“metal‐organic frameworks“</a>);</li>
<li>ein von Forschern der University of California, Berkeley, <br />
und ExxonMobil entwickeltes neues Material;<br />
<li>damit sollen mehr als 90 % des Kohlendioxids (CO2) ab‐<br />
gefangen werden, die durch Erdgas‐Kraftwerke zur Strom‐<br />
erzeugung produziert werden;</li>
</ul>
<em>UMWA-Börsenbrief, 11.11.2021</em><br />
<a href="https://energyfactor.exxonmobil.com/reducing-emissions/carbon-capture-and-storage/sustainable-energy-solution-mofs/"
target="_blank" rel="noreferrer noopener">ExxonMobil :: CCS</a>
</li>
<li><b>NIV</b><br />
Nettoinventarwert<br />
</li>
<li><b>PHI</b><br />
<ul>
<li>Philadelphia Housing Index</li>
<li>bildet stellvertretend für den gesamten US‐Markt die Preis‐<br />
entwicklung im Großraum Philadelphia ab;</li>
</ul>
</li>
<li><b>FTC</b><br />
“Federal Trade Commission“<br />
US‐Kartellbehörde<br />
</li>
<li><b>SEP</b><br />
Summary of Economic Projections<br />
<br />
Das sind die regelmäßigen Statements der Fed<br />
zu den Wirtschaftsaussichten. <br />
<br />
Daher rühren die “Dots“, die Punkte, die jedes<br />
Fed‐Mitglied in eine Fläche mit einer X‐ und<br />
einer Y‐Achse setzen muss, um seine Ansicht<br />
der Wirtschaftsentwicklung “auf den Punkt“ zu<br />
bringen.<br />
</li>
<li><b>LNG</b><br />
</li>
<li><b>MCHI</b><br />
<ul>
<li>iShares MSCI China ETF, ETF auf Equity: China ‐ Total Market</li>
<li>Underlying Index :: MSCI China Index</li>
</ul>
<a href="https://www.askfinny.com/compare/MCHI-vs-SPY" target="_blank" rel="noreferrer noopener" >Ask Finny :: Vergleich MCHI & SPY</a><br />
</li>
<li><b>SPY</b><br />
<ul>
<li>SPDR S&P 500, ETF auf Equity: U.S. ‐ Large Cap</li>
<li>Underlying Index :: S&P 500</li>
</ul>
<a href="https://www.askfinny.com/compare/MCHI-vs-SPY" target="_blank" rel="noreferrer noopener" >Ask Finny :: Vergleich MCHI & SPY</a><br />
</li>
<li><b>SPDR</b><br />
<ul>
<li>ausgesprochen: “spider“</li>
<li>Vermögensverwalter State Street Global Advisors</li>
</ul>
<a href="https://en.wikipedia.org/wiki/SPDR" target="_blank" rel="noreferrer noopener">Wikipedia :: SPDR</a><br />
<a href="https://www.justetf.com/de/etf-provider/spdr-etfs.html" target="_blank" rel="noreferrer noopener">JustETF :: SPDR etfs</a><br />
</li>
<li><b>FOMC</b><br />
“Federal Open Market Committee“ <em>(“Offenmarktausschuß der US‐Notenbank“)</em><br />
<br />
</li>
<li><b> NBER</b><br />
National Bureau of Economic Research, USA<br />
</li>
<li><b>NAR</b><br />
<ol type="a">
<li><u>Net Annualized Return</u><br />
<h3>Links:</h3>
<ul>
<li><a href="https://corporatefinanceinstitute.com/resources/knowledge/trading-investing/annualized-rate-of-return/" target="_blank" rel="noreferrer noopener">CFI :: Annualized rate of return</a></li>
<li><a href="https://corporatefinanceinstitute.com/resources/knowledge/trading-investing/annual-return/" target="_blank" rel="noreferrer noopener">CFI :: Annual return</a></li>
<li><a href="https://www.indeed.com/career-advice/career-development/how-to-calculate-annualized-return" target="_blank" rel="noreferrer noopener">Indeed :: How to calculate the annualized return</a></li>
</ul>
</li>
<br />
<li><u>National Association of Realtors</u><br />
der Verband der Häusermarkler<br />
<a href="https://www.nar.realtor" target="_blank" rel="noreferrer noopener">www.nar.realtor</a><br />
</li>
</ol>
</li>
<li><b>NGL</b><br />
<ul>
<li>steht für “<b>Natural Gas Liquids</b>“;</li>
<li>Erdgasflüssigkeiten</li>
</ul>
<br />
<em>UMWA-Börsenbrief, 29.09.2022</em>
</li>
<li><b>PPI</b><br />
Erzeugerpreisindex<br />
<br />
<em>UMWA-Börsenbrief, 10.10.2022</em>
</li>
<li><b>RCEP</b><br />
<details><summary>Regional Comprehensive Economic Partnership</summary><br />
<ul>
<li><em>Regionale umfassende Wirtschaftspartnerschaft</em></li>
<br />
<li>asiatisch-pazifische Freihandelszone;</li>
<br />
<li>ein seit 2020 bestehendes Freihandelsabkommen zwischen den zehn<br />
<details><summary>ASEAN-Mitgliedsstaaten</summary><br />
<ul>
<li>Brunei</li>
<li>Indonesien</li>
<li>Kambodscha</li>
<li>Laos</li>
<li>Malaysia</li>
<li>Myanmar</li>
<li>Philippinen</li>
<li>Singapur</li>
<li>Thailand</li>
<li>Vietnam</li>
</ul>
</details> und <details><summary>fünf weiteren Staaten in der Region<br />
Asien-Pazifik</summary><br />
<ul>
<li>Volksrepublik China</li>
<li>Japan</li>
<li>Südkorea</li>
<li>Australien</li>
<li>Neuseeland</li>
</ul>
</details>. Es ist die größte Freihandels zone der Welt<br />
</li>
<br />
<li>Indien war an den Verhandlungen beteiligt, ist dem Abkommen<br />
aber nicht beigetreten;</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Regional_Comprehensive_Economic_Partnership"
target="_blank" rel="noreferrer noopener">
Wikipedia :: RCEP</a>
</li>
</ul>
</details>
</li>
<li><b>TTM</b><br />
<ul>
<li>steht für “<b>Trailing twelve months</b>“;</li>
<li>das steht für den Zeitraum der vergangenen 12 Monate;</li>
</ul>
</li>
<li><b>NFP</b><br />
<ul>
<li>"Nonfarm payrolls"
</li>
<li>US-Arbeitsmarktdaten
</li>
<li>Der Non-Farm Payrolls Report (NFP) ist die monatliche Ver-<br />
öffentlichung von Daten zu den 80% der US-Beschäftigten<br />
in den Bereichen Produktion, Bauwesen und Güter.<br />
<br />
Wie der Name andeutet, werden Arbeitnehmer, die in land-<br />
wirtschaftlichen Betrieben arbeiten, und auch private Haus-<br />
halte, gemeinnützige Arbeitnehmer und Regierungsange-<br />
stellte <b>nicht</b> berücksichtigt.
</li>
<li><a href="https://en.wikipedia.org/wiki/Nonfarm_payrolls"
target="_blank" rel="noreferrer noopener">
Wikipedia.en :: Nonfarm payrolls</a><br />
<a href="https://www.ig.com/de/finanzereignisse/non-farm-payrolls"
target="_blank" rel="noreferrer noopener">
IG Deutschland :: Non-Farm Payrolls</a><br />
</li>
</ul>
</li>
<!--
<li><b></b><br />
</li>
<li><b></b><br />
</li>
<li><b></b><br />
</li>
<li><b></b><br />
</li>
<li><b></b><br />
</li>
<li><b></b><br />
</li>
<li><b></b><br />
</li>
-->
</ul>
</html>
<html>
In der Investitionsrechnung eine gleichbleibende regelmäßige Zahlung;
</html>
<html>
<ul>
<li>Dieser Indikator gibt das Verhältnis des Firmenwertes zum Preis einer Aktie wieder.</li>
<li>Als Faustregel gilt, dass Werte unter 1 für eine unterbewertete Aktie sprechen.</li>
</ul>
<h3>Quelle:</h3>
<ul>
<li><a href="https://www.focus.de/finanzen/boerse/aktien/gewinne-brechen-ein-verordnete-verluste-fuer-den-aufschwung-opfert-china-die-staerke-seiner-banken_id_12396082.html" target=_blank>Focus Online :: Verordnete Verluste</a></li>
</ul>
</html>
<html>
<ul>
<li>benannt nach <b>Richard Cantillon (UK, 1680 ‐ 1734)</b></li>
<li>Der Cantillon‐Effekt bezeichnet die Tatsache, dass sich eine Erhöhung<br />
der Geldmenge <b>nicht</b> automatisch gleichmäßig auf alle Bereiche einer<br />
Volkswirtschaft verteilt, sondern in Stufen.</li>
<li>Manche Bereiche (insbesondere der Bankensektor und der Unter‐<br />
nehmenssektor) profitieren zuerst, während der Rest der Volkswirt‐<br />
schaft später folgt oder gar nicht an der Geldschöpfung verdient.</li>
<li></li>
</ul>
<ul><h3>Links:</h3>
<li>Focus‐Money 27/2021, “moneyeditorial :: Die Ökonomie des Gelddruckens ‐ oder warum die Reichen immer reicher werden“</li>
<!--li></li-->
</ul>
</html>
<html>
<ul>
<li>Warenkreditversicherung, Forderungsausfallversicherung</li>
</ul>
</html>
<html>
<ul>
<li>“European Insurance and Occupational Pensions Authority“</li>
</li>
<li>Die Europäische Aufsichtsbehörde für das Versicherungswesen und die<br />
betriebliche Altersversorgung (EIOPA) ist eine der drei EU-Finanzauf‐<br />
sichtsbehörden mit Sitz in Frankfurt am Main.
</li>
<li>Wie bei der deutschen Finanzaufsicht BaFin sind der EIOPA zwei Fachbeiräte<br />
(“Stakeholder Groups“) zugeordnet, durch die ihre Arbeit durch externe Expert*innen‐<br />
und Interessenvertreter*innen begleitet wird. Einer dieser beiden Fachbeiräte ist<br />
die “Occupational Pension Stakeholder Group“ (OPSG), deren Aufgaben weit<br />
über die betriebliche Altersvorsorge hinausreichen und auch private Altersvor‐<br />
sorge und Versicherungen umfassen. Dabei geht es um so unterschiedliche<br />
Fragestellungen wie Insolvenzschutz, Risikobeurteilung der Kapitalanlage, Ver‐<br />
gütung und Interessenkonflikte, Berufsqualifikation der Vertriebe, Informations‐<br />
pflichten gegenüber Verbraucher*innen, Gestaltung von Standmitteilungen und‐<br />
Produktinformationsblättern u. a.
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://eiopa.europa.eu" target="_blank" rel="noreferer noopener">Homepage EIOPA</a></li>
</ul>
</html>
<html>
<h3>Empire State Manufacturing Index</h3>
<ul>
<li>Dieser Index zeigt die erneut wachsende Expansion<br />
des verarbeitenden Gewerbes in NY an.</li>
</ul>
<h3>Links:</h3>
<ul>
<li>UMWA‐Börsenbrief, 18.07.2022</li>
</ul>
</html>
<html>
<ul>
<li>zeigt den Grad der Einkommensverteilung an</li>
<li>der Wert liegt zwischen <b>null</b> und <b>eins</b></li>
<li>Ein Gini‐Koeffizient von <b>null</b> bedeteut:<br />
Alle haben das gleiche Einkommen.</li>
<li>Je näher der Koeffizient an <b>eins</b> rückt, desto weniger<br />
Menschen halten immer größere Anteile am gesamten<br />
Nationaleinkommen.</li>
<li><em>Werte von 2016:</em><br />
Deutschland ist im europäischen Raum laut DIW mit einem Gini-Koeffizienten<br />
von 0,78 Spitzenreiter bei der Ungleichverteilung des Vermögens. Nur die USA<br />
hat einen höheren Wert mit 0,87 (Tendenz steigend).</li>
<li></li>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus‐Money 27/2021, “moneyeditorial :: Die Ökonomie des Gelddruckens ‐ oder warum die Reichen immer reicher werden“</li>
<li><a href="file:///F:/Trading/UlrichMueller-UMWA-EinTagFuerAlleDieMehrWollen.pdf" target="_blank" rel="noreferrer noopener">eMail von Ulrich Müller, 09 Jul., 2016 16:26</a></li></ul>
</html>
<html>
<ul>
<li> <b>Absicherung</b><br \>
Anwendung einer Strategie zum Schutz eines Portfolios oder geplanter<br \>
Investitionen gegen nachteilige Preisänderungen.<br \>
</li>
<li> <b>Additional Margin</b><br \>
Die Additional Margin dient dazu, die zusätzlich anfallenden<br \>
Glattstellungskosten abzudecken. Diese potenziellen Glattstellungskosten<br \>
entstehen, wenn – ausgehend vom aktuellen Marktwert des Portfolios –<br \>
innerhalb von 24 Stunden die angenommene ungünstige Preisentwicklung<br \>
(so genannter “Worst-Case-Loss“) eintreten würde. Dies wird bei Optionen<br />
und Non-Spread-Future-Positionen angewandt.<br \>
</li>
<li> <b>Amerikanische Option</b><br \>
Eine Option, die an jedem Börsentag vor Verfall ausgeübt werden<br \>
kann.<br \>
</li>
<li> <b>Arbitrage</b><br \>
Gezielte Ausnutzung von Preis-, Kurs- oder Zinsdifferenzen eines<br \>
Wirtschaftsgutes (Aktien, Anleihen, Devisen, Rohstoffe, Optionen) an<br \>
verschiedenen Börsenplätzen zu einem bestimmten Zeitpunkt. In der<br \>
Theorie ist die Arbitrage ohne Risiko, also ein risikoloser Gewinn.<br \>
</li>
<li> <b>At-the-Money</b><br \>
Eine Option, deren Ausübungspreis etwa dem aktuellen Kurs des
Basiswertes<br \>
entspricht.<br \>
</li>
<li> <b>Ausübung</b><br \>
Erklärung eines Optionsinhabers, dass er die Basiswerte zu den im<br \>
Optionskontrakt bestimmten Bedingungen kaufen oder verkaufen möchte.<br \>
</li>
<li> <b>Ausübungspreis</b><br \>
Der Preis, zu dem der Basiswert bei Ausübung einer Option bezogen oder<br
\>
geliefert wird.<br \>
</li>
<li> <b>Barausgleich</b><br \>
Die Abrechnung eines Kontraktes erfolgt durch Zahlung oder Empfang des<br \>
Barbetrages anstelle der physischen Lieferung des Basiswertes. Im Falle
eines<br \>
Optionskontraktes wird der Barausgleich durch die Differenz zwischen dem<br \>
Ausübungspreis der Option und dem Schlussabrechnungspreis des Basiswertes<br \>
bestimmt. Im Falle eines Financial-Future-Kontraktes wird der Barausgleich<br \>
durch die Differenz zwischen dem Schlussabrechnungspreis und dem<br \>
täglichen<br \>
Abrechnungspreis des Kontraktes am Vortag bestimmt.<br \>
</li>
<li> <b>Basis</b><br \>
Differenz zwischen dem Basiswertkurs und dem Future-Preis.<br \>
</li>
<li> <b>Basiswert</b><br \>
Ein Titel, ein Index oder ein anderes Finanzinstrument, auf den/das sich ein<br \>
Options- oder Future-Kontrakt bezieht.<br \>
</li>
<li> <b>BCBS</b><br \>
BCBS := Baseler Ausschuss für Bankenaufsicht <br />(Basel Committee on Banking Supervision<br />
</li>
<li> <b>Beta</b><br \>
Mit dem Betafaktor wird die Sensibilität einer Aktie oder eines<br \>
Portfolios gegenüber der Entwicklung des gesamten Marktes<br \>
ausgedrückt.<br \>
</li>
<li><b>BIS, Bank for International Settlements</b><br />engl. “Basel Committee on Banking Supervision“<br />
Bank für Internationalen Zahlungsausgleich<br />
(Könnte auch falsch sein …)</li>
<li> <b>Call</b><br \>
Ein Optionskontrakt, der den Käufer berechtigt, eine bestimmte Anzahl des<br \>
Basiswertes zu einem festgelegten Preis an oder bis zu einem bestimmten Datum<br \>
zu kaufen (physische Lieferung). Der Anspruch auf physische Lieferung kann<br \>
durch einen Barausgleich ersetzt werden (Aktienindex-Derivate).<br \>
</li>
<li><b>CEF</b><br />
steht für <em>Closed‐End‐Fund</em></li>
<li> <b>CFTC</b><br \>
Die "Commodity Futures Trading Commission" ist eine US Behörde, die<br \>
Anleger vor Betrug und Manipulation im Derivatemarkt schützt.<br \>
</li>
<li> <b>Commodity Trading Advisor</b><br \>
Manager, der sich auf Finanz- oder Rohstoff-Terminmärkte spezialisiert.<br \>
</li>
<li> <b>Consumer Confidence Index (CCI)</b><br \>
<br />
Misst die Konsumneigung der Privathaushalte in den Vereinigten Staaten.<br />
Er gilt als Frühindikator der wirtschaftlichen Entwicklung in den Vereinigten<br />
Staaten. Zur Berechnung werden 5000 repräsentativ ausgewählte Kon‐<br />
sumenten über ihre Konsumplanungen, insbesondere der Anschaffungs‐<br />
neigung langlebiger Konsumgüter, befragt. Der monatliche Bericht, der<br />
Consumer Confidence Survey, misst das Vertrauen, das die Privathaus‐<br />
halte in die Leistung der amerikanischen Wirtschaft haben. Das Verbrau‐<br />
chervertrauen gilt als zentraler Indikator für zwei Drittel der US-Wirtschaftsleistung ausmachen.<br />
<br />
<a href="https://de.wikipedia.org/wiki/Consumer_Confidence_Index" target="_blank" rel="noreferrer noopener">Wikipedia :: CCI, Consumer Confidence Index</a><br />
</li>
<li> <b>Conversion</b><br \>
Schaffung einer synthetischen Short-Future-Position durch das Schreiben von<br \>
Calls oder den Kauf von Puts mit gleichem Ausübungspreis und gleichem<br \>
Verfall bei gleichzeitigem Eingehen einer "echten" Long-Future-Position<br \>
(Gegenteil des<br \>
Reversal).<br \>
</li>
<li> <b>Convertible Arbitrage</b><br \>
Convertible Arbitrage nutzt das Preisverhältnis zwischen einer Wandel-<br \>
anleihe und der ihr zu Grunde liegenden Aktie aus. Wandelanleihen (sog. <br \>
Convertible Bonds) sind typischerweise Unternehmensanleihen, die dem <br \>
Inhaber das Recht gewähren, jederzeit vor dem Ende der Laufzeit die <br \>
Anleihe in eine durch das Umwandlungsverhältnis bestimmte Anzahl <br \>
von Aktien des Emittenten zu wandeln.<br \>
<br \>
Arbitragegewinne können dadurch erzielt werden, dass Preisunterschiede<br \>
zwischen den Wandelanleihen und dem zu Grunde liegenden Wertpapier genutzt <br \>
werden. Dies geschieht durch quantitative Modelle.<br \>
</li>
<li><b>Curvature risk</b><br />
curvature risk captures the additional risk due to movement in the delta <br />
when the price changes.<br />
<br />
The formulae are on p17 of the document attached to the <a href="http://www.bis.org/bcbs/publ/d352.pdf" target=_blank>link</a> <br />
you included.It's just the profit or loss due to a specified shock <br />
in the underlying, which is not explained by the local delta of <br />
the position. (<a href="https://quant.stackexchange.com/questions/28023/what-is-curvature-risk#28024" target=_blank>Link</a>)
</li>
<li> <b>DAX</b><br \>
Der Deutsche Aktienindex DAX besteht aus 30 deutschen Standardwerten, die nach<br \>
den Kriterien Börsenumsatz, Börsenkapitalisierung und Anerkennung<br \>
des deutschen Übernahmekodex in den Index aufgenommen werden. Beim DAX<br \>
handelt es sich um einen Performance-Index, i.e. bei der Berechnung wird von einer<br \>
hypothetischen Reinvestition von Dividenden ausgegangen.<br \>
</li>
<li> <b>Delta</b><br \>
Der Betrag, um den sich der Optionspreis ändert, falls sich der Basiswert<br \>
um eine Einheit verändert.<br \>
</li>
<li> <b>Derivat</b><br \>
Terminkontrakte beziehen sich stets auf einen Basiswert, von dem sie<br \>
abgeleitet sind. Daher spricht man von Derivaten.<br \>
</li>
<li> <b>Discretionary</b><br \>
Der Manager vertraut bei dieser Strategie ausschliesslich auf seine Erfahrung.<br \>
Immer wieder findet sich aber auch eine Mischung des systematischen und des<br \>
diskretionären Stils: Ein automatisches Handelssystem trifft eine gewisse<br \>
Vorentscheidung, der Manager selektiert die Orders, ändert oder stoppt<br \>
sie auf Grund seiner Erfahrung und Kenntnisse.<br \>
</li>
<li> <b>Distressed Securities</b><br \>
Distressed Securities Manager investieren in Wertpapiere von Unternehmen,
die<br \>
Insolvenzschutz beantragt haben oder versuchen, Insolvenz dadurch zu<br \>
vermeiden, dass sie mit ihren Gläubigern über eine aussergerichtliche<br \>
Umstrukturierung verhandeln. Die Kurse solcher Wertpapiere sind oft falsch <br />
bewertet, weil viele traditionelle Käufer derartige Wertpapiere von in Not <br />
geratenen Firmen verkaufen. Deshalb kännen diese Wertpapiere häufig <br />
mit einem grösseren Abschlag erworben werden, als dies unter Berücksichtigung<br \>
des "fairen Werts" dieser Wertpapiere der Fall sein sollte.<br />
</li>
<li><b>Dotplot</b><br />
Die Punkte, die “Dots“ sind, vereinfacht gesagt, Markierungen auf einem<br />
karierten Blatt Papier und sind ein wichtiger Indikator, der sich auf die<br />
Renditen von Sparguthaben und Verbraucherkrediten auswirken kann.<br />
Jeder Punkt repräsentiert die Ansicht eines Entscheidungsträgers der <br />
Fed für den Zielbereich des Zinssatzes am Ende des jeweiligen Jahres.<br />
Die Märkte konzentrieren sich im Allgemeinen auf den mittleren “Punkt“<br />
oder die Projektion.<br />
<br />
<em>UMWA‐Börsenbrief ‐ 13.12.2021</em><br />
</li>
<li> <b>Dow Jones Global Titans 50-Index</b><br />
Zu dem Dow Jones Global Titans 50-Index gehören die nach<br \>
Marktkapitalisierung gewichteten 50 grössten börsennotierten<br \>
Unternehmen der Welt.<br \>
</li>
<li> <b>Dow Jones STOXX-Index</b><br \>
Dow Jones STOXX 50 und Dow Jones EURO STOXX 50 sind die Bluechips-Indizes der<br \>
STOXX-Familie. Sie erfassen die 50 grösstkapitalisierten Unternehmen der<br \>
gesamteuropäischen Länder (16) beziehungsweise der Euroländer<br \>
(10). Die Dow Jones STOXX-Indizes sind kapitalisierungsgewichtet. Die Marktkapitalisierung<br \>
wird durch die Anzahl aller Aktien einer Aktiengattung bestimmt. Das maximale<br \>
Gewicht eines Titels in einem Bluechips-Index ist auf zehn Prozent der<br \>
gesamten Marktkapitalisierung des Index begrenzt. Daher kann die für die<br \>
Indexberechnung verwendete Anzahl Aktien einer Gesellschaft zwischen Bluechips-<br />
Indizes und den anderen Indizes unterschiedlich sein.<br \>
</li>
<li> <b>Due Diligence</b><br \>
Engl.: gebührende Sorgfalt. Darunter ist im Wertpapiergeschäft eine<br \>
Überprüfung der Ertrags- und Geschäftslage sowie der vergangenen Jahresabschlüsse des<br \>
betreffenden Emittenten durch die Bank zu verstehen.<br \>
</li>
<li> <b>EMIR</b><br \>
“European Market Infrastructure Regulation“<br \>
</li>
<li> <b>Equity Market Neutral</b><br \>
Diese Strategie beinhaltet die Konstruktion von Portfolios, die zu gleichen<br \>
Teilen Long- und Short-Aktienpositionen eingehen. Aktien, von denen der<br \>
Fondsmanager glaubt, dass sie besser als der Markt abschneiden, werden gekauft<br \>
(Long-Position) und solche, von denen er glaubt, dass sie schlechter als der<br \>
Markt abschneiden, werden leer verkauft (Short-Position). Durch das<br \>
Gleichgewicht von Long- und Short-Positionen wird das gesamte Portfolio vor<br \>
systematischen Ereignissen geschützt, die die Bewertung des Marktes als<br \>
ganzes beeinflussen. Der Equity Market Neutral Ansatz baut darauf auf, ausgeglichene<br \>
Ergebnisse mit moderater Volatilität in einer grossen Bandbreite von<br \>
Marktbedingungen zu erzielen.<br \>
</li>
<li> <b>Europöische Option</b><br \>
Eine Option, die erst am letzten Handelstag ausgeübt werden kann.<br \>
</li>
<li> <b>Event Driven</b><br \>
Event Driven Hedge-Fonds nutzen Preisanomalien, die mit<br \>
Kapitalmarkttransaktionen einhergehen. Solche Transaktionen können<br \>
Fusionen, Unternehmensübernahmen, Abspaltungen, Aktienemissionen,<br \>
Umstrukturierungen, Insolvenzen, Aktienrückkäufe, Sonderdividenden<br \>
und sonstige signifikante Marktereignisse sein.<br \>
</li>
<li> <b>Fälligkeitsdatum</b><br \>
Zeitpunkt, an dem die im Financial-Future-Kontrakt definierten Verpflichtungen<br \>
erfüllt werden müssen (Lieferung, Barausgleich).<br \>
</li>
<li> <b>Financial-Future-Kontrakt</b><br \>
Ein standardisierter Kontrakt, der die Lieferung oder Übernahme einer<br \>
festgelegten Menge eines Finanzinstrumentes zu einem festgesetzten Preis zu<br \>
einem zukünftigen Zeitpunkt beinhaltet.<br \>
</li>
<li> <b>Finnish Stock-Index (HEX25)</b><br \>
Der Finnish Stock-Index ist ein kapitalisierungsgewichteter Preisindex. Er<br \>
wird fortlaufend aus den 25 meistgehandelten Aktien der Helsinki Exchange berechnet.<br \>
</li>
<li> <b>Fixed Income Arbitrage</b><br \>
Die Aufgabe von Fixed Income Arbitrage-Managern ist es,<br \>
Trading-Möglichkeiten im<br \>
so gen. "Fixed Income" (festverzinsliche Wertpapiere)-Bereich sowie bei<br \>
Derivaten auszunutzen, die typischerweise zwei aufeinander bezogene<br \>
Finanzinstrumente beinhalten, bei denen eines der Instrumente relativ "teuer"<br \>
oder "billig" im Verhältnis zum anderen ist. Weil diese Strategie<br \>
marktneutral im Verhältnis zu den Zinsmärkten ist, ergeben sich die meisten<br \>
Möglichkeiten in<br \>
Form von Handelsspannen zwischen Preisen, Erträgen, Volatilitäten<br \>
usw.<br \>
</li>
<li><b>FOMC</b><br />
“Federal Open Market Committee“ <em>(“Offenmarktausschuß der US‐Notenbank“)</em><br />
<br />
Das FOMC ist Bestandteil des <em><b>Federal Reserve System</b></em> (die sog. “Fed“), <br />
das sowohl privatrechtliche als auch öffentlich‐rechtliche Elemente aufweist.<br />
<br />
Neben dem FOMC besteht das <em><b>Federal Reserve System</b></em> noch <br />
aus den folgenden zwei Institutionen:<br />
<br />
<ul>
<li>dem Board of Governors</li>
<li>den zwölf regionalen Federal Reserve Banken</li>
</ul>
<br />
und außerdem aus einer Vielzahl von Mitgliedsbanken (Mitglieds‐<br />
pflicht ab einer bestimmten Größe). <br />
</li>
<li><b>fomo</b><br />
Abk. für “fear of missing out“<br />
<br />
Die Angst, etwas zu verpassen<br />
</li>
<li> <b>Forward</b><br />
Forwards sind unbedingte, nicht börsengehandelte Termingeschäfte<br />
und gehören als solche zur Gruppe der Derivate.<br />
</li>
<li><b>FRTB</b><br />
<ul>
<li>scheint auch als “Basel 4“ bezeichnet zu werden</li>
<li>
The Fundamental Review of the Trading Book (FRTB) is a set of market<br />
risk capital rules designed to replace a series of patches introduced after<br />
the financial crisis. It seeks to better-capture tail risk, to redraw the boundary<br />
between banking and trading books, and to raise the bar for internal models.</li>
</ul></li>
<li> <b>Futures</b><br />
Futures sind derivative Finanzinstrumente. Futures sind standardisierte,</li>
börsenmässige gehandelte Terminkontrakte mit vertraglichen<br \>
Verpflichtungen, eine<br \>
bestimmte Menge eines Basiswertes zu einem bei Vertragsabschluss festgelegten<br \>
Preis zu einem bei Vertragsabschluss vereinbarten Zeitpunkt zu liefern (short)<br \>
oder abzunehmen (long).<br \>
</li>
<li> <b>Future-Spread-Margin</b><br \>
Diese Margin ist zu hinterlegen, um die Risiken eines maximalen zu erwartenden<br \>
Verlustes einer Spread-Position innerhalb von 24 Stunden zu decken.<br \>
</li>
<li> <b>Gewinnbeteiligung</b><br \>
Siehe Performance Fee.<br \>
</li>
<li> <b>GIRR</b><br \>
Allgemeines Zinsrisiko<br />
“general interest rate risk“<br \>
</li>
<li> <b>Glattstellung</b><br \>
Das Schliessen einer offenen Options- oder Future-Position durch ein<br \>
Gegengeschäft wird als Glattstellung (closing transaction) bezeichnet.<br
\>
</li>
<li> <b>Global Macro</b><br \>
Global Macro Hedgefonds beschreiten einen makroökonomischen Ansatz, der<br \>
eine globale Basis in die Investmentstrategie miteinbezieht. Es sind so gen.<br \>
Top-Down- Manager, die in opportunistischer Weise in Finanzmärkte,<br \>
Währungen, Länder und Terminmärkte investieren. Global <br />
Macro-Manager haben daher das breiteste Investmentspektrum.<br \>
</li>
<li><b>Global‐Supply‐Chain‐Pressure‐Index</b><br />
Er misst die Auswirkungen der Lieferkettenprobleme auf die Wirtschaft.</li>
<li> <b>Hebelwirkung</b><br \>
Im Verhältnis zum investierten Kapital ist die prozentuale<br \>
Veänderung der Preise bei Options- und Future-Kontrakten grösser <br />
als die entsprechende Veränderung des Basiswertes. Dieses erhöhte Gewinn- und<br \>
Verlustpotenzial wird mit dem Begriff Hebelwirkung beschrieben.<br \>
</li>
<li> <b>High-Watermark-Prinzip</b><br \>
Eine Performance Fee wird bei Anwendung diese Prinzips erst dann fällig,<br \>
wenn sich die Wertentwicklung positiv gestaltet, also ein bereits<br \>
zurückliegender Höchststand bzw. ein bestimmter festgelegter Performance-Stand wieder<br \>
überschritten wird.<br \>
</li>
<li> <b>Implizierte Volatilität</b><br \>
Die in einem Optionspreis reflektierte Volatilität.<br \>
</li>
<li> <b>Innerer Wert</b><br \>
Der innere Wert einer Option entspricht der Differenz zwischen dem aktuellen<br \>
Kassakurs und dem Ausübungspreis der Option, sofern diese einen<br \>
Preisvorteil für<br \>
den Käufer bedeutet. Der innere Wert ist immer grösser oder gleich<br \>
null.<br \>
</li>
<li> <b>In-the-money</b><br />
Eine Call-Option, bei der der Kurs über dem Ausübungspreis liegt,<br \>
oder eine reine Put-Option, bei der der Kurs des Basiswertes unter dem<br \>
Ausöbungspreis liegt.<br \>
</li>
<li> <b>IPCC</b><br />
<em>Intergovernmental Panel on Climate Change</em><br />
<br />
zwischenstaatlichen Sachverständigengruppe für Klimaänderungen<br />
</li>
<li><b>ITB</b><br />
der “Index der (US‐)Häuser“<br />
</li>
<li> <b>Korrelation</b></li>
Kennziffer für die Koppelungsintensität zweier Strategien oder<br />
Benchmarks. Eine perfekte Korrelation wird durch die Zahl 1,00<br />
ausgedrückt, eine vollständige negative Korrelation durch die
Zahl -1,00.<br />
</li>
<li> <b>Korrelationskoeffizient</b><br \>
Der Korrelationskoeffizient misst den Gleichlauf zwischen zwei<br \>
Finanzinstrumenten. Gezielt eingesetzt, kann er das Marktrisiko eines<br \>
Instruments reduzieren, indem diesem entweder ein negativ korrelierendes<br \>
Wertpapier oder eine gegenläufige Position eines positiv korrelierten<br \>
Instruments gegenübergestellt wird.<br \>
</li>
<li> <b>LCH</b><br \>
“London Clearing House“<br \>
</li>
<li> <b>Long-Position</b><br \>
Offene Käuferposition in einem Terminkontrakt.<br \>
</li>
<li> <b>Long-Short Equity</b><br \>
Die Long-Short Equity-Strategie wird häufig als die "klassische" Hedgefonds-<br \>
Strategie bezeichnet. Es handelt sich um eine direktionale Strategie, die in<br \>
beide Richtungen des Aktienmarktes, nämlich auf steigende und fallende<br \>
Kurse<br \>
spekuliert. Es wird eine Reihe verschiedener Ansätze zur Identifizierung und<br \>
Ausnutzung von unter- oder überbewerteten Aktien verwendet. Die Fonds<br \>
können von<br \>
Value- zu Wachstumswerten, von Aktien mit kleiner über mittlerer bis zu<br \>
grosser Marktkapitalisierung und von einer Netto-Long-Position zu einer<br \>
Netto-Short-Position wechseln. Sie können ausserdem Terminkontrakte
und<br \>
Optionen<br \>
zur Absicherung nutzen. Spezialisierungen auf bestimmte Regionen,<br \>
Börsenkapitalisierung und Sektoren sind möglich.<br \>
</li>
<li> <b>Managed Futures</b><br \>
Die Managed Futures-Strategie umfasst eine Reihe von Strategien, die auf den<br \>
Warenterminmärkten oder Finanzterminmärkten umgesetzt werden. Es<br \>
werden Bewertungsineffizienzen auf diesen Märkten durch die Verwendung<br \>
statistischer oder diskretionärer Modelle ermittelt und genutzt. Diese Strategien<br \>
können sich den Kauf oder Verkauf von Futures mit verschiedenen Laufzeiten bezogen auf<br \>
dieselben Titel zu Nutze machen. Sie können z. B. eine Ertragskurvenbandbreite<br \>
in Zinstiteln erzeugen oder eine Bandbreite zwischen verschiedenen<br \>
korrelierten Terminkontrakten (z. B. bei verwandten \u00d6lderivaten) und <br />
"Arbitrage Credit Spreads" (z. B. dem "TED" Spread). Andere Manager favorisieren<br \>
direktionale Trendfolgemodelle über eine Vielzahl von Halteperioden und Märkten,<br \>
während wieder andere auf trendlosen Modellen basierend auf der klassischen<br \>
ökonometrischen Theorie aufbauen und so stark dem typischen Macro<br \>
Hedgefonds &suml;hneln.<br \>
</li>
<li> <b>Management Fee</b><br \>
Die Management Fee oder Verwaltungsgebühr wird Anteilsinhabern direkt<br \>
belastet.<br \>
Der CTA stellt sie dem Kunden für die Verwaltung und das Management in<br \>
Rechnung.<br \>
</li>
<li> <b>Margin (Additional Margin, Premium Margin, Future-Spread-Margin)</b><br \>
Sicherheitsleistung, die als Deckung für die Kontrakterfüllung<br \>
hinterlegt werden muss.<br \>
</li>
<li> <b>Margin to Equity</b><br \>
Zeigt an, wie viel Prozent der Anlagesumme im Durchschnitt als Margin<br \>
hinterlegt werden.<br \>
</li>
<li> <b>Market Timing</b><br \>
Im Falle des Market Timing wird das Kapital zwischen den Aktien- und den<br \>
Zinsmärkten hin und her bewegt. Befindet sich der Aktienmarkt in einem<br \>
Aufwärtstrend, wird das Kapital vom Zinsmarkt in den Aktienmarkt<br \>
transferiert.<br \>
Befindet er sich in einem Abwärtstrend, wird das Kapital wieder in den<br \>
Zinsmarkt transferiert.<br \>
</li>
<li> <b>Markt-to-Market</b><br \>
Tägliche Neubewertung von Positionen in Financial-Futures und Optionen auf<br \>
Futures nach Börsenschluss zur Berechnung der t&suml;glichen Gewinne oder<br \>
Verluste.<br \>
</li>
<li> <b>MERVAL</b><br \>
"MERcado de VALores de Buenos Aires"<br \>
Argentinischer Aktienindex, ähnlich dem DAX<br \>
</li>
<li> <b>MiFID</b><br \>
“Markets in Financial Instruments Directive“<br \>
</li>
<li> <b>MIRAT</b><br \>
modellunabhängige Risikobewertungstool<br />
“model independent risk ?? tool“<br \>
</li>
<li> <b>Nettoperformance</b><br \>
Performance nach Abzug aller Verwaltungsgebühren, Gewinnbeteiligung und<br \>
Transaktionskosten.<br \>
</li>
<li> <b>NDF</b><br \>
Abk. für "Non-deliverable forward"<br \>
In finance, a non-deliverable forward (NDF) is an outright forward or futures<br \>
contract in which counterparties settle the difference between the contracted<br \>
NDF price or rate and the prevailing spot price or rate on an agreed notional<br \>
amount. It is used in various markets such as foreign exchange and commodities.<br \>
NDFs are prevalent in some countries where forward FX trading has been banned<br \>
by the government (usually as a means to prevent exchange rate volatility).<br \>
</li>
<li> <b>NFA</b><br \>
Die National Futures Association ist eine unabhängige<br \>
Regulierungsbehörde, die die Integrität des Derivatemarktes<br \>
gewährleistet. Wer für Kunden an US-Börsen tätig ist,<br \>
unterliegt der Registrierungspflicht bei der CFTC und muss Mitglied bei der<br \>
NFA sein.<br \>
</li>
<li> <b>NMRF</b><br \>
non-modellable risk factor<br />
<a href="https://www.risk.net/risk-management/5636151/banks-fear-frtb-amendments-could-increase-scope-of-nmrfs" target=_blank>Risk.net :: Banks fear more trades will be caught in NMRF trap</a>
</li>
<li> <b>Non-Spread-Future-Position</b><br \>
Long- oder Short-Positionen, die nach der Subtraktion gegenläufiger<br \>
Positionen mit unterschiedlicher Restlaufzeit übrig bleiben und für<br \>
die Additional Margin hinterlegt werden muss.<br \>
</li>
<li> <b>Opportunistic</b><br \>
Opportunistische Strategien unterscheiden sich von den bereits beschriebenen<br \>
Strategien lediglich auf Grund ihrer höheren Volatilität und<br \>
Marktabhängigkeit.<br \>
</li>
<li> <b>Option</b></li>
Das Recht, eine bestimmte Anzahl eines bestimmten Basiswertes zu einem</li>
festgelegten Preis an oder bis zu einem bestimmten Datum zu kaufen (Call)
oder</li>
zu verkaufen (Put).</li>
</li>
<li> <b>Optionen</b><br \>
Optionen sind derivative Finanzinstrumente. Standardisierte,<br \>
börsenmässige gehandelte Vereinbarungen, die dem Käufer das<br \>
Recht, aber nicht die Verpflichtung geben, eine bestimmte Menge eines<br \>
Basiswertes innerhalb eines festgelegten Zeitraums zu einem bei<br \>
Vertragsabschluss festgelegten Preis zu kaufen (Call) oder verkaufen (Put).<br
\>
</li>
<li> <b>Optionspreis</b><br \>
Der für das Optionsrecht bezahlte Preis.<br \>
</li>
<li> <b>Out-of-the-money</b><br \>
Eine Call-Option, bei der der Kurs des Basiswertes niedriger ist als der<br \>
Ausübungspreis, oder eine Put-Option, bei der der Kurs des Basiswertes<br \>
über dem Ausübungspreis liegt.<br \>
</li>
<li> <b>Performance Fee</b><br \>
Erfolgsabhängige Managementgebühr, die bei Erreichen eines positiven<br \>
Returns am Monatsende direkt verrechnet wird. Sie kann auch mit einer<br \>
High-Watermark- Klausel ausgestattet sein.<br \>
</li>
<li> <b>Premium-Margin</b><br \>
Die Premium-Margin ist vom Stillhalter zu hinterlegen. Sie bleibt bis<br \>
Ausübung oder Verfall bestehen. Sie deckt die Kosten einer Glattstellung<br \>
des Stillhalters zum Abrechnungspreis ab. Die Premium-Margin wird ständig<br \>
angepasst. Der Optionskäufer braucht keine Margin zu hinterlegen, da er<br \>
mit der Zahlung der Optionsprämie ein Recht erworben hat, aber keine<br \>
Verpflichtung eingegangen ist. Sein maximales Risiko besteht darin, dass der<br \>
Kontrakt wertlos verfällt und ist somit auf die Optionsprömie<br \>
begrenzt.<br \>
</li>
<li> <b>Put</b><br \>
Ein Optionskontrakt, der den Käufer berechtigt, eine bestimmte Anzahl<br \>
Basiswerte zu einem festgelegten Preis an oder bis zu einem bestimmten Datum<br \>
zu verkaufen (physische Lieferung). Der Anspruch einen physischen Titel zu<br \>
liefern kann durch einen Barausgleich ersetzt werden (Aktienindex-Derivate).<br \>
</li>
<li> <b>QIS</b><br \>
Quantitative Auswirkungsstudie,<br />
“quantitative impact study“<br />
</li>
<li> <b>Reflation</b><br />
bezeichnet eine aggressive Politik zur Bekämpfung einer drohenden Deflation,<br />
etwa eine expansive Geld- und/oder Fiskalpolitik.<br />
</li>
<li> <b>Relative Value Strategien</b><br \>
Hier wird durch den gleichzeitigen Kauf und Verkauf zweier Wertpapiere in so<br \>
gen. Spread Trades investiert, wenn das Ökonomische Verhältnis<br \>
zwischen den zwei Wertpapieren ("spread") nach Ansicht des Fondsmanagers<br \>
vom Markt falsch bewertet wird. In solchen Fällen kauft der Manager das<br \>
Wertpapier, das "billig" ist und verkauft dasjenige, das "teuer"<br \>
ist.<br \>
</li>
<li> <b>Reversal</b><br \>
Schaffung einer synthetischen Long-Future-Position durch den Kauf von Calls<br \>
und das Schreiben von Puts mit gleichen Ausübungspreisen und gleichem<br \>
Verfall bei gleichzeitigem Eingehen einer "echten" Short-Future-Position<br \>
(Gegenteil der Conversion).<br \>
</li>
<li> <b>REPX</b><br \>
US-Anleihemarkt<br \>
</li>
<li> <b>RFR</b><br \>
risk-free rates<br />
<a href="https://www.risk.net/comment/5663921/the-model-risk-challenges-in-libor-reform" target=_blank>Risk.net :: Model risk in the transition to risk-free rates</a>
<li> <b>Risk (Merger) Arbitrage</b><br \>
Fonds, die die Risk (Merger) Arbitrage-Strategie anwenden, investieren in<br \>
Gesellschaften, die übernommen oder verschmolzen werden sollen.<br \>
Normalerweise werden dabei die Aktien der Gesellschaft, die übernommen<br \>
werden soll, gekauft und die Aktien der übernehmenden Gesellschaft (leer)<br \>
verkauft. Das daraus resultierende Portfolio ist somit gegenüber Risiken<br \>
des Gesamtmarkts neutral, ähnlich wie bei marktneutralen<br \>
Aktienportfolios.<br \>
</li>
<li><b>“Rideshare“‐Unternehmen</b><br />
Fahrdienstleister, wie z.B. Uber (USA), DIDI (China)<br />
</li>
<li> <b>Round-Turn Fee</b><br \>
Gebühren, die für die Abwicklung eines Future-Geschäftes an den<br \>
Broker zu zahlen sind.<br \>
</li>
<li> <b>RT/Year/Million</b><br \>
Zeigt an, wie viele Roundturns das Programm im Jahr auf der Basis einer<br \>
Anlagesumme in Höhe von einer Mio. im Durchschnitt tätigt.<br \>
</li>
<li> <b>RWA</b><br \>
Risikoaktiva<br />
“risk-weighted assets“<br />
</li>
<li> <b>SBA</b><br \>
sensitivitätsbasierter Standardansatz<br />
“Sensitivity-Based Standardized Approach“<br />
</li>
<li> <b>Sharpe-Ratio</b><br \>
Die Sharpe Ratio misst das Verhältnis zwischen Risiko und Rendite des<br \>
Investments. Dabei wird ein risikoloser Zinssatz von der Rendite subtrahiert<br \>
und durch die Standardabweichung dividiert. Je höher die Sharpe Ratio,<br \>
desto besser das Risiko/Rendite-Verhältnis.<br \>
</li>
<li> <b>Short Selling</b><br \>
Bei einem Leerverkauf (short sale) werden grundsätzlich Finanzinstrumente<br \>
verkauft, die sich zum Zeitpunkt des Verkaufs nicht im Eigentum des<br \>
Verkäufers befinden. Unterschieden wird zwischen Leerverkäufen<br \>
solcher Wertpapiere oder anderer Finanzmarktinstrumente, die sich der<br \>
Verkäufer zuvor durch ein Wertpapierdarlehen verschafft, und solchen,<br \>
denen keine "Aktienleihe" vorausgeht (so genannte Naked Shorts).<br \>
Leerverkäufe ermöglichen es, auf fallende Kurse zu spekulieren.<br \>
Ferner ist es möglich, mit dem eingesetzten Kapital überproportional<br \>
an Kursschwankungen zu partizipieren, also eine Hebelwirkung zu erzeugen.<br \>
Übersteigt der Kursrückgang die Transaktionskosten und die<br \>
"Leihkosten" für die Wertpapiere, werden Gewinne erzielt.<br \>
</li>
<li> <b>Short-Position</b><br \>
Offene Verkäuferposition in einem Terminkontrakt.<br \>
</li>
<li> <b>Spread-Position</b><br \>
Im Falle eines Optionsgeschäftes gleichzeitiger Kauf und Verkauf von<br \>
Optionskontrakten mit unterschiedlichen Aus&suml;bungspreisen und/oder<br \>
verschiedenen Verfalldaten. Im Fall eines Financial Future gleichzeitiger Kauf<br \>
und Verkauf von Future-Kontrakten mit unterschiedlichen Fälligkeitsdaten<br \>
oder Basiswerten.<br \>
</li>
<li> <b>Standardabweichung (Standard Deviation)</b><br \>
Andere Bezeichnung für Volatilität.<br \>
</li>
<li> <b>Stillhalter</b><br \>
Gegenpartei des Optionskäufers, der sich zur Lieferung (Call) bzw. zur<br \>
Abnahme (Put) des Basiswertes im Falle einer Ausübung verpflichtet und<br \>
dafür den Optionspreis erhält.<br \>
</li>
<li> <b>Straddle</b><br \>
Long- oder Short-Position mit der gleichen Anzahl von Calls und Puts des<br \>
gleichen Basiswertes mit den gleichen Ausübungspreisen und den gleichen<br \>
Verfalldaten.<br \>
</li>
<li> <b>Strangle</b><br \>
Long- oder Short-Position mit der gleichen Anzahl von Calls und Puts des<br \>
gleichen Basiswertes mit den gleichen Verfalldaten, jedoch verschiedenen<br \>
Ausübungspreisen.<br \>
</li>
<li> <b>Swiss Market Index (SMI)</b><br \>
Der Swiss Market Index ist ein kapitalgewichteter Preisindex, der auf einem<br \>
Aktienkorb basiert, dessen Titel permanent gehandelt werden. Er umfasst bis zu<br \>
30 liquide Titel hochkapitalisierter Unternehmen des Schweizer Aktienmarktes.<br \>
</li>
<li> <b>Synthetische Position</b><br \>
Nachbildung eines Options- oder Future-Kontraktes durch andere Derivate.<br \>
</li>
<li> <b>Systematisches Risiko</b><br \>
Das systematische Risiko hängt von Faktoren ab, die den gesamten Markt<br \>
beeinflussen, und kann nicht durch Portfolio-Diversifikation reduziert oder<br \>
ausgeschlossen werden.<br \>
</li>
<li><b>TAM</b><br />
“Total Adressable Market“<br />
Das geschätzte Marktvolumen für das Produkt<br /></li>
<li> <b>Täglicher Schlussabrechnungspreis</b><br \>
Täglicher von der Eurex Clearing AG festgelegter Abrechnungspreis zur<br \>
Bewertung von offenen Options- und Future-Positionen.<br \>
</li>
<li><b>tapering</b><br \>
engl. Begriff für “langsames Anziehen der Geldpolitik“<br \>
<br />
Tapering is the gradual reversal of a quantitative easing policy implemented<br />
by a central bank to stimulate economic growth. As is the case with most, if<br />
not all, economic stimulus programs, they are meant to be unwound once<br />
officials are confident that the desired outcome, usually self sustaining<br />
economic growth, has been achieved. (<a href="https://www.investopedia.com/terms/t/tapering.asp" target="_blank" rel="noreferrer noopener">Investopia.com</a>)<br />
</li>
<li><b>Taper Tantrum</b><br \>
Verbindung von engl. temper tantrum (Wutanfall, Ausraster) und Tapering. <br />
<br />
Bezeichnung für die heftige Reaktion der Märkte im Mai 2013, nachdem <br />
der Vorsitzende der FED bekannt gegeben hatte, die Anleihenkäufe zu redu‐<br />
zieren. Anleihenkurse brachen daraufhin schlagartig ein, Renditen schnel‐<br />
lten in die Höhe, so dass es zu einer Art Schockwelle an den globalen Fi‐<br />
nanzmärkten kam, die insbesondere auch in Schwellenländern zu heftigen<br />
Verwerfungen der Kurse führte.<br />
<a href="https://www.gabler-banklexikon.de/definition/taper-tantrum-100443/version-349133" target="_blank" rel="noreferrer noopener">Gabler Banklexikon :: taper tantrum</a>
</li>
<li> <b>Unsystematisches Risko</b><br \>
Anteil des Gesamtrisikos, der nicht durch Renditeschwankungen des<br \>
Gesamtmarktes erklärt werden kann.<br \>
</li>
<li> <b>US-Treasuries</b><br \>
auch: Treasuries<br />
Bezeichnung für amerikanische Staatsanleihen (insbes. der 10jährigen)<br \>
<br />
Fließt das Kapital aus den Aktien in die Anleihen, steigt der Kurs der Anleihen. Da<br />
Anleihen in der Regel zu einem festen Preis zurückgezahlt werden, sinken bei ei‐<br />
nem steigenden Kurs logischerweise die Renditen.<br />
<br />
Somit kann man gut erkennen, ob Anleihe‐Investoren mit eher weniger Rendite,‐<br />
dafür aber mit der sicheren Rückzahlung ihres Investments rechnen wollen.<br />
<br />
<em>UMWA‐Börsenbrief ‐ 13.12.2021</em><br />
</li>
<li> <b>Variations-Margin</b><br \>
Gewinn oder Verlust, resultierend aus der täglichen Neubewertung des<br \>
Futures (Mark-to-Market). Die Variations-Margin wird täglich in bar<br \>
ausgeglichen.<br \>
</li>
<li> <b>Verfalldatum</b><br \>
Das Datum, ab welchem ein Optionsrecht nicht mehr ausgeübt werden kann.<br \>
</li>
<li> <b>Volatilität</b><br \>
Das Ausmass der tatsächlichen oder erwarteten Renditeschwankungen eines<br \>
Finanzinstrumentes. Die für ein Instrument gemessene Volatilität<br \>
kann je nach Zeitspanne, auf die sie sich bezieht, unterschiedlich sein. Sie<br \>
kann entweder als historische oder implizite Volatilität berechnet<br \>
werden.<br \>
</li>
<li> <b>Worst-Case-Loss</b><br \>
Grösstmöglicher Glattstellungsverlust am nächsten<br \>
Börsentag. Wird durch die Additional Margin beziehungsweise<br \>
Futures-Spread-Margin abgedeckt.<br \>
</li>
<li> <b>Zeitwert</b><br \>
Der Zeitwert umfasst jenen Teil des Optionspreises, der sich aus der<br \>
Restlaufzeit der Option ergibt. Je länger die Restlaufzeit ist, desto<br \>
höher ist der Optionspreis infolge der noch vorhandenen Zeit, in der sich<br \>
der Preis des Basiswertes auf- oder abwärts bewegen kann (mögliche<br \>
Ausnahme: Deep-in-the-money-Puts).<br \>
</li>
</ul>
<h3>Quelle:</h3>
u.a. <a href="http://www.varengold.de/de/knowledge-base/glossary/" target=_blank>Varengold :: Knowledge base - Glossary</a><br \>
</html>
<html>
<ul>
<li>Geldentwertung</li>
<li>Inflation ist letztendlich ein mangelndes Vertrauen in die Währung.</li>
</ul>
</html>
<html>
<ul>
<li>engl. <em>liquidity trap</em>
<li>ein in der Volkswirtschaftslehre von John Maynard Keynes<br />
eingeführter Begriff für den Teil der Kurve der Liquiditätsprä‐<br />
ferenz, in welchem die Geldnachfrage zu Spekulationszwel‐<br />
ken unendlich elastisch wird;</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Liquidit%C3%A4tsfalle" target="_blank" rel="noreferrer noopener">Wikipedia</a></li>
</ul>
</html>
<html>
<ul>
<li>REIT := Real Estate Investment Trust</li>
<li>sie sind Grundbesitz basierte Investmentgesellschaften, die aus dem <br />
physischen Besitz einen Ertrag, eine Miete, erwirtschaften. Das können<br />
Inhaber oder Erbauer von Krankenhäusern sein, Altenheimen, Forschungs‐<br />
anstalten oder Landflächen, auf denen Bäume als Ertrag wachsen.</li>
<li>Alle REITs haben eine gesetzliche Vorgabe, um einen steuerlichen Sonder‐<br />
status zu behalten. Sie müssen einen hohen Prozentsatz des Gewinnes an<br />
die Anteilseigner ausschütten. In der Regel sind das um die 90%.</li>
<li>Beispiele:<br />
<ul>
<li>Healthcare Realty (HR) [<em>UMWA‐Börsenbrief, 2021-06-04</em>]</li>
</ul>
</li>
<!-- li></li>
<li></li>
<li></li -->
</ul>
<h3>Links:</h3>
<ul>
<li>UMWA-Börsenbrief, 2021-06-04</li>
<!-- li></li>
<li></li>
<li></li -->
</ul>
</html>
<html>
<ul>
<li>Sonderziehungsrechte (SZR) sind eine künstliche Reserve-<br />
währung des Internationalen Währungsfonds (IWF), die als<br />
Ergänzung zu bestehenden Währungsreserven dient.
</li>
<li>Sie wurden 1969 eingeführt, um die Liquidität im internatio-<br />
nalen Finanzsystem zu verbessern.
</li>
<li>SZR spielen eine Rolle bei internationalen Finanzkrisen, <br />
da sie als Liquiditätsreserve für Länder mit Deviseneng-<br />
pässen dienen können.
</li>
<li><h4>Merkmale der Sonderziehungsrechte:</h4>
<ul>
<li><b>Kein physisches Geld:</b><br />
SZR existieren nur als Buchgeld und können nicht direkt für Zahlungen verwendet werden.
</li>
<li><b>Währungskorb:</b><br />
Der Wert eines SZR basiert auf einem Korb aus fünf Leitwährungen: US-Dollar (USD), Euro (EUR), Chinesischer Renminbi (CNY), Japanischer Yen (JPY) und Britisches Pfund (GBP). -
</li>
<li><b>Vergabe und Nutzung:</b><br />
SZR werden an IWF-Mitgliedsländer entsprechend ihrer Kapitalanteile zugeteilt. Staaten können sie untereinander tauschen oder in Fremdwährungen umwandeln.
</li>
<li><b>Verzinsung:</b><br />
SZR tragen einen variablen Zins, der aus den Zinssätzen der im Währungskorb enthaltenen Währungen berechnet wird.
</li>
</ul>
</li>
</ul>
</html>
<html>
<ul>
<li>Die Abkürzung wurde von der Wirtschaftszeitung <br />
„Financial Times“ erfunden;
</li>
<li>es steht für „Trump always chickens out“,<br />
auf Deutsch: „Trump kneift immer“.
</li>
</ul>
</html>
<html>
<ul>
<li>dt. “Gesamtbetriebskosten“</li>
<li>Berechnungsverfahren in der Betriebswirtschaftslehre</li>
<li></li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Total_Cost_of_Ownership" target="_blank" rel="noreferrer noopener">Wikipedia</a></li>
</ul>
</html>
<html>
<ul>
<li>Mit <b>Tapering</b> wird das langsame Beenden der Niedrigzinspolitik<br />
und der hohen Anleihekäufe bezeichnet. Dies entzieht dem Markt<br />
Liquidität</li>
<li>Ein “Hinausschleichen“ (Tapering) aus dem bisherigen <br />
Prozedere des Anleihen-Ankaufs durch die Fed.</li>
</ul>
<h3>Links:</h3>
<ul>
<li>UMWA‐Börsenbrief, 2021-07-06</li>
<li>UMWA‐Börsenbrief, 2021-08-09</li>
<li>UMWA‐Börsenbrief, 2021-12-13</li>
</ul>
</html>
<html>
<meta Wasserstoff />
<ul>
<li><h3>Brauner Wasserstoff</h3>
entsteht aus Kohlevergasung durch Zufürung von Wasserdampf</li>
<li><h3>Wießer Wasserstoff</h3>
fällt in chemischen/petrochemischen Prozessen als Nebenprodukt an</li>
<li><h3>Grauer Wasserstoff</h3>
wird aus fossilen Brennstoffen gewonnen. Bei der Herstellung wird<br />
Erdgas unter Hitze in zwei Schritten in Wasserstoff und <math><msub><mi>CO</mi><mn>2</mn></msub></math> um‐<br />
gewandelt.</li>
<li><h3>Blauer Wasserstoff</h3>
ist grauer Wasserstoff, dessen <math><sub><mi>CO</mi><mn>2</mn></math> jedoch abgeschieden und ge‐<br />
speichert wird (Dampfreformierung)</li>
<li><h3>Grüner Wasserstoff</h3>
wird durch Elektroylse von Wasser hergestellt, wobei ausschließ‐<br />
lich Strom aus erneuerbaren Energien, z.B. Wind, Wasser und<br />
Solar, zum Einsatz kommt.</li>
<li><h3>Türkiser Wasserstoff</h3>
ist Wasserstoff, der über die thermische Spaltung von Methan <br />
(Pyrolyse) hergestellt wird. Anstelle von <math><sub><mi>CO</mi><mn>2</mn></math> entsteht dabei<br />
reiner granularer Kohlenstoff.</li>
<li><h3>Roter Wasserstoff</h3>
wird durch Elektrolyse von Wasser hergestellt, wobei ausschließ‐<br />
lich Atomstrom zum Einsatz kommt.</li>
<li><h3>Gelber Wasserstoff</h3>
wird durch Elektrolyse von Wasser hergestellt, wobei ein Mix aus<br />
regenerativen und fossilen Energieträgern Verwendung findet.</li>
</ul>
<h3>Links:</h3>
<ul>
<li>Focus Money 02/2023 (04.01.2023), S. 40</li>
</ul>
</html>
<html>
Zinslastquote:<br />
die Zinszahlungen des Staates in Prozent des Bruttoinlandproduktes
</html>
<html>
<ul>
<li><h3>UMWA-Strategie:</h3>
<ul>
<li><b>Put verkaufen</b><br />
der Aktienkurs <b>steigt</b>, gewählter Strike Price ist <b>unter</b> dem Aktienkurs;</li>
<br />
<li><b>(Covered) Call verkaufen</b><br />
d.h. ich besitze die Aktien;<br />
der Aktienkurs <b>fällt</b>, gewählter Strike Price ist <b>über</b> dem Aktienkurs;<br />
<br />
Auswahl des Calls: der Strike Price muss über dem aktuellen Aktienkurs sein<br />
<br />
“Calls anbieten“:<br />
Nach einem starken Rückgang kann man mit der Faustformel <br />
“20% über dem aktuellen Kurs“ immer wieder neue Mieten<br />
einfahren. </li>
</ul></li>
<br />
<li>Der amerikanische Markt ist ein “Konsumentenmarkt“ ‐ d.h. der Konsum<br />
der 331 Millionen Bürger ist die größte Stütze für den Markt und jede gute Zahl<br />
zu steigenden Beschäftigungen stabilisiert das einsetzende Wirtschaftswachstum.<br />
<br />
<i>(Börsenbrief, 2021-0?-??)</i></li>
<br />
<li>Chart:<br />
immer <b>kleiner werdende Kerzen</b> bedeuten <b>abnehmender Handel</b> <br />
(das Handelsvolumen verringert sich, es wird weniger gehandelt)<br />
<br />
<i>(Börsenbrief, 2021-0?-??)</i></li>
<br />
<li>Ein <b>gekaufter Call</b> verfällt wertlos, <br />
auch wenn die Aktie deutlich fällt.<br />
<br />
<i>(Börsenbrief, 2021-11-12)</i></li>
<br />
<li>Die “anstehenden Hausverkäufe“ fielen am Dienstag deutlich höher aus. (7,5% gegenüber −2,4% im Vormonat) Steigt die Zahl jetzt wie im Oktober, dann gilt dies als Hinweis auf eine Besserung am Immobilienmarkt. Häuslebauer müssen Geld in die Hand nehmen und versorgen damit die ganze Zuliefererkette. Fällt die Zahl dagegen, so gilt dies als Indiz für einen sich abschwächenden Immobilienmarkt und damit sinkende Verbraucherausgaben. Fallen die anstehenden Hausverkäufe höher aus als erwartet, fü das auf den Devisenmärkten meist zu einem steigenden Kurs des US-Dollar. (Dies hat dann einen Einfluss auf den Rohstoffmarkt, der in USD abgerechnet wird).<br />
<br />
<i>(Börsenbrief, 2021-12-02)</i>
</li>
<br />
<li>ein “Doji“ kündigt eine Trendwende an;</li>
<br />
<li><h3>“Hohes Short‐Interesse bei einigen Aktien“</h3>
Vereinfacht: Bei den genannten Werten setzen mehr Trader auf fallende <br />
Kurse (sie verkaufen “leer“), um dann günstiger die für diesen Trade ge‐ <br />
liehenen Aktien wieder kaufen und zurückgeben zu können. <br />
<br />
Sollten die Kurse aber wider Erwarten steigen, geraten diese Kontrakte in <br />
Bedrängnis ‐ sie gehen in den Verlust. Zum Mindern des Verlustes muss <br />
ein Shortseller seine Position schließen ‐ und das bei immer schneller <br />
steigenden Kursen, es kommt zu einem “Short Squeeze“. <br />
<br />
<i>(Börsenbrief, 2021-06-28)</i>
</li>
<br />
<li><h3>Watchlist für Solarwerte:</h3>
<table border="1">
<tr><td>First Solar (FSLR)</td><td>SunPower (SPWR)</td></tr>
<tr><td>Vivint Solar (VSLR)</td><td>Tesla (TSLA)</td></tr>
<tr><td>Enphase Energy (ENPH)</td><td>Sunrun (RUN)</td></tr>
<tr><td>SolarEdge (SEDG)</td><td>Canadian Solar (CSIQ)</td></tr>
<tr><td>JinkoSolar (JKS)</td><td>TerraForm Power (TERP)</td></tr>
<tr><td>Bloom Energy (BE)</td><td>NextEra Energy Partners (NEP)</td></tr>
<tr><td>Azure Power Global (AZRE)</td><td>Sunnova Energy (NOVA)</td></tr>
<tr><td>Brookfield Renewable Partners (BEP)</td><td>Ormat Technologies (ORA)</td></tr>
<tr><td>SolarWindow (WNDW)</td><td>Daqo New Energy (DQ)</td></tr>
<tr><td>ReneSola (SOL)</td><td>Maxeon (MAXN)</td></tr>
</table>
<br />
Dabei sind aber doch zwei Aktien, die mit diesem Hintergrundwissen Deine besondere <br />
Aufmerksamkeit bekommen sollten. Es sind die zwei großen amerikanischen Vorzeige-<br />
Solarunternehmen aus der Aufzählung, die von der Bank of America (BAC) zudem ge-<br />
rade heraufgestuft wurden: <b><i>Enphase Energie (ENPH)</i></b> und <b><i>Solar Edge (SEDG)</i></b>. Diese<br />
Werte sind noch keine “ruhige Bank“ und unterliegen einer relativ hohen Volatilität. <br />
Aber beide Aktien haben eine “Zukunft“ und werden aller Voraussicht nach nicht von<br />
chinesischen Billig-Konkurrenten aus dem Markt gedrängt werden.<br />
<br />
Alternative: ChargePoint<br />
<br />
<i>(Börsenbrief, 2021-06-24)</i></li>
<br />
<li>Steigt der “VIX“, so liefert das wieder gute Mieten</li>
<br />
<li><b>TLT</b>, der Index auf die 20-jährigen Schatzbriefe</li>
<br />
<li><b>TNX</b>, der Index auf die 10-jährigen Schatzbriefe</li>
<br />
<li>Dividendenwerte und Anleihen haben einen umgekehrten Kursverlauf zur Zinsentwicklung.<br />
Oder ganz einfach: Wenn die Zinsen steigen, gehen Dividendentitel und Anleihen in den Keller. </li>
<br />
<li>Wer eingebucht werden will, kann auf diese Aktie nur Calls “außer Reichweite“ verkaufen,<br />
also mit einem Delta unter 0,1. Damit wird zwar nur eine geringe Miete erwirtschaftet, aber<br />
man behält die Aktie.<br />
<br />
Faustregel: Das Delta entspricht der Chance, eingebucht zu werden.</li>
<br />
<li>Wir können “gefährliche“ Aktien oftmals an der hohen “IV“, der impliziten Volatilität im<br />
Option Trader erkennen.</li>
<br />
<li>Bleibt das Put/Call Ratio unter der “1“, d.h. es werden weniger Absicherungen <br />
(Puts) als Chancen (Calls) gekauft, spricht das für einen zunehmenden Optimismus.<br />
<br />
Ist die Kennziffer über “1“, so zeigt das, dass mehr absichernde Puts gekauft<br />
werden als Calls.</li>
<br />
<li>Alter Wiederstand wird die neue Unterstützung.</li>
<br />
<li>
<ul>
<li><em><b>langsame</b> Stochastik</em> : blaue Linie</li>
<li><em><b>schnelle</b> Stochastik</em> : rote Linie</li>
</ul></li>
<br />
<li><h3>“<em>Teufelskreis bei Fabrikschliessungen:</em>“</h3>
[…] Bis dahin bedeuten Fabrikschließungen einen Verlust von Arbeitsplätzen. Viele<br />
Hauseigentümer haben hohe Hypotheken. Wenn sie keine Arbeit haben, sind sie <br />
nicht in der Lage die Kredite zurückzuzahlen, und die sinkenden Immobilienwerte<br />
könnten zu einem Wertverfall des Hauses führen, welches dann weniger wert ist, als<br />
der geschuldete Betrag. Das kennen wir noch aus der Zeit der Hypothekenkredit‐<br />
Krise in den USA in 2007. <br />
<br />
(<em>UMWA‐Börsenbrief, 21.10.2021</em>)</li>
<br />
<li><h3>… zur hohen Inflation …</h3>
Wenn man mit der überhitzten Inflation noch heizen könnte, bräuchten wir derzeit keine Energiewende …<br />
<br />
Noch im Sommer schien die Inflation “transitory“, also vorübergehend zu sein, und die ganze Vorgehensweise der Fed stützte sich auf diese Annahme. Jetzt sehen wir statt einer Abkühlung eine Erhitzung!<br />
<br />
Verwunderlich ist das nicht. Seit Wochen schreiben wir über die Probleme in den Lieferketten, über den Arbeitskräftemangel und auch steigende Löhne. Das rutscht natürlich ein wenig in den Hintergrund, wenn der Fokus auf die Gewinn Saison geht und die Unternehmen zu 80% Gewinne “besser als erwartet“ melden. <br />
<br />
Die relevanten Unternehmen haben nun alle berichtet ‐ und die Trader schauen sich den Markt erneut an: “Huch ‐ wir haben ja eine steigende Inflation“ ‐ und ruckartig geht das Geld aus dem Markt in die Staatsanleihen, deren Renditen dann ja auch sofort reagieren und weiter steigen.<br />
<br />
<u>Ganz klassisch: <b>Anleihenrendite hoch ‐ Aktienrendite runter.</b> </u><br />
<br />
(<em>UMWA‐Börsenbrief, 12.11.2021</em>)</li>
<br />
<li>[…]
<b><u>Unsicherheit bedeutet auch steigende Mieteinnahmen!</u></b> Jetzt müssen wir den steigenden<br />
VIX* und den F&G‐Index beständig vor unserem Handelsbeginn prüfen. Je höher der VIX,<br />
desto mehr ist der Markt bereit für die Absicherung durch Deinen verkauften Put zu bezahlen.<br />
Derzeit geht der VIX wieder in den Bereich der 20 Punkte und generiert ein gutes Chance‐<br />
Risiko‐Verhältnis!<br />
<br />
(<em>UMWA‐Börsenbrief, 12.11.2021</em>)</li>
</ul>
</html>
<html>
<ul>
<li>Vermieter/in hat Vertrag "TV Connect Start" mit<br />
Vodafone abgeschlossen:
<pre>
TV Connect Start — 9,98 €
Dein TV-Kabelanschluss
28 HD-Sender & 69 SD-Sender
Keine zusätzliche Hardware
</pre>
</ul>
</html>
<html>
<ul>
<li>Adding your signature to a Microsoft Word document is the ultimate way to personalize it as your own, especially for documents like letters or contracts. In this guide, I'll run through several ways to add a signature to a Word document.
</li>
<li>
If you want to create a space for adding a handwritten signature after your document is printed, use Word's Signature Line tool in the Text group of the Insert tab. Once selected, you can type your or the expected signer's name, title, and email address, and there will be a line where you or they can sign.
</li>
</ul>
<h3>Upload a Handwritten Signature</h3>
<ul>
<li>My preferred way to add a signature is to sign on some paper by hand, and then upload it to my Word document. It's the best method to make the signature look the most natural, and once you've done it once, your signature can be saved on your computer for repeated use.
</li>
<li>This method works just as smoothly on both the Microsoft Word desktop app and Word for the web.
</li>
<li>First, use a black pen and white paper to create your signature before taking a photo of it with your phone. Then, send the picture of your signature to your computer. I use Microsoft Drop to do this in a few seconds, but you can also transfer it from your phone to your computer via email or a cloud platform such as OneDrive.
</li>
<li>Returning to your PC, in Microsoft Word, click Insert > Pictures, and click "This Device."<br />
<img src="./pictures/a-microsoft-word-document-with-the-pictures-menu-opened-on-the-insert-tab-and-this-device-selected.avif"
height= width= title=A Microsoft Word document, with the Pictures menu opened on the Insert tab, and This Device selected./><!-- --->
</li>
<li>Once you have located and inserted the picture of your signature, use the Crop tool in the Picture Format tab to remove any unneeded space.<br />
<img src="./pictures/the-crop-tool-in-microsoft-word-being-applied-to-a-signature-uploaded-as-a-picture.avif"
height= width= title="The Crop tool in Microsoft Word being applied to a signature uploaded as a picture." /><!-- --->
</li>
<li>Then, use the Remove Background tool in the Picture Format tab to deal with any unwanted background coloration.<br />
<img src="./pictures/an-image-selected-in-microsoft-word-with-the-remove-background-button-highlighted.avif"
height= width= title="An image selected in Microsoft Word, with the Remove Background button highlighted." /><!-- --->
</li>
<li>After you click "Remove Background," Word will do most of the work for you automatically, with the pink areas being the sections the program has identified as needing to be removed. You can also click "Mark Areas To Keep" and "Mark Areas To Remove" to further refine the image's appearance. When you're happy with how the signature looks, click "Keep Changes."<br />
<img src="./pictures/word-s-background-removal-tool-being-used-on-an-uploaded-signature.avif"
height= width= title=Word's Background Removal tool being used on an uploaded signature." /><!-- --->
</li>
<li>This process is surprisingly intuitive—Word successfully picked up most of the background that needed to be removed, and I only had to make one or two minor tweaks to perfect how it looked:<br />
<img src="./pictures/a-signature-in-microsoft-word-uploaded-as-an-image-and-edited-through-word-s-image-editing-tools.avif"
height= width= title=A signature in Microsoft Word, uploaded as an image and edited through Word's image editing tools." /><!-- --->
</li>
<li>Finally, right-click your perfected signature and click "Save As Picture," so you can use it again in future documents. Just make sure you save it somewhere safe, such as in your OneDrive Personal Vault or a password-protected folder.
</li>
</ul>
<h3>Use Your Finger or a Stylus on Your Phone or Tablet</h3>
<ul>
<li>Another effective way to add your signature to your Word document is to open the saved file on your phone or tablet using either the Microsoft 365 mobile app or the Microsoft Word mobile app.
</li>
<li>When you've finished typing your letter on your PC, make sure you leave a couple of lines of space where your signature will go.<br />
<img src="./pictures/a-letter-in-microsoft-word-containing-a-space-before-the-writer-s-name-where-the-signature-will-go.avif"
height= width= title=A letter in Microsoft Word containing a space before the writer's name where the signature will go." /><!-- --->
</li>
<li>For this process to work, your document needs to be synced to your Microsoft OneDrive account. So, head to the top of your Word window, and make sure the AutoSave toggle says "On." If it doesn't, click the toggle, sign in to your Microsoft account, and save your file in a memorable place.<br />
<img src="./pictures/the-autosave-toggle-is-switched-to-on-in-microsoft-word.avif"
height= width= title=The AutoSave toggle is switched to On in Microsoft Word." /><!-- --->
</li>
<li>I'll show you how this works on the iPhone Microsoft Word app, but the process is very similar on other devices and if you use the Microsoft 365 mobile app.
</li>
<li>After signing in to the same Microsoft account on your Microsoft 365 or Word tablet or mobile app, locate and open the document on your phone, and tap the "Edit" icon at the top of your screen.<br />
<img src="./pictures/the-edit-pen-in-the-microsoft-word-mobile-app.avif"
height= width= title=The Edit pen in the Microsoft Word mobile app." /><!-- --->
</li>
<li>Now that you're in editing mode, you can expand the mobile app's ribbon to see the different editing options. To do this, tap the three dots in the bottom-right corner of your screen (or the arrow in the same location on an Android device).<br />
<img src="./pictures/the-three-dots-in-the-microsoft-word-mobile-app.avif"
height= width= title=The three dots in the Microsoft Word mobile app." /><!-- --->
</li>
<li>Then, head to the "Draw" menu, and tap "Start Inking."<br />
<img src="./pictures/the-draw-menu-in-the-microsoft-word-mobile-app-with-the-start-inking-option-selected.avif"
height= width= title=The Draw menu in the Microsoft Word mobile app, with the Start Inking option selected." /><!-- --->
</li>
<li>You're now ready to add your signature. First, select your pen style from the options at the bottom, and then use your finger or a stylus to create your signature. When completed, tap "Done."<br />
<img src="./pictures/the-draw-pens-in-the-microsoft-word-mobile-app-being-used-to-add-a-signature-to-a-document-and-the-done-button-is-also-selected.avif"
height= width= title=The draw pens in the Microsoft Word mobile app being used to add a signature to a document, and the Done button is also selected." /><!-- --->
</li>
<li>You can now close your Word mobile app, and head back to the document on your PC. There, click the signature to resize and reposition it if necessary.
</li>
<li>If the signature doesn't show up on your PC straightaway, close and reopen the document.<br />
<img src="./pictures/a-letter-in-microsoft-word-containing-a-signature.avif"
height= width= title=A letter in Microsoft Word containing a signature." /><!-- --->
</li>
<li>Again, if you want to save your signature for future use, right-click the image, and click "Save As Picture."
</li>
</ul>
<h3>Use Word's Draw Tool on Your PC</h3>
<ul>
<li>A quicker way to add a signature to your Word document on your PC is by using the desktop app's Draw tool. The major downside of this approach compared to those listed above is that the resultant signature can look less natural, and it can take a few attempts before you're happy that what you've got looks anything like your actual signature!
</li>
<li>Open the "Draw" tab on the ribbon, and choose your preferred pen. Then, use your mouse to create your signature.
</li>
<li>If you're using Word for the web, click Insert > Drawing > Draw to access the same tool.<br />
<img src="./pictures/a-word-document-containing-a-james-bond-signature-created-through-the-draw-tab-on-the-ribbon.avif"
height= width= title=A Word document containing a James Bond signature, created through the Draw tab on the ribbon." /><!-- --->
</li>
<li>However, if you un-clicked and re-clicked your mouse to create the separate letters, your signature will be made up of several individual shapes that you need to group together. To resolve this, first click "Select" in the Editing group of the Home tab, and click "Select Objects."<br />
<img src="./pictures/the-select-and-select-objects-tools-in-the-home-tab-in-microsoft-word.avif"
height= width= title=The Select and Select Objects tools in the Home tab in Microsoft Word." /><!-- --->
</li>
<li>Then, select all the drawing strokes you made to create your signature.<br />
<img src="./pictures/a-microsoft-word-document-with-each-stroke-of-a-drawn-signature-selected-through-the-select-objects-tool.avif"
height= width= title=A Microsoft Word document with each stroke of a drawn signature selected through the Select Objects tool." /><!-- --->
</li>
<li>Finally, right-click any of the selected drawing strokes, and click "Group" twice.<br />
<img src="./pictures/microsoft-word-s-group-tool-being-used-to-group-together-the-strokes-of-a-drawn-signature.avif"
height= width= title=Microsoft Word's Group tool being used to group together the strokes of a drawn signature./><!-- -->
</li>
<li>Your signature is now one whole image, which you can right-click again to "Save As Picture" for future use if you wish.
</li>
</ul>
<h3>Use a Digitally Verified Signature</h3>
<ul>
<li>Sometimes, you may need to add a more formal signature, especially if you're signing a legally binding document like a contract. In this case, you might need to sign your file with a digital signature, which is accompanied by a digital ID that verifies that you — not someone pretending to be you — signed the document.
</li>
<li>You can also add an invisible signature, which protects the authenticity of the content within the document and prevents others from making changes after you have signed:
<a href="https://www.howtogeek.com/759657/how-to-add-or-remove-a-digital-signature-in-microsoft-office-files/"
target="_blank" rel="noreferrer noopener">
How to Add (or Remove) a Digital Signature in Microsoft Office Files</a>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.howtogeek.com/448808/how-to-insert-a-signature-into-microsoft-word/"
target="_blank" rel="noreferrer noopener">
How-To Geek :: 4 Ways to Add a Signature to a Microsoft Word Document</a>
</li>
</ul>
</html>
<html>
<ol>
<li>Menü <b>References</b></li>
<li>Menü <b>Table of Contents</b></li>
</ol>
</html>
<html>
Mit dem Workflow Tester (WorkflowTest.cmd) hat man ein nützliches<br>
Murex-Tool, um einzelne Workflow-Tasks zu testen.<br>
<br>
Man kann auf einfache Art und Weise Deal-Tickets an einzelne Tasks<br>
des Workflows schicken. Dazu hat man in der GUI den Filenamen an-<br>
zugeben und dieses file im mxml-Verzeichnis zu speichern.<br>
<br>
<img src="./pictures/workflowTester.png" alt=""><br>
<br>
<b>cmd-File: </b>MxMLExchange_Test.cmd<br>
<b>Verzeichnis:</b> <App-Dir>/mxmlexchange<br>
<br>
You can then place this cmd file under the client directory to send xml files to a specified task .<br>
I have attached the file I am using (and modified it slightly so that it no longer references the file <br>
mxg2000_settings.cmd as the one under the application directory).<br>
<br>
To use it, you have to place the xml file you would like to send to MxMLExchange on the client <br>
directory as well. In this case, the file called testIRS.xml.<br>
<br>
You can define header fields in the "Header" Tab fields such reference number, etc.<br>
You can also define body fields in the "Body" tab (template grammar, Content Type, <br>
xml file you are using, etc...).<br>
The "Add Attachment" button will allow you to add another body to the entry.<br>
However, please note that this file can be used to help you to perform some <br>
punctual tests on the workflows and does not replace a full scope test on the <br>
workflows with the new version.<br>
<br>
<img src="./pictures/workflowTester-02.png" alt=""><br>
<br>
s.a.<br>
eMail_Naji-MxMLWorkflow02.pdf<br>
04 MxMLExchange Administraton & Monitoring Basic.pdf, S. 18f<br>
</html>
<html>
<ul>
<li><h4>Hotel “Qubus“</h4>
<table border="0">
<tr><td><b>Adresse:</b></td><td></td></tr>
<tr><td></td><td>sw. Marii Madgaleny 2</td></tr>
<tr><td></td><td>50 ‐ 103 Wroclaw PL</td></tr>
</table>
nächstgelegene Haltestelle:
<ul>
<li>Swidnicka (Linie ??) (Fussweg Richtung Olawska notwendig, aber leichter zu erreichen)</li>
<li>Olawska (Linie 6 / 7) (quasi direkt vor der Haustür)</li>
</ul>
</li>
<li><h4>Hotel “Mercure Accor“</h4>
<table border="0">
<tr><td><b>Adresse:</b></td><td></td></tr>
<tr><td></td><td>pl. Dominikanska 1</td></tr>
<tr><td></td><td>50 ‐ 159 Wroclaw PL</td></tr>
</table>
nächstgelegene Haltestelle: Galeria Dominikanska (Linie 9)<br />
(angeblich auch Linie 5, aber bisher nicht überprüft)
</li>
<li><h4>Gaststätte “4Hops“</h4>
<ul>
<li>Nähe Haltestation “Galeria Dominikanska“</li>
<li>Straße “Ofiar Oswiecinskich“</li>
<li>man muss der Hauptstraße folgen, <br />
dann sieht man ein Geschäft namens “New York“ <br />
(oder so), dann einfach weitergehen. Kurz darauf <br />
dann da (auf der rechten Seite)</li>
<li>bieten selbstgebrautes Bier (Craftsbeer) an<br />
(hatte beim ersten Mal den “Jazzman“ genommen<br />
→ jederzeit wieder!)</li>
<!-- <li></li> -->
</ul>
</li>
<li><h4>Gaststätte “Torgawa“</h4>
<!-- </ul>
<li></li>
</ul> -->
</li>
<li><h4>Fahrt zu Capgemini-Büro</h4>
<ul>
<li><h5>Adresse:</h5>
ul. Legnicka 48H<br />
54 ‐ 202 Wroclaw PL</li>
<li><h5>vom Hotel “Qubus“</h5>
<ul>
<li>aus dem Hotel, linksherum, <br />
Strasse entlang, nochmals linksherum, <br />
dann geradeaus bis zur ...</li>
<li>Haltestelle <b>Swidnicka</b></li>
<li>Linien 3, 10 oder 33, Richtung Zamkowa</li>
<li>Haltestelle <b>Zachodnia (…)</b></li>
<li>Strassenbahn kreuzen, um auf linke Straßenseite zu gelangen</li>
<li>Richtung Eisenbahnbrücke gehen</li>
<li>Brücke unterqueren</li>
<li>Nach Brücke ersten Weg linksabbiegen</li>
<li>der Schriftzug “Capgemini“ sollte dann <br />
am Dach eines Blocks zu sehen sein</li>
<li>mit Fahrstuhl in den 5. Stock, zur Capgemini-Rezeption</li>
<li>dort erhält man eine (zeitlich begrenzte) Eintrittskarte,<br />
diese Karte wird später von Justyna oder Michal freigeschaltet</li>
<li>Kollegen werden informiert und holen den Besucher ab</li>
<li>Büro: 3.22 (Eingang Capgemini-Bereich<br />
→ nach rechts wenden <br />
→ Gang ganz bis zum Ende <br />
→ nach links wenden <br />
→ ganz bis zum Ende des Ganges</li>
<!-- <li></li> -->
</ul></li>
<li><h5>vom Hotel “Mercure“</h5>
<ul>
<li>Die Haltestelle “Galeria Daminikanska“ ist direkt vorm Haus</li>
<li>Linien 3, 10 oder 33, Richtung Zamkowa</li>
<!-- <li></li> -->
</ul></li>
<li><h5>zum Busbahnhof / Hauptbhf</h5></li>
<ul>
<li>mit der Linie 31 (Richtung “Gaj“)</li>
</ul></li>
<!-- <li></li> -->
</ul>
</html>
<html>
<ul>
<li>Download File: <a href="https://www.apachefriends.org/xampp-files/7.4.1/xampp-linux-x64-7.4.1-0-installer.run" target=_blank>xampp-linux-x64-7.4.1-0-installer.run</a></li>
<li>Installationsverzeichnis: /opt/lampp</li>
<li><b>Help-Page:</b>
<code><pre>
mueller@Debian-Laptop:/opt/lampp$ ./xampp --help
Usage: xampp <action>
start Start XAMPP (Apache, MySQL and eventually others)
startapache Start only Apache
startmysql Start only MySQL
startftp Start only ProFTPD
stop Stop XAMPP (Apache, MySQL and eventually others)
stopapache Stop only Apache
stopmysql Stop only MySQL
stopftp Stop only ProFTPD
reload Reload XAMPP (Apache, MySQL and eventually others)
reloadapache Reload only Apache
reloadmysql Reload only MySQL
reloadftp Reload only ProFTPD
restart Stop and start XAMPP
security Check XAMPP's security
enablessl Enable SSL support for Apache
disablessl Disable SSL support for Apache
backup Make backup file of your XAMPP config, log and data files
oci8 Enable the oci8 extenssion
panel Starts graphical XAMPP control panel
status Shows status information in short form
mueller@Debian-Laptop:/opt/lampp$ </pre></code>
</li>
</ul>
<h3>Links:</h3>
<a href="https://www.apachefriends.org/de/index.html" target=_blank>Apache Friends :: Homepage</a>
</html>
<html>
<ul>
<li>Im XML-File sind nur die Daten.</li>
<br />
<li>Um diese Daten auf eine bestimmte Art & Weise (im Browser, als PDF) <br />
darzustellen, muss ein XSLT-File (Stylesheet) vorhanden sein, was die Dar‐<br />
stellung definiert</li>
<br />
<li>Um auf einzelne Info-Einheiten zuzugreifen, muss <b>XPath</b> <br />
verwendet werden (z.B. um Beträge zu berechnen, Anzahl addieren)</li>
<br />
<li> ein XML-Dokument hat zu sein:
<ul>
<li> valide (Hinweis: DTD -> "d" in valide)</li>
<li> wohlgeformt (well-formed)</li>
</ul></li>
<br />
<li><h3>Validierung:</h3>
Überprüfung, ob das Dokument einer vorgegebenen Struktur entspricht.<br />
→ dies geschieht mittels einer DTD (“Document Type Definition“)</li>
<br />
<li><h3>Wohlgeformtheit:</h3>
<ul>
<li>ist die Mindestvoraussetzung zur Weiterverarbeitung von XML-Dokumenten;</li>
<br />
<li>Wenn die Syntaxregeln und Wohlgeformtheitsbeschränkungen der XML-<br />
Spezifikation erfüllt werden<br />
<br />
→ dies geschieht mit XML-Parsern (z.B. xerxes,<br />
libXML, XML-Parser/perl, PyXML/Python, oder<br />
mit Hilfe eines Browsers)</li>
<br />
<li>die Wohlgeformtheit umfasst mehr als 100 Regeln, wobei die <br />
wichtigsten Regeln wie folgt sind:
<ol>
<li>jeder Start-Tag muss einen entsprechenden Ende-Tag haben</li>
<br />
<li>XML unterscheidet zwischen Gross- und Kleinschreibung (case-sensitiv)</li>
<br />
<li>auch leere Elemente müssen explizit geschlossen werden. <br />
<br />
Statt <code><pre><element></element></pre></code>
kann auch die Kurzform <br />
<code><pre><element/></pre></code>
verwendet werden. Die Kurzform ist vorzuziehen.</li>
<br />
<li>Elemente dürfen verschachtelt sein, sich aber nicht überlappen.</li>
<br />
<li>ein XML-Dokument muss genau ein Wurzelelement besitzen, das <br />
alle anderen Elemente vollständig enthält.</li>
<br />
<li>Attributwerte müssen immer in Anführungszeichen (doppelte oder einfache) stehen</li>
<br />
<li>ein Element darf <b><u>nicht</u></b> zwei Attribute mit dem gleichen Namen besitzen</li>
<br />
<li>Kommentare und Verarbeitungsanweisungen dürfen <b><u>nicht</u></b> in Tags auftreten</li>
<br />
<li>Kommentare dürfen <b><u>nicht</u></b> verschachtelt werden</li>
<br />
<li>es gilt, dass die aus zwei Bindestrichen bestehende Zeichenkette (“‐‐“) <br />
<b><u>nicht</u></b> innerhalb eines Kommentars vorkommen darf</li>
</ol>
<br />
<b>Quelle:</b><br />
Margit Becher : XML, Kap. 2.4, "Wohlgeformtes XML</li>
<br />
<h3>Layout-Beschreibungen:</h3>
i.d.R. werden bei XML-Dokumenten “nur“ die Baum‐<br />
struktur z.B. bei einem Browser ausgegeben.
Mit Hilfe folgender Mittel ist es möglich, den<br />
XML-Dokumenten ein Layout zu "verpassen":
(a) CSS :: "Cascading Style Sheets"
ermöglicht eine einfache Präsentation
(b) XSLT :: "eXtensible Stylesheet Language Transformation"
macht Transformationen von XML-Dokumenten
in andere (XML-)Dokumente möglich
<h3>Abkürzungen:</h3>
<ol>
<li> * DTD :: "Document Type Definition"
eine ältere Möglichkeit, eine Struktur-
definition für Dokumente anzugeben</li>
<br />
<li> * XPath :: eine Art Hilfssprache, die von XSLT und XQuery
für die Adressierung und den Zu-
griff auf Strukturbestandteile eines
XML-Dokumentes verwendet werden</li>
<br />
<li> * XQuery :: wie XPath, um Anfragen an XML-Dokumenten
zu erstellen</li>
<br />
<li> * XSL-FO :: "FO" := "Formating Objects"
XML-basierte Formatierungssprache;
ermöglicht die Transformation von XML-
Dokumenten in das PDF-Format</li>
<br />
<li> * SAX :: "Simple API for XML"
ereignisbasierte Programmierschnittstelle;
Zugriff auf ein XML-Dokument</li>
<br />
<li> * DOM :: "Document Object Model"
baumbasierte Programmierschnittstelle
Zugriff & Manipulation von XML-Dokumenten</li>
</ol>
<h3>Aufbau eines XML-Dokuments:</h3>
<h3>XML-Elemente:</h3>
<h3>XML-Attribute:</h3>
</h3>Kommentare:</h3>
→ <!‐‐ ... ‐‐>
<h3>Vordefinierte Zeichenreferenzen</h3>
<table>
<tr><th>Zeichenreferenz </th><th> Erläuterung</th></tr>
<tr><td><center>< </center></td><td><center>&lt; </center></td><td>Kleiner als (less than)</td></tr>
<tr><td><center>> </center></td><td><center>&gt; </center></td><td>Grösser als (greater than)</td></tr>
<tr><td><center>" </center></td><td><center>&quot; </center></td><td>Doppeltes Anführungszeichen (quotation mark)</td></tr>
<tr><td><center>' </center></td><td><center>&apos; </center></td><td>Einfaches Anführungszeichen (<s>apostrophe</s>)</td></tr>
<tr><td><center>& </center></td><td><center>&amp; </center></td><td>Kaufmännisches Und (ampersand)</td></tr>
</table>
<h3>CDATA-Abschnitte:</h3>
<br />
<b>Quellen:</b><br />
<ul>
<li> Buch: Margit Becher : XML</li>
<li> <a href="https://www.teialehrbuch.de/Kostenlose-Kurse/XML/7661-Vorwort.html" target=_blank>Teia-Lehrbuch :: XML</a></li>
<li> <a href="https://www.teialehrbuch.de/Kostenlose-Kurse/XML-Grundlagen/index.html" target=_blank>Teia-Lehrbuch :: XML-Grundlagen</a></li>
<li> <a href="https://www.teialehrbuch.de/Kostenlose-Kurse/XML-XSL/" target=_blank>Teia-Lehrbuch :: XML-XSL</a></li>
</ul>
</html>
<html>
Kommentare in XML-Dateien wird markiert mittels:<br />
<br />
<code>
<!-- ... Kommentar ... -->
</code>
</html>
<html>
<ul>
<li>XPath definiert eine Syntax, mit der durch ein XML-Dokument navigiert werden kann.
</li>
<li>XPath ist nicht direkt anwendbar, sondern dient als Grundlage für weitere Anwendungen.<br />
Zwei Anwendungen, die auf XPath aufbauen, sind XPointer und XSLT.
</li>
<li>drei Grundbegriffe sind wichtig/notwendig:
<ul>
<li><b>Achse</b><br />
<em>In welcher Richtung im Baum bewege<br />
ich mich?
</em>
</li>
<li><b>Knoten</b><br />
<em>Nach welchem Knoten suche ich?
</em>
</li>
<li><b>Prädikate</b><br />
<em>Welche Bedingungen sollen die <br />
Knoten erfüllen?
</em>
</li>
</ul>
</li>
<li><b>Beispiele</b><br />
<table>
<tr>
<td>/</td><td>der Wurzelknoten</td>
</tr>
<tr>
<td>autor</td><td>die Kindelemente namens autor</td>
</tr>
<tr>
<td>*</td><td>alle Kindelemente</td>
</tr>
<tr>
<td>@isbn</td><td>das Attribut namens isbn</td>
</tr>
<tr>
<td>text()</td><td>alle Textknoten, die Kinder des aktuellen Knotens sind</td>
</tr>
<tr>
<td>.</td><td>(Punkt) der aktuelle Knoten selbst</td>
</tr>
</table>
</html>
<html>
• "achse" gibt dabei das Verhältnis der gewünschten Knoten zum
Kontextknoten an<br />
• dh. es wird die Frage "In welcher Richtung im Baum bewege ich mich?"
beantwortet<br />
• Achsen werden über ihre Bezeichnung, gefolgt von "::"
angesprochen.<br />
<table border line = 1>
<tr>
<td>child</td><td>Alle direkten Nachkommen des Knotens, aber keine
Attribute.</td></tr>
<tr>
<td>descendant</td><td>Alle Nachkommen des Knotens, aber keine
Attribute.</td></tr>
<tr>
<td>descendant-or-self</td><td>Alle Nachkommen des Knotens, inklusive er selbst,
aber keine Attribute.</td></tr>
<tr>
<td>attribute</td><td>Alle Attribute
(außer Namespaces), die direkte
Nachkommen des Knotens sind.</td></tr>
<tr>
<td>namespace</td><td>Alle Namespace-Attribute, die direkte Nachkommen des
Knotens sind.</td></tr>
<tr>
<td>parent</td><td>Den Vater des aktuellen Knotens.</td></tr>
<tr>
<td>ancestor</td><td>Alle
Väter des Knotens.</td></tr>
<tr>
<td>ancestor-or-self</td><td>Alle Vorfahren des Knotens, inklusive er
selbst.</td></tr>
<tr>
<td>following-sibling</td><td>Den folgenden Bruder.</td></tr>
<tr>
<td>preceding-sibling</td><td>Den vorhergehenden Bruder.</td></tr>
<tr>
<td>following</td><td>Alle folgenden Knoten, die keine Nachkommen des Knotens
sind.</td></tr>
<tr>
<td>preceding</td><td> Alle vorhergehenden Knoten, die keine Nachkommen des
Knotens sind.</td></tr>
<tr>
<td>self</td><td>Der aktuelle Knoten.</td></tr>
</table>
(Link:<br />
http://www.fh-wedel.de/~si/seminare/ws00/Ausarbeitung/3.xlink/xlink5.htm; <br />
http://www.akkk.de/xml/xslt2/xslt.html)<br />
</html>
<html>
Die Präambel eines XSLT-Stylesheets lautet:<br />
<code>
<pre>
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
</pre>
</code>
Oder alternativ:
<code>
<pre>
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
</pre>
</code>
</html>
<html>
• <b>xalan</b><br />
ein in Java geschriebener XSLT-Prozessor;<br />
ist auf Solaris-Rechner verfügbar;<br />
Aufruf:<br />
<code> <pre>
java org.apache.xalan.xslt.Process
-in XML-Quelle
-xsl XSLT-Stylesheet
[-out Aufgabedatei]
</pre></code>
Beispiel:
<code> <pre>
REM Syntax:
REM für den CommandLine-Prozessor XSLTC ist der Aufruf:
REM C:\ProgramData\Oracle\Java\javapath\java org.apache.xalan.xslt.Process \
REM -IN foo.xml \
REM -XSL foo.xsl \
REM -OUT foo.out
set CLASSPATH=%CLASSPATH%;E:\XSLT\xalan\xalan-j_2_7_2\xalan.jar;C:\ProgramData\Oracle\Java\javapath
java org.apache.xalan.xslt.Process -IN ..\Files\brief.xml -XSL ..\Files\brief.xsl -OUT ..\Files\brief.html
cmd
</pre></code>
-----------------------------------------------------------<br />
In der Classpath-Variable muss/müssen die benötigten jar-<br />
Files ex presses verbis angegeben werden:<br />
<code><pre>
set CLASSPATH=%CLASSPATH%;E:\XSLT\xalan\xalan-j_2_7_2\xalan.jar;C:\ProgramData\Oracle\Java\javapath
</pre></code>
die Funktion org.apache.xalan.xslt.Process befindet sich<br />
im jar-File xalan.jar, daher muss dieses jar-File im Class-<br />
path angegeben werden.<br />
<br />
Falls das jar-File nicht gefunden wird, kommt eine Fehlermeldung der Art:<br />
<code><pre>
Error: Could not find or load main class org.apache.xalan.xslt.Process
</pre/></code>
<br />
</html>
<html>
<ul>
<li>command line XSLT processor;</li><br />
<li>ohne Angabe der Outputfiles wird das Ergebnis der Transformation <br />
auf der Standardausgabe ausgegeben;</li><br />
<li>Aufruf:
<code><pre>
xsltproc [options] stylesheet file [file ...]
</pre></code>
z.B.<code> <i>shell></i> xsltproc transform.xsl data.xml > output.txt </code><br /><br />
oder <code> <i>shell></i> xsltproc -o output.txt transform.xsl data.xml </code></li></li>
<br />
<table border="1">
<tr><th>Options</th><th></th></tr>
<tr><td>
--version or -V </td><td> show the version of libxml and libxslt used
</td></tr><tr><td>
--verbose or -v</td><td> show logs of what's happening;<br />
Output each step taken by xsltproc in processing the <br />
stylesheet and the document. <br />
Die Ausgabe landet auf der STDERR-Ausgabe, so dass die<br />
sie mittels <code>"2>trace.txt"</code> in ein File umgeleitet werden kann.<br />
</td></tr><tr><td>
--output file <br /> or -o file</td><td> Direct output to the file named file. <br />
For multiple outputs also known as "chunking", <br />
-o directory/ directs the output files to a specified directory. <br />
The directory must already exist.
</td></tr><tr><td>
--timing</td><td> display the time used
</td></tr><tr><td>
--repeat</td><td> run the transformation 20 times
</td></tr><tr><td>
--debug</td><td> dump the tree of the result instead;<br />
Output an XML tree of the transformed document for <br />
debugging purposes. (ohne -o-Option)<br />
</td></tr><tr><td>
--novalid</td><td> skip the DTD loading phase
</td></tr><tr><td>
--noout</td><td> do not dump the result
</td></tr><tr><td>
--maxdepth <i>val</i> </td><td> increase the maximum depth
</td></tr><tr><td>
--html</td><td> the input document is(are) an HTML file(s)
</td></tr><tr><td>
--docbook</td><td> the input document is SGML docbook
</td></tr><tr><td>
--param <i>name value</i><br />
--stringparam <i>name "string"</i></td><td> pass a (parameter,value) <br /> resp. a (parameter, string) pair
</td></tr><tr><td>
--nonet </td><td>refuse to fetch DTDs or entities over network
</td></tr><tr><td>
--warnnet </td><td>warn against fetching over the network
</td></tr><tr><td>
--catalogs </td><td> use the catalogs from $SGML_CATALOG_FILES
</td></tr><tr><td>
--xinclude </td><td> do XInclude processing on document input
</td></tr><tr><td>
--profile or --norman </td><td> dump profiling information
</td></tr>
</table><br />
weitere Anweisungen: <br />
<br />
<code><pre> <b><!-- removing un-necessary nodes like space, type, and other characters --></b>
<xsl:template match="text()[not(string-length(normalize-space()))]" />
</pre></code><br />
<code><pre>
<b><!-- einfaches Umkopieren --></b>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*" />
<xsl:apply-templates />
</xsl:copy>
</xsl:template>
</pre></code>
Links:<br />
<a href="http://fhoerni.free.fr/comp/xslt.html">http://fhoerni.free.fr/comp/xslt.html<br />
</html>
<html>
<ul>
<li>Bei der Übergabe von Parametern (Strings oder Zahlen) <br />
ist der folgende Aufruf für xsltproc zu verwenden: <br /><br />
<code>
xsltproc -o ${outputFileName} <b>--stringparam ownGlobalID “ '${newGlobalID}' “ </b> ${xsltFile} ${inputFileName}
</code><br /><br />
d.h. der Variablen ownGlobalID wird der Wert ${newGlobalID} (im Rahmen einer Schleife) zugewiesen
</ul>
<code><pre>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- enrich MxML for MIFID2-EMIR
add entry for "tradeGlobalId" to the trade, for identifying the trades in the target sytem-->
<xsl:strip-space elements="*" />
<b> <!-- Definition der Variablen, die mitgegeben werden kann
(mit vordefiniertem Wert) -->
<xsl:param name="ownGlobalID" select="'no_jacket_required'" /></b>
[...]
<!-- change entry "tradeGlobalId" --> # der Eintrag im Knoten "tradeGlobalId" wird ersetzt
<xsl:template match="tradeGlobalId">
<xsl:element name="tradeGlobalId">
<xsl:value-of select="$ownGlobalID"/> # hier wird der variable Parameter ownGlobalID verwendet
</xsl:element>
</xsl:template>
[...]
</pre></code>
</html>
<html>
<ul>
<li>XSLT is a style sheet that transforms XML into<br />
a new structure for use with various Internet parsers.<br /></li>
<br />
<li>Das XSL-File definiert einige (oder auch mehrere) Regeln, <br />
die bei Bedarf angewendet werden</li>
<br />
<li>Diese Regeln haben ein Start- & ein Ende-Label:<br />
z.B. <code><xsl:template ... ><br /> ... <br /> </xsl:template></code></li>
<br />
<li>Manche (eher viele) haben Start- & Ende-Label in einer Zeile:<br />
z.B. <code><xsl:value-of select="title" /></code><br />
# damit werden Leerzeilen markiert</li>
<br />
<li>allen gemeinsam ist das Präfix "xsl"</li>
<br />
<li>Die Reihenfolge der Regeln im xsl-File spielt keine Rolle</li>
<br />
<li>Das Input- resp. das XML-File wird <u>sequentiell</u> gelesen:<br />
Für jede gefundene Zeile/Abschnitt im XML-File sucht der XSLT-<br />
Prozessor im XSL-File nach, ob es für den gefundenen String eine <br />
Regel gibt<br />
→ Falls ja, dann wird die Regel auf die Daten angewandt, verädert<br />
und dann in den Output resp. das Output-File geschrieben</li>
<br />
<li>Eine XSL-Regel wird mit <br />
<code><xsl:template match="<i>VALUE</i>" </code><br />
eingeleitet<br />
→ die dann folgenden Befehle werden auf die Daten angewandt,<br />
die von <code> <VALUE> ... </VALUE></code> <br />
bzw: <code> <VALUE /> </code> eingegrenzt sind.</li>
</ul>
</html>
<html>
<h3>Einfügen des Knoten-Baums an das Ende des aktuell vorhandenen XML-Baumes: </h3>
<code><pre>
<!-- insert the node "trades" with sub-nodes-->
<xsl:template match="MxML">
<xsl:copy>
<xsl:apply-templates select="@*" />
<xsl:apply-templates />
<xsl:element name="trades">
<xsl:element name="trade">
<xsl:element name="tradeHeader">
<xsl:element name="tradeUserDefinedFields">
<xsl:element name="userDefinedFields">
<xsl:element name="fieldLabel">
<xsl:text>REP2MIFIR</xsl:text>
</xsl:element>
<xsl:element name="fieldValue">
<xsl:text>Yes</xsl:text>
</xsl:element>
<xsl:element name="fieldType">
<xsl:text>character</xsl:text>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:copy>
</xsl:template>
</pre></code>
</html>
<html>
<ul>
<li>kopiert einen Teilbaum</li>
<br />
<li>Problematisch ist, dass die Daten resp. Elemente <b>nicht</b><br />
bearbeitet werden können</li>
</ul>
Link:<br />
http://wiki.selfhtml.org/wiki/XML/XSL/XSLT/Sprachelemente
</html>
<html>
<ul>
<li>erstellt ein neues Element im Zieldokument;</li>
<br />
<li><b>Syntax</b><br />
<code><pre>
<xsl:element name="neuer Knotenname">
…
</xsl:element>
</pre></code></li>
<br />
<li>zwischen dem Start- und Ende-Tag können definiert werden:
<ol>
<li>Attribute, <code><pre><xsl:attribute></pre></code></li>
<li>Texte, <code><pre><xsl:text></pre></code></li>
<li>Werte, <code><pre><xsl:value-of select=“XPATH-Angabe“></pre></code></li>
</ol></li>
<br />
</ul>
</html>
<html>
<ul>
<li>Meldung beim Transformieren ausgeben</li>
<br />
<li>Gibt während der Transformation der Daten eine Meldung aus. <br />
Wird üblicherweise zur Fehlerbehandlung innerhalb einer Bedingung<br />
benutzt. </li>
<br />
<li><b>Attribute: </b><br />
terminate: (optional) <br />
gibt mit yes oder no (Voreinstellung) an, ob der Trans-<br />
formationsvorgang abgebrochen werden soll. <br />
<br />
Kann innerhalb von xsl:template vorkommen</li>
<br />
<li><h5>Beispiel:</h5>
<pre><code>
<xsl:template match="lottozahl">
<xsl:variable name="aktuellerwert" select="."/>
<xsl:if test="$aktuellerwert > 49">
<b><xsl:message terminate="yes"></b>
<xsl:text>Die Zahl (</xsl:text>
<xsl:value-of select="." />
<xsl:text>) ist zu gross!</xsl:text>
<b></xsl:message></b>
</xsl:if>
<xsl:value-of select="." />
</xsl:template>
</code></pre>
</ul>
</html>
<html>
<ul>
<li>Erzeugt statischen Text im Ergebnisbaum, z.B. wenn<br />
man ein Komma oder einen Zeilenumbruch, der im Quell-<br />
baum <b>nicht</b> vorhanden ist, in den Zielbaum hinzu-<br />
fügen will.</li>
<br />
<li><b>Attribute:</b><br />
<b>disable-output-escaping:</b> (optional) <br />
bestimmt, wie XML-eigene Zeichen wie < oder > behandelt werden. <br />
Mögliche Werte sind yes und no (Voreinstellung). <br />
Bei „yes“ werden solche Zeichen nicht in ihre benannten Namen <br />
umgewandelt, bei „no“ werden sie umgewandelt.</li>
<br />
<li>Kann innerhalb von xsl:template vorkommen.</li>
</ul>
<br />
Link:<br />
http://wiki.selfhtml.org/wiki/XML/XSL/XSLT/Sprachelemente<br />
</html>
<html>
<ul>
<li>eine Variable in XSLT ist nicht änderbar. </li>
</ul>
</html>
<html>
<table broder="1">
<tr><th>Element</th><th>Aktion</th></tr>
<tr><td>xsl:apply-imports</td><td>importierte Stylesheets anwenden</td></tr>
<tr><td>xsl:apply-templates</td><td>untergeordnete Schablonen anwenden</td></tr>
<tr><td>xsl:attribute</td><td>Attribut im Erbebnisbaum erzeugen</td></tr>
<tr><td>xsl:attribute-set</td><td>Mehrere Attribute im Erbebnisbaum erzeugen</td></tr>
<tr><td>xsl:call-template</td><td>Schablone aufrufen</td></tr>
<tr><td>xsl:choose</td><td>Auswahl treffen</td></tr>
<tr><td>xsl:comment</td><td>Kommentar setzen</td></tr>
<tr><td>xsl:copy</td><td>Element in Ergebnisbaum kopieren</td></tr>
<tr><td>xsl:copy-of</td><td>Beliebige ermittelte Daten in Ergebnisbaum kopieren</td></tr>
<tr><td>xsl:decimal-format</td><td>Dezimalformat</td></tr>
<tr><td>xsl:element</td><td>Element erzeugen</td></tr>
<tr><td>xsl:fallback</td><td>alternative Ausführungsanweisung</td></tr>
<tr><td>xsl:for-each</td><td>für jedes Element aus einer Menge wiederholen</td></tr>
<tr><td>xsl:if</td><td>wenn-Bedinungung</td></tr>
<tr><td>xsl:import</td><td>Stylesheets importieren</td></tr>
<tr><td>xsl:key</td><td>Schlüssel für Auswahl von Elementen</td></tr>
<tr><td>xsl:message</td><td>Meldung beim Transformieren ausgeben</td></tr>
<tr><td>xsl:namespace-alias</td><td>Stylesheet in anderes Stylesheet transformieren</td></tr>
<tr><td>xsl:number</td><td>fortlaufende Nummerierung</td></tr>
<tr><td>xsl:otherwise</td><td>andernfalls-Anweisung</td></tr>
<tr><td>xsl:output</td><td>Erzeugen des Ergebnisbaums kontrollieren</td></tr>
<tr><td>xsl:param</td><td>Parameter definieren</td></tr>
<tr><td>xsl:preserve-space</td><td>Leerraumzeichen beibehalten</td></tr>
<tr><td>xsl:processing-instruction</td><td>Stylesheet-Code generieren</td></tr>
<tr><td>xsl:sort</td><td>Elemente nach Inhalt sortieren</td></tr>
<tr><td>xsl:strip-space</td><td>Behandlung von Leerraumzeichen steuern</td></tr>
<tr><td>xsl:stylesheet</td><td>Stylesheet-Wurzelelement</td></tr>
<tr><td>xsl:template</td><td>Schablone für Ergebnisbaum definieren</td></tr>
<tr><td>xsl:text</td><td>Zeicheninhalt ausgeben</td></tr>
<tr><td>xsl:transform</td><td>Stylesheet-Wurzelelement</td></tr>
<tr><td>xsl:value-of</td><td>Wert ausgeben</td></tr>
<tr><td>xsl:variable</td><td>Variable definieren</td></tr>
<tr><td>xsl:when</td><td>Bedingung innerhalb einer Auswahl</td></tr>
<tr><td>xsl:with-param</td><td>Parameter einen Wert zuweisen</td></tr>
</table>
<br />
Link:<br />
https://www2.informatik.hu-berlin.de/Themen/www/selfhtml/xml/darstellung/xsltelemente.htm<br />
</html>
<html>
<ul>
<li>Aufruf von <b>dbg:trace</b> mit dem Attribute <em>use‐when</em> kann ein- und<br />
ausgeschaltet werden, sofern der Prozessor das Testen von <br />
Systemeigenschaften unterstützt.</li>
<br />
<li>Der namespace in der Stylesheet-Definition muss um folgenden<br />
Eintrag erweitert werden:<br />
<br /><code>
xmlns:dbg="http://www.ora.com/XSLTCookbook/ns/debug"<br />
</code><br />
u.U. muss danach folgende Zeile vorkommen:<br />
<br /><code>
<xsl:include href="xtrace.xslt"/>
</code><br />
</li>
<br />
<li> Mit der Zeile<br />
<br /><code>
<xsl:call-template name="dbg:trace"/><br />
</code><br />
wird das Tracing/Debugging eingeschaltet.</li>
<br />
<li>Zu beachten ist, dass der Trace beim Bearbeiten des aktuellen Knotens <br />
und nicht als erste Anweisung jedes Templates ausgeführt wird.<br />
<br />
!! Nur dann, wenn der XSLT-Prozessor das Testen von System-<br />
!! eigenschaften unterstützt.</li>
<br />
<li>Der XSLT-Prozessor <b>Saxon</b> unterstützt u.a. folgende Tracing-Optionen:<br />
<br />
-T3, -TLclassname, -TP<br />
</li><br />
<li>Der XSLT-Prozessor <b>xsltproc</b> unterstützt folgende Tracing-Optionen:<br />
<br />
-v / --verbose, --debug <br />
</li>
<br />
<li>Ob ein XSLT-Prozessor (weitere) Tracing-Optionen bereitstellt, hängt vom <br />
jeweiligen XSLT-Prozessor ab.</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.data2type.de/xml-xslt-xslfo/xslt/xslt-kochbuch/testen-und-fehler-suchen/stylesheet-fluss-durch-eingabe//" target="_blank" rel="noreferrer noopener">Data2Type :: XSLT‐Kochbuch ‐ Testen & Fehler suchen : Stylesheet‐Fluss durch sein Eingabedokument mitverfolgen</a></li>
</ul>
</html>
<html>
To open a file in a new xterm session, just say:
<code><pre>
% xvi file.c
</pre></code>
When the following alias is set:
<code><pre>
alias xvi 'xterm -fn Courier7 -geom 132x56 -sb -sl 2048 -bg wheat -fg black -cr red -T "!*" -e vi !* &'
</pre></code>
This tip generously supported <br />
by: wizkdbec@mailcity.com
</html>
<html>
<ul>
<li>lt. Wikipedia ist YAML (Yet Another Markup Language) eine Ober‐<br />
Menge von JSON;</li>
</ul>
<h3>YAML Rules</h3>
<ul>
<li>Applicable YAML files: all files with a <b><em>.yml</em></b> extension.<br />
Essentials uses a config.yml file. </li>
<li>daten‐orientiert</li>
<li>Use <b>ONLY</b> spaces, tabs are <b>NOT</b> allowed,.</li>
<li>You <b>MUST</b> indent your properties and lists with 1 or more spaces.<br />
And there <b>MUST</b> be a space between elements.</li>
<li>All keys/properties are case-sensitive. ("ThIs", is not the same as "thiS") </li>
<li>Jedes “Dokument“ beginnt mit “– – –“ und endet mit “…“ <br />
Beispiel: <br />
<code><pre>
– – –
Hallo Welt
…
</pre></code></li>
<li>YAML special characters [] {} : > | @ ` (die beiden letzten geplant, s.u.)</li>
</ul>
<b>cf. YAML Parser - Tiddler</b><br />
<br />
Originally YAML was said to mean <b>Yet Another Markup Language</b>, <br />
referencing its purpose as a markup language with the yet another<br />
construct, but it was then repurposed as <b>YAML Ain't Markup Language</b>, a<br />
recursive acronym, to distinguish its purpose as data-oriented, rather <br />
than document markup.
<h3>Syntax</h3>
A compact cheat sheet as well as a full specification are available at the <br />
official site (<a href="http://yaml.org/refcard.html" target="_blank">RefCard</a>). The following is a synopsis of the basic elements.<br />
<br />
The YAML language accepts the entirety of the Unicode character set, <br />
except for some of the control characters. All of the accepted characters<br />
may be used in the YAML document. The YAML document may be en‐<br />
coded in UTF-8, UTF-16 and UTF-32 (though UTF-32 is not mandatory, <br />
it is a must if the parser is to have JSON compatibility).<br />
<ol>
<li><b>Whitespace indentation</b> is used to denote structure; <br />
however tab characters are never allowed as indentation.</li>
<br />
<li><b>Comments</b> begin with the number sign (#), <br />
can start anywhere on a line and continue until the end of the line.<br />
Comments must be separated from other tokens by white space characters.<br />
If they appear inside of a string, then they are number sign (#) literals.</li>
<br />
<li><b>List members</b> are denoted by a leading hyphen (-) with one member per line, <br />
or <br />enclosed in square brackets ([ ]) and separated by comma space (, ).</li>
<br />
<li> <b>Associative arrays</b> are represented using the colon space (: ) <br />
in the form <code>key: value</code>, either one per line or enclosed in<br />
curly braces ({ }) and separated by comma space (, ).</li>
<br />
<li> An associative array key may be prefixed with a question mark (?)<br />
to allow for liberal multi-word keys to be represented unambiguously.</li>
<br />
<li> Strings (scalars) are ordinarily unquoted, but may be enclosed in <br />
double‐quotes ("), or single-quotes ('). Within double-quotes, special<br />
characters may be represented with C-style escape sequences <br />
starting with a backslash (\). According to the documentation the<br />
only octal escape supported is \0.</li>
<br />
<li> Block scalars are delimited with indentation with optional modifiers<br />
to preserve (|) or fold (>) newlines.</li>
<br />
<li> Multiple documents within a single stream are separated by three hyphens (---).<br />
Three periods (...) optionally end a document within a stream.</li>
<br />
<li> Repeated nodes are initially denoted by an ampersand (&) and<br />
thereafter referenced with an asterisk (*). (cf. see below, “anchor label“)</li>
<br />
<li> Nodes may be labeled with a type or tag using the exclamation point (!!) <br />
followed by a string, which can be expanded into a URI.</li>
<br />
<li> YAML documents in a stream may be preceded by 'directives' composed<br />
of a percent sign (%) followed by a name and space delimited parameters. <br />
Two directives are defined in YAML 1.1:
<ol>
<li> The %YAML directive is used to identify the version of YAML<br />
in a given document.</li>
<li> The %TAG directive is used as a shortcut for URI prefixes. These<br />
shortcuts may then be used in node type tags.</li>
</ol>
</ol>
YAML requires that colons and commas used as list separators be<br />
followed by a space so that scalar values containing embedded<br />
punctuation (such as 5,280 or http://www.wikipedia.org) can generally<br />
be represented without needing to be enclosed in quotes.<br />
<br />
Two additional sigil characters are reserved in YAML for possible future<br />
standardisation: the at sign (@) and accent grave (`).
<h3>Basic components</h3>
YAML offers an "in-line" style for denoting associative arrays and<br />
lists. Here is a sample of the components.
<h4>Lists / Listen</h4>
<ul>
<li><b>Conventional block format uses a hyphen+space <br />
to begin a new item in list.</b>
<code><pre>
--- # Favorite movies
- Casablanca
- North by Northwest
- The Man Who Wasn't There
</pre></code>
</li>
<li><b>Optional inline format is delimited by comma+space and <br />
enclosed in brackets (similar to JSON).</b>
<code><pre>
--- # Shopping list
[milk, pumpkin pie, eggs, juice]
</pre></code>
</li>
<li>Keys are separated from values by a colon+space. Indented blocks,<br />
common in YAML data files, use indentation and new lines to separate<br />
the key/value pairs. Inline Blocks, common in YAML data streams, use<br />
comma+space to separate the key/value pairs between braces.
<code><pre>
--- # Indented Block
name: John Smith
age: 33
--- # Inline Block
{name: John Smith, age: 33}
</pre></code>
</li>
<li>Strings do not require quotation. There are two ways to write multi-line<br />
strings, one preserving newlines (using the | character) and one that folds<br />
the newlines (using the > character), both followed by a newline character.
<code><pre>
data: |
There once was a short man from Ealing
Who got on a bus to Darjeeling
It said on the door
"Please don't spit on the floor"
So he carefully spat on the ceiling
</pre></code>
</li>
<li>By default, the leading indent (of the first line) and trailing white space<br />
is stripped, though other behavior can be explicitly specified.
<code><pre>
data: >
Wrapped text
will be folded
into a single
paragraph
Blank lines denote
paragraph breaks
</pre></code>
</li>
<li>Folded text converts newlines to spaces and removes leading whitespace.
<code><pre>
- {name: John Smith, age: 33}
- name: Mary Smith
age: 27
men: [John Smith, Bill Jones]
women:
- Mary Smith
- Susan Williams
</pre></code>
</li>
</ul>
<h3>Advanced components</h3>
Two features that distinguish YAML from the capabilities of <br />
other data serialization languages are <b>structures</b> and <b>data <br />
typing</b>.<br />
<br />
YAML structures enable storage of multiple documents within<br />
single file, usage of references for repeated nodes, and usage<br />
of arbitrary nodes as keys.<br />
<br />
For clarity, compactness, and avoiding data entry errors, <br />
YAML provides node anchors (using &) and references <br />
(using *). References to the anchor work for all data types <br />
(see the ship-to reference in the example below).<br />
<br />
Below is an example of a queue in an instrument sequencer<br />
in which two steps are reused repeatedly without being fully<br />
described each time.<br />
<code><pre>
# sequencer protocols for Laser eye surgery
---
- step: &id001 # defines anchor label &id001
instrument: Lasik 2000
pulseEnergy: 5.4
pulseDuration: 12
repetition: 1000
spotSize: 1mm
- step: &id002
instrument: Lasik 2000
pulseEnergy: 5.0
pulseDuration: 10
repetition: 500
spotSize: 2mm
- step: *id001 # refers to the first step (with anchor &id001)
- step: *id002 # refers to the second step
- step:
<<: *id001
spotSize: 2mm # redefines just this key, refers rest from &id001
- step: *id002
</pre></code>
<br />
Explicit data typing is seldom seen in the majority of YAML<br />
documents since YAML autodetects simple types. Data <br />
types can be divided into three categories:
<ol>
<li>core,</li>
<li>defined,</li>
<li>user-defined</li>
</ol>
<br />
<u>Core</u> are ones expected to exist in any<br />
parser (e.g. floats, ints, strings, lists, maps, ...). Many more<br />
advanced data types, such as binary data, are defined in the<br />
YAML specification but not supported in all implementations.<br />
Finally YAML defines a way to extend the data type definitions<br />
locally to accommodate user-defined classes, structures or <br />
primitives (e.g. quad-precision floats).<br />
<br />
YAML autodetects the datatype of the entity. Sometimes one<br />
wants to cast the datatype explicitly. The most common situation<br />
is where a single-word string that looks like a number, boolean <br />
or tag requires disambiguation by surrounding it with quotes or<br />
using an explicit datatype tag.<br />
<code><pre>
---
a: 123 # an integer
b: "123" # a string, disambiguated by quotes
c: 123.0 # a float
d: !!float 123 # also a float via explicit data type prefixed by (!!)
e: !!str 123 # a string, disambiguated by explicit type
f: !!str Yes # a string via explicit type
g: Yes # a boolean True (yaml1.1), string "Yes" (yaml1.2)
h: Yes we have No bananas # a string, "Yes" and "No" disambiguated by context.
</pre></code>
<br />
Not every implementation of YAML has every specification-defined<br />
data type. These built-in types use a double exclamation sigil prefix (!!).<br />
Particularly interesting ones not shown here are sets, ordered maps,<br />
timestamps, and hexadecimal. Here's an example of base64 encoded<br />
binary data.
<code><pre>
---
picture: !!binary |
R0lGODdhDQAIAIAAAAAAANn
Z2SwAAAAADQAIAAACF4SDGQ
ar3xxbJ9p0qa7R0YxwzaFME
1IAADs=
</pre></code>
Many implementations of YAML can support user-defined data types<br />
for object serialization. Local data types are not universal data types<br />
but are defined in the application using the YAML parser library. Local<br />
data types use a single exclamation mark (!).
<code><pre>
---
myObject: !myClass { name: Joe, age: 15 }
</pre></code>
<h3>Example</h3>
Data structure hierarchy is maintained by outline indentation.
<code><pre>
---
receipt: Oz-Ware Purchase Invoice
date: 2012-08-06
customer:
first_name: Dorothy
family_name: Gale
items:
- part_no: A4786
descrip: Water Bucket (Filled)
price: 1.47
quantity: 4
- part_no: E1628
descrip: High Heeled "Ruby" Slippers
size: 8
price: 133.7
quantity: 1
bill-to: &id001
street: |
123 Tornado Alley
Suite 16
city: East Centerville
state: KS
ship-to: *id001
specialDelivery: >
Follow the Yellow Brick
Road to the Emerald City.
Pay no attention to the
man behind the curtain.
...
</pre></code>
Notice that strings do not require enclosure in quotations. The specific<br />
number of spaces in the indentation is unimportant as long as parallel<br />
elements have the same left justification and the hierarchically nested<br />
elements are indented further. This sample document defines an asso‐<br />
ciative array with 7 top level keys: one of the keys, "items", contains a<br />
2-element list, each element of which is itself an associative array with<br />
differing keys.<br />
<br />
Relational data and redundancy removal are displayed:<br />
the "ship-to" associative array content is copied from the "bill-to" asso‐<br />
ciative array's content as indicated by the anchor (&) and reference (*)<br />
labels. Optional blank lines can be added for readability. Multiple docu‐<br />
ments can exist in a single file/stream and are separated by ---. An<br />
optional ... can be used at the end of a file (useful for signaling an end<br />
in streamed communications without closing the pipe).
<h3>Features</h3>
<ul>
<li><h4>Indented delimiting</h4>
Because YAML primarily relies on outline indentation for structure, it is<br />
especially resistant to delimiter collision. YAML's insensitivity to quotes<br />
and braces in scalar values means one may embed XML, JSON or even<br />
YAML documents inside a YAML document by simply indenting it in a<br />
block literal (using | or >):
<code><pre>
---
example: >
HTML goes into YAML without modification
message: |
<blockquote style="font: italic 12pt Times">
<p>"Three is always greater than two,
even for large values of two"</p>
<p>--Author Unknown</p>
</blockquote>
date: 2007-06-01
</pre></code>
YAML may be placed in JSON by quoting and escaping all interior quotes.<br />
<br />
YAML may be placed in XML by escaping reserved characters (lt;, >, &, ', ")<br />
and converting whitespace, or by placing it in a CDATA section.</li>
<li><h4>Non-hierarchical data models</h4>
Unlike JSON, which can only represent data in a hierarchical model with each child node having a single parent, YAML also offers a simple relational scheme that allows repeats of identical data to be referenced from two or more points in the tree rather than entered redundantly at those points. This is similar to the facility IDREF built into XML.[16] The YAML parser then expands these references into the fully populated data structures they imply when read in, so whatever program is using the parser does not have to be aware of a relational encoding model, unlike XML processors, which do not expand references. This expansion can enhance readability while reducing data entry errors in configuration files or processing protocols where many parameters remain the same in a sequential series of records while only a few vary. An example being that "ship-to" and "bill-to" records in an invoice are nearly always the same data.</li>
<li><h4>Practical considerations</h4>
YAML is line-oriented and thus it is often simple to convert the unstructured output of existing programs into YAML format while having them retain much of the look of the original document. Because there are no closing tags, braces, or quotation marks to balance, it is generally easy to generate well-formed YAML directly from distributed print statements within unsophisticated programs. Likewise, the whitespace delimiters facilitate quick-and-dirty filtering of YAML files using the line-oriented commands in grep, awk, perl, ruby, and python.<br />
<br />
In particular, unlike markup languages, chunks of consecutive YAML lines tend to be well-formed YAML documents themselves. This makes it very easy to write parsers that do not have to process a document in its entirety (e.g. balancing opening and closing tags and navigating quoted and escaped characters) before they begin extracting specific records within. This property is particularly expedient when iterating in a single, stateless pass, over records in a file whose entire data structure is too large to hold in memory, or for which reconstituting the entire structure to extract one item would be prohibitively expensive.<br />
<br />
Counterintuitively, although its indented delimiting might seem to complicate deeply nested hierarchies, YAML handles indents as small as a single space, and this may achieve better compression than markup languages. Additionally, extremely deep indentation can be avoided entirely by either: 1) reverting to "inline style" (i.e. JSON-like format) without the indentation; or 2) using relational anchors to unwind the hierarchy to a flat form that the YAML parser will transparently reconstitute into the full data structure.</li>
<li><h4>Security</h4>
YAML is purely a data representation language and thus has no executable commands.[17] While validation and safe parsing is inherently possible in any data language, implementation is such a notorious pitfall that YAML's lack of an associated command language may be a relative security benefit.<br />
<br />
However, YAML allows language-specific tags so that arbitrary local objects can be created by a parser that supports those tags. Any YAML parser that allows sophisticated object instantiation to be executed opens the potential for an injection attack. Perl parsers that allow loading of objects of arbitrary class create so-called "blessed" values. Using these values may trigger unexpected behavior, e.g. if the class uses overloaded operators. This may lead to execution of arbitrary Perl code.<br />
<br />
The situation is similar for Python parsers. According to the PyYAML documentation:
<br />
Note that the ability to construct an arbitrary Python object may be dangerous if you receive a YAML document from an untrusted source such as the Internet. The function yaml.safe_load limits this ability to simple Python objects like integers or lists.</li>
<li><h4>Data processing and representation</h4>
The YAML specification identifies an instance document as a "Presentation" or "character stream". The primary logical structures in a YAML instance document are scalar, sequence, and mapping. The YAML specification also indicates some basic constraints that apply to these primary logical structures. For example, according to the specification, mapping keys do not have an order. In every case where node order is significant, a sequence must be used.<br />
<br />
Moreover, in defining conformance for YAML processors, the YAML specification defines two primary operations: dump and load. All YAML-compliant processors must provide at least one of these operations, and may optionally provide both. Finally, the YAML specification defines an information model or "representation graph", which must be created during processing for both dump and load operations, although this representation need not be made available to the user through an API.</li>
</ul>
<h3>Comparison with JSON</h3>
JSON syntax is a basis of YAML version 1.2, which was promulgated with the express purpose of bringing YAML "into compliance with JSON as an official subset".[24] Though prior versions of YAML were not strictly compatible, the discrepancies were rarely noticeable, and most JSON documents can be parsed by some YAML parsers such as Syck. This is because JSON's semantic structure is equivalent to the optional "inline-style" of writing YAML. While extended hierarchies can be written in inline-style like JSON, this is not a recommended YAML style except when it aids clarity.<br />
<br />
YAML has many additional features lacking in JSON, including comments, extensible data types, relational anchors, strings without quotation marks, and mapping types preserving key order.
<h3>Comparison with XML</h3>
YAML lacks the notion of tag attributes that are found in XML. Instead YAML has extensible type declarations (including class types for objects).<br />
<br />
YAML itself does not have XML's language-defined document schema descriptors that allow, for example, a document to self-validate. However, there are several externally defined schema descriptor languages for YAML (e.g. Doctrine, Kwalify and Rx) that fulfill that role. Moreover, the semantics provided by YAML's language-defined type declarations in the YAML document itself frequently relaxes the need for a validator in simple, common situations. Additionally, YAXML, which represents YAML data structures in XML, allows XML schema importers and output mechanisms like XSLT to be applied to YAML.
<h3>Implementation idiosyncrasies</h3>
Some implementations of YAML, such as Perl's YAML.pm, will load an entire file (stream) and parse it en masse. Conversely, YAML::Tiny only reads the first document in the stream and stops. Other implementations like PyYaml are lazy and iterate over the next document only upon request. For very large files in which one plans to handle the documents independently, instantiating the entire file before processing may be prohibitive. Thus in YAML.pm, occasionally one must chunk a file into documents and parse those individually. Fortunately, YAML makes this easy since this simply requires splitting on the document separator, which is m/^---$/ (once whitespace is stripped) as a regular expression in Perl.<br />
<br />
Simple YAML files (e.g. key value pairs) are readily parsed with regular expressions without resort to a formal YAML parser. YAML emitters and parsers for many popular languages written in the pure native language itself exist, making it portable in a self-contained manner. Bindings to C-libraries also exist when speed is needed.<br />
<b>Links:</b>
<ul>
<li><a href="https://en.wikipedia.org/wiki/YAML" target="_blank">Wikipedia - YAML
</a>
</li>
<li><a href="http://docs.ansible.com/ansible/latest/YAMLSyntax.html" target="_blank">http://docs.ansible.com/ansible/latest/YAMLSyntax.html
</a>
</li>
<li><a href="https://www.liquidweb.com/kb/validate-yaml/" target="_blank" rel="noreferrer noopener">LiquidWeb :: Validate yaml
</a>
</li>
<li><a href="https://www.redhat.com/sysadmin/yaml-beginners" target="_blank" rel="noreferrer noopener">RedHat :: Yaml for beginners
</a>
</li>
<li><a href="https://linuxhandbook.com/yaml-basics/" target="_blank" rel="noreferrer noopener">
LinuxHandbook :: YAML Basics</a>
</li>
<li>https://edistechlab.com/yaml-grundlagen/?v=3a52f3c22ed6
</li>
<li>https://geekflare.com/de/yaml-introduction/
</li>
<li><a href="https://yaml.org/refcard.html"
target="_blank" rel="noreferrer noopener">
YAML Reference Card</a>
</li>
</ul>
</html>
<html>
<ul>
<li><a href="https://jsonformatter.org/yaml-viewer"
target="_blank" rel="noreferrer noopener">
YAML viewer</a>
</li>
</ul>
</html>
<html>
ALWAYS check your YAML config files against a parser:
<ul>
<li><a href="http://www.yamllint.com/" target="_blank">YAML Online Validator</a></li>
<li><a href="https://yaml-online-parser.appspot.com/" target="_blank">Yaml online parser</a></li>
<li><a href="http://wiki.ess3.net/yaml/" target="_blank">YAML Parser</a><br />
</ul>
When using the parser, CORRECT output looks like this: <a href="./pictures/YAML_Output.png" target="_blank">Output</a><br />
<h3>Link:</h3>
<ul>
<li><a href="http://ess.khhq.net/wiki/YAML_Tutorial" target="_blank"> http://ess.khhq.net/wiki/YAML_Tutorial </a></li>
</ul>
</html>
<html>
<ul>
<li><b>Path::Tiny</b> for easy reading of the JSON file<br />
<a href="https://metacpan.org/pod/Path::Tiny" target="_blank">https://metacpan.org/pod/Path::Tiny</a></li>
<br />
<li><b>JSON::MaybeXS</b> to parse the JSON string<br />
<a href="https://metacpan.org/pod/JSON::MaybeXS" target="_blank">https://metacpan.org/pod/JSON::MaybeXS</a></li>
<br />
<li><b>VSCode</b>, YAML-fähiger Editor</li>
<br />
<li><b>yq</b>, command line tool (*nix)<br />
<a href="https://dev.to/vikcodes/yq-a-command-line-tool-that-will-help-you-handle-your-yaml-resources-better-8j9" target="_blank"
rel="noreferrer noopener">DevTo :: yq, a command line tool</a></li>
<br />
</ul>
</html>
<html>
<ul>
<li>A linter for YAML files.</li>
<br />
<li>yamllint checks for syntax validity, for weirdnesses like <br />
key repetition and cosmetic problems such as lines length,<br />
trailing spaces, indentation, etc.</li>
<li><h3>Installation:</h3>
<code><pre>pip install yamllint</pre></code>
</li>
<li><h3>Fehlermeldungen:</h3>
<ul>
<li><pre><code>10:1 error syntax error: could not find expected ':' (syntax)</code></pre>
<ul>
<li>Vorsicht! Der Fehler befindet sich <b><em>nicht</em></b> in der angegeben Zeile!
</li>
<li>tritt auf, wenn im <u>vorherigen</u> Abschnitt der besagte Doppel–<br />
punkt fehlt;
</li>
</ul>
</li>
<li><pre><code> 5:30 error trailing spaces (trailing-spaces)</code></pre>
<ul>
<li>die Ursache sind zusätzliche Blanks vor dem Zeilenende–Zeichen:
<pre><code>d:.2024-05-18...#.date.string...$</code></pre>
</li>
<li>es hat so auszusehen:
<pre><code>d:.2024-05-18...#.date.string$</code></pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://pypi.org/project/yamllint/" target="_blank" rel="noreferrer noopener">yamllint‐Homepage</a></li>
</ul>
</html>
<html>
<ul>
<li>Command-line YAML/XML processor;</li>
<li>jq wrapper for YAML/XML documents;</li>
<li>yq takes YAML input, converts it to JSON, and pipes it to jq;</li>
<li>benötigt als Voraussetzung das Tool <code><b>jq</b></code></li>
<li><h3>Installation:</h3>
<code><pre>pip install yq</pre></code>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://pypi.org/project/yq/" target="_blank" rel="noreferrer noopener">yq‐Homepage</a></li>
</ul>
</html>
<html>
<ul>
<li><h3>Asana „Viparita Karani“ („Legs Up The Wall“)</h3>
<ul>
<li>Lege dich auf den Rücken und strecke deine Beine aus,<br />
so dass die Füße in Richtung Decke zeigen.<br />
</li>
<li>Rutsche mit dem Gesäß dicht an die Wand, so dass die<br />
Beine einen 90 Grad-Winkel zu deinem Oberkörper bilden.<br />
</li>
<li>Deine Arme kannst du entweder zur Seite ausstrecken<br />
oder, wie Amanda empfiehlt, eine Hand auf das Herz und<br />
die andere auf den Bauch legen. So kann der Atmung nach‐<br />
gespürt werden.<br />
</li>
</ul>
<br />
</li>
<li>Wie lange du in dieser Position ausharrst, ist dir <br />
überlassen.
</li>
<li>Schließe deine Augen und versuche, Körper und<br />
Geist zu entspannen.
</li>
<li>Die Übung beendest du, indem du deine Knie zu<br />
dir ziehst, mit deinen Armen umfasst und von der<br />
einen zur anderen Seite rotierst, bevor du dich au-<br />
fsetzt.
</li>
<li>Mit der Legs-Up-The-Wall-Haltung wird nicht <br />
nur die Muskulatur gedehnt, sondern auch <br />
Wassereinlagerungen bekämpft.
</li>
<li>„Diese Position hilft dabei, die Kniesehnen <br />
und die hintere Seite der Beine zu dehnen,<br />
während die Schwerkraft überschüssige <br />
Flüssigkeit aus dem unteren Körper abflie-<br />
ßen lässt, was Schmerzen und sogar<br />
Schwellungen nach dem Training verrin-<br />
gern kann“, erklärt Amanda.
</li>
<li>Weiterer Benefit der Legs Up The Wall-Po-<br />
sition: Sie ist für jeden geeignet, da wenig <br />
Beweglichkeit in den Beinen benötigt wird.
</li>
<li>Auch als Yoga-Anfänger mit wenig Erfah-<br />
rung lässt sich die Übung leicht zu Hau-<br />
se oder im Gym ausführen.
</li>
<li>Die Asana kann sowohl auf einer Matte,<br />
als auch auf einem Handtuch oder auf <br />
dem Bett geübt werden – je nachdem, <br />
was sich für den eigenen Rücken am <br />
besten anfühlt.
</li>
<li>Yogalehrerin Amanda schwört darauf, <br />
die Übung jeden Tag in ihren Alltag ein-<br />
zubauen: „Ich liebe es, diese Pose <br />
morgens als Erstes zu machen, um <br />
meinen Tag zu beginnen oder kurz <br />
vor dem Schlafengehen, um meine<br />
Muskeln für den Schlaf zu entspan-<br />
nen“, schreibt sie.
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.fitforfun.de/news/diese-beliebte-yoga-uebung-hilft-sofort-gegen-rueckenschmerzen-402441.html"
target="_blank" rel="noreferrer noopener">
Fit for fun :: Diese beliebte Yoga‐Übung hilft sofort gegen Rückenschmerzen</a>
</li>
</ul>
</html>
<html>
Folgende fünf Übungen dauern nur fünf bis zehn Minuten. Wichtig: Atmen Sie dabei<br />
ruhig und langsam weiter, pressen Sie nicht und halten Sie nicht die Luft an:<br />
<ol>
<li><h4>Atembeuge</h4>
Stellen Sie sich aufrecht hin und atmen Sie ein. Atmen Sie aus und beugen Sie sich<br />
dabei nach vorne, der Oberkörper hängt nach unten, die Fingerspritzen berühren (falls<br />
möglich) den Boden. Siebenmal langsam ein- und ausatmen, dabei aufrichten und<br />
wieder nach vorne beugen.</li>
<li><h4>Kniekugel</h4>
Legen Sie sich auf den Rücken, ziehen Sie die Knie an die Brust und umfassen Sie die<br />
Kniee mit den Händen. Kurz so bleiben, dann die Beine langsam gestreckt ablegen,<br />
zehnmal wiederholen.</li>
<li><h4>Oberkörperlift</h4>
Nun auf den Bauch legen, Arme liegen ausgestreckt nach vorne, die Handflächen auf<br />
dem Boden. Arme und Hände leicht vom Boden abheben, Oberkörper dabei etwas<br />
aufrichten. Diese Spannung kurz halten, danach langsam die Arme wieder ablegen,<br />
zehnmal wiederholen.</li>
<li><h4>Bauchheber</h4>
Gehen Sie in den Vierfüßlerstand, Rücken und Gesäß bilden eine Linie. Atmen Sie<br />
langsam aus und ziehen Sie dabei den Bauch ganz ein. Danach den Bauch wieder<br />
entspannen und durchhängen lassen, ausatmen. Fünfmal wiederholen.</li>
<li><h4>Nabelzieher</h4>
Gehen Sie in den Fersensitz, strecken Sie die Arme nach oben über den Kopf und legen<br />
Sie die Handflächen aneinander, die Zeigefinger deuten dabei nach oben zur Decke.<br />
Strecken Sie die Arme in dieser Position noch weiter nach oben und bewegen Sie dabei<br />
die Schulterblätter leicht nach vorne.<br />
<br />
Sprechen Sie in dieser Position die Mantrasilben “<em>Sat‐Nam</em>“, dabei Sat kurz aussprechen, <br />
wie satt und dabei den Nabel nach innen ziehen, Richtung Wirbelsäule. Bei Nam dann<br />
den Nabel wieder loslassen und entspannen. Diese Übung etwa zehnmal wiederholen.<br />
Zum Schluss nochmals tief einatmen, den Atem kurz anhalten und danach ausatmen,<br />
die Hände auf die Kniee legen, die Augen schließen und entspannen oder, wer kann,<br />
meditieren.</li>
</ol>
<h3>Täglich den Darm trainieren</h3>
Wenn Sie dieses Darmtraining täglich durchführen, wird Ihr Darm auf Dauer wieder<br />
aktiver ‐ und zwar ganz natürlich. Und wenn Sie zusätzlich mehr Obst und Gemüse in<br />
den Speiseplan aufnehmen, dazu auch viel trinken (Mineralwasser), hat Verstopfung<br />
kaum noch eine Chance. Ganz nebenbei werden auch die Bauchmuskulatur verbessert,<br />
die Taille straffer und Fettpölsterchen kleiner.<br />
<h3>Links:</h3>
<ul>
<li><a href="https://www.focus.de/gesundheit/ratgeber/verdauung/gymnastik-fuer-den-darm-statt-abfuehrmittel-darm-aktivieren-mit-fuenf-uebungen_id_9869522.html"
target="_blank" rel="noreferrer noopener">
Focus Online :: Gymnastik für den Darm</a>
</li>
<li><a href="https://www.fitforfun.de/news/gut-fuer-den-darm-diese-yoga-uebungen-regen-deine-verdauung-an-540956.html"
target="_blank" rel="noreferrer noopener">
Fit for fun :: Gut für den Darm ‐ Diese Yoga‐Übungen regen Deine Verdauung an</a>
</li>
<li><a href="https://www.myself.de/aktuelles/gesund/diese-yoga-uebungen-regen-verdauung-an/"
target="_blank" rel="noreferrer noopener">
MySelf.de :: Diese Yoga-Übungen regen die Verdauung an</a>
</li>
</ul>
</html>
<html>
<h2>How to check ZFS File system storage pool on Linux/Unix</h2>
First, there is no fsck command for ZFS, which Linux and Unix use for file system repair. However, ZFS comes with a scrub option. This subcommand is a root-initiated dynamic consistency check. It runs in the background on a mounted live filesystem. Hence, we use the zpool scrub command for ZFS storage and test file system integrity. Let us see how to check ZFS File system storage pool on Linux, FreeBSD or Unix-like systems using the command-line option.
ZFS scrubbing option examines all data to discover silent errors due to hardware faults or disk failure.
<h3>Checking ZFS File system storage pool integrity</h3>
See all FreeBSD related FAQ
The procedure is as follows:
<ol>
<li>Open the terminal application.</li>
<li>For remote server use the ssh command.</li>
<li>Login as root user using the su command or sudo command.</li>
<li>The syntax to check data integrity is to initiate an explicit scrubbing of all the pools. So run:
<code><pre>
zpool scrub pool_name_here
</pre></code>
</li>
<li>See the current health status for the given ZFS storage:
<code><pre>
zpool status -v pool_name_here
</pre></code>
</li>
</ol>
Please note that ZFS scrubbing and resilvering are I/O-intensive operations. Hence, ZFS only allows one scrub option at a time.
<h3>How to find your ZFS File system storage pools</h3>
To lists ZFS storage pools along with a health status and space, run:
<code><pre>
# zpool list
</pre></code>
My Linux ZFS storage pool:
<code><pre>
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
lxdzfs 127G 8.49G 119G - - 5% 6% 1.00x ONLINE -
</pre></code>
OR you can use the following command:
<code><pre>
# zpool status
</pre></code>
<h3>How do I test a ZFS file system for errors?</h3>
Let us start a scrub (check zfs for errors and other stuff) for a pool named zroot:
<code><pre>
# zpool scrub zroot
</pre></code>
<p>
<img src="./pictures/How-to-check-ZFS-File-system-storage-pool-on-freebsd-Linux-Unix.webp" height=398 width=599 title="How to check ZFS File system storage pool on freebsd Linux" /><br />
Test a ZFS file system for errors
</p>
<p>
We can wait until scrub has completed before returning by passing the -w:
<code><pre>
# zpool scrub -w zroot
</pre></code>
<u><em>Stop</em></u> scrubbing command
</p>
The syntax is:
<code><pre>
# zpool scrub -s {pool}
# zpool scrub -s zroot
</pre></code>
<u><em>Pause</em></u> scrubbing<br />
<br />
Try passing the -p option as follows:
<code><pre>
# zpool scrub -p {pool}
# zpool scrub -p zroot
</pre></code>
When a scrub is paused, the zpool scrub command again resumes it. For example:
<code><pre>
# zpool scrub zroot
</pre></code>
<h3>Checking ZFS File system storage pool status</h3>
The zpool status command reports the progress of the scrub and summarizes the results of the scrub upon completion. The syntax is:
<code><pre>
# zpool status -v
# zpool status -v {pool}
# zpool status -v zroot
</pre></code>
Look for the scan line. Here is a sample outputs indicating active scan from my FreeBSD 13 box:
<code><pre>
scan: scrub in progress since Tue Oct 19 12:11:45 2021
162G scanned at 27.0G/s, 1.10M issued at 188K/s, 1.13T total
0B repaired, 0.00% done, no estimated completion time
</pre></code>
The -v option shows verbose data error information, printing out a complete list of all data errors since the last complete pool scrub.
<code><pre>
pool: zroot
state: ONLINE
scan: scrub repaired 0B in 00:24:44 with 0 errors on Mon May 17 03:28:34 2021
config:
NAME STATE READ WRITE CKSUM
zroot ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
ada0p3.eli ONLINE 0 0 0
ada1p3.eli ONLINE 0 0 0
ada3p3.eli ONLINE 0 0 0
errors: No known data errors
</pre></code>
<h3>What is ZFS resilver command?</h3>
A resilver is an automatic dynamic consistency restoration run after a disk or network failure or slowdown of one or more mirrors. The syntax is:
<code><pre>
sudo zpool resilver {pool}
</pre></code>
<h3>Summing up</h3>
You learned how to test ZFS for hardware errors and ZFS file system integrity. Make sure you read zfs <a href="https://openzfs.github.io/openzfs-docs/man/index.html" target="_blank" rel="noreferrer noopener">man pages online here</a> or at the CLI using the man command as follows:
<code><pre>
man zpool
# freebsd
man zpool-status
man zpool-scrub
man zpool-resilver
</pre></code>
<h3>Links:</h3>
<ul>
<li><a href="https://www.cyberciti.biz/faq/how-to-check-zfs-file-system-storage-pool-on-linux-unix/" target="_blank"
rel="noreferrer noopener">nixCraft :: ZFS ‐ How to check ZFS file system</a></li>
</ul>
</html>
<html>
<h4><a href="https://www.zeitverschiebung.net/de/" target="_blank" rel="noreferrer noopener">Zeitzonenrechner</a></h4>
</html>
<html>
Some programs write to multiple log files in a directory <br />
and need to be zeroed out sometimes to save diskspace. <br />
<br />
The following ksh shell script will zero out all files with the ".log"<br />
extension in a directory.<br />
<code><pre>
--- cut here ---
for object in *.log
do
> $object
print "$object has been zeroed!"
done
--- cut here ---
</pre></code>
Just a little time saver when you have 100 other things to<br />
be doing.<br />
<br />
This tip generously supported by: <br />
clankell@ucsinet.com
</html>
https://www.cyberciti.biz/faq/bash-scripting-using-awk/
<html>
<ul>
<li>"copy-in, copy-out"</li><br />
<li>cpio bietet folgende drei Modi an:<br />
<br />
<ol>
<li><b>-i / --extract</b> :: <br />
Files aus dem Archiv lesen und <b>in</b> das Filesystem ablegen<br />
Beispiel:
<code>
$ cpio -idv < /tmp/object.cpio
</code></li><br />
<li><b>-o / --create</b> :: <br />
Files <b>aus</b> dem Filesystem lesen und in das Archiv schreiben<br />
Beispiel:
<code>
$ ls | cpio -ov > /tmp/object.cpio
</code></li><br />
<li><b>-p / --passthrough</b> :: <br />
"Durchreich-Modus"; <br />
das Programm liest die Daten von stdin (z.B. von der Pipe);<br />
Passing files to another directory tree;<br />
Beispiel:
<code>
$ find . -depth | cpio -pmdv /mnt/out
</code></li><br />
</ol>
</li>
<li><b>Wichtige Optionen</b> <br />
<br />
Je nach Version des cpio gibt es unterschiedliche Optionen. <br />
Genaueres findet sich in den Manpages. <br />
Die hier genannten Optionen dürften in jeder Version zu finden sein:<br />
<table border="1">
<tr>
<td><b>-d</b></td> <td>Erzeugt beim Rücksichern die notwendigen Verzeichnisse.</td>
</tr>
<tr>
<td><b>-u</b></td> <td> Ersetzt durch die Rücksicherung auch eine neuere Datei als die, die im Archiv steht.</td>
</tr>
<tr>
<td><b>-m</b></td> <td>Behält die Modifikationszeit (& den Eigentümer) des gesicherten Originals bei. <br />
Wirkt nicht auf Verzeichnisse.</td>
</tr>
<tr>
<td><b>-x</b></td> <td>Sichert auch Gerätedateien und andere spezielle Dateien. </td>
</tr>
<tr>
<td><b>-v, <br />--verbose</b></td> <td>"verbose", gesprächige Ausgabe</td>
</tr>
<tr>
<td><b>-F archive,<br />--file=archive</b></td> <td>Das Archiv wird nicht auf die Standard-Ausgabe geschrieben,<br />
sondern in den angegebenen Dateinamen.<br />
(am besten (oder nur?) in Kombination mit -H)</td>
</tr>
<table>
</li>
<li><b>Links:</b><br />
http://www.thegeekstuff.com/2010/08/cpio-utility/<br />
http://openbook.rheinwerk-verlag.de/unix_guru/node144.html<br />
</li>
</ul>
</html>
Thanks for the invistigation. However, I dont think it's possible to ask bloomberg to change the CCY to CNH for dimsum bond. It's the way bloomberg setup all the CNH bond. Currently there are over 1200 outstanding dim sum bond, all ccy were defined as CNY.
If change ccy from CNY to CNH in Murex is not possible, we want to look at a change at SPIDER. I talked to bloomberg support last week. The consultant name is Asako Yoshii. She said there is a value DZ067(Offshore CNY Bond Indicator) in bloomberg AF400 report that we can config. Is it possible to add additional filter to include this to identify if it's CNH bond? Or is it possible to filter by Settlement currency instead?
I can extract 2 types of data to differenciate a CNH bond as below:
the Logic I suggest is
IF ccy is CNY, check settlement currency
IF settlement currency = CNH, import as CNH to murex,
otherwise import as CNY to murex,
or
IF ccy is CNY, check offshore china bond indicator
IF offshore china bond indicator = Y, import as CNH to murex,
otherwise import as CNY to murex,
Could you advise if it's possible to implement the fix for the SPIDER pls? If we can fix the SPIDER, on the deal level, we can delete this deal and rebook again.
----------------------------------------------------------------------------------------------------------------------------------
Mx3 :: Add "ACU/DBU" field in dynamic table (DYN_TRNRP_CS)
to add the ACU/DBU field in the dynamic table SG_RC_MAS613 the following steps are required:
(if you are not familiar with this procedure test it in the Murex Play environment first)
Activate UDF_REF as table field: (Table fields --> Selection):
Then create the horizontal fields IRD_ACUDBU, CRD_ACUDBU and CUR_ACUDBU which get the data from the UDF tables. Click on Selection:
To add a field right click und choose insert or Edit --> Insert.
See screenshots below for the definition of these fields.
Field for IRD trades:
Formula:
CTBLFIELD('TABLE#DATA#DEALIRD.ACU_DBU','NB',STR(UDF_REF2))
Field for CRD trades:
Formula:
CTBLFIELD('TABLE#DATA#DEALCRD.ACU_DBU','NB',STR(UDF_REF2))
Field for CURR trades:
Formula:
CTBLFIELD('TABLE#DATA#DEALCURR.ACU_DBU','NB',STR(UDF_REF2))
Now check that these fields are selected as table fields:
Then create a fourth horizontal field UDF_ACUDBU:
Formula:
IIF(TRN_FMLY='IRD',IRD_ACUDBU,IIF(TRN_FMLY='CURR',CUR_ACUDBU,IIF(TRN_FMLY='CRD',CRD_ACUDBU,'')))
Now run your report (Tools --> Test on screen) and after the report was generated click on Tools --> View. Select the view SG_RC_MAS613 and open it with the space bar.
Change the value of displayed by to Label and add UDF_ACUDBU to the Current View.
The result should look like this. Now save the view.
Use the view by double click on the name and as result the last column in the dynamic table should look like this:
----------------------------------------------------------------------------------------------------------------------------------
Overflow in temporäre Tabelle / Report:
[2018-05-01 15:01:43][call script:launchProcScript.sh ][user:muradm][PID:20866]: Error: RDBMS025 Overflow in
lbmursecvt01#14987#Z0002_TMP: lbmursecvt01#14987#Z0002_TMP:MP_VOL2
Error: RDBMS025 Overflow in lbmursecvt01#14987#Z0002_TMP: lbmursecvt01#14987#Z0002_TMP:MP_VOL2
--> BO-Session --> User dynamic table (Datamart --> Datamart tables configuration)
--> die entsprechende Tabelle ermitteln
--> markieren, RMT, "Test and Save on Disk"
[IMAGE]
--> dann Fenster "Execution parameters", mit "Proceed" weitermachen
--> Fenster "Dynamic table settings"
-->mit "Ok" bestätigen (immer ?)
--> Reporterstellung beendet mit
[IMAGE]
--> anklicken -->
[IMAGE]
--> "More details" ::
[IMAGE]
dann "File" --> "Open" anklicken:
[IMAGE]
--> in diesem Fenster zum Feld gehen, das den Abbruch herbeiführt:
(hier: MP_VOL2):
[IMAGE]
--> um den Trade zu "exkludieren":
das Feld "NB" suchen:
[IMAGE]
diese TradeNr. im SQL-Statement exkludieren
----------------------------------------------------------------------------------------------------------------------------------
die Ursache für das fehlende Geschäft ist die Anpassung der KUSYMA des Kontrahenten 'DTSPKLEFACT_BRE' in der letzten Woche:
[IMAGE]
(Anmerkung:
Die gelbe Zeile tritt auf, wenn die Versionen 23 und 24 miteinander verglichen
werden.)
Hier wurde der Wert von 022222222222222 auf 400405106492406 geändert. Im Report wird anhand des Feldwertes ermittelt, ob es sich bei dem Kontrahenten um eine Bank handelt. Dafür wird geprüft, ob die erste Stelle 0 oder 5 ist oder ob die sechste Stelle keine 4 beinhaltet.. Da keins dieser Kriterien erfüllt ist, werden Geschäfte des Kontrahenten vom Report als nicht relevant betrachtet (da es scheinbar um keine Bank handelt).
----------------------------------------------------------------------------------------------------------------------------------
Mx3 :: Workflow Manager Monitor startet nicht
?Wozu ist der Workflow Manager Monitor da?
in Mx01 kann der Workflow manager monitor nicht gestartet werden.
(Config-Session--> Infrastructure --> Processing center)
Fehlermeldung:
Im mx3-Verzeichnis: ./launchmxj.app ‐federation ‐k
Restart: ./launchmxj.app ‐federation ‐sync ‐nosilent /MXJ_FORCE_LAUNCHER_STARTUP:Y \
‐jopt:-Djava.rmi.server.hostname=TLMXPS31.kbk.nordlb.local ‐jopt:-Xmx512m
----------------------------------------------------------------------------------------------------------------------------------
Solaris :: Manpage tar (1)
Function Modifiers
The characters below can be used in conjunction with the letter that
selects the desired function.
j
(-c) c mode only. Compress the resulting archive with bzip2.
(-x) In extract or list modes, this option is ignored.
(-t) The implementation recognizes bzip2 compression type automatically
when reading archives.
Upgrade/replace first decompresses and then applies the same mecha-
nism to compress the archive automatically.
----------------------------------------------------------------------------------------------------------------------------------
Deal/Trade blocked/geblocked
Es kann passieren, dass ein User (in diesem Fall Pirro Ayala) meldet,
dass ein Deal von einem anderen User, einer anderen Session ge-
blockt ist.
Zuerst ermitteln, ob der gesuchte User noch online resp. telefonisch/email-mässig
erreichbar ist (das sollte für gewöhnlich der meldende User tun ...)
In diesem Fall war es ca. 21 Uhr (in meiner EOD-Schicht).
geschickter Screenshot:
(... wie sich herausstellte, war Niels gerade mit diesem Deal beschäftigt ...)
Um das Blocking aufzulösen, kann man:
* auf der Unix-Ebene mittels kill 12456 (u.U. auch kill -9 <NPID>)aufrufen
* auf Monit-Tool-Ebene arbeiten (muss ich noch genauer herausfinden, wie das läuft ...)
Nach der Aktion muss (lt. Niels) noch mind. 15 Minuten gewartet werden,
bis die DB den Deal frei gegeben hat.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Viewer screen problems
Hi Paul,
we will go back to your orginal question:
"how can I breakdown the past cash 52,688 by deal number please ?"
Please try this:
1) A detailed result will be possible with the "Securities" Tab in the Simulation:
2) You may now scroll to the lines with shown "Cash" or within the Tab "View" define a new filter:
DoubleClick tio select it
3) This gives you three relevant lines having cash
Now do a right click on one instrument of interest and choose "Display Deals"
4) Now you will just get one line with one Deal Number
Hope that helps.
Be aware: We don't know how to define / add a regarding cash field in the view "Paul" of the "Viewer" Tab
Further hint:
A easier way will be to get the wanted deals out of a report.
e.g. like the MXG_PAY_D (Payments by Date, CCY,Portfolio, Deal) (or LN_PAY_D)
When running this report on Portfolio LNIOPC_OPT__B_S and filtering on ValueDate < EvaluationDate, you will get out all past cash flows.
We could imagine to create a report or dyn.Table that simple sum up all cashflows per deal in the output, then you would get all trade numbers contributing to PastCash.
Here the result in a test env per 20.01.14
-------------------------------------------------------------------------------------------------------------------------
Diskussion
Hauptthema
Jens Mueller/Extern/NORDLB
28.02 10:23 .
Thema:
. Deal Blotter :: Zusätzliche Query
.
Kategorie:
Hr. Tossios wollte einen zusätzlichen Tab in seinem Blotter-Abschnitt haben:
---> Lösung:
Login in Murex mit entsprechender Gruppe:
---> neues Fenster erscheint:
Hier den gewünschten Namen eintragen (z.B. “dynamisch“)
---> es kann eine Weile dauern,
bis sich unten im Blotter-Bereich ein weiterer Tab auftut:
[IMAGE]
---> in der Zeile darunter sind die zur Verfügung stehenden Spalten zu sehen
---> per Drag'n'Drop auf Höhe des 2-Pfeile-Buttons schieben
---> falls nicht gewünscht, den Eintrag per Drücken des “Kreuzes“ den Eintrag aus der Aufstellung entfernen
---> bei Spalten, die nicht in der Zeilenauflistung zur Verfügung stehen, muss man die
“View-Darstellung / - Auflistung“ aufrufen. Das geschieht, indem man einen beliebigen Eintrag
(hier war es der Eintrag “Counterparts“) markiert und die rechte Maustaste drückt.
Aus dem auftauchenden Menü wählt man den Eintrag “Edit view“ aus:
---> Es erscheint ein neues Menü im unteren Bereich:
---> Es gilt das “Trade Date“ zu finden und in die Query hinzuzufügen, da sie nicht
in der ursprüglichen Auflistung bereitgestellt wird.
Dazu klickt man jetzt auf das Plus-Zeichen vor dem Eintrag “GENERIC_VIEW“
aus der View-Ansicht / - Auflistung und sucht in der dann erschienenden Liste den
gewünschten Eintrag (hier: “TradeDate&ldquo):
---> Mittels Drag'n'Drop wird dieser Eintrag neben den bereits bestehenden Query-Teil geschoben:
[IMAGE]
---> Danach schliesst man die View-Darstellung / - Auflistung, indem man auf den “Use view“–Button klickt:
---> Nach Verschwinden der View-Darstellung kann man die letzten Spalten der Query hinzufügen:
---> Die gewünschten Einstellungen machen, d.h. die Werte aussuchen.
Die Einstellungen sind im ersten Moment rot, aber nach dem Drücken des 2-Pfeile-Buttons werden sie schwarz.
Zurücksetzen einer Query:
Tools Reset Query die Query bleibt, aber die Spalten verschwinden aus der Ansicht, so dass per
Drag'n'Drop die Spalten neu zusammengesetzt werden müssen
Löschen einer Query:
Tools ---> Remove Query ---> es erscheint ein neues Fenster, mit einer Liste der bereitstehenden
Queries ---> zu löschende Query auswählen ---> Doppelklick darauf, und die Query (und mit ihr der
Tab) verschwindet
--------------------------------------------------------------------------------------------------------------------------
<html>
<h3>gkrellmd-Monitor</h3>
</html>
<html>
<h2>File mit Liste von zu extrahierenden Files mitgegeben</h2>
Option: <b>-I <i>FileList.txt</i></b>
<b><code><pre>gtar -xvjf <i>tar-archiv</i> -I <i>FileList.txt</i></pre></code></b>
<ul>
<li>im File <i>FileList.txt</i> sind die Files aufgelistet,<br />
die aus dem <i>tar-archiv</i> zu extrahieren sind.</li>
</ul>
</html>
<html>
<h3>A note about setting machine name when using systemd</h3>
With systemd it is possible to use a single command as follows:
<code><pre>
# hostnamectl set-hostname machine-name-here
# hostnamectl set-hostname server2
</pre></code>
<b>Link:</b><br />
<a href="https://www.cyberciti.biz/faq/debian-change-hostname-permanently/" target="_blank">Cyberciti :: Debian - Change hostname permanently</a>
</html>
<html>
<a href="http://isql.sourceforge.net/?page=download" target="_blank">http://isql.sourceforge.net/?page=download</a>
</html>
<html>
<code><pre>
# Parameteranzahl prüfen
if [ $# -lt 1 -o $# -gt 2 ]
then
echo "falsche Parameteranzahl"
echo "Usage: createrepo <Repository> [Owner]"
exit
fi
</pre></code>
</html>
kill is not really meant only
to kill a process. But main
intention is to send a signal
to process.And the process
handles these signals to do
various tasks.
kill -INT 1234
#where 1234 is the Process ID
is really, this set an
interrupt signal, Ctrl-C is an
example of interupt signal given
to shell.
kill -HUP 1234
#some UNIX daemons handle this,
to do refreshing business.
kill -KILL 1234
This is the sure kill,which
cannot be handled by any process.
Also know as, kill -9 1234.
Just, check the in the file
/usr/include/sys/signal.h for all
signals on the system.
More about this can be found on
kill and signal man pages.
This tip generously supported
by: dkotian1@rediffmail.com
<html>
Aufruf: newsbeuter<br />
<br />
Urls bearbeiten/neu anlegen: Shift - e<br />
<br />
Liste sortieren: g<br />
<br />
Liste sortieren - in umgekehrter Reihenfolge: Shift - g<br />
<br />
Zum nächsten Artikel gehen: Shift - j<br />
<br />
Zum vorhergehenden Artikel gehen: Shift - k<br />
<br />
Zum nächsten ungelesenen Artikel gehen: n<br />
<br />
Zum vorhergehenden ungelesenen Artikel gehen: p<br />
<br />
Gelesen-Status für Artikel umschalten: Shift - n<br />
(von "Gelesen" zu "Ungelesen" und zurück)<br />
<br />
</html>
<html>
<ul>
<li><h3>Aufruf von node:</h3>
node</l><br />
<br />
<li>kann so wie Python eingesetzt werden;<br />
besitzt eine eigene REPL-Shell <br />[Kommandozeilenprogramm, REPL := “Read‐eval‐print loop“];<br />
kann auch über HashBang / als File aufgerufen werden</l><br />
<br />
<li><h3>Package Manager:</h3>
npm</l><br />
<br />
<li></l><br />
<br />
</ul>
</html>
<html>
<ul>
<li>noweb is a literate programming tool, created in 1989 – 1999 by <br />
Norman Ramsey,[1] and designed to be simple, easily extensible <br />
and language independent. </li>
<br />
<li>A noweb input text contains program source code interleaved with documentation. It consists of so-called chunks that are either documentation chunks or code chunks.</li>
<br />
<li>A documentation chunk begins with a line that starts with an at sign (@) followed by a space or newline. A documentation chunk has no name. Documentation chunks normally contain LaTeX, but noweb is also used with HTML, plain TeX, and with troff.</li>
<br />
<li>Code chunks are named. A code chunk begins with
<code><pre>
<<chunk name>>=
</pre></code>
on a line by itself. The double left angle bracket (<<) must be in the first column.</li>
<br />
<li>Each chunk is terminated by the beginning of another chunk. If the first line in the file does not mark the beginning of a chunk, it is assumed to be the first line of a documentation chunk.</li>
<br />
<li>Code chunks aren't treated specially by noweb's tools – they may be placed in any order and, when needed, they are just concatenated. Chunk references in code are dereferenced and the whole requested source code is extracted.</li>
<br />
</ul>
<h3>Links:</h3>
<ul>
<li>http://www.literateprogramming.com/noweb_hacker.pdf<br />
(--> bereits heruntergeladen)</li>
<li>Wikipedia-Eintrag, <br />
https://en.wikipedia.org/wiki/Noweb</li>
<li>LinuxJournal, "Literate Programming Using Noweb", <br />
http://www.linuxjournal.com/article/2188</li>
</html>
<html>
<ul>
<li>pdfsam := PDF <b><u>S</u></b>plit <b><u>a</u></b>nd <b><u>M</u></b>erge
</li>
<li>steht mittlerweile (03/2024) im Repository zur Ver–<br />
fügung → Installation via <code>apt</code> möglich.
</li>
<li>Falls die Fehlermeldung:
<pre><code>Error initializing QuantumRenderer: no suitable pipeline found</code></pre>
auftaucht, dann mittels
<pre><code>sudo update-alternatives --config java</code></pre>
die verwendete Java-Version überprüfen. Es muss
<pre><code>/usr/lib/jvm/java-17-openjdk-amd64/bin/java</code></pre>
sein.
</li>
<li><h3>Shortcuts</h3>
<ul>
<li>Alt + ↑ :: nach oben schieben
</li>
</ul>
</li>
</ul>
<!--
<li>Aufruf : <code><pre>sudo /usr/local/bin/pdfsam-4.2.10-linux/bin/pdfsam.sh</pre></code>
</li>
<h3>Links:</h3>
<ul>
<li><a href="https://wiki.ubuntuusers.de/PDF_Split_and_Merge/" target="_blank" rel="noreferrer noopener">Ubuntu :: PDF ‐ Split & Merge</a></li>
-->
</ul>
</html>
<html>
Aufruf:<br />
mueller@Debian-Laptop:/home$ rsync --progress --exclude 'mueller/Programme/anaconda3*' --exclude 'mueller/.*' -avzh ./mueller /media/mueller/Elements/myData/mueller_2019-12-06/<br />
→ das Verzeichnis “./mueller“ (und seine Unterverzeichnisse) <br />
werden in das Verzeichnis mueller_2019-12-06/ kopiert / transferiert
</html>
<html>
<ul>
<li><h3>???</h3>
<code><pre>#!/bin/bash<br />
array=$(cat test.txt)<br />
echo ${array[@]} | sed ‐e “s/ /\'/g“ ‐e “s/^/\'/“ ‐e “s/$/\'/“<br /></pre></code>
<h3>Append line 'option' after match 'Hello World'</h3>
<pre><code>sed '/\[option\]/a Hello World' INPUT-FILE</code></pre>
Alternativ:
<pre><code>sed '/apple/a\grapes' fruits.txt </code>[3] </pre>
Additionally you can take backup and edit input file in-place using -i.bkp option to sed;
<h3>Insert line 'option' before match 'Hello World'</h3>
<pre><code>sed '/\[option\]/i Hello World' INPUT-FILE</code></pre>
Alternativ:
<pre><code>sed '/apple/i\grapes' fruits.txt </code>[3] </pre>
Additionally you can take backup and edit input file in-place using -i.bkp option to sed
</li>
<br />
<li>The above code will append/insert the line for<br />
every single match.<br />
<br />
If you want to append/insert the line for the<br />
first match only, you can prepend 0, to the<br />
commands:
<pre><code>sed '0,/\[option\]/a Hello World' INPUT-FILE</code></pre>
or
<pre><code>sed '0,/\[option\]/i Hello World' INPUT-FILE</code></pre>
[Erklärung anscheinend falsch, da "0," als Adresse<br />
interpretiert wird ... vllt. gibt es die Funktionalität,<br />
aber nicht so]
</li>
<br />
<li>If the appended string is a multiline text you <br />
can save it to a file (e.g.: snippet.txt) and in-<br />
ject this file after the pattern using:
<pre><code>sed -i '/pattern/ r snippet.txt' INPUT-FILE</code></pre>
Statt "pattern" habe ich die Zeilennummer verwendet:
<pre><code>sed -i '112r text.txt' INPUT-FILE</code></pre>
[<em>das -i muss mit angegeben sein, da sonst das<br />
Ergebnis auf Stdout ausgegeben wird;</em>]<br />
<br />
[<em>das "snippet.txt" file muss dabei im selben<br />
Verzeichnis liegen, in dem der Befehl auf-<br />
gerufen wird;</em>]<br />
</ul>
<h3>Links:</h3>
<ul>
<li>[1] <a href="https://unix.stackexchange.com/questions/121161/how-to-insert-text-after-a-certain-string-in-a-file"
target="_blank" rel="noreferrer noopener">
StackExchange :: How to insert text after a certain string in a file</a>
</li>
<li>[2] <a href="https://www.geeksforgeeks.org/sed-command-in-linux-unix-with-examples/"
target="_blank" rel="noreferrer noopener">
Geeks for Geeks :: Sed Command in Linux/Unix With Examples</a>
</li>
<li>[3] <a href="https://tecadmin.net/sed-command-in-linux-with-examples/"
target="_blank" rel="noreferrer noopener">
TecAdmin :: Sed Command in Linux with 15 Practical Examples</a>
</li>
</ul>
</html>
<html>
To remove blank lines from a file using <b>sed</b>, use the following:
<pre><code>
sed -e '/^$/d' filetoread >filetowrite
</code></pre>
The ^ matches the beginning of a line and the $ matches the end.<br />
The two of them together matches a line that begins and ends with<br />
nothing in between (blank line).<br />
<br />
The d just says delete the lines for which we have a match.<br />
Since the standard operation of sed is to print every line,<br />
all lines exept blank lines will be sent to filetowrite.<br />
<br />
This tip generously supported by: <br />
code@ionet.net<br />
</html>
<html>
<ul>
<li>Üblicherweise gibt es einen Daten-Eingabe-Strom,<br />
dann wird dieser Datenstrom verarbeitet,<br />
dann wird daraus ein Daten-Ausgabe-Strom</li>
<br />
<li>Automatische Manipulation von Text-Streams <br />(Stream von Zeilen)</li>
<br />
<li>Der Datenstrom wird zeilenweise gelesen,<br />
zeilenweise manipuliert nach vorgegebenen Muster
</li>
<br />
<li><b>Vorsicht bei der Kombination von -i und -n!!!</b><br />
Das File wird dann u.U. mit Nichts überschrieben,<br />
resp. es wird geleert;
</li>
</ul>
<b>Syntax:</b><br />
<pre><code>sed [Optionen] [sed-Befehle] [Eingabedatei]</code></pre>
Ist keine Eingabedatei vorgegeben, so muss sed mittels Strg-D <br />
abgebrochen werden.<br />
<br />
<b>Beispiel</b><br />
<pre><code>sed -n -e '5,10/root/p' < /etc/passwd</code></pre>
<b>Optionen:</b>
<ul>
<li><h4>‐n :: "not"</h4>
Defaultmäßig wird jede manipulierte Zeile (wieder) ausgegeben.<br />
Dies kann mit dieser Option unterdrueckt werden.</li>
<br />
<li><h4>‐i <em>––in–place</em></h4>
<ul>
<li>Defaultmaessig wird eine manipulierte Zeile nicht wieder in <br />
die Eingabedatei zurückgeschrieben, sondern nach Stdout.<br />
</li>
<li>Mit dieser Option wird die Veränderung in die Eingabedatei<br />
geschrieben, und nicht auf Stdout. Dadurch ist eine Redirection<br />
nicht notwendig. (!GNU sed!)
</li>
</ul>
</li>
<br />
<li><h4>‐e :: "execute"</h4>
nachfolgend steht ein regulärer Ausdruck resp. ein Skript/Programm,<br />
der auf den Eingabestrom angewandt wird
</li>
<li><h4>––debug</h4>
<ul>
<li>ermöglicht eine Ausgabe der einzelnen Schritte,<br />
Zeile für Zeile;
</li>
<li>wird z.B. ein Matching erfolgreich durchgeführt, so<br />
sieht das in der ––debug-Ausgabe wie folgt aus:
<pre><code>INPUT: '2024-07-02_Dienstag/20240630_0_Pyton_SimplifyingDataCleaningWithPyjanitor.html' line 7
PATTERN: \t<title></title>
COMMAND: s/<title><\\\/title>/<title>Python</title>/
MATCHED REGEX REGISTERS
regex[0] = 1-16 '<title></title>'
PATTERN: \t<title>Python</title></code></pre>Y
</li>
</ul>
</li>
</ul>
<b>Beispiel</b><br />
<code><pre>
sed -n '1p' /etc/passwd
</pre></code>
→ es wird nur die angegebene Zeile (hier: 1) ausgegeben.<br />
Wird keine Zahl angegeben, so wird die ganze Datei ausgegeben<br />
<br />
Alternativ:
<pre><code>sed '' <em>FILE</em></code></pre>
<br />
<b>sed-Befehle</b><br />
Diese werden in Verbindung mit regulären Ausdrücken, die in Slashes<br />
stehen, verwendet. Dabei werden diese Befehle entweder vor oder nach<br />
dem regulären Ausdrücken gesetzt.<br />
<br />
Damit die Shell Sonderzeichen nicht "beachtet", wird der reguläre<br />
Ausdruck in Single Quotes gesetzt.<br />
<br />
Soll das " ' " (einfache Apostrophe) maskiert werden, so sind <br />
doppelte Anführungszeichen zu verwenden (sonst sagt die Shell,<br />
dass der Befehl nicht korrekt abgeschlossen ist). --> siehe unten<br />
<table border="1">
<tr><th> Aktion </th><th> Bedeutung</th></tr>
<tr><td>
p </td><td>Gibt die manipulierte Zeile aus
</td></tr>
<tr><td>
x</td><td>Der Befehl "x" tauscht den Inhalt des Patternspace<br />
mit dem des Holdspace.
</td></tr>
<tr><td>
d</td><td>"delete", den vorhergehenden String/Ausdruck löschen
</td></tr>
<tr><td>
w</td><td>"write"; Schreibt die gefundenen Ausdrücke in <br />
eine Datei, die mit angegeben wird. <br />
<br />
Bsp:
<pre><code>sed -n '/F/w out.log' <em>FILE</em> </code></pre>
</td></tr>
<tr><td>
s</td><td>"substitute"; Substitution von Ausdrücken; <br />
<br />
Ein wichtiges Kommando ist 's/r/rep/flag'. Hierbei wird diejenige Portion im <br />
pattern space, auf welche die RE 'r' passt durch die Zeichenkette 'rep' <br />
ersetzt und zwar in der Modalität, die mit dem flag bestimmt wird. Ein 'd' <br />
ersetzt das erste Muster und fängt dann einen neuen Zyklus an. Das Flag 'g' <br />
ersetzt alle Muster in einer Zeile, eine Nummer 'n' veranlasst sed, das n-te <br />
übereinstimmende Muster zu ersetzen.<br />
<br />
Bsp: sed *'s/n/123456/'* Standorte
</td></tr>
<tr><td>
h</td><td>"hold"; kopiert den Inhalt des Patternspace in den <br />
Holdspace und überschreibt jeden vorherigen Inhalt des Holdspace
</td></tr>
<tr><td>
H</td><td>das gleiche wie "h", hier wird der Inhalt angehängt
</td></tr>
<tr><td>
g</td><td>kopiert den Inhalt des Holdspace in den Patternspace<br />
und überschreibt den Inhalt
</td></tr>
<tr><td>
G</td><td>das gleiche wie "g", hier wird der Inhalt angehängt
</td></tr>
<tr><td>
q</td><td>"quit", Bearbeitung beenden
</td></tr>
<tr><td>
y</td><td>ersetzt ein einzelnes Zeichen mit einem anderen einzelnen Zeichen; <br />
Bsp: sed *'y/abcdefgh/ijklmnop/'* Standorte
</td></tr>
<tr><td>
{}</td><td>n-maliges Vorkommen eines Strings; <br />
<br />
Bsp: sed -n '/\(at\)\{2\}/p' wh <br />
=> der String "at" kann bis zu 2-mal hintereinander vorkommen <br />
</td></tr>
</table>
<br />
<b>Interne Funktionsweise</b><br />
Zur internen Funktionsweise von sed ist noch zu sagen, dass das <br />
Programm mit zwei Puffern arbeitet, in denen die Zeilen gespeichert werden. <br />
<br />
Der <b>erste Puffer</b> ist der <b>Patternspace</b>. In diesen wird ein <br />
Pattern geladen, nachdem es einem Muster entsprach. Nach der<br />
Bearbeitung wird der Inhalt des Patternspace ausgegeben.<br />
<br />
Der <b>zweite Puffer</b> ist der <b>Holdspace</b>. Nach der Bearbeitung <br />
einer Zeile wird diese vom Pattern- in den Holdspace kopiert.<br />
<br />
[[Include::Image::Zeichnung-11.jpg]]
<br />
<b>Die Funktionsweise von sed:</b><br />
Zeile einlesen, wenn die Adresse passt, <br />
dann pattern space bearbeiten,<br />
dann pattern space ausgeben. <br />
<br />
"$=":<br />
Das DollarZeichen '$' ist in diesem Fall nicht das Zeilenende einer<br />
RE (es fehlen nämlich die //), sondern ist die Adresse der letzten <br />
Zeile der letzten Eingabe-Datei, und das Kommando '=' gibt die<br />
aktuelle Zeilennummer vor der Ausgabe aus.<br />
<br />
"!":<br />
Ein Rufezeichen '!' nach einer Adresse verkehrt diese in ihr <br />
Gegenteil um. Die Adresse n,m! trifft auf alle Zeilen bis auf <br />
den Block von der n-ten bis zur m-ten Zeile zu. awk! selektiert <br />
alle Zeilen die nicht die Zeichenkette 'awk' enthalten.<br />
<br />
"#":<br />
Weiters wird auch das Kommentarzeichen '#' als Kommando bezeichnet. <br />
Es verbirgt einfach alle nachfolgenden Zeichen im Script bis zum <br />
Ende der Zeile. Das ist nützlich in Scripten, die in Files ge-<br />
schrieben wurden und die an trickreichen Stellen ein paar erklärende <br />
Worte verlangen.<br />
<br />
<b>Beispiele (zum Analysieren):</b>
<ul>
<li>sed -e '/^#@@/!d' bigProgram.sh | sed -e 's/^#@@//'</li>
<br />
<li>sed -n -e '/^[1-9]/p' titelListe.txt<br />
alternativ:<br />
sed -n -e '/^[[:digit:]]/p' titelListe.txt<br />
<br />
==> gibt alle Zeilen aus, die am Zeilenanfang eine Zahl haben</li>
<br />
<li>sed -n -e '/^[1-9]\./p' titelListe.txt<br />
<br />
==> gibt alle Zeilen aus, die am Zeilenanfang eine<br />
einstellige Zahl haben, gefolgt von einem Punkt</li>
<br />
<li>sed -n -e 's#^\([1-9]\.\)#0\1#p' titelListe.txt<br />
<br />
==> gibt alle Zeilen aus, die am Zeilenanfang eine<br />
einstellige Zahl haben, gefolgt von einem Punkt<br />
<br />
Durch die Substitution wird jede Zahl durch eine<br />
zweistellige, mit führender Null, ersetzt<br />
<br />
Wichtig!<br />
hier wird mit einer Backreference gearbeitet:<br />
im Substitutionsbefehl s#...#...# (zwecks der Les-<br />
barkeit wird das Hash, #, statt des Slashs, /, ver-<br />
wendet) wird der Bereich "[1-9]\." geklammert. Auf<br />
diesen Bereich wiederum wird mittels der "Anweisung"<br />
\1 zurückgegriffen</li>
<br />
<li>sed -n -e 's@^\([1-9]\.\)@0\1@p' -e '/^[1-9]\{2\}/p' titelListe.txt<br />
<br />
==> Beispiel für ein sed-Kommando mit zwei - voneinander <br />
verschiedenen(!) - Anweisungen:<br />
während die erste die Zeilen verändert,<br />
werden Zeilen, die dem RegExp in der zweiten Anweisung <br />
entsprechen, unverändert ausgegeben</li><br />
<br />
<li>sed -i.bakk -n -e 's/. /_/;s/ \+/_/g;s/://gp' titelListe.txt<br />
<br />
==> Beispiel für ein sed-Kommando mit drei - voneinander <br />
verschiedenen(!) - Anweisungen<br />
<br />
Wichtig!<br />
jeder nachfolgende Befehl verarbeitet das Ergebnis vom<br />
vorherigen Befehl, dh. die Anweisungen beziehen sich<br />
nicht auf die ursprünglichen Daten!!!</li><br />
<br />
<li>sed -i.bak -n -e 's@^\([1-9]\)\{1\}\.@0\1@p' -e 's/^\([[:digit:]]\{2,\}\)\./\1/p' titelListe.txt<br />
<br />
ACHTUNG!<br />
beim Quoten von Apostrophs muss der Befehl durch doppelte An-<br />
führungszeichen statt durch Apostrops begrenzt sein:<br />
<br />
<li>sed -n -e "/'/p" titelListe.txt<br /></li>
<br />
<li>sed -n -e '/^[^8]/p' ctpdata.txt<br />
<br />
einfaches Beispiel:<br />
Eingabe enthält zeilenweise Zahlen. Die Ausgabe besteht aus<br />
allen Zeilen, die _nicht_ mit einer "8" beginnen. "p" führt<br />
dazu, dass das Ergebnis ausgegeben wird, "-n" dazu, dass die<br />
Eingabe nicht noch einmal ausgegeben wird</li><br />
<br />
<li>sed -n -e '/^[8][0]/p' ctpdata.txt<br />
<br />
einfaches Beispiel:<br />
Eingabe enthält zeilenweise Zahlen. Die Ausgabe besteht aus<br />
allen Zeilen, die mit einer "8" beginnen, und als zweite Ziffer<br />
die "0" enthalten</li><br />
<br />
<li>sed -n -e '/^[8][^0]/p' ctpdata.txt<br />
<br />
einfaches Beispiel:<br />
Eingabe enthält zeilenweise Zahlen. Die Ausgabe besteht aus<br />
allen Zeilen, die mit einer "8" beginnen, und als zweite Ziffer<br />
_nicht_ die "0" enthalten
</li>
<br />
<li><h3>Zeichenklassen</h3>
<table border="1">
<tr>
<td><pre><code>[[:alpha:]]</code></pre>
</td>
<td><pre><code>[[:alnum:]]</code></pre>
</td>
<td><pre><code>[[:lower:]]</code></pre>
</td>
</tr>
<tr>
<td><pre><code>[[:upper:]]</code></pre>
</td>
<td><pre><code>[[:blank:]]</code></pre>
</td>
<td><pre><code>[[:space:]]</code></pre>
</td>
</tr>
<tr>
<td><pre><code>[[:digit:]]</code></pre>
</td>
<td><pre><code>[[:xdigit:]]</code></pre>
</td>
<td><pre><code>[[:print:]]</code></pre>
</td>
</tr>
<tr>
<td><pre><code>[[:cntrl:]]</code></pre>
</td>
<td><pre><code>[[:graph:]]</code></pre>
</td>
<td>
</td>
</tr>
</table>
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://www.howtogeek.com/666395/how-to-use-the-sed-command-on-linux/"
target="_blank" rel="noreferrer noopener">
How–To Geek :: How to Use the sed Command on Linux</a>
</li>
<li><a href="https://de.linux-console.net/?p=15492"
target="_blank" rel="noreferrer noopener">
Linux-Console.net :: So verwenden Sie sed-Zeichenklassen</a>
</li>
</ul>
<br /><br /><br /><br />
</html>
<html>
<h3>sysctl</h3>
<li>
configure kernel parameters at runtime
</li>
</html>
<html>
Define the following alias:<br />
<code>
tar cvf - . | ( cd \!* ; tar xvf - )<br />
</code>
or as an alias:<br />
<code>
alias cpbytar 'tar cvf - . | ( cd \!* ; tar xvf - )'<br />
</code>
(The alias definition above is for CSH)<br />
<br />
To do a recursive copy of a directory to another location,<br />
preserving the PERMISSIONS and OWNERSHIP of the files.<br />
"cd" to the source location and invoke the following alias<br />
<code>
cpbytar <destination_directory><br />
</code>
<br />
This tip generously supported <br />
by: bhavin@informix.com<br />
</html>
<html>
<ul>
<li>Das Suchen in vi / vim erfolgt mittels:
<code><pre>:/string</pre></code><br />
Mit <code>n</code> (vorwärts suchen) bzwl. <code>N</code> [Shift-n] (rückwärts suchen)<br />
wird weiteres Vorkommen des Strings gefunden.</li>
<br />
<li>Leider werden bei der o.g. Variante auch Wörter gefunden;<br />
die diesen String als Teilstring enthalten;<br />
Will man dagegen Worte finden, die nur aus diesem String bestehen <br />
(also "Wort" == "String"), dann muss das Kommando wie folgt gelten:
<code><pre>:/\<string\></pre></code>(match word boundaries)</li>
<br />
</ul>
<h3>Links:</h3>
<ul>
<li><a href="http://www.vimregex.com/" target="_blank">Vim‐Regex</a></li>
</ul>
</html>
<html>
<ul>
<li><h4>die aktuelle Zeilennummer anzeigen :: </h4>
<pre><code>:-=</code></pre>
kann nicht stimmen
</li>
<li><h4>die Zeilen-Gesamtzahl anzeigen :: </h4>
<pre><code>:=</code></pre>
</li>
<li><h4>die aktuelle Zeilennummer angeben und die Zeilen-Gesamtzahl anzeigen :: </h4>
<pre><code>^g</code></pre>
kann nicht stimmen - es wird der Filename und die Position als Prozent-Zahl angegeben
</li>
<li><h4>von der aktuellen Position bis zum Ende der Zeile löschen :: </h4>
<pre><code>d$</code></pre>
oder
<pre><code>D</code></pre>
</li>
<li><h4>Copy & Paste :: </h4>
besteht aus zwei Schritten:
<pre><code>1. yy</code></pre>
<pre><code>2. p</code></pre>
</li>
</ul>
</html>
<html>
http://vim.wikia.com/wiki/Mapping_keys_in_Vim_-_Tutorial_(Part_1)<br />
http://vim.wikia.com/wiki/Mapping_keys_in_Vim_-_Tutorial_(Part_2)<br />
http://vim.wikia.com/wiki/Mapping_keys_in_Vim_-_Tutorial_(Part_3)<br />
</html>
<html>
<ul>
<li>im vim folgenden Befehl eingeben:
<code><pre>
:%!xxd
</pre></code>
</li>
<li><details><summary><code><b>xxd</b></code> ist ein Shell-Befehl.<br />
"It makes a hexdump or do the reverse". <br />
<a href="https://linuxcommandlibrary.com/man/xxd"
target="_blank" rel="noreferrer noopener">
Linux Command Library :: xxd</a>
<br />
</li>
<li>Es sind auch Plugins möglich, wie z.B. <b>hexman.vim</b> (s. Programmer Hat‐Link).
</li>
</ul>
<h3>Links:</h3>
<ul>
<li><a href="https://vi.stackexchange.com/questions/2232/how-can-i-use-vim-as-a-hex-editor#2234"
target="_blank" rel="noreferrer noopener">
StackExchange :: How can I use vim as a hex editor?</a>
</li>
<li><a href="https://www.programmerhat.com/vim-hex-editor/"
target="_blank" rel="noreferrer noopener">
Programmer Hat :: Using vim as a hex editor</a>
</li>
</ul>
</html>
<html>
• command line tool (Linux) <br >
<br />
• the program parses one or more XML files, <br />
specified on the command line as XML-FILE<br />
(or the standard input if the filename provided is - )<br />
<br />
• <b>Syntax:</b><br />
xmllint [ OPTIONS ] {XML-FILE(S)... -}<br />
<br/>
OPTIONS u.a. <br />
<b>--format :: </b>gibt den Inhalt des XML-Files zeilenweise formatiert aus<br />
<b>--version :: </b>gibt die verwendete Version aus<br />
<b>--debug :: </b><br />
<b>--postvalid :: </b>überprüt das File darauf, ob es valide ist, und zwar _nach_ der Verarbeitung<br />
<b>--valid :: </b>überprüft das File darauf, ob es valide ist, und zwar _vor_ der Verarbeitung<br />
<br />
<b>--shell :: </b> ruft eine separate Shell auf, mit der man weitere<br />
Befehle aufrufen kann, wie z.B. <b>validate</b>, um das Dokument <br />
auf Fehler zu überprüfen.<br />
<br />
Im Editor „<b>UltraEdit</b>“ lässt sich auch das Tool xmllint<br />
aufrufen (Format → XMLlint Tool)<br />
<br />
Der Eintrag im Menü wird erst dann "sichtbar",<br />
wenn ein xml-File im Editor eingeladen wurde.<br />
<h3>Link:</h3>
<ul>
<li><a href="http://xmlsoft.org/xmllint.html" target="_blank" rel="noreferrer noopener">XmlSoft.org :: xmllint</a></li>
</ul>
</html>
<html>
- seit 2012 keine Weiterentwicklung<br>
<br>
<u>Syntax:</u><br>
<b> xmlstarlet</b> <i>actions options file(s)</i><br>
wobei:<ul>
<li><b>ed</b> ("edit") <br> gibt den Inhalt des Files aus<br /> oder aktualisiert sie</li><br>
<li><b>sel</b> ("select") <br> selektiert Daten vom XML-File oder <br />stellt eine Abfrage an das XML-File (XPATH usw.)</li><br>
<li><b>el</b> ("element") <br> gibt (nur) die Tags in Form einer abgespeckten Hierarchie aus</li><br>
<li><b>val</b> ("validate") <br> die XML-Files werden auf Validität und Wohlgeformtheit überprüft</li>
</ul>
Die Optionen sind von "action" zu "action" verschieden.<br>
<h3>Aktion "sel (select)"</h3>
- wird die Option "-t (--template)" verwendet, so stehen folgende Sub-Optionen zur Verfügung:<br>
<table border=1>
<tr>
<td>-c (--copy-of) <xpath></td><td>print copy of XPATH expression</td>
</tr>
<tr>
<td>-v (--value-of) <xpath> </td><td>print value of XPATH expression</td>
</tr>
<tr>
<td>-o (--output) <string> </td><td>output string literal;<br>
in der Ausgabe zusätzliche Zeichen ausgegeben:<ul>
<li>Tabulator-Zeichen: $'\t'</li>
<li>Newline-Zeichen:$'\n'</li></ul></td>
</tr>
<tr>
<td>-n (--nl) </td><td>print new line</td>
</tr>
</table>
<h3>Aktion "ed (edit)"</h3>
<h3>Aktion "el (element)"</h3>
<b>Syntax:</b> xmlstarlet el [<options>] XML-File<br />
Die "options" sind: <br />
<table>
<tr>
<td><b>-a<b></td><td> show attribures as well</td>
</tr>
<tr>
<td><b>-v<b></td><td> show attributes and their values</td>
</tr>
<tr>
<td><b>-u<b></td><td> print out sorted unique lines</td>
</tr>
<tr>
<td><b>-d<n><b></td><td> print out sorted unique lines up to depth <n></td>
</tr>
</table>
<h3>Aktion "val (validate)"</h3>
<br />
Links:<br />
http://xmlstar.sourceforge.net/docs.php<br />
<br />
</html>
<html>
<h2>XMLSTARLET USER'S GUIDE</h2>
<h3>1. Basic Command Line Options</h3>
<code><pre>
XMLStarlet Toolkit: Command line utilities for XML
Usage: xml [<options>] <command> [<cmd-options>]
where <command> is one of:
ed (or edit) - Edit/Update XML document(s)
sel (or select) - Select data or query XML document(s) (XPATH, etc)
tr (or transform) - Transform XML document(s) using XSLT
val (or validate) - Validate XML document(s) (well-formed/DTD/XSD/RelaxNG)
fo (or format) - Format XML document(s)
el (or elements) - Display element structure of XML document
c14n (or canonic) - XML canonicalization
ls (or list) - List directory as XML
esc (or escape) - Escape special XML characters
unesc (or unescape) - Unescape special XML characters
pyx (or xmln) - Convert XML into PYX format (based on ESIS - ISO 8879)
p2x (or depyx) - Convert PYX into XML
<options> are:
--version - show version
--help - show help
Wherever file name mentioned in command help it is assumed
that URL can be used instead as well.
Type: xml <command> --help <ENTER> for command help
XMLStarlet is a command line toolkit to query/edit/check/transform
XML documents (for more information see http://xmlstar.sourceforge.net/)
</pre></code>
<h3>2. Select/Query XML documents</h3>
<code><pre>xml sel --help</code></pre>
⇒ Ausgabe:
<code><pre>
XMLStarlet Toolkit: Select from XML document(s)
Usage: xml sel <global-options> {<template>} [ <xml-file> ... ]
where
<global-options> - global options for selecting
<xml-file> - input XML document file name/uri (stdin is used if missing)
<template> - template for querying XML document with following syntax:
<global-options> are:
-C or --comp - display generated XSLT
-R or --root - print root element <xsl-select>
-T or --text - output is text (default is XML)
-I or --indent - indent output
-D or --xml-decl - do not omit xml declaration line
-B or --noblanks - remove insignificant spaces from XML tree
-N &vt;name>=<value> - predefine namespaces (name without 'xmlns:')
ex: xsql=urn:oracle-xsql
Multiple -N options are allowed.
--net - allow fetch DTDs or entities over network
--help - display help
Syntax for templates: -t|--template <options>
where <options>
-c or --copy-of <xpath> - print copy of XPATH expression
-v or --value-of <xpath> - print value of XPATH expression
-o or --output <string> - output string literal
-n or --nl - print new line
-f or --inp-name - print input file name (or URL)
-m or --match <xpath> - match XPATH expression
-i or --if <test-xpath> - check condition <xsl:if test="test-xpath">
-e or --elem <name> - print out element <xsl:element name="name">
-a or --attr <name> - add attribute <xsl:attribute name="name">
-b or --break - break nesting
-s or --sort op xpath - sort in order (used after -m) where
op is X:Y:Z,
X is A - for order="ascending"
X is D - for order="descending"
Y is N - for data-type="numeric"
Y is T - for data-type="text"
Z is U - for case-order="upper-first"
Z is L - for case-order="lower-first"
There can be multiple --match, --copy-of, --value-of, etc options
in a single template. The effect of applying command line templates
can be illustrated with the following XSLT analogue
xml sel -t -c "xpath0" -m "xpath1" -m "xpath2" -v "xpath3" \
-t -m "xpath4" -c "xpath5"
is equivalent to applying the following XSLT
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:call-template name="t1"/>
<xsl:call-template name="t2"/>
</xsl:template>
<xsl:template name="t1">
<xsl:copy-of select="xpath0"/>
<xsl:for-each select="xpath1">
<xsl:for-each select="xpath2">
<xsl:value-of select="xpath3"/>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
<xsl:template name="t2">
<xsl:for-each select="xpath4">
<xsl:copy-of select="xpath5"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
XMLStarlet is a command line toolkit to query/edit/check/transform
XML documents (for more information see http://xmlstar.sourceforge.net/)
Current implementation uses libxslt from GNOME codebase as XSLT processor
(see http://xmlsoft.org/ for more details)
</pre></code>
<h3>3. Editing XML documents</h3>
<code><pre>xml ed --help</code></pre>
⇒ Ausgabe:
<code><pre>
XMLStarlet Toolkit: Edit XML document(s)
Usage: xml ed <global-options> {<action>} [ <xml-file-or-uri> ... ]
where
<global-options> - global options for editing
<xml-file-or-uri> - input XML document file name/uri (stdin is used if missing)
<global-options> are:
-P (or --pf) - preserve original formatting
-S (or --ps) - preserve non-significant spaces
-O (or --omit-decl) - omit XML declaration (<?xml ...?>)
-N <name>=<value> - predefine namespaces (name without 'xmlns:')
ex: xsql=urn:oracle-xsql
Multiple -N options are allowed.
-N options must be last global options.
--help or -h - display help
where <action>
-d or --delete <xpath>
-i or --insert <xpath> -t (--type) elem|text|attr -n <name> -v (--value) <value>
-a or --append <xpath> -t (--type) elem|text|attr -n <name> -v (--value) <value>
-s or --subnode <xpath> -t (--type) elem|text|attr -n <name> -v (--value) <value>
-m or --move <xpath1> <xpath2>
-r or --rename <xpath1> -v <new-name>
-u or --update <xpath> -v (--value) <value>
-x (--expr) <xpath> (-x is not implemented yet)
XMLStarlet is a command line toolkit to query/edit/check/transform
XML documents (for more information see http://xmlstar.sourceforge.net/)
</pre></code>
<h3>4. Using XSLT to transform XML documents</h3>
<code><pre>xml tr --help</pre></code>
⇒ Ausgabe:
<code><pre>
XMLStarlet Toolkit: Transform XML document(s) using XSLT
Usage: xml tr [<options>] <xsl-file>{-p|-s <name>=<value>} [ <xml-file-or-uri> ... ]
where
<xsl-file> - main XSLT stylesheet for transformation
<xml-file> - input XML document file name (stdin is used if missing)
<name>=<value> - name and value of the parameter passed to XSLT processor
-p - parameter is XPATH expression ("'string'" to quote string)
-s - parameter is a string literal
<options> are:
--omit-decl - omit xml declaration <?xml version="1.0"?>
--show-ext - show list of extensions
--val - allow validate against DTDs or schemas
--net - allow fetch DTDs or entities over network
--xinclude - do XInclude processing on document input
--maxdepth val - increase the maximum depth
--html - input document(s) is(are) in HTML format
--docbook - input document(s) is(are) in SGML docbook format
--catalogs - use SGML catalogs from $SGML_CATALOG_FILES
otherwise XML catalogs starting from
file:///etc/xml/catalog are activated by default
XMLStarlet is a command line toolkit to query/edit/check/transform
XML documents (for more information see http://xmlstar.sourceforge.net/)
Current implementation uses libxslt from GNOME codebase as XSLT processor
(see http://xmlsoft.org/ for more details)
</pre></code>
<h3>5. Formatting XML documents</h3>
<code><pre>xml fo --help</code></pre>
⇒ Ausgabe:
<code><pre>
XMLStarlet Toolkit: Format XML document
Usage: xml fo [<options>] <xml-file>
where <options> are
-n or --noindent - do not indent
-t or --indent-tab - indent output with tabulation
-s or --indent-spaces <num> - indent output with <num> spaces
-o or --omit-decl - omit xml declaration <?xml version="1.0"?>
-R or --recover - try to recover what is parsable
-D or --dropdtd - remove the DOCTYPE of the input docs
-C or --nocdata - replace cdata section with text nodes
-N or --nsclean - remove redundant namespace declarations
-e or --encode <encoding> - output in the given encoding (utf-8, unicode...)
-H or --html - input is HTML
-h or --help - print help
XMLStarlet is a command line toolkit to query/edit/check/transform
XML documents (for more information see http://xmlstar.sourceforge.net/)
</pre></code>
<h3>6. Validating XML documents</h3>
<code><pre>xml val --help</code></pre>
⇒ Ausgabe:
<code><pre>
XMLStarlet Toolkit: Validate XML document(s)
Usage: xml val <options> [ <xml-file-or-uri> ... ]
where <options>
-w or --well-formed - validate well-formedness only (default)
-d or --dtd <dtd-file> - validate against DTD
-s or --xsd <xsd-file> - validate against XSD schema
-r or --relaxng <rng-file> - validate against Relax-NG schema
-e or --err - print verbose error messages on stderr
-b or --list-bad - list only files which do not validate
-g or --list-good - list only files which validate
-q or --quiet - do not list files (return result code only)
NOTE: XML Schemas are not fully supported yet due to its incomplete
support in libxml (see http://xmlsoft.org)
XMLStarlet is a command line toolkit to query/edit/check/transform
XML documents (for more information see http://xmlstar.sourceforge.net/)
</pre></code>
<h3>7. Displaying structure of XML documents</h3>
<code><pre>xml el --help</code></pre>
⇒ Ausgabe:
<code><pre>
XMLStarlet Toolkit: Display element structure of XML document
Usage: xml el [<options>] <xml-file>
where
<xml-file> - input XML document file name (stdin is used if missing)
<options>:
-a - show attributes as well
-v - show attributes and their values
-u - print out sorted unique lines
XMLStarlet is a command line toolkit to query/edit/check/transform
XML documents (for more information see http://xmlstar.sourceforge.net/)
</pre></code>
<h3>8. Escape/Unescape special XML characters</h3>
<code><pre>xml esc --help</code></pre>
⇒ Ausgabe:
<code><pre>
XMLStarlet Toolkit: Escape special XML characters
Usage: xml esc [<options>] [<string>]
where <options> are
--help - print usage
(TODO: more to be added in future)
if <string> is missing stdin is used instead.
XMLStarlet is a command line toolkit to query/edit/check/transform
XML documents (for more information see http://xmlstar.sourceforge.net/)
</pre></code>
<h3>9. List directory as XML</h3>
<code><pre>xml ls --help</code></pre>
⇒ Ausgabe:
<code><pre>
XMLStarlet Toolkit: List directory as XML
Usage: xml ls
Lists current directory in XML format.
XMLStarlet is a command line toolkit to query/edit/check/transform
XML documents (for more information see http://xmlstar.sourceforge.net/)
</pre></code>
<h3>10. XML canonicalization</h3>
<code><pre>xml c14n --help</code></pre>
⇒ Ausgabe:
<code><pre>
XMLStarlet Toolkit: XML canonicalization
Usage: xml c14n <mode> <xml-file> [<xpath-file>] [<inclusive-ns-list>]
where
<xml-file> - input XML document file name (stdin is used if '-')
<xpath-file> - XML file containing XPath expression for
exclusive XML canonicalization
Example:
<?xml version="1.0"?>
<XPath xmlns:n0="http://a.example.com" xmlns:n1="http://b.example">
(//. | //@* | //namespace::*)[ancestor-or-self::n1:elem1]
</XPath>
<mode> is one of following:
--with-comments XML file canonicalization w comments (default)
--without-comments XML file canonicalization w/o comments
--exc-with-comments Exclusive XML file canonicalization w comments
--exc-without-comments Exclusive XML file canonicalization w/o comments
XMLStarlet is a command line toolkit to query/edit/check/transform
XML documents (for more information see http://xmlstar.sourceforge.net/)
</pre></code>
<h3>11. Convert XML into PYX format (based on ESIS - ISO 8879)</h3>
<code><pre>xml pyx --help</code></pre>
⇒ Ausgabe:
<code><pre>
XMLStarlet Toolkit: Convert XML into PYX format (based on ESIS - ISO 8879)
Usage: xml pyx {<xml-file>}
where
<xml-file> - input XML document file name (stdin is used if missing)
The PYX format is a line-oriented representation of
XML documents that is derived from the SGML ESIS format.
(see ESIS - ISO 8879 Element Structure Information Set spec,
ISO/IEC JTC1/SC18/WG8 N931 (ESIS))
A non-validating, ESIS generating tool originally developed for
pyxie project (see http://pyxie.sourceforge.net/)
ESIS Generation by Sean Mc Grath http://www.digitome.com/sean.html
XMLStarlet is a command line toolkit to query/edit/check/transform
XML documents (for more information see http://xmlstar.sourceforge.net/)
</pre></code>
<br />
<h2>Link:</h2>
<a href="http://xmlstar.sourceforge.net/doc/xmlstarlet.txt" target=_blank>SourceForge :: xmlstarlet</a><br />
<br />
</html>
<html>
<h3>Examples</h3>
<b>Input1 ::</b> examples/xml/table.xml<br />
<code><pre>
<?xml version="1.0"?>
<xml>
<table>
<rec id="1">
<numField>123</numField>
<stringField>String Value</stringField>
</rec>
<rec id=“2“ >
<numField>346</numField>
<stringField>Text Value</stringField>
</rec>
<rec id="3">
<numField>-23</numField>
<stringField>stringValue</stringField>
</rec>
</table>
</xml>
</pre></code>
<br />
<b>Input2 ::</b> examples/xml/tab-obj.xml<br />
<code><pre>
<?xml version="1.0"?>
<xml>
<table>
<rec id="1">
<numField>123</numField>
<stringField>String Value</stringField>
<object name="Obj1">
<property name="size">10</property>
<property name="type">Data</property>
</object>
</rec>
<rec id="2">
<numField>346</numField>
<stringField>Text Value</stringField>
</rec>
<rec id="3">
<numField>-23</numField>
<stringField>stringValue</stringField>
</rec>
</table>
</xml>
</pre></code>
<br />
<b>Input3 :: </b>examples/html/hello1.html<br />
<code><pre>
<html>
<head>
<title>Hello World</title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<div align="center">Hello World!<br></div>
</body>
</html>
</pre></code>
<br />
<b>Input4 :: </b> examples/sgml/docbook1.sgml<br />
<code><pre>
<!DOCTYPE book
PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<book>
<bookinfo>
<title>DocBook document example</title>
<author>
<firstname>Mikhail</firstname>
<surname>Grushinskiy</surname>
</author>
<copyright>
<year>2002</year>
<holder>Mikhail Grushinskiy</holder>
</copyright>
</bookinfo>
<preface>
<title>Sample document</title>
<para>A simple DocBook example document.</para>
</preface>
<chapter>
<title>XMLStarlet Example</title>
<para>The <emphasis>XMLStarlet</emphasis> command line
toolkit allows querying/checking/editing/transforming/formatting XML documents
from command line</para>
<para>To find out more on how to use the
<emphasis>XMLStarlet</emphasis> for XML processing, point
your browser to <ulink
url="http://xmlstar.sourceforge.net/">http://xmlstar.sourceforge.net/<
/ulink>.
</para>
</chapter>
</book>
</pre></code>
<br />
<b>Stylesheet1::</b> examples/xsl/sum1.xsl<br />
<code><pre>
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:param name="inputFile">-</xsl:param>
<xsl:template match="/">
<xsl:call-template name="t1"/>
</xsl:template>
<xsl:template name="t1">
<xsl:value-of select="sum(/xml/table/rec/numField)"/>
<xsl:value-of select="' '"/>
</xsl:template>
</xsl:stylesheet>
</pre></code>
<br />
<b>Stylesheet2 :: </b> examples/xsl/hello1.xsl<br />
<code><pre>
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:param name="inputFile">-</xsl:param>
<xsl:template match="/">
<xsl:call-template name="t1"/>
</xsl:template>
<xsl:template name="t1">
<xsl:for-each select="/">
<xsl:value-of select="/html/body/div"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
</pre></code>
<br />
<b>Stylesheet3 ::</b> examples/xsl/param1.xsl<br />
<code><pre>
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:param name="Text"/>
<xsl:param name="Count"/>
<xsl:template match="/">
<xsl:call-template name="t1"/>
</xsl:template>
<xsl:template name="t1">
<xsl:for-each select="/xml">
<xsl:value-of select="$Text"/>
<xsl:value-of select="$Count"/>
<xsl:value-of select="' '"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
</pre></code>
<br />
<b>Command ::</b> # XML canonicalization<br />
xml c14n --with-comments ../examples/xml/structure.xml ; echo $?<br />
<br />
⇒Result Output:
<code><pre>
<a1>
<a11>
<a111>
<a1111></a1111>
</a111>
<a112>
<a1121></a1121>
</a112>
</a11>
<a12></a12>
<a13>
<a131></a131>
</a13>
</a1>
0
</pre></code>
<br />
<b>Command ::</b> # XML exclusive canonicalization<br />
xml c14n --exc-with-comments ../examples/xml/c14n.xml ../examples/xml/c14n.xpath<br />
<br />
⇒ Result Output:
<code><pre>
<n1:elem1 xmlns:n1="http://b.example">
contentv
</n1:elem1>
</pre></code>
<br />
<b>Command ::</b> # Count elements matching XPath expression<br />
xml sel -t -v "count(/xml/table/rec/numField)" xml/table.xml<br />
<br />
⇒ Result Output:
<code><pre>
3
</pre></code>
<br />
<b>Command ::</b> # Count all nodes in XML document<br />
xml sel -t -f -o " " -v "count(//node())" xml/table.xml xml/tab-obj.xml<br />
<br />
⇒ Result Output:
<code><pre>
xml/table.xml 32
xml/tab-obj.xml 41
</pre></code>
<br />
<b>Command ::</b> # Delete elements matching XPath expression<br />
xml ed -d /xml/table/rec[@id='2'] xml/table.xml<br />
<br />
⇒ Result Output:
<code><pre>
<?xml version="1.0"?>
<xml>
<table>
<rec id="1">
<numField>123</numField>
<stringField>String Value</stringField>
</rec>
<rec id="3">
<numField>-23</numField>
<stringField>stringValue</stringField>
</rec>
</table>
</xml>
</pre></code>
<br />
<b>Command ::</b> # Generate HTML from given SGML docbook document<br />
xml tr --omit-decl --docbook /usr/share/sgml/docbook/yelp/docbook/html/docbook.xsl sgml/docbook1.sgml | \
xml fo --html --indent-spaces 2
<br />
⇒ Result Output:
<code><pre>
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-
Type"/>
<title>DocBook document example</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.48"/>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<div class="book">
<div class="titlepage">
<div>
<h1 class="title"><a name="id2765244"/>DocBook document
example</h1>
</div>
<div>
<h3 class="author">Mikhail Grushinskiy</h3>
</div>
<div>
<p class="copyright">Copyright © 2002 Mikhail
Grushinskiy</p>
</div>
<hr/>
</div>
<div class="toc">
<p>
<b>Table of Contents</b>
</p>
<dl>
<dt>
<a href="#id2765482">Sample document</a>
</dt>
<dt>1. <a href="#id2767329">XMLStarlet
Example</a></dt>
</dl>
</div>
<div class="preface">
<div class="titlepage">
<div>
<h2 class="title"><a name="id2765482"/>Sample
document</h2>
</div>
</div>
<p>A simple DocBook example document.</p>
</div>
<div class="chapter">
<div class="titlepage">
<div>
<h2 class="title"><a name="id2767329"/>Chapter 1.
XMLStarlet
Example</h2>
</div>
</div>
<p>The <span
class="emphasis"><i>XMLStarlet</i></span>
command
line
toolkit
allows querying/checking/editing/transforming/formatting XML documents
from command line</p>
<p>To find out more on how to use the
<span class="emphasis"><i>XMLStarlet</i></span> for
XML
processing,
point
your browser to <a href="http://xmlstar.sourceforge.net/"
target="_top">http://xmlstar.sourceforge.net/</a>.
</p>
</div>
</div>
</body>
</html>
</pre></code>
<br />
<b>Command:</b> :: # Validate XML document against DTD<br />
xml val --dtd dtd/table.dtd xml/tab-obj.xml >/dev/null 2>&1; echo $?<br />
<br />
⇒ Result Output:
<code><pre>
1
</pre></code>
<br />
<b>Command :: </b> # Validate XML document against DTD<br />
xml val --dtd dtd/table.dtd xml/table.xml >/dev/null 2>&1; echo $?<br />
<br />
⇒ Result Output:
<code><pre>
0
</pre></code>
<br />
<b>Command :: </b> # Validate XML document against DTD<br />
xml val --dtd xml/foo.dtd xml/foo.xml 2>/dev/null<br />
<br />
⇒ Result Output:
<code><pre>
xml/foo.xml - invalid
</pre></code>
<br />
<b>Command :: </b> # Display element structure of XML document<br />
xml el ./xml/tab-obj.xml<br />
<br />
⇒ Result Output:
<code><pre>
xml
xml/table
xml/table/rec
xml/table/rec/numField
xml/table/rec/stringField
xml/table/rec/object
xml/table/rec/object/property
xml/table/rec/object/property
xml/table/rec
xml/table/rec/numField
xml/table/rec/stringField
xml/table/rec
xml/table/rec/numField
xml/table/rec/stringField
</pre></code>
<br />
<b>Command :: </b> # Display element structure of XML document (including attributes)<br />
xml el -a ./xml/tab-obj.xml<br />
<br />
⇒ Result Output:
<code><pre>
xml
xml/table
xml/table/rec
xml/table/rec/@id
xml/table/rec/numField
xml/table/rec/stringField
xml/table/rec/object
xml/table/rec/object/@name
xml/table/rec/object/property
xml/table/rec/object/property/@name
xml/table/rec/object/property
xml/table/rec/object/property/@name
xml/table/rec
xml/table/rec/@id
xml/table/rec/numField
xml/table/rec/stringField
xml/table/rec
xml/table/rec/@id
xml/table/rec/numField
xml/table/rec/stringField
</pre></code>
<br />
<b>Command :: </b> # Display element structure of XML document (including attribute values)<br />
xml el -v ./xml/tab-obj.xml<br />
<br />
⇒ Result Output:
<code><pre>
xml
xml/table
xml/table/rec[@id='1']
xml/table/rec/numField
xml/table/rec/stringField
xml/table/rec/object[@name='Obj1']
xml/table/rec/object/property[@name='size']
xml/table/rec/object/property[@name='type']
xml/table/rec[@id='2']
xml/table/rec/numField
xml/table/rec/stringField
xml/table/rec[@id='3']
xml/table/rec/numField
xml/table/rec/stringField
</pre></code>
<br />
<b>Command :: </b> # Escape special XML characters<br />
cat xml/structure.xml | xml esc<br />
<br />
⇒ Result Output:
<code><pre>
<a1>
<a11>
<a111>
<a1111/>
</a111>
<a112>
<a1121/>
</a112>
</a11>
<a12/>
<a13>
<a131/>
</a13>
</a1>
</pre></code>
<br />
<b> Command :: </b> # Calculate EXSLT (XSLT extentions) XPath value<br />
echo "<x/>" | xml sel -t -v "math:abs(-1000)"<br />
<br />
⇒ Result Output:
<code><pre>
1000
</pre></code>
<br />
<b> Command :: </b> # Find XML files matching XPath expression (containing 'object' element)<br />
xml sel -t -m //object -f xml/table.xml xml/tab-obj.xml<br />
<br />
⇒ Result Output:
<code><pre>
xml/tab-obj.xml
</pre></code>
<br />
<b>Command :: </b> # Generate XML document using command line xml sel<br />
echo "<x/>" | xml sel -t -m / -e xml -e child -a data -o value<br /><br />
<br />
⇒ Result Output:
<code><pre>
<xml><child data="value"/></xml>
</pre></code>
<br />
<b>Command :: </b> # Apply XSLT stylesheet to HTML input file<br />
xml tr --html xsl/hello1.xsl html/hello1.html<br />
<br />
⇒Result Output:
<code><pre>
Hello World!
</pre></code>
<br />
<b>Command :: </b> # Use local-name() XSLT function in XPath expression<br />
xml sel -t -v "//*[local-name()='query']" xsql/jobserve.xsql<br />
<br />
⇒ Result Output:
<code><pre>
SELECT substr(title,1,26) short_title, title, location, skills
FROM job
WHERE UPPER(title) LIKE '%ORACLE%'
ORDER BY first_posted DESC
</pre></code>
<br />
<b>Command :: </b> # Select text value of an XML element mathing given XPath expression<br />
xml sel -t -m "/xml/table/rec[@id='2']" -v numField xml/table.xml<br />
<br />
⇒Result Output:
<code><pre>
346
</pre></code>
<br />
<b>Command ::</b> # Move element node<br />
echo '<x id="1"><a/><b/></x>' | xml ed -m "//b" "//a"<br />
<br />
⇒Result Output:
<code><pre>
<?xml version="1.0"?>
<x id="1">
<a>
<b/>
</a>
</x>
</pre></code>
<br />
<b>Command ::</b> # Format XML document disabling indent<br />
cat xml/tab-obj.xml | xml fo --noindent <br />
<br />
⇒Result Output:
<code><pre>
<?xml version="1.0"?>
<xml>
<table>
<rec id="1">
<numField>123</numField>
<stringField>String Value</stringField>
<object name="Obj1">
<property name="size">10</property>
<property name="type">Data</property>
</object>
</rec>
<rec id="2">
<numField>346</numField>
<stringField>Text Value</stringField>
</rec>
<rec id="3">
<numField>-23</numField>
<stringField>stringValue</stringField>
</rec>
</table>
</xml>
</pre></code>
<br />
<b>Command ::</b># Predefine namespaces for XPath expressions<br />
xml sel -N xsql=urn:oracle-xsql -t -v /xsql:query xsql/jobserve.xsql<br />
<br />
⇒Result Output:
<code><pre>
SELECT substr(title,1,26) short_title, title, location, skills
FROM job
WHERE UPPER(title) LIKE '%ORACLE%'
ORDER BY first_posted DESC
</pre></code>
<br />
<b>Command :: </b># Recover malformed XML document<br />
xml fo -R xml/malformed.xml 2>/dev/null<br />
<br />
⇒Result Output:
<code><pre>
<?xml version="1.0"?>
<test_output>
<test_name>foo</test_name>
<subtest>...</subtest>
</test_output>
</pre></code>
<br />
<b>Command :: </b># Rename attributes<br />
xml ed -r "//*/@id" -v ID xml/tab-obj.xml<br />
<br />
⇒Result Output:
<code><pre>
<?xml version="1.0"?>
<xml>
<table>
<rec ID="1">
<numField>123</numField>
<stringField>String Value</stringField>
<object name="Obj1">
<property name="size">10</property>
<property name="type">Data</property>
</object>
</rec>
<rec ID="2">
<numField>346</numField>
<stringField>Text Value</stringField>
</rec>
<rec ID="3">
<numField>-23</numField>
<stringField>stringValue</stringField>
</rec>
</table>
</xml>
</pre></code>
<br />
<b>Command ::</b># Rename elements<br />
xml ed -r "/xml/table/rec" -v record xml/tab-obj.xml<br />
<br />
⇒Result Output:
<code><pre>
<?xml version="1.0"?>
<xml>
<table>
<record id="1">
<numField>123</numField>
<stringField>String Value</stringField>
<object name="Obj1">
<property name="size">10</property>
<property name="type">Data</property>
</object>
</record>
<record id="2">
<numField>346</numField>
<stringField>Text Value</stringField>
</record>
<record id="3">
<numField>-23</numField>
<stringField>stringValue</stringField>
</record>
</table>
</xml>
</pre></code>
<br />
<b>Command ::</b># Validate against XSD schema<br />
xml val -b -s xsd/table.xsd xml/table.xml xml/tab-obj.xml 2>/dev/null; echo $?<br />
<br />
⇒Result Output:
<code><pre>
xml/tab-obj.xml
1
</pre></code>
<br />
<b>Command ::</b># xsl:copy-of in xml sel command<br />
xml sel -B -t -m /xml/table/rec -c . -n xml/table.xml<br />
<br />
⇒Result Output:
<code><pre>
<rec id="1"><numField>123</numField><stringField>String
Value</stringField></rec>
<rec id="2"><numField>346</numField><stringField>Text
Value</stringField></rec>
<rec id="3"><numField>-
23</numField><stringField>stringValue</stringField><
/rec>
</pre></code>
<br />
<b>Command ::</b># Query XML document and produce sorted text table<br />
xml sel -T -t -m /xml/table/rec -s D:N:- "@id" -v "concat(@id,'|',numField,'|',stringField)" -n xml/table.xml<br />
<br />
⇒Result Output:
<code><pre>
3|-23|stringValue
2|346|Text Value
1|123|String Value
</pre></code>
<br />
<b>Command:: </b># Print structure of XML element using xml sel <br />
(advanced XPath expressions and xml sel command usage)<br />
<br />
xml sel -T -t -m '//*' -m 'ancestor-or-self::*' -v 'name()' -i 'not(position()=last())' -o . -b -b -n xml/structure.xml<br />
⇒ Result Output:
<code><pre>
a1
a1.a11
a1.a11.a111
a1.a11.a111.a1111
a1.a11.a112
a1.a11.a112.a1121
a1.a12
a1.a13
a1.a13.a131
</pre></code>
<br />
<b>Command ::</b># Calculating running sum on XML document<br />
xml sel -t -v "sum(/xml/table/rec/numField)" xml/table.xml<br />
<br />
⇒Result Output:
<code><pre>
446
</pre></code>
<br />
<b>Command :: </b> # Indent XML document with tabs<br />
cat xml/tab-obj.xml | xml fo --indent-tab <br />
<br />
⇒Result Output:
<code><pre>
<?xml version="1.0"?>
<xml>
<table>
<rec id="1">
<numField>123</numField>
<stringField>String Value</stringField>
<object name="Obj1">
<property name="size">10</property>
<property name="type">Data</property>
</object>
</rec>
<rec id="2">
<numField>346</numField>
<stringField>Text Value</stringField>
</rec>
<rec id="3">
<numField>-23</numField>
<stringField>stringValue</stringField>
</rec>
</table>
</xml>
</pre></code>
<br />
<b>Command :: </b> # Generate plain text table from XML document<br />
xml sel -T -t -m /xml/table/rec -v "@id" -o "|" -v numField -o "|" -v stringField -n xml/table.xml<br />
<br />
⇒ Result Output:
<code><pre>
1|123|String Value
2|346|Text Value
3|-23|stringValue
</pre></code>
<br />
<b>Command :: </b># Generate plain text table from XML document<br />
xml sel -T -t -m /xml/table/rec -v "concat(@id,'|',numField,'|',stringField)" -n xml/table.xml<br />
<br />
⇒Result Output:
<code><pre>
1|123|String Value
2|346|Text Value
3|-23|stringValue
</pre></code>
<br />
<b>Command ::</b># Generate plain text table from XML document<br />
<code><pre>xml sel -T \
-t -o "===================" -n \
-m xml/table/rec -v "concat(@id,'|',numField,'|',stringField)" -n \
-t -o "===================" -n xml/table.xml
</pre></code>
<br />
⇒Result Output:
<code><pre>
===================
1|123|String Value
2|346|Text Value
3|-23|stringValue
===================
</pre></code>
<br />
<b>Command :: </b># Select from XML document containing unicode characters<br />
xml sel -T -t -m "//test[@lang='français']/@lang" -v . -n xml/unicode.xml<br />
<br />
⇒Result Output:
<code><pre>
francais
francais
francais
</pre></code>
<br />
<b>Command :: </b># Update value of an attribute<br />
xml ed -u '/xml/table/rec[@id=3]/@id' -v 5 xml/tab-obj.xml<br />
<br />
⇒Result Output:
<code><pre>
<?xml version="1.0"?>
<xml>
<table>
<rec id="1">
<numField>123</numField>
<stringField>String Value</stringField>
<object name="Obj1">
<property name="size">10</property>
<property name="type">Data</property>
</object>
</rec>
<rec id="2">
<numField>346</numField>
<stringField>Text Value</stringField>
</rec>
<rec id="5">
<numField>-23</numField>
<stringField>stringValue</stringField>
</rec>
</table>
</xml>
</pre></code>
<br />
<b>Command :: </b># Update value of an element<br />
xml ed -u '/xml/table/rec[@id=1]/numField' -v 0 xml/tab-obj.xml<br />
<br />
⇒Result Output:
<code><pre>
<?xml version="1.0"?>
<xml>
<table>
<rec id="1">
<numField>0</numField>
<stringField>String Value</stringField>
<object name="Obj1">
<property name="size">10</property>
<property name="type">Data</property>
</object>
</rec>
<rec id="2">
<numField>346</numField>
<stringField>Text Value</stringField>
</rec>
<rec id="3">
<numField>-23</numField>
<stringField>stringValue</stringField>
</rec>
</table>
</xml>
</pre></code>
<br />
<b>Command ::</b> # Validate XML documents using well-formedness/DTD/XSD/RelaxNG checks<br />
<code><pre>
echo "==============================================="
echo "Well-Formedness Validation Tests"
echo "- 1 -------------------------------------------"
xml val xml/table.xml xml/tab-obj.xml xml/tab-bad.xml 2>/dev/null; echo $?
echo "- 2 -------------------------------------------"
xml val -g xml/table.xml xml/tab-obj.xml xml/tab-bad.xml 2>/dev/null; echo $?
echo "- 3 -------------------------------------------"
xml val -b xml/table.xml xml/tab-obj.xml xml/tab-bad.xml 2>/dev/null; echo $?
echo "- 4 -------------------------------------------"
xml val -q xml/table.xml xml/tab-obj.xml 2>/dev/null; echo $?
echo "==============================================="
echo "DTD Validation Tests"
echo "- 1 -------------------------------------------"
xml val -d dtd/table.dtd xml/table.xml xml/tab-obj.xml xml/tab-bad.xml
2>/dev/null; echo $?
echo "- 2 -------------------------------------------"
xml val -g -d dtd/table.dtd xml/table.xml xml/tab-obj.xml xml/tab-bad.xml
2>/dev/null; echo $?
echo "- 3 -------------------------------------------"
xml val -b -d dtd/table.dtd xml/table.xml xml/tab-obj.xml xml/tab-bad.xml
2>/dev/null; echo $?
echo "- 4 -------------------------------------------"
xml val -q -d dtd/table.dtd xml/table.xml 2>/dev/null; echo $?
echo "==============================================="
echo "Schema Validation Tests"
echo "- 1 -------------------------------------------"
xml val -s xsd/table.xsd xml/table.xml xml/tab-obj.xml xml/tab-bad.xml
2>/dev/null; echo $?
echo "- 2 -------------------------------------------"
xml val -g -s xsd/table.xsd xml/table.xml xml/tab-obj.xml xml/tab-bad.xml
2>/dev/null; echo $?
echo "- 3 -------------------------------------------"
xml val -b -s xsd/table.xsd xml/table.xml xml/tab-obj.xml xml/tab-bad.xml
2>/dev/null; echo $?
echo "- 4 -------------------------------------------"
xml val -q -s xsd/table.xsd xml/table.xml 2>/dev/null; echo $?
echo "==============================================="
echo "RelaxNG Schema Validation Tests"
echo "- 1 -------------------------------------------"
xml val -r relaxng/address.rng relaxng/address.xml relaxng/address-bad.xml
2>/dev/null; echo $?
echo "- 2 -------------------------------------------"
xml val -g -r relaxng/address.rng relaxng/address.xml relaxng/address-bad.xml
2>/dev/null; echo $?
echo "- 3 -------------------------------------------"
xml val -b -r relaxng/address.rng relaxng/address.xml relaxng/address-bad.xml
2>/dev/null; echo $?
echo "- 4 -------------------------------------------"
xml val -q -r relaxng/address.rng relaxng/address.xml 2>/dev/null; echo $?
</pre></code>
<br />
⇒Result Output:
<code><pre>
===============================================
Well-Formedness Validation Tests
- 1 -------------------------------------------
xml/table.xml - valid
xml/tab-obj.xml - valid
xml/tab-bad.xml - invalid
1
- 2 -------------------------------------------
xml/table.xml
xml/tab-obj.xml
1
- 3 -------------------------------------------
xml/tab-bad.xml
1
- 4 -------------------------------------------
0
===============================================
DTD Validation Tests
- 1 -------------------------------------------
xml/table.xml - valid
xml/tab-obj.xml - invalid
xml/tab-bad.xml - invalid
1
- 2 -------------------------------------------
xml/table.xml
1
- 3 -------------------------------------------
xml/tab-obj.xml
xml/tab-bad.xml
1
- 4 -------------------------------------------
0
===============================================
Schema Validation Tests
- 1 -------------------------------------------
xml/table.xml - valid
xml/tab-obj.xml - invalid
xml/tab-bad.xml - invalid
1
- 2 -------------------------------------------
xml/table.xml
1
- 3 -------------------------------------------
xml/tab-obj.xml
xml/tab-bad.xml
1
- 4 -------------------------------------------
0
===============================================
RelaxNG Schema Validation Tests
- 1 -------------------------------------------
relaxng/address.xml - valid
relaxng/address-bad.xml - invalid
1
- 2 -------------------------------------------
relaxng/address.xml
1
- 3 -------------------------------------------
relaxng/address-bad.xml
1
- 4 -------------------------------------------
0
</pre></code>
<br />
<b>Command :: </b># Include one XML document into another using XInclude<br />
xml tr --xinclude xsl/cat.xsl xml/document.xml<br />
<br />
⇒Result Output:
<code><pre>
<?xml version="1.0" encoding="utf-8"?>
<document xmlns:xi="http://www.w3.org/2001/XInclude">
<p>120 Mz is adequate for an average home user.</p>
<disclaimer xml:base="xml/disclaimer.xml">
<p>The opinions represented herein represent those of the individual
and should not be interpreted as official policy endorsed by this
organization.</p>
</disclaimer>
</document>
</pre></code>
<br />
<b>Command :: </b># Passing parameters to XSLT stylesheet<br />
xml tr xsl/param1.xsl -p Count='count(/xml/table/rec)' -s Text="Count=" xml/table.xml<br />
<br />
⇒Result Output:
<code><pre>
Count=3
</pre></code>
<br />
<b>Command :: </b> # Applying XSLT stylesheet to XML document<br />
xml tr xsl/sum1.xsl xml/table.xml<br />
<br />
⇒Result Output:
<code><pre>
446
</pre></code>
<br />
<br />
Link:<br />
http://xmlstar.sourceforge.net/doc/xmlstarlet.txt<br />
<br />
</html>
<html>
<ul>
<li>PackageManager für JavaScript</li>
</ul>
<h3>Link:</h3>
https://en.wikipedia.org/wiki/Npm_(software)#Alternatives
</html>
<html>
* Installation:
<pre><code>sudo apt install zsh</code></pre><br />
* hilfreiche Erweiterung: <b>oh‐my‐zsh</b><br />
→ Installation: <pre><code>sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"</code></pre>
<h3>Link:</h3>
https://dev.to/deepu105/configure-a-beautiful-terminal-on-unix-with-zsh-4mcb
</html>